0

Building CircuitPython with specific module
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Building CircuitPython with specific module

by dobodu on Wed May 25, 2022 2:27 am

Hi Makers !

I'm facing a little trouble trying to build CircuitPython by myself for a Pi Pico with a spécific module support (canio).
Of course I know RP2040 has no CAN chip but I've wired a VP230 (MCMCU-230) chip to my pico.
I've set up the build directory, and all the required stuff, and CircuitPython is building correctly !
However, when I try to add to /ports/raspberrypi/boards/raspberry_pi_pico/mpconfigboard.mk the following line (last one)

Code: Select all | TOGGLE FULL SIZE
USB_VID = 0x239A
USB_PID = 0x80F4
USB_PRODUCT = "Pico"
USB_MANUFACTURER = "Raspberry Pi"
CHIP_VARIANT = RP2040
CHIP_FAMILY = rp2
EXTERNAL_FLASH_DEVICES = "W25Q16JVxQ"
CIRCUITPY__EVE = 1
CIRCUITPY_CANIO = 1


I get this compilation error (translated from french, might be slightly different)

make: *** No rules to build target « common-hal/canio/CAN.c », needed for « build-raspberry_pi_pico/genhdr/qstr.split ». Stop

Am I doing something wrong ?

dobodu
 
Posts: 2
Joined: Wed May 25, 2022 2:16 am

Re: Building CircuitPython with specific module

by neradoc on Wed May 25, 2022 7:04 am

Hi, the canio module is not implemented for RP2040. Someone would have to implement it first, if possible.

Modules are defined in shared-bindings, implemented in shared-module for the common part, if any (that's not the case for wifi for example), and in /ports/*/common-hal if there is a port-specific implementation, of which there is none for canio for the raspberrypi port, which is why the build fails since it can't find the implementation of some of the functions used in the module interface.

So instead, you would need an external CAN controller, like the MCP2515 over SPI, which has a driver for Circuitpython.

neradoc
 
Posts: 174
Joined: Wed Apr 27, 2016 2:38 pm

Re: Building CircuitPython with specific module

by dobodu on Thu Jun 02, 2022 4:31 pm

Perfectly clear !

Thank you !

dobodu
 
Posts: 2
Joined: Wed May 25, 2022 2:16 am

Please be positive and constructive with your questions and comments.