Category Archives: gcc

Linux Fu: Shell Scripts in C, C++, and Others

At first glance, it might not seem to make sense to write shell scripts in C/C++. After all, the whole point to a shell script is to knock out something quick and dirty. However, there are cases where you might want to write a quick C program to do something …read more

Continue reading

Posted in bash, c++, gcc, Hackaday Columns, linux, linux hacks, scripting, Skills | Leave a comment

Lambdas for C — Sort Of

A lot of programming languages these days feature lambda functions, or what I would be just as happy to call anonymous functions. Some people make a big deal out of these but the core idea is very simple. Sometimes you need a little snippet of code that you only need …read more

Continue reading

Posted in c++, Featured, gcc, lambda, lambda function, Original Art, Skills, software hacks | Leave a comment

Tracking Binary Changes: Learn the DIFF-erent Ways of the ELF

Source control is often the first step when starting a new project (or it should be, we’d hope!). Breaking changes down into smaller chunks and managing the changes between them makes it easier to share work between developers and to catch and revert mistakes after they happen. As project complexity …read more

Continue reading

Posted in arm, automatic builds, ci, continuous integration, gcc, Jenkins, linker, linker script, map file, mapfile, Microcontrollers, Software Development, source control | Leave a comment

Quadcopter Uses Bare Metal STM32

[Tim Schumacher] got a Crazepony Mini quadcopter and has been reprogramming it “bare metal” — that is to say he’s programming the STM32 without using an operating system or do-it-all environment. His post on the subject is a good reference for working with the STM32 and the quadcopter, too.

If …read more

Continue reading

Posted in arm, bluepill, crazepony mini, drone, drone hacks, gcc, quadcopter, stm32, uav | Leave a comment

Crash your code – Lessons Learned From Debugging Things That Should Never Happen™

Let’s be honest, no one likes to see their program crash. It’s a clear sign that something is wrong with our code, and that’s a truth we don’t like to see. We try our best to avoid such a situation, and we’ve seen how compiler warnings and other static code analysis tools can help us to detect and prevent possible flaws in our code, which could otherwise lead to its demise. But what if I told you that crashing your program is actually a great way to improve its overall quality? Now, this obviously sounds a bit counterintuitive, after all …read more

Continue reading

Posted in c programming, clang, code analysis, debugging, Featured, gcc, programming, Skills, Software Development, software quality | Leave a comment

Warnings On Steroids – Static Code Analysis Tools

A little while back, we were talking about utilizing compiler warnings as first step to make our C code less error-prone and increase its general stability and quality. We know now that the C compiler itself can help us here, but we also saw that there’s a limit to it. While it warns us about the most obvious mistakes and suspicious code constructs, it will leave us hanging when things get a bit more complex.

But once again, that doesn’t mean compiler warnings are useless, we simply need to see them for what they are: a first step. So today …read more

Continue reading

Posted in C language, c programming, clang, code analysis, gcc, lint, secure programming, Software Development, software quality | Leave a comment