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
Location : OpenSTM32 Community Site » Documentation » System Workbench for STM32 » Other Manuals Other Manuals

Other Manuals

Eclipse

System Workbench is built on the [https://eclipse.org|Eclipse] platform, from the Eclipse Foundation. Eclipse is quite heavily documented; some of the documentation is available from the Help menu.

Extensive documentation on Eclipse and all its additional componentsQuestion is also available on the Eclipse web site.

C and C++ compilers

The compilers used in System Workbench for STM32 are the Linaro-maintained version of the GNU C and C++ compilers; other tools from the GNU suite are also used in System Workbench fro STM32. Their documentation can be found on the web.
The main source of documentation is the GNU Compiler Collection

  1. GCC 5 manualQuestion covering the C and C++ compilers
  2. CPP ManualQuestion covering the C preprocessor features
  3. The GNU C Reference ManualQuestion describing precisely the language accepted by the GNU compiler
  4. GNU Assembler manualQuestion covers the assembly language processior (if you ever need to code in assembly language you also need to look at ARM documentationQuestion for the Cortex-M instruction definitions)
  5. GNU Link Editor manualQuestion describes the link editor, with detailed information on the syntax of link editor scripts.

C Library

The library provided with System Workbench for STM32, developped by the GNU ARM team and available on launchpad with the compiler, is based on the Newlib library. There is few documentation on this version of newlib, although the RedHat newlib documentationQuestion may prove useful.

However there are a few specifics for this version of newlib; the information below is extracted from the README file for the launchpad toolchain.

The toolchain is released with two prebuilt C libraries based on newlib:

  • one is the standard newlib
  • the other is newlib-nano, optimized for code size.

To distinguish them, the size optimized libraries were renamed as:

  • libc.a --> libc_s.a
  • libg.a --> libg_s.a

Nano libraries usage

To use newlib-nano, users should provide additional gcc link time option --specs=nano.specs; Nano.specs also handles two additional gcc libraries: libstdc++_s.a and libsupc++_s.a, which are optimized for code size.

For example:
$ arm-none-eabi-gcc src.c --specs=nano.specs $(OTHER_OPTIONS)


This option can also work together with other specs options like --specs=rdimon.specs. Please be noticed that --specs=nano.specs is a linker option. Be sure to include in linker option if compiling and linking are separated.

Additional newlib-nano libraries usage


Newlib-nano is different from newlib in addition to the libraries’ name. Formatted input/output of floating-point number are implemented as weak symbol. If you want to use %f, you have to pull in the symbol by explicitly specifying
“-u” command options:

  • -u _scanf_float
  • -u _printf_float
For example to output a float, the command line is like:
$ arm-none-eabi-gcc --specs=nano.specs -u _printf_float $(OTHER_LINK_OPTIONS)

Semihosting

Users can choose to use or not use semihosting by following instructions:

  • If you need semihosting, link like:
    $ arm-none-eabi-gcc --specs=rdimon.specs $(OTHER_LINK_OPTIONS)
  • If you are using retarget, link like:
    $ arm-none-eabi-gcc --specs=nosys.specs $(OTHER_LINK_OPTIONS)

Newest Forum Posts

  1. Configuring DMA for ADC in SW? by sam.hodgson, 2025-03-04 12:58
  2. Insightful Perspectives on This Subject by davidsycle, 2025-03-04 05:45
  3. Build a project in "release" mode by info@creosrl.it, 2025-02-20 18:12
  4. Build a project in "release" mode by info@creosrl.it, 2025-02-20 17:05
  5. Build a project in "release" mode by tang, 2025-02-20 10:36
  6. Build a project in "release" mode by info@creosrl.it, 2025-02-19 17:35
  7. Fail to debug in Win 11 C/C++ by mortenlund, 2024-12-26 20:27
  8. Fail to debug in Win 11 C/C++ by mortenlund, 2024-12-18 20:48
  9. Firmware has not been found locally by nonameletters, 2024-12-02 07:43
  10. [Solved] SW4STM32 - How to download project to STM32F4 Discovery board by stuarte83, 2024-10-17 14:29

Last-Modified Blogs