PICO toolchain on Windows 11

For general Flowcode discussion that does not belong in the other sections.
Post Reply
shilling2013
Posts: 2
http://meble-kuchenne.info.pl
Joined: Fri Dec 11, 2020 12:20 pm

PICO toolchain on Windows 11

Post by shilling2013 »

Hi,

I have all toolchains working except the Pico toolchain…

I have followed the PDF setup guide…

I have installed: -
> GNU Arm Embedded Toolchain 10.3-2021.10
> Cmake 3.20.5
> Visual Studio Build Tools 2019 (I also have 2022) (2022 Was already installed)
> Visual Studio Community 2019 (I also have 2022) (2022 Was already installed)
> Python 3.7.3 (64-bit)
> Git 2.35.1.2

I am using: -
> Windows 11
> Flowcode 9.2.0

Error from compiler below.

Thanks,
Paul

Code: Select all

Target folder: C:\PICO\TestCode
Source name:   C:\PICO\TestCode\Flowcode11.fcfx
Title:         
Description:   
Device:        PICO.PICO.Raspberry_Pi_Pico
Generated by:  Flowcode v9.2.0.33
Date:          Friday, March 25, 2022 21:58:16
Users:         1
Registered to: xxx (xxx)
Licence key: xxx
https://www.flowcode.co.uk
Using FCD settings for compiler
Launching the compiler...
C:\ProgramData\MatrixTSL\FlowcodeV9\FCD\PICO\Batch\pico_build.bat  "C:\PICO\pico-sdk\" "Flowcode11" "C:\PICO\TestCode\"  

C:\PICO\TestCode>REM CRC: 11E85D0BF540A03612B9D5AB8A950728A3654FDC084B783F85B503651504FC6E8DA967745A187CF8FECF9115B25085A2774D1D3D69D8A99EE7320EAE740A5DB66BD212DE98DE91D9E3564078A19D1616A5C2ACA5856A86664D00059D79589982019B1EBDA9F75E245824CF181DE22D23B9DE25CDF0E36405D9066202E94705CBBDB038842E43FA4AAC72934211FD4B5DCC661788BEC7C91A063848616D51551DB978AC1A4BAF29AD4517DCDD22FC70DE135D32748FB3D1732C3050DA273BE4EE39DD52E8224900600B1F9528E97AB0BA001B0922CEB719397C7C0C9FABE651313F9A05C84301D1C0 

C:\PICO\TestCode>REM REVISION: 2.0 

C:\PICO\TestCode>REM GUID: 9EF5601F-D979-495F-89EB-F1C4F35D9212 

C:\PICO\TestCode>REM DATE: 30\07\2021 

C:\PICO\TestCode>REM DIR: FCD\PICO\batch\pico_build.bat 
Building Flowcode11 ...
**********************************************************************
** Visual Studio 2019 Developer Command Prompt v16.9.18
** Copyright (c) 2021 Microsoft Corporation
**********************************************************************
.

PICO_SDK_PATH is C:/PICO/pico-sdk
PICO platform is rp2040.
PICO target board is pico.
Using board configuration from C:/PICO/pico-sdk/src/boards/include/boards/pico.h
TinyUSB available at C:/PICO/pico-sdk/lib/tinyusb/src/portable/raspberrypi/rp2040; enabling build support for USB.
-- Configuring done
-- Generating done
-- Build files have been written to: C:/PICO/TestCode/Flowcode11

Microsoft (R) Program Maintenance Utility Version 14.28.29921.0
Copyright (C) Microsoft Corporation.  All rights reserved.

