Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compile error #19

Open
isarychkin opened this issue Aug 21, 2022 · 3 comments
Open

compile error #19

isarychkin opened this issue Aug 21, 2022 · 3 comments

Comments

@isarychkin
Copy link

unable to compile:
[ 66%] Building C object CMakeFiles/firmware.dir/main.c.obj
In file included from /pico/micropython/ports/rp2/canis/candrivers/mcp2517fd/mcp2517fd-types.h:23,
from /pico/micropython/ports/rp2/canis/candrivers/canapi.h:27,
from /pico/micropython/ports/rp2/canis/rp2_can.h:22,
from /pico/micropython/ports/rp2/main.c:52:

/pico/micropython/ports/rp2/canis/candrivers/mcp2517fd/rp2/mcp2517fd-rp2.h: In function 'mcp2517fd_spi_pins_init':
/pico/micropython/ports/rp2/canis/candrivers/mcp2517fd/rp2/mcp2517fd-rp2.h:131:5: error: implicit declaration of function 'irq_set_enabled' [-Werror=implicit-function-declaration]
131 | irq_set_enabled(IO_IRQ_BANK0, true);
| ^~~~~~~~~~~~~~~
/home/ivs/pico/micropython/ports/rp2/canis/candrivers/mcp2517fd/rp2/mcp2517fd-rp2.h:131:21: error: 'IO_IRQ_BANK0' undeclared (first use in this function)
131 | irq_set_enabled(IO_IRQ_BANK0, true);
|

@kentindell
Copy link
Owner

That looks like the Pico SDK function isn't declared. Did it get installed in the lib directory? The cmake build process produces a maze of twisty passages all alike.

@isarychkin
Copy link
Author

isarychkin commented Aug 21, 2022

@kentindell
I added #include "hardware/irq.h" in mcp2517fd-rp2.h and all went fine. Cheers.

@kentindell
Copy link
Owner

I'll keep this open. There's an update to the CAN SDK for C coming, and a new MicroPython release against it, so I'll check this doesn't happen again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants