Practical Tips for Keil: How to Output BIN Files

Follow+Star Public Account, don’t miss wonderful content
Practical Tips for Keil: How to Output BIN Files
Author | strongerHuang
WeChat Public Account | Embedded Column
Some friends are curious, why does Keil only have the hex output option, but no bin output option?
Practical Tips for Keil: How to Output BIN Files
This article explains: How to output bin files using Keil

Using Keil’s built-in fromelf conversion tool

The method here is actually very simple, it is implemented through Keil’s built-in tool (fromelf).

Practical Tips for Keil: How to Output BIN Files

We just need to add a command in the User options after compilation:

C:\Keil_v5\ARM\ARMCLANG\bin\fromelf.exe –bin –output ./Objects/Demo.bin ./Objects/Demo.axf

Practical Tips for Keil: How to Output BIN Files

After adding this command, after compilation, you will see the bin file in the output path (folder):

Practical Tips for Keil: How to Output BIN Files

Explain the meaning of the command

C:\Keil_v5\ARM\ARMCLANG\bin\fromelf.exe
Represents: the path of the tool (fromelf.exe)
–bin –output
Represents: output bin file format
./Objects/Demo.bin
Represents: output bin file path
./Objects/Demo.axf
Represents: axf file path
Note: The axf format file is a file generated by the ARM compiler, which contains hex and debugging information.

For more explanations about axf files, you can refer to the article:Is there a big difference between the three file formats: bin, hex, and axf?

The meaning of this command is: Use (fromelf.exe) this tool to convert the axf file into a bin file.

Practical Tips for Keil: How to Output BIN Files

If it is the default installation path:

C:\Keil_v5\ARM\ARMCLANG\bin\fromelf.exe

Then the command can be simplified like this:

fromelf –bin –output=./Objects/Demo.bin ./Objects/Demo.axf

This command has detailed explanations from the official side, if you want to know more, you can check the official website.

Official website address:

https://developer.arm.com/documentation/dui0477/latest/fromelf-command-line-options/–bin

Practical Tips for Keil: How to Output BIN Files

Finally, I recorded a video, you can refer to it:

———— END ————
Follow the public account and reply Keil』『MicrocontrollerEmbedded Tools to read more related articles.
Reply “Join Group” to join the technical exchange group according to the rules, reply “1024” to see more content.

Practical Tips for Keil: How to Output BIN Files

Practical Tips for Keil: How to Output BIN Files

Click “Read Original” to see more shares.

Leave a Comment