[  1%] Performing configure step for 'ELF2UF2Build'
-- The C compiler identification is MSVC 19.31.31105.0
-- The CXX compiler identification is MSVC 19.31.31105.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.31.31103/bin/Hostx64/x64/cl.exe
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.31.31103/bin/Hostx64/x64/cl.exe - broken
CMake Error at C:/Program Files/CMake/share/cmake-3.20/Modules/CMakeTestCCompiler.cmake:66 (message):
  The C compiler
    "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.31.31103/bin/Hostx64/x64/cl.exe"
  is not able to compile a simple test program.
  It fails with the following output:
    Change Dir: C:/PICO/TestCode/Flowcode11/elf2uf2/CMakeFiles/CMakeTmp
    
    Run Build Command(s):nmake -f Makefile /nologo cmTC_63181\fast && 	"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\bin\HostX86\x86\nmake.exe"  -f CMakeFiles\cmTC_63181.dir\build.make /nologo -L                  CMakeFiles\cmTC_63181.dir\build
    Building C object CMakeFiles/cmTC_63181.dir/testCCompiler.c.obj
    	"C:\Program Files\CMake\bin\cmake.exe" -E cmake_cl_compile_depends --dep-file=CMakeFiles\cmTC_63181.dir\testCCompiler.c.obj.d --working-dir=C:\PICO\TestCode\Flowcode11\elf2uf2\CMakeFiles\CMakeTmp --filter-prefix="Note: including file: " -- "C:\PROGRA~1\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.31.31103\bin\Hostx64\x64\cl.exe" @C:\Users\PAULSH~1\AppData\Local\Temp\nm6817.tmp
    testCCompiler.c
    Linking C executable cmTC_63181.exe
    	"C:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe --intdir=CMakeFiles\cmTC_63181.dir --rc=C:\PROGRA~2\Embarcadero\Studio\21.0\bin\rc.exe --mt="C:\PROGRA~2\Windows Kits\10\bin\10.0.22000.0\x86\mt.exe" --manifests -- "C:\PROGRA~1\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.31.31103\bin\Hostx64\x64\link.exe" /nologo @CMakeFiles\cmTC_63181.dir\objects1.rsp @C:\Users\PAULSH~1\AppData\Local\Temp\nm6857.tmp
    LINK Pass 1: command "C:\PROGRA~1\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.31.31103\bin\Hostx64\x64\link.exe /nologo @CMakeFiles\cmTC_63181.dir\objects1.rsp /out:cmTC_63181.exe /implib:cmTC_63181.lib /pdb:C:\PICO\TestCode\Flowcode11\elf2uf2\CMakeFiles\CMakeTmp\cmTC_63181.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:CMakeFiles\cmTC_63181.dir/intermediate.manifest CMakeFiles\cmTC_63181.dir/manifest.res" failed (exit code 1120) with the following output:
    testCCompiler.c.obj : error LNK2001: unresolved external symbol _RTC_InitBase
    testCCompiler.c.obj : error LNK2001: unresolved external symbol _RTC_Shutdown
    LINK : error LNK2001: unresolved external symbol mainCRTStartup
    C:\Program Files (x86)\Windows Kits\10\lib\10.0.22000.0\um\x86\kernel32.lib : warning LNK4272: library machine type 'x86' conflicts with target machine type 'x64'
    C:\Program Files (x86)\Windows Kits\10\lib\10.0.22000.0\um\x86\user32.lib : warning LNK4272: library machine type 'x86' conflicts with target machine type 'x64'
    C:\Program Files (x86)\Windows Kits\10\lib\10.0.22000.0\um\x86\gdi32.lib : warning LNK4272: library machine type 'x86' conflicts with target machine type 'x64'
    C:\Program Files (x86)\Windows Kits\10\lib\10.0.22000.0\um\x86\winspool.lib : warning LNK4272: library machine type 'x86' conflicts with target machine type 'x64'
    C:\Program Files (x86)\Windows Kits\10\lib\10.0.22000.0\um\x86\shell32.lib : warning LNK4272: library machine type 'x86' conflicts with target machine type 'x64'
    C:\Program Files (x86)\Windows Kits\10\lib\10.0.22000.0\um\x86\ole32.lib : warning LNK4272: library machine type 'x86' conflicts with target machine type 'x64'
    C:\Program Files (x86)\Windows Kits\10\lib\10.0.22000.0\um\x86\oleaut32.lib : warning LNK4272: library machine type 'x86' conflicts with target machine type 'x64'
    C:\Program Files (x86)\Windows Kits\10\lib\10.0.22000.0\um\x86\uuid.lib : warning LNK4272: library machine type 'x86' conflicts with target machine type 'x64'
    C:\Program Files (x86)\Windows Kits\10\lib\10.0.22000.0\um\x86\comdlg32.lib : warning LNK4272: library machine type 'x86' conflicts with target machine type 'x64'
    C:\Program Files (x86)\Windows Kits\10\lib\10.0.22000.0\um\x86\advapi32.lib : warning LNK4272: library machine type 'x86' conflicts with target machine type 'x64'
    C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\lib\x86\MSVCRTD.lib : warning LNK4272: library machine type 'x86' conflicts with target machine type 'x64'
    cmTC_63181.exe : fatal error LNK1120: 3 unresolved externals
    NMAKE : fatal error U1077: '"C:\Program Files\CMake\bin\cmake.exe"' : return code '0xffffffff'
    Stop.
    NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\bin\HostX86\x86\nmake.exe"' : return code '0x2'
    Stop.
    
    
  
  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:2 (project)
-- Configuring incomplete, errors occurred!
See also "C:/PICO/TestCode/Flowcode11/elf2uf2/CMakeFiles/CMakeOutput.log".
See also "C:/PICO/TestCode/Flowcode11/elf2uf2/CMakeFiles/CMakeError.log".
NMAKE : fatal error U1077: 'echo' : return code '0x1'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\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.28.29910\bin\HostX86\x86\nmake.exe"' : return code '0x2'
Stop.

Build Failed

C:\ProgramData\MatrixTSL\FlowcodeV9\FCD\PICO\Batch\pico_build.bat reported error code 0x1

Autoclose turned off


FINISHED

medelec35
Matrix Staff
Posts: 1920
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 622 times
Been thanked: 645 times

Re: PICO toolchain on Windows 11

Post by medelec35 »

Hi
It seems like there is an issue with Microsoft visual studio.

One thing you can try first is to delete the folder generated during the comping state.
For example, if the project is called PICO Test 1, then the folder generated within the root of your project folder will be called PICO_Test_1
I.e spaces are replaced by underscores.
Or just rename your current Flowchart.
Then recompile and see if it sorts out the issue?

If not, the downloads I used are in this post
I believe with one installed, then installing another version, causes issues.
What I would probably do is uninstall everything and start again with the versions I used.
I have not reinstalled that long ago and they work.
Martin

shilling2013
Posts: 2
Joined: Fri Dec 11, 2020 12:20 pm

Re: PICO toolchain on Windows 11

Post by shilling2013 »

Hi,

Thanks for the help... I uninstalled all versions of Visual Studio, installed Visual Studio Build Tools 2019 (16.11.11) and Flowcode now compiles PICO projects.

Thanks,
Paul

medelec35
Matrix Staff
Posts: 1920
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 622 times
Been thanked: 645 times

Re: PICO toolchain on Windows 11

Post by medelec35 »

That's brilliant!
Thanks for letting us know.
Martin

Post Reply