You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Readme.md
+25-2Lines changed: 25 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,7 @@ Video of work: https://youtu.be/M7RBQsq5_lc
9
9
3) cmake
10
10
4) clang
11
11
5) st-link https://github.com/texane/stlink
12
+
6) (optional) openocd
12
13
//5) https://github.com/SL-RU/STM32CubeMX_cmake
13
14
14
15
### Install:
@@ -19,9 +20,11 @@ Video of work: https://youtu.be/M7RBQsq5_lc
19
20
4) add to your init file (require 'stm32)
20
21
5) install cmake-ide and [configure](https://syamajala.github.io/c-ide.html)
21
22
22
-
### Commentary:
23
+
### How to use:
23
24
24
25
WORK IN PROGRESS!!!
26
+
27
+
#### GDB and st-link
25
28
1) Create STM32CubeMx project and generate it for SW4STM32
26
29
2) M-x stm32-new-project RET *select CubeMX project path*
27
30
3) open main.c
@@ -32,6 +35,26 @@ WORK IN PROGRESS!!!
32
35
8) in gdb) "load" to upload file to MC and "cont" to run.For more see https://github.com/texane/stlink
33
36
9) good luck!
34
37
38
+
#### Openocd
39
+
40
+
Openocd requieres a .cfg file to properly function you need to provide the file in this case it must be
41
+
called board.cfg, and example file is provided (board.cfg) the file needs to be located in your project root.
42
+
43
+
##### FreeRTOS support
44
+
45
+
Openocd can
46
+
47
+
1) Create STM32CubeMx project and generate it for SW4STM32
48
+
2) M-x stm32-new-project RET *select CubeMX project path*
49
+
3) put the board.cfg in your proyect root(an example file named board.cfg is provided in this repo)
50
+
3) open main.c
51
+
4) C-c . C to compile
52
+
5) connect stlink to your PC
53
+
6) stm32-run-openocd to start openocd server
54
+
7) start GDB debugger with stm32-start-openocd-gdb
55
+
56
+
after this you shold be in the debugger window and you can debug your program, but the default gdb window acts like a terminal and is not very helpful in regards of context and data, so its a good idea to use gdb in many windows mode you can acativate it in your startup config file or with M-x gdb-many-windows
57
+
35
58
36
59
After CubeMx project regeneration or adding new libraries or new sources you need to do M-x stm32-cmake-build
37
60
@@ -43,5 +66,5 @@ If you have error in cmsis_gcc.h do ```M-x stm32-fix-vfpcc```. It will change so
43
66
# License:
44
67
45
68
This program is distributed under the terms of GNU General
46
-
Public License, version 3 or any later version. See COPYING
69
+
Public License, version 3 or any later version. See COPYING
0 commit comments