Hello!
I'm on a Windows 7 64-bit PC, developing code for an AM3358 on the AM335x Starter Kit, using CCS Version: 6.1.2.00015, and have recently installed Processor SDK RTOS AM335x v2.00.02.11, and SYS/BIOS 6.45.01.29 (installs with the PDK), and am using XDCtools 3.32.00.06.
If I am understanding correctly something I read about TI-RTOS a couple of weeks ago (and which I can't find now), global and static variables in an application are NOT initialized to contain all zero (0) bits as is is done by most default CRT0 start-up sequences I have worked with. Part of the advice I read with this was to initialize all global and variables to the value you want them to contain when your application hits main.
Unfortunately, I have a few libraries I will likely be using that were originally written in an environment where minimizing program size was important (initialization values for the .data [initialized variables] section were stored as part of program space and copied into RAM by CRT0 code), and so they were written by ASSUMING (by design) that the CRT0 start-up code is being used was the one that zero'd the .bss section (that environment offered a choice of start-up code libraries to use), and therefore all variables that were not assigned an initial value were guaranteed to contain all zero (0) bits when the application entered its main() function.
Question #1:
Thinking about this for a bit, since __bss_start__ and __bss_end__ symbols are being created in the generated linker command file, wouldn't it be possible to achieve this initialization by writing a quick loop using those symbols to initialize pointers, and writing 0's across the section myself?
Question #2:
Would I need to do this in a "firstFxns" function in order to preserve any other variables SYS/BIOS might have initialized?
Kind regards,
Vic