Skip to content

Commit 90f5e8f

Browse files
committed
Updates
1 parent 633cfc3 commit 90f5e8f

1 file changed

Lines changed: 19 additions & 6 deletions

File tree

  • _docs/tutorials/advanced/zephyr_emulator

_docs/tutorials/advanced/zephyr_emulator/index.md

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,28 @@ Once the micro-ROS build system is ready, let's create a new Zephyr firmware for
2525
ros2 run micro_ros_setup create_firmware_ws.sh zephyr host
2626
```
2727

28-
2928
micro-ROS apps for Zephyr emulator are located at `firmware/zephyr_apps/apps`. In order to create a new application, create a new folder containing two files: the app code (inside a `src` folder) and the RMW configuration. You will also need some other Zephyr related files: a `CMakeLists.txt` to define the building process and a `prj.conf` where Zephyr is configured. There is a sample proyect [here](https://github.com/micro-ROS/zephyr_apps/tree/dashing/apps/host_ping_pong), for now, it is ok to copy them.
3029

31-
Make sure your app's `CMakeLists.txt` is compatible with `native_posix`:
30+
```bash
31+
# Creating a new app
32+
pushd firmware/zephyr_apps/apps
33+
mkdir host_ping_pong
34+
cd host_ping_pong
35+
mkdir src
36+
37+
# Contents of app.c are here: https://github.com/micro-ROS/zephyr_apps/blob/dashing/apps/host_ping_pong/src/main.c
38+
touch src/app.c
3239

33-
```
34-
...
35-
set(COMPATIBLE_BOARDS native_posix)
36-
....
40+
# Contents of app-colcon.meta are here: https://github.com/micro-ROS/zephyr_apps/blob/dashing/apps/host_ping_pong/app-colcon.meta
41+
touch app-colcon.meta
42+
43+
# Contents of app-colcon.meta are here: https://github.com/micro-ROS/zephyr_apps/blob/dashing/apps/host_ping_pong/CMakeLists.txt
44+
touch CMakeLists.txt
45+
46+
# Contents of app-colcon.meta are here: https://github.com/micro-ROS/zephyr_apps/blob/dashing/apps/host_ping_pong/prj.conf
47+
touch prj.conf
48+
49+
popd
3750
```
3851

3952
Once the app folder is created, let's configure our new app with a UDP transport that looks for the agent on the port UDP/8888 at localhost:

0 commit comments

Comments
 (0)