FCLsz_TEMPSTR

Any bugs you encounter with Flowcode should be discussed here.
Post Reply
SpeedPIC32
Posts: 300
http://meble-kuchenne.info.pl
Joined: Thu Dec 10, 2020 2:35 pm
Location: Germany
Has thanked: 41 times
Been thanked: 18 times

Flowcode v11 FCLsz_TEMPSTR

Post by SpeedPIC32 »

C:\ProgramData\MatrixTSL\FlowcodeV11\CAL\PIC32BIT\PIC32BIT_CAL_String.c:1039:66: error: 'FCLsz_TEMPSTR' undeclared (first use in this function)

SpeedPIC32
Posts: 300
Joined: Thu Dec 10, 2020 2:35 pm
Location: Germany
Has thanked: 41 times
Been thanked: 18 times

Re: FCLsz_TEMPSTR

Post by SpeedPIC32 »

Hello! It looks like you've run into a compiler error while trying to build your Flowcode project. 🛠️

The specific error is:

C:\ProgramData\MatrixTSL\FlowcodeV11\CAL\PIC32BIT\PIC32BIT_CAL_String.c: In function 'FCI_EXPLODETOINTARRAY':
C:\ProgramData\MatrixTSL\FlowcodeV11\CAL\PIC32BIT\PIC32BIT_CAL_String.c:1039:66: error: 'FCLsz_TEMPSTR' undeclared (first use in this function)
FCL_DATAARRAY[FCR_RETVAL] = FCI_STRING_TO_INT(FCL_TEMPSTR, FCLsz_TEMPSTR);

This is a classic "undeclared identifier" error, meaning the compiler (in this case, xc32-gcc.exe) can't find the definition for the variable FCLsz_TEMPSTR inside the FCI_EXPLODETOINTARRAY function in the file PIC32BIT_CAL_String.c.

🧐 What You Should Do

Since this error is occurring in a file that is part of the Flowcode Compiler Abstraction Layer (CAL) (C:\ProgramData\MatrixTSL\FlowcodeV11\CAL...), it's likely not an error in your Flowcode project (Flowcode11_test_1.fcfx) but an issue with the Flowcode installation, compiler, or a bug in Flowcode v11 itself, specifically with how it handles String manipulation for your PIC32MZ2048EFH144 device.

Here are the best troubleshooting steps to resolve this:

1. Check for Flowcode Updates:

Since the error is in a core CAL file, the first and easiest step is to see if MatrixTSL has released an update or patch for Flowcode v11.0.0.8 that fixes this specific compiler component bug. Check the official Flowcode website or forum.

2. Clean the Project and Recompile:

Sometimes, temporary compiler files can get corrupted. In Flowcode, look for an option to "Clean" the project build before trying to compile again.

3. Simplify String Operations (Temporary Fix):

If your Flowcode program is using a String Component macro like Explode to Int Array, try to temporarily remove or bypass that specific part of your code to see if the project compiles without it. If it does, you've confirmed that the string operation is the source of the issue.

4. Contact Flowcode Support:

