Other Parts Discussed in Thread: BLE-STACK
Tool/software: TI C/C++ Compiler
Hi all,
For my project I need more RAM than I have got available by now. I tried to reduce the amount of needed RAM but in the end its already at its limits. I tried to compile the project with the needed memory spaces for several vars, the result is I need about 6 kByte more RAM. As I know the CC1310 has got 8kByte additional Cache that can be used alternatively as GPRAM. I rearranged at least some of the needed space from SRAM to GPRAM. Furthermore I modified the the Linker File to set the moved vars to GPRAM area. The compiler says that memory fits as well as that the gpram memory area is used as expected.
In details this is what I did:
1.) Manually set vars to another section by __attribute__ ((section(".gpram.rxbuf_data"))) static uint8_t rxbuf_data[BUFSIZE];
2.) Added a wildcard subsection inside gpram section with
.gpram (NOLOAD): { _gpram = .; *(.gpram*) _egpram = .; } > GPRAM
I am using NOLOAD making sure that the generated Hex File has no initialization values for GPRAM area
3.) Manually let initialize the gpram area in startup_gcc function ResetISR(void) like it is done with SRAM, too.
//
// Zero fill the gpram segment if configured as such
//
#if SET_CCFG_SIZE_AND_DIS_FLAGS_DIS_GPRAM == 0x1
__asm(" ldr r0, =_gpram\n"
" ldr r1, =_egpram\n"
" mov r2, #0\n"
" .thumb_func\n"
"zero_loop:\n"
" cmp r0, r1\n"
" it lt\n"
" strlt r2, [r0], #4\n"
" blt zero_loop");
#endif
4.) Defined the flag of additional memory used as GPRAM instead of CACHE in the main project header
//#####################################
// Select between cache or GPRAM
//#####################################
#define SET_TO_GPRAM 0x0
#define SET_TO_CACHE 0x1
#undef SET_CCFG_SIZE_AND_DIS_FLAGS_DIS_GPRAM
#define SET_CCFG_SIZE_AND_DIS_FLAGS_DIS_GPRAM SET_TO_CACHE
Once I programmed the device with the generated HEX file, I can see that the device wants to start (serial output during startup) but doesn't work almost immediately.
What am I doing wrong? What is missing, what is the problem.
Kind regards
Markus