Trying to get a RP 2040 going.

For general Flowcode discussion that does not belong in the other sections.
Chadb
Posts: 73
http://meble-kuchenne.info.pl
Joined: Fri Dec 18, 2020 1:15 pm
Has thanked: 32 times
Been thanked: 1 time

Flowcode v9 Trying to get a RP 2040 going.

Post by Chadb »

Hi, I am trying to get a rp 2040 going, and I am having some trouble. I have installed all the other items in the guide, but I still don't have something correct. I don't know what else to try.

Here is my build window.

Code: Select all

Target folder: E:\New project folder\Cable 2
Source name:   E:\New project folder\Cable 2\rp pico test1.fcfx
Title:         Pico test1
Description:   
Device:        PICO.PICO.Raspberry_Pi_RP2040
Generated by:  Flowcode v9.3.1.36
Date:          Tuesday, June 27, 2023 20:50:31
Users:         1
Registered to: chadb xxxxxxxxxx
Licence key: xxxxxxx
   NOT FOR COMMERCIAL USE
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-sdk\" "rp pico test1" "E:\New project folder\Cable 2\"  

E:\New project folder\Cable 2>REM CRC: 11E85D0BF540A03612B9D5AB8A950728A3654FDC084B783F85B503651504FC6E8DA967745A187CF8FECF9115B25085A2774D1D3D69D8A99EE7320EAE740A5DB66BD212DE98DE91D9E3564078A19D1616A5C2ACA5856A86664D00059D79589982019B1EBDA9F75E245824CF181DE22D23B9DE25CDF0E36405D9066202E94705CBBDB038842E43FA4AAC72934211FD4B5DCC661788BEC7C91A063848616D51551DB978AC1A4BAF29AD4517DCDD22FC70DE135D32748FB3D1732C3050DA273BE4EE39DD52E8224900600B1F9528E97AB0BA001B0922CEB719397C7C0C9FABE651313F9A05C84301D1C0 

E:\New project folder\Cable 2>REM REVISION: 2.0 

E:\New project folder\Cable 2>REM GUID: 9EF5601F-D979-495F-89EB-F1C4F35D9212 

E:\New project folder\Cable 2>REM DATE: 30\07\2021 

E:\New project folder\Cable 2>REM DIR: FCD\PICO\batch\pico_build.bat 
.

Building rp pico test1 ...
The system cannot find the path specified.
PICO_SDK_PATH is C:/pico-sdk
PICO platform is rp2040.
-- The C compiler identification is GNU 12.2.1
-- The CXX compiler identification is GNU 12.2.1
-- The ASM compiler identification is GNU
-- Found assembler: C:/Program Files (x86)/Arm GNU Toolchain arm-none-eabi/12.2 mpacbti-rel1/bin/arm-none-eabi-gcc.exe
-- Detecting C compiler ABI info
CMake Error: Generator: execution of make failed. Make command was: nmake -f Makefile /nologo cmTC_ddade\fast && 
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: C:/Program Files (x86)/Arm GNU Toolchain arm-none-eabi/12.2 mpacbti-rel1/bin/arm-none-eabi-gcc.exe
CMake Error: Generator: execution of make failed. Make command was: nmake -f Makefile /nologo cmTC_a527f\fast && 
-- Check for working C compiler: C:/Program Files (x86)/Arm GNU Toolchain arm-none-eabi/12.2 mpacbti-rel1/bin/arm-none-eabi-gcc.exe - broken
CMake Error at C:/Program Files/CMake/share/cmake-3.20/Modules/CMakeTestCCompiler.cmake:66 (message):
  The C compiler
    "C:/Program Files (x86)/Arm GNU Toolchain arm-none-eabi/12.2 mpacbti-rel1/bin/arm-none-eabi-gcc.exe"
  is not able to compile a simple test program.
  It fails with the following output:
    Change Dir: E:/New_project_folder/Cable_2/rp_pico_test1/CMakeFiles/CMakeTmp
    
    Run Build Command(s):nmake -f Makefile /nologo cmTC_a527f\fast && The system cannot find the file specified
    Generator: execution of make failed. Make command was: nmake -f Makefile /nologo cmTC_a527f\fast && 
    
  
  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  C:/pico-sdk/CMakeLists.txt:10 (project)
