USB Library debug using Keil V4.60

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

USB Library debug using Keil V4.60

257 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by kwinchell on Tue Mar 26 06:01:06 MST 2013
I am using the Keil uvision SDK 4.60.0.0
I am trying to understand how the USB V0.98 is functioning. 
I built the Library for the MCB11U10 board to run the Generic HID Example.
I wanted to step through the process of CALLBACK_HID_Device_CreateHIDReport() getting called.
In the debugging session, I found it gets called by HID_Device_USBTask().

While examining the variables using the Keil debugger, the variables clearly had the wrong values.
After closer examination, I noticed the debugger was using the wrong addresses for the variables.

This initial SP was 0x10000430, and 0x10000400 on entry to HID_Device_USBTask().  Here is what I found:

Variable  Debug Adr  SP Access  Act Adr
=======================================
ReportId  100003FC   SP + 18   10000418
ReportINSize 003F8   SP + 14   10000414
ForceSend 100003F4   SP + 10   10000410
StatesChanged  3F0   SP + 0C   1000040C

It is like the debugger is using the wrong value for its SP.

Any Ideas?
Labels (1)
0 Kudos
1 Reply

229 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by kwinchell on Wed Mar 27 05:54:32 MST 2013
I was able to fix the problem be changing the optimization from -O0 to -O1.  I just upgraded to Kiel uVision 4.70, but have not tried it yet.

It turns out this issue has nothing to do with the NXP library. 
0 Kudos