Page 1 of 1

Problems with Macro in external Code

Posted: Thu Nov 24, 2016 10:59 pm
by Wolfgang Kos
I have FLOWCODE 6 with a PIC24FJ128GA010 (16bit) with this problems:

Here, I will open the external code with the macro dataZWMS_CycleStorage
and I will send the variable FCV_SENSOR to the code.

Like this in C-Code show the picture:
dataZWMS_CycleStorage(FCV_SENSOR);


The compiler wrote this error:
undefined reference to `dataZWMS_CycleStorage'
Error returned from [pic30-gcc.exe]

The C-Code was generated but not the hex file.

If I compile the C-Code in MPLAB X IDE, then I have no error and the Hex-File was generated
Who can help me here or has an idea..???
So that the hex-file will generated in FLOWCODE 6
_______________________________________________________________________________________________________________
The next problems is, I have a lot of "warning" although the program works???
Like this:

Sensor_18.11.2016.c: In function 'FCD_047b1_RS232_Sensor__SendString':
Sensor_18.11.2016.c:545: warning: pointer targets in passing argument 1 of 'FCI_GETLENGTH' differ in signedness
Sensor_18.11.2016.c: In function 'FCD_08f41_adc_base__GetString':
Sensor_18.11.2016.c:969: warning: pointer targets in passing argument 3 of 'FCI_FLOAT_TO_STRING' differ in signedness
Sensor_18.11.2016.c: In function 'FCD_04071_LCD__PrintString':
Sensor_18.11.2016.c:1230: warning: pointer targets in passing argument 1 of 'FCI_GETLENGTH' differ in signedness
Sensor_18.11.2016.c: In function 'FCD_04071_LCD__PrintNumber':
Sensor_18.11.2016.c:1273: warning: pointer targets in passing argument 2 of 'FCI_TOSTRING' differ in signedness
Sensor_18.11.2016.c: In function 'FCD_04071_LCD__PrintFormattedNumber':
Sensor_18.11.2016.c:1446: warning: pointer targets in passing argument 2 of 'FCI_TOSTRU32' differ in signedness
Sensor_18.11.2016.c:1450: warning: pointer targets in passing argument 2 of 'FCI_TOSTRS32' differ in signedness
Sensor_18.11.2016.c: In function 'FCM_Sensor':
Sensor_18.11.2016.c:1999: warning: implicit declaration of function 'dataZWMS_CycleStorage'
Sensor_18.11.2016.c: In function '_U2RXInterrupt':
Sensor_18.11.2016.c:2301: warning: PSV model not specified for '_U2RXInterrupt'; assuming 'auto_psv' this may affect latency
Sensor_18.11.2016.c: In function '_T1Interrupt':
Sensor_18.11.2016.c:2314: warning: PSV model not specified for '_T1Interrupt'; assuming 'auto_psv' this may affect latency

Thank you for all Infos

Wolfgang

Re: Problems with Macro in external Code

Posted: Fri Nov 25, 2016 9:12 am
by LeighM
Hi
You will need include the code for this C function, either directly, or via an #include "myCcode.c" directive, into the "Supplementary Code" section of Flowcode.
See the Flowcode menu and dialog Build->Project Options->General Options tab.
The warnings can be ignored.

Re: Problems with Macro in external Code

Posted: Fri Nov 25, 2016 11:39 am
by Wolfgang Kos
I must send the variable to this code!
Here you can see the the include files:

Re: Problems with Macro in external Code

Posted: Fri Nov 25, 2016 12:18 pm
by LeighM
You will also need to either compile and link the external code, or include the source ...
Code2.jpg
Code2.jpg (70.17 KiB) Viewed 5964 times

Re: Problems with Macro in external Code

Posted: Fri Nov 25, 2016 12:38 pm
by Wolfgang Kos
Is the same...

Re: Problems with Macro in external Code

Posted: Fri Nov 25, 2016 12:44 pm
by Wolfgang Kos
Your idea was good, at the moment without errors :-)
like this, here is the code very difficult :-)