-- Configuring incomplete, errors occurred!
See also "E:/New_project_folder/Cable_2/rp_pico_test1/CMakeFiles/CMakeOutput.log".
See also "E:/New_project_folder/Cable_2/rp_pico_test1/CMakeFiles/CMakeError.log".
'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...
that about sums it up.

Chad

medelec35
Matrix Staff
Posts: 1996
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 630 times
Been thanked: 666 times

Re: Trying to get a RP 2040 going.

Post by medelec35 »

Hello
I have placed your compiler output within code tags.
Can you please do that in the future.
What is the full path of VsDevCmd.bat within Microsoft Visual Studio BuildTools?
E.g

Code: Select all

C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\Common7\Tools\VsDevCmd.bat
Martin

Chadb
Posts: 73
Joined: Fri Dec 18, 2020 1:15 pm
Has thanked: 32 times
Been thanked: 1 time

Re: Trying to get a RP 2040 going.

Post by Chadb »

Hi, Sorry I wasn't notified.
I installed according to the pdf on the wiki. Mine is here.
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\Tools\vsdevcmd\core\vsdevcmd_start.bat

Yours says 2019 there was no link to 2019.

The same thing always happens to me. I get inspired to do something and am hit with some flowcode problem that stops me from working on the thing I want to work on and instead have to spend days, weeks, debugging some flowcode issue. That is until I give up and abandon the thing I wanted to do in the first place. The forum with a 24-hour delay per post is frustrating to say the least.

I have paid for fc8, fc9 pretty fully loaded. It has to be close to ~$800 so far, and I have yet to complete one, single, project! It started with trying to get DMX working on a stm32 that still doesn't support hardware functions. I2c, timers, everything is software, and it makes a fast chip, slow.

It took me all of 5 minutes to get the 2040 running on the Arduino side. And I didn't have install gigabytes of MS VS.

When they ask for new chips to support, it infuriates me. Rather than half a** supporting new chips, how about they make the ones that they supposedly support actually function correctly. They seem to be in a constant cycle of adding new stuff, but let difficulties linger forever unless someone complains enough...

I just found VS 2019, and I would have to make a ms dev account to dl it. Not going to do that. After doing some more thread searching, it looks like the one guy who figured this out no longer works there. Great. He seemed to be in charge of all the st arm stuff too. I was going to get 10 but considering that 8 or 9 didn't work for me, I really don't know if I am going to bother wasting more money! We are halfway through 2023, and it is dumb that I have to scour the web for some 4-year-old dev environment to get something to work. Arduino can do it. So can flowcode.

The 2040 is fast and cheap and available, it should be well-supported.

I have an idea: HEY, Mr. John Dobson, sit down at a clean pc, purchase flowcode, and blink the onboard LED on an RP 2040 Pico. You are only allowed to use this forum for help. I would really like to see the result of that, guaranteeing that would never happen.

I'm not usually such a downer, but this is just another in a long (years) series of let-downs by flowcode. It shouldn't be this hard just to get a chip to work, and I am computer-literate. This is a showstopper for me, and would be a total mess for a noob. How this is considered acceptable is baffling to me.

Thanks,
Chad

medelec35
Matrix Staff
Posts: 1996
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 630 times
Been thanked: 666 times

Re: Trying to get a RP 2040 going.

Post by medelec35 »

Hi.
You can intall the 2022 version instead of the 2019 version.
After you have done that, you will need to extract the file within the zip file
Then browse to this location using file explorer, it's hidden by default so just paste the link into your address bar.

Code: Select all

C:\ProgramData\MatrixTSL\FlowcodeV9\FCD\PICO\batch\
Replace the existing file with the extracted file.
If Flowcode is already open, then you will need to reload your project for the new components to work
If you run any component updates, then the components you added will be overwritten.
Attachments
pico_build.zip
(1.15 KiB) Downloaded 529 times
Martin

Steve-Matrix
Matrix Staff
Posts: 1513
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 212 times
Been thanked: 351 times

Re: Trying to get a RP 2040 going.

Post by Steve-Matrix »

