Hello, I'm here to ask for help in trying to solve a problem I'm having in a project with a dspic33EV256GM006. I recently added a calculation icon to add several variables (strings) into one, and then send it via UART to another system. After a few attempts (Link Error: PC Relative branch to '___delay32' is out of range. Suggest large-code model.
) I realized I couldn't do something like: "string1 = string1 + string2" several times within the calculation. The intention was to sum the variables until finally sending them via UART. Then I tried sending them one by one through the component macro and it continued to give the same error. Of course, before doing that I deleted the calculation icon I had built earlier. If anyone here can help me, I would appreciate it.
Help with string error
-
aderito
- Posts: 37
- http://meble-kuchenne.info.pl
- Joined: Sun Jan 29, 2023 12:49 pm
- Location: portugal
- Has thanked: 19 times
- Been thanked: 2 times
-
BenR
- Matrix Staff
- Posts: 2179
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 595 times
- Been thanked: 783 times
Re: Help with string error
Hello,
I've tried to put togeter a simple test with your macro and the chip you specified, but it's compiling ok here.
You might need to attach your project so we can replicate exactly what you have.
I've tried to put togeter a simple test with your macro and the chip you specified, but it's compiling ok here.
You might need to attach your project so we can replicate exactly what you have.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
-
aderito
- Posts: 37
- Joined: Sun Jan 29, 2023 12:49 pm
- Location: portugal
- Has thanked: 19 times
- Been thanked: 2 times
Re: Help with string error
Thank you for your reply. The project is a bit extensive, but I'll post it here anyway.
- Attachments
-
- local V8HMI DS18B20.fcfx
- (1.51 MiB) Downloaded 11 times
-
Steve-Matrix
- Matrix Staff
- Posts: 1857
- Joined: Sat Dec 05, 2020 10:32 am
- Has thanked: 269 times
- Been thanked: 440 times
Re: Help with string error
It looks like your project is very large and the compiler fails to compile the code because the call for a delay icon and the actual code for that delay call are too far away from each other.
You could try to reduce the size of your project by removing unnecessary macros and combining duplicate code where possible.
Alternatively, you could try using the "-mlarge-code" command line switch on the compiler. This is done in the "pic16_C30_compLarge.bat" file and instructions for this are in our old forum here:
https://flowcode.co.uk/mmforums/viewtopic.php?t=21926
You could try to reduce the size of your project by removing unnecessary macros and combining duplicate code where possible.
Alternatively, you could try using the "-mlarge-code" command line switch on the compiler. This is done in the "pic16_C30_compLarge.bat" file and instructions for this are in our old forum here:
https://flowcode.co.uk/mmforums/viewtopic.php?t=21926
-
aderito
- Posts: 37
- Joined: Sun Jan 29, 2023 12:49 pm
- Location: portugal
- Has thanked: 19 times
- Been thanked: 2 times
Re: Help with string error
I'm having trouble configuring the compiler. Is there something I'm doing wrong?Steve-Matrix wrote: ↑Mon Apr 20, 2026 2:57 pmIt looks like your project is very large and the compiler fails to compile the code because the call for a delay icon and the actual code for that delay call are too far away from each other.
You could try to reduce the size of your project by removing unnecessary macros and combining duplicate code where possible.
Alternatively, you could try using the "-mlarge-code" command line switch on the compiler. This is done in the "pic16_C30_compLarge.bat" file and instructions for this are in our old forum here:
https://flowcode.co.uk/mmforums/viewtopic.php?t=21926
- Attachments
-
- mensagem compilador.png (182.92 KiB) Viewed 96 times
-
- linker.png (236.52 KiB) Viewed 96 times
-
- compilador.png (250.5 KiB) Viewed 96 times
-
Steve-Matrix
- Matrix Staff
- Posts: 1857
- Joined: Sat Dec 05, 2020 10:32 am
- Has thanked: 269 times
- Been thanked: 440 times
Re: Help with string error
It's difficult to see with the images - posting the msg.txt output as text or attaching the file may have been better - but it looks like you are not pointing Flowcode to the correct location of the batch files. Also, the parameters look wrong too.
I think this is because the information on our old forum is for Flowcode v7 and locations have changed for more recent Flowcode versions.
For v11, the Compiler batch file should be in the same folder as the normal default, so the "Location" field should be:
And the "Parameters" field should be the same as the normal default, ie:
Similarly, the Linker location and parameters should be:
I think this is because the information on our old forum is for Flowcode v7 and locations have changed for more recent Flowcode versions.
For v11, the Compiler batch file should be in the same folder as the normal default, so the "Location" field should be:
Code: Select all
$(fcddir)PIC16\batchfiles\pic16_C30_compLarge.batCode: Select all
"$(compilerpic16)" "$(target)" "$(outdir)" "$(chip:u)"Code: Select all
$(fcddir)PIC16\batchfiles\pic16_C30_linkLarge.bat
"$(compilerpic16)" "$(outdir)$(target)" $(chip:u) $(family)-
aderito
- Posts: 37
- Joined: Sun Jan 29, 2023 12:49 pm
- Location: portugal
- Has thanked: 19 times
- Been thanked: 2 times
Re: Help with string error
Thank you very much Steve, it's all good now. That was the problem after all, I was using the guidance for an older version and the one I'm using is Flowcode v10.Steve-Matrix wrote: ↑Wed Apr 22, 2026 10:44 amIt's difficult to see with the images - posting the msg.txt output as text or attaching the file may have been better - but it looks like you are not pointing Flowcode to the correct location of the batch files. Also, the parameters look wrong too.
I think this is because the information on our old forum is for Flowcode v7 and locations have changed for more recent Flowcode versions.
For v11, the Compiler batch file should be in the same folder as the normal default, so the "Location" field should be:And the "Parameters" field should be the same as the normal default, ie:Code: Select all
$(fcddir)PIC16\batchfiles\pic16_C30_compLarge.batSimilarly, the Linker location and parameters should be:Code: Select all
"$(compilerpic16)" "$(target)" "$(outdir)" "$(chip:u)"Code: Select all
$(fcddir)PIC16\batchfiles\pic16_C30_linkLarge.bat "$(compilerpic16)" "$(outdir)$(target)" $(chip:u) $(family)
-
Steve-Matrix
- Matrix Staff
- Posts: 1857
- Joined: Sat Dec 05, 2020 10:32 am
- Has thanked: 269 times
- Been thanked: 440 times