Hi
Referencing this document : https://developer.arm.com/documentation/ka004238/latest/
As the document says,
I used:
C:\Keil_v5\ARM\ARMCLANG\bin\fromelf.exe --hex --output=myprog.bin myprog.axf
But I get an error:
Fatal error: Q3900U: Unrecognized option '--hex'.
I am on the latest MDK.
Same result for Arm Compiler for embedded FUSA.
What is the correct command?
I think it should be --i32https://developer.arm.com/documentation/101754/0621/fromelf-Reference/fromelf-Command-line-Options/--i32
Is there a debug log where I can see what exactly it does when I select create hex in Keil Uvision?
I would like to see if other flags are used , or the correct flow
I do not think such a log exists.I thought exporting the project may reveal the options, but the latest CMSIS 6 does not seem to support this at time of writing...
https://github.com/ReinhardKeil/cmsis-toolbox/blob/main/docs/YML-Input-Format.md#prepost-build-steps
I'm sorry that the knowledgebase article "UVISION: Creating Intel Hex Files for Arm-Based Devices" was misleading. My colleague already corrected it. I don't know where this mistake came from. fromelf never supported the option --hex as far as I can tell.
Ronan is right, you can use --i32 or --i32combined. µVision uses --i32combined when you just select 'Create HEX File' in the dialog 'Options for Target - Output'. If you use --i32, fromelf might create multiple HEX files when you use multiple load regions in the linker scatter file.
DS1 said:Is there a debug log where I can see what exactly it does when I select create hex in Keil Uvision?
DS1 said:I would like to see if other flags are used , or the correct flow
Well, there is no log, but µVision can create a batch file that contains the same tool invocations as it would use during a project build. So when you select the option 'Create Batch File' in the µVision dialog 'Options for Target - Output', and if you then build your application in µVision, you will get a batch file in the project folder with the name of the project target. Be sure to switch off the option 'Create Batch File' after you have created the batch file because this option disables 'Parallel Build' and therefore will extend the build time a lot. Here is an example Debug.BAT:
... ... "C:\Keil_v5\ARM\ARMCLANG\Bin\fromelf.exe" ".\Debug\MyProject.axf" --i32combined --output ".\Debug\MyProject.hex"