forked from lupyuen/bluepill-bootloader
-
Notifications
You must be signed in to change notification settings - Fork 1
/
platformio.ini
78 lines (74 loc) · 2.85 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
; 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
[platformio]
default_envs =
bluepill_f103c8_bootloader
bluepill_f103c8_firmware
[common_env_data]
platform = ststm32
board = bluepill_f103c8
framework = libopencm3
lib_ldf_mode = chain+
src_filter =
+<stm32f103/*.c>
+<stm32f103/*.h>
lib_extra_dirs = stm32
build_flags =
-I src/stm32f103
-I src/stm32f103/generic
-D UF2_FAMILY=0x5ee21072
-D HAVE_LED=1 -D LED_GPIO_PORT=GPIOC -D LED_GPIO_PIN=GPIO13 -D LED_OPEN_DRAIN=1 -D USES_GPIOC=1
-D LIBOPENCM3_RCC_LEGACY
-D TOOLCHAIN_GCC_ARM -D TOOLCHAIN_GCC
-D DEVICE_I2C_ASYNCH=1 -D DEVICE_I2CSLAVE=1 -D DEVICE_PORTOUT=1 -D DEVICE_PORTINOUT=1 -D TARGET_STM32F1
-D DEVICE_RTC=1 -D TOOLCHAIN_object -D DEVICE_SERIAL_ASYNCH=1 -D __CMSIS_RTOS -D TOOLCHAIN_GCC
-D DEVICE_CAN=1 -D TARGET_LIKE_CORTEX_M3 -D TARGET_GENERIC_F103RE -D ARM_MATH_CM3 -D TARGET_UVISOR_UNSUPPORTED
-D TARGET_M3 -D DEVICE_SERIAL=1 -D DEVICE_SPI_ASYNCH=1 -D DEVICE_INTERRUPTIN=1 -D TARGET_CORTEX
-D DEVICE_I2C=1 -D TRANSACTION_QUEUE_SIZE_SPI=2 -D __CORTEX_M3 -D DEVICE_STDIO_MESSAGES=1
-D TARGET_FAMILY_STM32 -D TARGET_RELEASE -D TARGET_STM -D DEVICE_SERIAL_FC=1 -D DEVICE_PORTIN=1
-D DEVICE_SLEEP=1 -D TOOLCHAIN_GCC_ARM -D DEVICE_SPI=1 -D DEVICE_SPISLAVE=1 -D DEVICE_ANALOGIN=1
-D DEVICE_PWMOUT=1 -D DEVICE_FLASH=1 -D TARGET_STM32F103C8 -D TARGET_CORTEX_M
-std=c++11 -fwrapv -fno-rtti -fno-threadsafe-statics -fno-exceptions -fno-unwind-tables
-Wl,--print-memory-usage
-Wl,--gc-sections -Wl,--sort-common -Wl,--sort-section=alignment -Wno-array-bounds
-Wl,--no-wchar-size-warning -Wl,--gc-sections -Wl,--wrap,exit -Wl,--wrap,atexit
-mcpu=cortex-m3 -mthumb
[env:bluepill_f103c8_bootloader]
platform = ${common_env_data.platform}
board = ${common_env_data.board}
framework = ${common_env_data.framework}
lib_ldf_mode = ${common_env_data.lib_ldf_mode}
lib_extra_dirs = ${common_env_data.lib_extra_dirs}
src_filter =
+<*.c>
+<*.h>
+<stm32f103/generic/*.c>
+<stm32f103/generic/*.h>
${common_env_data.src_filter}
build_flags =
-Wl,-Map,bootloader.map
${common_env_data.build_flags}
[env:bluepill_f103c8_firmware]
platform = ${common_env_data.platform}
board = ${common_env_data.board}
framework = ${common_env_data.framework}
lib_ldf_mode = ${common_env_data.lib_ldf_mode}
lib_extra_dirs = ${common_env_data.lib_extra_dirs}
src_filter =
+<blink/*.c>
+<blink/*.h>
+<blink/*.ld>
${common_env_data.src_filter}
build_flags =
-Wl,-Tsrc/blink/stm32f103x8.ld
-L $PIOHOME_DIR/packages/framework-libopencm3/lib/stm32/f1
-Wl,-Map,firmware.map
${common_env_data.build_flags}
extra_scripts = scripts/build_script.py