rp2040 configuration files

For general Flowcode discussion that does not belong in the other sections.
User avatar
oi18ct
Posts: 16
http://meble-kuchenne.info.pl
Joined: Mon Jun 14, 2021 11:53 pm
Location: North Branch, MN USA
Has thanked: 3 times
Been thanked: 2 times
Contact:

rp2040 configuration files

Post by oi18ct »

not able to complete compile to target. looks like fc is not finding pico-sdk path, however it matches location. also looks like it cant execute a cmake command. any suggestions to fix? some of the downloads in the fc installation are dated/not available or archived. I followed as close as possible incl setting path during install.
--------------------------------------------------------------------

Building rpi2040_test001 ...
The system cannot find the path specified.
PICO_SDK_PATH is C:/Users/Oxy6/Downloads/pico-sdk
PICO platform is rp2040.
. .

-- 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.10/bin/arm-none-eabi-gcc.exe
Defaulting PICO target board to pico since not specified.
Using board configuration from C:/Users/Oxy6/Downloads/pico-sdk/src/boards/include/boards/pico.h
. .

-- Found Python3: C:/Users/Oxy6/AppData/Local/Programs/Python/Python39/python.exe (found version "3.9.5") found components: Interpreter
TinyUSB available at C:/Users/Oxy6/Downloads/pico-sdk/lib/tinyusb/src/portable/raspberrypi/rp2040; enabling build support for USB.
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/Oxy6/Documents/onyxIndustries/projects/flowcode_9/rpi2040/rpi2040_test001
'nmake' is not recognized as an internal or external command,
operable program or batch file.

Build Failed

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

Autoclose turned off


FINISHED

medelec35
Matrix Staff
Posts: 1457
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 513 times
Been thanked: 473 times

Re: rp2040 configuration files

Post by medelec35 »

Hi.
I have just installed the Pico Toolchain and RP2040 compiles for me.
Link for visual studio
I downloaded Build Tools for Visual Studio 2019 (version 16.11)
Hint, use ctrl f and search for build tools
Link for CMake
You might be best uninstalling, then reinstalling using the above links.
I know with the ESP, if later versions are used than suggested within the install guide, then compiling does fail.
I can't see the Pico toolchain being any different.

If ESP32 is already installed and working, you will only need to install Build tools (I installed v16.11) and the PICO SDK.

Code: Select all

https://www.flowcode.co.uk
Using FCD settings for compiler
Launching the compiler...
C:\ProgramData\MatrixTSL\FlowcodeV9\FCD\PICO\Batch\pico_build.bat  "D:\Pico-sdk\" "pico test1" "D:\Flowcode Testing\"  

D:\Flowcode Testing>REM CRC: 11E85D0BF540A03612B9D5AB8A950728A3654FDC084B783F85B503651504FC6E8DA967745A187CF8FECF9115B25085A2774D1D3D69D8A99EE7320EAE740A5DB66BD212DE98DE91D9E3564078A19D1616A5C2ACA5856A86664D00059D79589982019B1EBDA9F75E245824CF181DE22D23B9DE25CDF0E36405D9066202E94705CBBDB038842E43FA4AAC72934211FD4B5DCC661788BEC7C91A063848616D51551DB978AC1A4BAF29AD4517DCDD22FC70DE135D32748FB3D1732C3050DA273BE4EE39DD52E8224900600B1F9528E97AB0BA001B0922CEB719397C7C0C9FABE651313F9A05C84301D1C0 

D:\Flowcode Testing>REM REVISION: 2.0 

D:\Flowcode Testing>REM GUID: 9EF5601F-D979-495F-89EB-F1C4F35D9212 

D:\Flowcode Testing>REM DATE: 30\07\2021 

D:\Flowcode Testing>REM DIR: FCD\PICO\batch\pico_build.bat 
.

Building pico test1 ...
**********************************************************************
** Visual Studio 2019 Developer Command Prompt v16.11.10
** Copyright (c) 2021 Microsoft Corporation
**********************************************************************
PICO_SDK_PATH is D:/Pico-sdk
PICO platform is rp2040.
PICO target board is pico.
Using board configuration from D:/Pico-sdk/src/boards/include/boards/pico.h
.

TinyUSB available at D:/Pico-sdk/lib/tinyusb/src/portable/raspberrypi/rp2040; enabling build support for USB.
-- Configuring done
-- Generating done
-- Build files have been written to: D:/Flowcode_Testing/pico_test1

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

[  1%] Performing build step for 'ELF2UF2Build'

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

Consolidate compiler generated dependencies of target elf2uf2
[100%] Built target elf2uf2
[  3%] No install step for 'ELF2UF2Build'
[  4%] Completed 'ELF2UF2Build'
[ 12%] Built target ELF2UF2Build
Scanning dependencies of target bs2_default
[ 16%] Built target bs2_default
[ 19%] Built target bs2_default_padded_checksummed_asm
.

Scanning dependencies of target flowcode
Consolidate compiler generated dependencies of target flowcode
[ 20%] Building C object CMakeFiles/flowcode.dir/flowcode.c.obj
[ 22%] Linking CXX executable flowcode.elf
[100%] Built target flowcode

