User forums > Embedded development

Selecting CPU architecture for cross compile in CB

(1/1)

obiCB:
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

oBFusCATed:
You can set it in "Build options -> Compiler -> Other options"

scarphin:
I guess u have to define them in 'project\build options\custom variables' like

--- Code: ---NAME=arm7tdmis
--- End code ---
then use in the compiler flags like

--- Code: ----march=$NAME
--- End code ---

obiCB:
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.

Navigation

[0] Message Index

Go to full version