Just modify the RAM size in the ld file. The RAM size of the current ld file is specified for the Primer1, but you can extend it up to 48KB for the Primer2.
Hi Francis, Is 48k some kind of restriction? I've extended RAM to 64k and I'm able to declare table with size ca. 60k - I didn't check if this works but at least it's compilable.
The RAM used by CircleOS is 8KB, but it will be 10KB with version 3.7 (that handles audio data in DMA in a 2KB buffer). The limitation should be 64-10 = 54KB, but you have also to take into account the stack (common for both CicleOS and the applications). Consider at least 1KB for the stack... Conclusion: 60KB is too much.
I'm sorry but there are lot of ld file. which ld file I need to modify (and wihich field). I checked in my project properties, in "Advanced ARM Options" Data size is well at 0x10000.
As per this and other posts I modified the Circle_App.ld line: "FLASH (rx) : ORIGIN = 0x8006000, LENGTH = 8K" REPLACED WITH "FLASH (rx) : ORIGIN = 0x8006000, LENGTH = 128K-0x6000" That worked for a couple of small apps.
I've merged the two apps and the first error was: "undefined symbol' !!!!!!!!! FLASH IS FULL !!!!!!!' referenced in expression."
After trying the suggestions from kubsztal, above, I still get the build errors: "region FLASHB1 overflowed by 4 bytes".
Apologies for being slow in replying - I've been away.
I'm not sure what I did when I first wrote; I possibly corrupted the .ld file and/or IDE settings.
So I started a new project, cut and paste my old code, bit by bit until I got the FLASH IS FULL warning, then edited the .ld file with your suggestion and it worked fine. Many thanks! And to kubsztal too.
ShadowPhoenix, This wasn't my problem, not yet anyway, (it wasn't even compiling). Personally, I like the idea of tinkering with the ld file manually. Especially as a novice programmer - I think I learn more that way. Though I do see the advantage to scripting, once the underlying concepts are understood.
Could you expand a bit on the idea of checking out the memory map please? I couldn't spot any significant difference between the memory maps of my old project (un-linkable) and the new one which builds fine with Pierre's suggested mod to the .ld file.