Migration to Pi Pico & CAN

For general Flowcode discussion that does not belong in the other sections.
Post Reply
jay_dee
Posts: 135
http://meble-kuchenne.info.pl
Joined: Sun Dec 20, 2020 6:06 pm
Has thanked: 47 times
Been thanked: 31 times

Migration to Pi Pico & CAN

Post by jay_dee »

Hi,
I've been using ECIO's, MIACs, PIC18F and dsPIC for almost all of my projects since starting with FC back in 2009.
With global chip shortages and discontinued products these are currently not a suitable basis for new projects.
I really like the ECIO style of stand alone brick and so I have chosen to venture into the world of Raspbery PICO.

To get going and have a play I'm purchasing.
>Pi PICO W
>Waveshare IPS display - using ST7789V chip
>Waveshare CAN HAT - using MCP2515 CAN Controller

A) Are there any giudes to getting the tool chain setup for PICO with FC9 or FC10?
B) I use CAN a lot, is it fair to assume the external MCP2515 FC component will work OK?
C) Any one whos have made the jump form 8 and 16bit PIC to Pi PICO, any advice?

I dont really know what to expect..will it feel like just a simple hardware change or a significantly different way of using FC.
Regards, J.

chipfryer27
Valued Contributor
Posts: 1203
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 289 times
Been thanked: 424 times

Re: Migration to Pi Pico & CAN

Post by chipfryer27 »

Hi

I think the PICO toolchain only ran on W10/11 so as I was running W8.1 at the time it was a non starter for me. I do have a PICO (given away free in a magazine) so I've been meaning to revisit.

Regards

jay_dee
Posts: 135
Joined: Sun Dec 20, 2020 6:06 pm
Has thanked: 47 times
Been thanked: 31 times

Re: Migration to Pi Pico & CAN

Post by jay_dee »

HI,
So found the PICO toolchain link in the WIKI and the PDF. Installed all of the listed programs and the settings as requested.
There were a few differences in the install file to those shown but it looked to install each program correctly.
FC10 installed and activated.
Pico connected in bootload mode.
Building a flash program and sending the to PICO but get an error.
THe whole toolchain is new to me so no idea about CMake or NMAke.
CMake was installed and added to the global path.
I:\03 FLOWCODE\PICO_Projects>REM DIR: FCD\PICO\batch\pico_build.bat
Building FLASH_GP13 ...
The system cannot find the path specified.
PICO_SDK_PATH is C:/Users/jdwed/Downloads/pico-sdk
PICO platform is rp2040.
CMake Error at C:/Users/jdwed/Downloads/pico-sdk/CMakeLists.txt:10 (project):
Running
'nmake' '-?'
failed with:
The system cannot find the file specified
-- Configuring incomplete, errors occurred!
'nmake' is not recognized as an internal or external command,
operable program or batch file.

Build Failed
:?

jay_dee
Posts: 135
Joined: Sun Dec 20, 2020 6:06 pm
Has thanked: 47 times
Been thanked: 31 times

Re: Migration to Pi Pico & CAN

Post by jay_dee »

from the "Developer Command Prompt for VS2022" I ran "nmake/?" and it responded correctly with the versio and options. So it must be installed.
From a windows command window the same command returns an error as command not found.
Does some sort of path need to be added?

medelec35
Matrix Staff
Posts: 1475
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 522 times
Been thanked: 477 times

Re: Migration to Pi Pico & CAN

Post by medelec35 »

Hello.
Does this post help you?
I find the Pico toolchain is very fussy about the software versions used.
I am assuming this is the guide you are following?
Martin

jay_dee
Posts: 135
Joined: Sun Dec 20, 2020 6:06 pm
Has thanked: 47 times
Been thanked: 31 times

Re: Migration to Pi Pico & CAN

Post by jay_dee »

Hi Martin,
Yeah that is the guide. When I went to my VS installer ( It was previously installed for other programming projects) the only option i was given required me to update before I could add the C++ features and thus its now on community version 2022.
I've just tried the VS links provided in the other post and a link from the VS download pages and both of those failed.
TBH I would rather not smash my Visual Studio stuff to bits just to get the PICO working.

jay_dee
Posts: 135
Joined: Sun Dec 20, 2020 6:06 pm
Has thanked: 47 times
Been thanked: 31 times

Re: Migration to Pi Pico & CAN

Post by jay_dee »

Hi,
So...found this on the Pi website.
https://www.raspberrypi.com/news/raspbe ... installer/
This seems to be the current Pi approach to getting PICO to work on windows machines.
I ran this and had to do a manual install of Visual Studio Code via the link address they provided.
Visual Studio seems happy to build the examples, as described in thier help.txt file.
After that I got somewhat lost, I suspect I have all the required software to perform a PICO build.
However I've no idea how I would link this to FC.

BenR
Matrix Staff
Posts: 1763
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 449 times
Been thanked: 609 times

Re: Migration to Pi Pico & CAN

Post by BenR »

Thanks for lettins us know. I'll see if I can replicate the issue here.

The guy who originally did the toolchain for the Pico (LeighM) has now retired and so may take some effort to work out what to do to make things work again but I'll have a go.

jay_dee
Posts: 135
Joined: Sun Dec 20, 2020 6:06 pm
Has thanked: 47 times
Been thanked: 31 times

Re: Migration to Pi Pico & CAN

Post by jay_dee »

Hi Ben & Martin.
I appreciate the honest feedback. I'm an Engineer and flowcode user ( Not a proper coder of any sort!) so I'm keen to stay with products that are keenly supported and developed by the Matrix team. I'm sure the PICO works great once the tool chain is sorted. I guess I chose that route over the ESP32 as the PI PICO documentation look very good, professional support by the PI group and the product is to be supported to 2032.

The ESP32 just seems to have so many varients and was a bit confusing when I looked at it.
Honestly I'm just looking for a robust brick to build future projects around, which has long term support. ( To replace ECIO etc)

I would happliy flip over to ESP32 if that was the more keenly supported product for Flowcode. This wave of new devices have plenty of specialist functions above and beyound the usual GP I/O, Timers and UART etc. For example the internal CAN engine in the ESP32 and PIO of the PICO.
I guess I would be swayed by the device family that was expected to be most deeply supported by flowcode.

I totally understand a third party software cannot support every feature of every device but coming from the land if PIC where its was an amazingly well supported and documented product family. Shame you cant buy PICs with CAN for the next few years! :)
John.

jay_dee
Posts: 135
Joined: Sun Dec 20, 2020 6:06 pm
Has thanked: 47 times
Been thanked: 31 times

Re: Migration to Pi Pico & CAN

Post by jay_dee »

Regards the PICO tool chain...yeah it does seem crazy..I think I pulled about 8GB and got had over by a full VisStudio enforced upgrade.
I may try the compact PICO ToolChain suggested by PI on my event laptop and see how I go. :)
I understand the VS2019 is what has worked for you guys but I'm struggling to get a copy of that...who know why. :)

Post Reply