<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>www.railab.me</title><link>https://www.railab.me/</link><description>www.railab.me - mechatronics engineering from raiden00</description><atom:link href="https://www.railab.me/rss.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><copyright>Contents © 2025 &lt;a href="mailto:raiden00@protonmail.com"&gt;raiden00 &lt;Mateusz Szafoni&gt;&lt;/a&gt; 
&lt;a rel="license" href="http://creativecommons.org/publicdomain/mark/1.0/"&gt;
&lt;img src="/img/common/public-domain.png" width="88"
     style="border-style: none;" alt="Public Domain Mark" /&gt;
&lt;/a&gt;
</copyright><lastBuildDate>Mon, 26 May 2025 17:59:20 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Host-Based Development with Apache NuttX – CAN Network Simulation</title><link>https://www.railab.me/posts/2025/5/host-based-dev-with-nuttx-can-network/</link><dc:creator>raiden00 &lt;Mateusz Szafoni&gt;</dc:creator><description>&lt;div&gt;&lt;img alt="CAN network diagram used in this demo." class="align-center" src="https://www.railab.me/images/posts/2025/5/host-based-dev-with-nuttx-can-network/1.png" style="width: 640px;"&gt;
&lt;p&gt;Developing and testing embedded applications involving multiple devices running
dedicated firmware is always a challenge—especially for networked system
where many nodes must collaborate. This process can be simplified by shifting
part of the development workflow to a simulated environment, where
hardware-related issues can be ignored and the focus remains on application
logic.&lt;/p&gt;
&lt;p&gt;In this post, we'll demonstrate how to simplify the workflow for CAN network
application development by simulating the entire network on a Linux host—no
physical hardware required. We'll run several Apache NuttX images that communicate
over a simulated CAN bus using the host's SocketCAN interface. This approach allows
for faster development iteration, easier debugging, and a significantly smoother
developer experience—especially useful when working with complex multi-node systems.
Thanks to NuttX's portable interfaces, applications developed in a simulated
environment can be easily ported to real hardware.&lt;/p&gt;
&lt;p&gt;This post marks the beginning of a new series on this blog, focused on host-based
development with NuttX. Throughout the series, we'll explore practical
techniques for building, testing, and debugging embedded applications directly
on your development machine.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.railab.me/posts/2025/5/host-based-dev-with-nuttx-can-network/"&gt;Read more…&lt;/a&gt; (8 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>CAN</category><category>host-dev</category><category>nuttx</category><guid>https://www.railab.me/posts/2025/5/host-based-dev-with-nuttx-can-network/</guid><pubDate>Mon, 26 May 2025 12:00:00 GMT</pubDate></item><item><title>Apache NuttX and small systems - Modbus slave example</title><link>https://www.railab.me/posts/2025/3/nuttx-and-small-systems-modbus-slave-example/</link><dc:creator>raiden00 &lt;Mateusz Szafoni&gt;</dc:creator><description>&lt;div&gt;&lt;a class="reference external image-reference" href="https://www.railab.me/images/posts/2025/3/nuttx-and-small-systems-modbus-slave-example/1.png"&gt;&lt;img alt="Capture of Modbus RTU communication with our simple device." class="align-center" src="https://www.railab.me/images/posts/2025/3/nuttx-and-small-systems-modbus-slave-example/1.thumbnail.png"&gt;&lt;/a&gt;
&lt;p&gt;It’s time for another hands-on example of using NuttX in small embedded systems!
This time, we’ll dive into implementing a simple application with &lt;strong&gt;Modbus RTU&lt;/strong&gt;,
a lightweight and cost-effective industrial protocol. Thanks to its low
implementation cost, Modbus RTU is a great choice for cheap, resource-constrained
microcontrollers.&lt;/p&gt;
&lt;p&gt;In this example, we’ll demonstrate how to use Modbus for remote reading of
analog inputs, a common task in industrial applications that can be use to read
sensor signals or measure electrical parameters. We’ll take a closer look at
the memory footprint of the Modbus slave stack in NuttX and the resources
requirements to support ADC on STM32 devices.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.railab.me/posts/2025/3/nuttx-and-small-systems-modbus-slave-example/"&gt;Read more…&lt;/a&gt; (9 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>nuttx</category><category>small systems</category><guid>https://www.railab.me/posts/2025/3/nuttx-and-small-systems-modbus-slave-example/</guid><pubDate>Wed, 26 Mar 2025 12:00:00 GMT</pubDate></item><item><title>Apache NuttX and small systems - CAN node example</title><link>https://www.railab.me/posts/2025/2/nuttx-and-small-systems-can-node-example/</link><dc:creator>raiden00 &lt;Mateusz Szafoni&gt;</dc:creator><description>&lt;div&gt;&lt;a class="reference external image-reference" href="https://www.railab.me/images/posts/2025/2/nuttx-and-small-systems-can-node-example/1.png"&gt;&lt;img alt="Capture of CAN Bus frame generated by our simple node." class="align-center" src="https://www.railab.me/images/posts/2025/2/nuttx-and-small-systems-can-node-example/1.thumbnail.png"&gt;&lt;/a&gt;
&lt;p&gt;The previous posts in this series provided useful information about small systems
and NuttX, but the code examples lacked practical value. Now, we move on to more
practical, real-life applications that actually do something useful.&lt;/p&gt;
&lt;p&gt;We begin with a simple CAN Bus node, which can be used to test CAN network setups
or drivers, making it a handy tool for developers. Additionally, it can serve as
a ready-to-use foundation for more complex applications.&lt;/p&gt;
&lt;p&gt;Our goal here is to check and compare the resource usage of two CAN implementations
available in NuttX: one based on the CAN character device and the other using
the SocketCAN network interface. This comparison may be useful for developers
deciding which solution to choose when working with CAN Bus on NuttX.&lt;/p&gt;
&lt;p&gt;The entire test setup is built using accessible development kits, and thanks
to NuttX's architecture, the implementation can be easily portable across
different hardware.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.railab.me/posts/2025/2/nuttx-and-small-systems-can-node-example/"&gt;Read more…&lt;/a&gt; (9 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>nuttx</category><category>small systems</category><guid>https://www.railab.me/posts/2025/2/nuttx-and-small-systems-can-node-example/</guid><pubDate>Mon, 24 Feb 2025 12:00:00 GMT</pubDate></item><item><title>Apache NuttX and small systems - OS components</title><link>https://www.railab.me/posts/2025/1/nuttx-and-small-systems-os-components/</link><dc:creator>raiden00 &lt;Mateusz Szafoni&gt;</dc:creator><description>&lt;div&gt;&lt;a class="reference external image-reference" href="https://www.railab.me/images/posts/2025/1/nuttx-and-small-systems-os-components/1.png"&gt;&lt;img alt="A little hamster with the NuttX logo on its back" class="align-center" src="https://www.railab.me/images/posts/2025/1/nuttx-and-small-systems-os-components/1.thumbnail.png"&gt;&lt;/a&gt;
&lt;p&gt;In earlier posts in this series, we explored the resource requirements of trivial
examples. Now, it's time to dive deeper and examine how specific NuttX interfaces
affect resource consumption in small embedded systems.&lt;/p&gt;
&lt;p&gt;As part of this analysis, we'll develop small applications that utilize specific
NuttX features and evaluate the memory footprint of each. This knowledge can be
useful when designing new applications, helping to define initial constraints and
requirements for the OS interfaces.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.railab.me/posts/2025/1/nuttx-and-small-systems-os-components/"&gt;Read more…&lt;/a&gt; (22 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>nuttx</category><category>small systems</category><guid>https://www.railab.me/posts/2025/1/nuttx-and-small-systems-os-components/</guid><pubDate>Tue, 28 Jan 2025 12:00:00 GMT</pubDate></item><item><title>Apache NuttX and small systems - NuttX Core Size</title><link>https://www.railab.me/posts/2024/12/nuttx-and-small-systems-core-os/</link><dc:creator>raiden00 &lt;Mateusz Szafoni&gt;</dc:creator><description>&lt;div&gt;&lt;a class="reference external image-reference" href="https://www.railab.me/images/posts/2024/12/nuttx-and-small-systems-os-core/1.png"&gt;&lt;img alt="A little mice with the NuttX logo on its back again" class="align-center" src="https://www.railab.me/images/posts/2024/12/nuttx-and-small-systems-os-core/1.thumbnail.png"&gt;&lt;/a&gt;
&lt;p&gt;We continue our exploration of Apache NuttX for small embedded systems.
In the  &lt;a class="reference external" href="https://www.railab.me/posts/2024/11/nuttx-and-small-systems-hello-world/"&gt;previous post&lt;/a&gt;,
we examined a simple &lt;em&gt;"Hello, World!"&lt;/em&gt; example and explored how small it could be
on NuttX.&lt;/p&gt;
&lt;p&gt;Now, we take it a step further by disabling all possible NuttX features, allowing
the toolchain to remove as much code as possible. This approach leaves us with
the core of NuttX—components that can't be eliminated through configuration
options and compiler optimizations.&lt;/p&gt;
&lt;p&gt;Finally, we implement a &lt;strong&gt;trivial&lt;/strong&gt; application using two different approaches—the
POSIX-compliant method and the non-portable alternative—highlighting the trade-offs
between achieving portability and minimal system size.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.railab.me/posts/2024/12/nuttx-and-small-systems-core-os/"&gt;Read more…&lt;/a&gt; (11 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>nuttx</category><category>small systems</category><guid>https://www.railab.me/posts/2024/12/nuttx-and-small-systems-core-os/</guid><pubDate>Wed, 11 Dec 2024 18:00:00 GMT</pubDate></item><item><title>Apache NuttX and small systems - Hello, World !</title><link>https://www.railab.me/posts/2024/11/nuttx-and-small-systems-hello-world/</link><dc:creator>raiden00 &lt;Mateusz Szafoni&gt;</dc:creator><description>&lt;div&gt;&lt;a class="reference external image-reference" href="https://www.railab.me/images/posts/2024/11/nuttx-and-small-systems-hello-world/1.png"&gt;&lt;img alt="A little mice with the NuttX logo on its back" class="align-center" src="https://www.railab.me/images/posts/2024/11/nuttx-and-small-systems-hello-world/1.thumbnail.png"&gt;&lt;/a&gt;
&lt;p&gt;In the world of small embedded systems, balancing functionality with strict
resource limitations is a constant challenge. Apache NuttX, with its scalable and
modular design, allows developers to select only the features needed for a given
application and then fine-tune the system to minimize resource usage. However,
the vast number of configuration options can be overwhelming, and without
exploring the OS implementation or analyzing the generated binaries, it can be
difficult to effectively optimize resource consumption.&lt;/p&gt;
&lt;p&gt;I've been curious for some time about how minimal we can make NuttX while still
implementing useful applications. It's time to check it out.
This is the first post in the series &lt;em&gt;"Apache NuttX and small systems"&lt;/em&gt;, where
we'll experiment with reducing the size of the final NuttX image, explore how
low we can push resource requirements, and, if all goes well, implement
some useful applications that fit into some small embedded targets.&lt;/p&gt;
&lt;p&gt;We're going to start with the classic "Hello, World!" example, examine its
memory consumption, and see how different configuration options influence
the final result.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.railab.me/posts/2024/11/nuttx-and-small-systems-hello-world/"&gt;Read more…&lt;/a&gt; (9 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>nuttx</category><category>small systems</category><guid>https://www.railab.me/posts/2024/11/nuttx-and-small-systems-hello-world/</guid><pubDate>Sun, 24 Nov 2024 12:00:00 GMT</pubDate></item><item><title>NuttX SensorScope demo with Thingy53</title><link>https://www.railab.me/posts/2024/6/nuttx-sensorscope-demo-thingy53/</link><dc:creator>raiden00 &lt;Mateusz Szafoni&gt;</dc:creator><description>&lt;div&gt;&lt;a class="reference external image-reference" href="https://www.railab.me/images/posts/2024/6/nuttx-sensorscope-demo-thingy53/sensor_ir0.png"&gt;&lt;img alt="Plot from IR sensor data" class="align-center" src="https://www.railab.me/images/posts/2024/6/nuttx-sensorscope-demo-thingy53/sensor_ir0.thumbnail.png" style="width: 360px;"&gt;&lt;/a&gt;
&lt;p&gt;NxScope in Apache NuttX is a universal tool that allows you to capture and transfer
time series data to your host machine. In this post, I'll demonstrate its use based
on the &lt;a class="reference external" href="https://github.com/apache/nuttx-apps/tree/master/system/sensorscope"&gt;SensorScope&lt;/a&gt;
application, which enables the streaming of data from sensors and their subsequent
visualization.&lt;/p&gt;
&lt;p&gt;For this purpose, the &lt;a class="reference external" href="https://www.nordicsemi.com/Products/Development-hardware/Nordic-Thingy-53"&gt;Thingy:53&lt;/a&gt;
board from Nordic Semiconductor is used. It has several sensors on board and almost all
of them are already supported in NuttX (BME688 is still missing).&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.railab.me/posts/2024/6/nuttx-sensorscope-demo-thingy53/"&gt;Read more…&lt;/a&gt; (4 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>nuttx</category><category>nxscope</category><category>sensors</category><category>thingy53</category><guid>https://www.railab.me/posts/2024/6/nuttx-sensorscope-demo-thingy53/</guid><pubDate>Tue, 11 Jun 2024 10:00:00 GMT</pubDate></item><item><title>Segger RTT as an interface for NuttX NxScope library</title><link>https://www.railab.me/posts/2024/1/segger-rtt-interface-nxscope/</link><dc:creator>raiden00 &lt;Mateusz Szafoni&gt;</dc:creator><description>&lt;div&gt;&lt;p&gt;One of my favorite things when working with Segger J-Link is
&lt;a class="reference external" href="https://www.segger.com/products/debug-probes/j-link/technology/about-real-time-transfer"&gt;RTT&lt;/a&gt;
support which significalntly improves my debugging experience.
With a single interface (one USB cable), I can run:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;p&gt;RTT serial console to communicate with the target&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;SystemView to capture system events&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;gdb for general debugging&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The latest addition to this list is real-time data streaming with the NuttX
NxScope library and RTT channel as a communication interface.
This feature is supported with &lt;a class="reference external" href="https://github.com/railab/nxscli"&gt;nxscli&lt;/a&gt;
tool since version &lt;code class="docutils literal"&gt;0.5.1&lt;/code&gt;. Now we can visualize and debug complex data
relations much more simpler.&lt;/p&gt;
&lt;p&gt;This post discusses how to configure the NxScope example with NuttX to work over
an RTT channel with an RTT serial console and SystemView support.&lt;/p&gt;
&lt;p&gt;For demonstration, we use Nordic nRF52832-DK board with a built-in J-Link OB
interface, so there is no need to connect any external device.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.railab.me/posts/2024/1/segger-rtt-interface-nxscope/"&gt;Read more…&lt;/a&gt; (2 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>nxscope</category><category>rtt</category><guid>https://www.railab.me/posts/2024/1/segger-rtt-interface-nxscope/</guid><pubDate>Sun, 21 Jan 2024 12:00:00 GMT</pubDate></item><item><title>Visualize data from NuttX NxScope with PlotJuggler</title><link>https://www.railab.me/posts/2024/1/plotjuggler-with-nxscope/</link><dc:creator>raiden00 &lt;Mateusz Szafoni&gt;</dc:creator><description>&lt;div&gt;&lt;p&gt;&lt;a class="reference external" href="https://github.com/facontidavide/PlotJuggler"&gt;PlotJuggler&lt;/a&gt; is a cool tool for
visualizing time series data, supporting live data streaming.
Since version &lt;code class="docutils literal"&gt;0.5.1&lt;/code&gt;, my &lt;a class="reference external" href="https://github.com/railab/nxscli"&gt;nxscli&lt;/a&gt; tool
has included support for data streaming over UDP port, which can be easily
captured by PlotJuggler.&lt;/p&gt;
&lt;p&gt;Let's see how to set up both tools and plot data from the NuttX
&lt;a class="reference external" href="https://github.com/apache/nuttx-apps/tree/master/logging/nxscope"&gt;NxScope library&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.railab.me/posts/2024/1/plotjuggler-with-nxscope/"&gt;Read more…&lt;/a&gt; (4 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>nuttx</category><category>nxscope</category><category>plotjuggler</category><guid>https://www.railab.me/posts/2024/1/plotjuggler-with-nxscope/</guid><pubDate>Sun, 14 Jan 2024 12:00:00 GMT</pubDate></item><item><title>HBI3260-2C integrated servo teardown</title><link>https://www.railab.me/posts/2024/1/hbi32602c-servo-teardown/</link><dc:creator>raiden00 &lt;Mateusz Szafoni&gt;</dc:creator><description>&lt;div&gt;&lt;a class="reference external image-reference" href="https://www.railab.me/images/posts/2024/1/hbi32602c-servo-teardown/1.jpg"&gt;&lt;img alt="And this is our patient" src="https://www.railab.me/images/posts/2024/1/hbi32602c-servo-teardown/1.thumbnail.jpg"&gt;&lt;/a&gt;
&lt;p&gt;In this post, we'll take a look inside the HBI 3260-2C integrated servo that I
bought for pennies some time ago.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.railab.me/posts/2024/1/hbi32602c-servo-teardown/"&gt;Read more…&lt;/a&gt; (5 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>FOC</category><category>servo</category><guid>https://www.railab.me/posts/2024/1/hbi32602c-servo-teardown/</guid><pubDate>Sun, 07 Jan 2024 12:00:00 GMT</pubDate></item></channel></rss>