1. Change gcc optimize level to -O0 from -O3
make dist clean followed by make all
Note: FORTE grows from around 160k to 230k so lower levels of optimization only help for very small applications since 256k is max available.
1b. run openocd_flash.bat
2a. run
openocd.bat
2b. In cygwin start:
arm-insight-elf
current path: (if gdb does not remember for you)
aa@automatix /cygdrive/d/AA_local/eclipseWork/forte_lms_neu/bin/lms/src
$ arm-elf-insight forte
3. In
gdb
- run connect to target
- wait
- in Console window:
- monitor reset
- monitor halt - so can set breakpts
3b.
Set breakpoints
No more than 2 breakpts, since chip only allow 2 breakpoints
and only 1 breakpoint, if you want to step because 1 breakpt is used for stepping
- select source file
- - next to a line indicates where breakpoints are possible
- click on - to set breakpoint for a line
- verify via view/breakpoints
- delete extra breakpoints
Note: if drop-down for select source has disappeared, close all windows except source (main) window and console window; exit gdb; restart in cygwin
4. after settting the breakpoint then...
- continue (far right of run symbol)
- wait for boot to finish indicated by: blinking / sound of a device connecting to PC
5.
run download program in
java eclipse 6. download application from 4diac
Stops running at breakpoint
7. examine state at breakpoint
can now view/ local variables or watch
QI is really a #define
so use the form this->mpapp0DI[0] for watch expression
NOTE: C++ will not compile if gdb is open!