![]() Linker script defines addresses and sizes of all sections, ie. I will explain which files are needed for the EFM32GG and which one can be skipped. The SDK for EFM32 is called “Gecko SDK” and can be downloaded straight from Github. This is one way of organizing the project files: I will refer to the firmware directory as “project directory” or “root directory”. The path to the bin directory of the toolchain has to be added to $PATH shell variable, so that it can be used without typing the whole path. I choose the Linux ZIP file and unpack it either to /opt/toolchains or somewhere in my home directory. The MCU is an ARM Cortex-M, so my preferred toolchain is GNU Arm Embedded straight from ARM. The toolchain is a name for compiler + assembler + linker + some other utilities that are used to make application binaries. Coincidentally, Simplicity Studio (the official IDE for EFM32) had problems downloading the SDK on my Gentoo due to some SWT bugs (my system is “too new”). The target device will be an EFM32GG332F512. I will show step-by-step how to assemble a standalone project with “bare hands”. When was the last time you have accidentally shipped a debug version? Or version with untested features? The less manual steps, the less opportunities for mistakes. The whole release process can be automated.An automated project can use automatic testing (for example: unit tests, hardware-in-the-loop testing).An automated project can use a build server common to all developers (less surprises with code that “works on my machine”™).It can also be done with a headless Eclipse CDT builder, but good luck with all the proprietary add-ons on a headless server □ make is a standard tool that has proven its worth (and very likely will still be used in the future).You control the whole situation – the libraries, the compilers, the scripts (and also have to carry out the maintenance yourself!).Benefits of a standalone project and own build system It was a mild hiccup (and some lost hours) that made me realize that, for long-term serious projects, I had to rely on my own tools. The IDE downloaded the SDK the first time it was run and it always downloaded the latest version. SDK was not part of the project, but part of the IDE. It took me and him some time to analyze the problem – it turned out that the SDK on his machine was newer and there were some API changes. After some more time I got back to the project, pulled the latest version only to find out that it does not build. Of course he also used the official tools. Some time later I was transferred to a different project and another developer took over. Of course I started by downloading the official tools, setting up a project, implementing some stuff, pushing it to the repository. Once, I was involved in a project using EFM32 (this it the main reason for this article!). I have seen at work many of the problems listed above, like engineers scrambling to find a Windows 2000 machine or VM (because it was the latest OS that the exotic tools could run on and they were lucky enough to have the original installation discs). How will the device behave when built with new/different tools? Will it have to be re-certified? Is there even a budget for that? War stories.Will the code compile with a new toolchain?.If only the latest version of the tools is available – will it open my project at all?.Where do I download all this stuff from after 10 years?.Will this particular SDK and libraries still be compatible with rest of my project after 10 years?.Will the IDE still support my (obsolete) chip after 10 years?.Will the IDE still still run on my operating system in 10 years from now?. ![]() Some problems that may pop up when the customer asks you to develop a new, small feature (or fix a bug): Embedded systems often have very long support lifetimes (10+ years). To build your project in an Eclipse-based IDEs with proprietary add-ons you have to rely on the supplier. IDEs are commonly based on Eclipse and creating a project for almost any chip in those IDEs is usually just a click away, so why would you ever want to make such a project from scratch, gather all header files, libraries and scripts? Read to find out why and how □ Most popular microcontrollers come with IDEs and tools provided by the manufacturer, like NXP, STM, TI or Silicon Labs. ![]()
0 Comments
Leave a Reply. |