Other Parts Discussed in Thread: Z-STACK
Hi guys,
I'm doing a project needed to update firmware OTA.
I've already had bootloader program and user program which starts at 0x1000 address.
Everything seems to be fine, except the user code can not jump to ISR.
In the main() of User code, the program can print a string every 500ms (using delay function), but it's impossible to blink led using timer.
I'm pretty sure that the code of user program used to blink led by timer is correct because the user program runs correctly when I change INTVEC to 0x0000.
These are things I've changed in linker file to make a user program:
- Change INTVEC from 0x0000 to 0x1000
- Change NEARCODE's start address: _CODE0_START=0x1000 (default value is 0x0000).
If anyone has met the same problem, please help me to fix it.
The below lines are 10 first lines in user program's hex file:
:020000040000FA :0310000002104E8D :10104B00021CE975D0007581BF751000751107532F // 0x004B is the default timer1 interrupt vector's address :10105B0092FE02106500000080FBE490070078050B :10106B0079018002F0A3D8FCD9FA7A047B0790109F :10107B00A1789A79018015E493A3AD82AE838A821D :10108B008B83F0A3AA82AB838D828E83D8E9D9E7B9 :10109B00121E091210600D0A5379737469636B2069 :1010AB00316D73000D0A5744543D2575000D0A55DB :1010BB0073657220436F6465204353523D25303274