Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add stm32cube framework #45

Draft
wants to merge 25 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
cf3c636
Add stm32cube framework
bjsowa Jul 25, 2022
a1bb2d7
Add stm32cube serial transport
bjsowa Jul 26, 2022
a27c890
Allow nonblocking read
bjsowa Jul 26, 2022
f33a16e
Add some comments
bjsowa Jul 26, 2022
35fbb64
Don't wait until len bytes of data is available to read
bjsowa Jul 26, 2022
e77c93b
Merge remote-tracking branch 'origin/main' into stm32cube
bjsowa Aug 1, 2022
09be1ec
Move arduino CI package into subdirectory
bjsowa Aug 3, 2022
a114a71
Make the transport header compatible with C language
bjsowa Aug 3, 2022
3fdcc1c
Add example project for stm32cube framework
bjsowa Aug 3, 2022
ad2ba7c
Update CI workflow
bjsowa Aug 3, 2022
4fecbf7
Remove vscode artifacts
bjsowa Aug 3, 2022
2975d2f
Install and use CubeMX to generate code
bjsowa Aug 4, 2022
8828f03
Uncomment arduino ci job
bjsowa Aug 4, 2022
1d6a755
Allow setting buffer sizes that are not a power of 2
bjsowa Aug 4, 2022
44da965
Freeze ststm32 platform package version
bjsowa Aug 4, 2022
d7bbc0a
Update .github/workflows/ci.yml
bjsowa Aug 26, 2022
6dee3d2
Ignore vscode configuration
bjsowa Sep 2, 2022
9399a57
Don't include HAL libraries in clock_gettime
bjsowa Sep 2, 2022
b77f752
Create example project on nucleo-f103rb board
bjsowa Sep 2, 2022
0fa7672
Update CI to use new pio environment
bjsowa Sep 2, 2022
2e49658
Fix issues with clock_gettime implementation
bjsowa Sep 20, 2022
d5a0592
Add nucleo_767zi example to CI
bjsowa Sep 22, 2022
5552498
Set default colcon metas for nucleo boards
bjsowa Sep 22, 2022
a69ff65
Add nucleo board to supported boards
bjsowa Sep 22, 2022
19eabda
Merge remote-tracking branch 'microros/main' into stm32cube
bjsowa Oct 10, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
119 changes: 97 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,105 @@
name: CI

on:
pull_request:
branches:
- '**'
workflow_dispatch:
pull_request:
branches:
- "**"

jobs:
micro_ros_platformio_arduino:
runs-on: ubuntu-20.04
container: ubuntu:20.04

micro_ros_platformio:
runs-on: ubuntu-20.04
container: ubuntu:20.04
strategy:
fail-fast: false
matrix:
pio-environment:
- teensy41
bjsowa marked this conversation as resolved.
Show resolved Hide resolved
- teensy40
- teensy36
- teensy35
- teensy31
- due
- zero
- olimex_e407
- esp32dev
- nanorp2040connect
- portenta_h7_m7
- teensy41_eth
- nanorp2040connect_wifi
- portenta_h7_m7_wifi
- esp32dev_wifi
- portenta_h7_m7_galactic
- portenta_h7_m7_foxy
- portenta_h7_m7_rolling
- teensy41_custom
- pico

strategy:
fail-fast: false
matrix:
platform: [teensy41, teensy40, teensy36, teensy35, teensy31, due, zero, olimex_e407, esp32dev, nanorp2040connect, portenta_h7_m7, teensy41_eth, nanorp2040connect_wifi, portenta_h7_m7_wifi, esp32dev_wifi, portenta_h7_m7_galactic, portenta_h7_m7_foxy, portenta_h7_m7_rolling, teensy41_custom, pico]
steps:
- uses: actions/checkout@v3
with:
path: repo
- name: Install environment
uses: ./repo/.github/actions/platformio-env
- name: Build
shell: bash
run: |
export PATH=$PATH:~/.platformio/penv/bin
cd repo/ci/arduino
pio run -e ${{ matrix.pio-environment }}

steps:
- uses: actions/checkout@v3
with:
path: repo
- name: Install environment
uses: ./repo/.github/actions/platformio-env
- name: Build
shell: bash
run: |
export PATH=$PATH:~/.platformio/penv/bin
cd repo/ci
pio run -e ${{ matrix.platform }}
micro_ros_platformio_stm32cube:
runs-on: ubuntu-20.04
container: ubuntu:20.04

strategy:
fail-fast: false
matrix:
pio-environment:
- nucleo_f103rb
- nucleo_f767zi

