Unable to find any reference to _inttypes.h


I am trying to get a Pimoroni Badger 2040 to compile using an example from the Pimoroni boilerplate, https://github.com/avinal/badger2040-boilerplate/blob/main/programexample/main.cpp

Using VSCode PIO on Macos.

However I have come to a dead end on my knowledge and internet searching to get any further so hoping someone can assist.

I have managed to get some of the libraries to work but can’t find a reference to _inttypes.h anywhere.
Pervious to that, I needed some others from iic.h which is used https://github.com/openbsd/src/blob/master/include/inttypes.h for.

My platformio.ini is as follows:

platform = https://github.com/maxgerhardt/platform-raspberrypi.git
board = pico
framework = arduino
board_build.core = earlephilhower
lib_deps = 
	adafruit/Adafruit ADS1X15 @ ^2.4.2
lib_extra_dirs = 

Error when building:

/Users/***/Library/CloudStorage/OneDrive-Personal/DEV/GitHub/freebsd-master/include/inttypes.h:32:10: fatal error: machine/_inttypes.h: No such file or directory
   32 | #include <machine/_inttypes.h>
      |          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
*** [.pio/build/pico/src/main.cpp.o] Error 1


HOW is going including th FreeBSD kernel in a RP2040 microcontroller project going to work?

The repo you references is a Pico-SDK project foremost.To use it in the Pico-SDK you would have to make adaptations per docs anyway, to adapt to the Arduino sketch code structure.

How? The repo https://github.com/pimoroni/pimoroni-pico is not a PlatformIO-compatible library. It’s a repo containing lots of examples and driver code. PlatformIO only supports repos with a single library in them, preferably with a library.json manifest.

My recommendation: Stop trying to fit this into PlatformIO. Use the native CMake extension in VSCode. Install the needed toolchain for Pico-SDK per https://github.com/pimoroni/pimoroni-pico/blob/main/setting-up-the-pico-sdk.md. Clone https://github.com/avinal/badger2040-boilerplate recursively and open that project in VSCode and try to build it.

Thanks Max

I was just working through the errors and they seemed to clear. This would explain why I am not able to get any further.

I’ll take your advice.

Thanks again!