Arduino compile to .bin?
Arduino compile to .bin?
Is there a way to get the Arduino IDE with Roger's core compile to a .bin file that could be uploaded to a device by a user using the STM Demonstrator, without bothering with a bootloader?
Re: Arduino compile to .bin?
Using stlink on arduino ide doesn't need bootloader, serial or messing with the boot pins.
But also, arduino ide creates a .bin file when compiles, it saves it on the OS temp folder, just check your compile resume log, it says something about an .ino.elf file, on the same folder it leaves the .bin file.
Look for something like:
"C:\\Users\\<USERNAME>\\AppData\\Local\\Arduino15\\packages\\STM32\\tools\\xpack-arm-none-eabi-gcc\\9.2.1-1.1/bin/arm-none-eabi-size" -A "C:\\Users\\<USERNAME>\\AppData\\Local\\Temp\\arduino_build_239137/sketch.ino.elf"
But also, arduino ide creates a .bin file when compiles, it saves it on the OS temp folder, just check your compile resume log, it says something about an .ino.elf file, on the same folder it leaves the .bin file.
Look for something like:
"C:\\Users\\<USERNAME>\\AppData\\Local\\Arduino15\\packages\\STM32\\tools\\xpack-arm-none-eabi-gcc\\9.2.1-1.1/bin/arm-none-eabi-size" -A "C:\\Users\\<USERNAME>\\AppData\\Local\\Temp\\arduino_build_239137/sketch.ino.elf"
Re: Arduino compile to .bin?
Does the demonstrator accept hex files?
You can compile to hex file using "Ctrl+Alt+S" or "Export Complied Binary" under the Sketch menu.
You can compile to hex file using "Ctrl+Alt+S" or "Export Complied Binary" under the Sketch menu.
-
- Posts: 633
- Joined: Thu Dec 19, 2019 1:23 am
Re: Arduino compile to .bin?
Argh....
Usually the talk about binary files lead to talk about HEX and the file format. Here is a link to a reference regarding the Intel format:
http://www.keil.com/support/docs/1584/
You can also google and download the ancient Intel pdf doc.
Ray
Usually the talk about binary files lead to talk about HEX and the file format. Here is a link to a reference regarding the Intel format:
http://www.keil.com/support/docs/1584/
You can also google and download the ancient Intel pdf doc.
Ray
Re: Arduino compile to .bin?
In case anybody wants to distribute binaries of a sketch, here's the trick. Set the upload method to Serial. Compile. You will get a .bin file in the temp directory (if you want to see which directory that is, turn on verbose compilation in Arduino). This .bin file can be uploaded by the user using the Demonstrator.
When I've been giving instructions (e.g., in my Instructables projects) for uploading sketches, previously I was telling users to install a bootloader with the Demonstrator, then install the Arduino environment, and then finally use Arduino to compile and install the sketch. But now I see that giving people a .bin file lets them skip a lot of the steps.
When I've been giving instructions (e.g., in my Instructables projects) for uploading sketches, previously I was telling users to install a bootloader with the Demonstrator, then install the Arduino environment, and then finally use Arduino to compile and install the sketch. But now I see that giving people a .bin file lets them skip a lot of the steps.
Re: Arduino compile to .bin?
in the Arduino preferences
there is actually a parameter for the build path
https://github.com/arduino/Arduino/blob ... es.txt#L56
you can change that to a fixed build location, so that the build objects and binaries would be deposited in that path instead of a temp folder.
there is actually a parameter for the build path
https://github.com/arduino/Arduino/blob ... es.txt#L56
Code: Select all
# temporary build path, normally this goes into the default
# "temp" folder for that platform (as defined by java)
# but this can be used to set a specific file in case of problems
#build.path=build