micro-ROS / micro-ROS/micro_ros_setup

Multiple firmwares in a single ROS2 workspace

Open
#350 3 comments 2 reactions 0 assignees View on GitHub
enhancement
Dominant language
Shell
Stars
509
Forks
183
Avg merge
22h 26m
Merged PRs (30d)
7

Description

Hey,

at the moment I build some custom firmware with the commands:
```
ros2 run micro_ros_setup create_firmware_ws.sh zephyr nucleo_f446re
ros2 run micro_ros_setup configure_firmware.sh foxtech_eh2000 --transport serial
ros2 run micro_ros_setup build_firmware.sh
```

So we have the simple structure:

```
./firmware/APP
./firmware/PLATFORM
./firmware/TRANSPORT
./firmware/build/zephyr/zephyr.elf
./firmware/zephyr_apps/apps/foxtech_eh2000
...
```

However, this does not allow to create multiple firmwares, where each firmware could be built with a different OS/board/transport/app.

I would prefer a structure like this:
```
ros2 run micro_ros_setup create_firmware_ws.sh
ros2 run micro_ros_setup create_firmware.sh eh2000 --os zephyr --board nucleo_f446re
ros2 run micro_ros_setup configure_firmware.sh eh2000 --app foxtech_eh2000 --transport serial
ros2 run micro_ros_setup build_firmware.sh eh2000
ros2 run micro_ros_setup flash_firmware.sh eh2000

ros2 run micro_ros_setup create_firmware.sh second_firmware --os zephyr --board nucleo_f401rc
ros2 run micro_ros_setup configure_firmware.sh second_firmware --app ping_pong --transport serial
ros2 run micro_ros_setup build_firmware.sh second_firmware
ros2 run micro_ros_setup flash_firmware.sh second_firmware
```

->

```
./firmware/firmwares/eh2000/APP
./firmware/firmwares/eh2000/PLATFORM
./firmware/firmwares/eh2000/TRANSPORT
./firmware/firmwares/eh2000/build/zephyr/zephyr.elf
./firmware/firmwares/second_firmware/APP
./firmware/firmwares/second_firmware/PLATFORM
./firmware/firmwares/second_firmware/TRANSPORT
./firmware/firmwares/second_firmware/build/zephyr/zephyr.elf
./firmware/zephyr_apps/apps/foxtech_eh2000
./firmware/zephyr_apps/apps/ping_pong
```

Is that a sane request? Do you have other ideas?

Cheers
David

Contributor guide

Open the contributing guide

Research direction

Review the existing create_firmware_ws.sh, configure_firmware.sh, build_firmware.sh, and flash_firmware.sh entry points and the current firmware directory layout. Define how named firmwares can retain separate OS, board, transport, app, build, and flash settings; the work is done when the two example firmwares can coexist and be built independently.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
build-system, embedded-iot, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.