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
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.
I need to do this because I want to start two different programs on different address on different condition.
sounds like a bootloader to me.
sounds like a bootloader to me Exactly I need to make bootloader.I want to put this bootloader to 0x8C800 address and main program to 0x80000. And call bootloader on condition.
what you need is a bootloader at the entry point into flash, e.g. 0x0. decide where you need to branch to in the main function of the bootloader itself. it should not "be called on condition"...