Zephyr: West Manifest For Application Development
In this blog post, I show a simpler way to create custom West manifest files. This technique eliminates the need to duplicate the complex West manifest from upstream Zephyr. I also show how we can use the West manifest to include out-of-tree board and SoC definitions, and include our own out-of-tree drivers.
Simulating Your Embedded Project on Your Computer (Part 2)
Having a simulation of your embedded project is like having a superpower that improves the quality and pace of your development ten times over! To be useful, though, it can't take longer to develop the simulation than it takes to develop the application code and for many simulation techniques "the juice isn't worth the squeeze"! In the last article, I showed you how to use the terminal (i.e. printf/getchar) to easily make a completely functional simulation. In this article, we'll take simulation to the next level, either in terms of realism (by using virtual hardware) or in terms of user experience (by using a GUI to simulate our hardware, instead of using the terminal).
In TCL FPGA Wizards Trust
In TCL FPGA wizards trust. The best way to learn TCL is exposure therapy which we will be doing here using two examples: One for creation of a project with synthesis and implementation steps and another for simulation.
Product quality: belief or proof?
Embedded software development is a challenging activity, so it is essential to have tools and IP that is of the best quality. However, assessing that quality can be, in itself, a challenge.
Simulating Your Embedded Project on Your Computer (Part 1)
Having a simulation of your embedded project is like having a superpower that improves the quality and pace of your development ten times over! To be useful, though, it can't take longer to develop the simulation than it takes to develop the application code and for many simulation techniques "the juice isn't worth the squeeze"! In this two-part blog series, I'll share with you the arguments in favor of simulation (so, hopefully, you too believe in its value) and I'll show you what works (and what doesn't work) to help you to simply, easily, and quickly simulate your embedded project on your computer.
Understanding Yocto Project Layers: A Modular Approach to Embedded Systems Development
In the world of embedded systems, flexibility and modularity are key to managing complex projects efficiently. The Yocto Project, a powerful build system for creating custom Linux distributions, embraces this philosophy through the use of layers. These layers are essentially sets of repositories that contain the instructions and metadata required to build a specific target image. By leveraging layers, developers can modularize their projects, reusing and sharing previously developed metadata...
Small or fast?
Developers of software for desktop computers take code optimization for granted. Embedded developers typically need to pay much more attention to the details
Stand-by or boot-up
Many factors affect the usability of devices - a key one is how long it takes to start up.
Write Better Code with Block Diagrams and Flowcharts
Reading and writing code without architectural diagrams is like trying to follow complex instructions without any explanatory pictures: nigh impossible! By taking the time to draw out the block diagrams and flowcharts for your code, you can help identify problems before they arise and make your code easier to design, write, test, and debug. In this article, I'll briefly justify the importance of architectural drawings such as block diagrams and flowcharts and then teach you what they are and how to draw them. Using two simple examples, you'll see first-hand how these drawings can significantly amplify your understanding of a piece of code. Additionally, I'll give you a few tips for how to implement each drawing once you've completed it and I'll share with you a few neat tools to help you complete your next set of drawings.
Some Embedded System Software Design Resources
I recently received a message from an embedded systems engineer in England asking about a good resource for embedded system software design and easing debugging difficulties.
That's challenging because embedded systems cover such a wide range. There are many possible run-time environments and architectures.
Thus there's no single resource that covers all ground. However, the resources below provide a lot of good material. In aggregate, they make up a good set from which to pull various...
Simulating Your Embedded Project on Your Computer (Part 2)
Having a simulation of your embedded project is like having a superpower that improves the quality and pace of your development ten times over! To be useful, though, it can't take longer to develop the simulation than it takes to develop the application code and for many simulation techniques "the juice isn't worth the squeeze"! In the last article, I showed you how to use the terminal (i.e. printf/getchar) to easily make a completely functional simulation. In this article, we'll take simulation to the next level, either in terms of realism (by using virtual hardware) or in terms of user experience (by using a GUI to simulate our hardware, instead of using the terminal).
In TCL FPGA Wizards Trust
In TCL FPGA wizards trust. The best way to learn TCL is exposure therapy which we will be doing here using two examples: One for creation of a project with synthesis and implementation steps and another for simulation.
Chebyshev Approximation and How It Can Help You Save Money, Win Friends, and Influence People
Well... maybe that's a stretch. I don't think I can recommend anything to help you win friends. Not my forte.
But I am going to try to convince you why you should know about Chebyshev approximation, which is a technique for figuring out how you can come as close as possible to computing the result of a mathematical function, with a minimal amount of design effort and CPU power. Let's explore two use cases:
- Amy has a low-power 8-bit microcontroller and needs to compute \( \sqrt{x} \)...
Analyzing the Linker Map file with a little help from the ELF and the DWARF
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
Some Embedded System Software Design Resources
I recently received a message from an embedded systems engineer in England asking about a good resource for embedded system software design and easing debugging difficulties.
That's challenging because embedded systems cover such a wide range. There are many possible run-time environments and architectures.
Thus there's no single resource that covers all ground. However, the resources below provide a lot of good material. In aggregate, they make up a good set from which to pull various...
Simulating Your Embedded Project on Your Computer (Part 1)
Having a simulation of your embedded project is like having a superpower that improves the quality and pace of your development ten times over! To be useful, though, it can't take longer to develop the simulation than it takes to develop the application code and for many simulation techniques "the juice isn't worth the squeeze"! In this two-part blog series, I'll share with you the arguments in favor of simulation (so, hopefully, you too believe in its value) and I'll show you what works (and what doesn't work) to help you to simply, easily, and quickly simulate your embedded project on your computer.
Embedded Systems Roadmaps
What skills should every embedded systems engineer have? What should you study next to improve yourself as an embedded systems engineer? In this article I'll share with you a few lists from well-respected sources that seek to answer these questions, with the hope of helping provide you a path to mastery. Whether you've only just finished your first Arduino project or you've been building embedded systems for decades, I believe there's something in here for everyone to help improve themselves as embedded systems engineers.
So You Want To Be An Embedded Systems Developer
Contents:- Introduction
- What's An Embedded System?
- Hobbyist vs. Professional Hardware
- The Primary Resources
- Some Advanced Resources
- Some Hardware
- Glossaries
- Other Links
- Final Thought
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.
Important Programming Concepts (Even on Embedded Systems) Part I: Idempotence
There are literally hundreds, if not thousands, of subtle concepts that contribute to high quality software design. Many of them are well-known, and can be found in books or the Internet. I’m going to highlight a few of the ones I think are important and often overlooked.
But first let’s start with a short diversion. I’m going to make a bold statement: unless you’re a novice, there’s at least one thing in computer programming about which you’ve picked up...
Analyzing the Linker Map file with a little help from the ELF and the DWARF
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
Chebyshev Approximation and How It Can Help You Save Money, Win Friends, and Influence People
Well... maybe that's a stretch. I don't think I can recommend anything to help you win friends. Not my forte.
But I am going to try to convince you why you should know about Chebyshev approximation, which is a technique for figuring out how you can come as close as possible to computing the result of a mathematical function, with a minimal amount of design effort and CPU power. Let's explore two use cases:
- Amy has a low-power 8-bit microcontroller and needs to compute \( \sqrt{x} \)...
Understanding and Preventing Overflow (I Had Too Much to Add Last Night)
Happy Thanksgiving! Maybe the memory of eating too much turkey is fresh in your mind. If so, this would be a good time to talk about overflow.
In the world of floating-point arithmetic, overflow is possible but not particularly common. You can get it when numbers become too large; IEEE double-precision floating-point numbers support a range of just under 21024, and if you go beyond that you have problems:
for k in [10, 100, 1000, 1020, 1023, 1023.9, 1023.9999, 1024]: try: ...Zebras Hate You For No Reason: Why Amdahl's Law is Misleading in a World of Cats (And Maybe in Ours Too)
I’ve been wasting far too much of my free time lately on this stupid addicting game called the Kittens Game. It starts so innocently. You are a kitten in a catnip forest. Gather catnip.
And you click on Gather catnip and off you go. Soon you’re hunting unicorns and building Huts and studying Mathematics and Theology and so on. AND IT’S JUST A TEXT GAME! HTML and Javascript, that’s it, no pictures. It’s an example of an
Using the Beaglebone PRU to achieve realtime at low cost
IntroductionI work as an engineer in a synchrotron facility. A few weeks ago, I helped the people in charge of the power supply developments to integrate a realtime control algorithm on a prototype platform: a BeagleBone Black (BBB) running Linux. I had already worked with this board in the past, and I found it very interesting given its excellent resources versus price ratio (around 40 euros). This time, I was impressed by its realtime capabilities. I thought it would be a good idea to...
Coroutines in one page of C
A coroutine is a function that you can jump back into after returning from it - and it remembers where it was in the code, and all the variables. This is very useful at times.
One use is generating a sequence of values. Here's how you can generate all the x,y pairs in a 2D range in Python:
def iterate(max_x, max_y): for x in range(max_x): for y in range(max_y): yield x,y for x,y in iterate(2,2): print x,yThis prints:
0 0 0 1 1 0 1 1The yield keyword is like...
So You Want To Be An Embedded Systems Developer
Contents:- Introduction
- What's An Embedded System?
- Hobbyist vs. Professional Hardware
- The Primary Resources
- Some Advanced Resources
- Some Hardware
- Glossaries
- Other Links
- Final Thought
Important Programming Concepts (Even on Embedded Systems) Part I: Idempotence
There are literally hundreds, if not thousands, of subtle concepts that contribute to high quality software design. Many of them are well-known, and can be found in books or the Internet. I’m going to highlight a few of the ones I think are important and often overlooked.
But first let’s start with a short diversion. I’m going to make a bold statement: unless you’re a novice, there’s at least one thing in computer programming about which you’ve picked up...
Using the C language to program the am335x PRU
IntroductionSome weeks ago, I published an article on how we used the PRU to implement a power supply control loop having hard realtime constraints:
//www.embeddedrelated.com/showarticle/586.php
Writing this kind of logic in assembly language is not easy. First the assembly language itself may be difficult to learn depending on your background. Then, fixed and floating point arithmetics require lot of code. While macros help to handle the complexity, they still are error prone as you...
C++ on microcontrollers 1 - introduction, and an output pin class
This blog series is about the use of C++ for modern microcontrollers. My plan is to show the gradual development of a basic I/O library. I will introduce the object-oriented C++ features that are used step by step, to provide a gentle yet practical introduction into C++ for C programmers. Reader input is very much appreciated, you might even steer me in the direction you find most interesting.
I am lazy. I am also a programmer. Luckily, being a lazy...