HC08: Code / Relocation and P&E

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

HC08: Code / Relocation and P&E

跳至解决方案
2,069 次查看
shadoooo
Contributor I
Hello!
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

#pragma CODE_SEG BOOTLOADER_ROM
and
#pragma CODE_SEG APPLICATION_ROM

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?
Thanks


Message Edited by CrasyCat on 2007-11-02 09:45 AM
标签 (1)
标记 (1)
0 项奖励
回复
1 解答
978 次查看
CrasyCat
Specialist III
Hello
 
Unfortunately it is not possible to distribute sections in the different memory area from ProcessorExpert.
 
At this point you have to set "Generate PRM file" to "No" and manage the PRM file manually.
 
CrasyCat


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

在原帖中查看解决方案

0 项奖励
回复
1 回复
979 次查看
CrasyCat
Specialist III
Hello
 
Unfortunately it is not possible to distribute sections in the different memory area from ProcessorExpert.
 
At this point you have to set "Generate PRM file" to "No" and manage the PRM file manually.
 
CrasyCat


Message Edited by CrasyCat on 2007-11-02 09:45 AM
0 项奖励
回复