mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-19 12:04:03 +00:00
avr: pass the correct -mmcu flag to the linker
It does not appear to be necessary for these devices but might result in more appropriate libraries to be linked in. It is best to _not_ specify the exact MCU because otherwise a few other settings (such as startfiles and some linker script configs) also get set, which we do manually anyway and should not be interfered with. I discovered this while working on support for the atmega1284.
This commit is contained in:
committed by
Ron Evans
parent
5bace979ea
commit
66afcb3b39
@@ -6,6 +6,9 @@
|
|||||||
"cflags": [
|
"cflags": [
|
||||||
"-mmcu=atmega328p"
|
"-mmcu=atmega328p"
|
||||||
],
|
],
|
||||||
|
"ldflags": [
|
||||||
|
"-mmcu=avr5"
|
||||||
|
],
|
||||||
"linkerscript": "src/device/avr/atmega328p.ld",
|
"linkerscript": "src/device/avr/atmega328p.ld",
|
||||||
"extra-files": [
|
"extra-files": [
|
||||||
"targets/avr.S",
|
"targets/avr.S",
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
"-mmcu=attiny85"
|
"-mmcu=attiny85"
|
||||||
],
|
],
|
||||||
"ldflags": [
|
"ldflags": [
|
||||||
|
"-mmcu=avr25",
|
||||||
"-Wl,--defsym=_bootloader_size=2180",
|
"-Wl,--defsym=_bootloader_size=2180",
|
||||||
"-Wl,--defsym=_stack_size=128"
|
"-Wl,--defsym=_stack_size=128"
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user