An Easy Method to Compile the Raspberry Pi Pico C/C++ Code using VSCode and Pico SDK in Windows 10

Поделиться
HTML-код
  • Опубликовано: 10 окт 2024
  • An easy method to Compile the Raspberry Pi Pico C/C++ Code using VSCode and Pico SDK in Windows 10
    ======================================
    Article: www.eeweb.com/...
    ======================================
    Altium Designer + Legal License (Free): www.altium.com...
    ======================================
    Altium 365: www.altium.com...
    ======================================
    OctoPart: octopart.com
    ======================================
    Other Videos: bit.ly/2N9OlPa
    ======================================
    Raspberry Pi Pico is a cute piece of hardware. It has a powerful dual-core RP2040 microcontroller that offers 2MB (up to 16MB) Flash and 264K SRAM memories. But what truly sets the Pico apart is its adaptability. Equipped with a plethora of GPIO pins, SPI, I2C, and UART interfaces, this tiny board is ready to connect with a vast array of sensors, displays, and other peripherals. Such specifications make it suitable for a variety of hobby and industrial applications.
    There are many variants of the Raspberry Pi Pico on the market, but all come with the RP2040 microcontroller and differ in flash size, board shape, USB connector, … etc. Therefore, we essentially write a piece of code for the RP2040 MCU and there is a minor difference between the boards.
    There are three straightforward options to write the code for the Pico/RP2040: Arduino (C/C++), MicroPython (Thonny, MU Editor, ... etc.), and VSCode (C/C++). I prefer C/C++ for RP2040 over MicroPython because in some cases MicroPython limits the user, and available hardware libraries are also limited, but on the other side, configuring a Windows machine and VSCode IDE for the Pico is challenging. This article introduces a piece-of-cake method to overcome this problem.
  • НаукаНаука

