Source file to .hex - without IDE (without DAVE)

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
User5327
Level 4
Level 4
Hi all,


I have simple program in XMC4500. It is only one file Main.c
How can I translate it without IDE (without DAVE)?

my assumption:
1) create new empty folder e.g. "MySourceCode"
2) create Main.c with some code
3) copy there arm-none-eabi-gcc.exe, arm-none-eabi-objcopy.exe, make.exe ... (I do not know what else is needed) ... from ..\DAVE-3.1.10\ARM-GCC\bin\
4) create makefile, ... .ld file (I do not know what else is needed)
5) execute these files (with some parameters ... from command prompt... finaly from .bat)
6) get ... .hex file (which is possible to download to XMC4500)

Is this process possible?
Please help.


BR
Koumak
0 Likes
2 Replies
Not applicable
Hi Koumak,

Yes, it is possible. But at least you need "ARM-GCC" & "CMSIS" folders if the code is built for XMC.
For step 3, use gcc.exe. Refer to DAVE IDE "ARM-GCC C Compiler" Command setting and options (Go to: >Project>Active Project Properties>C/C++ Build>Settings>Select "ARM-GCC C Compiler" in "Tool Settings" tab)
For step 4, use ld.exe. Refer to DAVE IDE "ARM-GCC C Linker" Command setting and options (Go to: >Project>Active Project Properties>C/C++ Build>Settings>Select "ARM-GCC C Linker" in "Tool Settings" tab)
You can combine steps 3 & 4 into a makefile.

Best regards,
Sophia
0 Likes
User5327
Level 4
Level 4
Hi Sophia,


I am beginner in this branch.
Can you provide a simple example please ?
(or/and little more detailed description)

I need translate only one simple file (main.c) ... in this way (without DAVE) ... create "hex" file.


Best regards,
Koumak
0 Likes