Hi Chad,

Thanks for sharing your thoughts. It is always useful to get feedback like this.

I would just like to comment on a few of the issues you have raised.
Chadb wrote:
Thu Jul 06, 2023 9:58 pm
The forum with a 24-hour delay per post is frustrating to say the least.
I fully understand this is frustrating, but I am unsure how we can do this better. We have looked at other methods of support, but most alternatives are extremely costly and we would not want to pass on those costs to our users. And we can do little to overcome time-zone differences. I note that the support you have received from previous posts here is typically much shorter that 24 hours. In fact, Martin (@medelec35) has posted to help you in this thread twice so far at 7:48am and 10:30pm (GMT) - both are outside of our normal working hours. Our staff and our fantastic VCs frequently check and offer support here in our own time. I don't know how our 'reactive' support could be improved.

Regarding our 'proactive' support, we are continually striving to improve our documentation and guides. And comments like yours genuinely help us improve on these. But it is impossible to be fully comprehensive due to the diverse nature of projects and the wide support Flowcode offers.

We do test all of our toolchain instructions and confirm they are working and I myself have followed our instructions for them all successfully (or when there have been issues peculiar to my PC setup, these have been integrated into the documents). Some of these (notably the ESP toolchain) are extremely complex and rely on 3rd-party installers with additional dependencies which can change outside of our control. In these cases we try to support users as best we can here.

Hopefully the post from Martin will get you up and running with the RP2040.

Chadb
Posts: 73
Joined: Fri Dec 18, 2020 1:15 pm
Has thanked: 32 times
Been thanked: 1 time

Re: Trying to get a RP 2040 going.

Post by Chadb »

Martin: I am going to try that out in just a min. Thank you.

Steve: I should have said: "The forum with a 24-hour delay per post is frustrating to say the least, but understandable." Being in the states' timezone, issues are unavoidable, but still a pain.
I understand that we are dealing with complicated things and making everything smooth is a challenge. Like I said, I just want to work on my thing and not on the tool.

Thanks,
Chad

Btw1: The blink the led on the pico board was a trick question. The onboard led is on io25 and there is no way to access that I can find on the pico board file of yours.

Chadb
Posts: 73
Joined: Fri Dec 18, 2020 1:15 pm
Has thanked: 32 times
Been thanked: 1 time

Re: Trying to get a RP 2040 going.

Post by Chadb »

I Installed your .bat . This is what I get now.

Thanks,
Chad

Code: Select all

Target folder: E:\New project folder\Cable 2
Source name:   E:\New project folder\Cable 2\rp pico test1.fcfx
Title:         Pico test1
Description:   
Device:        PICO.PICO.Raspberry_Pi_RP2040
Generated by:  Flowcode v9.3.1.36
Date:          Friday, July 07, 2023 16:13:42
Users:         1
Registered to: chadb
Licence key: 
   NOT FOR COMMERCIAL USE
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-sdk\" "rp pico test1" "E:\New project folder\Cable 2\"  

E:\New project folder\Cable 2>REM CRC: 11E85D0BF540A03612B9D5AB8A950728A3654FDC084B783F85B503651504FC6E8DA967745A187CF8FECF9115B25085A2774D1D3D69D8A99EE7320EAE740A5DB69B0AF84BD9A2B9E26CFA768EA02184EEC4965B289802A73C711B8143522C2B691E456854D22958005824CF181DE22D23B9DE25CDF0E36405D9066202E94705CBBDB038842E43FA4AAC72934211FD4B5DCC661788BEC7C91A063848616D51551DB978AC1A4BAF29AD4517DCDD22FC70DE135D32748FB3D1732C3050DA273BE4EE56E5C488FA71EDB383599EBCE6C99F1BCD19E1FAE96D2DC21970AB48E245A709734CC46D5AB08C67 

E:\New project folder\Cable 2>REM REVISION: 2.0 

E:\New project folder\Cable 2>REM GUID: 9EF5601F-D979-495F-89EB-F1C4F35D9212 

E:\New project folder\Cable 2>REM DATE: 02\06\2023 

