kentindell/canhack

How to build the firmware.uf2 file?

Closed this issue · 6 comments

I'm new to the RPi Pico and have installed micropython and the pico-sdk to test some of the provided examples.
I looked at the docs but still have no clue how to build a canhack binary that combines C and micropython components ¯_(ツ)_/¯
Can you please upload some of the needed make/CMake files to build the firmware.uf2?
Thanks!

I'm currently updating the MicroPython firmware to add in a CAN framework (for our new MCP2518 board) and it touches the rp2 MicroPython port in a lot of places (GPIO IRQ interfacing - the RP2040 shares a single vector for all its ISRs, and is intricately enmeshed with the machine.Pin class).

When I release that I'll work out the best way to make it all available. Still not sure what the best way is.

Ok, that's a valid reason for me to start with the binary first ;-)
At least creating a MicroPython fork in your account for your development process would probably be a good starting point :-D
Many thanks for your fast reply!

Btw. assigning CAN TX and CAN RX to the pins 29 and 27 was an excellent choice!

canhack-pico-front-small
canhack-pico-back-small

I got the 00000100#DEADBEEF frame on my other CAN interface - so at least the TX line was connected correctly. I assume the same for the RX line but I don't have the logic analyzer at my fingertips right now. Really cool project!

Fabulous! I am always very pleased to see CANHack hardware working!

I've got the MicroPython MCP2518 CAN drivers pretty much written now, but it required quite some surgery in the guts of the Pico SDK and MicroPython due to the way the XIP flash memory subsystem works. I've written it up one of the major issues here:

https://kentindell.github.io/2021/03/05/pico-priority-inversion/

I think the upstream MicroPython is now the official one, so I shall rebase everything to that. I should be able to drop a patch into this repo that will apply to the official MicroPython repo and allow the firmware to be built from scratch.

Exellent!! Looking forward to it!