EmbeddedRelated.com

Analyzing the Linker Map file with a little help from the ELF and the DWARF

Govind Mukundan December 27, 201522 comments

When you're writing firmware, there always comes a time when you need to check the resources consumed by your efforts - perhaps because you're running out of RAM or Flash or you want to optimize something. The map file generated by your linker is a useful tool to aid in the resource analysis. I wanted to filter and sort the data generated in an interactive way so I wrote a C# WinForms application that reads the data from the map and presents it in a list view (using the awesome


Mounting plate for Arduino

Ed Nutter November 30, 2015

While having a breadboard with your microcontroller is necessary, it is very cumbersome if the two aren't fastened together somehow. You can buy mounting plates, but I choose to make one.


Cortex-M Exception Handling (Part 1)

Ivan Cibrario Bertolotti November 28, 20152 comments

This article describes how Cortex-M processors handle interrupts and, more generally, exceptions, a concept that plays a central role in the design and implementation of most embedded systems.


Trust, but Verify: Examining the Output of an Embedded Compiler

Jason Sachs September 27, 2015

I work with motor control firmware on the Microchip dsPIC33 series of microcontrollers. The vast majority of that firmware is written in C, with only a few percent in assembly. And I got to thinking recently: I programmed in C and C++ on an Intel PC from roughly 1991 to 2009. But I don’t remember ever working with x86 assembly code. Not once. Not even reading it. Which seems odd. I do that all the time with embedded firmware. And I think you should too. Before I say why, here are...


Improving the Reload2 active load

Fabien Le Mentec April 23, 2015
Introduction

With another colleague at work, we are currently developing an electronic board that will eventually be powered over Ethernet. To gain more experience with this technology, we prototyped a standalone power supply stage.

We want to test this stage with different load profiles. While we already have professional grade active loads at work, I had previously read about the Reload2 product from Arachnidlabs, a low cost active load sold on Hackaday:


Slew Rate Limiters: Nonlinear and Proud of It!

Jason Sachs October 6, 2014

I first learned about slew rate limits when I was in college. Usually the subject comes up when talking about the nonideal behavior of op-amps. In order for the op-amp output to swing up and down quickly, it has to charge up an internal capacitor with a transistor circuit that’s limited in its current capability. So the slew rate limit \( \frac{dV}{dt} = \frac{I_{\rm max}}{C} \). And as long as the amplitude and frequency aren’t too high, you won’t notice it. But try to...


Introduction to Microcontrollers - 7-segment displays & Multiplexing

Mike Silva August 14, 20142 comments

Doing the 7 Segment Shuffle

