Author Topic: AVR-Compiler  (Read 11719 times)

Offline Chaosphilipp

  • Single posting newcomer
  • *
  • Posts: 3
AVR-Compiler
« on: November 10, 2010, 10:46:20 pm »
Hi,

i just installed C::B (Mac) and wanted to start a new AVR-Project, but i just don't come cross this Line.
Unfortunately there is no Compiler to select, but my GCC-Compiler is auto-detected without problems.

I already installed Crosspack and avr-libc, nothing to select.

I guess my problem is quite simple, but i don't know what to search for.
"avr compiler" doesn't help, as well as "select avr compiler"...

Best Regards,
Philipp

[attachment deleted by admin]

Offline Chaosphilipp

  • Single posting newcomer
  • *
  • Posts: 3
Re: AVR-Compiler
« Reply #1 on: November 13, 2010, 08:57:58 am »
Well, seems as if my problem wasn't as trivial as I thought it was.

Did anybody experience this problem in Linux maybe?
Any help at all?

Or do I just have to delete code::blocks and search for something else? :-(

Philipp

Offline danselmi

  • Developer
  • Almost regular
  • *****
  • Posts: 203
Re: AVR-Compiler
« Reply #2 on: November 13, 2010, 07:10:44 pm »
Hi

I do not have a  Mac (so I can not take a look myself) so I can be wrong.

Do you have the AVR compiler configured in Code::Blocks?
From the sources of the compilerplugin I can see that the AVR compiler is not built:
Code
#if defined(__WIN32__) || defined(__linux__)
    CompilerFactory::RegisterCompiler(new CompilerGNUARM);
    CompilerFactory::RegisterCompiler(new CompilerGNUAVR);
"GNU AVR GCC Compiler" is not listen in the Settings->Compiler and debugger-dialog, right?

The AVR-Project wizzard insists on the avr compiler.

I see two possibilities for you (not sure if there are better ones):
  • Change the wizzard script to allowCompilerChange and show any compiler.
Code
 Wizard.AddCompilerPage(_T("GNU AVR GCC Compiler"), _T("*"), true, true);
    Copy GCC Compiler Configration and adjust it to use avrgcc. [/li]
  • Build Code::Blocks with avrgcc enabled

danselmi

Offline Chaosphilipp

  • Single posting newcomer
  • *
  • Posts: 3
Re: AVR-Compiler
« Reply #3 on: November 13, 2010, 08:21:01 pm »
Don't know how to do any of your advices.

There's nothing to build about C::B on a Mac, just Drag and Drop...

So it just looks as if C::B was unusable for average Mac-Users with ambitions to get into Avr-Programming.
Sad. :(

Philipp

Offline danselmi

  • Developer
  • Almost regular
  • *****
  • Posts: 203
Re: AVR-Compiler
« Reply #4 on: November 13, 2010, 09:04:12 pm »
You won't get into AVR with DnD only :o

Changing the script is not that hard after a bit or reading:
http://wiki.codeblocks.org/index.php?title=Wizard_scripts
Only one line has to be changed and I have given the exact content. (search for Wizard.AddCompilerPage in the AVR wizard script and replace it by the one mentioned)

When the script is asjusted, you need to add the avr-gcc to codeblocks compiler configuration:
In the compiler and debugger settings panel select GNU GCC Compiler. Click on "copy" and give it a name (for example "GNU AVR GCC"). In the Toolchain executables-tab point to the directory where you installed avrgcc and adjust the names of the executables.
(something like avr-gcc, avr-g++, avr-g++, avr-ar, avr-gdb or avr-elf-gcc, evr-elf-g++ I don't know the exact names from the CrossDev package.) The fileds of the "resource compiler" and "make programm" can be left empty.

regards