# RP2040-Zero Compilation error on dev version SimpleFOC

**URL:** <https://community.simplefoc.com/t/rp2040-zero-compilation-error-on-dev-version-simplefoc/4452>\
**Category:** Uncategorized\
**Created:** [February 13, 2024, 2:31pm UTC](https://community.simplefoc.com/t/rp2040-zero-compilation-error-on-dev-version-simplefoc/4452 "2024-02-13T14:31:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![multisystem](https://community.simplefoc.com/user_avatar/community.simplefoc.com/multisystem/32/5114_2.png) [@multisystem](https://community.simplefoc.com/u/multisystem)\
**Post date:** [February 13, 2024, 2:31pm UTC](https://community.simplefoc.com/t/rp2040-zero-compilation-error-on-dev-version-simplefoc/4452/1 "2024-02-13T14:31:33Z")

</div>

Hello,

RP2040-Zero no longer compiles in the dev version  
Compilation is fine in master

RP2040-Zero: [https://www.waveshare.com/wiki/RP2040-Zero](https://www.waveshare.com/wiki/RP2040-Zero)

lib RP2040 ==\> 3.7.1 installed [GitHub - earlephilhower/arduino-pico: Raspberry Pi Pico Arduino core, for all RP2040 and RP2350 boards](https://github.com/earlephilhower/arduino-pico)

Error:

```auto
    /home/***/Arduino/libraries/Arduino-FOC-dev/src/drivers/hardware_specific/rp2040/rp2040_mcu.cpp:22:10: fatal error: pinDefinitions.h: No such file or directory
   22 | #include <pinDefinitions.h>
      | ^ ~~~~~~~~~~~~~~~~~
  compilation terminated.
  exit status 1
  Erreur de compilation pour la carte Waveshare RP2040 Zero

```

---

<div class="post-metadata">

**Author:** ![runger](https://community.simplefoc.com/user_avatar/community.simplefoc.com/runger/32/395_2.png) [@runger](https://community.simplefoc.com/u/runger)\
**Post date:** [February 13, 2024, 11:47pm UTC](https://community.simplefoc.com/t/rp2040-zero-compilation-error-on-dev-version-simplefoc/4452/2 "2024-02-13T23:47:42Z")

</div>

Thank you for reporting it! I think it’s a difference between earlephilhower core and the standard core. We’ll fix it for the next release.

---

<div class="post-metadata">

**Author:** ![neilmendoza](https://community.simplefoc.com/user_avatar/community.simplefoc.com/neilmendoza/32/2370_2.png) [@neilmendoza](https://community.simplefoc.com/u/neilmendoza)\
**Post date:** [April 29, 2024, 10:41pm UTC](https://community.simplefoc.com/t/rp2040-zero-compilation-error-on-dev-version-simplefoc/4452/3 "2024-04-29T22:41:15Z")

</div>

@runger I just ran across this issue with the earlephilhower core and looks like it’s the same in the dev branch. For now, I changed line 38 in rp2040\_mcu.cpp to the following which seems to fix it as I believe there’s no pin remapping by default…

`uint pin = pin_nr;`

---

<div class="post-metadata">

**Author:** ![runger](https://community.simplefoc.com/user_avatar/community.simplefoc.com/runger/32/395_2.png) [@runger](https://community.simplefoc.com/u/runger)\
**Post date:** [April 30, 2024, 10:14am UTC](https://community.simplefoc.com/t/rp2040-zero-compilation-error-on-dev-version-simplefoc/4452/4 "2024-04-30T10:14:26Z")

</div>

I’m sorry, I dropped the ball on this one and the fix did not make it into the recent release.

Your workaround is the correct solution for boards that don’t use Arduino style pin-numbering.

I have now merged a fix to the dev branch. [fix RP2040 compile problems with earlehillpower by runger1101001 · Pull Request #397 · simplefoc/Arduino-FOC · GitHub](https://github.com/simplefoc/Arduino-FOC/pull/397)

The problem was caused by fixing incompatibility with the Nano RP2040 Connect, which uses Arduino style pin numbers rather than RP2040 GPIO numbers. Unfortunately the earlephilhower core does not defined the digitalPinToPinName macro used for mapping between the two.
