Other Parts Discussed in Thread: CC2650, SYSBIOS, CC2640, BLE-STACK
Hi
I have a question about Stack Flash allocation.
We have like many other problem with the lack of flash space in chip. I have started to see how we could optimize the code to require less space.
Looking at the Stack on the map-file i notice some things that raises questions.
Here are my map-file from a stack build. It is sorted on address-field. Lets take a closer look at the end of flash. Around 0x0001F000
| gapServiceUUID | 0x0001ce60 | 0x2 | Data | Gb | gatt_uuid.o | [4] |
| gattServiceUUID | 0x0001ce64 | 0x2 | Data | Gb | gatt_uuid.o | [4] |
| primaryServiceUUID | 0x0001ce68 | 0x2 | Data | Gb | gatt_uuid.o | [4] |
| secondaryServiceUUID | 0x0001ce6c | 0x2 | Data | Gb | gatt_uuid.o | [4] |
| characterUUID | 0x0001ce70 | 0x2 | Data | Gb | gatt_uuid.o | [4] |
| clientCharCfgUUID | 0x0001ce74 | 0x2 | Data | Gb | gatt_uuid.o | [4] |
| deviceNameUUID | 0x0001ce78 | 0x2 | Data | Gb | gatt_uuid.o | [4] |
| appearanceUUID | 0x0001ce7c | 0x2 | Data | Gb | gatt_uuid.o | [4] |
| periConnParamUUID | 0x0001ce80 | 0x2 | Data | Gb | gatt_uuid.o | [4] |
| .iar.init_table$$Base | 0x0001ce84 | -- | Gb | - | Linker | created |
| Region$$Table$$Base | 0x0001ce84 | -- | Gb | - | Linker | created |
| .iar.init_table$$Limit | 0x0001cea4 | -- | Gb | - | Linker | created |
| Region$$Table$$Limit | 0x0001cea4 | -- | Gb | - | Linker | created |
| gattService | 0x0001cea4 | 0x8 | Data | Lc | gattservapp.o | [4] |
| gapService | 0x0001ceac | 0x8 | Data | Lc | gapgattserver.o | [4] |
| halAssertHandler | 0x0001ceb5 | 0x2 | Code | Gb | hal_assert.o | [1] |
| NV_FLASH | 0x0001e000 | 0x1000 | Data | Gb | osal_snv_wrapper.o | [1] |
| A1_rw_1{Abs} | 0x10005000 | 0x4 | -- | Gb | ble_rom_PATCH.symbols | [2] |
| __checksum_begin{Abs} | 0x10005000 | -- | Gb | ble_rom_PATCH.symbols | [2] | |
Lets look at last pages in flash:
0x0001F000 Last page is allocated for CCFG table
0x0001E000 according to map this page is allocated to NV_FLASH. I guess bondmgr will place the bonded devices here? Is it possible to save this list in another flash and use this page for application code? if so, How?
0x0001D000 This page doesn't seems to be used at all? This is the BIG question. Why? Is there a bug in TI build script that allocates a page for nothing? It feels like stack could be moved up one page to use this unused page and make more space for app?