mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #13611 from alcheagle/stm32l071xx-fixes
Edit on Toolchain linker files for stm32L071xx targetpull/13691/head
commit
1dea16bc58
|
@ -29,7 +29,7 @@
|
||||||
#if !defined(MBED_CONF_TARGET_BOOT_STACK_SIZE)
|
#if !defined(MBED_CONF_TARGET_BOOT_STACK_SIZE)
|
||||||
/* This value is normally defined by the tools
|
/* This value is normally defined by the tools
|
||||||
to 0x1000 for bare metal and 0x400 for RTOS */
|
to 0x1000 for bare metal and 0x400 for RTOS */
|
||||||
#define MBED_CONF_TARGET_BOOT_STACK_SIZE 0x400
|
#define MBED_CONF_TARGET_BOOT_STACK_SIZE 0x400
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Round up VECTORS_SIZE to 8 bytes */
|
/* Round up VECTORS_SIZE to 8 bytes */
|
||||||
|
|
|
@ -1,29 +1,42 @@
|
||||||
/* mbed Microcontroller Library
|
/**
|
||||||
* SPDX-License-Identifier: BSD-3-Clause
|
******************************************************************************
|
||||||
******************************************************************************
|
* @file startup_stm32l071xx.s
|
||||||
*
|
* @author MCD Application Team
|
||||||
* Copyright (c) 2020 STMicroelectronics.
|
* @brief STM32L071xx Devices vector table for GCC toolchain.
|
||||||
* All rights reserved.
|
* This module performs:
|
||||||
*
|
* - Set the initial SP
|
||||||
* This software component is licensed by ST under BSD 3-Clause license,
|
* - Set the initial PC == Reset_Handler,
|
||||||
* the "License"; You may not use this file except in compliance with the
|
* - Set the vector table entries with the exceptions ISR address
|
||||||
* License. You may obtain a copy of the License at:
|
* - Branches to main in the C library (which eventually
|
||||||
* opensource.org/licenses/BSD-3-Clause
|
* calls main()).
|
||||||
*
|
* After Reset the Cortex-M0+ processor is in Thread mode,
|
||||||
******************************************************************************
|
* priority is Privileged, and the Stack is set to Main.
|
||||||
* @file startup_stm32l071xx.s
|
******************************************************************************
|
||||||
* @author MCD Application Team
|
*
|
||||||
* @brief STM32L071xx Devices vector table for GCC toolchain.
|
* Redistribution and use in source and binary forms, with or without modification,
|
||||||
* This module performs:
|
* are permitted provided that the following conditions are met:
|
||||||
* - Set the initial SP
|
* 1. Redistributions of source code must retain the above copyright notice,
|
||||||
* - Set the initial PC == Reset_Handler,
|
* this list of conditions and the following disclaimer.
|
||||||
* - Set the vector table entries with the exceptions ISR address
|
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
* - Branches to main in the C library (which eventually
|
* this list of conditions and the following disclaimer in the documentation
|
||||||
* calls main()).
|
* and/or other materials provided with the distribution.
|
||||||
* After Reset the Cortex-M0+ processor is in Thread mode,
|
* 3. Neither the name of STMicroelectronics nor the names of its contributors
|
||||||
* priority is Privileged, and the Stack is set to Main.
|
* may be used to endorse or promote products derived from this software
|
||||||
******************************************************************************
|
* without specific prior written permission.
|
||||||
*/
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||||
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||||
|
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||||
|
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
******************************************************************************
|
||||||
|
*/
|
||||||
|
|
||||||
.syntax unified
|
.syntax unified
|
||||||
.cpu cortex-m0plus
|
.cpu cortex-m0plus
|
||||||
|
@ -48,9 +61,9 @@ defined in linker script */
|
||||||
.section .text.Reset_Handler
|
.section .text.Reset_Handler
|
||||||
.weak Reset_Handler
|
.weak Reset_Handler
|
||||||
.type Reset_Handler, %function
|
.type Reset_Handler, %function
|
||||||
Reset_Handler:
|
Reset_Handler:
|
||||||
ldr r0, =_estack
|
ldr r0, =_estack
|
||||||
mov sp, r0 /* set stack pointer */
|
mov sp, r0 /* set stack pointer */
|
||||||
|
|
||||||
/* Copy the data segment initializers from flash to SRAM */
|
/* Copy the data segment initializers from flash to SRAM */
|
||||||
movs r1, #0
|
movs r1, #0
|
||||||
|
@ -85,12 +98,13 @@ LoopFillZerobss:
|
||||||
/* Call the clock system intitialization function.*/
|
/* Call the clock system intitialization function.*/
|
||||||
bl SystemInit
|
bl SystemInit
|
||||||
/* Call static constructors */
|
/* Call static constructors */
|
||||||
bl __libc_init_array
|
//bl __libc_init_array
|
||||||
/* Call the application's entry point.*/
|
/* Call the application's entry point.*/
|
||||||
bl main
|
//bl main
|
||||||
|
bl _start
|
||||||
|
|
||||||
LoopForever:
|
LoopForever:
|
||||||
b LoopForever
|
b LoopForever
|
||||||
|
|
||||||
|
|
||||||
.size Reset_Handler, .-Reset_Handler
|
.size Reset_Handler, .-Reset_Handler
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
#define MBED_RAM_SIZE 0x5000 // 20 KB
|
#define MBED_RAM_SIZE 0x5000 // 20 KB
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define NVIC_NUM_VECTORS 32
|
#define NVIC_NUM_VECTORS 48
|
||||||
#define NVIC_RAM_VECTOR_ADDRESS MBED_RAM_START
|
#define NVIC_RAM_VECTOR_ADDRESS MBED_RAM_START
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -87,6 +87,10 @@
|
||||||
|(__STM32L0xx_CMSIS_VERSION_SUB2 << 8 )\
|
|(__STM32L0xx_CMSIS_VERSION_SUB2 << 8 )\
|
||||||
|(__STM32L0xx_CMSIS_VERSION_RC))
|
|(__STM32L0xx_CMSIS_VERSION_RC))
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
/** @addtogroup Device_Included
|
/** @addtogroup Device_Included
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
@ -111,13 +115,11 @@
|
||||||
#elif defined(STM32L061xx)
|
#elif defined(STM32L061xx)
|
||||||
#include "stm32l061xx.h"
|
#include "stm32l061xx.h"
|
||||||
#elif defined(STM32L071xx)
|
#elif defined(STM32L071xx)
|
||||||
//#include "stm32l073xx.h"
|
|
||||||
#include "stm32l071xx.h"
|
#include "stm32l071xx.h"
|
||||||
#elif defined(STM32L072xx)
|
#elif defined(STM32L072xx)
|
||||||
#include "stm32l072xx.h"
|
#include "stm32l072xx.h"
|
||||||
#elif defined(STM32L073xx)
|
#elif defined(STM32L073xx)
|
||||||
#include "stm32l071xx.h"
|
#include "stm32l073xx.h"
|
||||||
//#include "stm32l073xx.h"
|
|
||||||
#elif defined(STM32L082xx)
|
#elif defined(STM32L082xx)
|
||||||
#include "stm32l082xx.h"
|
#include "stm32l082xx.h"
|
||||||
#elif defined(STM32L083xx)
|
#elif defined(STM32L083xx)
|
||||||
|
@ -125,7 +127,7 @@
|
||||||
#elif defined(STM32L081xx)
|
#elif defined(STM32L081xx)
|
||||||
#include "stm32l081xx.h"
|
#include "stm32l081xx.h"
|
||||||
#else
|
#else
|
||||||
#error "Please select first the target STM32L0xx device used in your application (in stm32l0xx.h file)"
|
#error "Please select first the target STM32L0xx device used in your application (in stm32l0xx.h file)"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -176,10 +178,6 @@ typedef enum
|
||||||
|
|
||||||
#define MODIFY_REG(REG, CLEARMASK, SETMASK) WRITE_REG((REG), (((READ_REG(REG)) & (~(CLEARMASK))) | (SETMASK)))
|
#define MODIFY_REG(REG, CLEARMASK, SETMASK) WRITE_REG((REG), (((READ_REG(REG)) & (~(CLEARMASK))) | (SETMASK)))
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif /* __cplusplus */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
@ -188,6 +186,9 @@ typedef enum
|
||||||
#include "stm32l0xx_hal.h"
|
#include "stm32l0xx_hal.h"
|
||||||
#endif /* USE_HAL_DRIVER */
|
#endif /* USE_HAL_DRIVER */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
#endif /* __STM32L0xx_H */
|
#endif /* __STM32L0xx_H */
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue