This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi all,
I want to fill my. bss section with zero, I know one way by adding fill=0 syntax in cmd file but that is increasing size of hex file and that's not preferable for me.
I have heard another way that it can be done by making changes in boot. Asm file.
Can anyone guide me on this?
Thanks in advance
Dixit
Hi Dixit,
Please refer below thread for answer,
c55x: How to zero initialize .bss - Code Composer Studio forum - Code Composer Studio™︎ - TI E2E support...
Thank you.
Okay, C55x does not have those hooks in the default _c_int00 routine in the RTS. Copy boot.asm (found in lib/rtssrc.zip) into your project and modify it as follows:
.ref _zero_bss
call _zero_bss
call _auto_init
call __args_main
And add this function somewhere in your C code:
#include <string.h>
extern unsigned char *__bss__, *__end__; void zero_bss(void) { memset(__bss__, 0, __end__ - __bss__); }