Other Parts Discussed in Thread: SYSBIOS
Hello,
can anybody tell me how to do a workaround of zero init for COFF?
I am using DSP/BIOS 5.42 with CGT 7.4.8, and I cant use EABI because of no SYSBIOS support for DM6435.
I tried things like filling the .bss SECTION with 0, but this leads to some runtime errors. I also tried to write a function to set the .bss SECTION to 0 with memset, before auto_init gets called (Thread). Leads also to runtime errors.
There is one solution missing, I was seeing in SPRU187U, Chapter 7.8.3 "Initialization Tables".
Quote:
"The tables in the .cinit section consist of variable-size initialization records. Each variable that must be
autoinitialized has a record in the .cinit section. Figure 7-16 shows the format of the .cinit section and the
initialization records.
The fields of an initialization record contain the following information:
• The first field of an initialization record contains the size (in bytes) of the initialization data.
• The second field contains the starting address of the area within the .bss section where the
initialization data must be copied.
• The third field contains the data that is copied into the .bss section to initialize the variable.
Each variable that must be autoinitialized has an initialization record in the .cinit section.
Example 7-13 shows initialized global variables defined in C. Example 7-14 shows the corresponding
initialization table. The section .cinit:c is a subsection in the .cinit section that contains all scalar data. The
subsection is handled as one record during initialization, which minimizes the overall size of the .cinit
section."
Is it possible somehow to get the records of .cinit to set the .bss init data to 0? If yes, how? Or is there any other workaround to set global variables to 0?