
Setting the linker script as one property (instead of as part of the generic ldflags property) allows it to be overriden. This is important for the SoftDevice on Nordic chips, because the SoftDevice takes up a fixed part of the flash/RAM and the application must be flashed at a different position. With this linkerscript option, it is possible to create (for example) a pca10040-s132v6 that overrides the default linker script.
19 строки
472 Б
JSON
19 строки
472 Б
JSON
{
|
|
"inherits": ["avr"],
|
|
"llvm-target": "avr-atmel-none",
|
|
"cpu": "atmega328p",
|
|
"build-tags": ["arduino", "atmega328p", "atmega", "avr5"],
|
|
"cflags": [
|
|
"-mmcu=atmega328p"
|
|
],
|
|
"ldflags": [
|
|
"-Wl,--defsym=_bootloader_size=512",
|
|
"-Wl,--defsym=_stack_size=512"
|
|
],
|
|
"linkerscript": "src/device/avr/atmega328p.ld",
|
|
"extra-files": [
|
|
"targets/avr.S",
|
|
"src/device/avr/atmega328p.s"
|
|
],
|
|
"flash-command": "avrdude -c arduino -p atmega328p -P {port} -U flash:w:{hex}"
|
|
}
|