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
- GCC 5 manual covering the C and C++ compilers
- CPP Manual covering the C preprocessor features
- The GNU C Reference Manual describing precisely the language accepted by the GNU compiler
- 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)
- GNU Link Editor manual describes the link editor, with detailed information on the syntax of link editor scripts.
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
$ arm-none-eabi-gcc --specs=nano.specs -u _printf_float $(OTHER_LINK_OPTIONS)
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)