Part Number: TMS320F28377D
I extended the .ebss section.
| .cmd-file before | afterwards |
/* Allocate uninitalized data sections: */ .stack : > RAMM1 PAGE = 1 .ebss : >> RAMLS2_5 | RAMD0 PAGE = 1 .bss : >RAMGS15 PAGE = 1 .esysmem : > RAMD1 PAGE = 1 .cio : > RAMD0 PAGE = 1 |
/* Allocate uninitalized data sections: */ .stack : > RAMM1 PAGE = 1 .ebss : >> RAMLS2_5 | RAMD0 | RAMGS15 PAGE = 1 .bss : >RAMGS15 PAGE = 1 .esysmem : > RAMD1 PAGE = 1 .cio : > RAMD0 PAGE = 1 |
Additionally I allocated a large object in RAM.
As a side effect the function-pointer _lock is allocated in RAMGS15:
| .map-file before | afterwards |
0000b76a 00000002 rts2800_fpu32.lib : _lock.obj (.ebss:__lock) 0000b76c 00000002 : _lock.obj (.ebss:__unlock) |
0001b8a8 00000002 rts2800_fpu32.lib : _lock.obj (.ebss:__lock) 0001b8aa 00000002 : _lock.obj (.ebss:__unlock) |
With the changes I observe that _lock is not initialized with an address -- instead means it remains zero.
I analyzed the cinit procedure:
The cinit-entry for _lock exists and is executed, but the init-value is not written to the destination (_lock).
More background information about the problem
At the begin of a debug-session the programm does not halt at main.
I found out that the PC jumps to 0.
Because in minit() the function-ptr is called _lock but it is zero.