Building not creating .bin file

I downloaded PlatfromIO on VS code (windows) to compile Marlin, and spifictly I need the .bin file, not the .hex one. However, whenever I build Marlin, the last few lines are about building and linking firmware.hex and firmware.elf, but nothing about the firmware.bin file that many posts here tell you to look for. I could not find any in the build folders, reinstalled PlatfromIO and VS code, and still have no way to find the firmware.bin file. How do I create this file. Do I need to edit something in the platformio.ini or change some global setting?

What exact Marlin repository and configuration (Config header files, platformio.ini default environment) are you using?

I am having the same problem of VS creating a .hex file instead of a .bin file.

With some build scripts you need to trigger the creation of the .bin file by clicking on upload. It usually builds the file only on-demand.

This is incorrect. The upload option sends the data to the printer directly and stills creates a .hex file.

What exact Marlin version + configuration are we talking?

I am also having trouble with Platformio not building a .bin file. It builds a .elf and a .hex file but not a .bin.
I am using Marlin version Marlin-2.0.9.7 and config for an Ender 5 plus printer. I’m also using the silent board which is an ATmega2560

My printer is bricked without this so I’d love some advice.

And you need the .bin file to put it on an SD card to update the printer? Or why not upload directly?

Correct. I did try uploading it directly and it bricked the printer. I followed the steps in this tutorial (https://e3d-online.zendesk.com/hc/en-us/articles/4411708912017-Marlin-2-0-firmware-guide-Revo-Hemera-) and I got stuck after it didn’t build a .bin file. I tryied to upload directly using Upload All in PlatformIO and it did upload something, but it’s now jammed up and stuck in Chinese. It boots to a print in progress screen in Chinese even though it’s not printing.

Edit: It also has scrambled text in different spot and when I somehow got it to the info screen it was all nonsense.

That tutorial was made in an LPC1768 environment, an ARM chip. Are you sure the bootloader on your printer operates on .bin files and not .hex files? Where’s the source of documentation for this?

If you’re sure, you can trigger the conversion manually by executing

C:\Users\Max\.platformio\packages\toolchain-atmelavr\bin\avr-objcopy -O binary -R .eeprom .pio/build/mega2560/firmware.elf .pio/build/mega2560/firmware.bin

In a PIO CLI, with username path adapted.

This makes no sense then. When I look at https://www.creality.com/pages/download-ender-5-plus and download the e.g. “Ender-5 PlusMarlin1.1.6-HW-V2.2-SW-V1.70.3BLTouchMulti0411” file and unpack it, it very clearly has a Ender-5PlusBLTouch_0402_V1.70.3 BL.hex HEX file in it and the Notes.txt says

Mainboard firmware update:
1. Connect the USB port of the PC port of the computer to the USB port of the Ender-5 Plus machine, and check whether the port is connected normally in This Computer → Management → Device Manager;
2. Open the Creality Slicer 4.8.2 software, go to Preferences → Configure Creality → Printers → Add → Select Ender-5 Plus to add;
3. Click Activate → Update firmware → Upload custom Firmware → Select the firmware file “Ender-5PlusBLTouch_0402_V1.70.3 BL” → wait for the firmware update to complete;

So they want you to use the .hex file in the Creality slicer program to update the mainboard firmware. No mention of a .bin file upgrade. Maybe you should try to get back to the stock-firmware first.

Ok interesting. I’ve tried loading the hex file on with the sd card but it wouldn’t read the file. Perhaps the firmware is fine but I need to use the slicer as the notes say. I’ll give that a try.