Skip to content

Commit f1d44bb

Browse files
committed
Merge branch 'stm32duino-master'
2 parents 848b975 + 6bb6f57 commit f1d44bb

File tree

251 files changed

+46235
-5891
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

251 files changed

+46235
-5891
lines changed

CI/build/README.md

Lines changed: 174 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ optional arguments:
2525
-b pattern, --board pattern
2626
pattern to find one or more board(s) to build
2727
-c, --clean clean output directory
28-
<user patch config>/arduinoBuilderOutput
28+
<user path config>/arduinoBuilderOutput
2929
--arch architecture core architecture to build. Default build architecture
3030
is stm32
3131
--config <core configuration file>
@@ -34,14 +34,13 @@ optional arguments:
3434
build, applicability of sketches for boards or
3535
required options. If sketch is not listed then
3636
applicable to all board. Default core configuration is
37-
for 'stm32' architecture in: <user patch config>/arduino-
38-
builder/conf/cores_config.json
37+
for 'stm32' architecture in: conf/cores_config.json
3938
-v, --verbose enable arduino-builder verbose mode
4039
--bin save binaries
4140
--travis Custom configuration for Travis CI build
4241
4342
Sketch(es) options:
44-
By default build <user patch config>/arduino/examples/01.Basics/Blink/Blink.ino
43+
By default build <arduino path>/examples/01.Basics/BareMinimum/BareMinimum.ino
4544
4645
-i <shetch filepath>, --ino <shetch filepath>
4746
single ino file to build
@@ -51,14 +50,182 @@ Sketch(es) options:
5150
pattern to find one or more sketch to build
5251
-e <excluded sketches list filepath>, --exclude <excluded sketches list filepath>
5352
file containing pattern of sketches to ignore. Default
54-
path : <user patch config>/arduino-builder/conf/exclude_list.txt
53+
path : conf/exclude_list.txt
5554
```
5655

5756
## Cores configuration files
5857

59-
ToDo
58+
Script is able to uses a JSON configuration file containing the build configuration for one or more maintainer/architecture.
59+
A default configuration file is provided: [cores_config.json](conf/cores_config.json)
60+
61+
62+
#### Template
63+
```json
64+
{
65+
"cores": [
66+
{
67+
"maintainer": "maintainer/vendor name",
68+
"architecture": "architecture name",
69+
"boards": [
70+
{
71+
"name": "board1",
72+
"options": "specific options for board1 to concatenate with the fqbn"
73+
},
74+
{
75+
"name": "board2",
76+
"fqbn": "Fully Qualified Board Name and options, used instead of generated one"
77+
}
78+
],
79+
"sketches": [
80+
{
81+
"pattern": "sketche(s) pattern",
82+
"applicable": true,
83+
"boards": [ "List of boards (comma separated) which can be built for the sketche(s) pattern. Only those listed board will be built." ],
84+
"options": "specific options to build the matched sketch pattern to concatenate with the fqbn (optional)"
85+
},
86+
{
87+
"pattern": "sketche(s) pattern",
88+
"applicable": false,
89+
"boards": [ "List of boards (comma separated) which cannot be built for the sketche(s) pattern. All others available boards will be built." ]
90+
}
91+
]
92+
},
93+
{
94+
"maintainer": "Other maintainer/vendor name",
95+
"architecture": "Other architecture name",
96+
"boards": [
97+
{
98+
"name": "boardx",
99+
"options": "specific options for board1 to concatenate with the fqbn"
100+
}
101+
],
102+
"sketches": [
103+
{
104+
"pattern": "sketchbook",
105+
"applicable": true,
106+
"boards": [ "" ]
107+
}
108+
]
109+
}
110+
]
111+
}
112+
```
113+
114+
#### Examples
115+
116+
Will add `flash=C8` option to the fqbn of the BLUEPILL_F103C8 board
117+
```json
118+
{
119+
"name": "BLUEPILL_F103C8",
120+
"options": "flash=C8"
121+
}
122+
```
123+
124+
Will ignore `04.Communication/MultiSerial.ino` and `04.Communication/SerialPassthrough.ino`
125+
```json
126+
{
127+
"pattern": "04.Communication/(Multi)?Serial(Passthrough)?",
128+
"applicable": true,
129+
"boards": [ "" ]
130+
}
131+
```
132+
133+
Will build all sketches available in `09.USB/*` for the listed boards and add `usb=HID` option to the fqbn
134+
```json
135+
{
136+
"pattern": "09.USB",
137+
"applicable": true,
138+
"boards": [ "NUCLEO_F429ZI", "DISCO_L475VG_IOT", "DISCO_F407VG" ],
139+
"options": "usb=HID"
140+
}
141+
```
60142

61143
## Usage examples
62144

63-
ToDo
145+
* List all boards containing `F1` or `L4` (not case sensitive):
64146

147+
`python3 arduino-builder.py -l -b "F1|l4"`
148+
149+
Will produce on the [stm32](https://github.com/stm32duino/Arduino_Core_STM32) core:
150+
```
151+
Cores configuration JSON file that will be used: conf/cores_config.json
152+
Build configuration for 'STM32' maintainer and 'stm32' architecture
153+
9 board(s) available
154+
BLUEPILL_F103C8
155+
DISCO_F100RB
156+
DISCO_L475VG_IOT
157+
MAPLEMINI_F103CB
158+
NUCLEO_F103RB
159+
NUCLEO_L432KC
160+
NUCLEO_L476RG
161+
NUCLEO_L496ZG
162+
NUCLEO_L496ZG-P
163+
```
164+
165+
* List all sketch containing `digital` or `analog` (not case sensitive):
166+
167+
`python3 arduino-builder.py -l sketch -s "Digital|analog"`
168+
169+
Will produce on the [stm32](https://github.com/stm32duino/Arduino_Core_STM32) core:
170+
```
171+
Cores configuration JSON file that will be used: conf/cores_config.json
172+
Build configuration for 'STM32' maintainer and 'stm32' architecture
173+
<Arduino path>/examples/01.Basics/AnalogReadSerial/AnalogReadSerial.ino
174+
<Arduino path>/examples/01.Basics/DigitalReadSerial/DigitalReadSerial.ino
175+
<Arduino path>/examples/01.Basics/ReadAnalogVoltage/ReadAnalogVoltage.ino
176+
<Arduino path>/examples/02.Digital/BlinkWithoutDelay/BlinkWithoutDelay.ino
177+
<Arduino path>/examples/02.Digital/Button/Button.ino
178+
<Arduino path>/examples/02.Digital/Debounce/Debounce.ino
179+
<Arduino path>/examples/02.Digital/DigitalInputPullup/DigitalInputPullup.ino
180+
<Arduino path>/examples/02.Digital/StateChangeDetection/StateChangeDetection.ino
181+
<Arduino path>/examples/02.Digital/toneKeyboard/toneKeyboard.ino
182+
<Arduino path>/examples/02.Digital/toneMelody/toneMelody.ino
183+
<Arduino path>/examples/02.Digital/toneMultiple/toneMultiple.ino
184+
<Arduino path>/examples/02.Digital/tonePitchFollower/tonePitchFollower.ino
185+
<Arduino path>/examples/03.Analog/AnalogInOutSerial/AnalogInOutSerial.ino
186+
<Arduino path>/examples/03.Analog/AnalogInput/AnalogInput.ino
187+
<Arduino path>/examples/03.Analog/AnalogWriteMega/AnalogWriteMega.ino
188+
<Arduino path>/examples/03.Analog/Calibration/Calibration.ino
189+
<Arduino path>/examples/03.Analog/Fading/Fading.ino
190+
<Arduino path>/examples/03.Analog/Smoothing/Smoothing.ino
191+
<Arduino path>/examples/10.StarterKit_BasicKit/p08_DigitalHourglass/p08_DigitalHourglass.ino
192+
19 sketches found
193+
```
194+
195+
* Build all sketches containing `digital` or `analog` for all boards containing `F1` or `L4` (not case sensitive):
196+
197+
`python3 arduino-builder.py -s "Digital|analog" -b "F1|l4"`
198+
199+
* List all boards for STM32F1 core:
200+
201+
`python3 arduino-builder.py -l --arch STM32F1`
202+
203+
Will list:
204+
```
205+
Cores configuration JSON file that will be used: conf/cores_config.json
206+
Build configuration for 'Arduino_STM32' maintainer and 'STM32F1' architecture
207+
23 board(s) available
208+
NucleoF103_HSE
209+
NucleoF103_HSI
210+
STM32F103C8
211+
STM32F103CB
212+
STM32F103R8
213+
STM32F103RB
214+
STM32F103RC
215+
STM32F103RE
216+
STM32F103T8
217+
STM32F103TB
218+
STM32F103VB
219+
STM32F103VC
220+
STM32F103VD
221+
STM32F103VE
222+
STM32F103ZC
223+
STM32F103ZD
224+
STM32F103ZE
225+
STM32VLD
226+
hytiny-stm32f103t
227+
maple
228+
mapleMini
229+
mapleRET6
230+
microduino32_flash
231+
```

CI/build/arduino-builder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@
122122

123123
# Default
124124
sketch_default = os.path.join(
125-
arduino_sketchbook_path, "01.Basics", "Blink", "Blink.ino"
125+
arduino_sketchbook_path, "01.Basics", "BareMinimum", "BareMinimum.ino"
126126
)
127127
exclude_file_default = os.path.join("conf", "exclude_list.txt")
128128
cores_config_file_default = os.path.join("conf", "cores_config.json")

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Arduino core support for STM32 based boards
2-
### Latest release [![GitHub release](https://img.shields.io/github/release/stm32duino/Arduino_Core_STM32.svg)](https://github.com/stm32duino/Arduino_Core_STM32/releases/latest) [![GitHub commits](https://img.shields.io/github/commits-since/stm32duino/Arduino_Core_STM32/1.3.0.svg)](https://github.com/stm32duino/Arduino_Core_STM32/compare/1.3.0...master)
2+
[![GitHub release](https://img.shields.io/github/release/stm32duino/Arduino_Core_STM32.svg)](https://github.com/stm32duino/Arduino_Core_STM32/releases/latest)
3+
[![GitHub commits](https://img.shields.io/github/commits-since/stm32duino/Arduino_Core_STM32/1.3.0.svg)](https://github.com/stm32duino/Arduino_Core_STM32/compare/1.3.0...master)
4+
[![Build Status](https://travis-ci.com/stm32duino/Arduino_Core_STM32.svg?branch=master)](https://travis-ci.com/stm32duino/Arduino_Core_STM32)
35

46
**Warning**: release versioning has been changed from date versioning to semantic one. See [Release Versioning change](https://github.com/stm32duino/wiki/wiki/Release-Versioning-change)
57

@@ -63,11 +65,15 @@ For advanced user, you can use the repository: see the [Using git repository](ht
6365
* STM32L4
6466
* [Nucleo L432KC](http://www.st.com/en/evaluation-tools/nucleo-l432kc.html)
6567
* [Nucleo L476RG](http://www.st.com/en/evaluation-tools/nucleo-l476rg.html)
66-
* [NUCLEO-L496ZG](http://www.st.com/en/evaluation-tools/nucleo-l496zg.html)
67-
* [NUCLEO-L496ZG-P](http://www.st.com/en/evaluation-tools/nucleo-l496zg-p.html)
68+
* [Nucleo L496ZG](http://www.st.com/en/evaluation-tools/nucleo-l496zg.html)
69+
* [Nucleo L496ZG-P](http://www.st.com/en/evaluation-tools/nucleo-l496zg-p.html)
6870
* [B-L475E-IOT01A](http://www.st.com/en/evaluation-tools/b-l475e-iot01a.html)
6971

7072
### Next release
73+
* STM32L4
74+
* [Nucleo L4R5ZI](http://www.st.com/en/evaluation-tools/nucleo-l4r5zi.html)
75+
* [Nucleo L4R5ZI-P](http://www.st.com/en/evaluation-tools/nucleo-l4r5zi-p.html)
76+
7177

7278

7379
## Troubleshooting

boards.txt

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,30 @@ Nucleo_144.menu.pnum.NUCLEO_L496ZG-P.build.product_line=STM32F767xx
8585
Nucleo_144.menu.pnum.NUCLEO_L496ZG-P.build.variant=NUCLEO_F767ZI
8686
Nucleo_144.menu.pnum.NUCLEO_L496ZG-P.build.cmsis_lib_gcc=arm_cortexM7l_math
8787

88+
# NUCLEO_L4R5ZI board
89+
Nucleo_144.menu.pnum.NUCLEO_L4R5ZI=Nucleo L4R5ZI
90+
Nucleo_144.menu.pnum.NUCLEO_L4R5ZI.node=NODE_L4R5ZI
91+
Nucleo_144.menu.pnum.NUCLEO_L4R5ZI.upload.maximum_size=2097152
92+
Nucleo_144.menu.pnum.NUCLEO_L4R5ZI.upload.maximum_data_size=655360
93+
Nucleo_144.menu.pnum.NUCLEO_L4R5ZI.build.mcu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard
94+
Nucleo_144.menu.pnum.NUCLEO_L4R5ZI.build.board=NUCLEO_L4R5ZI
95+
Nucleo_144.menu.pnum.NUCLEO_L4R5ZI.build.series=STM32L4xx
96+
Nucleo_144.menu.pnum.NUCLEO_L4R5ZI.build.product_line=STM32L4R5xx
97+
Nucleo_144.menu.pnum.NUCLEO_L4R5ZI.build.variant=NUCLEO_L4R5ZI
98+
Nucleo_144.menu.pnum.NUCLEO_L4R5ZI.build.cmsis_lib_gcc=arm_cortexM4l_math
99+
100+
# NUCLEO_L4R5ZI-P board
101+
Nucleo_144.menu.pnum.NUCLEO_L4R5ZI-P=Nucleo L4R5ZI-P
102+
Nucleo_144.menu.pnum.NUCLEO_L4R5ZI-P.node=NODE_L4R5ZI
103+
Nucleo_144.menu.pnum.NUCLEO_L4R5ZI-P.upload.maximum_size=2097152
104+
Nucleo_144.menu.pnum.NUCLEO_L4R5ZI-P.upload.maximum_data_size=655360
105+
Nucleo_144.menu.pnum.NUCLEO_L4R5ZI-P.build.mcu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard
106+
Nucleo_144.menu.pnum.NUCLEO_L4R5ZI-P.build.board=NUCLEO_L4R5ZI_P
107+
Nucleo_144.menu.pnum.NUCLEO_L4R5ZI-P.build.series=STM32L4xx
108+
Nucleo_144.menu.pnum.NUCLEO_L4R5ZI-P.build.product_line=STM32L4R5xx
109+
Nucleo_144.menu.pnum.NUCLEO_L4R5ZI-P.build.variant=NUCLEO_L4R5ZI
110+
Nucleo_144.menu.pnum.NUCLEO_L4R5ZI-P.build.cmsis_lib_gcc=arm_cortexM4l_math
111+
88112
# Upload menu
89113
Nucleo_144.menu.upload_method.MassStorage=Mass Storage
90114
Nucleo_144.menu.upload_method.MassStorage.upload.protocol=

cores/arduino/stm32/HAL/stm32yyxx_hal.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#include "stm32_def_build.h"
2-
31
#ifdef STM32F0xx
42
#include "stm32f0xx_hal.c"
53
#endif

cores/arduino/stm32/HAL/stm32yyxx_hal_adc.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#include "stm32_def_build.h"
2-
31
#ifdef STM32F0xx
42
#include "stm32f0xx_hal_adc.c"
53
#endif

cores/arduino/stm32/HAL/stm32yyxx_hal_adc_ex.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#include "stm32_def_build.h"
2-
31
#ifdef STM32F0xx
42
#include "stm32f0xx_hal_adc_ex.c"
53
#endif

cores/arduino/stm32/HAL/stm32yyxx_hal_can.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#include "stm32_def_build.h"
2-
31
#ifdef STM32F0xx
42
#include "stm32f0xx_hal_can.c"
53
#endif

cores/arduino/stm32/HAL/stm32yyxx_hal_cec.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#include "stm32_def_build.h"
2-
31
#ifdef STM32F0xx
42
#include "stm32f0xx_hal_cec.c"
53
#endif

cores/arduino/stm32/HAL/stm32yyxx_hal_comp.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#include "stm32_def_build.h"
2-
31
#ifdef STM32F0xx
42
#include "stm32f0xx_hal_comp.c"
53
#endif
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#include "stm32_def_build.h"
2-
31
#ifdef STM32L0xx
42
#include "stm32l0xx_hal_comp_ex.c"
53
#endif

cores/arduino/stm32/HAL/stm32yyxx_hal_cortex.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#include "stm32_def_build.h"
2-
31
#ifdef STM32F0xx
42
#include "stm32f0xx_hal_cortex.c"
53
#endif

cores/arduino/stm32/HAL/stm32yyxx_hal_crc.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#include "stm32_def_build.h"
2-
31
#ifdef STM32F0xx
42
#include "stm32f0xx_hal_crc.c"
53
#endif

cores/arduino/stm32/HAL/stm32yyxx_hal_crc_ex.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#include "stm32_def_build.h"
2-
31
#ifdef STM32F0xx
42
#include "stm32f0xx_hal_crc_ex.c"
53
#endif

cores/arduino/stm32/HAL/stm32yyxx_hal_cryp.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#include "stm32_def_build.h"
2-
31
#ifdef STM32F2xx
42
#include "stm32f2xx_hal_cryp.c"
53
#endif

cores/arduino/stm32/HAL/stm32yyxx_hal_cryp_ex.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#include "stm32_def_build.h"
2-
31
#ifdef STM32F4xx
42
#include "stm32f4xx_hal_cryp_ex.c"
53
#endif

cores/arduino/stm32/HAL/stm32yyxx_hal_dac.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#include "stm32_def_build.h"
2-
31
#ifdef STM32F0xx
42
#include "stm32f0xx_hal_dac.c"
53
#endif

cores/arduino/stm32/HAL/stm32yyxx_hal_dac_ex.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#include "stm32_def_build.h"
2-
31
#ifdef STM32F0xx
42
#include "stm32f0xx_hal_dac_ex.c"
53
#endif

cores/arduino/stm32/HAL/stm32yyxx_hal_dcmi.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#include "stm32_def_build.h"
2-
31
#ifdef STM32F2xx
42
#include "stm32f2xx_hal_dcmi.c"
53
#endif

cores/arduino/stm32/HAL/stm32yyxx_hal_dcmi_ex.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#include "stm32_def_build.h"
2-
31
#ifdef STM32F4xx
42
#include "stm32f4xx_hal_dcmi_ex.c"
53
#endif

cores/arduino/stm32/HAL/stm32yyxx_hal_dfsdm.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#include "stm32_def_build.h"
2-
31
#ifdef STM32F4xx
42
#include "stm32f4xx_hal_dfsdm.c"
53
#endif
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#include "stm32_def_build.h"
2-
31
#ifdef STM32L4xx
42
#include "stm32l4xx_hal_dfsdm_ex.c"
53
#endif

cores/arduino/stm32/HAL/stm32yyxx_hal_dma.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#include "stm32_def_build.h"
2-
31
#ifdef STM32F0xx
42
#include "stm32f0xx_hal_dma.c"
53
#endif

cores/arduino/stm32/HAL/stm32yyxx_hal_dma2d.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#include "stm32_def_build.h"
2-
31
#ifdef STM32F4xx
42
#include "stm32f4xx_hal_dma2d.c"
53
#endif

0 commit comments

Comments
 (0)