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 put program to specify address using startup.s

Hi!
I am using ADUC7026 and Keil Arm Tools. I need to put all program to specify address(for example 0x8C800). I need to do this in startup.s, because I want MCU to jump to this address only on specially condition(for example GPIO pin low). In all other cases program must start from defaul address(0x80000). Thanks in advance

Parents
  • And you checked ... what?
    I used debugger to check where PC goes after startup

    No, you quite certainly don't need to know that. You need to learn why the address of main() is irrelevant to what you're trying to do there.

    I need to know this for make jump to this address. I tried to make jump after initialization in startup.c to address 0x8C800, but nothing happened because program starts at 0x8DA69 address.
    I need to do this because I want to start two different programs on different address on different condition.

Reply
  • And you checked ... what?
    I used debugger to check where PC goes after startup

    No, you quite certainly don't need to know that. You need to learn why the address of main() is irrelevant to what you're trying to do there.

    I need to know this for make jump to this address. I tried to make jump after initialization in startup.c to address 0x8C800, but nothing happened because program starts at 0x8DA69 address.
    I need to do this because I want to start two different programs on different address on different condition.

Children