This repository prototypes ROS 2.0 for embedded systems using NuttX in the STM32F4Discovery board.
- Quick overview/understand fo the OMG DDS standart
- Evaluate different Open Source DDS implementations and select one meant for embedded devices (Tinq selected)
- Prototype with FreeRTOS (discarded)
- Prototype with Riot (discarded)
- Prototype with NuttX (current prototype)
- Use the network stack to create a simple UDP/IP example over Ethernet
- NSH (NuttX Shell) infraestructure set up
- Adjust DDS interfaces to match with NuttX (pseudo-POSIX)
- DDS compiling and linking on top of NuttX
- Code small enough to fit in RAM and ROM (112 KB and 1 MB respectively)
- DDS chat application running
- DDS Debug Shell available
- Tinq-embedded <-> Tinq Desktop interoperability (DDS embedded - DDS Desktop)
- Tinq-embedded <-> OpenSplice Desktop interoperability
- RCL construction
- Real Time assessment
- Hardware frontier
###Hardware
The hardware used for this prototype is the STM32F4Discovery board
together with the STM32F4-BB
.
The board is connected to the computer using USB. This connection is used to power up the board, program and debug (through STLINK). PD5
, PD6
and GND
are used as the serial connection (for development and debugging purposes, NSH, etc). An Ethernet cable is connected from the STM32F4-BB
to the working station.
###Setting it up
git clone http://ymorin.is-a-geek.org/git/kconfig-frontends
cd kconfig-frontends/
sudo apt-get install gperf
sudo apt-get install flex
sudo apt-get install bison
sudo apt-get install libncurses5-dev
./bootstrap
./configure
make
sudo make install
sudo /sbin/ldconfig -v
There're are several configurations for the different applications. The following example shows how to use the hello world one:
cd nuttx/tools
./configure stm32f4discovery/hello
####Building
cd nuttx/
make menuconfig # optional
make
####Programming
make program
####Debugging
cd nuttx/
make gdb_server
In another terminal (same directory):
make gdb
###UDP testing If NSH is launched with the right debug options, it can be used to test UDP traffic. On the remote machine do:
sudo mz eth0 -c 10 -A 192.168.0.2 -B 192.168.0.3 -t udp -p 100
You should see incoming packages in the NSH.