I've been having a strange problem with the linker. I don't know if its a
it's just me. I been checking this for days and couldn't find the problem.
I've created a empty project, with enough code to initialize the dsp. I get the
a) when I have no objects in the (.bss) section, the linker fills the X-RAM
memory with lots of 0x00
b) if I include an object (an it's not deadstripped) in the (.bss) section,
the linker works fine.
I included the sample project with this message. If you can't open the
attachment, you can download it from:
I'm using Codewarrior 5.1.1 (updated version). To try the problem:
1) open "dsp_main.c" and uncomment "my_variable += 3;" --> this way it
will not be deadstripped
2) compile and check the output directory, file "DSP56800_Flash.elf.x.S".
You'll find no S3 records
3) Now comment "my_variable += 3;" --> this way it will be deadstripped
4) compile and check the output directory, file "DSP56800_Flash.elf.x.S". I
have five S3 records filled with 0x00.
Do you get the same?
I found that the stack definition in the linker command file is generating this
(only when I'm not using the bss section). I tested the following:
F_stack_size = 0x0000; ---> No data generated in S-Record
F_stack_size = 0x0001; ---> One 0x00 loaded to the S-Record
F_stack_size = 0x0002; ---> Three (?) 0x00 loaded to the S-Record
F_stack_size = 0x0005; ---> Five (???) 0x00 loaded to the S-Record
What is going on? Any help will be really appreciated. Thanks !!
#### S-Record for stack size = 0x0000.
No S3 records in output file
#### S-Record for stack size = 0x0001.
S307000000400000B8 #### S-Record for stack size = 0x0002.