eclipse
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
eclipse [2012/07/16 10:34] – duggle | eclipse [2012/07/17 00:19] (current) – duggle | ||
---|---|---|---|
Line 115: | Line 115: | ||
The following is used in this section:\\ | The following is used in this section:\\ | ||
**core: | **core: | ||
- | **OS: | + | **OS: |
- | **toolchain: | + | **toolchain: |
- | **IDE: | + | **IDE: |
**OpenOCD: | **OpenOCD: | ||
- | **GDB: | + | **GDB: |
- | **JTAG: | + | **JTAG: |
===== OpenOCD ===== | ===== OpenOCD ===== | ||
Line 155: | Line 155: | ||
==== Debug Configuration ==== | ==== Debug Configuration ==== | ||
This config will have the function of simply running the debugger with a project that is already flashed in the midibox core (it may have been flashed using MIOS Studio in the usual way). It does not actually build the program or flash it. Frequently you'll want to run the debugger for various test cases without changing the program. This does it quickest.\\ | This config will have the function of simply running the debugger with a project that is already flashed in the midibox core (it may have been flashed using MIOS Studio in the usual way). It does not actually build the program or flash it. Frequently you'll want to run the debugger for various test cases without changing the program. This does it quickest.\\ | ||
- | Open Debug configurations (click pulldown on button pictured below)\\ | + | * Open Debug configurations (click pulldown on button pictured below)\\ |
{{: | {{: | ||
* Select "Debug Configurations..." | * Select "Debug Configurations..." | ||
- | * click the " | ||
* **Name:** type "// | * **Name:** type "// | ||
* To the left of the " | * To the left of the " | ||
Line 189: | Line 188: | ||
==== Running the Debug Configuration ==== | ==== Running the Debug Configuration ==== | ||
+ | In this procedure we will debug by building the application and flashing it into the core using MIOS Studio, do this first then... | ||
+ | * Make sure OpenOCD process is running: | ||
+ | {{: | ||
+ | * Click pulldown on button pictured above and click on " | ||
+ | {{: | ||
+ | * Open Debug configurations (click pulldown on button pictured below)\\ | ||
+ | {{: | ||
+ | * Select "// | ||
+ | * Cursor will stop at main() shown below. There will be all sorts of esoteric messages in the console relating to the workings of GDB. | ||
+ | * Run menu has all sorts of commands Resume, | ||
+ | * Experiment by placing a breakpoint in a routine that you know should execute: right click-> | ||
+ | * Resume execution, until cursor stops at the line of code where the breakpoint is: The Variables frame shows the values of local variables. | ||
==== Flash/Debug Configuration ==== | ==== Flash/Debug Configuration ==== | ||
+ | In this configuration the app will be built, then flashed into the core, then loaded ready to execute. | ||
+ | * Open Debug configurations (click pulldown on button pictured below)\\ | ||
+ | {{: | ||
+ | * Select "Debug Configurations..." | ||
+ | * Copy the previous debug only configuration from the last section: | ||
+ | * (re)Name it "// | ||
+ | * Main tab-> | ||
+ | * Debugger tab-> same as before. | ||
+ | * Startup tab-> same except for contents of Initialization Commands text box: | ||
+ | '' | ||
+ | monitor reset halt\\ | ||
+ | monitor wait_halt\\ | ||
+ | monitor poll\\ | ||
+ | '' | ||
+ | |||
+ | as well as in the "Run Commands" | ||
+ | |||
+ | '' | ||
+ | monitor stm32f1x mass_erase 0\\ | ||
+ | monitor flash write_image MyProjectFolder/ | ||
+ | disconnect\\ | ||
+ | target remote localhost: | ||
+ | monitor soft_reset_halt\\ | ||
+ | '' | ||
+ | * Click apply to save configuration settings | ||
==== Running the Flash/Debug Configuration ==== | ==== Running the Flash/Debug Configuration ==== | ||
+ | * Make sure OpenOCD is running (see previously) | ||
+ | {{: | ||
+ | * Click the pull down and select the item "// | ||
+ | * Project will build | ||
+ | * GDB diagnostics will appear (black, commands are in red). | ||
+ | * There will be a significant pause during the actual flash programming operation (see pictured below, in a project called AqCntSVN) | ||
+ | {{: | ||
+ | * The program will halt. Activate " | ||
+ | * You are now debugging and the program will halt on break points, allow single stepping, inspection of variables, etc, etc. | ||
+ | ==== The FreeRTOS StateViewer Plugin ==== |
eclipse.1342434865.txt.gz · Last modified: 2012/07/16 10:34 (external edit)