Build completed successfully 

Using FCD settings for linker
Launching the linker/assembler...
C:\Program Files (x86)\Flowcode v9\data\tools\DoNothing\DoNothing.exe  


FINISHED
Martin

User avatar
oi18ct
Posts: 16
Joined: Mon Jun 14, 2021 11:53 pm
Location: North Branch, MN USA
Has thanked: 3 times
Been thanked: 2 times
Contact:

Re: rp2040 configuration files

Post by oi18ct »

Martin, uninstalled--->reinstalled with links you provided. seems to have worked (small program compiled and downloaded). something in vs build tools or cmake I guess. Thank you

User avatar
oi18ct
Posts: 16
Joined: Mon Jun 14, 2021 11:53 pm
Location: North Branch, MN USA
Has thanked: 3 times
Been thanked: 2 times
Contact:

Re: rp2040 configuration files

Post by oi18ct »

FC/Matrix- Another thing I can't figure out.

First program loads fine after power up with bootsel held down. compile to target or drag/drop of uf2 both operate fine for first program file load.

How are subsequent program files loaded (without power cycle + boolsel)?
compile to c, hex and to target disconnect the rp2040 drive image from the PC so not possible to drag/drop uf2 file. Is power cycle + bootsel the only way to load a project?
looks like compile to c will not generate a new uf2, but compile to hex & target will.

I am evaluating various hardware platforms for our product development and it feels like there should be more documentation about how FC software interfaces with specific platforms (ESP32, rp2040 specifically).

medelec35
Matrix Staff
Posts: 1457
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 513 times
Been thanked: 473 times

Re: rp2040 configuration files

Post by medelec35 »

That's great, I'm glad you are now up and running.
Thanks for letting us know.
As far as I'm aware, in order to program the Pico you have to have USB disconnected, hold the BOOTSEL button down while reconnecting the USB lead.
It should then create a virtual drive at that point for Flowcode to save the required files on.
Martin

User avatar
oi18ct
Posts: 16
Joined: Mon Jun 14, 2021 11:53 pm
Location: North Branch, MN USA
Has thanked: 3 times
Been thanked: 2 times
Contact:

Re: rp2040 configuration files

Post by oi18ct »

Ok, thank you for confirming. I was looking to use it like a micropython main.py file. I see how it works now. Thank you!

User avatar
oi18ct
Posts: 16
Joined: Mon Jun 14, 2021 11:53 pm
Location: North Branch, MN USA
Has thanked: 3 times
Been thanked: 2 times
Contact:

Re: rp2040 configuration files

Post by oi18ct »

Martin,

I don't want to constantly lean on you guys, but I don't know what to do with this error. I added in the ws2812 object to 3d panel. The command dout to pin16. Up to this point, fc will compile the project. Once a component is inserted to the flowchart, the compiler chokes on something to do with the nop's used in the timing. Only need to add the initialize component to get this. When I compared it against moodLightStrip2 example, and it doesn't look any different.

uc is rp2040 with wiznet w5100s-evb-pico. At first, I thought the nop count generated was too high, but throttling back the cpu clockspeed didn't do anything. here's the compiler message:

Target folder: C:\Users\Oxy6\Documents\onyxIndustries\projects\flowcode_9\rpi2040
Source name: C:\Users\Oxy6\Documents\onyxIndustries\projects\flowcode_9\rpi2040\rpi2040_test001.fcfx
Title: rpi2040_test001
Description:
Device: PICO.PICO.Raspberry_Pi_RP2040
Generated by: Flowcode v9.2.0.33
Date: Monday, February 21, 2022 18:21:42
Users: 1
Registered to: oi18ct (86909100)
Licence key: RK4D6M
https://www.flowcode.co.uk
Using FCD settings for compiler
Launching the compiler...
C:\ProgramData\MatrixTSL\FlowcodeV9\FCD\PICO\Batch\pico_build.bat "C:\Users\Oxy6\Downloads\pico-sdk\" "rpi2040_test001" "C:\Users\Oxy6\Documents\onyxIndustries\projects\flowcode_9\rpi2040\"

C:\Users\Oxy6\Documents\onyxIndustries\projects\flowcode_9\rpi2040>REM CRC: 11E85D0BF540A03612B9D5AB8A950728A3654FDC084B783F85B503651504FC6E8DA967745A187CF8FECF9115B25085A2774D1D3D69D8A99EE7320EAE740A5DB66BD212DE98DE91D9E3564078A19D1616A5C2ACA5856A86664D00059D79589982019B1EBDA9F75E245824CF181DE22D23B9DE25CDF0E36405D9066202E94705CBBDB038842E43FA4AAC72934211FD4B5DCC661788BEC7C91A063848616D51551DB978AC1A4BAF29AD4517DCDD22FC70DE135D32748FB3D1732C3050DA273BE4EE39DD52E8224900600B1F9528E97AB0BA001B0922CEB719397C7C0C9FABE651313F9A05C84301D1C0

C:\Users\Oxy6\Documents\onyxIndustries\projects\flowcode_9\rpi2040>REM REVISION: 2.0

