Max size of constant array?

Coding and general discussion relating to the compiler

Moderators: David Barker, Jerry Messina

Post Reply
2brain
Posts: 18
Joined: Fri Jan 22, 2010 1:04 pm
Location: Hong Kong

Max size of constant array?

Post by 2brain » Fri Jul 08, 2011 3:03 am

I have always understood that the maximum size of a const array was 64k. I'm working with a file which produces a 38400 byte const. I'm using an 18LF46K22 (64K Flash) but I don't see what difference that should make.
My problem is;
If I use the full size of the constant the compiler attempts to compile but fails half way through the 1st pop up progress bar without any error and just changes from "compiling please wait" back to "ready". If I shorten the array to 32869 bytes I can compile and the program runs normally but obviously the full output is not right.
Interestingly if I enlarge the array by a couple of hundred bytes the compiler runs all the way through the 1st pop up progress bar but never gets to the second one, just drops back to ready.

Has the maximum size been changed?
Was it never 64K?
Was it a theoretical limit or has anyone ever got close to it?
Any ideas?

User avatar
David Barker
Swordfish Developer
Posts: 1214
Joined: Tue Oct 03, 2006 7:01 pm
Location: Saltburn by the Sea, UK
Contact:

Post by David Barker » Fri Jul 08, 2011 6:27 am

You will need to email me a copy of the file so I can look into the problem for you...

User avatar
David Barker
Swordfish Developer
Posts: 1214
Joined: Tue Oct 03, 2006 7:01 pm
Location: Saltburn by the Sea, UK
Contact:

Post by David Barker » Fri Jul 08, 2011 4:09 pm

That's fixed now and will be available in the next update...

Post Reply