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.
Auf dieser Seite können Sie das Online-Video Microcontroller Programming without IDE (Makefile + Toolchain) | Embedded System Project Series #5 mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Artful Bytes 20 Juli 2022 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 21,200 Mal angesehen und es wurde von 737 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!