Fullscreen
Loading...
 
Print

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 components 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 manual covering the C and C++ compilers
  2. CPP Manual covering the C preprocessor features
  3. The GNU C Reference Manual describing precisely the language accepted by the GNU compiler
  4. GNU Assembler manual covers the assembly language processior (if you ever need to code in assembly language you also need to look at ARM documentation for the Cortex-M instruction definitions)
  5. GNU Link Editor manual 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 documentation 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)