Tool/software: TI C/C++ Compiler
Hi,
I use CC3220S with 256KB of RAM memory and have some issue with memory placement.
IAR ELF Linker V7.80.1.28/LNX for ARM Copyright 2007-2016 IAR Systems AB. Config file (cfg.json) doesn't exist, using defaults Error[Lp011]: section placement failed unable to place Block P3-P4-1 (min size 0x795, align 0x8) in: <[0x2003e6d4-0x2003f7ef]>
Calculated free space in range <[0x2003e6d4-0x2003f7ef]> is equal to 0x111B, which definitely bigger than Block P3-P4-1 min size 0x795. So even despite the fact that overall memory utilization is around 99% (259963 of 262144) but it still enough free space to allocate additional block P3-P4-1.
I didn't managed to find any particular info in TI and IAR documents, so I would be very grateful if anyone can help with clarifying details or pointing me to the resource about following questions:
1) What is the purpose of dividing memory into P3, P4 regions in map file?
*** PLACEMENT SUMMARY *** "A0": place at end of [0x20004000-0x2003ffef] { block CSTACK }; "P3": place in [from 0x20004000 to 0x2003ffef] { ro }; "P4": place in [from 0x20004000 to 0x2003ffef] { rw, block HEAP };
And why actual regions are called different P3-P4 and P3-P4-1?
2) What could be a root cause of issue with placing P3-P4-1 even if memory seems to be enough?
"P3-P4", part 1 of 3: 0x2bf40 .text ro code 0x20004040 0x2ef4 ds_network.o [2] ........ .rodata const 0x2002e6b0 0x4cc d_network.o [14] Initializer bytes const 0x2002eb7c 0x39f <for P3-P4-1> (used: 0x38b) ........ .text ro code 0x2002fea8 0x28 data_init.o [50] .iar.init_table const 0x2002fed0 0x38 - Linker created - .text ro code 0x2002ff08 0x1a cmain.o [50] .text ro code 0x2002ff22 0x4 exit.o [4] .text ro code 0x2002ff28 0xa cexit.o [50] .text ro code 0x2002ff34 0xc XXexit.o [50] Initializer bytes const 0x2002ff40 0xd <for P1-1> .text ro code 0x2002ff4e 0xc cstartup_M.o [50] ........ .rodata const 0x2002ff80 0x0 rle_init_single.o [50] - 0x2002ff80 0x2bf40 "P3-P4", part 2 of 3: 0xe85c .bss zero 0x2002ff80 0x6d78 heap_4.o [11] ........ .bss zero 0x2003e7d9 0x1 interrupt_event.o [7] - 0x2003e7da 0xe85a "A0": 0x800 CSTACK 0x2003f7f0 0x800 <Block> .stack uninit 0x2003f7f0 0x800 startup_cc32xx_iar.o [52] - 0x2003fff0 0x800 "P3-P4", part 3 of 3 (*** FAILED ***): 0x795 P3-P4-1 0x795 <Init block> .data inited 0x78 diagnostic.o [17] ........ .data inited 0x1 d_als.o [12] 0x795
B.R. Alex.