eclipse
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
eclipse [2012/07/15 23:57] – 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 135: | Line 135: | ||
- Select " | - Select " | ||
- Click button (new configuration, | - Click button (new configuration, | ||
- | - Name: put " | + | - **Name:** put " |
- | - Location: put " | + | - **Location:** put " |
- | - Working Directory: put path to root directory of projects that may use this debug setup e.g " | + | - **Working Directory:** put path to root directory of projects that may use this debug setup e.g " |
- | - Arguments: "-f C: | + | - **Arguments:** "-f C: |
===== GDB Debugger ===== | ===== GDB Debugger ===== | ||
==== Install Eclipse GDB Plugin ==== | ==== Install Eclipse GDB Plugin ==== | ||
+ | - Open " | ||
+ | - **Work with:** pulldown and select " | ||
+ | - In the tree shown, open branch at " | ||
+ | - Click the box beside "C/C++ GDB Hardware Debugging" | ||
+ | - Click " | ||
+ | - Follow the prompts to install the plugin | ||
==== Install GDB ==== | ==== Install GDB ==== | ||
Line 148: | Line 154: | ||
==== Debug Configuration ==== | ==== Debug Configuration ==== | ||
- | Open Debug configurations (click pulldown on button pictured below)\\ | + | 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)\\ | ||
{{: | {{: | ||
- | - Select "Debug Configurations..." | + | |
- | - | + | * **Name:** type "// |
+ | * To the left of the " | ||
+ | * Make sure " | ||
+ | * Beside the link it should say "Using Standard Hardware Debugging Launcher" | ||
+ | * **Main** tab:-> | ||
+ | * **C/C++ Application: | ||
+ | * **Project: | ||
+ | * Select " | ||
+ | * **Debugger** tab:-> | ||
+ | * **GDB Command:** " | ||
+ | * **Command Set:** select " | ||
+ | * **Protocol Version:** select " | ||
+ | * Check " | ||
+ | * Uncheck "Use remote target" | ||
+ | * **Startup** tab:-> | ||
+ | * "Reset and Delay" is checked, " | ||
+ | * Text box in the " | ||
+ | '' | ||
+ | b main\\ | ||
+ | monitor soft_reset_halt \\ | ||
+ | monitor sleep 500\\ | ||
+ | continue \\ | ||
+ | clear main'' | ||
+ | * "Load Image" unchecked | ||
+ | * "Load symbols" | ||
+ | * "Use project binary" | ||
+ | * **Source** and **Common** tabs are not altered. | ||
+ | * Click " | ||
+ | |||
+ | ==== 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 ==== | ||
+ | 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..." | ||
+ | | ||
+ | * (re)Name it "// | ||
+ | * Main tab->select " | ||
+ | * 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 ==== | ||
+ | * 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.1342396673.txt.gz · Last modified: 2012/07/15 23:57 by duggle