News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

avr-gcc: error: specified option ‘-mmcu’ more than once

Started by markp, April 13, 2017, 11:45:07 PM

Previous topic - Next topic

markp

 The first AVR project I tried gave the following error -

-------------- Build: Release in avrblink03 (compiler: GNU GCC Compiler for AVR)---------------

avr-gcc -Wall -mmcu=atmega328p -DF_CPU=8000000UL -mmcu=atmega329p -I/usr/lib/avr/include -c fuse.c -o obj/Release/fuse.o
avr-gcc: error: specified option '-mmcu' more than once


I looked around the CB files and found that mmcu is specified in the  .cbp file - in xml format - and also in Project->Build Options Compiler Settings->Other compiler Options.

Deleting the line from Other Compiler Options fixes the the problem but has to be done each project. Is there a global way to stop mmcu being specified twice ?

oBFusCATed

Yes, remove it from the global compiler options or edit the avr project template your using to create your projects...
(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!]