Follow Us
Categories
Archives
- February 2024
- January 2024
- August 2023
- December 2022
- November 2022
- October 2022
- February 2022
- October 2021
- September 2021
- August 2021
- July 2021
- June 2021
- May 2021
- January 2021
- November 2020
- October 2020
- August 2020
- April 2020
- February 2020
- January 2020
- October 2019
- September 2019
- July 2019
- May 2019
- April 2019
- March 2019
- February 2019
- January 2019
- December 2018
- October 2018
- September 2018
- August 2018
- July 2018
- April 2018
- February 2018
- January 2018
- December 2017
- November 2017
- October 2017
- September 2017
- August 2017
- July 2017
- June 2017
- May 2017
- April 2017
- March 2017
- February 2017
- January 2017
- December 2016
- November 2016
- October 2016
- September 2016
- August 2016
- July 2016
- April 2016
- January 2016
- December 2015
- November 2015
- October 2015
- September 2015
- August 2015
- July 2015
- June 2015
- May 2015
- January 2015
- December 2014
- November 2014
- October 2014
- September 2014
- August 2014
- July 2014
- June 2014
- May 2014
- April 2014
- March 2014
- February 2014
- January 2014
- November 2013
- September 2013
- August 2013
- July 2013
- June 2013
- May 2013
- April 2013
- February 2013
- January 2013
- November 2012
- October 2012
- August 2012
- July 2012
- June 2012
- May 2012
- April 2012
- March 2012
- December 2011
- November 2011
- June 2011
- May 2011
- April 2011
- March 2011
- February 2011
- January 2011
- December 2010
- November 2010
- October 2010
- September 2010
- August 2010
- July 2010
- June 2010
- May 2010
- April 2010
- March 2010
- February 2010
- January 2010
- December 2009
- November 2009
- October 2009
- September 2009
Author Archives: Niall Cooling
Updated: Developing a Generic Hard Fault handler for ARM Cortex-M3/Cortex-M4 using GCC
The original article was first posted back in 2013. Since posting I have been contacted many times regarding the article. One re-occuring question has been “How do I do this using GCC?”. So I thought it was about time I updated the article using GCC.
GNU Tools for ARM Embedded Processors
The original article used the Keil toolchain, here I am using arm-none-eabi-gcc. One of the major benefits of CMSIS is that almost all the code from the original posting will compile […]
Code Quality – Cyclomatic Complexity
In the standard ISO 26262-6:2011 [1] the term “complexity” appears a number of times, generally in the context of reducing or lowering said complexity.
There are many different ways of defining “complexity”, for example, Fred Brooks, in his 1986 landmark paper, “No Silver Bullet — Essence and Accidents of Software Engineering” asserts that there are two types of complexity; Essential and Accidental. [2]
Rather than getting into esoteric discussion about design complexity, I’d like to focus on code complexity.
Over the years, I […]
Posted in Agile, C/C++ Programming, General, Testing
Tagged cyclomatic complexity, McCabe, Static Analysis
Leave a comment
Bugs do matter…(unsurprisingly)
Welcome to 2018! How did that happen?
Thank you to everyone who attended last week’s webinar on “Measuring Software Quality“, and thank you for the positive feedback, it really does help us shape our future webinars/blogs.
During the talk, I discussed a suggestion by Sally Globe, along the lines of “Bugs don’t matter”/”Perfect software is the enemy of rapid deployment” as long as you are “Not wrong long”, which came from an initial exchange on Twitter back last year:The caveat was this […]
An Introduction to Docker for Embedded Developers – Part 4 Reducing Docker Image Size
In Part 3 we managed to build a Docker image containing the tools required to compile and link C/C++ code destined for our embedded Arm target system. However, we’ve paid little attention to the size of the image. Doing a quick Docker image listing we can see its grown to a whopping 2.14GB:
$ docker image ls
REPOSITORY TAG IMAGE ID […]
An Introduction to Docker for Embedded Developers – Part 3 Cross-Compiling for Cortex-M
In the previous posting we looked at defining a custom Dockerfile where we can add specific tools (and their dependencies). From that we created a Docker image and this allowed us to build C/C++ code in a Docker container, ensuring a consistent build environment.
So far we have to build all our code using the native GCC toolchain which is part of the base Docker image (gcc:7.2). However, I want to be able to build an image I can download and run […]
An Introduction to Docker for Embedded Developers – Part 2 Building Images
In the initial post, we covered the basics of getting Docker setup and using an official base image for compilation.
But let’s suppose the base image doesn’t include all the facilities our company uses for development. For example, we have migrated from make files to CMake, but more lately we have taken to using the python-based Scons build system for C/C++ projects.
The official gcc base image supports make but not Scons or CMake. As before, we can search for a Scons docker […]
An Introduction to Docker for Embedded Developers – Part 1 Getting Started
Docker is a relatively new technology, only appearing just over four years ago. The core building blocks have always been part of Unix; but the significant support, Linux containers (LCX), first appeared back in 2008.
Initially Docker was only supported on Linux, but more recently native support for OSX (my development OS of choice) and Windows (albeit Windows 10 Pro) suddenly opens up some interesting workflow choices.
The “What”
So, first, what is Docker? I’m always trying to find the right words here […]
Posted in Agile, Design Issues, Testing
6 Comments
‘Abusing’ the C switch statement – beauty is in the eye of the beholder
Before we start, let’s get something straight; for over 30 years now I have had a love-hate relationship with the C programming language. The ‘engineer’ in me[1] sometimes just cannot believe we are still using C as the dominant embedded programming languages after all these years, and yet, I also see the simplicity and elegance the C code can bring. After all it’s just a tool, and even a good tool in the wrong hands; well we have […]
Function Parameters and Arguments on 32-bit ARM
Function call basics
When teaching classes about embedded C or embedded C++ programming, one of the topics we always address is “Where does the memory come from for function arguments?“
Take the following simple C function:
void test_function(int a, int b, int c, int d);
when we invoke the function, where are the function arguments stored?
int main(void)
{
//…
test_function(1,2,3,4);
//…
}
Unsurprisingly, the most common answer after “I don’t know” is “the stack“; and of course if you were compiling for x86 this would […]
My Top 5 Podcasts
For the final blog post of the year I’ve decided to do something a little different; I hope that’s okay?
Due to the nature of the job, the technical team at Feabhas spend a lot of time travelling. This means many an hour spent in the car driving to and from client sites; often involving navigating the wonderful M25 London orbital [car park!]. We all while away this time in different ways, some prefer music, others radio (which, being in the […]