Directory tree structure for hardware in Arduino/hardware ?

Hi. I've been reading other threads I've found. I even found something saying this process is well documented, but I can't find where.

For ages I've been hacking up the files for boards and transplanting them to .arduino15. I only just found out that I can actually put things in Arduino/hardware and not worry about them being overwritten.
My reason is because I use arm64 based devices to run the Arduino IDE, and some boards I use don't have support for it.

I believe I'm running modified versions of STM32, and ESP32. K210 finally has support so I'm not using my version any more.

I'd be happy if someone could even show me an example directory structure, and any special files for STM32.

The Arduino IDE tends to get a bit grumpy at me whenever I build with any core type if I have an unsupported board or tools in my .arduino15

Besides being annoying and causing slower builds, it's way too easy to accidentally wipe out my custom versions. It's also not very portable to other devices.

So if anyone can point me toward the documentation, or show me an example I'd be really happy.

If your platform installation looks like this:

~
|_ .arduino15
|_ packages
|_ foo
|_ hardware
|_ bar
|_ 1.2.3
|_ boards.txt

Then the equivalent sketchbook structure looks like this:

|_ hardware |_ foo |_ bar |_ boards.txt

This is documented in the platform specification:
https://arduino.github.io/arduino-cli/latest/platform-specification/#hardware-folders-structure
It doesn’t go into the structure under the ~/.arduino15 folder because that structure is intended to be automatically generated by Boards Manager, so an internal implementation detail rather than part of the specification.

In the example above, “foo” is the vendor folder and “bar” is the architecture folder.

The unfortunate thing is that there isn’t an equivalent to the tools framework (e.g., ~/.arduino15/packages/foo/tools) for the sketchbook. But the tools in the ~/.arduino15 folder are recognized just as usual when compiling for boards in the sketchbook installed platforms. When the Arduino developers are working on a platform, they install the release version via Boards Manager as usual to get the toolchain installed, then they clone the repository to the sketchbook using a modified vendor folder name (e.g., arduino-beta). This name change allows the release and development versions of the platform to coexist. Arduino IDE 1.8.13 shows a “(sketchbook)” next to the platform name in the Tools > Board menu, which makes it easy to distinguish between the two copies of the platform.

Please let me know if anything is unclear or you have any suggestions for improvements to the documentation.

Thanks so much for the replies!

I didn't want to reply before I've tried it. I have done a couple of quick tests. Generally it seems fine. I'm seeing some odd things which may be out of the scope of this thread. I'm trying to work it out before I ask any more.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.