Because the error is in a proprietary CAL file (PIC32BIT_CAL_String.c), only Matrix Technology Solutions (Flowcode's creators) can definitively fix the bug in their source code. It is highly recommended to report this error on their forum or directly to their support team, providing them with the exact output you shared.

In summary, this is a compiler bug in the Flowcode internal files (CAL) related to string functions on PIC32. Start by checking for a Flowcode update.

Would you like me to search for known issues or patches for Flowcode v11.0.0.8 related to PIC32 string functions?

medelec35
Matrix Staff
Posts: 2167
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 662 times
Been thanked: 731 times

Re: FCLsz_TEMPSTR

Post by medelec35 »

Hello thank you for the bug report.
This was fixed on Friday for both Flowcode 10 and Flowcode 11
If you are happy with it then it can pushed to the component library update system.

Browse to this location using file explorer, it's hidden by default so just paste the link into your address bar.

Code: Select all

%ProgramData%\MatrixTSL\FlowcodeV11\CAL\PIC32BIT
Place the attached C file.
If you run any library updates, then the PIC32BIT_CAL_String.c you added will be overwritten, so it will stop working again (unless the PIC32BIT_CAL_String.c update has been pushed).
Attachments
PIC32BIT_CAL_String.c
(44.9 KiB) Downloaded 6 times
Martin

SpeedPIC32
Posts: 300
Joined: Thu Dec 10, 2020 2:35 pm
Location: Germany
Has thanked: 41 times
Been thanked: 18 times

Flowcode v11 Re: FCLsz_TEMPSTR

Post by SpeedPIC32 »

Hello, this error has been fixed.

Thank you very much.

SpeedPIC32
Posts: 300
Joined: Thu Dec 10, 2020 2:35 pm
Location: Germany
Has thanked: 41 times
Been thanked: 18 times

Re: FCLsz_TEMPSTR

Post by SpeedPIC32 »

Thank you very much.
Now the next one, which I also sent to BenR.

^
C:\Users\Uwe\Documents\Matrix\OIT\Oit-Heizung_18_neu.c:6653:6: note: expected 'MX_CHAR *' but argument is of type 'volatile MX_CHAR *'

^
C:\Users\Uwe\Documents\Matrix\OIT\Oit-Heizung_18_neu.c: In function '_IntHandlerUSBInstance0':
C:\Users\Uwe\Documents\Matrix\OIT\Oit-Heizung_18_neu.c:9316:27: error: 'sysObj' undeclared (first use in this function)
C:\Users\Uwe\Documents\Matrix\OIT\Oit-Heizung_18_neu.c:9316:27: note: each undeclared identifier is reported only once for each function it appears in
C:\Users\Uwe\Documents\Matrix\OIT\Oit-Heizung_18_neu.c: In function '_IntHandlerUSBInstance0_USBDMA':
C:\Users\Uwe\Documents\Matrix\OIT\Oit-Heizung_18_neu.c:9320:34: error: 'sysObj' undeclared (first use in this function)
.

C:\Program Files (x86)\Flowcode\Compilers\pic32\bin\xc32-gcc.exe Hat den Fehlercode 0xFF gemeldet

SpeedPIC32
Posts: 300
Joined: Thu Dec 10, 2020 2:35 pm
Location: Germany
Has thanked: 41 times
Been thanked: 18 times

Re: FCLsz_TEMPSTR

Post by SpeedPIC32 »

🛑 Compilation Error Analysis (British English)

It looks like you've encountered a Compilation Failure message from Flowcode v11.0.0.8 for your PIC32 project.

The critical error preventing the compilation is:
C

C:\Users\Uwe\Documents\Matrix\OIT\Oit-Heizung_18_neu.c: In function '_IntHandlerUSBInstance0':
C:\Users\Uwe\Documents\Matrix\OIT\Oit-Heizung_18_neu.c:9316:27: error: 'sysObj' undeclared (first use in this function)
...
C:\Users\Uwe\Documents\Matrix\OIT\Oit-Heizung_18_neu.c: In function '_IntHandlerUSBInstance0_USBDMA':
C:\Users\Uwe\Documents\Matrix\OIT\Oit-Heizung_18_neu.c:9320:34: error: 'sysObj' undeclared (first use in this function)

This error strongly suggests that the variable sysObj (likely a system object structure used for initialising and managing peripherals, especially USB) is undeclared in the automatically generated C code when accessed within the USB interrupt handlers.

💡 Potential Causes and Solutions:

Missing USB Initialisation or Configuration:

Ensure that the USB component in Flowcode has been configured and initialised correctly. An incomplete or incorrect configuration in Flowcode can sometimes lead to the generated C code being incomplete, missing crucial variable declarations like sysObj.

Action: Check the properties and settings of your USB component in Flowcode. Consider deleting and re-adding the component if you are certain it is required.

Version or Compiler Conflict (Less Common):

Although you are using Flowcode v11, there might be an interaction issue between this version, the XC32 Compiler, and the specific PIC32MZ headers/libraries, which leads to this generated code fault.

Action: Make sure your Flowcode is fully updated (check for available patches or service packs).

Missing Definition in a Header File:

The sysObj structure needs to be defined in one of the header files included in the generated C file (Oit-Heizung_18_neu.c).

Action: As the code is generated by Flowcode, this is typically an internal software issue that should be resolved by addressing the configuration checks mentioned above.

⚠️ Compiler Warnings

Prior to the error, there is a series of warnings, all related to the same issue:
C

warning: passing argument X of 'FCI_...' discards 'volatile' qualifier from pointer target type
...
note: expected 'MX_STRING' but argument is of type 'volatile MX_CHAR *'

These warnings indicate that you are passing a volatile-declared string (or a pointer to one) to a function that expects a non-volatile pointer.

📝 Explanation:

The volatile keyword is used in C to tell the compiler that a variable's value can be changed at any time by external factors (like interrupts or hardware peripherals). Variables storing data from peripherals (e.g., UART receive buffers) are often declared as volatile.

The Flowcode string manipulation functions (FCI_GETLENGTH, FCI_LEFTSTRING, etc.) are expecting standard strings (MX_STRING, likely a non-volatile MX_CHAR *).

While these are only warnings and do not stop the compilation, they should be noted, as they can lead to unexpected runtime behaviour if the compiler optimises the volatile variable. It's highly probable that the affected variables (FCV_EMPFANG, FCL_VERGLEICHWERT, etc.) were marked as volatile in Flowcode because they are linked to an interrupt or a hardware component.

🛠️ Next Step:

You should focus first on resolving the sysObj error. Check your Flowcode project to see if you are using the USB component and whether its properties are set correctly.

If you are not using the USB component, try removing it from your project and recompile. If you need it, check its configuration meticulously.

Were you using the USB component in your Flowcode project, or is it a required component for your device?

medelec35
Matrix Staff
Posts: 2167
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 662 times
Been thanked: 731 times

Re: FCLsz_TEMPSTR

Post by medelec35 »

Hello.
SpeedPIC32 wrote:
Tue Oct 28, 2025 11:54 am
Hello, this error has been fixed.

Thank you very much.
You're welcome.

What would help us if you have any issues is include your .fcfx, .c and .msg.txt files.
If using Flowcode v11, also include .fcxlog.txt file.
Does not have to be the full project.
It can be a stripped down version, so long as the issues are still present.
Can you do this for this issue, please.
Martin

SpeedPIC32
Posts: 300
Joined: Thu Dec 10, 2020 2:35 pm
Location: Germany
Has thanked: 41 times
Been thanked: 18 times

Flowcode v11 Re: FCLsz_TEMPSTR

Post by SpeedPIC32 »

CDCTest .msg.txt
(1.46 KiB) Downloaded 4 times
CDCTest .c
(10.11 KiB) Downloaded 4 times
CDCTest .fcfx
(9.15 KiB) Downloaded 5 times

SpeedPIC32
Posts: 300
Joined: Thu Dec 10, 2020 2:35 pm
Location: Germany
Has thanked: 41 times
Been thanked: 18 times

Re: FCLsz_TEMPSTR

Post by SpeedPIC32 »

18F2550USB1.fcfx
(9 KiB) Downloaded 4 times
18F2550USB1.fcxlog.txt
(27.28 KiB) Downloaded 7 times
18F2550USB1.c
(12.13 KiB) Downloaded 4 times

SpeedPIC32
Posts: 300
Joined: Thu Dec 10, 2020 2:35 pm
Location: Germany
Has thanked: 41 times
Been thanked: 18 times

Re: FCLsz_TEMPSTR

Post by SpeedPIC32 »

18F2550USB1.msg.txt
(2.23 KiB) Downloaded 5 times

Post Reply