Loading...
 

Zephyr project on STM32

   Zephyr Workbench, a VSCode extension to manage Zephyr on STM32.
It enables users to easily create, develop, and debug Zephyr applications.
Main features:
  • Install host dependencies.
  • Import toolchain and SDK.
  • Create, configure, build and manage apps.
  • Debug STM32.
You can directly download it from the VSCode marketplace
For more details, visit the Zephyr Workbench

System Workbench for STM32


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


(2) second one


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.
******************************************************************************
France

Hi Joe,

The reason is that in the first case you requested not to use the ST-provided Board Support Package (BSP), so System Workbench for STM32 had to generate linker script and startup files looking only at the definition of the MCU, while in the second case, you used the ST-provided BSP, so you get a linker script and startup code that was provided by the BSP.

Ususally only the initail comment (and precise presentation of the code) are really different and both files give the same result. However some boards may add some resources (like external RAM or Flash) that the auto-generated version will not support (remember you requested not to use the BSP) while the second one will.

Hope this helps,

Bernard (Ac6)

Hi Bernard, thanks for the clarification. Joe.

 

Newest Forum Posts

  1. reservation car service Seattle by Jamesprede, 2025-05-01 10:06
  2. Last day: drone bonus by Danielrug, 2025-04-19 16:55
  3. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-25 07:37
  4. SPI on Nucleo_STMH533RE by royjamil, 2025-03-23 11:31
  5. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-23 09:33
  6. Configuring DMA for ADC in SW? by sam.hodgson, 2025-03-04 12:58
  7. Insightful Perspectives on This Subject by davidsycle, 2025-03-04 05:45
  8. Build a project in "release" mode by info@creosrl.it, 2025-02-20 18:12
  9. Build a project in "release" mode by info@creosrl.it, 2025-02-20 17:05
  10. Build a project in "release" mode by tang, 2025-02-20 10:36

Last-Modified Blogs