Compile Error

Any bugs you encounter with Flowcode should be discussed here.
Post Reply
simon-sandtcontrols
Posts: 43
http://meble-kuchenne.info.pl
Joined: Sun Mar 21, 2021 3:56 pm
Has thanked: 5 times
Been thanked: 7 times

Compile Error

Post 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.
Attachments
CNC Wire Cutter V1_0Test.fcfx
(11.68 KiB) Downloaded 28 times

mnfisher
Valued Contributor
Posts: 1512
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 138 times
Been thanked: 725 times

Re: Compile Error

Post 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

simon-sandtcontrols
Posts: 43
Joined: Sun Mar 21, 2021 3:56 pm
Has thanked: 5 times
Been thanked: 7 times

Re: Compile Error

Post 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

Steve-Matrix
Matrix Staff
Posts: 1476
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 207 times
Been thanked: 349 times

Re: Compile Error

Post by Steve-Matrix »

Thanks. I have moved this to the "bug reports" page and we will investigate and hopefully fix this soon.

simon-sandtcontrols
Posts: 43
Joined: Sun Mar 21, 2021 3:56 pm
Has thanked: 5 times
Been thanked: 7 times

Re: Compile Error

Post 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.

medelec35
Matrix Staff
Posts: 1954
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 626 times
Been thanked: 656 times

Re: Compile Error

Post 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).
Attachments
PIC_CAL_String.c
(45.04 KiB) Downloaded 36 times
Martin

simon-sandtcontrols
Posts: 43
Joined: Sun Mar 21, 2021 3:56 pm
Has thanked: 5 times
Been thanked: 7 times

Re: Compile Error

Post 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.

Post Reply