Open cmd.exe and navigate to led Folder. Type the following command to compile the C file.
sdcc led.c
If there are no errors ,the code will compile and generate several files.
the led.ihx is the hex file created by SDCC .
Now most of the hex file downloaders will not recognize the .ihx format.To convert the ihx format to hex format you have to use another program called packihx which will repackage ihx to hex format.
Now type the following commands to create the hex file .
packihx led.ihx > led.hex
After running this command you can see the new hex file (led.hex) inside your folder .Which you can then download into your 8051 microcontroller.
After you have generated your hex code using SDCC ,You can upload the code into your 8051 derivative.Uploading hex code is specific to the 8051 derivative you are using.
For debug check this link **broken link removed**