E:\New project folder\Cable 2>REM DIR: FCD\PICO\batch\pico_build.bat 
Building rp pico test1 ...
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.6.4
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
PICO_SDK_PATH is C:/pico-sdk
PICO platform is rp2040.
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- The ASM compiler identification is unknown
-- Found assembler: C:/Program Files (x86)/Arm GNU Toolchain arm-none-eabi/12.2 mpacbti-rel1/bin/arm-none-eabi-gcc.exe
CMake Error at C:/pico-sdk/CMakeLists.txt:10 (project):
  The CMAKE_C_COMPILER:
    C:/Program Files (x86)/Arm GNU Toolchain arm-none-eabi/12.2 mpacbti-rel1/bin/arm-none-eabi-gcc.exe
  is not a full path to an existing compiler tool.
  To use the NMake generator with Visual C++, cmake must be run from a shell
  that can use the compiler cl from the command line.  This environment is
  unable to invoke the cl compiler.  To fix this problem, run cmake from the
  Visual Studio Command Prompt (vcvarsall.bat).
  Tell CMake where to find the compiler by setting either the environment
  variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
  the compiler, or to the compiler name if it is in the PATH.
CMake Error at C:/pico-sdk/CMakeLists.txt:10 (project):
  The CMAKE_CXX_COMPILER:
    C:/Program Files (x86)/Arm GNU Toolchain arm-none-eabi/12.2 mpacbti-rel1/bin/arm-none-eabi-g++.exe
  is not a full path to an existing compiler tool.
  To use the NMake generator with Visual C++, cmake must be run from a shell
  that can use the compiler cl from the command line.  This environment is
  unable to invoke the cl compiler.  To fix this problem, run cmake from the
  Visual Studio Command Prompt (vcvarsall.bat).
  Tell CMake where to find the compiler by setting either the environment
  variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
  to the compiler, or to the compiler name if it is in the PATH.
CMake Error at C:/pico-sdk/CMakeLists.txt:10 (project):
  The CMAKE_ASM_COMPILER:
    C:/Program Files (x86)/Arm GNU Toolchain arm-none-eabi/12.2 mpacbti-rel1/bin/arm-none-eabi-gcc.exe
  is not a full path to an existing compiler tool.
  Tell CMake where to find the compiler by setting either the environment
  variable "ASM" or the CMake cache entry CMAKE_ASM_COMPILER to the full path
  to the compiler, or to the compiler name if it is in the PATH.
-- Warning: Did not find file Compiler/-ASM
-- Configuring incomplete, errors occurred!
See also "E:/New_project_folder/Cable_2/rp_pico_test1/CMakeFiles/CMakeOutput.log".
See also "E:/New_project_folder/Cable_2/rp_pico_test1/CMakeFiles/CMakeError.log".

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

NMAKE : fatal error U1064: MAKEFILE not found and no target specified
Stop.

Build Failed
.

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

Autoclose turned off


FINISHED

chipfryer27
Valued Contributor
Posts: 1614
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 357 times
Been thanked: 565 times

Re: Trying to get a RP 2040 going.

Post by chipfryer27 »

Hi
The forum with a 24-hour delay per post is frustrating to say the least
This may or may not apply to you, but if new to the forum and have never posted before, the first few posts you do make are flagged for Moderation to ensure you aren't a spambot etc. This introduces a delay as Matrix/VC need to read and approve before it becomes visible. Once a few have been approved, your posts then appear straight away.

I've not tried anything with the 2040 yet, not even installed the toolchain, although I do have a Pico somewhere. If I get a chance I'll see if I can squeeze in some time this weekend to install.

Do note that FC supports both the Pico and the RP2040. You may think "so what" as they both run the same processor but the form factor is different. If you select the Pi_Pico then GPIO25 is not available as a port, but if you select the Pi_RP2040 as target then it is.

Pi_Pico.JPG
Pi_Pico.JPG (38.29 KiB) Viewed 5360 times
Pi_RP2040.JPG
Pi_RP2040.JPG (53.67 KiB) Viewed 5360 times
Regards

chipfryer27
Valued Contributor
Posts: 1614
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 357 times
Been thanked: 565 times

Re: Trying to get a RP 2040 going.

Post by chipfryer27 »

Hi

