ndabas / pico-setup-windows

Quickly get started with Raspberry Pi Pico/RP2040 on Windows
Apache License 2.0
298 stars 35 forks source link

Can't locate header files #31

Closed w4mmp closed 1 year ago

w4mmp commented 1 year ago

Hello, I am a new user so I'm sure I'm missing something somewhere but I do have an issue.
1) Downloaded and installed the latest version of pico-setup-windows. 2) Via the Pico Project Generator, a new project was created (project name Proficio). 3) Via the Visual Studio Code for Pico, started VS. 4) In VS, selected the new project folder (Proficio).

The Proficio.c that was created by the project generator has the following. VS reports it can not find the following header files.

include

#include "pico/stdlib.h"
#include "hardware/spi.h"
#include "hardware/i2c.h"
#include "hardware/dma.h"
#include "hardware/pio.h"
#include "hardware/timer.h"
#include "hardware/clocks.h"

Apparently a path is not defined correctly. What do I need to change so that VS can locate the header files? Regards, Ron

w4mmp commented 1 year ago

Hello, So, I am attempting to build the basic blink application. This is what VS reports: vs-1 and

vs-2

Also, I forgot to mention this is on a Windows 10 machine (fully updated). regards, Ron

w4mmp commented 1 year ago

OK, it appears this is a dead project. I moved to the RPi 4B for development. Issue closed.

ndabas commented 1 year ago

Not sure why you concluded that this is a dead project -- it most certainly isn't, with the latest release less than 2 months ago.

If you've moved to an RPi for development -- great. For any future readers who come across this sort of issue and find this thread -- the solution is documented in the ReadMe.txt file included with the installer (and opened by the installer at the end of the installation):

Visual Studio Code for Pico Start Visual Studio Code using this link to have the correct environment variables (like PATH and PICO_SDK_PATH) set for development.

You just need to use the "Visual Studio Code for Pico" shortcut that's copied by the installer into Documents\Pico.

w4mmp commented 1 year ago

Hello, Yes, I may have jumped the gun on this, I apologize. However your response did not help. I ran the installer verbatim and did not make any changes. I let everything default. And let me say up front I am not experienced with cmake, json file and such. I simply need to use the IDE to create an application for my needs.

Regards, Ron

Then I used the "Pico Project Generator" to produce a simple test project and selected the option to have the generator create the .vs.

Below are screen shots of what is happening. (Problems are highlighted).

problem

problem-1

problem-2

Is it possible that the configuration parameter is case sensitive? problem-3

JDTucker-5696 commented 1 year ago

W4MMP;What solved this for me under Rapian was to open the directory ‘pico-examples’ using VSCode. This seemed to have triggered cmake to configure all the examples with all the appropriate default defines for Intelisense to find the non-system include files.Good luck 🍀 JimT Sent from my iPhoneOn Jan 9, 2023, at 10:13, W4MMP @.***> wrote: Hello, Yes, I may have jumped the gun on this, I apologize. However your response did not help. I ran the installer verbatim and did not make any changes. I let everything default. And let me say up front I am not experienced with cmake, json file and such. I simply need to use the IDE to create an application for my needs. Regards, Ron Then I used the "Pico Project Generator" to produce a simple test project and selected the option to have the generator create the .vs. Below are screen shots of what is happening. (Problems are highlighted).

Is it possible that the configuration parameter is case sensitive?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

w4mmp commented 1 year ago

Hello, I tried what you suggested on Windows. No joy. Regards, Ron

ndabas commented 1 year ago

Seems like you need to do two things to make it work:

Let me know how it goes!

rsemenoff commented 1 year ago

To be fair, setting up a vscode environment is madness for any platform, and the way it works seems to be a moving target. One idea is to just to use PIO (which is just basically inline assembly), works in micropython, which because it doesnt rely on vscode, works seemlessly. Apparently you can write your ISRs in assembly directly within python...

ndabas commented 1 year ago

Closing this issue as I believe this has now been resolved with the new release from Raspberry Pi.