Closed gicking closed 5 years ago
The Arduino IDE expects this hardware package folder structure:
{sketchbook folder}
|_hardware
|_{vendor name}
|_{architecture name 1}
| |_boards.txt
| |_etc...
|_{architecture name 2}
|_boards.txt
|_etc...
This allows one vendor to have multiple architectures (e.g. arduino:avr, arduino:samd, arduino:sam). So if you have this folder structure:
/home/georg/Dokumente/Arduino
|_hardware
|_sduino
|_stm8
|_tools
the Arduino IDE expects the tools
folder to contain the hardware package for the sduino:tools architecture. But tools
does not contain a hardware package, so the IDE displays a warning. The stm8
folder does contain the valid hardware package.
does an empty "boards.txt" avoid this warning? That would avoid stupid questions like this... ;-)
It does. The only side effect I can see is that this causes an extra horizontal divider line to be added to the Tools > Board menu as a separator for the empty hardware package. I don't think that's a big deal and most people probably wouldn't even notice it.
If this is done, I recommend adding a comment to the dummy boards.txt file to explain its purpose.
@perl1234: The arduino folder structure is still partly a mystery to me. I read the 3rd party hardware specification (many times...), but I am still not sure where to put the tools for a manual install.
The original Arduino avr installation and Arduino_STM32 both place their tools in hardware/[vendor]/tools. This is what I used as a reference.
The automatic install places my core package (on a Linux system) in ~/.arduino15/packages/sduino/hardware/stm8/[version]
and the tools packages in ~/.arduino15/packages/sduino/tools/[toolpackagename]
It would be great to unify these two different tree structures, but I couldn't find any way so far. Do you have any idea?
I could move the tools into hardware/sduino/stm8/tools
. This differs from the structure of the stock avr core, but it would solve the boards.txt issue. But does it make sense?
I've also puzzled over how to do this. I have mainly only had experience with manual installation of 3rd party AVR packages that reference the tools from Arduino AVR Boards, where it was never an issue.
At one point I was looking for a way to provide an upload tool in a way that would work for both manual and Boards Manager installations. The solution I came up with was to put the tools in {sketchbook folder}/tools
. This allows you to use the path {runtime.hardware.path}/../../tools/
in platform.txt, which works with the folder structure of both the Boards Manager installation and manual installation. However, that's not ideal since {sketchbook folder}/tools
is actually intended to be used for Java plugins for the Arduino IDE, and also because it doesn't allow everything to be installed under one parent project folder.
In the end, it was determined that providing a custom tool to solve the rare problem was not worth the added complexity so this never went beyond my initial testing.
The ESP32 core was probably the most common manually installed package with tools during the time before Boards Manager installation support was added. I haven't taken a look at how they've handled things.
Good idea. ESP32 installs the tools in hardware/espressif/esp32/tools - the equivalent would be hardware/sduino/stm8/tools Maybe I should try that. But getting 0.4.0 out is first.
I understand you are currently preparing an install via board manager...!? Therefore I will skip this for now as only nice to have
Yes, I would like to change the file structure. But that might break things, so I postphone that for the time after 0.4.0. I am getting closer...
hello Michael,
I have just cleanly forked sduino in Github and re-installed it locally following your instructions - much cleaner now :-) But when I open the library manager in the Arduino-IDE (1.8.6) I get the following warning (in German):
Es konnte keine boards.txt in /home/georg/Dokumente/Arduino/hardware/sduino/tools gefunden werden. Ist sie noch von einer Version vor Arduino 1.5?
Is this important or can I ignore this? Compiling works, uploading not yet (see separate issue)
Thanks in advance!
Georg