Thinking that playing with a Pico would suck less than playing with a Hoover I opted for the Pico. I got my Pico free with a magazine and soon I expect to get a free cornflake in my box of Pico's as they seem to be everywhere just now.

As mentioned above, I don''t have the toolchain installed, so off we go.....

I did have the RPi toolchain already installed but not the Pico bits and I already have Python and Git too.

I followed this guide created by Leigh (I think). It is very important that you follow the guides provided exactly, especially when you need to use 3rd party software not under Matrix control. Most issues are down to incorrect installation, possibly forgetting to check a tick box or the like.

https://flowcode.co.uk/resources/misc/I ... 20Pico.pdf

It is a couple of years old and components it references have been updated so you do need to poke around a bit and it took some time to figure it out and install.

In the guide we install the ARM GCC controller but as the software has moved on since Leigh created, you need to scroll down the page until you come to Download 10-2020-q4-Major. Expand that and select the first option gcc-arm-none-eabi-10-2020-q4-major-win32.exe

Next you download CMake but again software has moved on since the guide and there is a warning not to use v3.21
I don't know if more recent versions work but that's for another day.

Follow the link in the guide to download CMake, then scroll down until you reach Older Releases and follow that to reach 3.20.5 as recommended. For ease the link is here

https://cmake.org/files/v3.20/

Scroll down and download cmake-3.20.5-windows-x86_64.msi

Follow the guide to install.

Next you install Visual Studio Tools and it's a pain mainly because you need to sign in to Microsoft or create an account. Again this software has been updated since the guide but if you scroll down you will see a link to Older Downloads. Follow it to 2019. For ease the link is here

https://visualstudio.microsoft.com/vs/older-downloads/

Follow the guide to install.

Next is Python but as I already have it installed I skipped this step. After that is GIT but again I have that already installed so skipped.

That brings us to installing the Pico SDK. I followed the guide but chose to instal at C:\PicoSDK\ rather than the Downloads folder as per guide, so my command prompts were from C:

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

Next you tell Flowcode where to look. My location is C:\PicoSDK\pico-sdk

I have the license and chip pack installed so next was Sending Your First Program. Holding the Pico Boot button down I connected it to my PC and it was recognised by the PC (you can release the button now <s>) as per guide.

Although the above did take a bit of time, mainly to find the new location of the software and mess around with MS accounts, the guide is still pretty much valid.

With the Pico connected time to play.

There are two options either Pi_Pico or Pi_RP2040 as mentioned in previous post. I have a Pi_Pico board from 2020 still in the wrapper. This has an on-board LED on IO25. However the Pi_Pico target doesn't allow you access to this pin. Instead I chose the Pi-RP2040 as this does allow access.

I created a one-second flash test then Compiled to Target
Pico-Flash.fcfx
(7.7 KiB) Downloaded 573 times

It takes a few minutes to run through things but not as long as first compilation of an ESP32.

Once compiled to target it ran first time. The on-board LED blinks at one second intervals.

With the exception of Python and GIT which I already had installed, and changing the location of pico-sdk, I followed Leigh's guide and it worked for me running W10 and latest FC and database. If I get time, I may try the install using the latest versions of the necessary software on another PC to see what happens.

Hope this is of help.

Regards

medelec35
Matrix Staff
Posts: 1996
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 630 times
Been thanked: 666 times

Re: Trying to get a RP 2040 going.

Post by medelec35 »

Hello.
There is a Pico Toolchain guide on the wiki that was created for Flowcode v10
Now you have got the batch file I posted, you can follow the guide for Flowocde v9
chipfryer27 wrote:
Sat Jul 08, 2023 12:54 pm
Next you install Visual Studio Tools and it's a pain mainly because you need to sign in to Microsoft or create an account. Again this software has been updated since the guide but if you scroll down you will see a link to Older Downloads. Follow it to 2019. For ease the link is here

https://visualstudio.microsoft.com/vs/older-downloads/
The batch file I posted, allows 2022 version of build tools to be installed.
There are now too many hoops to jump through now Microsoft has moved the older versions to the dev section.
Flowocde v10 already has the updated version of the pico_build.bat batch file
Martin

Post Reply