I want to test the following code.
It will be fail.hang on this line.
but if this code run in keil,it will be ok.
all the code are same.Including clock configuration, no other peripheral functions.and compare all the register are same.
Keil Version.
LPCXpresso IDE Version.
Debugger.
What can i do for next.
Solved! Go to Solution.
-O3 at LPCXpresso are fail,-O2,-Os at LPCXpresso are partial failure,-O1,-O0,-Og can be ok.
The debug level does not affect the results.
but at keil,all Optimization level are ok.
You may be able to test my code.
This probably is not a tools issues as such.As I said previously, check the initialisation code that sets up the memory interface. I assume there is some difference between this code in your LPCXpresso and Keil projects.
Regards,
LPCXpresso Support
-O3 at LPCXpresso are fail,-O2,-Os at LPCXpresso are partial failure,-O1,-O0,-Og can be ok.
The debug level does not affect the results.
but at keil,all Optimization level are ok.
You may be able to test my code.
cr_startup_lpc177x_8x.c & sysinit.c are differnet,but keil does not have this,SystemInit function are the same,and the same code in main.c now,but problem does not slove.
In Keil:
Reset_Handler(raminit by keil code,no source) -> SystemInit -> main
In LPCXpresso:
ResetISR(raminit)->SystemInit(the same as keil)->__main (no source) ->main
In fact, I am compared to the contents of each line, I have compared the value of the register affected.
Given where you say your debug session is hanging, my best guess would be that there is a problem with the code that you are using to set up the external memory interface to the NOR flash.
Regards,
LPCXpresso Support
at this line,LPCXpresso always read out 0xFFFF,but i don't know what the happen.
while (*(volatile uint16_t *)(0x80000000 | (Addr<<1)) != Data);
but the same code in keil works well.