Hello to all,
I am working on a project, where I really wanna read the .o(.obj) file and .d(.dump) file in windows. But even after quite search online, I didn't find the solution. As, I am using NXP's board 54114. And, for my project I really need to read both these files.
Does any one have any idea, how to read these files in windows 10 or will be better if someone can share a piece of code to read these files directly into the IDE??
Kindly, help me out with such a small thing, since I am pretty much new to the field.
Kind Regards,
Himanshu
What are you trying to do with these files - what do you mean by read them? Which tools created them?
there are tools in lpcxpresso for decoding the contents of .o, .lib etc files - objdump, for example.
let us know what you are trying to do and we can provide a better answer.
Hello Con Verse,
Thank you very much for your reply. I wanna actually see after building up, what all things are actually going to happen inside. That was the reason, I was looking forward to reading these files. (AS SHOWN IN THE FIG. objdump.exe)
Also, I have tried to read the .o file (in the file explorer, after building up the script it was generating), by using the binary utilities > dissemble. But, in that one, I am not understanding the different values: I mean, which number is mentioning what?? (As shown in the figure, If you can help me out)
The numbers circle in black ("0:" "2:" etc) are the address. As you have decoded a .o file, they are relative the the start of the file. If you had decoded and .axf file, it would be the absolute address.
The other numbers are the hex value of the instruction. As you can see, some are 16-bit instructions (circled in red), while others are 32-bit instructions (circled in green).
Hello Con Verse,
Thank you very much for your reply. Your explanation is quite helpful.
Regards,
Himanshu
The .o files should be standard ELF/Dwarf files, so you can read it with such an ELF/Dwarf reader. For example GitHub - eliben/pyelftools: Pure-python library for parsing ELF and DWARF
I hope this helps,
Erich
Hello Erich Styger,
Thank you very much, I will look into it.
Regards,
Himanshu