1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-18 19:13:51 +01:00
RIOT/cpu/msp430/ldscripts/msp430_common.ld
Marian Buschsieweke 45b353c6ef
cpu/msp430: make use of vendor header files
The MSP430 vendor files already provide macros containing register
constants and symbols (provided via linker scripts) containing addresses
of peripheral registers. So lets make use of that rather than
maintaining a long list of constants.
2023-07-04 20:21:05 +02:00

40 lines
1003 B
Plaintext

/*
* Copyright (C) 2021 Freie Universität Berlin
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
SECTIONS
{
/* Populate information about rom size */
_srom = ORIGIN(ROM);
_erom = ORIGIN(ROM) + LENGTH(ROM);
.flash_writable (NOLOAD) : {
KEEP(*(SORT(.flash_writable.*)))
} > ROM
.end_fw (NOLOAD) : ALIGN(4) {
_end_fw = . ;
} > ROM
}
/* provide address for register maps by taking the address of the first
* register (as provided by the vendor files) */
PROVIDE(PORT_1 = P1IN);
PROVIDE(PORT_2 = P2IN);
PROVIDE(PORT_3 = P3IN);
PROVIDE(PORT_3 = P3IN);
PROVIDE(PORT_4 = P4IN);
PROVIDE(PORT_5 = P5IN);
PROVIDE(PORT_6 = P6IN);
/* no typo: TBIV indeed comes before TAIV in memory, see msp_timer_ivec_t */
PROVIDE(TIMER_IVEC = TBIV);
PROVIDE(TIMER_A = TACTL);
PROVIDE(TIMER_B = TBCTL);