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

Code location

Is there a way to force the tools to place a function at a specific memory location?

I am working on an application updater. The boot/update code starts at 0x0000. The application code would start at 0x8000. Under normal (not updating) circumstances the boot code simply jumps to 0x8000 and life goes on.

In order to debug the boot/update code I'd like to place a dummy function at 0x8000 (flash some LED's, whatever). Can I do this from the bootloader project?

Thanks,

-Martin

Parents
  • The boot loader will not use interrupts at all. The interrupt vectors will just be re-routed to higher memory locations. Not the most efficient, but it should work fine.

    The other interesting alternative is to have the application live in low memory and the boot loader/updater somewhere in high memory. If no interrupts are used for the firmware updater, it should be quite easy to update firmware. The downside is that there's little in the way of recover if the update operation is interrupted. Upon reset code execution starts at 0x0000 ... into corrupted code. Bad idea. The first approach guarantees good code (the loader) in low memory at all times.

    I'm sure that there are more opinions on this than registers in an 8051.

    -Martin

Reply
  • The boot loader will not use interrupts at all. The interrupt vectors will just be re-routed to higher memory locations. Not the most efficient, but it should work fine.

    The other interesting alternative is to have the application live in low memory and the boot loader/updater somewhere in high memory. If no interrupts are used for the firmware updater, it should be quite easy to update firmware. The downside is that there's little in the way of recover if the update operation is interrupted. Upon reset code execution starts at 0x0000 ... into corrupted code. Bad idea. The first approach guarantees good code (the loader) in low memory at all times.

    I'm sure that there are more opinions on this than registers in an 8051.

    -Martin

Children