Error building hello_usb on Windows 10

Open
#141 16 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
32/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
c, cmake, git

Research direction

Start with the chapter 9.2 hello_usb build steps and compare the generated CMake/NMAKE output with the working blink build. Verify the pico-sdk submodules using the reported git submodule update --init command. Done means hello_usb builds successfully on Windows without the missing hello_usb.c.obj error.

Written by the indexing model from the issue text.

Description

I have taken the steps in chapter 9.2 of "Getting started with raspberry pi Pico" and set up the Pico for my Windows machine and I can build the "blink" example successfully. But I am getting the following error when I build the hello_usb example:

AR10B2~1.EXE: error: CMakeFiles/hello_usb.dir/hello_usb.c.obj: No such file or directory NMAKE : fatal error U1077: 'C:\PROGRA~2\GNUARM~1\102020~1\bin\AR10B2~1.EXE' : return code '0x1' Stop. NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30037\bin\HostX86\x86\nmake.exe"' : return code '0x2' Stop. NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30037\bin\HostX86\x86\nmake.exe"' : return code '0x2' Stop. NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30037\bin\HostX86\x86\nmake.exe"' : return code '0x2' Stop.

I have run the following command inside pico-sdk directory but still I can't build that example:
git submodule update --init

I have also added this path:
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30037\bin\HostX86\x86
to my "path" variable both for user variables and system variables, but still I get error building hello_usb example. Any help is greatly appreciated!

Dominant language
C
Stars
3.9k
Forks
1k
Avg merge
1d 16h
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from raspberrypi/pico-examples

All issues in raspberrypi/pico-examples

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.