The 7 segment display is ubiquitous in the modern world.  Just about every digital clock, calculator and movie bomb has one.  The treadmills at my gym have 6 or 7, each one displaying 3 or 4 digits.  What makes the 7-seg interesting is that it presents an opportunity to make a trade off between GPIO (output pins) for time.  Every 7-seg display requires 8 outputs (the 7 segments and usually either a decimal point or a...


OOKLONE: a cheap RF 433.92MHz OOK frame cloner

Fabien Le Mentec August 12, 201417 comments
Introduction

A few weeks ago, I bought a set of cheap wireless outlets and reimplemented the protocol for further inclusion in a domotics platform. I wrote a post about it here:

//www.embeddedrelated.com/showarticle/620.php

Following that, I had access to another outlet from a different vendor:

http://www.castorama.fr/store/Prise-telecommandee-BLYSS---Interieur-prod4470027.html

The device documentation mentions that it operates on the same frequency as the previous...


Reverse engineering wireless wall outlets

Fabien Le Mentec July 19, 2014
Introduction

I am improving the domotics framework that I described in a previous article://www.embeddedrelated.com/showarticle/605.php

I want to support wireless wall outlets, allowing me to switch devices power from a remote location over HTTP.

To do so, I could design my own wireless wall outlets and use a hardware similar to the previous one, based on the NRF905 chipset. The problem is that such a product would not be certified, and that would be an issue regarding the home insurance,...


A wireless door monitor based on the BANO framework

Fabien Le Mentec June 10, 20145 comments
Introduction

I have been thinking for a while about a system to monitor the states of my flat and my garage doors from a remote place. Functionnaly, I wanted to monitor the state of my doors from a remote place. A typical situation is when I leave for holidays, but it can also be useful from the work office. To do so, I would centralize the information on a server connected on the Internet that I could query using a web browser. The server itself would be located in the appartement, where...


Trust, but Verify: Examining the Output of an Embedded Compiler

Jason Sachs September 27, 2015

I work with motor control firmware on the Microchip dsPIC33 series of microcontrollers. The vast majority of that firmware is written in C, with only a few percent in assembly. And I got to thinking recently: I programmed in C and C++ on an Intel PC from roughly 1991 to 2009. But I don’t remember ever working with x86 assembly code. Not once. Not even reading it. Which seems odd. I do that all the time with embedded firmware. And I think you should too. Before I say why, here are...


Round-robin or RTOS for my embedded system

Manuel Herrera June 9, 20198 comments

First of all, I would like to introduce myself. I am Manuel Herrera. I am starting to write blogs about the situations that I have faced over the years of my career and discussed with colleagues.

To begin, I would like to open a conversation with a dilemma that is present when starting a project ... must I use or not any operating system?

I hope it helps you to form your own criteria and above all that you enjoy it.

Does my embedded system need an...


Designing Communication Protocols, Practical Aspects

Fotis Chatzinikolaou May 14, 20192 comments

For most embedded developers always comes the time when they have to make their embedded MCU talk to another system. That other system will be a PC or a different embedded system or a smartphone etc. For the purpose of this article I am assuming that we are in the control of the protocol between the two ends and we don’t have to follow something that is already in place on one side.

So let’s say that we have our embedded MCU, we have implemented and configured the USB stack (or just...


C to C++: 3 Reasons to Migrate

Jacob Beningo October 31, 202222 comments

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 off a series...


C to C++: 5 Tips for Refactoring C Code into C++

Jacob Beningo July 23, 20235 comments

The article titled "Simple Tips to Refactor C Code into C++: Improve Embedded Development" provides essential guidance for embedded developers transitioning from C to C++. The series covers fundamental details necessary for a seamless transition and emphasizes utilizing C++ as a better C rather than diving into complex language features. The article introduces five practical tips for refactoring C code into C++. Replace #define with constexpr and const: Discouraging the use of #define macros, the article advocates for safer alternatives like constexpr and const to improve type safety, debugging, namespaces, and compile-time computation. Use Namespaces: Demonstrating the benefits of organizing code into separate logical groupings through namespaces, the article explains how namespaces help avoid naming conflicts and improve code readability. Replace C-style Pointers with Smart Pointers and References: Emphasizing the significance of avoiding raw pointers, the article suggests replacing them with C++ smart pointers (unique_ptr, shared_ptr, weak_ptr) and using references


Arduino robotics #3 - wiring, coding and a test run

Lonnie Honeycutt October 17, 2013
Arduino Robotics

Arduino robotics is a series of article chronicling my first autonomous robot build, Clusterbot.  This build is meant to be affordable, relatively easy and instructive.  The total cost of the build is around $50.  

1. Arduino robotics - motor control2. Arduino robotics - chassis, locomotion and power3. Arduino robotics - wiring, coding and a test run4. 

Creating a Hardware Abstraction Layer (HAL) in C

Jacob Beningo October 23, 20233 comments

In my last post, C to C++: Using Abstract Interfaces to Create Hardware Abstraction Layers (HAL), I discussed how vital hardware abstraction layers are and how to use a C++ abstract interface to create them. You may be thinking, that’s great for C++, but I work in C! How do I create a HAL that can easily swap in and out different drivers? In today’s post, I will walk through exactly how to do that while using the I2C bus as an example.


Choosing a Microcontroller for Your Vehicle

Ed Nutter June 7, 20161 comment

There are many things to take into consideration when choosing a microcontroller or microprocessor for your autonomous vehicle.

Voltage

Some processors run on 5V and others use 3.3V.  Be sure to check the documentation before you buy.  Make sure your supply has a high enough amp rating that your microcontroller doesn't lose pwer.

Power

Can the system run using batteries?  Large, automotive sized vehicles can be run from large batteries or inverters in the vehicle.  Smaller...


Improving the Reload2 active load

Fabien Le Mentec April 23, 2015
Introduction

With another colleague at work, we are currently developing an electronic board that will eventually be powered over Ethernet. To gain more experience with this technology, we prototyped a standalone power supply stage.

We want to test this stage with different load profiles. While we already have professional grade active loads at work, I had previously read about the Reload2 product from Arachnidlabs, a low cost active load sold on Hackaday: