Skip to content

Commit

Permalink
Merge branch 'release/v12.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
valeros committed Feb 26, 2021
2 parents 67b4a32 + 2ecdba1 commit bc50032
Show file tree
Hide file tree
Showing 39 changed files with 1,134 additions and 102 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-16.04, windows-latest, macos-latest]
python-version: [2.7, 3.7]
python-version: [3.7]
example:
- "examples/arduino-blink"
- "examples/arduino-external-libs"
Expand Down Expand Up @@ -51,15 +51,10 @@ jobs:
- "examples/zephyr-blink"
- "examples/zephyr-cpp-synchronization"
- "examples/zephyr-drivers-can"
- "examples/zephyr-net-civetweb"
- "examples/zephyr-net-https-client"
- "examples/zephyr-subsys-usb-hid-mouse"
- "tests/arduino-blink-different-cores"
exclude:
- {python-version: 2.7, example: "examples/zephyr-blink"}
- {python-version: 2.7, example: "examples/zephyr-cpp-synchronization"}
- {python-version: 2.7, example: "examples/zephyr-drivers-can"}
- {python-version: 2.7, example: "examples/zephyr-net-https-client"}
- {python-version: 2.7, example: "examples/zephyr-subsys-usb-hid-mouse"}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
Expand Down
36 changes: 36 additions & 0 deletions boards/genericSTM32F373RC.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"build": {
"core": "stm32",
"cpu": "cortex-m4",
"extra_flags": "-DSTM32F3 -DSTM32F373xC",
"f_cpu": "72000000L",
"mcu": "stm32f373rct6",
"product_line": "STM32F373xC"
},
"connectivity": [
"can"
],
"debug": {
"jlink_device": "STM32F373RC",
"openocd_target": "stm32f3x",
"svd_path": "STM32F37x.svd"
},
"frameworks": [
"cmsis",
"stm32cube"
],
"name": "STM32F373RC (32k RAM. 256k Flash)",
"upload": {
"maximum_ram_size": 32768,
"maximum_size": 262144,
"protocol": "stlink",
"protocols": [
"jlink",
"stlink",
"cmsis-dap",
"blackmagic"
]
},
"url": "https://www.st.com/en/microcontrollers/stm32f373rc.html",
"vendor": "Generic"
}
56 changes: 56 additions & 0 deletions boards/genericSTM32F407IGT6.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"build": {
"core": "stm32",
"cpu": "cortex-m4",
"extra_flags": "-DSTM32F407xx -DSTM32F4",
"f_cpu": "168000000L",
"hwids": [
[
"0x1EAF",
"0x0003"
],
[
"0x0483",
"0x3748"
]
],
"mcu": "stm32f407igt6",
"product_line": "STM32F407xx"
},
"debug": {
"default_tools": [
"stlink"
],
"jlink_device": "STM32F407IG",
"openocd_extra_args": [
"-c",
"reset_config none"
],
"openocd_target": "stm32f4x",
"svd_path": "STM32F40x.svd"
},
"frameworks": [
"cmsis",
"stm32cube",
"libopencm3"
],
"name": "STM32F407IG (192k RAM. 1024k Flash)",
"upload": {
"disable_flushing": false,
"maximum_ram_size": 196608,
"maximum_size": 1048576,
"protocol": "stlink",
"protocols": [
"blackmagic",
"dfu",
"jlink",
"serial",
"stlink"
],
"require_upload_port": true,
"use_1200bps_touch": false,
"wait_for_upload_port": false
},
"url": "https://www.st.com/en/microcontrollers-microprocessors/stm32f407ig.html",
"vendor": "Generic"
}
4 changes: 2 additions & 2 deletions boards/genericSTM32F411RE.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
"stm32cube",
"libopencm3"
],
"name": "STM32F411RE (128k RAM. 256k Flash)",
"name": "STM32F411RE (128k RAM. 512k Flash)",
"upload": {
"maximum_ram_size": 131072,
"maximum_size": 262144,
"maximum_size": 524288,
"protocol": "serial",
"protocols": [
"blackmagic",
Expand Down
3 changes: 2 additions & 1 deletion boards/nucleo_f303k8.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
"cmsis",
"mbed",
"stm32cube",
"libopencm3"
"libopencm3",
"zephyr"
],
"name": "ST Nucleo F303K8",
"upload": {
Expand Down
3 changes: 2 additions & 1 deletion boards/nucleo_f410rb.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"cmsis",
"mbed",
"stm32cube",
"libopencm3"
"libopencm3",
"zephyr"
],
"name": "ST Nucleo F410RB",
"upload": {
Expand Down
45 changes: 45 additions & 0 deletions boards/nucleo_h723zg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"build": {
"core": "stm32",
"cpu": "cortex-m7",
"extra_flags": "-DSTM32H7xx -DSTM32H723xx",
"f_cpu": "550000000L",
"mcu": "stm32h723zgt6",
"product_line": "STM32H723xx"
},
"connectivity": [
"can",
"ethernet"
],
"debug": {
"default_tools": [
"stlink"
],
"jlink_device": "STM32H723ZG",
"onboard_tools": [
"stlink"
],
"openocd_target": "stm32h7x",
"svd_path": "STM32H7x3.svd"
},
"frameworks": [
"cmsis",
"stm32cube",
"zephyr"
],
"name": "ST Nucleo H723ZG",
"upload": {
"maximum_ram_size": 442368,
"maximum_size": 1048576,
"protocol": "stlink",
"protocols": [
"blackmagic",
"cmsis-dap",
"jlink",
"stlink",
"mbed"
]
},
"url": "https://www.st.com/en/evaluation-tools/nucleo-h723zg.html",
"vendor": "ST"
}
3 changes: 2 additions & 1 deletion boards/nucleo_l011k4.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"frameworks": [
"cmsis",
"stm32cube",
"libopencm3"
"libopencm3",
"zephyr"
],
"name": "ST Nucleo L011K4",
"upload": {
Expand Down
3 changes: 2 additions & 1 deletion boards/nucleo_l031k6.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"cmsis",
"mbed",
"stm32cube",
"libopencm3"
"libopencm3",
"zephyr"
],
"name": "ST Nucleo L031K6",
"upload": {
Expand Down
3 changes: 2 additions & 1 deletion boards/nucleo_l433rc_p.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
"cmsis",
"mbed",
"stm32cube",
"libopencm3"
"libopencm3",
"zephyr"
],
"name": "ST Nucleo L433RC-P",
"upload": {
Expand Down
21 changes: 10 additions & 11 deletions builder/frameworks/stm32cube.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def build_usb_libs(usb_libs_root):
"flags": ["-I $PROJECT_SRC_DIR", "-I $PROJECT_INCLUDE_DIR"],
"includeDir": "Inc",
"srcDir": "Src",
"srcFilter": ["+<*>", "-<Src/*_template*>"],
"srcFilter": ["+<*>", "-<*_template*>"],
}
}