C:\Users\Oxy6\Documents\onyxIndustries\projects\flowcode_9\rpi2040>REM GUID: 9EF5601F-D979-495F-89EB-F1C4F35D9212

C:\Users\Oxy6\Documents\onyxIndustries\projects\flowcode_9\rpi2040>REM DATE: 30\07\2021

C:\Users\Oxy6\Documents\onyxIndustries\projects\flowcode_9\rpi2040>REM DIR: FCD\PICO\batch\pico_build.bat
.

Building rpi2040_test001 ...
**********************************************************************
** Visual Studio 2019 Developer Command Prompt v16.9.17
** Copyright (c) 2021 Microsoft Corporation
**********************************************************************
PICO_SDK_PATH is C:/Users/Oxy6/Downloads/pico-sdk
PICO platform is rp2040.
PICO target board is pico.
Using board configuration from C:/Users/Oxy6/Downloads/pico-sdk/src/boards/include/boards/pico.h
TinyUSB available at C:/Users/Oxy6/Downloads/pico-sdk/lib/tinyusb/src/portable/raspberrypi/rp2040; enabling build support for USB.
-- Configuring done
. .

-- Generating done
-- Build files have been written to: C:/Users/Oxy6/Documents/onyxIndustries/projects/flowcode_9/rpi2040/rpi2040_test001

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

[ 1%] Performing build step for 'ELF2UF2Build'

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

[100%] Built target elf2uf2
[ 3%] No install step for 'ELF2UF2Build'
[ 4%] Completed 'ELF2UF2Build'
[ 12%] Built target ELF2UF2Build
Scanning dependencies of target bs2_default
[ 16%] Built target bs2_default
[ 19%] Built target bs2_default_padded_checksummed_asm
Scanning dependencies of target flowcode
Consolidate compiler generated dependencies of target flowcode
[ 20%] Building C object CMakeFiles/flowcode.dir/flowcode.c.obj
.

C:\Users\Oxy6\Documents\onyxIndustries\projects\flowcode_9\rpi2040\rpi2040_test001\flowcode.c: In function 'FCD_06621_LED_WS2811__Refresh':
C:\Users\Oxy6\Documents\onyxIndustries\projects\flowcode_9\rpi2040\rpi2040_test001\flowcode.c:126:44: warning: implicit declaration of function 'nop' [-Wimplicit-function-declaration]
126 | #define FCD_06621_LED_WS2811__Delay_T1H() nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop(); nop();
| ^~~
C:\Users\Oxy6\Documents\onyxIndustries\projects\flowcode_9\rpi2040\rpi2040_test001\flowcode.c:939:6: note: in expansion of macro 'FCD_06621_LED_WS2811__Delay_T1H'
939 | FCD_06621_LED_WS2811__Delay_T1H();
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 22%] Linking CXX executable flowcode.elf
c:/progra~2/gnuarm~1/102021~1.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: CMakeFiles/flowcode.dir/flowcode.c.obj: in function `FCD_06621_LED_WS2811__Refresh':
flowcode.c:(.text.FCD_06621_LED_WS2811__Refresh+0x54): undefined reference to `nop'
c:/progra~2/gnuarm~1/102021~1.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: flowcode.c:(.text.FCD_06621_LED_WS2811__Refresh+0x58): undefined reference to `nop'
c:/progra~2/gnuarm~1/102021~1.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: flowcode.c:(.text.FCD_06621_LED_WS2811__Refresh+0x5c): undefined reference to `nop'
c:/progra~2/gnuarm~1/102021~1.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: flowcode.c:(.text.FCD_06621_LED_WS2811__Refresh+0x60): undefined reference to `nop'
c:/progra~2/gnuarm~1/102021~1.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: flowcode.c:(.text.FCD_06621_LED_WS2811__Refresh+0x64): undefined reference to `nop'
c:/progra~2/gnuarm~1/102021~1.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: CMakeFiles/flowcode.dir/flowcode.c.obj:flowcode.c:(.text.FCD_06621_LED_WS2811__Refresh+0x68): more undefined references to `nop' follow
collect2.exe: error: ld returned 1 exit status
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 (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: 1457
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 513 times
Been thanked: 473 times

Re: rp2040 configuration files

Post by medelec35 »

Hi.
We are looking into this and hopefully, a fix will be available as soon as possible.
Martin

medelec35
Matrix Staff
Posts: 1457
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 513 times
Been thanked: 473 times

Re: rp2040 configuration files

Post by medelec35 »

A tip.
Connect a tactile switch from Run to GND.
When you want to program, do this in the following order.
Hold the new tactile switch down
hold BOOTSEL switch down.
Release the new tactile switch.
Release BOOTSEL switch.
If in program mode and you don't want the PICO to be in program mode, press and release the new tactile switch.
Martin

BenR
Matrix Staff
Posts: 1746
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 444 times
Been thanked: 604 times

Re: rp2040 configuration files

Post by BenR »

Hello,

RP2040 should now be working correctly with the latest version of the WS2811 component on the update system.

Many thanks for letting us know.

Post Reply