Error in makefile of Stk500 Bootloader

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I downloaded the stk500 bootloader for Atmega2560 from here  https://github.com/haarer/Arduino-stk500v2-bootloader  
 

I compiled this BL using cygwin. my GCC version is 9.3.0 , I am getting this error 

 

 

Compiling: stk500boot.c
gcc -c -mmcu=atmega2560 -I. -gdwarf-2 -DF_CPU=16000000UL  -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -mno-tablejump  -Wall -Wstrict-prototypes -Wa,-adhlns=stk500boot.lst  -std=gnu99 -D_MEGA_BOARD_ -MD -MP -MF .dep/stk500boot.o.d stk500boot.c -o stk500boot.o
gcc: error: unrecognized command line option ‘-mmcu=atmega2560’
gcc: error: unrecognized command line option ‘-mno-tablejump’
make: *** [Makefile:582: stk500boot.o] Error 1
 

 

 

I dont understand this error at all , any help will be appreciated 

 

 

TIA 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

SufyanRaza26 wrote:
Compiling: stk500boot.c
gcc -c -mmcu=atmega2560 -

Not gcc but avr-gcc instead.

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I went to those files in github and the Makefile there contains:

 

https://github.com/haarer/Arduino-stk500v2-bootloader/blob/master/Makefile#L280

 

which sets CC (the compiler) to be avr-gcc. Have you edited this ? If so, why?