kentindell/canhack

Issue with build a firmware.uf2 on a Pi 4

Opened this issue · 12 comments

Hello all,

I have trouble to build a firmware.uf2.
In the readme on the step 4 to make the build in the path "ports/rp2"

It says to me:
/home/canhack/micropython/ports/rp2 (da4b38e75*) # make
[ -d build-PICO ] || cmake -S . -B build-PICO -DPICO_BUILD_DOCS=0 -DMICROPY_BOARD=PICO
make -s -C build-PICO
make[1]: *** Es wurden keine Ziele angegeben und keine „make“-Steuerdatei gefunden. Schluss.
make[1]: *** No targets were specified and no make control file was found. Ending.
make: *** [Makefile:19: all] Fehler 2

Can somebody help me, or upload a firmware.uf2 for me?

Thanks :)

Firstly, I've not tried to build MicroPython on a Raspberry Pi before. In theory it should be fine but I've not done it.

The first step is to build the upstream MicroPython source before you apply the firmware patches. If that fails then the problem is with your build environment. What does that result in?

Sorry but I am new in python. And have no Idea how to compile on the pico.

But I think the problem is my environment what do you say.

The MicroPython firmware is now pretty large and complex. So the first step is to build a clean MicroPython firmware build.

Try following the instructions in the README here:

https://github.com/kentindell/canhack/blob/master/pico/micropython/README.txt

Get the MicroPython repo cloned, and use the v1.18 release. If you can get steps 1-4 in the README done then you can build the MicroPython firmware.

I already did this steps. See first post. But thanks for help. :)

So that's a 'stock' MicroPython build that failed? It works on Ubuntu and even macOS (subject to compiler tools) so I'm a bit surprised it fails on the RPi.

Are all the normal build-essential tools installed on the RPi?

Hmm, someone else seems have problems with this but fixed it by changing Rapsbian's language to English:

micropython/micropython#4755

And also problems if the path lengths are too long:

https://forum.micropython.org/viewtopic.php?p=63991#p63991

Some people seem to get along fine on the RPi4, and others don't..

I will check that, thanks for the hint! :)

Ok I have a big issue with that. Have somebody a already running compiled of firmware.uf2 for me? Thanks :)

Does firmware-220511.uf2 not work for you?

I think not, because when I put in the Pico it restart and in the console it show me:
MicroPython v1.19.1 on 2022-06-18; Raspberry Pi Pico with RP2040
Type "help()" for more information.

from rp2 import *
c = CAN()
Traceback (most recent call last):
File "", line 1, in
NameError: name 'CAN' isn't defined

That's not the firmware in the repo: that looks like you've got the stock firmware on it.

I have a fresh pico unpacked it and take the "firmware-20220511.uf2" in the "BOOTSEL" drive. After that it restart and I have a stock firmware on it. After that I put the python src/can2/ into the Pico.

But its not running. A simple question, exist a Howto how to run it easy? :)

thanks for help