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
Olimex STM32-E407 features a STM32F407 Cortex-M4 microcontroller. It has 1MB Flash and 196 kB RAM of which 64 kB are core coupled (CCM SRAM). Other features of the chip are:
26
-
27
-
- Three 12 bits @ 2.4MHz ADC
28
-
- Two 12 bits DAC
29
-
- USB OTG FS
30
-
- USB OTG HS
31
-
- Ethernet
32
-
- 14 timers
33
-
- 3 SPI
34
-
- 3 I2C
35
-
- 2 CAN
36
-
- 114 GPIOs
37
-
38
-
Most of these peripherals are mapped into Olimex board headers.
39
-
40
-
The micro-ROS + FreeRTOS port of this evaluation board relies on a STM32CubeMX generated project, so HAL and low-level configuration can be tuned to specific requirements.
41
-
42
-
The out-of-the-box HAL configuration included in the port packages configures the minimal communication and debugging peripheral required for micro-ROS.
43
-
44
25
## Adding a new micro-ROS app
45
26
46
-
First of all make sure that you have a **ROS 2 Dashing** installation.
27
+
First of all make sure that you have a **ROS 2** installation.
47
28
48
29
***TIP:** if you are familiar with Docker containers, this image may be useful: [ros:dashing](https://hub.docker.com/layers/ros/library/ros/dashing/images/sha256-b796c14ea663537129897769aa6c715a851ca08dffd4875ef2ecaa31a4dbd431?context=explore)*
49
30
50
-
On the **ROS 2 Dashing** installation open a command line and follow these steps:
31
+
On the **ROS 2** installation open a command line and follow these steps:
51
32
52
33
```bash
53
-
# Source the ROS 2 Dashing installation
34
+
# Source the ROS 2 installation
54
35
source /opt/ros/$ROS_DISTRO/setup.bash
55
36
56
37
# Create a workspace and download the micro-ROS tools
@@ -68,7 +49,7 @@ source install/local_setup.bash
68
49
```
69
50
70
51
71
-
Now, lets create a firmware workspace that targets all the required code and tools for Olimex development board and FreeRTOS:
52
+
Now, let's create a firmware workspace that targets all the required code and tools for Olimex development board and FreeRTOS:
72
53
73
54
```bash
74
55
# Create step
@@ -77,12 +58,13 @@ ros2 run micro_ros_setup create_firmware_ws.sh freertos olimex-stm32-e407
77
58
78
59
Now you have all the required tools to crosscompile micro-ROS and FreeRTOS for Olimex STM32-E407 development board. At this point, you must know that the micro-ROS build system is a four-step workflow:
79
60
61
+
<!-- TODO (pablogs9): Remove and link to build-system tutorial when done -->
80
62
1.**Create**: retrieves all the required packages for a specific RTOS and hardware platform.
81
63
2.**Configure**: configures the downloaded packages with options such as the micro-ROS application, the selected transport layer or the micro-ROS agent IP address (in network transports).
82
64
3.**Build**: generates a binary file ready for being loaded in the hardware.
83
65
4.**Flash**: load the micro-ROS software in the hardware.
84
66
85
-
Micro-ROS apps for Olimex + FreeRTOS are located at `firmware/freertos_apps/apps`. In order to create a new application, create a new folder containing two files: the app code and the RMW configuration.
67
+
micro-ROS apps for Olimex + FreeRTOS are located at `firmware/freertos_apps/apps`. In order to create a new application, create a new folder containing two files: the app code and the RMW configuration.
86
68
87
69
```bash
88
70
# Creating a new app
@@ -92,11 +74,11 @@ cd my_brand_new_app
92
74
touch app.c app-colcon.meta
93
75
```
94
76
95
-
For this example we are going to create a ping pong app where a node sends a ping package with a unique identifier using a publisher and the same package is received by a pong subscriber. The node will also answer to
77
+
For this example we are going to create a ping pong app where a node sends a ping package with a unique identifier using a publisher and the same package is received by a pong subscriber. The node will also answer to:
First of all lets configure the RMW with the required static memory. The `app-colcon.meta` should look like:
81
+
To start creating this app, lets configure the RMW with the required static memory. You can read more about RMW and Micro XRCE-DDS Configuration [here](/docs/tutorials/basic/microxrcedds_rmw_configuration/) The `app-colcon.meta` should look like:
100
82
101
83
```
102
84
{
@@ -115,7 +97,7 @@ First of all lets configure the RMW with the required static memory. The `app-co
115
97
}
116
98
```
117
99
118
-
On the other hand,`app.c` should look like the following code:
100
+
Meanwhile`app.c` should look like the following code:
119
101
120
102
```c
121
103
#include<allocators.h>
@@ -275,7 +257,7 @@ void appMain(void *argument)
275
257
}
276
258
```
277
259
278
-
Once the new folder is created, lets configure our new app with a serial transport on UART 3:
260
+
Once the new folder is created, let's configure our new app with a serial transport on UART 3:
279
261
280
262
```bash
281
263
# Configure step
@@ -289,7 +271,7 @@ When the configuring step ends, just build the firmware:
289
271
ros2 run micro_ros_setup build_firmware.sh
290
272
```
291
273
292
-
Once the build has successfully ended, lets power and connect the board. First, connect Olimex ARM-USB-TINY-H JTAG programmer to the board's JTAG port:
274
+
Once the build has successfully ended, let's power and connect the board. First, connect Olimex ARM-USB-TINY-H JTAG programmer to the board's JTAG port:
***TIP:** Color codes are applicable to [this cable](https://www.olimex.com/Products/Components/Cables/USB-Serial-Cable/USB-Serial-Cable-F/). Make sure to match Olimex Rx with Cable Tx and viceversa. Rememeber GND!*
306
+
***TIP:** Color codes are applicable to [this cable](https://www.olimex.com/Products/Components/Cables/USB-Serial-Cable/USB-Serial-Cable-F/). Make sure to match Olimex Rx with Cable Tx and vice-versa. Remember GND!*
325
307
326
308
Then run the agent:
327
309
@@ -332,7 +314,7 @@ ros2 run micro_ros_agent micro_ros_agent serial --dev [device]
332
314
333
315
***TIP:** you can use this command to find your serial device name: `ls /dev/serial/by-id/*`*
334
316
335
-
And finally, lets check that everything is working. We are going to listen to ping topic to check whether the Ping Pong node is publishing its own pings
317
+
And finally, let's check that everything is working. We are going to listen to ping topic to check whether the Ping Pong node is publishing its own pings
0 commit comments