VS Code for embedded programming // Arduino, Pico with C/C++

preview_player
Показать описание
#vscode #embedded #cpp
I have been using VS Code exclusively for programming microcontrollers like Arduino, Raspberry Pi Pico, etc. We will explore the setting and extensions in VS Code so that we can use them to edit, format, code completion, or even find function definitions. VS Code is increasingly having more features especially for embedded programming with C/C++.

⏰ TIMESTAMPS
0:00 Intro
02:11 Access commands and files
03:04 Extensions related to embedded
04:09 Customising settings in JSON format
05:53 Font-family with Fira code and ligatures
06:36 Code formatting with Google C++ style guide
08:26 cpplint and filters
09:43 Intellisense for code hinting and completion
12:38 Intellisense with Raspberry PI Pico C/C++ SDK
14:07 Intellisense with Arduino external libraries
17:35 Autocomplate strings, comments and others
18:42 SSH Remote for Single Board computers
20:32 Outro and my thoughts on trying out new ways

‣ Some links below are affiliate. I receive a small commission at no extra cost to you.

📻 PRODUCTS MENTIONED

🎩 DEMO FILES

📺 WATCH NEXT

🔗 LINKS SHOWN

🔌 TOOLS USED
Рекомендации по теме
Комментарии
Автор

Impeccable timing. I installed and configured the few extra extensions I didn't already have on my Linux workstation. I also had already followed the default instructions from Espressif for installing the ESP IDF and added their extension for VS Code as well so when configuring for ESP32 I just used the one entry where anyone copying this needs to manually replace $USER with their actual user name/account on their Linux system:



so my full entry looks like this:

"C_Cpp.default.browse.path": [
"${workspaceRoot}",
"/opt/arduino-1.8.13/hardware/arduino/**",
"/opt/arduino-1.8.13/hardware/tools/**",

],

IIRC you can use ** at the end of the directories when configuring VS Code. I did this and it seems to be working on my Linux just fine. Saved me from typing dozens upon dozens of entries for the ESP32 (I did a find | grep -i ".h$" within the esp directory and jaw dropped at all the sub-directories with includes; I'm glad I tried ** and let intellisense deal with it). I did the same to shorten your Arduino path examples. I may have to test some more as I did start by typing in about 10 sub-directory entries so want to be sure it didn't cache those and showed the same results after deleting them and replacing with the single entry.

'Fira Code' font was a bit quirky. I had an instance of VS Code up when I installed and after editing the config it rendered font in the default serif broken font. I thought I typed the config wrong but all it needed was to stop the instance of VS Code and run it again then it displayed the Fira Code just fine.

Thank you for the hints. I just used VS Code before as is with defaults, its good to dive a bit deeper into it.

pd
Автор

Super nice!! Surely starting to try this. One million thanks :)

stereo
Автор

Your videos are really helpful. Just started working in a similar domain, helps a lot :)

V
Автор

You are working on hardware as well as in software? :) BTW, good video about KiCad :)

Antyelektronika
Автор

I love your videos, always interesting and very helpful!
I was wondering, what theme are you using with iTerm? And how did you set it up?

stephanemuller
welcome to shbcf.ru