mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
ff7f8ae2f0
RIOT supports two distinct families of the MSP430: The [MSP430 x1xx] MCU family and the [MSP430 F2xx/G2xx] MCU family. For both incompatible MCU families the code was located in the msp430fxyz folder, resulting in case of the UART driver in particularly bizarre code looking roughly like this: #ifndef UART_USE_USCI /* implementation of x1xx peripheral ... */ #else /* implementation of F2xx/G2xx peripheral ... */ #endif /* zero shared code between both variants */ This splits the peripheral drivers for USCI and USART serial IP blocks into separate files and relocates everything in cpu/msp430, similar to how cpu/stm32 is organized. [MSP430 x1xx]: https://www.ti.com/lit/ug/slau049f/slau049f.pdf [MSP430 F2xx/G2xx]: https://www.ti.com/lit/ug/slau144k/slau144k.pdf
62 lines
1.2 KiB
C
62 lines
1.2 KiB
C
/*
|
|
* Copyright (C) 2014 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.
|
|
*/
|
|
|
|
/**
|
|
* @ingroup cpu
|
|
* @{
|
|
*
|
|
* @file
|
|
* @brief Calls startup functions on MSP430-based platforms
|
|
*
|
|
* @author Kaspar Schleiser <kaspar@schleiser.de>
|
|
* @author Oliver Hahm <oliver.hahm@inria.fr>
|
|
*
|
|
* @}
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
|
|
#include "periph_conf.h"
|
|
#include "periph/init.h"
|
|
#include "kernel_init.h"
|
|
#include "stdio_base.h"
|
|
#include "cpu.h"
|
|
#include "irq.h"
|
|
#include "log.h"
|
|
#ifdef MODULE_DBGPIN
|
|
#include "dbgpin.h"
|
|
#endif
|
|
|
|
extern void board_init(void);
|
|
extern void msp430_cpu_init(void);
|
|
|
|
__attribute__((constructor)) static void startup(void)
|
|
{
|
|
msp430_cpu_init();
|
|
|
|
board_init();
|
|
|
|
#ifdef MODULE_DBGPIN
|
|
dbgpin_init();
|
|
#endif
|
|
|
|
#ifdef MODULE_NEWLIB
|
|
void _init(void);
|
|
_init();
|
|
#endif
|
|
|
|
/* initialize stdio prior to periph_init() to allow use of DEBUG() there */
|
|
early_init();
|
|
/* trigger static peripheral initialization */
|
|
periph_init();
|
|
/* continue with kernel initialization */
|
|
kernel_init();
|
|
|
|
__builtin_unreachable();
|
|
}
|