Closed Lite5h4dow closed 3 years ago
I see you have a strange ╗┐
in your output above, so this is probably the same problem as #141
Which unfortunately we don't know how to solve yet :confused:
i dont think its those characters because I ran the same thing in powershell and got this
@lurch
yeah, i don't think that tells us anything as powershell is just displaying the 3 byte UTF8 sequence (ASCII´╗┐) as a zero width character.
The question is how did the characters get into the start of the filename? And why does it only happen for some people.
Can you try building with ninja instead
mkdir ninja_build
cd ninja_build
cmake -G Ninja ..
ninja
to see if NMake is the issue)?
@kilograham i get the following
[15/4743] Performing build step for 'ELF2UF2Build'
[1/2] Building CXX object CMakeFiles/elf2uf2.dir/main.cpp.obj
C:/Users/storm/Dev/pico-sdk/tools/elf2uf2/main.cpp:328:16: warning: 'fopen' is deprecated: This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations]
FILE *in = fopen(in_filename, "rb");
^
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\stdio.h:212:20: note: 'fopen' has been explicitly marked deprecated here
_Check_return_ _CRT_INSECURE_DEPRECATE(fopen_s)
^
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include\vcruntime.h:320:55: note: expanded from macro '_CRT_INSECURE_DEPRECATE'
#define _CRT_INSECURE_DEPRECATE(_Replacement) _CRT_DEPRECATE_TEXT( \
^
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include\vcruntime.h:310:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
^
C:/Users/storm/Dev/pico-sdk/tools/elf2uf2/main.cpp:334:17: warning: 'fopen' is deprecated: This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations]
FILE *out = fopen(out_filename, "wb");
^
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\stdio.h:212:20: note: 'fopen' has been explicitly marked deprecated here
_Check_return_ _CRT_INSECURE_DEPRECATE(fopen_s)
^
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include\vcruntime.h:320:55: note: expanded from macro '_CRT_INSECURE_DEPRECATE'
#define _CRT_INSECURE_DEPRECATE(_Replacement) _CRT_DEPRECATE_TEXT( \
^
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include\vcruntime.h:310:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
^
2 warnings generated.
[2/2] Linking CXX executable elf2uf2.exe
[16/4743] Performing build step for 'PioasmBuild'
FAILED: adc/dma_capture/pioasm/src/PioasmBuild-stamp/PioasmBuild-build C:/Users/storm/Dev/pico-examples/ninja_build/adc/dma_capture/pioasm/src/PioasmBuild-stamp/PioasmBuild-build
cmd.exe /C "cd /D C:\Users\storm\Dev\pico-examples\ninja_build\pioasm && C:\Users\storm\scoop\apps\cmake\3.21.1\bin\cmake.exe --build ."
[1/10] Building CXX object CMakeFiles/pioasm.dir/gen/lexer.cpp.obj
FAILED: CMakeFiles/pioasm.dir/gen/lexer.cpp.obj
C:\Users\storm\scoop\shims\clang++.exe -IC:/Users/storm/Dev/pico-sdk/tools/pioasm -IC:/Users/storm/Dev/pico-sdk/tools/pioasm/gen -g -Xclang -gcodeview -O0 -D_DEBUG -D_DLL -D_MT -Xclang --dependent-lib=msvcrtd -std=gnu++14 -MD -MT CMakeFiles/pioasm.dir/gen/lexer.cpp.obj -MF CMakeFiles\pioasm.dir\gen\lexer.cpp.obj.d -o CMakeFiles/pioasm.dir/gen/lexer.cpp.obj -c C:/Users/storm/Dev/pico-sdk/tools/pioasm/gen/lexer.cpp
lexer.ll:38:10: fatal error: 'unistd.h' file not found
#include <unistd.h>
^~~~~~~~~~
1 error generated.
[2/10] Building CXX object CMakeFiles/pioasm.dir/hex_output.cpp.obj
[3/10] Building CXX object CMakeFiles/pioasm.dir/pio_disassembler.cpp.obj
[4/10] Building CXX object CMakeFiles/pioasm.dir/ada_output.cpp.obj
[5/10] Building CXX object CMakeFiles/pioasm.dir/c_sdk_output.cpp.obj
[6/10] Building CXX object CMakeFiles/pioasm.dir/main.cpp.obj
[7/10] Building CXX object CMakeFiles/pioasm.dir/python_output.cpp.obj
[8/10] Building CXX object CMakeFiles/pioasm.dir/gen/parser.cpp.obj
[9/10] Building CXX object CMakeFiles/pioasm.dir/pio_assembler.cpp.obj
C:/Users/storm/Dev/pico-sdk/tools/pioasm/pio_assembler.cpp:385:47: warning: 'fopen' is deprecated: This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Wdeprecated-declarations]
FILE *out = destination == "-" ? stdout : fopen(destination.c_str(), "w");
^
C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\stdio.h:212:20: note: 'fopen' has been explicitly marked deprecated here
_Check_return_ _CRT_INSECURE_DEPRECATE(fopen_s)
^
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include\vcruntime.h:320:55: note: expanded from macro '_CRT_INSECURE_DEPRECATE'
#define _CRT_INSECURE_DEPRECATE(_Replacement) _CRT_DEPRECATE_TEXT( \
^
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include\vcruntime.h:310:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
^
1 warning generated.
ninja: build stopped: subcommand failed.
[17/4743] No install step for 'ELF2UF2Build'
ninja: build stopped: subcommand failed.
You seem to be building there with clang
C:\Users\storm\scoop\shims\clang++.exe
definitely make sure you don't have CC
or CXX
pointing at something weird in your environment. you should be running from a Visual Studio command shell (I forget what it is called)
i would hope ninja build vs nmake build would pick up the same system compiler. can you post the raw output of a clean (fresh build directory) build with nmake too.
here is the full output as requested
C:\Users\storm\Dev\pico-examples\build> cmake -G "NMake Makefiles" ..
Using PICO_SDK_PATH from environment ('c:/users/storm/dev/pico-sdk')
PICO_SDK_PATH is C:/Users/storm/Dev/pico-sdk
Defaulting PICO_PLATFORM to rp2040 since not specified.
Defaulting PICO platform compiler to pico_arm_gcc since not specified.
-- Defaulting build type to 'Release' since not specified.
PICO compiler is pico_arm_gcc
-- The C compiler identification is GNU 10.3.1
-- The CXX compiler identification is GNU 10.3.1
-- The ASM compiler identification is GNU
-- Found assembler: C:/Program Files (x86)/GNU Arm Embedded Toolchain/10 2021.07/bin/arm-none-eabi-gcc.exe
Defaulting PICO target board to pico since not specified.
Using board configuration from C:/Users/storm/Dev/pico-sdk/src/boards/include/boards/pico.h
-- Found Python3: C:/Users/storm/scoop/shims/python3.exe (found version "3.9.6") found components: Interpreter
TinyUSB available at C:/Users/storm/Dev/pico-sdk/lib/tinyusb/src/portable/raspberrypi/rp2040; adding USB support.
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/storm/Dev/pico-examples/build
C:\Users\storm\Dev\pico-examples\build>nmake
Microsoft (R) Program Maintenance Utility Version 14.29.30133.0
Copyright (C) Microsoft Corporation. All rights reserved.
Scanning dependencies of target bs2_default
[ 0%] Building ASM object pico-sdk/src/rp2_common/boot_stage2/CMakeFiles/bs2_default.dir/compile_time_choice.S.obj
[ 0%] Linking ASM executable bs2_default.elf
[ 0%] Built target bs2_default
[ 0%] Generating bs2_default.bin
[ 0%] Generating bs2_default_padded_checksummed.S
[ 0%] Built target bs2_default_padded_checksummed_asm
[ 0%] Creating directories for 'ELF2UF2Build'
[ 0%] No download step for 'ELF2UF2Build'
[ 0%] No update step for 'ELF2UF2Build'
[ 0%] No patch step for 'ELF2UF2Build'
[ 0%] Performing configure step for 'ELF2UF2Build'
-- The C compiler identification is MSVC 19.29.30133.0
-- The CXX compiler identification is MSVC 19.29.30133.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.29.30133/bin/Hostx86/x86/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.29.30133/bin/Hostx86/x86/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/storm/Dev/pico-examples/build/elf2uf2
[ 0%] Performing build step for 'ELF2UF2Build'
Microsoft (R) Program Maintenance Utility Version 14.29.30133.0
Copyright (C) Microsoft Corporation. All rights reserved.
[ 50%] Building CXX object CMakeFiles/elf2uf2.dir/main.cpp.obj
main.cpp
C:\Users\storm\Dev\pico-sdk\tools\elf2uf2\main.cpp(328): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Users\storm\Dev\pico-sdk\tools\elf2uf2\main.cpp(334): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
[100%] Linking CXX executable elf2uf2.exe
[100%] Built target elf2uf2
[ 0%] No install step for 'ELF2UF2Build'
[ 0%] Completed 'ELF2UF2Build'
[ 0%] Built target ELF2UF2Build
Scanning dependencies of target blink
[ 0%] Building C object blink/CMakeFiles/blink.dir/blink.c.obj
[ 0%] Building C object blink/CMakeFiles/blink.dir/C_/Users/storm/Dev/pico-sdk/src/rp2_common/pico_stdlib/stdlib.c.obj
[ 0%] Building C object blink/CMakeFiles/blink.dir/C_/Users/storm/Dev/pico-sdk/src/rp2_common/hardware_gpio/gpio.c.obj
[ 0%] Building C object blink/CMakeFiles/blink.dir/C_/Users/storm/Dev/pico-sdk/src/rp2_common/hardware_claim/claim.c.obj
[ 0%] Building C object blink/CMakeFiles/blink.dir/C_/Users/storm/Dev/pico-sdk/src/rp2_common/pico_platform/platform.c.obj
[ 0%] Building C object blink/CMakeFiles/blink.dir/C_/Users/storm/Dev/pico-sdk/src/rp2_common/hardware_sync/sync.c.obj
[ 0%] Building C object blink/CMakeFiles/blink.dir/C_/Users/storm/Dev/pico-sdk/src/rp2_common/hardware_uart/uart.c.obj
[ 0%] Building ASM object blink/CMakeFiles/blink.dir/C_/Users/storm/Dev/pico-sdk/src/rp2_common/hardware_divider/divider.S.obj
[ 0%] Building C object blink/CMakeFiles/blink.dir/C_/Users/storm/Dev/pico-sdk/src/common/pico_time/time.c.obj
[ 0%] Building C object blink/CMakeFiles/blink.dir/C_/Users/storm/Dev/pico-sdk/src/common/pico_time/timeout_helper.c.obj
[ 0%] Building C object blink/CMakeFiles/blink.dir/C_/Users/storm/Dev/pico-sdk/src/rp2_common/hardware_timer/timer.c.obj
[ 0%] Building C object blink/CMakeFiles/blink.dir/C_/Users/storm/Dev/pico-sdk/src/common/pico_sync/sem.c.obj
[ 0%] Building C object blink/CMakeFiles/blink.dir/C_/Users/storm/Dev/pico-sdk/src/common/pico_sync/lock_core.c.obj
[ 0%] Building C object blink/CMakeFiles/blink.dir/C_/Users/storm/Dev/pico-sdk/src/common/pico_sync/mutex.c.obj
[ 0%] Building C object blink/CMakeFiles/blink.dir/C_/Users/storm/Dev/pico-sdk/src/common/pico_sync/critical_section.c.obj
[ 0%] Building C object blink/CMakeFiles/blink.dir/C_/Users/storm/Dev/pico-sdk/src/common/pico_util/datetime.c.obj
[ 0%] Building C object blink/CMakeFiles/blink.dir/C_/Users/storm/Dev/pico-sdk/src/common/pico_util/pheap.c.obj
[ 0%] Building C object blink/CMakeFiles/blink.dir/C_/Users/storm/Dev/pico-sdk/src/common/pico_util/queue.c.obj
[ 0%] Building C object blink/CMakeFiles/blink.dir/C_/Users/storm/Dev/pico-sdk/src/rp2_common/pico_runtime/runtime.c.obj
[ 0%] Building C object blink/CMakeFiles/blink.dir/C_/Users/storm/Dev/pico-sdk/src/rp2_common/hardware_clocks/clocks.c.obj
[ 0%] Building C object blink/CMakeFiles/blink.dir/C_/Users/storm/Dev/pico-sdk/src/rp2_common/hardware_irq/irq.c.obj
[ 0%] Building ASM object blink/CMakeFiles/blink.dir/C_/Users/storm/Dev/pico-sdk/src/rp2_common/hardware_irq/irq_handler_chain.S.obj
[ 0%] Building C object blink/CMakeFiles/blink.dir/C_/Users/storm/Dev/pico-sdk/src/rp2_common/hardware_pll/pll.c.obj
[ 0%] Building C object blink/CMakeFiles/blink.dir/C_/Users/storm/Dev/pico-sdk/src/rp2_common/hardware_vreg/vreg.c.obj
[ 0%] Building C object blink/CMakeFiles/blink.dir/C_/Users/storm/Dev/pico-sdk/src/rp2_common/hardware_watchdog/watchdog.c.obj
[ 0%] Building C object blink/CMakeFiles/blink.dir/C_/Users/storm/Dev/pico-sdk/src/rp2_common/hardware_xosc/xosc.c.obj
[ 1%] Building C object blink/CMakeFiles/blink.dir/C_/Users/storm/Dev/pico-sdk/src/rp2_common/pico_printf/printf.c.obj
[ 1%] Building ASM object blink/CMakeFiles/blink.dir/C_/Users/storm/Dev/pico-sdk/src/rp2_common/pico_bit_ops/bit_ops_aeabi.S.obj
[ 1%] Building C object blink/CMakeFiles/blink.dir/C_/Users/storm/Dev/pico-sdk/src/rp2_common/pico_bootrom/bootrom.c.obj
[ 1%] Building ASM object blink/CMakeFiles/blink.dir/C_/Users/storm/Dev/pico-sdk/src/rp2_common/pico_divider/divider.S.obj
[ 1%] Building ASM object blink/CMakeFiles/blink.dir/C_/Users/storm/Dev/pico-sdk/src/rp2_common/pico_double/double_aeabi.S.obj
[ 1%] Building C object blink/CMakeFiles/blink.dir/C_/Users/storm/Dev/pico-sdk/src/rp2_common/pico_double/double_init_rom.c.obj
[ 1%] Building C object blink/CMakeFiles/blink.dir/C_/Users/storm/Dev/pico-sdk/src/rp2_common/pico_double/double_math.c.obj
[ 1%] Building ASM object blink/CMakeFiles/blink.dir/C_/Users/storm/Dev/pico-sdk/src/rp2_common/pico_double/double_v1_rom_shim.S.obj
[ 1%] Building ASM object blink/CMakeFiles/blink.dir/C_/Users/storm/Dev/pico-sdk/src/rp2_common/pico_int64_ops/pico_int64_ops_aeabi.S.obj
[ 1%] Building ASM object blink/CMakeFiles/blink.dir/C_/Users/storm/Dev/pico-sdk/src/rp2_common/pico_float/float_aeabi.S.obj
[ 1%] Building C object blink/CMakeFiles/blink.dir/C_/Users/storm/Dev/pico-sdk/src/rp2_common/pico_float/float_init_rom.c.obj
[ 1%] Building C object blink/CMakeFiles/blink.dir/C_/Users/storm/Dev/pico-sdk/src/rp2_common/pico_float/float_math.c.obj
[ 1%] Building ASM object blink/CMakeFiles/blink.dir/C_/Users/storm/Dev/pico-sdk/src/rp2_common/pico_float/float_v1_rom_shim.S.obj
[ 1%] Building C object blink/CMakeFiles/blink.dir/C_/Users/storm/Dev/pico-sdk/src/rp2_common/pico_malloc/pico_malloc.c.obj
[ 1%] Building ASM object blink/CMakeFiles/blink.dir/C_/Users/storm/Dev/pico-sdk/src/rp2_common/pico_mem_ops/mem_ops_aeabi.S.obj
[ 1%] Building ASM object blink/CMakeFiles/blink.dir/C_/Users/storm/Dev/pico-sdk/src/rp2_common/pico_standard_link/crt0.S.obj
[ 1%] Building CXX object blink/CMakeFiles/blink.dir/C_/Users/storm/Dev/pico-sdk/src/rp2_common/pico_standard_link/new_delete.cpp.obj
[ 1%] Building C object blink/CMakeFiles/blink.dir/C_/Users/storm/Dev/pico-sdk/src/rp2_common/pico_standard_link/binary_info.c.obj
[ 1%] Building C object blink/CMakeFiles/blink.dir/C_/Users/storm/Dev/pico-sdk/src/rp2_common/pico_stdio/stdio.c.obj
[ 1%] Building C object blink/CMakeFiles/blink.dir/C_/Users/storm/Dev/pico-sdk/src/rp2_common/pico_stdio_uart/stdio_uart.c.obj
[ 1%] Linking CXX executable blink.elf
AR10B2~1.EXE: error: ´╗┐CMakeFiles/blink.dir/blink.c.obj: No such file or directory
NMAKE : fatal error U1077: 'C:\PROGRA~2\GNUARM~1\102021~1.07\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.30133\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.30133\bin\HostX86\x86\nmake.exe"' : return code '0x2'
Stop.
C:\Users\storm\Dev\pico-examples\build>
building with ninja in the "Developer console for VS 2019" does appear to work however
ive settled on using the Ninja pipeline in VSCode via CMake.
Just want to comment that I am seeing the same issue, using nmake:
AR10B2~1.EXE: error: CMakeFiles/blink.dir/blink.c.obj: No such file or directory
NMAKE : fatal error U1077: 'C:\PROGRA~2\GNUARM~1\102021~1.10\bin\AR10B2~1.EXE' : return code '0x1'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.30.30705\bin\HostX86\x86\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.30.30705\bin\HostX86\x86\nmake.exe"' : return code '0x2'
Stop.
Edit: Regarding the speculation in the hello_usb thread, I'm following the "Getting started with pico" pdf, not any 3rd party tutorials. Windows 10 x64. Only thing difference between the official guide was that I checkout windows-style, commit UNIX-style in git (that's how I've been doing it, so I don't want to change anything and mess up old repos).
I did disable the 260 character path limit, as well.
i get the following error attempting to build the examples. not sure why.