AnsweredAssumed Answered

HC08: Code / Relocation and P&E

Question asked by Andrea Pastega on Oct 30, 2007
Latest reply on Nov 2, 2007 by CrasyCat
I'm using Codewarrior and PE to define a project on a HCS08 microprocessor.
By now I just wrote code in C and compiled the project, without taking care of the addresses that the linker would assign to specific part of code / data.

Now I'm writing a bootloader, so I need to split the ROM in two parts, where the higher part is targeted to the bootloaderm with memory protection, so I'm planning to use a second IRQ vector table just at the end of the other part of ROM, which will contain user mode application.

Now, on the CPU bean I defined all the memory areas, specifing two different areas APPLICATION_ROM and BOOTLOADER_ROM, and of course I protected the memory that is used for the latter.
What I need now is to specify which part of the code has to be linked in the APPLICATION_ROM area and which on the BOOTLOADER_ROM, so I tried to add


to the single files of my project, respectively if they has to be puttend on the user mode area or in the bootloader area of the ROM. The same also for CONST_SEG if some constant data has to be saved here or there.

The problem is that I didn't worked, because in .map file I see that the names I specified are used for code SECTIONS, and not for SEGMENTS.
I would need to modify the .prm file of the project (so disabling PE automatic generation and also memory management)?
There's a good way to split ROM data in SEGMENTS using PE?

Message Edited by CrasyCat on 2007-11-02 09:45 AM