raspberrypi / pico-sdk

BSD 3-Clause "New" or "Revised" License
3.6k stars 897 forks source link

Make lack of TinyUSB when building code targeting stdio_usb more obvious #124

Open BenoitVII opened 3 years ago

BenoitVII commented 3 years ago

Hello, I tried to compile locally the pico-examples project following the C++ guide on Windows. I managed to compile it without any error and I have a hello_usd.uf2 file generated inside my /build folder.

However when I upload it on the pico, no serial port appears.

It works fine with the downloaded hello_usb.uf2 file from the quick start guide on the Raspberry website.

The compiled binary of blink works fine.

There is no error showing up during the compilation, and I noticed that the size of the 2 binaries are different : 25ko for my compiled version and 45ko for the downloaded version.

Any idea?

Compilation machine : Windows 10, intel processor.

Python 3.8 instead of 3.7 but I think this has no impact.

SDK Window 10 v.10.0.17763.0

aallan commented 3 years ago

Did you,

$ git clone -b master https://github.com/raspberrypi/pico-sdk.git 
$ cd pico-sdk
$ git submodule update --init
$ cd ..
$ git clone -b master https://github.com/raspberrypi/pico-examples.git

do an submodule update --init inside the pico-sdk directory? If not then the tinyusb module won't be pulled into the build and you won't have any USB support, so no USB serial port.

BenoitVII commented 3 years ago

You are right, @aallan , thank you. I was actually lazy to do a git clone so I downloaded the source directly in a zip file and skipped this step.

Maybe it would be nice to have an error instead of a warning for this feature since it's something that a lot of people want?