forked from lancaster-university/codal-mbed
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathplatformio.ini
116 lines (112 loc) · 6.82 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
; PlatformIO Project Configuration File: Build, Upload, Library and Advanced Options
; http://docs.platformio.org/page/projectconf.html
[platformio]
; Default build for STM32 Blue Pill.
env_default = bluepill_f103c8
; Build settings for STM32 Blue Pill.
[env:bluepill_f103c8]
platform = ststm32
board = bluepill_f103c8
framework = libopencm3
; Enable Arm Semihosting in debugger to show logs.
debug_extra_cmds =
monitor arm semihosting enable
set remotetimeout 100000
break reset_handler
; Find dependencies
lib_ldf_mode = chain
; Force BME280 library to be used even though it's for Arduino.
lib_compat_mode = off
; Path to platform-specific libraries.
lib_extra_dirs = stm32
; Extra libraries to be linked
lib_deps =
logger
bluepill
baseloader
bootloader
hal
unity
qfplib
nano-float
newlib
model
cm
unittest
; Exclude the standard C and C++ libraries. We will use newlib and nano-float.
build_unflags = -lc -lgcc -lm -lstdc++ -lnosys
; Extended options for Codal build. Removed -Wl,--wrap,exit -Wl,--wrap,atexit
; CortexContextSwitch: On PlatformIO, assembling CortexContextSwitch.s gives error "arm-none-eabi-as: unrecognized option `-x'". We use the CortexContextSwitch.s.o compiled from Codal.
; LIBOPENCM3_RCC_LEGACY: In stm32/bluepill/timer.cpp, setting LIBOPENCM3_RCC_LEGACY will select the older HSE (PlatformIO) instead of newer RCC_HSE (Codal).
; TOOLCHAIN_GCC_ARM and TOOLCHAIN_GCC needed to avoid demangler: https://os.mbed.com/forum/platform-32-ST-Nucleo-L152RE-community/topic/4802/?page=2#comment-25593
; -nostdlib: Don't use standard C library. Use newlib instead.
; -Wl,-Map: Generate linker map in output.map.
; TODO: Sync with https://github.com/lupyuen/newlib/blob/master/CMakeLists.txt
build_flags =
; Enable debugger.
-g
; Exclude the standard C and C++ libraries. We will use newlib and nano-float.
-nostdlib
; Define impure_data as weak so that we won't have a 1KB impure buffer. See lib/newlib/newlib/libc/reent/impure.c
; -D__ATTRIBUTE_IMPURE_DATA__=__attribute__\\(\\(weak\\)\\)
; -D__ATTRIBUTE_IMPURE_PTR__=__attribute__\\(\\(weak\\)\\)
; Unit test. Comment this line to disable.
; -D UNIT_TEST -lgcc
-D UNITY_FLOAT_PRECISION=0.000001 -D UNITY_DOUBLE_PRECISION=0.000001
-D UNITY_OUTPUT_CHAR=unity_output_char -D UNITY_INCLUDE_DOUBLE -D UNITY_EXCLUDE_SETJMP_H -D UNITY_EXCLUDE_MATH_H
; Use libgcc.a: -Wl,-wrap,__aeabi_d2f
; -Wl,-wrap,__aeabi_d2iz
; -Wl,-wrap,__aeabi_d2uiz
; Use libgcc.a: -Wl,-wrap,__aeabi_dadd
; -Wl,-wrap,__aeabi_dcmpeq
; -Wl,-wrap,__aeabi_dcmpge
; -Wl,-wrap,__aeabi_dcmpgt
; -Wl,-wrap,__aeabi_dcmple
; -Wl,-wrap,__aeabi_dcmplt
; -Wl,-wrap,__aeabi_dcmpun
; -Wl,-wrap,__aeabi_ddiv
; -Wl,-wrap,__aeabi_dmul
; Use libgcc.a: -Wl,-wrap,__aeabi_dsub
; Use libgcc.a: -Wl,-wrap,__aeabi_f2d
; -Wl,-wrap,__aeabi_fdiv
; Use libgcc.a: -Wl,-wrap,__aeabi_i2d
; Use libgcc.a: -Wl,-wrap,__aeabi_ui2d
; Use libgcc.a: -Wl,-wrap,__powidf2
-D LIBOPENCM3_RCC_LEGACY
-D TOOLCHAIN_GCC_ARM -D TOOLCHAIN_GCC -D TOOLCHAIN_object
-D FooBar
-D TARGET_STM32F103C8 -D TARGET_GENERIC_F103RE -D TARGET_STM32F1 -D TARGET_FAMILY_STM32 -D TARGET_STM
-D TARGET_LIKE_CORTEX_M3 -D TARGET_M3 -D __CORTEX_M3 -D TARGET_CORTEX_M -D TARGET_CORTEX -D ARM_MATH_CM3
-D TARGET_RELEASE -D TARGET_UVISOR_UNSUPPORTED -D __CMSIS_RTOS
-D DEVICE_I2C_ASYNCH=1 -D DEVICE_I2CSLAVE=1 -D DEVICE_PORTOUT=1 -D DEVICE_PORTINOUT=1
-D DEVICE_RTC=1 -D DEVICE_SERIAL_ASYNCH=1 -D DEVICE_CAN=1
-D DEVICE_SERIAL=1 -D DEVICE_SPI_ASYNCH=1 -D DEVICE_INTERRUPTIN=1
-D DEVICE_I2C=1 -D TRANSACTION_QUEUE_SIZE_SPI=2 -D DEVICE_STDIO_MESSAGES=1
-D DEVICE_SERIAL_FC=1 -D DEVICE_PORTIN=1 -D DEVICE_SLEEP=1 -D DEVICE_SPI=1 -D DEVICE_SPISLAVE=1
-D DEVICE_ANALOGIN=1 -D DEVICE_PWMOUT=1 -D DEVICE_FLASH=1
-I stm32
-std=c++11 -fwrapv -fno-rtti -fno-threadsafe-statics -fno-exceptions -fno-unwind-tables
-Wl,-Tld/stm32f103x8.ld
-Wl,asm/CortexContextSwitch.s.o
-Wl,-Map,output.map,--print-memory-usage
-Wl,--gc-sections -Wl,--sort-common -Wl,--sort-section=alignment -Wno-array-bounds
-Wl,--no-wchar-size-warning -Wl,--gc-sections
-mcpu=cortex-m3 -mthumb
; --verbose -Wl,--verbose
; Actual build flags:
; arm-none-eabi-g++ -o .pioenvs\bluepill_f103c8\src\main.o -c -std=c++11
; -fno-rtti -fno-exceptions -nostdlib -fwrapv -fno-rtti -fno-threadsafe-statics -fno-exceptions -fno-unwind-tables
; -Wno-array-bounds -mcpu=cortex-m3 -mthumb -Os
; -ffunction-sections -fdata-sections -Wall -mthumb -nostdlib
; -mcpu=cortex-m3 -DPLATFORMIO=30603 -DSTM32F1 -DSTM32F103xB
; -DLIBOPENCM3_RCC_LEGACY -DTOOLCHAIN_GCC_ARM -DTOOLCHAIN_GCC -DTOOLCHAIN_object -DFooBar -DTARGET_STM32F103C8 -DTARGET_GENERIC_F103RE -DTARGET_STM32F1 -DTARGET_FAMILY_STM32 -DTARGET_STM -DTARGET_LIKE_CORTEX_M3 -DTARGET_M3 -D__CORTEX_M3 -DTARGET_CORTEX_M -DTARGET_CORTEX -DARM_MATH_CM3 -DTARGET_RELEASE -DTARGET_UVISOR_UNSUPPORTED -D__CMSIS_RTOS -DDEVICE_I2C_ASYNCH=1 -DDEVICE_I2CSLAVE=1 -DDEVICE_PORTOUT=1 -DDEVICE_PORTINOUT=1 -DDEVICE_RTC=1 -DDEVICE_SERIAL_ASYNCH=1 -DDEVICE_CAN=1 -DDEVICE_SERIAL=1 -DDEVICE_SPI_ASYNCH=1 -DDEVICE_INTERRUPTIN=1 -DDEVICE_I2C=1 -DTRANSACTION_QUEUE_SIZE_SPI=2 -DDEVICE_STDIO_MESSAGES=1 -DDEVICE_SERIAL_FC=1 -DDEVICE_PORTIN=1 -DDEVICE_SLEEP=1 -DDEVICE_SPI=1 -DDEVICE_SPISLAVE=1 -DDEVICE_ANALOGIN=1 -DDEVICE_PWMOUT=1 -DDEVICE_FLASH=1 -DF_CPU=72000000L -DSTM32F103XB
; -Istm32\uartint -Istm32\adcint -Ilib\BME280\src -Istm32\porting -Istm32\simulator -Istm32\spiint -Istm32\i2cint -Istm32\cm -Ilib\codal-core -Ilib\codal-core\inc -Ilib\codal-core\inc\core -Ilib\codal-core\inc\driver-models -Ilib\codal-core\inc\drivers -Ilib\codal-core\inc\streams -Ilib\codal-core\inc\types -Ilib\codal-core\inc\JACDAC -Istm32\bluepill -Ilib\newlib -Ilib\newlib\include -Ilib\newlib\newlib\libc\ctype -Ilib\boost_lockfree\src -Ilib\boost_parameter\src -Ilib\boost_iterator\src -Ilib\boost_mpl\src -Ilib\boost_predef\src -Ilib\boost_utility\src -Ilib\boost_detail\src -Ilib\boost_preprocessor\src -Ilib\boost_type_traits\src -Ilib\boost_static_assert\src -Ilib\boost_core\src -Ilib\boost_assert\src -Ilib\boost_config\src -Istm32\logger -Ilib\cocoOS_5.0.3\src -Ilib\cocoOS_5.0.3\inc
; -Isrc -IC:\users\guppy\.platformio\packages\framework-libopencm3 -IC:\users\guppy\.platformio\packages\framework-libopencm3\include
; src\main.cpp
; Actual linker flags:
; arm-none-eabi-g++ -o .pioenvs\bluepill_f103c8\firmware.elf -T C:\Users\guppy\.platformio\packages\framework-libopencm3\lib\stm32\f1\stm32f103x8.ld
; -Wl,asm/CortexContextSwitch.s.o -Wl,-Map,output.map,--print-memory-usage -Wl,--gc-sections -Wl,--sort-common -Wl,--sort-section=alignment
; -Wl,--no-wchar-size-warning -Wl,--gc-sections -Wl,--wrap,exit -Wl,--wrap,atexit -Os -Wl,--gc-sections,--relax
; -mthumb -nostartfiles -nostdlib -mcpu=cortex-m3
; -lc -lgcc -lm -lstdc++ -lnosys
; -Wl,--end-group