Microcontroller Programming without IDE (Makefile + Toolchain) | Embedded System Project Series #5

Publié le: 20 juillet 2022
sur la chaîne: Artful Bytes
21,200
737

There are two common ways to set up a development environment for a microcontroller (embedded) project:

IDE - Use the integrated development environment (IDE) provided by the vendor.
CLI - Use the toolchain from the command-line (CLI), build with make (Makefile), and use your code editor of choice.

In the last video, I focused on the first approach and set up an IDE, Code Composer Studio (CCStudio). In this video, I focus on the second approach. I talk about toolchains, the advantages of building from the command-line, and show how to install a GCC-based toolchain and use it to compile the same blink LED project (MSP430) as in the last video. Finally, I create a Makefile from scratch to make building easier.

0:00 Intro
1:00 Video outline
2:18 Why build from command-line?
4:10 Toolchains
06:48 Download GCC-based toolchain
09:15 Build blink project with gcc
15:35 Compiler options
20:30 Add more source files
24:10 Vim editor
25:01 Makefile intro
26:35 Create new Makefile
28:41 Add variables
30:07 More compiler flags
33:31 Separate compilation and linking
35:54 Pattern rule
36:46 Automatic variables
37:52 Put build files in separate directory
40:30 Substitution reference and patsubst
43:01 Phony targets all and clean
44:37 Flash microcontroller using make
47:10 Makefile finished
47:51 What about CMake?
49:01 Recap
49:38 General advice

🖥️ Code
https://gist.github.com/niklasab/78b1...

🌍 Links mentioned in this video
https://interrupt.memfault.com/blog/b...
https://www.artfulbytes.com/makefile-...

⌨️ My development environment
https://www.artfulbytes.com/devenv

🌍 Links
GitHub - https://github.com/artfulbytes
Website - https://www.artfulbytes.com

👨‍💻 About me
Hi and welcome. I'm Niklas, an embedded systems engineer from Sweden. On this channel, I make practical videos about embedded systems or, in general terms, about building and programming hardware.


Sur cette page du site, vous pouvez voir la vidéo en ligne Microcontroller Programming without IDE (Makefile + Toolchain) | Embedded System Project Series #5 durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Artful Bytes 20 juillet 2022, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 21,200 fois et il a aimé 737 téléspectateurs. Bon visionnage!