Adafruit Bluefruit nRF52832 is supported by PlatformIO, so you should be able to use the same board package with a few minor changes for the GPIO pins.
In addition, Zephyr RTOS support for nRF52832 exists in PlatformIO.
Thanks @zpm1066, how do I do ‘minor changes for the GPIO pins’? Just define an use my own constants or do I also need to change board initialization code or other library functionality?
Also, this is I guess a question for the Platformio people here. When I used STM32 I remember using generic boards such as the one below. Will it be possible to add also a similar generic board definition for the nrf52832? It will support design of custom boards.
Take a look at the Arduino board package and/or Zephyr devicetree for one of the nRF52832 boards. You may be able to use one as is or may need to change the PIN numbers (for SPI, I2C, etc) to match your custom board.
I haven’t done a custom board from scratch, only modified a “Generic nRF5” (nRF51802) board for a custom nRF51802 board. It worked fine for most functions (GPIO, I2C, SPI) that I tried.
@zpm1066, it seems that you went through a similar journey but with a different MCU. If I create a custom json board file can I keep it in my project directory or does it have to reside in platformio managed directory? If in a platformio directory, did you manage to get your file accepted by platformio?
I kept the json in the platformio managed directory.
You have there a pretty interesting stepper motor analyzer project. Do you plan to build the Pico version, in addition to the Nordic Semi version?
Nordic Semi moved over to using their nRF Connect SDK across all their devices, running Zephyr RTOS together with their extended BLE & cellular stack. Their VSCode extensions are very impressive. They have executed their development superbly. Soon, they will be bringing out new devices with low power WiFi. So, they’ll have low power across cellular, BLE and WiFi. Hopefully we’ll get dev boards from the usual vendors (Adafruit, Sparkfun, etc).
I’ve been using nRF Connect - Zephyr - VSCode for all my nRF52840 development for quite sometime now. I would strongly recommended it plus Zephyr RTOS. You need a RTOS for accurate timings, acquisition of fast signals, and measurements.
I also use PlatformIO + Zephyr for all my devices, especially now that Zephyr is supported on the Raspberry Pi Pico as well.
Arduino uses FreeRTOS underneath their framework. I prefer the Zephyr devicetree model. Very active development and support on it.