This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

how to split code between ROM and Flash in one project when use KEIL uVision2

I must split code into 2 space in one project, one is boot code, it is ROM, from 0x0000 to 0x8000, the other is application code, it is flash, from 0x8000 to 0xa000. I'm only code flash section in application. How to set KEIL, and make sure the boot code section is all in 0x0000-0x8000 while the flash section is all in 0x8000-0xa000? by the way, I use generic 8032.

Parents
  • The linker directives (CODE, DATA for BL51; SEGMENTS for LX51) allow you to order and place segments. The RESERVE directive might also come in handy to prevent projects from using some ranges of available memory (or sometimes you can simply not admit to the tools that the high memory range even exists).

    For my own project with boot and application code, I do as Andy suggests and simply build two different projects, which have two different memory maps described to the linker.

Reply
  • The linker directives (CODE, DATA for BL51; SEGMENTS for LX51) allow you to order and place segments. The RESERVE directive might also come in handy to prevent projects from using some ranges of available memory (or sometimes you can simply not admit to the tools that the high memory range even exists).

    For my own project with boot and application code, I do as Andy suggests and simply build two different projects, which have two different memory maps described to the linker.

Children
No data