Why I got different LinkerScript.ld depending on project creation options?
I just tried out different way to create a new project with System Workbench.
(1) first one
- File → new → C++ Project → Ac6 Stm32 Mcu Project
- Chips = Stm32F4, Board = Stm32F401C-Disco
- using “Cube Hal”
- but don’t check “Add low level drivers in this project”
- see also https://github.com/Joe-Merten/Stm32-Tools-Evaluation/tree/master/Stm32F4-SW-cubehal
(2) second one
- same as above but
- check “Add low level drivers in this project”
- As sources in the application project
- see also https://github.com/Joe-Merten/Stm32-Tools-Evaluation/tree/master/Stm32F4-SW-cubehal-lib_1st
Then I’d compared the results and wonder why there are such differen LinkerScript.ld in both projects.
In (1), it’s like:
** Author : Auto-generated by Ac6 System Workbench ** ** Abstract : Linker script for STM32F401VCTx Device from STM32F4 series ** 64Kbytes RAM ** 256Kbytes ROM
but in (2) its like:
** Author : Ac6 ** ** Abstract : Linker script for STM32F401CC Device with ** 256KByte FLASH, 64KByte RAM
Is this a bug or feature?
Note, that the Stm32F401C-Disco populates a Stm32F401VCT6U.
Edit: Even the code in the startup directory.
In (1), there is a startup_stm32.s commented with:
****************************************************************************** * @file startup_stm32.s * @author Ac6 * @version V1.0.0 * @date 12-June-2014 ******************************************************************************
but in (2) there is a startup_stm32f401xc.s with:
****************************************************************************** * @file startup_stm32f401xc.s * @author MCD Application Team * @version V1.2.1 * @date 13-March-2015 * @brief STM32F401xCxx Devices vector table for System Workbench for STM32. * This module performs: * - Set the initial SP * - Set the initial PC == Reset_Handler, * - Set the vector table entries with the exceptions ISR address * - Branches to main in the C library (which eventually * calls main()). * After Reset the Cortex-M4 processor is in Thread mode, * priority is Privileged, and the Stack is set to Main. ******************************************************************************