3 years, 1 month ago.

Seeing the contents of .bin file

I compiled the example blinky project for NUCLEO_L152RE. If I try to open .bin in text editor it gives me gibberish and lots of 'Nul'.. Is there a way I can open and see the contents of it as the device sees it? I am not trying to extract c code from it, I just want to see what exactly does machine code look like.

Thanks Tehreem

1 Answer

3 years, 1 month ago.

You need to open the file in a hex editor. There are plenty of free ones around that google will find for you.

Machine code will look like random numbers. It's not the nice text that you see assembler written it, it's the raw processor op codes.

If you dig out the ARM instruction set documentation then you can work out what it is actually telling to cpu to do.

Accepted Answer

Perfect thankyou.

posted by Tehreem Fatima 05 Oct 2018