Комментарии • 58

  • @MyVanitar
    @MyVanitar  7 месяцев назад +5

    An Easy Method to Compile the Raspberry Pi Pico C/C++ Code using VSCode and Pico SDK in Windows 10

  • @mh7369
    @mh7369 27 дней назад

    Thank you for a brilliant explanation, I've been struggling for a while to try and program the Pico using VS code with no success, came across your site today and gave it a try, it worked first time, excellent. 👍👍👍

  • @Aleziss
    @Aleziss 9 часов назад

    I'm only missing one step, once compile is done, how to upload in the pico ? sorry, newbie here ! great and finally a short tutorial for once ! tnx !

    • @MyVanitar
      @MyVanitar  19 минут назад

      go to the build folder and drag-drop/copy-paste the *.UF2 file into the Raspberry Pico folder (press the boot + reset to enter the flash mode)

  • @krios2905
    @krios2905 18 дней назад

    Thanks for the great and concise walk through! I have spent so much time with others and not getting to the point, this one is by far the most efficient, well done!

    • @MyVanitar
      @MyVanitar  18 дней назад

      Glad it was helpful!

  • @bullygram
    @bullygram 5 месяцев назад +5

    In an nutshell! This is what I wanted

    • @MyVanitar
      @MyVanitar  5 месяцев назад

      You're welcome

  • @luizcastro7039
    @luizcastro7039 7 месяцев назад +1

    great! thank you. Can you teach how to transfer to pico? I am trying platformio but it does no talks with SDK

    • @MyVanitar
      @MyVanitar  7 месяцев назад +2

      Thanks. It's simple, connect the Pico to the computer and boot it in Flash mode (a folder pops up in the Windows My Computer, similar to when you connect a USB flash memory). Then just Drag-drop or copy-paste the *.UF2 file to that folder. the Pico restarts itself and boots with the new code

    • @luizcastro7039
      @luizcastro7039 7 месяцев назад +1

      thank you, I notice that this instruction was in your article.... I had not read it!! but, is there a way to do it automatically, like platformio does?@@MyVanitar

    • @MyVanitar
      @MyVanitar  7 месяцев назад

      it's simple. just drag and drop (copy-paste). Just press the BOOT button and then the RESET button. Pico enters the Flash mode.

  • @peterguggenbach4264
    @peterguggenbach4264 4 месяца назад

    Best explanation I found to make this setup, congratulation!

    • @MyVanitar
      @MyVanitar  4 месяца назад

      Glad to hear that!

  • @elektron2kim666
    @elektron2kim666 Месяц назад

    Might change from the Arduino IDE at some point, but the binaries I created helped me a lot for now and my Pico's run MMBasic (like small computers.) It's a confusing subject and you helped a lot with this video. MicroPython or CircuitPython doesn't appeal to me.

    • @MyVanitar
      @MyVanitar  Месяц назад +1

      Thanks. I'm also a fan of Python, but if a library does not exist, it would be a problem. for the initial test, use my Cmake and main.c, but if you want to use the hardware features, you have to modify the Cmake, including libraries, path, headers,
      source files ... etc.

  • @juanc.morales7060
    @juanc.morales7060 2 месяца назад

    Hi man, this is a good way to program in C++, I´m also fan of using C++ and this ease that task, I like it very much. But I have a question: I use to program the Dev C++ from Embarcadero, is it possible to use this instead of VSCode? What is te consideration of one and another

    • @MyVanitar
      @MyVanitar  2 месяца назад +1

      it should work, follow the same process as I described. please do your first test with my main.c and CMake files

  • @glukasc
    @glukasc 3 месяца назад

    Thank you! C with Pi Pico disenchanted ;-)

  • @dabunnisher29
    @dabunnisher29 3 месяца назад

    This is a great tutorial man. Thank you sooooooo much!!!!

    • @MyVanitar
      @MyVanitar  3 месяца назад

      Glad you liked it!

  • @hadiborjkhani8462
    @hadiborjkhani8462 2 месяца назад

    It is awesome, thanks for creating this video!!!

    • @MyVanitar
      @MyVanitar  2 месяца назад

      Glad you liked it!

  • @mauriciorodrigues9991
    @mauriciorodrigues9991 7 месяцев назад +1

    Thanks.

    • @MyVanitar
      @MyVanitar  7 месяцев назад

      You're welcome

  • @eerrfanshayyestehh2069
    @eerrfanshayyestehh2069 7 месяцев назад +1

    Nice

  • @akhin5199
    @akhin5199 2 месяца назад

    Bro do using easy eda... Its much expense😢

    • @MyVanitar
      @MyVanitar  2 месяца назад

      to download my projects, you don't need to buy a license. just register on the website using the link in the video description

  • @RECOLONIZE_RIGHT
    @RECOLONIZE_RIGHT 6 месяцев назад +1

    getting -G Ninja excited with code: 1 error

    • @MyVanitar
      @MyVanitar  6 месяцев назад

      are you sure you followed all the steps correctly?

    • @laureanoquiroga9632
      @laureanoquiroga9632 2 месяца назад

      @@MyVanitar Hi! I have the same error code of this guy, i've followed every step, do u know what could be the problem?

    • @MyVanitar
      @MyVanitar  2 месяца назад

      @@laureanoquiroga9632 do you use my sample code? which command line you use to run the VSCode. the problem of that guy has been solved

    • @laureanoquiroga9632
      @laureanoquiroga9632 2 месяца назад +1

      @@MyVanitarSry, the problem was that i wasn't using your sample code, now i can run it but because im using the w version im having other issues, thanks for the help!

    • @MyVanitar
      @MyVanitar  2 месяца назад

      @@laureanoquiroga9632 if you use other hardware features of your Pico board, you must add the header in your C file and also inside CMake. it's not difficult, but a bit time-consuming on the first attempts. Pico examples might help you

  • @rikilshah
    @rikilshah 4 месяца назад

    Raspberry foundation has released a standalone Windows installer which does all of this in one single click. I would recommend using that as it really eases the SDK setup process.

    • @MyVanitar
      @MyVanitar  4 месяца назад +4

      please do not comment without watching the video!

    • @rikilshah
      @rikilshah 4 месяца назад +1

      @@MyVanitarDon’t be a jerk. I watched the video and that’s why I gave advice based on my experience. All the manual work of installing everything individually has been replaced by one click installer. What was wrong with my comment?

    • @MyVanitar
      @MyVanitar  4 месяца назад +5

      man, the first step of this tutorial is about installing that package, but that package is out of date, that's why we should update some parts. Please watch the video completely and be polite, I don't owe anyone!

    • @hadiborjkhani8462
      @hadiborjkhani8462 2 месяца назад

      Yes, they released but there is no help for installation and scan for kits!!! This tutorial is amazing I could install with @MyVanitar help easily.

    • @blackstorm7481
      @blackstorm7481 2 месяца назад

      This crap doesnt work correctly. I recomend to use only manual installation.

  • @hp2073
    @hp2073 7 месяцев назад +2

    Thank you. Easy to follow 🫡

    • @MyVanitar
      @MyVanitar  7 месяцев назад

      You're welcome!

  • @yusukeurameshi9604
    @yusukeurameshi9604 3 месяца назад

    Thanks

    • @MyVanitar
      @MyVanitar  3 месяца назад

      Thank you very much. I hope others also follow you