-
Notifications
You must be signed in to change notification settings - Fork 0
/
platformio.ini
82 lines (76 loc) · 2.74 KB
/
platformio.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html
; ** Read https://docs.platformio.org/page/projectconf/section_env.html#options as a manual. **
[platformio]
include_dir = ./Core/Inc
src_dir = ./Core/Src
default_envs = env-name
[env]
platform = ststm32
; For starter who wants to quickly involve in platformIO, you can also use arduino(STM32duino).
framework = stm32cube
; Any board in the same series(like stm32f4xx) is preferred, since its board_build.cpu is same as your target.
board = genericSTM32F423CH
; You should override boards if the mcu mismatches your cubeMX target.
board_build.extra_flags =
-DSTM32F4xx
-DSTM32F427xx
; See cubeMX selector for clock frequency, flash and ram size. 1 kB = 1024 B
; See https://github.com/platformio/platform-ststm32/blob/master/boards/genericSTM32F423CH.json
board_build.mcu = stm32f427aihx
board_build.f_cpu = 180000000L
board_upload.maximum_ram_size = 262144
board_upload.maximum_size = 2097152
; See https://github.com/platformio/platform-ststm32/pull/503
board_build.stm32cube.custom_config_header = yes
build_type = debug
# build_flags =
debug_build_flags =
-O0
-ggdb
; == IF YOU are using a USB-TTL programmer and a development board with CH340 ==
; upload_protocol = serial
; * YOU may also encounter with the DTR/RTS problem.
; * SEE https://community.platformio.org/t/upload-and-monitor-task-problem-with-dtr-and-rts/15947
; * SEE http://www.openedv.com/thread-60562-1-1.html
; monitor_rts = 1
; monitor_dtr = 0
; == IF YOU are using CMSIS-DAP ==
; upload_protocol = cmsis-dap
; * FIND a BOARD in https://docs.platformio.org/en/stable/plus/debug-tools/cmsis-dap.html
; * that has a upload and debug protocol of cmsis-dap. e.g. armstrap_eagle2048
; * I didn't prefer to change board information locally.
; == IF YOU are using ST-Link ==
upload_protocol = stlink
debug_tool = stlink
; ST-Link doesn't have a COM/vCOM to monitor, you may specific monitor port.
; monitor_port = #/dev/ttyUSB0 #COM10
monitor_speed = 115200
debug_load_mode = modified
; To be tested! (extra_cmds)
debug_extra_cmds =
monitor arm semihosting enable
debug_init_cmds =
define pio_reset_halt_target
$LOAD_CMDS
monitor reset halt
$INIT_BREAK
end
define pio_reset_run_target
monitor reset
end
target extended-remote $DEBUG_PORT
monitor init
pio_reset_halt_target
; You can change "main" to any function name.
; For C++ program, using nm to check its real symbol name.
debug_init_break = tbreak main
[env:env-name]
build_type = debug