PlatformIO Community

How to create a HEX for custom upload command?

I’m using a custom uploader which needs a hex file. This used to be present in the build directory, but now it seems I only get .elf and .bin build output.

Is there an easy way to force creation of hex without resorting to tricks?

Here’s what I have tried in platformio.ini:

upload_protocol = custom
upload_command = cat $UPLOAD_FLAGS <$BUILD_DIR/${PROGNAME}.hex
upload_flags = >$UPLOAD_PORT

Please check a solution by @maxgerhardt

Ok, thx - that will solve it. Had hoped to avoid adding a .py script, but it’s not a show-stopper.