Error in compiling mpc5500 init_code project

I was compiling the mpc5500 init_code project from FreeScale on my MPC5566 evaluation board. I am using FreeScale code warrior 5.9.0 for compilation. But, I got the following error message.

"Relocation (10) of symbol 'cfg_mpc5500ccd' in '__start.o' is out of range. (1073741964 not in range [-33554432..33554428])"

I am a beginner in this. My idea is to run a simple LED blinking code and execute it from SRAM to verify the functionality. Then fuse the same code in Flash and see it operating in stand alone mode. So far, I could not get the initializatios correct. That is when I saw the mpc5500 init_code project. I am using P&E micro USB debugger.

Any help towards this will be greatly appreciated.

--------------------------------------- Posted through

formatting link

Reply to
Loading thread data ...

This sounds familiar, though I am using a different MPC device and different CodeWarrior (the "microcontroller" eclipse-based version, which is much nicer than the old "classic" IDE, but unfortunately doesn't support your chip).

Basically, the CW initialisation code is crap code quality. It is an appalling mixture of out-dated hand-written assembly (when C code would have been clearer, more portable, and sometimes much faster), it is inconsistent, incomplete, in some parts does completely daft setup (such as for the MMU and caches), fails with some compiler options, and produces lots of warnings. However, /most/ of the time it works. And it is probably not any worse than any other tool vendor's startup code - for some reason, such code is often terrible.

Relocation errors like this occur when the startup code has used assembly code with assumptions about address ranges, such as assuming the address is within the first 64K of flash, or that a branch is within a 16-bit offset. Look to the source of the actual error, and possibly check your linker file setup.



Reply to
David Brown






Thank you David. I copied the whole source files and started with a new project, instead of running the project file supplied with mpc5500 init_code project.

Now the error vanished and the code got compiled resulting in an elf file. But, when I start my debugger (PE micro) it shows another error,

"Can't read symbolic for target 'test_init_code.elf'" Any idea?

--------------------------------------- Posted through

formatting link

Reply to

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.