Hello,
maybe someone can help with this this issue.
I am implementing a bootloader for MPC5643L. I am using CodeWarrior 10.5.
I've already tried a lot of solutions from this forum and the great search engine but it always throws me an linker error.
I implemented the code as follows:
__declspec(section ".init") extern void __startup(int argc, char **argv, char **envp); #pragma section code_type ".bootvector" data_mode=far_abs __declspec(section ".bootvector") __asm void jumpToStartup(void); __asm void jumpToStartup(void) { b __startup; }
Then I added the following line into the MEMORY block:
bootvector: org = 0x40004, len = 0x8
And I added the following code to the SECTIONS block:
GROUP : { .bootvector : {} } > bootvector
I also tried the upper statement without the GROUP definition - same result.
When I try to compile it I always get the linker error:
Linker command file output section '.bootvector' has a type or input which is incompatible with section '.bootvector' in file 'Boot_c.obj'. Change the type or add an input for this section.
What I am doing wrong here ?
Thank you,
Markus