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

putting a function in a specific address in ROM

Hi,

I'm using the keil to compile a project for the 8051.

I want to place a single function in a specific address in the rom.

I found a lot of answers, in the forum, but non of them actually worked.

How can i "tell" the keil that the specific function MUST be at address 0x1234, for example?
if it helps, the function is written in a seperate file.
Thanks, Noam

Parents
  • per,
    it's a bit difficult to explain, but in a nutshell there is a register that holds an address in the ROM. this address is the first address of the bugged function.
    Once the h/w recognize that the RISC got to the bugged function jumps to the first address in the RAM. in the end of the fixed function in the RAM there is a jump to the last address of the bugged function in the ROM.
    Therefore you don't need the RAM to be as large as the ROM.
    So, anyone has any idea how to place a function in a specific address in the ROM?

Reply
  • per,
    it's a bit difficult to explain, but in a nutshell there is a register that holds an address in the ROM. this address is the first address of the bugged function.
    Once the h/w recognize that the RISC got to the bugged function jumps to the first address in the RAM. in the end of the fixed function in the RAM there is a jump to the last address of the bugged function in the ROM.
    Therefore you don't need the RAM to be as large as the ROM.
    So, anyone has any idea how to place a function in a specific address in the ROM?

Children