About the img file created by elf2img tool

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
roji_4156651
Level 2
Level 2
First like given

I know how the firmware img file is created. After the firmware code compile and link in Eclipse an ELF file comes into being. Then post-build action the elf2img.exe tool is called to produce the firmware img file.  For some reason, I want to know how I can disassembly the firmware img file in IAD or how I can convert img file to elf file.Can any guy provide a solution to disassembly the img file created by elf2img.exe tool?

0 Likes
1 Solution
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello,

When the firmware is built in debug/release mode the .elf will be generated first and then using elf2img tool the .elf is converted to .img file.

So the .elf file will be there in the debug/ release folder (as per the mode the firmware is built in) . So you can use  .elf file from that folder instead of converting .img file back to .elf

For example: usbbulksrcsink firmware when built in debug mode

Path to .elf file : ..Workspace\USBBulkSourceSink\Debug

Regards,

Rashi

Regards,
Rashi

View solution in original post

0 Likes
3 Replies
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello,

When the firmware is built in debug/release mode the .elf will be generated first and then using elf2img tool the .elf is converted to .img file.

So the .elf file will be there in the debug/ release folder (as per the mode the firmware is built in) . So you can use  .elf file from that folder instead of converting .img file back to .elf

For example: usbbulksrcsink firmware when built in debug mode

Path to .elf file : ..Workspace\USBBulkSourceSink\Debug

Regards,

Rashi

Regards,
Rashi
0 Likes

You are right. But now I have an img file(only img file no other elf file) ever provided by one supplier.But now the supplier cannot provide any technical support to us . So I need to disassembly the img file or convert img to elf(The supplier cannot provide elf file too). So can you provide any solution to help me solve the problem?Thanks.

0 Likes

Hello,

You can go through the source code of the elf2img utility so that you can have idea to get .elf file back

Path to source code of elf2img utility: C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\util\elf2img

Regards,

Rashi

Regards,
Rashi
0 Likes