Hi Guys,
we are building for A8 and A15 using GNU compiler GCC. We need a linker option that avoids to init zero for non-initialized data section. Do you know of an option?
Any document you can refer to?
Thanks,
Thorsten
For TI compiler this below seems to work. However, how can we accomblish this for GNU GCC?
The __no_init is useful just for what the documentation suggests, to not initialize said value. For example, when you declare huge, global or file-scope arrays there is a lot of code that gets generated (the c_startup routine) that populates those locations with the user or compiler (=0) defined values. If this variable initialization takes too long, the watchdog has the potential to trigger before you can even get to main and execute the WDTHOLD, causing a constant reset condition and usually a frustrated customer. In these scenarios you can either use the __low_level_init() functions to execute the WDTHOLD prior to the c_startup routine or just declare the variables __no_init( ). You then have to come in an intialize them prior to use, else face the run-time consequences.
If you want to place a variable in a specific location of memory, you can use the "#pragma location=" or "@" directives which are also documented in the C/C++ Compiler user guide.