Page 1 of 1

Compile Error

Posted: Sun Mar 30, 2025 6:18 pm
by simon-sandtcontrols
Hi All,

I wonder if someone can help please. I am not exactly new to Flow code, but this one has me baffled. I must be doing something stupid, but I can't work out what.

I went to compile a new program I have written and it came back with an error, so I went through and started cutting out anything and everything. I then opened a new program and went back to the old favourite PIC16F1937, wondering if it was the chip PIC16F15376 I had used. I created a project used a loop to turn and LED on and off with a button and still get the same error. (Code attached).

I get this error.

C:\ProgramData\MatrixTSL\FlowcodeV10\CAL\PIC\PIC_CAL_String.c:1267:: error: (1250) could not find space (256 bytes) for variable _tempSub
(908) exit status = 1
Error returned from [xc8.exe]
C:\ProgramData\MatrixTSL\FlowcodeV10\FCD\PIC\batch\pic_xc8_comp.bat reported error code 0x1

I first thought Antivirus again, but I am using Windows defender and I have compiled on this machine loads of times, nothing has changed, as far as I know, I then tried compiling another program I am part way through and I have compiled a number of times, and that still compiles fine. I can not seem to get any new project to compile, only ones compiled previously.

I have tried Googling the error, but that was no help either, it indicates use a PIC with a larger program memory!!

I must be missing the obvious, any help would be greatly appreciated.

Many Thanks in advance.

Simon.

Re: Compile Error

Posted: Sun Mar 30, 2025 6:28 pm
by mnfisher
The error message implies a variable too large for available memory. (_tempSub 256 bytes in PIC_CAL_String.c)

I could compile your demo program (it doesn't use strings!) - but it looks to be an issue with the latest CAL file?

Martin

Re: Compile Error

Posted: Sun Mar 30, 2025 7:27 pm
by simon-sandtcontrols
Martin you are a genius. Thanks very much. I have just copied the PIC_CAL_String.c file from my old laptop dated 22 August 24 and replaced the file that was dated 29 March 25 (it asked to update last night) and it all works. I can compile the project I was originally trying to.

Strange as none of the projects that I couldn't compile included strings either, but I guess that file must be called regardless??

I guess Ben and team, you have a bug and it wasn't me being daft after all!

Thanks again.

Simon

Re: Compile Error

Posted: Mon Mar 31, 2025 10:00 am
by Steve-Matrix
Thanks. I have moved this to the "bug reports" page and we will investigate and hopefully fix this soon.

Re: Compile Error

Posted: Mon Mar 31, 2025 10:31 am
by simon-sandtcontrols
Thanks Steve,

Apologies I realised it was on the wrong page when we worked out what was going on, when I posted I thought I was doing something daft. I wasn't sure I could move it.

Simon.

Re: Compile Error

Posted: Mon Mar 31, 2025 11:02 am
by medelec35
Hi Simon.
Sorry, I had fixed a couple of functions in the CAL which broke other functions.

Would you mind tying with attached version?

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\FlowcodeV10\CAL\PIC
Place the attached C file.
If you run any library updates, then the PIC_CAL_String.c you added will be overwritten, so it will stop working again (unless the PIC_CAL_String.c update has been pushed).

Re: Compile Error

Posted: Mon Mar 31, 2025 11:37 am
by simon-sandtcontrols
Hi Martin,

No worries, it had me going yesterday, I must confess, I tried everything I could think of as a another project that I was part way through and had already been compiled worked fine, it was just anything new, that hadn't been compiled previously that didn't work.

I have just tried the new file, both on a project that has been compiled previously and on the test one I wrote yesterday that wouldn't compile, so was fresh and both work fine.

I have been avoiding it's request to update this morning as I guessed the consequences!!

Thanks for sorting it.

Simon.