I am trying to flash firmware for a project. In order to do this I am required to put a hardware file into the hardware folder. I see that later versions of the IDE (I am using 2.3.6) no longer have a hardware folder. I have searched and searched but there seems to be nothing on where to put hardware files in Arduino 2.3. can anyone point me in the right direction?
Welcome to the forum
What exactly are you required to put into the hardware folder ? Is the folder located on the PC or on the board and which Arduino board are you using ?
I am building a head tracking device based on an arduino Pro Micro board. I am required to put a supplied file named edtracker into the hardware folder of the arduino IDE. The arduino IDE resides on my PC.
Please post a link to where you are seeing these instructions
- Download the ED Tracker Arduino hardware files here: GitHub - brumster/EDTracker2_ArduinoHardware: Custom hardware device files for Arduino IDE (Github has no obvious download button. Click Code > Download Zip in the upper right)
- Navigate to your Arduino install directory. Typically, C:/Program Files/Arduino
- Extract the 'edtracker' folder from the Github download to the Arduino/Hardware folder (you should see Arduino/Hardware/edtracker/avr)
The instructions relate to IDE 1.x
No promises, but the hardware folder for IDE 2.x is here
C:\Users\<your username>\AppData\Local\Arduino15\packages\arduino\hardware so it is worth a try putting the files there
OK.Thanks for your help Bob. I will try this tomorrow and post the outcome.
Aside from the README.md, there's only one thing at the root of the repository: a directory, edtracker/avr. In that directory are some .txt files and subdirectories. Searching for one of those text files
$ find ~/Library/Arduino15/packages/ -name boards.txt
/Users/kenb4/Library/Arduino15/packages/esp32/hardware/esp32/3.0.7/boards.txt
/Users/kenb4/Library/Arduino15/packages/esp8266/hardware/esp8266/3.1.2/boards.txt
/Users/kenb4/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/boards.txt
Checking one of those directories (subdirectories end with slash)
$ ls -1p ~/Library/Arduino15/packages/arduino/hardware/avr/1.8.6/
boards.txt
CMakeLists.txt
cores/
idf_component.yml
installed.json
Kconfig.projbuild
libraries/
package.json
platform.local.txt
platform.txt
programmers.txt
tools/
variants/
Same files and subdirectories. A closer look at that path
Arduino15: it was introduced for version1.5. The location is OS-specific, under the user's home- currently on a Mac: ~/Library/Arduino15
- Linux:
~/.arduino15 - Windows: equivalent of
~\AppData\Local\Arduino15
packagesarduino: the vendorhardwareavr: architecture1.8.6: version
The platform.txt file says
name=EDTracker AVR Boards
version=1.6.7
So you'll want to move the content of edtracker/avr so that you have ~\AppData\Local\Arduino15\packages\edtracker\hardware\avr\1.6.7\platform.txt for example.
Not sure if that's it; never tried to manually install a board. Definitely restart the IDE. Official docs here.
Hi @legion12. The correct place to manually install boards platform is under your Arduino sketchbook folder. It is not a good idea to manually install platforms to the "Arduino15" folder because that folder is only intended to be used for installations performed via the Arduino IDE Boards Manager.
Likewise, even when using Arduino IDE 1.x where it is technically possible to do so, it would be a bad idea to manually install a platform to the Arduino IDE installation folder.
I'll provide instructions you can follow to install the platform:
- Select File > Preferences... (or Arduino IDE > Settings... for macOS users) from the Arduino IDE menus.
The "Preferences" dialog will open. - Take note of the path shown in the "Sketchbook location" field of the dialog.
- Click the "CANCEL" button.
The "Preferences" dialog will close. - Click the following link to open the platform's GitHub repository homepage in your web browser:
https://github.com/brumster/EDTracker2_ArduinoHardware - Click the "Code ▾" button you see on that page.
- Select Download ZIP from the menu.
A download of the ZIP file of the platform will start. - Wait for the download to finish.
- Extract the downloaded file.
- Create a folder named
hardwareunder the path you saw in the "Sketchbook location" preference. - Copy the
edtrackerfolder from the extracted folder to thehardwarefolder you created.
The folder structure of the installation must look like this:
(where<Sketchbook location>/ ├── hardware/ │ ├── edtracker/ │ │ ├── avr │ │ │ ├── boards.txt │ │ │ ... │ │ ... │ ... ...<Sketchbook location>is the path from the Sketchbook location" preference) - Select File > Quit (or Arduino IDE > Quit Arduino IDE for macOS users) from the Arduino IDE menus.
All Arduino IDE windows will close. - Start Arduino IDE.
Thanks to all who are trying to help me. I have created the folder suggested by ptillisch.And placed the edtracker folder in the required location. I now have a txt file "boards" in the avr sub folder. But there is also three more folders,cores, libraries and variants and two text files,platform.txt and programmers.txt showing up in the avr folder. Is this correct or should I delete all other folders and files other than boards.txt ?
Ken I did not try your suggestion as I have read it is not good to do that instal. But thanks for taking the time to try and help.
I forgot to ask. Is this instruction (ptillisch) meant for arduino IDE1 or IDE2?
You'll need to leave everything in that directory. There is however a problem when you try to compile a sketch
Detecting libraries used...
C:\ArduinoIDE2.x\arduino-ide_2.3.6_Windows_64bit\resources\app\lib\backend\resources/hardware/tools/avr/bin/avr-g++ -c -g -Os -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -w -x c++ -E -CC -mmcu=atmega32u4 -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_EDTRACKER2-6050 -DARDUINO_ARCH_AVR -DUSB_VID=0x2341 -DUSB_PID=0x8036 -DUSB_MANUFACTURER= -DUSB_PRODUCT="EDTracker EDTracker2" -IC:\Users\bugge\OneDrive\Documents\Arduino\hardware\edtracker\avr\cores\edtracker -IC:\Users\bugge\OneDrive\Documents\Arduino\hardware\edtracker\avr\variants\edtracker2-6050 C:\Users\bugge\AppData\Local\arduino\sketches\1C4FAAFF62D79B91E07221591198A19D\sketch\sketch_jul20a.ino.cpp -o nul
exec: "C:\\ArduinoIDE2.x\\arduino-ide_2.3.6_Windows_64bit\\resources\\app\\lib\\backend\\resources/hardware/tools/avr/bin/avr-g++": executable file not found in %PATH%
Compilation error: exec: "C:\\ArduinoIDE2.x\\arduino-ide_2.3.6_Windows_64bit\\resources\\app\\lib\\backend\\resources/hardware/tools/avr/bin/avr-g++": executable file not found in %PATH%
I do not know how to solve that and I'll leave it up to @ptillisch to advise on that.
I got a little further; I'm not sure if I'm on the right track though. At least it will be able to find a compiler.
In platform.txt you need to change the compiler path from
compiler.path={runtime.ide.path}/hardware/tools/avr/bin/
to
compiler.path={runtime.tools.avr-gcc.path}/bin/
And after that I'm really stuck (short version)
<command-line>:0:23: warning: ISO C++11 requires whitespace after the macro name
avr-gcc: error: C:\Users\bugge\AppData\Local\arduino\sketches\BC5E6E1C8358FFE238198C2C7ACA2C55/core\core.a: No such file or directory
exit status 1
Compilation error: exit status 1
The problem is the platform is missing this change:
Change line 59 of platform.txt from this:
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{build.path}/{archive_file}" "{object_file}"
to this:
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"
After that, either restart Arduino IDE, or else select Tools > Reload Board Data from the Arduino IDE menus, then try compiling again. Hopefully this time it will work as expected.
Arduino IDE 1.x has a "rewrite" system to translate the old "pattern" to the new one:
but Arduino IDE 2.x does not have that system, so the old style "pattern" causes the compilation error you noted.
It did successfully compile an empty sketch.
The compiler was easy to find due to the error message and next easy to solve by comparing the platform.txt in Sparkfun's AVR board package with the edtracker's one.
I however never knew that the '.a' in core.a stood for archive; I just knew it as a static library. Never too old to learn.
And that explains why edtracker's readme states that it was successfully tested with IDE 1.6.4, 1.6.7 en 1.8.5 The change took place in IDE 1.6.6).