aboutsummaryrefslogtreecommitdiff
path: root/docs/arm_debugging.md
diff options
context:
space:
mode:
authorshela <shelaf@users.noreply.github.com>2019-12-21 20:00:22 +0900
committerJoel Challis <git@zvecr.com>2019-12-21 11:00:22 +0000
commit52c18ef0265a8bb4b521b787f425c906a9180ef9 (patch)
treeacfcdf5b4866d96100a0822e5b729f870e72349b /docs/arm_debugging.md
parentd47809575662d3587924c306579f0b7e8c8809f1 (diff)
downloadqmk_firmware-52c18ef0265a8bb4b521b787f425c906a9180ef9.tar.gz
qmk_firmware-52c18ef0265a8bb4b521b787f425c906a9180ef9.zip
[Docs] fix docs (#7642)
* [Docs] recurse-submodules option is need now * [Docs] `tmk_core` folder is correct * [Docs] fix typo * [Docs] package scope has changed * [Docs] Fix menu differences * Update docs/arm_debugging.md Co-Authored-By: fauxpark <fauxpark@gmail.com> * Update docs/arm_debugging.md Co-Authored-By: fauxpark <fauxpark@gmail.com> * fix typo Co-authored-by: fauxpark <fauxpark@gmail.com>
Diffstat (limited to 'docs/arm_debugging.md')
-rw-r--r--docs/arm_debugging.md22
1 files changed, 11 insertions, 11 deletions
diff --git a/docs/arm_debugging.md b/docs/arm_debugging.md
index 448b7a8fc..04887d88b 100644
--- a/docs/arm_debugging.md
+++ b/docs/arm_debugging.md
@@ -1,4 +1,4 @@
1# ARM Debugging usign Eclipse 1# ARM Debugging using Eclipse
2 2
3This page describes how to setup debugging for ARM MCUs using an SWD adapter and open-source/free tools. In this guide we will install GNU MCU Eclipse IDE for C/C++ Developers and OpenOCD together with all the necessary dependencies. 3This page describes how to setup debugging for ARM MCUs using an SWD adapter and open-source/free tools. In this guide we will install GNU MCU Eclipse IDE for C/C++ Developers and OpenOCD together with all the necessary dependencies.
4 4
@@ -18,7 +18,7 @@ XPM installation instructions can be found [here](https://www.npmjs.com/package/
18 18
19### The ARM Toolchain 19### The ARM Toolchain
20 20
21Using XPM it is very easy to install the ARM toolchain. Enter the command `xpm install --global @gnu-mcu-eclipse/arm-none-eabi-gcc`. 21Using XPM it is very easy to install the ARM toolchain. Enter the command `xpm install --global @xpack-dev-tools/arm-none-eabi-gcc`.
22 22
23### Windows build tools 23### Windows build tools
24 24
@@ -33,7 +33,7 @@ If you have an ST-Link the drivers can be found [here](https://www.st.com/en/dev
33 33
34### OpenOCD 34### OpenOCD
35 35
36This dependency allows SWD access from GDB and it is essential for debugging. Run `xpm install --global @gnu-mcu-eclipse/openocd`. 36This dependency allows SWD access from GDB and it is essential for debugging. Run `xpm install --global @xpack-dev-tools/openocd`.
37 37
38### Java 38### Java
39 39
@@ -45,17 +45,17 @@ Now its finally time to install the IDE. Use the Release page [here](https://git
45 45
46## Configuring Eclipse 46## Configuring Eclipse
47 47
48Open up the Eclipse IDE we just downloaded. To import our QMK directory select File -> Import -> C/C++ -> Existing code as Makefile Project. Select next and use Browse to select your QMK folder. In the tool-chain list select ARM Cross GCC and select Finish. 48Open up the Eclipse IDE we just downloaded. To import our QMK directory select File -> Import -> C/C++ -> Existing Code as Makefile Project. Select Next and use Browse to select your QMK folder. In the tool-chain list select ARM Cross GCC and select Finish.
49 49
50Now you can see the QMK folder on the left hand side. Right click it and select Properties. On the left hand side, expand MCU and select ARM Toolchain Paths. Press xPack and OK. Repeat for OpenOCD Path and if you are on windows for Build Tool Path. Select Apply and Close. 50Now you can see the QMK folder on the left hand side. Right click it and select Properties. On the left hand side, expand MCU and select ARM Toolchains Paths. Press xPack and OK. Repeat for OpenOCD Path and if you are on Windows for Build Tools Path. Select Apply and Close.
51 51
52Now its time to install the necessary MCU packages. Go to Packs perspective by selecting Window -> Open Perspective -> Others -> Packs. Now select the yellow refresh symbol next to the Packs tab. This will take a long time as it is requesting the MCU definitions from various places. If some of the links fail you can probably select Ignore. 52Now its time to install the necessary MCU packages. Go to Packs perspective by selecting Window -> Perspective -> Open Perspective -> Other... -> Packs. Now select the yellow refresh symbol next to the Packs tab. This will take a long time as it is requesting the MCU definitions from various places. If some of the links fail you can probably select Ignore.
53 53
54When this finishes you must find the MCU which we will be building/debugging for. In this example I will be using the STM32F3 series MCUs. On the left, select STMicroelectonics -> STM32F3 Series. On the middle window we can see the pack. Right click and select Install. Once that is done we can go back to the default perspective, Window -> Open Perspective -> Others -> C/C++. 54When this finishes you must find the MCU which we will be building/debugging for. In this example I will be using the STM32F3 series MCUs. On the left, select STMicroelectronics -> STM32F3 Series. On the middle window we can see the pack. Right click and select Install. Once that is done we can go back to the default perspective, Window -> Perspective -> Open Perspective -> Other... -> C/C++.
55 55
56We need to let eclipse know the device we intent to build QMK on. Right click on the QMK folder -> Properties -> C/C++ Build -> Settings. Select the Devices tab and under devices select the appropriate variant of your MCU. For my example it is STM32F303CC 56We need to let eclipse know the device we intent to build QMK on. Right click on the QMK folder -> Properties -> C/C++ Build -> Settings. Select the Devices tab and under Devices select the appropriate variant of your MCU. For my example it is STM32F303CC
57 57
58While we are here let's setup the build command as well. Select C/C++ Build and then the Behavior tab. On the build command, replace `all` with your necessary make command. For example for a rev6 Planck with the default keymap this would be `planck/rev6:default`. Select Apply and Close. 58While we are here let's setup the build command as well. Select C/C++ Build and then the Behavior tab. On the Build command, replace `all` with your necessary make command. For example for a rev6 Planck with the default keymap this would be `planck/rev6:default`. Select Apply and Close.
59 59
60## Building 60## Building
61 61
@@ -71,7 +71,7 @@ NOTE: Make sure the SWCLK and SWDIO pins are not used in the matrix of your keyb
71 71
72### Configuring the Debugger 72### Configuring the Debugger
73 73
74Right click on your QMK folder, select Debug As -> Debug Configuration. Here double click on GDB OpenOCD Debugging. Select the debugger tab and enter the configuration necessary for your MCU. This might take some fiddling and googleing to find out. The default script for the STM32F3 is called stm32f3discovery.cfg. To let OpenOCD know, in the Config options enter `-f board/stm32f3discovery.cfg`. 74Right click on your QMK folder, select Debug As -> Debug Configurations... . Here double click on GDB OpenOCD Debugging. Select the Debugger tab and enter the configuration necessary for your MCU. This might take some fiddling and Googling to find out. The default script for the STM32F3 is called `stm32f3discovery.cfg`. To let OpenOCD know, in the Config options enter `-f board/stm32f3discovery.cfg`.
75 75
76NOTE: In my case this configuration script requires editing to disable the reset assertion. The locations of the scripts can be found in the actual executable field usually under the path `openocd/version/.content/scripts/board`. Here I edited `reset_config srst_only` to `reset_config none`. 76NOTE: In my case this configuration script requires editing to disable the reset assertion. The locations of the scripts can be found in the actual executable field usually under the path `openocd/version/.content/scripts/board`. Here I edited `reset_config srst_only` to `reset_config none`.
77 77
@@ -81,7 +81,7 @@ Select Apply and Close.
81 81
82Reset your keyboard. 82Reset your keyboard.
83 83
84Press the bug icon and if all goes well you should soon find yourself in the debug perspective. Here the program counter will pause at the beginning of the main function and way for you to press Play. Most of the features of all debuggers work on ARM MCUs but for exact details google is your friend! 84Press the bug icon and if all goes well you should soon find yourself in the Debug perspective. Here the program counter will pause at the beginning of the main function and wait for you to press Play. Most of the features of all debuggers work on Arm MCUs but for exact details Google is your friend!
85 85
86 86
87Happy debugging! 87Happy debugging!