Author Topic: avr-gcc: error: specified option ‘-mmcu’ more than once  (Read 8085 times)

Offline markp

  • Single posting newcomer
  • *
  • Posts: 2
avr-gcc: error: specified option ‘-mmcu’ more than once
« on: April 13, 2017, 11:45:07 pm »
 The first AVR project I tried gave the following error -

Code
-------------- 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 ?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: avr-gcc: error: specified option ‘-mmcu’ more than once
« Reply #1 on: April 14, 2017, 02:11:33 am »
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!]