Code::Blocks Forums
User forums => Embedded development => Topic started by: obiCB on June 16, 2011, 06:06:44 pm
-
Hi
I am using CB to compile for ARM7 architecture (Windows host).
In CB I have set the following:
In "Project->build options", selected the GNU ARM GCC compiler, and in the "Compiler Flags" folder I have selected the compiler option "-march=NAME [-march=NAME]".
The question is how can I set NAME=arm7tdmis?
For the moment the compiler complains "error: bad value (NAME) for -march switch". I tried adding NAME in the folder "Custom variables" but no luck
Using CB Build Mar 29 2011
-
You can set it in "Build options -> Compiler -> Other options"
-
I guess u have to define them in 'project\build options\custom variables' like
then use in the compiler flags like
-
Thanks
That helped. What I exactly had to do was:
- In Project build options->Compiler settings->Categories, do NOT select "-march=NAME [-march=NAME] (somewhat confusing)
- In Project build options->Compiler settings->Other options enter the line "-mcpu=arm7tdmi"
If I had started the project the correct way (selected a ARM project, AND the correct processor template) This had been automatically set up for me.