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

Опубликовано: 20 Июль 2022
на канале: 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.


Смотрите видео Microcontroller Programming without IDE (Makefile + Toolchain) | Embedded System Project Series #5 онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Artful Bytes 20 Июль 2022, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 21,20 раз и оно понравилось 73 людям.