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

placing code at specific address

in main() I have two pieces of code - the first one needs to start at the beginning of main and it is very small the second one will be placed just after at the beginnig adddress + 200h
can you tell me the directive(s) to use to set this second piece of code to be placed at this specific address after the beginning of main()

Parents
  • But who writes the magic cookie? Can't be the application because it hasn't been started until the boot loader runs.

    Would be meaningless for the boot loader to write a magic cookie and then test it.

    Magic cookies are good for having an application perform a forced reboot, and with the cookie tell the boot loader to _not_ boot into the application again, but to instead perform a transfer.

    For normal operation, it's better to have the application area covered by a CRC-32 or similar, and have the boot loader scan the area to verify if the computed CRC-32 is correct.

Reply
  • But who writes the magic cookie? Can't be the application because it hasn't been started until the boot loader runs.

    Would be meaningless for the boot loader to write a magic cookie and then test it.

    Magic cookies are good for having an application perform a forced reboot, and with the cookie tell the boot loader to _not_ boot into the application again, but to instead perform a transfer.

    For normal operation, it's better to have the application area covered by a CRC-32 or similar, and have the boot loader scan the area to verify if the computed CRC-32 is correct.

Children
No data