Page 1 of 2
compiling to hex
Posted: Thu Dec 05, 2024 7:42 pm
by peterhalloway
Hi All
I am desperate to get a hex file out of the attached code but it is coming out with an error. Can someone please try to compile this to hex so I can narrow down the problem.
Many thanks
Pete
Re: compiling to hex
Posted: Thu Dec 05, 2024 8:31 pm
by stefan.erni
Hi Peter
I also get an error with your program..

- 2024-12-05_21-28-35.PNG (32.62 KiB) Viewed 4250 times
Re: compiling to hex
Posted: Thu Dec 05, 2024 8:46 pm
by mnfisher
Looking at the CMF file - looks like an easy fix (or workaround) is to rename without a space in the name.
I saved it as db.fcfx and then it compiles AOK
Memory Summary:
Program space used 2FC0h ( 12224) of 8000h bytes ( 37.3%)
Data space used 169h ( 361) of 600h bytes ( 23.5%)
Configuration bits used 7h ( 7) of 7h words (100.0%)
EEPROM space used 0h ( 0) of 100h bytes ( 0.0%)
ID Location space used 0h ( 0) of 8h bytes ( 0.0%)
Data stack space used 0h ( 0) of 496h bytes ( 0.0%)
Martin
Re: compiling to hex
Posted: Thu Dec 05, 2024 9:25 pm
by peterhalloway
Thank you Martin yes that cured it for me didnt realise we could not have spaces
Re: compiling to hex
Posted: Thu Dec 05, 2024 9:50 pm
by mnfisher
- it was a surprise to me too. Something to watch as I occasionally use spaces in file names...
The CMF file was new to me too - haven't managed to find much info on it.
Martin
Re: compiling to hex
Posted: Fri Dec 06, 2024 7:32 am
by stefan.erni
Hi Martin, Hi Peter
Yes, if I remove the space in the name it's compiling nice.

- 2024-12-06_08-30-16.PNG (24.41 KiB) Viewed 4226 times
Re: compiling to hex
Posted: Fri Dec 06, 2024 9:16 am
by Steve-Matrix
Thanks to Stefan and Martin for helping resolve this.
peterhalloway wrote: ↑Thu Dec 05, 2024 9:25 pm
didnt realise we could not have spaces
Flowcode itself should be ok without spaces, but some toolchains might have issues. Especially if 8.3 filename generation is turned off within Windows and an equivalent "8.3" filename is not available. I will look into this issue to see if there is anything else we can do to work around this.
We also see with some toolchains that the paths for included files can become very long and so keeping filenames short and installing toolchains close to the root folder of the drive help to avoid these issues.
Re: compiling to hex
Posted: Fri Dec 06, 2024 10:13 am
by Steve-Matrix
I've looked further into this and not been able to resolve it. It seems to be an issue within the XC8 toolchain and so we can't fix it. I have found another post about this on our old forums from 2016, and so it's been encountered before:
https://www.flowcode.co.uk/mmforums/vie ... hp?t=17965
Re: compiling to hex
Posted: Fri Dec 06, 2024 10:31 am
by mnfisher
It's not really fixing it - but a warning dialog if the user tries to create a filename with a space in it might help.
It could also strip spaces - but again, might cause more issues than it solves (does it do this for esp32?)
Or replace spaces with underscores?
Martin
Re: compiling to hex
Posted: Fri Dec 06, 2024 10:46 am
by Steve-Matrix
That's an idea, Martin. But I've just done some experimenting and it seems to affect only the 18F452. So it's going to be rare.