Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: sachinhambar on July 18, 2006, 01:10:56 pm

Title: GNU Arm Support
Post by: sachinhambar on July 18, 2006, 01:10:56 pm
Hi,
 How I can add GNU Arm to compiler list?

Sachin Hambar
Title: Re: GNU Arm Support
Post by: MortenMacFly on July 18, 2006, 02:17:09 pm
How I can add GNU Arm to compiler list?
You don't need to add this explicitely. The GNU ARM compiler is natively supported by recent builds (nigthlies) of C::B. What version at what OS are you using currently?
With regards, Morten.
Title: Re: GNU Arm Support
Post by: sachinhambar on July 20, 2006, 04:19:46 pm
Thanks Morten. I was able to compile the code using GNUARM. To execute the arm code, one has to pass Project exe as parameter to "arm-elf-run". I added as "arm-elf-run" as a tool. But how to pass Project Exe as parameter to it,
Is there any Macro(e.g PROJECT_EXE)?

Sachin Hambar
Title: Re: GNU Arm Support
Post by: MortenMacFly on July 20, 2006, 04:27:37 pm
Is there any Macro(e.g PROJECT_EXE)?
If oyu exe is called as your project you could do:
$(PROJECT_DIR)/bin/$(PROJECT_NAME).exe
(That's how I do it, assuming you have a bin folder, too.)

I can't remember if there was also a macro for the executable itself (which would depend on the target then)... (good question, though ;-)) I'll take a look...
Title: Re: GNU Arm Support
Post by: MortenMacFly on July 20, 2006, 04:34:02 pm
I can't remember if there was also a macro for the executable itself (which would depend on the target then)... (good question, though ;-)) I'll take a look...
Yepp, there is a macro. It depends (as assumed ) on the target. Thus you can use
$(FOO_OUTPUT_FILE) for the file being produced by the target and $(BAR_OUTPUT_DIR) for the output file's directory only. Pleasse replace FOO and BAR with your target's name.

...I should adopt my tools then, too... ;-)
Title: Re: GNU Arm Support
Post by: tiwag on July 20, 2006, 04:54:49 pm
there are existing macros

$($(TARGET_NAME)_OUTPUT_FILE)
$($(TARGET_NAME)_OUTPUT_DIR)


the combination of the above gives the absolute path to your output file

$($(TARGET_NAME)_OUTPUT_DIR)$($(TARGET_NAME)_OUTPUT_FILE)





Title: Re: GNU Arm Support
Post by: sachinhambar on July 27, 2006, 02:05:20 pm
Thanks Now I am able to execute arm executable. Project contain only c files.
Now I added arm assembly files to project. Assembly files are not get compiled by Compiler.
How can I add Assembly file support for Compiler?