You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit b70fc1e
Browse filesBrowse the repository at this point in the historyBrowse files
@@ -59,7 +59,7 @@ The build system's workflow is a four-step procedure:
59
59
60
60
Further information about micro-ROS build system can be found [here](https://github.com/micro-ROS/micro-ros-build/tree/dashing/micro_ros_setup)
61
61
62
-
## Creating a new firmware workspace
62
+
## Step 1: Creating a new firmware workspace
63
63
64
64
In order to accomplish the first step, a new firmware workspace can be created using the following command. The created workspace is platform and RTOS specific.
65
65
@@ -77,14 +77,15 @@ The options available here are:
77
77
78
78
Once the command is executed, a folder named `firmware` must be present in your workspace.
79
79
80
-
## Configuring the firmware
80
+
## Step 2: Configuring the firmware
81
81
82
82
The configuration step will set up the main micro-ROS options and will select the required application. It can be executed with the following command:
83
83
84
84
```bash
85
85
# Configure step
86
86
ros2 run micro_ros_setup configure_firmware.sh [APP] [OPTIONS]
87
87
```
88
+
88
89
The options available for this configuration step are:
89
90
-`--transport` or `-t`: `udp`, `tcp`, `serial` or any hardware-specific transport label
90
91
-`--dev` or `-d`: agent string descriptor in a serial-like transport
@@ -118,19 +119,19 @@ The files that a micro-ROS app are RTOS-dependent. The table below clarifies whi
<td >micro-ROS app specific colcon configuration. Detailed info <a href="https://micro-ros.github.io/docs/tutorials/core/microxrcedds_rmw_configuration/">here</a>.</td>
156
157
</tr>
157
158
<tr>
158
-
<td>CMakeLists.txt</span></a></td>
159
+
<td>CMakeLists.txt</td>
159
160
<td>CMake file for Zephyr app building</td>
160
161
</tr>
161
162
<tr>
162
-
<td >prj.conf</span></a></td>
163
+
<td >prj.conf</td>
163
164
<td >Zephyr specific app configuration</td>
164
165
</tr>
165
166
</table>
166
167
167
-
## Building the firmware
168
+
The following steps are RTOS-specific commands for creating a new app once the firmware folder is created inside `microros_ws`:
169
+
170
+
### Nuttx
171
+
172
+
Create a new app:
173
+
174
+
```bash
175
+
# Go to app folder inside firmware
176
+
cd firmware/apps/examples
177
+
178
+
# Create your app folder and required files. Contents of these file can be found in column Sample app in table above
179
+
mkdir uros_pingpong
180
+
cd uros_pingpong
181
+
touch Kconfig
182
+
touch Makefile
183
+
touch uros_pingpong_main.c
184
+
touch Make.defs
185
+
```
186
+
187
+
Create a specific configuration. We're going to start from an already existing one and modify it for our new application.
188
+
189
+
Execute the next command:
190
+
```bash
191
+
cd microros_ws
192
+
ros2 run micro_ros_setup configure_firmware.sh uros
193
+
```
194
+
195
+
This sets the Ethernet and micro-ROS required configuration. However, in order to add our application, we're going to modify it:
196
+
197
+
```bash
198
+
cd firmware/NuttX
199
+
make menuconfig
200
+
```
201
+
202
+
This will open the NuttX menu config, which allows you to modify the configuration of the RTOS, including adding a new application.
203
+
204
+
205
+
- On the menu, you need to follow the next path:
206
+
``Application Configuration -> Examples ``
207
+

208
+
209
+
- This will show a list of the available applications. You need to find: ``micro-ROS Ping-Pong`` and click ``y`` to add it.
210
+

211
+
212
+
- Now push three times the key ``ESC`` to close the menu. You will be asked if you want to save the save your new configuration, and you need to click ``Yes``.
213
+
214
+
215
+
To save your configuration execute the following commands:
216
+
217
+
```bash
218
+
cd uros_ws/firmware/NuttX
219
+
make savedefconfig
220
+
```
221
+
222
+
This will generate a file called ``defconfig`` inside of ``uros_ws/firmware/NuttX``. This file is a config profile with all the required configuration to run your specific configuration which includes your application.
223
+
224
+
Finally create a folder called ``uros_pingpong`` into ``uros_ws/firmware/NuttX/configs/olimex-stm32-e407`` and move the defconfig file to uros_pingpong folder so you can execute:
225
+
226
+
```bash
227
+
# Configure step
228
+
ros2 run micro_ros_setup configure_firmware.sh uros_pingpong
229
+
```
230
+
231
+
### FreeRTOS
232
+
233
+
Create a new app:
234
+
235
+
```bash
236
+
# Create your app folder and required files. Contents of these file can be found in column Sample app in table above
237
+
pushd firmware/freertos_apps/apps
238
+
mkdir ping_pong
239
+
cd ping_pong
240
+
touch app.c app-colcon.meta
241
+
popd
242
+
```
243
+
244
+
Now you are ready to call:
245
+
246
+
```bash
247
+
# Configure step
248
+
ros2 run micro_ros_setup configure_firmware.sh ping_pong [OPTIONS]
249
+
```
250
+
251
+
### Zephyr
252
+
253
+
Create a new app:
254
+
255
+
```bash
256
+
# Create your app folder and required files. Contents of these file can be found in column Sample app in table above
257
+
pushd firmware/zephyr_apps/apps
258
+
mkdir my_brand_new_app
259
+
cd my_brand_new_app
260
+
mkdir src
261
+
touch src/app.c app-colcon.meta
262
+
touch CMakeLists.txt prj.conf
263
+
popd
264
+
```
265
+
266
+
Now you are ready to call:
267
+
268
+
```bash
269
+
# Configure step
270
+
ros2 run micro_ros_setup configure_firmware.sh ping_pong [OPTIONS]
271
+
```
272
+
273
+
## Step 3: Building the firmware
168
274
169
275
When the configuring step ends, just build the firmware:
170
276
@@ -173,7 +279,7 @@ When the configuring step ends, just build the firmware:
173
279
ros2 run micro_ros_setup build_firmware.sh
174
280
```
175
281
176
-
## Flashing the firmware
282
+
## Step 4: Flashing the firmware
177
283
178
284
Flashing the firmware into the platform may vary across hardware platforms. Regarding this tutorial's target platform (**[Olimex STM32-E407](https://www.olimex.com/Products/ARM/ST/STM32-E407/open-source-hardware)**), JTAG interface is going to be used to flash the firmware.
179
285
@@ -206,7 +312,7 @@ colcon build
206
312
source install/local_setup.bash
207
313
```
208
314
209
-
Then, depending on the selected transport the board connection to the agent may differ:
315
+
Then, depending on the selected transport and RTOS, the board connection to the agent may differ:
0 commit comments