designer 5.1 compile fails, 4.4 compile did work previously

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

So I am trying to figure out whether I have just a code size issue or a memory allocation issue or a linker issue.  I had a project in 4.4 with csd and ezi2c.  I loaded into 5.1. It told me it was going to update boot.ldr and update csd from version 1.0 to 1.5.  after it was done I regenerated and compiled and got the following errors

   

Linking..
LMM info: area 'InterruptRAM' uses 65 bytes in SRAM bank 0
LMM info: area 'ram2' item of 83 bytes allocated in SRAM page 0
LMM info: area 'ram1' item of 80 bytes allocated in SRAM page 0
LMM info: area 'data' item of 26 bytes allocated in SRAM page 0
LMM info: area 'data' item of 2 bytes allocated in SRAM page 0
LMM info: area 'data' item of 1 bytes allocated in SRAM page 1
!E <library>(2569): {linker} Cannot allocate space for 12 bytes for 'bss' area
!E <library>(2569): {linker} Cannot allocate space for 40 bytes for 'bss' area
!E <library>(2569): {linker} Cannot allocate space for paged area 'virtual_registers'
!E <library>(2569): {linker} Cannot allocate space for 1 bytes for 'data' area
!E <library>(2569): {linker} Cannot allocate space for 1 bytes for 'data' area
!E <library>(2569): {linker} Cannot allocate space for 2 bytes for 'data' area
!E <library>(2569): {linker} Cannot allocate space for 2 bytes for 'data' area
!E <library>(2569): {linker} Cannot allocate space for 2 bytes for 'data' area
!E <library>(2569): {linker} Cannot allocate space for 1 bytes for 'data' area
!E <library>(2569): {linker} Cannot allocate space for 1 bytes for 'data' area
!E <library>(2569): {linker} Cannot allocate space for 1 bytes for 'data' area
!E <library>(2569): {linker} Cannot allocate space for 2 bytes for 'data' area
!E <library>(2569): {linker} Cannot allocate space for 2 bytes for 'data' area
!E <library>(2569): {linker} Cannot allocate space for 2 bytes for 'data' area

   

So is the new csd module bigger and so now it won't fit into my part or do I need to configure the imagecraft compiler or linker some how to make this fit? 

   

Any insight into this would be greatly appreciated.

   

Ray

0 Likes
1 Reply
pushekm_21
Employee
Employee
10 likes received 5 likes given First like received

It seems you don't have sufficient space available in RAM for all the variables. A few solutions for this problem:

   

1. Reduce the usage of global variables and use local variables. Global variables occupy space in RAM and local variables in Stack.

   

2. Optimize your code. 
 

   

3. If you are using a 2 page device then increase the stack page offset from Project -> Settings -> Compiler. There is nothing like the perfect setting here. It depends on the number of function call, local variables and ISRs being used. By reducing the stack page offset you are reducing the space for stack but freeing up the space for general purpose ram.

   

If you have any problems then please provide me your project.

   

 

   

Best regards,

   

Pushek

0 Likes