| Details |
Message |
|
Read-Only
Author Abishek Ambrose
Posted 8-Apr-2009 14:40 GMT
Toolset ARM
|
 LPC23xx firmware upgrade
Abishek Ambrose
Hi,
In lpc2364 MCU,I am implementing a bootloader which uses IAP apis,
At location 0x0000 i have the bootloader code from here i am call my
application which is loaded at location 0x8000 through jtag
programmer.In this procedure my application at loaction 8000 is
working fine.
Then I loaded the same application at loaction 0x8000 by IAP API and
cross verified the code the code loaded by my program and JTAG
programmer is same.but at the instuction
0x00008000 E59FF018 LDR PC,[PC,#0x0018]
at his loaction the value of PC is 0x8000 but after this instruction
the value of PC should be 0x8058 but in the code which is loaded by
IAP API the PC becomes 0x0058. Do i want to do any presettings to
execute the above instuction correctly.
Kindly help me to solve this issue .If u didnt understand kindly
inform.. so that i wil explain in details.
|
|
|
Read-Only
Author Leandro Gentili
Posted 8-Apr-2009 15:22 GMT
Toolset ARM
|
 RE: LPC23xx firmware upgrade
Leandro Gentili
Your application is linked at location = 0x0.
Easy way:
Go to Target Options and in IROM1 change the 0x0
to 0x8000 and re-build your application.
Hard way:
Change LR_IROM1 and ER_IROM1 in the scatter file.
|
|
|
Read-Only
Author John Linq
Posted 9-Apr-2009 03:21 GMT
Toolset ARM
|
 RE: LPC23xx firmware upgrade
John Linq
Hi Abishek,
If you have already done what Leandro Gentili said, then I suspect
I have a problem similar to yours.
0x00008000 E59FF018 LDR PC,[PC,#0x0018]
I think this is an exception handler, a reset hander. So I would
like to know: Do you use the "Conditional Assembly Control Symbols:
RAM_INTVEC REMAP RAM_MODE" in your startup file of your App?
It seems my problem is related to the breakpoints I set; and only
happens in a Debug Session. So, maybe you can try a different
breakpoint to see what will happen.
|
|
|
Read-Only
Author John Linq
Posted 9-Apr-2009 03:41 GMT
Toolset ARM
|
 RE: LPC23xx firmware upgrade
John Linq
http://www.keil.com/support/docs/2963.htm
ARM: ATMEL REMAP CAUSES PROBLEMS WITH ULINK DEBUGGING
The REMAP feature on Atmel devices exchanges RAM and Flash areas.
When the remapping is done before ULINK can stop the device, you will
see swapped memory areas in the debugger and the CPU may not behave
correctly.
|
|
|
Read-Only
Author John Linq
Posted 9-Apr-2009 03:56 GMT
Toolset ARM
|
 RE: LPC23xx firmware upgrade
John Linq
Hi Abishek,
What is the value of your 0x00008020?
What is the value of your 0x00000020?
What is the value of your 0x40000020?
Looks like you trigger a Reset, so ARM core goes to the Reset
Handler at 0x00000000, then loads the value at 0x00000020 into PC,
after that your PC becomes 0x00000058.
|
|
|
Read-Only
Author Abishek Ambrose
Posted 9-Apr-2009 05:45 GMT
Toolset ARM
|
 RE: LPC23xx firmware upgrade
Abishek Ambrose
Hi John,
This not only happening at exceptions at this position also
0x0000814C E59F000C LDR R0,[PC,#0x000C]
0x00008150 E12FFF10 BX R0
At the start of the instuction the value of PC is 0x814c
Here after this instuction the value of R0 should be 0x8164 but in
this case its becoming 0x0164.
This is happening only for the code which i loaded using IAP apis,
If load the code through ULINK debugger its working fine.
|
|
|
Read-Only
Author Abishek Ambrose
Posted 9-Apr-2009 05:30 GMT
Toolset ARM
|
 RE: LPC23xx firmware upgrade
Abishek Ambrose
Hi Leandro Gentili,
yes if i load the code at location 0x8000 with ulink programmer
its working fine. But if i do the same thing by my bootloader program
using IAP apis the above instruction is malfuntioning.
|
|
|
Read-Only
Author John Linq
Posted 9-Apr-2009 06:19 GMT
Toolset ARM
|
 RE: LPC23xx firmware upgrade
John Linq
Hi Abishek,
Now I think that, the problem you encountered is totally different
from mine; and I don't know anything about IAP.
But I would like to know, is your Application a HEX file or a BIN
file?
|
|
|
Read-Only
Author Abishek Ambrose
Posted 9-Apr-2009 06:55 GMT
Toolset ARM
|
 RE: LPC23xx firmware upgrade
Abishek Ambrose
Hi John
Hex file
|
|
|
Read-Only
Author John Linq
Posted 9-Apr-2009 07:10 GMT
Toolset ARM
|
 RE: LPC23xx firmware upgrade
John Linq
Hi Abishek,
Maybe you can use the C:\KEIL\ARM\BINxx\fromelf.exe to translate
your Application to BIN format; then try it again to see if the BIN
format works properly with IAP.
|
|