C++ pitfalls – Memory allocation from interrupts

Modern C++ programming very much abstracts what is happening “under the hood” – i.e. what code the CPU is actually executing. This is nice for the programmer … if it works well. Unfortunately, C++ also introduces a stability problem in embedded systems. Many programmers are unaware of this problem. This post gives some background, explains […]

Every byte counts – Floating-point in less than 1 KB

How expensive in terms of code size are floating-point operations if the CPU does not have an floating-point unit (FPU)? In this article, I will investigate, based on Embedded Studio for ARM and a generic Cortex-M3 device, how big (or small) an entire application using basic float operations, add, sub, mul, and div, can be. […]

Every byte counts – Smallest “Hello world”

When searching on-line for small C-programs, there seems to be a lot of confusion about what is doable and what is not. There are a lot of posts wondering why even for  minimal programs such as “Hello world” applications are so big, but not many explanations or fixes. I will show how to make a […]

Profiling and Code coverage on RISC-V using simulation

We recently licensed our Floating point library for RISC-V to a large international corporation. They asked not only for our functional verification suite, but also for a verification of the verification suite. A code coverage report showing that the entire code had been executed. While we know that all lines and every instruction have been […]

SEGGER in times of the coronavirus / COVID-19

The idea of this blog is to give readers a glimpse of the plans and inner workings at SEGGER, what we’re working on, what we’re thinking, what’s going on, and what’s cooking. These days, unfortunately, that includes dealing with the coronavirus. I think everybody by now understands that this virus is not just a regular […]

The SEGGER Compiler

At SEGGER, we use our own tools to establish an internal feedback loop. This is extremely helpful in creating and fine-tuning our products. A significant amount of engineering time and effort is put into making our IDE Embedded Studio better and better, every day. Embedded Studio is easy to download and install, cross-platform, very fast, […]

Floating-point face-off, part 2: Comparing performance

I used to think that floating-point was not for Embedded Systems. Too slow, too much code overhead and rounding is always a problem. It turns out that while scaled integers still have a performance benefit, floating-point computations can be done with a surprisingly high performance these days on modern Embedded CPUs. This is true not […]

Finding the right (Q)SPI Flash for your project

Not all SPI Flashes are created equal SPI Flashes have become very popular as an inexpensive way to add nonvolatile storage (flash memory) to an Embedded System. They come in various capacities, so increasing memory is fast and easy. Any microcontroller can interface to them via SPI or QSPI peripheral interfaces, or simple general purpose […]