steps:
- uses: actions/checkout@v3
with:
path: repo
- name: Install STM32CubeMX
env:
CUBEMX_LINK: http://files.fictionlab.pl/en.stm32cubemx-lin_v6-3-0.zip
run: |
apt update
export DEBIAN_FRONTEND=noninteractive
apt install -y wget unzip python3-pip expect fontconfig xvfb libxrender1 libxtst6 libxi6
wget -q -O cubemx.zip $CUBEMX_LINK
unzip -q cubemx.zip -d cubemx
expect -f - <<EOF
set timeout 30
spawn ./cubemx/SetupSTM32CubeMX-6.3.0 -console
expect -exact "Press 1 to continue, 2 to quit, 3 to redisplay\r"
send -- "1\r"
expect -exact "Press Enter to continue, X to exit\r"
send -- "\r"
expect -exact "Press 1 to accept, 2 to reject, 3 to redisplay\r"
send -- "1\r"
expect -exact "Press Enter to continue, X to exit\r"
send -- "\r"
expect -exact "Press 1 to accept, 2 to reject, anything else to redisplay\r"
send -- "2\r"
expect -exact "Select target path \[/usr/local/STMicroelectronics/STM32Cube/STM32CubeMX\] \r"
send -- "\r"
expect -exact "Enter Y for Yes, N for No: \r"
send -- "N\r"
expect eof
EOF
pip3 install stm32pio
- name: Install environment
uses: ./repo/.github/actions/platformio-env
- name: Build
shell: bash
run: |
export PATH=$PATH:~/.platformio/penv/bin
cd repo/ci/stm32cube
cp ioc/${{ matrix.pio-environment }}.ioc .
xvfb-run --auto-servernum stm32pio -v generate
pio run -e ${{ matrix.pio-environment }}
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ Supported boards are:
| `esp32dev` | `espressif32` | `arduino` | `serial` <br/> `wifi` | `colcon.meta` |
| `nanorp2040connect` | `raspberrypi` | `arduino` | `serial` <br/> `wifi_nina` | `colcon_verylowmem.meta` |
| `pico` | `raspberrypi` | `arduino` | `serial` | `colcon.meta`|
| `nucleo_f103rb` | `ststm32` | `stm32cube` | `serial` | `colcon_verylowmem.meta` |
| `nucleo_f767zi` | `ststm32` | `stm32cube` | `serial` | `colcon.meta`|

The community is encouraged to open pull request with custom use cases.

Expand Down
File renamed without changes.
File renamed without changes.
40 changes: 20 additions & 20 deletions ci/platformio.ini → ci/arduino/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ framework = arduino
board_microros_transport = serial
board_microros_distro = galactic
lib_deps =
../
../../

; Foxy test
[env:portenta_h7_m7_foxy]
Expand All @@ -16,7 +16,7 @@ framework = arduino
board_microros_transport = serial
board_microros_distro = foxy
lib_deps =
../
../../

; Rolling test
[env:portenta_h7_m7_rolling]
Expand All @@ -26,7 +26,7 @@ framework = arduino
board_microros_transport = serial
board_microros_distro = rolling
lib_deps =
../
../../

; Serial platforms

Expand All @@ -36,79 +36,79 @@ board = portenta_h7_m7
framework = arduino
board_microros_transport = serial
lib_deps =
../
../../

[env:teensy41]
platform = teensy
board = teensy41
framework = arduino
board_microros_transport = serial
lib_deps =
../
../../

[env:teensy40]
platform = teensy
board = teensy40
framework = arduino
board_microros_transport = serial
lib_deps =
../
../../

[env:teensy36]
platform = teensy
board = teensy36
framework = arduino
board_microros_transport = serial
lib_deps =
../
../../

[env:teensy35]
platform = teensy
board = teensy35
framework = arduino
board_microros_transport = serial
lib_deps =
../
../../

[env:teensy31]
platform = teensy
board = teensy31
framework = arduino
board_microros_transport = serial
lib_deps =
../
../../

[env:due]
platform = atmelsam
board = due
framework = arduino
board_microros_transport = serial
lib_deps =
../
../../

[env:zero]
platform = atmelsam
board = zero
framework = arduino
board_microros_transport = serial
lib_deps =
../
../../

[env:olimex_e407]
platform = ststm32
board = olimex_e407
framework = arduino
board_microros_transport = serial
lib_deps =
../
../../

[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
board_microros_transport = serial
lib_deps =
../
../../

[env:nanorp2040connect]
platform = raspberrypi
Expand All @@ -117,7 +117,7 @@ framework = arduino
lib_ldf_mode = chain+
board_microros_transport = serial
lib_deps =
../
../../

[env:pico]
platform = raspberrypi
Expand All @@ -126,7 +126,7 @@ framework = arduino
lib_ldf_mode = chain+
board_microros_transport = serial
lib_deps =
../
../../

; Ethernet platforms

Expand All @@ -136,7 +136,7 @@ board = teensy41
framework = arduino
board_microros_transport = native_ethernet
lib_deps =
../
../../

; WiFi platforms

Expand All @@ -146,15 +146,15 @@ board = portenta_h7_m7
framework = arduino
board_microros_transport = wifi
lib_deps =
../
../../

[env:esp32dev_wifi]
platform = espressif32
board = esp32dev
framework = arduino
board_microros_transport = wifi
lib_deps =
../
../../

[env:nanorp2040connect_wifi]
platform = raspberrypi
Expand All @@ -163,7 +163,7 @@ framework = arduino
board_microros_transport = wifi_nina
lib_deps =
arduino-libraries/WiFiNINA@^1.8.13
../
../../

; Custom transports

Expand All @@ -173,4 +173,4 @@ board = teensy41
framework = arduino
board_microros_transport = custom
lib_deps =
../
../../
File renamed without changes.
2 changes: 2 additions & 0 deletions ci/stm32cube/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.pio
.vscode
Loading