Other Parts Discussed in Thread: SYSBIOS, CC2650
Hello,
I am running out of program Flash, so I'm looking into where it's being used, and I found out there's something weird going on with the linker.
Some information about my setup:
- I'm using a Bootloader that uses one Flash page (4096 bytes), from address 0 to 0xFFF.
- I removed some options from the BLE Stack (namely, the GAP Bond Manager), which reduced its Flash usage. After compiling, the Boundary tool (which executes successfully) ends up allocating 14 pages for the Stack (57344 bytes, or 56kB), and places the Stack at address 0x11000 (69632)
My questions:
- Since the BLE Stack starts at address 0x11000, and the Application starts at address 0x1000 (after the bootloader), I would expect the application to have 0x10000 bytes (64kB, or 65536). However, CCS only reports 61439 bytes (60kB) are available (under the Memory Allocation view), so I'm missing a whole page between the Application and the BLE Stack.
- Again, CCS reports only 56kB are available for the BLE Stack (under the Memory Allocation view). These 56kB, plus the 64kB allocated for the Application and the 4kB allocated for the Bootloader only add up to 124kB, so I'm missing another whole page of Flash at the end. I believe this might be related fo a "reserved page" the Boundary tool reports (which I don't know what it might be used for, there's something about the NV module, but I don't think any part of the program uses it).
Here is the output of the Boundary tool (with some parts hihghlighted by me):
///////////////////////////////////////////////////////////////////////
Processing Command Line Arguments -> Successful
///////////////////////////////////////////////////////////////////////
Processing Ccs
///////////////////////////////////////////////////////////////////////
Processing Linker Map File
[ Map File Data ]
Read Only Data Size = not_used
Read Only Code Size = 0x0000D25E (53854)
Read Write Data Size = 0x000003FC (1020)
Ram End Address = 0x200048E7 (536889575)
[ Stack Size Calculation ]
Stack Size = 0x0000D25E (53854)
Processing Linker Map File -> Successful
///////////////////////////////////////////////////////////////////////
Processing Lcf File
[ Lcf File Data ]
Chip Name = not_used
Nv Pages = not_used
Flash Size = 0x00020000 (131072)
Ram Size = 0x00005000 (20480)
Page Size = 0x00001000 (4096)
Reserved Pages = 0x00000001 (1)
[ Flash Boundary Calculation ]
Bytes Used In Last Page Of Image = 0x0000025E (606)
Bytes Unused In Last Page Of Image = 0x00000DA2 (3490)
Used Stack Pages = 0x0000000E (14)
NV Pages = 0x00000000 (0)
Reserved Pages = 0x00000001 (1)
Total Used Pages = 0x0000000F (15)
Flash Boundary Address = 0x00011000 (69632)
[ Ram Boundary Calculation ]
Margin Bytes = 0x002A (42)
Unadjusted Ram Start Address = 0x200044C1 (536888513)
Alignment Value = 0x04 (4)
Final Alignment Value = 0x01 (1)
Total Ram Size = 0x00000427 (1063)
Ram Boundary Address = 0x200044C0 (536888512)
[ Nv Boundary Calculation ]
Reserved Size = 0x00001000 (4096)
Reserved End = 0x0001FFFF (131071)
Reserved Start = 0x0001F000 (126976)
Nv Size = 0x00000000 (0)
Processing Lcf File -> Successful
///////////////////////////////////////////////////////////////////////
Processing Project Config Files
[ Compiler Config Settings ]
Compiler Flash Config Page = 0x00011000 (69632)
Compiler Flash Config Boundary Page Matches Expected Boundary
[ Linker Config Settings ]
Linker Flash Config Page = 0x00011000 (69632)
Linker Flash Config Boundary Page Matches Expected Boundary
Linker Ram Config Page = 0x200044C0 (536888512)
Linker Ram Config Boundary Page Matches Expected Boundary
Processing Project Config Files -> Successful
///////////////////////////////////////////////////////////////////////
Boundary Operation Complete
///////////////////////////////////////////////////////////////////////
It would be great if I could use these two pages that don't seem to be used. Thanks!