News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Selecting CPU architecture for cross compile in CB

Started by obiCB, June 16, 2011, 06:06:44 PM

Previous topic - Next topic

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"
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

scarphin

I guess u have to define them in 'project\build options\custom variables' like
NAME=arm7tdmis
then use in the compiler flags like
-march=$NAME

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.