Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

How am I supposed to compile/generate a .hex file (object code) of a c program using a gcc compiler?. Will the procedure be the same for a different gcc compiler compatible with a different processor?

share|improve this question
1  
Have you used gcc before on e.g. windows or a mac? –  Yet Another User Jun 13 '13 at 15:16
add comment

1 Answer

Do you mean this here ? :

gcc -c example.c

objcopy --change-address 0xE0000 -O ihex example.o example.hex

share|improve this answer
    
Will this command apply to any other gcc compiler?.For eg: I have installed a gcc compiler that is compatible with some xyz processor.Will this same command generate the corresponding object code? –  user166921 Jun 13 '13 at 16:00
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.