User Tools

Site Tools


using_debug_mode

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
using_debug_mode [2016/04/30 00:41]
silverxxx
using_debug_mode [2016/04/30 00:43] (current)
silverxxx
Line 8: Line 8:
 {{ :keil_debug_mode.jpg?direct&200|}} {{ :keil_debug_mode.jpg?direct&200|}}
  
-a. Start debug mode by clicking the hourglass + red "D" toolbar button in uVision ( the quad should be connected via programming cable and powered) This will upload the last compiled firmware, and start debug mode.+**a.** Start debug mode by clicking the hourglass + red "D" toolbar button in uVision ( the quad should be connected via programming cable and powered) This will upload the last compiled firmware, and start debug mode.
  
-b. When the mode starts ( after clicking the popup and a few seconds more)+**b.** When the mode starts ( after clicking the popup and a few seconds more)
 press f5. The quad should start working now. This is the same as menu "Debug/run" press f5. The quad should start working now. This is the same as menu "Debug/run"
  
-c. (once only) Go to menu "View/Periodic windows update" and enable.+**c.** (once only) Go to menu "View/Periodic windows update" and enable.
 Go to menu "View/watches/watch 1/2 "and enable one or both. Go to menu "View/watches/watch 1/2 "and enable one or both.
 Watches are where the variables of interest can be added. Watches are where the variables of interest can be added.
 Windows refresh updates those variables dynamically. Windows refresh updates those variables dynamically.
  
-d. in the watch window there are some variables, attitude is the angle in degress. That should show if level mode works ok. On the second watch page there is acccal which should be pretty small, under 300 (+-) for example. If the angle keeps drifting while the quad is standing still it's a good indication it's not working.+**d.** in the watch window there are some variables, attitude is the angle in degress. That should show if level mode works ok. On the second watch page there is acccal which should be pretty small, under 300 (+-) for example. If the angle keeps drifting while the quad is standing still it's a good indication it's not working.
  
-e. Add more variables if needed: +**e.** Add more variables if needed: 
-accel (raw), gyro (rad/sec) , accelcal ( loaded from flash unless calibration is performed), gyrocal ( calibration at startup in gyro raw units ) , attitude ( in degrees , only first 2), vbattfilt ( current battery) , looptime ( should be near 0.001 in seconds), rx ( incomming data from tx , roll, pitch yaw, throttle) , aux ( auxilliary buttons/switches from tx), and more. Only global and static variables can be seen, but some may require a breakpoint at least once before they show. Some variables are already added from when I used them.+//accel// (raw), //gyro// (rad/sec) , //accelcal// ( loaded from flash unless calibration is performed), //gyrocal// ( calibration at startup in gyro raw units ) , //attitude// ( in degrees , only first 2), //vbattfilt// ( current battery) , //looptime// ( should be near 0.001 in seconds), //rx// ( incomming data from tx , roll, pitch yaw, throttle) , //aux// ( auxilliary buttons/switches from tx), and more. Only global and static variables can be seen, but some may require a breakpoint at least once before they show. Some variables are already added from when I used them.
  
 The variables can be added by doubleclicking on <enter expression> in the watch window. They can also be added by right clicking the variable name in the code, while in debug mode ( select add to). Only persistent vars show, not those define within functions. The variables can be added by doubleclicking on <enter expression> in the watch window. They can also be added by right clicking the variable name in the code, while in debug mode ( select add to). Only persistent vars show, not those define within functions.
  
-f. When finished press the toolbar button in step "a" again, to exit. You can use the quad afterwards.+**f.** When finished press the toolbar button in step "a" again, to exit. You can use the quad afterwards.
  
 The debug mode does not like to be disconnected from the quad while on but it will be ok after some time. Turn it off by pressing the same button again.  The debug mode does not like to be disconnected from the quad while on but it will be ok after some time. Turn it off by pressing the same button again. 
using_debug_mode.1461969683.txt.gz · Last modified: 2016/04/30 00:41 by silverxxx