
This is just support for the chip, no boards are currently supported. However, you can use this target on a custom board. Notes: - This required a new runtime and machine implementation, because the hardware is actually very different (and much nicer than older AVRs!). - I had to update gen-device-avr to support this chip. This also affects the generated output of other AVRs, but I checked all chips we support and there shouldn't be any backwards incompatible changes. - I did not implement peripherals like UART, I2C, SPI, etc because I don't need them. That is left to do in the future. You can flash these chips with only a UART and a 1kOhm resistor, which is really nice (no special hardware needed). Here is the program I've used for this purpose: https://pypi.org/project/pymcuprog/
58 строки
1,5 КиБ
Text
58 строки
1,5 КиБ
Text
/* Linker script for AVRs with a unified flash and RAM address space. This
|
|
* includes the ATtiny10 and the ATtiny1616.
|
|
*/
|
|
|
|
MEMORY
|
|
{
|
|
FLASH_TEXT (x) : ORIGIN = 0, LENGTH = __flash_size
|
|
FLASH_DATA (r) : ORIGIN = __mapped_flash_start, LENGTH = __flash_size
|
|
RAM (xrw) : ORIGIN = __ram_start, LENGTH = __ram_size
|
|
}
|
|
|
|
ENTRY(main)
|
|
|
|
SECTIONS
|
|
{
|
|
.text :
|
|
{
|
|
KEEP(*(.vectors))
|
|
*(.text.__vector_RESET)
|
|
KEEP(*(.text.__do_copy_data)) /* TODO: only use when __do_copy_data is requested */
|
|
KEEP(*(.text.__do_clear_bss))
|
|
KEEP(*(.text.main)) /* main must follow the reset handler */
|
|
*(.text)
|
|
*(.text.*)
|
|
} > FLASH_TEXT
|
|
|
|
/* Read-only data is stored in flash, but is read from an offset (0x4000 or
|
|
* 0x8000 depending on the chip). This requires some weird math to get it in
|
|
* the right place.
|
|
*/
|
|
.rodata ORIGIN(FLASH_DATA) + ADDR(.text) + SIZEOF(.text):
|
|
{
|
|
*(.rodata)
|
|
*(.rodata.*)
|
|
} AT>FLASH_TEXT
|
|
|
|
/* The address to which the data section should be copied by the startup
|
|
* code.
|
|
*/
|
|
__data_load_start = ORIGIN(FLASH_DATA) + LOADADDR(.data);
|
|
|
|
.data :
|
|
{
|
|
__data_start = .; /* used by startup code */
|
|
*(.data)
|
|
*(.data*)
|
|
__data_end = .; /* used by startup code */
|
|
} >RAM AT>FLASH_TEXT
|
|
|
|
.bss :
|
|
{
|
|
__bss_start = .; /* used by startup code */
|
|
*(.bss)
|
|
*(.bss*)
|
|
*(COMMON)
|
|
__bss_end = .; /* used by startup code */
|
|
} >RAM
|
|
}
|