0
sunny44
6y

Does anybody knows a command line tool that convert C file (sample.c) to hex file (sample.hex).
I don't need any GUI tool only command line tool.

Comments
  • 1
  • 0
    gcc and objcopy. Mind the target architecture.
  • 0
    @rookiemaverick it shows the following error

    sample.c:5:20: fatal error: avr/io.h: No such file or directory
  • 0
    @rookiemaverick I have pasted all files in include folder and now it is showing these error
  • 1
    @sunny44 oh boy. Please state what are you trying to do? Which hardware? Everything please.
  • 0
    @rookiemaverick

    Okk

    I'm trying to make a simple tool for windows that compile embedded c program in hex file and burn it on atMega8 controller via USBasp
  • 4
    You're trying to make a tool for a proces you don't really understand? It seems like you should research that first. Otherwise you'll probably have to start from scratch once you figure out how it all comes together and notice some flaws in the original, uninformed approach.

    P.S.: You need AVR-GCC. That's why I said you should mind the architecture. Intel HEX files don't tell you anything about the architecture, you'd need to know that yourself.
  • 1
    @7400 Thanks I used avr-gcc and its working successfully.

    I think I should do more research because I'm new in this field
  • 2
    @7400 thanks , I wouldn't be able to put in such a way
Add Comment