I have delevoped an EC++ application using the IAR compiler. The details are:
* Processor: AVR MEGA 128, 64KB external RAM.
* Compiler: AVR IAR C/EC++ Compiler (Version 2.28A).
* AVR JTAG ICE for debugging / processor programming.
* RTOS: CMX-RTX RTOS (version 5.30a).
* AVR Studio 4.07.
Using the IAR compiler I generate an extended intel HEX file.
1) When I load the HEX file into C-SPY, C-SPY transfers the code to the target using the JTAG device. When I then run the application, it starts correctly.
2) When I load the HEX file into the AVR Studio debugger, it transfers the code to the target using the JTAG device. When I then run the application, it starts correctly.
So far, so good.
3) When I program the FLASH RAM of the processor using the HEX file, the code is written correctly to the processor (verify = OK). Afterwards I power off the JTAG device and the target board. When I then power the target board up again, the application does NOT start!? If I force a reset of the processor (connecting GND to the SRST pin on the JTAG interface), the application DOES start!?
Does anybody have any idea, why the application does not start on power up?