Expand Down Expand Up @@ -202,6 +202,7 @@ def build_usb_libs(usb_libs_root):
CPPPATH=[
"$PROJECT_SRC_DIR",
"$PROJECT_INCLUDE_DIR",
os.path.join(FRAMEWORK_DIR, "Drivers", "CMSIS", "DSP", "Include"),
os.path.join(FRAMEWORK_DIR, "Drivers", "CMSIS", "Include"),
os.path.join(
FRAMEWORK_DIR,
Expand Down Expand Up @@ -318,16 +319,14 @@ def build_usb_libs(usb_libs_root):
if board.get("build.stm32cube.custom_config_header", "no") == "no":
generate_hal_config_file()

libs.append(
env.BuildLibrary(
os.path.join("$BUILD_DIR", "FrameworkHALDriver"),
os.path.join(
FRAMEWORK_DIR,
"Drivers",
MCU_FAMILY.upper() + "xx_HAL_Driver",
),
src_filter="+<*> -<Src/*_template.c> -<Src/Legacy>",
)
env.BuildSources(
os.path.join("$BUILD_DIR", "FrameworkHALDriver"),
os.path.join(
FRAMEWORK_DIR,
"Drivers",
MCU_FAMILY.upper() + "xx_HAL_Driver",
),
src_filter="+<*> -<Src/*_template.c> -<Src/Legacy>",
)

#
Expand Down
6 changes: 5 additions & 1 deletion builder/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def _jlink_cmd_script(env, source):
UPLOADER="JLink.exe" if system() == "Windows" else "JLinkExe",
UPLOADERFLAGS=[
"-device", board.get("debug", {}).get("jlink_device"),
"-speed", "4000",
"-speed", env.GetProjectOption("debug_speed", "4000"),
"-if", ("jtag" if upload_protocol == "jlink-jtag" else "swd"),
"-autoconnect", "1",
"-NoGui", "1"
Expand Down Expand Up @@ -278,6 +278,10 @@ def __configure_upload_port(env):
]
openocd_args.extend(
debug_tools.get(upload_protocol).get("server").get("arguments", []))
if env.GetProjectOption("debug_speed"):
openocd_args.extend(
["-c", "adapter speed %s" % env.GetProjectOption("debug_speed")]
)
openocd_args.extend([
"-c", "program {$SOURCE} %s verify reset; shutdown;" %
board.get("upload.offset_address", "")
Expand Down
10 changes: 3 additions & 7 deletions examples/arduino-external-libs/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,45 +7,41 @@
; Please visit documentation for the other options and examples
; http://docs.platformio.org/page/projectconf.html

[env]
lib_deps = sparkfun/Sparkfun BMP180

[env:bluepill_f103c8]
platform = ststm32
framework = arduino
board = bluepill_f103c8
lib_deps = BMP180

[env:bluepill_f103c8_128k]
platform = ststm32
framework = arduino
board = bluepill_f103c8_128k
lib_deps = BMP180

[env:maple]
platform = ststm32
framework = arduino
board = maple
lib_deps = BMP180

[env:genericSTM32F103RB]
platform = ststm32
framework = arduino
board = genericSTM32F103RB
lib_deps = BMP180

[env:bluepill_f103c8_stm32_core]
platform = ststm32
framework = arduino
board = bluepill_f103c8
build_flags = -DPIO_FRAMEWORK_ARDUINO_OFFICIAL
lib_deps = BMP180

[env:nucleo_l432kc]
platform = ststm32
board = nucleo_l432kc
framework = arduino
lib_deps = BMP180

[env:nucleo_f401re]
platform = ststm32
board = nucleo_f401re
framework = arduino
lib_deps = BMP180
2 changes: 1 addition & 1 deletion examples/cmsis-blink/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include "stm32f0xx.h"
#define LEDPORT (GPIOC)
#define LED1 (8)
#define ENABLE_GPIO_CLOCK (RCC->APB2ENR |= RCC_AHBENR_GPIOCEN)
#define ENABLE_GPIO_CLOCK (RCC->AHBENR |= RCC_AHBENR_GPIOCEN)
#define _MODER MODER
#define GPIOMODER (GPIO_MODER_MODER8_0)
#elif STM32F1
Expand Down
10 changes: 2 additions & 8 deletions examples/zephyr-blink/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include <devicetree.h>
#include <drivers/gpio.h>


/* 1000 msec = 1 sec */
#define SLEEP_TIME_MS 1000

Expand All @@ -19,25 +18,20 @@
#if DT_NODE_HAS_STATUS(LED0_NODE, okay)
#define LED0 DT_GPIO_LABEL(LED0_NODE, gpios)
#define PIN DT_GPIO_PIN(LED0_NODE, gpios)
#if DT_PHA_HAS_CELL(LED0_NODE, gpios, flags)
#define FLAGS DT_GPIO_FLAGS(LED0_NODE, gpios)
#endif
#else
/* A build error here means your board isn't set up to blink an LED. */
#error "Unsupported board: led0 devicetree alias is not defined"
#define LED0 ""
#define PIN 0
#endif

#ifndef FLAGS
#define FLAGS 0
#endif

void main(void)
{
struct device *dev;
const struct device *dev;
bool led_is_on = true;
int ret = 0;
int ret;

dev = device_get_binding(LED0);
if (dev == NULL) {
Expand Down
Loading

0 comments on commit bc50032

Please sign in to comment.