summaryrefslogtreecommitdiff
path: root/hid/platformio-stm32.ini
blob: 94fd44d42cc6f0d62de62e886c60d278a804e70f (plain)
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
# http://docs.platformio.org/page/projectconf.html
[platformio]
core_dir = ./.platformio/

[env]
framework = arduino
platform = ststm32
board = genericSTM32F103C8
board_build.core = maple
extra_scripts =
	post:patch.py

[_common]
lib_deps =
	git+https://github.com/ZulNs/STM32F1_RTC#v1.1.0
	git+https://github.com/arpruss/USBComposite_stm32f1#3c58f97eb006ee9cd1fb4fd55ac4faeeaead0974
	drivers-stm32
build_flags =
# ----- The default config with dynamic switching -----
	-DHID_DYNAMIC
	-DHID_WITH_USB
	-DHID_SET_USB_KBD
	-DHID_SET_USB_MOUSE_ABS

[_serial]
extends =
	_common
build_flags =
	${_common.build_flags}
	-DCMD_SERIAL=Serial1
	-DCMD_SERIAL_SPEED=115200
	-DCMD_SERIAL_TIMEOUT=100000
# ===== Serial =====
[env:serial]
extends =
	_serial
upload_flags = -c set CPUTAPID 0x2ba01477
debug_tool= stlink
debug_build_flags = -Og -ggdb3 -g3
debug_server = 
	.platformio/packages/tool-openocd/bin/openocd
	-s .platformio/packages/tool-openocd/scripts
	-f interface/stlink.cfg
	-c "transport select hla_swd"
	-c "set CPUTAPID 0x2ba01477"
	-f target/stm32f1x.cfg
	-c "reset_config none" 
; build_type = debug
[env:patch]
; platformio-stm32f1-no-serial-usb.patch requires to running build again
; fake target was added to avoid error during first build
src_filter = -<src/>