Problem when adding a custom board in board manager

Hello,

I created a custom board that I got PCB printed. It uses a nRF52840 chip and has similar components as the adafruit feather. To bootload it, I used the Nordic nRF52840 Dev Kit, with an adafruit bootloader that I found on Github : Releases · adafruit/Adafruit_nRF52_Bootloader · GitHubadm_b_nrf52840_1_bootloader-0.9.2_s140_6.1.1.hex

Before printing the PCB, I tried every component on a testing board, and when I was programming with Arduino I used the board “Nordic nRF52840 DK” and I modified the files variants.cpp and variants.h in order to make it work with my board.

I decided to create a third party board in the board manager that I could add in preferences. I copied the folder of adafruit, and added my new board before deleting the adafruit board in it. I modified the files “boards.txt” and “platform.txt”. In board.txt there is only my board, and in platform.txt I modified the beginning : name, version and architecture. The only folder I modified in this archive is “variants”, just letting my new board and deleting adafruit boards.

Then I created the Json and a Github repository :

https://raw.githubusercontent.com/Adrivin/Test/refs/heads/main/package_digisport_index.json

I verified the size and the checksum of the archive with Git Bash.

But when I put the raw link of my Json in preferences the only thing I see is a download of the file but nothing happens after that on the IDE Arduino. With no more informations from the IDE I decided to download Arduino CLI and here is what I found :

And also when I try this command : “arduino-cli core install Digisport:nrf52” and I found this error

Has anyone experienced the same problem or know the solution ?

Hi
The simple question - if your board is only slightly different from Adafruit Feather, why did you need to install a completely new platform for it?
Why not manage it just as a variant of original Feather?

Hi,

Thanks for your reply .
I wanted to install a new platform because I will create other custom boards with different sensors on it and I thought it would be better to have a platform only with my custom boards.
Managing it like a variant of original Feather works,but I wanted to make it easy to use for everyone, without going in folders that are difficult to reach like the folder "Arduino15". That's why I wanted to create a new platform, if I change my computer or if one of my friend wants to use my custom board we just have to put the link in preferences and then we can upload things on it.

A few years ago I participated in writing such a platform for a third-party line of chips from scratch and as far as I remember, the main reason why your package may not be visible in Arduino is the incorrect directory structure and non-standard directory names. Study this section of the Arduino help carefully:

https://support.arduino.cc/hc/en-us/articles/360016466340-Add-third-party-platforms-to-the-Boards-Manager-in-Arduino-IDE

Study the structure of board support package, using an examples of existing 3rd boards in Arduino:

I would advice you to start from default Adafruit Feather package and edit it for your needs, changing one thing at a time and test it working after every change.

Hi @adrivin.

Unfortunately the error message is not very helpful. The problem is this part of your package index:

This tells Arduino CLI to install version 0.5.3 of the nrfutil tool that is provided by the adafruit package. However, if you look in the relevant package index, you will see that it does not provide any such tool:

https://adafruit.github.io/arduino-board-index/package_adafruit_index.json

The reason is that, for some inexplicable reason, the developers of the "Adafruit nRF52" boards platform bundled the tool with the platform instead of distributing it separate from the platform as is usually done:

So this means you will need to find a different way of providing the nrfutil tool dependency of your platform. You could do that by putting the burden of installing the tool manually on the user, as Adafruit did for Linux users:

https://github.com/adafruit/Adafruit_nRF52_Arduino#adafruits-nrfutil-tools

adafruit-nrfutil (derived from Nordic pc-nrfutil) is needed to upload sketch via serial port.

  • For Windows and macOS, pre-built executable binaries are included in the BSP at tools/adafruit-nrfutil/. It should work out of the box.
  • Linux user need to run follow command to install it from PyPi
$ pip3 install adafruit-nrfutil --user

Or you can host the tool archives somewhere on the web (using GitHub release assets is a simple solution), then add the entry for the tool to your own package index. You can learn about how to do that from the Arduino Package Index Specification:

https://arduino.github.io/arduino-cli/latest/package_index_json-specification/#tools-definitions

Cool!

I submitted a report about this to the Arduino CLI developers:

Hi @ptillisch

Thank you a lot !

I tried your first solution and it works !

I will try the second one now so that the user will not need to manually install the tool.

You are welcome. I'm glad if I was able to be of assistance.

It's important to double-check the structure of the JSON file and the archive it points to. Arduino IDE expects a specific format, and even a small mismatch in the archive content or folder layout can prevent it from loading correctly.