Quantcast
Viewing all articles
Browse latest Browse all 5127

General programming discussion • Re: Your experience on migrating all development to VS Code?

For Python and C to be edited on RPi and executed on RPi pico, Googled and there are several ways. The new instruction as below from official RPi web will install all the needed dependency software (about a dozen) in a single action.

Quoted from https://www.raspberrypi.com/news/get-st ... d-vs-code/

"begin quote" -----You can find the store entry at magpi.cc/vscodeext. You can find the extension source code and release downloads at magpi.cc/picovscodegit. When installation completes, check the Activity sidebar (by default, on the left side of VS Code). If installation was successful, a new sidebar section appears with a Raspberry Pi Pico icon, labelled “Raspberry Pi Pico Project”. end-quote "

Click the "Raspberry Pi Pico icon" and you can hit either "New C/C++ Project" or "New MicroPython Project"

Bottom line Left side will show "Pico Connected" (previously loaded with either pico, pico w, pico 2, pico 2 w firmware)

Terminal will show "... Raspberry Pi Pico W with RP2040"

=========
For writing C code to be executed on RPi, do not enter the "Raspberry Pi Pico icon" (which is for C and Python to be executed on Pico).
If click on the 'extensions' icon (four squares), C/C++, CMake, Python and about 10 others would have been installed already.

For writing Python code to be executed on RPi with Python interpreter shown at bottom right (Python 3.11.2 64-bit, as of Nov 2024)
File New file, choose python file type,

For writing C to be executed on RPi
File New file, choose text type,
when asked to specify a language, choose C
RUN without debug
choose C++(GDB/LLDB)
choose C/C++:gcc-12 build and debug active file

Enjoy

Statistics: Posted by David16962 — Fri Nov 29, 2024 2:46 pm



Viewing all articles
Browse latest Browse all 5127

Trending Articles