BusyBox; The Swiss Army Knife of Embedded Linux
In this article we cover the BusyBox, how it's designed to be optimized for embedded targets, and how to configure and build it in different ways, we also covered the license and limitation, which led to the development of ToyBox, I hope you enjoyed the article, please leave a comment for any correction or suggestions.
Creating a GPIO HAL and Driver in C
Creating a GPIO Hardware Abstraction Layer (HAL) in C allows for flexible microcontroller interfacing, overcoming the challenge of variability across silicon vendors. This method involves reviewing datasheets, identifying features, designing interfaces, and iterative development, as detailed in the "Reusable Firmware" process. A simplified approach prioritizes essential functions like initialization and read/write operations, showcased through a minimal interface example. The post also highlights the use of AI to expedite HAL generation. A detailed GPIO HAL version is provided, featuring extended capabilities and facilitating driver connection through direct assignments or wrappers. The significance of a configuration table for adaptable peripheral setup is emphasized. Ultimately, the blog illustrates the ease and scalability of developing a GPIO HAL and driver in C, promoting hardware-independent and extensible code for various interfaces, such as SPI, I2C, PWM, and timers, underscoring the abstraction benefits.
Using (Apache) NuttX USERLED Subsystem
In the previous article (https://embeddedrelated.com/showarticle/1623.php) we saw how to use GPIOs on NuttX testing on RaspberryPi Pico as example. In that article we used the GPIO output to control an LED, but there is a better way to do that. Of course, NuttX has an LED subsystem similar to Linux LED subsystem: it is called USERLED. Today we will see how to control LEDs using NuttX's USERLED subsystem.
The main advantage of using the USERLED...
3D printing for embedded development
Used mostly for creating little plastic objects, the desktop 3D printer is not an obvious addition to the embedded developer's toolbox. However, if you're looking for more reasons to get one, or already have one that's mostly gathering dust, here are a couple of embedded-related ways to get more value out of it.
Unraveling the Enigma: Object Detection in the World of Pixels
Exploring the realm of embedded systems co-design for object recognition, this blog navigates the convergence of hardware and software in revolutionizing industries. Delving into real-time image analysis and environmental sensing, the discussion highlights advanced object detection and image segmentation techniques. With insights into Convolutional Neural Networks (CNNs) decoding pixel data and autonomously extracting features, the blog emphasizes their pivotal role in modern computer vision. Practical examples, including digit classification using TensorFlow and Keras on the MNIST dataset, underscore the power of CNNs. Through industry insights and visualization aids, the blog unveils a tapestry of innovation, charting a course towards seamless interaction between intelligent embedded systems and the world.
Finite State Machines (FSM) in Embedded Systems (Part 1) - There's a State in This Machine!
An introduction to state machines and their implementation. Working from an intuitive definition of the state machine concept, we will start with a straightforward implementation then we evolve it into a more robust and engineered solution.
How Embedded Linux is used in Spacecrafts !
This article dives into the application of Linux in spacecraft, examining the challenges it poses and proposing potential solutions. Real-life examples will be discussed, while also addressing the drawbacks of employing Linux in safety-critical missions.
Getting Started With Zephyr: Bluetooth Low Energy
In this blog post, I show how to enable BLE support in a Zephyr application. First, I show the necessary configuration options in Kconfig. Then, I show how to use the Zephyr functions and macros to create a custom service and characteristic for a contrived application.
++i and i++ : what’s the difference?
Although the ++ and -- operators are well known, there are facets of their operation and implementation that are less familiar to many developers.
Introduction to Microcontrollers - Driving WS2812 RGB LEDs
This tutorial chapter is a bit of a detour, but I think an interesting and useful one. It introduces a bit of assembly language programming, and demonstrates bit-banging a tight serial data protocol. And it deals with RGB LEDs, which are just very fun in their own right, especially these new parts. So I thought I'd post this to give readers time for some holiday lighting experimenting.
Back To The FutureRemember how we started this...
VHDL tutorial - A practical example - part 3 - VHDL testbench
In part 1 of this series we focused on the hardware design, including some of the VHDL definitions of the I/O characteristics of the CPLD part. In part 2, we described the VHDL logic of the CPLD for this design. In part 3, we will show the entire VHDL design and the associated tests used to prove that we have, in fact, designed what we started out to design.
First, let's pull all of the pieces of the prior design together into a...
VHDL tutorial - A practical example - part 1 - Hardware
In previous posts I described some simple VHDL examples. This time let's try something a little more complex. This is part one of a multiple part article. This is intended to be a detailed description of one of several initial designs that I developed for a client. This design never made it into a product, but a similar design was used and is currently being produced. As a considerable amount of work was put into this effort, I decided to share this design...
Back from Embedded World 2019 - Funny Stories and Live-Streaming Woes
When the idea of live-streaming parts of Embedded World came to me, I got so excited that I knew I had to make it happen. I perceived the opportunity as a win-win-win-win.
- win #1 - Engineers who could not make it to Embedded World would be able to sample the huge event,
- win #2 - The organisation behind EW would benefit from the extra exposure
- win #3 - Lecturers and vendors who would be live-streamed would reach a (much) larger audience
- win #4 - I would get...
Getting Started With Zephyr: Devicetree Overlays
In this blog post, I show how the Devicetree overlay is a valuable construct in The Zephyr Project RTOS. Overlays allow embedded software engineers to override the default pin configuration specified in Zephyr for a particular board. In this blog post, I use I2C as an example. Specifically, I showed the default I2C pins used for the nRF52840 development kit in the nominal Zephyr Devicetree. Then, I demonstrated how an overlay can be used to override this pin configuration and the final result.
Getting Started With Zephyr: West Manifest Customization
IntroductionThe Zephyr Project RTOS (https://zephyrproject.org/), or simply “Zephyr” as it is known colloquially, is an increasingly popular real-time operating system due to its native support for over 450 boards and countless peripherals. When starting with any embedded software project, the first task is to start from a known baseline. This can include cloning a repository from source control, which can be the case with embedded Linux, or downloading a zip file representing a...
C to C++: 3 Reasons to Migrate
I’ve recently written several blogs that have set the stage with a simple premise: The C programming language no longer provides embedded software developers the tools they need to develop embedded software throughout the full software stack. Now, don’t get me wrong, C is a powerhouse, with over 80% of developers still using it; however, as embedded systems have reached unprecedented levels of complexity, C might not be the right tool for the job.
In this post, I’m kicking...
VHDL tutorial - Creating a hierarchical design
In earlier blog entries I introduced some of the basic VHDL concepts. First, developing a function ('VHDL tutorial') and later verifying and refining it ('VHDL tutorial - part 2 - Testbench' and 'VHDL tutorial - combining clocked and sequential logic'). In this entry I will describe how to...
A New Related Site!
We are delighted to announce the launch of the very first new Related site in 15 years! The new site will be dedicated to the trendy and quickly growing field of Machine Learning and will be called - drum roll please - MLRelated.com.
We think MLRelated fits perfectly well within the “Related” family, with:
- the fast growth of TinyML, which is a topic of great interest to the EmbeddedRelated community
- the use of Machine/Deep Learning in Signal Processing applications, which is of...
The Other Kind of Bypass Capacitor
There’s a type of bypass capacitor I’d like to talk about today.
It’s not the usual power supply bypass capacitor, aka decoupling capacitor, which is used to provide local charge storage to an integrated circuit, so that the high-frequency supply currents to the IC can bypass (hence the name) all the series resistance and inductance from the power supply. This reduces the noise on a DC voltage supply. I’ve...
Ten Little Algorithms, Part 1: Russian Peasant Multiplication
This blog needs some short posts to balance out the long ones, so I thought I’d cover some of the algorithms I’ve used over the years. Like the Euclidean algorithm and Extended Euclidean algorithm and Newton’s method — except those you should know already, and if not, you should be locked in a room until you do. Someday one of them may save your life. Well, you never know.
Other articles in this series:
- Part 1:
Absolute Beginner's Guide To Getting Started With Raspberry Pi
Contents:- Introduction
- Simplifications
- Decisions
- The Raspberry Pi
- Parts: What You Need
- Suppliers: Where To Order
- Shopping Lists: What To Order
Introduction to Microcontrollers - Buttons and Bouncing
What Is A Button?To your hardware, that is. As discussed in Introduction to Microcontrollers - More On GPIO, a button (or key, or switch, or any form of mechanical contact) is generally hooked up to a microcontroller so as to generate a certain logic level when pushed or closed or "active," and the opposite logic level when unpushed or open or "inactive." The active logic level can be either '0' or '1', but for reasons both historical and electrical, an...
Digital PLL's -- Part 1
1. IntroductionFigure 1.1 is a block diagram of a digital PLL (DPLL). The purpose of the DPLL is to lock the phase of a numerically controlled oscillator (NCO) to a reference signal. The loop includes a phase detector to compute phase error and a loop filter to set loop dynamic performance. The output of the loop filter controls the frequency and phase of the NCO, driving the phase error to zero.
One application of the DPLL is to recover the timing in a digital...
How to Estimate Encoder Velocity Without Making Stupid Mistakes: Part II (Tracking Loops and PLLs)
Yeeehah! Finally we're ready to tackle some more clever ways to figure out the velocity of a position encoder. In part I, we looked at the basics of velocity estimation. Then in my last article, I talked a little about what's necessary to evaluate different kinds of algorithms. Now it's time to start describing them. We'll cover tracking loops and phase-locked loops in this article, and Luenberger observers in part III.
But first we need a moderately simple, but interesting, example...
Lost Secrets of the H-Bridge, Part IV: DC Link Decoupling and Why Electrolytic Capacitors Are Not Enough
Those of you who read my earlier articles about H-bridges, and followed them closely, have noticed there's some unfinished business. Well, here it is. Just so you know, I've been nervous about writing the fourth (and hopefully final) part of this series for a while. Fourth installments after a hiatus can bring bad vibes. I mean, look what it did to George Lucas: now we have Star Wars Episode I: The Phantom Menace and
Learning Rust For Embedded Systems
The Motivational PortionBased on recommendations from Kevin Nause, the VolksEEG project is considering using Rust as the embedded system programming language. So I've been off on a tear skimming books and e-books and watching videos at 2x to evaluate it.
My conclusion? Do it!
Most of the rest of us participants are primarily C/C++ embedded developers. I had previously been sensitized to Rust for embedded systems by
Implementing State Machines
State machines are a great way to design software but they can be difficult to implement well.To illustrate this I’ll develop a simple state machine then increase the complexity to demonstrate some of the difficulties
We’ve all washed dishes before - it’s easy isn’t it? Scrub, rinse, dry, scrub, rinse dry. Scrub the dish until all of the gunk is off of it, rinse until the soap is off, put it in the drying rack. If you want to design software to implement this you have options. You...
Introduction to Microcontrollers - More On GPIO
Now that we have our LED Blinky program nailed down, it's time to look more closely at outputs, add button/switch inputs, and work with reading inputs and driving outputs based on those inputs.
It's ON - No, It's OFF - No, It's ON...I have to confess, I cheated. Well, let's say I glossed over something very important. In our LED Blinky program, we never cared about whether an output '1' or an output '0' turned on the LED. Since we were just...
Unit Tests for Embedded Code
I originate from an electrical engineering background and my first industry experience was in a large, staid defense contractor. Both of these experiences contributed to a significant lack of knowledge with regards to software development best practices. Electrical engineers often have a backwards view of software in general; large defense contractors have similar views of software and couple it with a general disdain for any sort of automation or ‘immature’ practices. While there...
New Code Snippet Section
Following the success of the code snippet section on DSPRelated.com, I am happy today to announce the launch of the code snippet section on EmbeddedRelated.com.
If you have a piece of code that you would like to share with the Embedded Systems community, please go ahead and fill the form.
If the piece of code you submit is approved, you will be sent $10 through Paypal.
If...
Two jobs
For those of you following closely embeddedrelated and the other related sites, you might have noticed that I have been less active for the last couple of months, and I will use this blog post to explain why. The main reason is that I got myself involved into a project that ended up using a better part of my cpu than I originally thought it would.
edit - video of the event:
I currently have two jobs: one as an electrical/dsp engineer recycled as a web publisher and the other...
October winner announced
If you are a regular visitor of EmbeddedRelated, you are most likely aware that I have been running monthly draws lately for users of the site who are helping me to clean up the archives by rating threads in the forums section.
For the month of August, the member "Cryptoman" won a iPad, and for the month of September, 10 members won $50 each.
For October, the winner of the new iPod Touch is the member with the username "hssathya".
The winner of the next draw will win...
Behold, the New Comments System!
I have just finished implementing a new system for commenting the blogs. It uses Ajax extensively, so the page won't reload if you post a comment. And it is a 'threaded' system, which means that if you post a reply to a comment, it will be attached to it.
What do you think? I personally love it. Please go ahead and test it with a quick comment.
Although it is better to be logged in to post a comment, non-registered users can also comment, but they will have...
Best Embedded Systems pdf Documents Out There
There are thousands of pdf documents related to Embedded Systems available online. In fact, when I do a search in Google for:
embedded systems filetype:pdf
I get 4,340,000 results! A huge mix of articles, promotional documents, theses, etc.
Out of these 4 millions+ documents, I suspect that there must be at least a few hundreds jewels that deserve to be given more visibility.
Today, I am asking for your help (again!) to build a directory of some of the most useful pdf files out...
New Discussion Group for Users of TI ARM based MCUs
If you are a user of an ARM based TI Microcontroller, please feel free to join the new "TI ARM processors MCUs" discussion group by sending a blank email to: tiarm-subscribe@yahoogroups.com This discussion group will be moderated, so you don't have to worry about receiving more spam than you probably already get. It usually takes a few weeks for a group to gain momentum, so don't worry if the activity level is low for a little while, but make sure to join so you don't miss the good...
New TI MCU Resource Center
I am happy to announce the publication of the new "TI MCU Resource Center" on EmbeddedRelated.com, where TI will regularly add videos and articles to keep you informed on their latest and greatest MCU related products.
To access the new section, you'll find a link in the main menu of the site at the top of the page.
Blogs Section Now Online!
I am happy to announce that the blog section is now online.
Last week, I sent an email to all the members of EmbeddedRelated.com to ask for embedded systems experts who would be interested in blogging on the site. The response was very positive and I have selected 10 highly qualified individuals who will soon be writing here about all sorts of embedded systems related subjects. I am currently in the process of receiving their info (bio, photo, username, etc) and creating their bloggers'...