Skip to content

Commit 225b4e8

Browse files
committed
Update the README.md with the new automatic workflow
1 parent 132624c commit 225b4e8

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

README.md

+14-12
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ The most important components of this project are:
9292
* [LLEXT](https://docs.zephyrproject.org/latest/services/llext/index.html)
9393
* [Actual core](/cores/arduino) with [variants](/variants) and the usual `{platform,boards}.txt`
9494
* [ArduinoCore-API](https://github.com/arduino/ArduinoCore-API)
95-
* [post_build_tool](/extra/post_build_tool)
95+
* [zephyr-sketch-tool](/extra/zephyr-sketch-tool)
9696

9797
## 🛠️ Setup the environment
9898

@@ -154,29 +154,31 @@ If the board is fully supported by Zephyr, you can flash the firmware directly o
154154
```bash
155155
west flash
156156
```
157+
This can also be performed via the "Burn bootloader" action in the IDE if the core is properly installed, as detailed below.
157158

158159
### Using the Core in Arduino IDE/CLI
159160

160-
After running the `bootstrap` script, you can symlink the core to `$sketchbook/hardware/arduino-git/zephyr`. Once linked, it will appear in the IDE/CLI, and the board's Fully Qualified Board Name (FQBN) will be formatted as `arduino-git:zephyr:name_from_boards_txt`.
161+
After running the `bootstrap.sh` script, you can symlink the core to `$sketchbook/hardware/arduino-git/zephyr`. Once linked, it will appear in the IDE/CLI, and the board's Fully Qualified Board Name (FQBN) will be formatted as `arduino-git:zephyr:name_from_boards_txt`.
161162

162163
### Using the Core in Arduino IDE/CLI (without installing Zephyr toolchain)
163164

164165
To help core developers (who might not be interested at all in setting up a full Zephyr build system) we are providing [sync-zephyr-artifacts](/extra/sync-zephyr-artifacts) utility. After compiling it via `go build`, run as `sync-zephyr-artifacts .` to retrieve the files needed to compile sketches and flash the loader.
165166

166-
## 🚀 Adding a new target
167+
### 🚀 Adding a new target
167168

168-
To add a new board that is already supported by mainline Zephyr, follow these steps:
169+
To add a new board that is already supported by mainline Zephyr with the target `$your_board`, follow these steps:
169170

170-
* Create the `DTS overlay` and `.conf` files in the [loader](/loader/boards) directory.
171+
* Get the variant name from your board by running `extra/get_variant_name.sh $your_board`.
172+
* Create a folder in the [`variants/`](/variants) directory with the same name as the variant for your new board.
173+
* Create the DTS `<variant>.overlay` and Kconfig `<variant>.conf` files in that directory.
171174
The overlay must include:
172175
* A flash partition called `user_sketch`, tipically located near the end of the flash.
173176
* A `zephyr,user` section containing the description for GPIOs, Analog, UART, SPI and I2C devices. Feel free to leave some fields empty in case Zephyr support is missing. This will result in some APIs not being available at runtime (eg. `analogWrite` if PWM section is empty).
174-
* Build the Loader: run `./extra.build.sh $your_board $your_board` and start debugging the errors. :grin:
177+
The Kconfig file must include any board-specific options required by this target.
178+
* Build the Loader: run `./extra/build.sh $your_board` (with any additional arguments as required) and start debugging the errors. :grin:
175179
* Update the `boards.txt`: add an entry for your board, manually filling the required fields.
176-
* Implement touch support: if your board supports the `1200bps touch` method, implement `_on_1200_bps` in a file located inside the `variant/your_board` folder.
177-
* ⏳ Temporary steps
178-
* Create `includes.txt` based on `llext-edk/Makefile.cflags`, taking inspiration for other variants.
179-
* Amend `your_board.compiler.zephyr.*` with information from `llext-edk/Makefile.cflags`.
180+
In particular, set `build.zephyr_target` and `build.zephyr_args` to the arguments used in the `build.sh` call, and `build.variant` to the variant name identified above.
181+
* Implement touch support: if your board supports the "1200bps touch" method, implement `_on_1200_bps` in a file located inside the variant folder of your board.
180182

181183
## 🐛 Bug Reporting
182184

@@ -194,10 +196,10 @@ Contributions are always welcome. The preferred way to receive code contribution
194196
- [x] Unify overlay in [loader](/loader/boards) with the one provided in [variant](/variant) for interoperability with GSoC project
195197
- [x] Autogenerate `defines.txt`, `includes.txt`, `cflags.txt` from `llext-edk` output
196198
- [x] Network: support UDP and TLS
197-
- [ ] USB: switch to USB_DEVICE_STACK_NEXT to support PluggableUSB
199+
- [ ] USB: switch to `USB_DEVICE_STACK_NEXT` to support PluggableUSB
198200
- [ ] Relocate RODATA in flash to accomodate sketches with large assets
199201
- [ ] Provide better error reporting for failed llext operations
200-
- [ ] Replace [llext_exports.c](/loader/llext_exports.c) with proper symbols generation (via includes)
202+
- [ ] Replace [`llext_exports.c`](/loader/llext_exports.c) with proper symbols generation (via includes)
201203
- [x] Provide better usability for `Debug` builds (eg. shell over USB)
202204
- [ ] Fix corner cases with `std::` includes (like `<iterator>`)
203205
- [ ] Get rid of all warnings

0 commit comments

Comments
 (0)