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.
Этот коммит содержится в:
родитель
5bace979ea
коммит
66afcb3b39
2 изменённых файлов: 4 добавлений и 0 удалений
|
@ -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"
|
||||||
],
|
],
|
||||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче