Page 1 of 1

Empty #define statement

Posted: Mon Oct 19, 2020 8:02 am
by mnf
A puzzle: I got stuck at this state - at line 76 there is an empty #define - which won't compile.

Not sure how I managed it or how to cure it....

Any suggestions
st7789.fcfx
(26.37 KiB) Downloaded 161 times
C:\Users\mn_fi\DOWNLO~1>"C:\PROGRA~2\Flowcode\Common\COMPIL~1\avr\BATCHF~1\..\bin\avr-gcc.exe" -mmcu=atmega328p -Os -ffunction-sections -fdata-sections -funsigned-char -o "C:\Users\mn_fi\DOWNLO~1\st7789.elf" "C:\Users\mn_fi\DOWNLO~1\st7789.c" -lm -Wl,-gc-sections
C:\Users\mn_fi\DOWNLO~1\st7789.c:55:10: error: no macro name given in #define directive
And the C code
MX_UINT8 FCLV_LOOP1;


/*========================================================================*\
Use :panel
:Variable declarations
:Macro function declarations
\*========================================================================*/
#define

#define FCV_FALSE (0)
#define FCV_TRUE (1)
MX_GLOBAL MX_UINT16 FCV_YSTART;
MX_GLOBAL MX_UINT16 FCV_XSTART;
Martin

Re: Empty #define statement

Posted: Mon Oct 19, 2020 8:54 am
by stefan.erni
Hi Martin

I deleted all your macros and all your code and changed the chip to a PIC, but still this error!
There is a strange thing (for me) What is this panel with Pins in your Program even I deleted all?

regards

Stefan
Panel.PNG
Panel.PNG (46.13 KiB) Viewed 3732 times

Re: Empty #define statement

Posted: Mon Oct 19, 2020 10:42 am
by Steve
This problem is related to the "DC Pin" property on the panel. If you edit this and untick "generate a define for the property" then the problem goes away.

Or if you want a define for this property to be added, click the drop-down next to that checkbox and enter the define name and value.

Re: Empty #define statement

Posted: Mon Oct 19, 2020 11:14 am
by stefan.erni
Hi Steve

Thanks a lot. It solved the compiling problem.

In one of my program I had also this panel and I never understand why there are pins, and for what are this pins? a component?

In the 2D panel or 3D panel there are no components. I deleted all......

regards

Stefan
st7789_panel.fcfx
(9.44 KiB) Downloaded 175 times

Re: Empty #define statement

Posted: Mon Oct 19, 2020 11:55 am
by mnf
Many thanks, I don't think I'd have spotted that - and I'd have starting deleting things and that would surely have been last to go!

Martin