Topic : Silicon Labs IDE = need object code

Forum : 8051

Original Post
Post Information Post
July 8, 2012 - 11:01pm
Guest

Everything works fine to create code to load via the USB flash programmer for the SI 8051 eval card. I'm now trying to make a USB loader and I need the basic object code for my file that starts at memory location 0000.

Using a hex editor I look at the .obj file but can't find anything that looks like the object code I can see in the list view. For instance the first 3 hex values of my code are 02 00 0E (jmp to 0E) but that pattern doesn't appear anywhere in the .obj file.

When I use the list tab, I see the machine code on left hand side, just as I expect and obviously it is being generated, as the program runs.

Sorry if this a newbie question - didn't find anything in search to help.

Replies
Post Information Post
+1
0
-1
July 11, 2012 - 11:11am
Raisonance Support Team

Hello,

The .obj isn't a binary view of your code. It is made of records that contain code and other information needed by the linker.

The code at 0x00 is a jump to your program startup. If you're programming in C, it is provided by the C library linked with
your program by the ... linker.

Stéphane

+1
0
-1
July 15, 2012 - 3:41pm
Guest

I've found what I need is the classic Intel .hex file.

I see where the Keil Assembler for 8051 has a tool to convert the output into a .hex file. I suppose Raisonance Assembler has similar tool and I'll look for it.

+1
0
-1
July 15, 2012 - 6:03pm
Guest

I found it.

Somewhere in the setup there was a way to get it to generate a .hex file and this works. Now, the code is in the intel hex format so I can make a USB bootloader from this file.