SDK Development


Discuss and develop the mbed SDK.

You are viewing an older revision! See the latest version

Mbed SDK build script introduction

Note

This article is outdated. To develop for Mbed OS 5 and later, see the Contributing guide and Testing guide in the Mbed OS documentation.

Mbed SDK build script environment

Introduction

Mbed test framework allows users to test their mbed devices’ applications, build mbed SDK library, re-run tests, run mbed SDK regression, add new tests and get all this results automatically. Everything is done on your machine so you have a full control over compilation, and tests you run.

Our test framework is using Python 2.7 programming language to drive all tests so make sure Python 2.7 is installed on your system and included in your system PATH. To compile mbed SDK and tests you will need one or more supported compilers installed on your system.

To follow this short introduction you should already:

  • know what Mbed SDK is in general.
  • have at least one mbed board on your desk :)
  • know how to install Python 2.7, ARM target cross compilers.
  • You have C/C++ programming experience and at least willingness to learn a bit about Python.

Test automation

Currently our simple test framework allows users to run tests on their machines in a fully automated manner.

Test automation limitations

Note that for tests which require connected external peripherals, for example Ethernet, SD flash cards, external EEPROM tests, loops etc. you need to:

  • modify test source code to match components' pin names to actual mbed board pins where peripheral is connected or
  • wire your board the same way test defines it.

Prerequisites

CompilerMbed SDK AbbreviationExample Version
Keil ARM CompilerARM, uARMARM C/C++ Compiler, 5.03 [Build 117]
GCC ARMGCC_ARMgcc version 4.8.3 20131129 (release) [ARM/embedded-4_8-branch revision 205641] (GNU Tools for ARM Embedded Processors)
GCC CodeSourceryGCC_CSgcc version 4.8.1 (Sourcery CodeBench Lite 2013.11-24)
GCC CodeRedGCC_CRgcc version 4.6.2 20121016 (release) [ARM/embedded-4_6-branch revision 192487] (GNU Tools for ARM Embedded Processors)
IAR Embedded WorkbenchIARIAR ANSI C/C++ Compiler V6.70.1.5641/W32 for ARM

Getting Mbed SDK sources with test suite

So you have already installed Python (with required modules) together with at least one supported compiler you will use with your mbed board. Great!

Now let's go further and try to get Mbed SDK with test suite together. So let's clone latest Mbed SDK source code and configure path to our compiler(s) in next steps.

git clone https://github.com/mbedmicro/mbed.git

Result should look more or less like this: /media/uploads/PrzemekWirkus/git_clone.png

Now you can go to mbed directory you've just cloned and you can see root directory structure of our Mbed SDK library sources. Just type following commands:

cd mbed

ls

You should see something like this in your console window: /media/uploads/PrzemekWirkus/git_clone_2.png

  • Directory structure we are interested in:
    • mbed/workspace_tools/ - we have out test suite scripts,
    • mbed/library/tests/ - we have all Mbed SDK tests,
    • mbed/library/tests/mbed/ - we have Mbed SDK and many peripherals tests,
    • mbed/library/tests/net/echo/ - we have Mbed SDK Ethernet interface tests,
    • mbed/library/tests/rtos/mbed/ - we have Mbed SDK RTOS tests.

Workspace tools

Workspace tools are set of Python scripts used off-line by Mbed SDK team to:

  • Compile and build Mbed SDK,
  • Compile and build libraries included in Mbed SDK repo like e.g. ETH (Ethernet), USB, RTOS or CMSIS,
  • Compile, build and run Mbed SDK tests,
  • Run test regression locally and in CI server,
  • Get library, target, test configuration (paths, parameters, names etc.).

Configure workspace tools to work with your compilers

But before we can run our first test we need to configure our test environment a little!

Now we need to tell workspace tools where our compilers are.

  • Please to go mbed/workspace_tools/ directory and create empty file called private_settings.py.
  • Populate this file the Python code below:

private_settings.py

from os.path import join

# ARMCC
ARM_PATH = "C:/Work/toolchains/ARMCompiler_5.03_117_Windows"
ARM_BIN = join(ARM_PATH, "bin")
ARM_INC = join(ARM_PATH, "include")
ARM_LIB = join(ARM_PATH, "lib")

ARM_CPPLIB = join(ARM_LIB, "cpplib")
MY_ARM_CLIB = join(ARM_PATH, "lib", "microlib")

# GCC ARM
GCC_ARM_PATH = "C:/Work/toolchains/gcc_arm_4_8/4_8_2013q4/bin"

# GCC CodeSourcery
GCC_CS_PATH = "C:/Work/toolchains/Sourcery_CodeBench_Lite_for_ARM_EABI/bin"

# GCC CodeRed
GCC_CR_PATH = "C:/Work/toolchains/LPCXpresso_6.1.4_194/lpcxpresso/tools/bin"

# IAR
IAR_PATH = "C:/Work/toolchains/iar_6_5/arm"

SERVER_ADDRESS = "127.0.0.1"
LOCALHOST = "127.0.0.1"

# This is moved to separate JSON configuration file used by singletest.py
MUTs = {
}

Note 1: You need to provide the absolute path to your compiler(s). Replace corresponding variable values with paths to compilers installed in your system:

  • ARM_PATH for armcc compiler,
  • GCC_ARM_PATH for GCC ARM compiler,
  • GCC_CS_PATH for GCC CodeSourcery compiler,
  • GCC_CR_PATH for GCC CodeRed compiler,
  • IAR_PATH for IAR compiler.

in the code above with path(s) to your compiler(s). If for example you do not use IAR compiler you do not have to modify anything. Workspace tools will use IAR_PATH variable only if you explicit ask for it from command line. So do not worry and replace only paths for your installed compiler(s).

Note 2: Because this is Python script and ARM_PATH, GCC_ARM_PATH, GCC_CS_PATH, GCC_CR_PATH, IAR_PATH are Python string variables please use double backlash or single slash as path's directories delimiter to avoid incorrect path format.

ARM_PATH = "C:/Work/toolchains/ARMCompiler_5.03_117_Windows"
GCC_ARM_PATH = "C:/Work/toolchains/gcc_arm_4_8/4_8_2013q4/bin"
GCC_CS_PATH = "C:/Work/toolchains/Sourcery_CodeBench_Lite_for_ARM_EABI/bin"
GCC_CR_PATH = "C:/Work/toolchains/LPCXpresso_6.1.4_194/lpcxpresso/tools/bin"
IAR_PATH = "C:/Work/toolchains/iar_6_5/arm"

Note 3: This settings are overwriting variables in mbed/workspace_tools/settings.py file.

Build Mbed SDK library from sources

Let's build Mbed SDK library from sources using your compiler. We've cloned Mbed SDK sources, we've installed compiler(s) and added their path(s) to private_settings.py. We are now ready to use workspace tools script build.py to compile and build Mbed SDK from sources.

We are still using console. You should be in mbed/workspace_tools/ directory if not go to mbed/workspace_tools/ and type command:

python build.py -m LPC1768 -t ARM

This command will build Mbed SDK for LPC1768 platform using ARM compiler.

Note 1: Why LCP1768? For this example we use LPC1768 because this platform supports all compilers so you are sure you only need to specify proper compiler.

If you are not using ARMCompiler replace ARM with your compiler: GCC_ARM, GCC_CS, GCC_CR or IAR. For example if you are using IAR type command:

python build.py -m LPC1768 -t IAR

If everything went well (compilation should take few seconds) you should see something similar on your screen: /media/uploads/PrzemekWirkus/lpc1768_arm_compile.png

Note 2:

  • Build success is the key word here. Workspace tools informs us we were successful compiled and buit Mbed SDK library.
  • Created Mbed SDK library can be found here: /mbed/TARGET_LPC1768/TOOLCHAIN_ARM_STD/

Note 3: Workspace tools track changes in source code. So if for example Mbed SDK or test source code changes build.py script will recompile project with all dependencies. If there are no changes in code consecutive Mbed SDK re-builds using build.py will not rebuild project if this is not necessary. Try to run last command once again, we can see script build.py will not recompile project (there are no changes): /media/uploads/PrzemekWirkus/lpc1768_arm_compile_second_time.png

Build script

Build script located in mbed/workspace_tools/ is our core script solution to drive compilation, linking and building process for:

  • Mbed SDK (with libs like Ethernet, RTOS, USB, USB host),
  • tests which also can be linked with libraries like RTOS or Ethernet.

Note: Test suite also uses the same build script, inheriting the same properties like auto dependency tracking and project rebuild in case of source change(s).

build.py script

Build.py script is a powerful tool to build Mbed SDK for all available platforms using all supported by mbed platforms compilers. Script is using our build script to create desired platform-compiler builds. Use script option -h (help) to check all script parameters:

c:\temp\repos\mbed\workspace_tools>build.py -h
Usage: build.py [options]

Options:
  -h, --help            show this help message and exit
  -m MCU, --mcu=MCU     build for the given MCU (STM32F3XX, UBLOX_C027,
                        DISCO_F100RB, NRF51822, LPC11U35_401, LPC1549, K64F,
                        LPC1347, STM32F407, NUCLEO_L152RE, LPC11U35_501,
                        NUCLEO_F302R8, LPC2368, ARCH_BLE, XADOW_M0, LPC810,
                        LPC812, KL05Z, LPC11U68, LPC4088, LPC1114,
                        NUCLEO_F072RB, NUCLEO_L053R8, LPC11U24_301,
                        LPC4330_M4, LPC11C24, DISCO_F051R8, KL46Z,
                        DISCO_F303VC, NUCLEO_F103RB, KL25Z, NUCLEO_F030R8,
                        LPC1768, K20D5M, NUCLEO_F401RE, LPC11U24,
                        DISCO_F407VG)
  -t TOOLCHAIN, --tool=TOOLCHAIN
                        build using the given TOOLCHAIN (GCC_CW_EWL, GCC_CR,
                        GCC_ARM, GCC_CS, uARM, GCC_CW_NEWLIB, ARM, IAR)
  -c, --clean           clean the build directory
  -o OPTIONS, --options=OPTIONS
                        Add a build option ("save-asm": save the asm generated
                        by the compiler, "debug-info": generate debugging
                        information, "analyze": run static code analyzer")
  -r, --rtos            Compile the rtos
  -e, --eth             Compile the ethernet library
  -U, --usb_host        Compile the USB Host library
  -u, --usb             Compile the USB Device library
  -d, --dsp             Compile the DSP library
  -F, --fat             Compile FS ad SD card file system library
  -v, --verbose         Verbose diagnostic output
  -b, --ublox           Compile the u-blox library
  -D MACROS             Add a macro definition
  -x, --extra-verbose-notifications
                        Makes compiler more verbose, CI friendly.

c:\temp\repos\mbed\workspace_tools>
  • The command line parameter -m specifies the MCUs/platforms for which you want to build the Mbed SDK. More than one MCU(s)/platform(s) may be specified with this parameter using comma as delimiter.

In the example below (note there is no space after comma) will compile Mbed SDK for NXP LPC1768 and ST NUCLEO_L152RE platforms using uARM (ARM Micro lib) compiler:

python build.py -m **LPC1768,NUCLEO_L152RE** -t uARM

  • Parameter -t defined which toolchain should be used for Mbed SDK build. You can build Mbed SDK for multiple toolchains using one command.

Below example (note there is no space after comma) will compile Mbed SDK for Freescale KL25Z platform using ARM and GCC ARM compilers:

python build.py -m KL25Z -t **ARM,GCC_ARM**

Note: You can combine this technique to compile multiple targets with multiple compilers:

Below example will compile Mbed SDK for Freescale KL25Z and KL46Z platforms using ARM and GCC ARM compilers:

python build.py -m **KL25Z,KL46Z** -t **ARM,GCC_ARM**

  • Parameters -r, -e, -u, -U, -d, -b will add RTOS, Ethernet, USB, USB Host, DSP, U-Blox libraries respectively.

Below example will build Mbed SDK library for for NXP LPC1768 platform together with RTOS (-r switch) and Ethernet (-e switch) libraries.

python build.py -m **LPC1768** -t ARM -r -e


If you’re unsure which platforms and toolchains are supported please use switch -S to print simple matrix of platform to compiler dependencies.

After you type command:

python build.py -S

You should see something similar:

c:\temp\repos\mbed\workspace_tools> python build.py -S
+---------------+-----------+-----------+-----------+-----------+-----------+-----------+------------+---------------+
| Platform      |    ARM    |    uARM   |  GCC_ARM  |   GCC_CS  |   GCC_CR  |    IAR    | GCC_CW_EWL | GCC_CW_NEWLIB |
+---------------+-----------+-----------+-----------+-----------+-----------+-----------+------------+---------------+
| ARCH_BLE      | Supported |     -     |     -     |     -     |     -     |     -     |     -      |       -       |
| DISCO_F051R8  |     -     |     -     | Supported |     -     |     -     |     -     |     -      |       -       |
| DISCO_F100RB  |     -     |     -     | Supported |     -     |     -     |     -     |     -      |       -       |
| DISCO_F303VC  |     -     |     -     | Supported |     -     |     -     |     -     |     -      |       -       |
| DISCO_F407VG  |     -     |     -     | Supported |     -     |     -     |     -     |     -      |       -       |
| K20D5M        | Supported |     -     | Supported |     -     |     -     |     -     |     -      |       -       |
| K64F          | Supported |     -     |     -     |     -     |     -     |     -     |     -      |       -       |
| KL05Z         | Supported | Supported | Supported |     -     |     -     |     -     |     -      |       -       |
| KL25Z         | Supported |     -     | Supported |     -     |     -     |     -     | Supported  |   Supported   |
| KL46Z         | Supported |     -     | Supported |     -     |     -     |     -     |     -      |       -       |
| LPC1114       | Supported | Supported | Supported |     -     | Supported |     -     |     -      |       -       |
| LPC11C24      | Supported | Supported | Supported |     -     |     -     |     -     |     -      |       -       |
| LPC11U24      | Supported | Supported | Supported |     -     |     -     |     -     |     -      |       -       |
| LPC11U24_301  | Supported | Supported | Supported |     -     |     -     |     -     |     -      |       -       |
| LPC11U35_401  | Supported | Supported | Supported |     -     | Supported |     -     |     -      |       -       |
| LPC11U35_501  | Supported | Supported | Supported |     -     | Supported |     -     |     -      |       -       |
| LPC11U68      |     -     | Supported |     -     |     -     |     -     |     -     |     -      |       -       |
| LPC1347       | Supported |     -     | Supported |     -     |     -     |     -     |     -      |       -       |
| LPC1549       |     -     | Supported |     -     |     -     |     -     |     -     |     -      |       -       |
| LPC1768       | Supported | Supported | Supported | Supported | Supported | Supported |     -      |       -       |
| LPC2368       | Supported |     -     | Supported |     -     | Supported |     -     |     -      |       -       |
| LPC4088       | Supported |     -     | Supported |     -     | Supported |     -     |     -      |       -       |
| LPC4330_M4    | Supported |     -     | Supported |     -     | Supported | Supported |     -      |       -       |
| LPC810        |     -     | Supported |     -     |     -     |     -     |     -     |     -      |       -       |
| LPC812        |     -     | Supported |     -     |     -     |     -     |     -     |     -      |       -       |
| NRF51822      | Supported |     -     |     -     |     -     |     -     |     -     |     -      |       -       |
| NUCLEO_F030R8 | Supported | Supported |     -     |     -     |     -     |     -     |     -      |       -       |
| NUCLEO_F072RB | Supported | Supported |     -     |     -     |     -     |     -     |     -      |       -       |
| NUCLEO_F103RB | Supported | Supported | Supported |     -     |     -     |     -     |     -      |       -       |
| NUCLEO_F302R8 | Supported | Supported |     -     |     -     |     -     |     -     |     -      |       -       |
| NUCLEO_F401RE | Supported | Supported | Supported |     -     |     -     |     -     |     -      |       -       |
| NUCLEO_L053R8 | Supported | Supported |     -     |     -     |     -     |     -     |     -      |       -       |
| NUCLEO_L152RE | Supported | Supported |     -     |     -     |     -     |     -     |     -      |       -       |
| STM32F3XX     | Supported | Supported | Supported |     -     |     -     |     -     |     -      |       -       |
| STM32F407     | Supported |     -     | Supported |     -     |     -     |     -     |     -      |       -       |
| UBLOX_C027    | Supported | Supported | Supported | Supported | Supported | Supported |     -      |       -       |
| XADOW_M0      | Supported | Supported | Supported |     -     | Supported |     -     |     -      |       -       |
+---------------+-----------+-----------+-----------+-----------+-----------+-----------+------------+---------------+
Total permutations: 92

Cppcheck usage

Cppcheck is a static analysis tool for C/C++ code. Unlike C/C++ compilers and many other analysis tools it does not detect syntax errors in the code. Cppcheck primarily detects the types of bugs that the compilers normally do not detect. The goal is to detect only real errors in the code (i.e. have zero false positives).

You can find Cppcheck here: http://cppcheck.sourceforge.net/

Prerequisites:

  1. Please install Cppcheck on your system before you want to use it with build scripts.
  2. You should also add Cppcheck to your system path.

Build script supports switching between compilation and building and just static code analysis testing. You can use switch --cppcheck to perform cppcheck static code analysis.

Note: When you are using --cppcheck switch all macros, toolchain dependencies etc. are preserved so you are sure you are checking exactly the same code you would compile for your application.

Note: Cppcheck analysis can take up to few minutes on slower machines.

Usually you will use switches -t and -m to define toolchain and MCU (platform) respectively. You should do the same in case of Cppcheck analysis. Please note that build script can also compile and build RTOS, Ethernet library etc. If you want to check those just use corresponding build script switches (e.g. -r, -e, ...).

Below you can see example of CMSIS and MBED library Cppcheck scan. Please note that for some advanced C++ template constructions or strictly embedded C/C++ idioms Cppcheck may return false positives.

workspace_tools> build.py -t uARM -m NUCLEO_F334R8 --cppcheck
>>>> STATIC ANALYSIS FOR CMSIS (NUCLEO_F334R8, uARM)
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_adc_ex.c@4212: duplicateBranch:Found duplicate branches for if and else.
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_adc_ex.c@4694: duplicateBranch:Found duplicate branches for if and else.
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_adc_ex.c@940: duplicateExpression:Same expression on both sides of '|'.
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_i2c.c@2875: duplicateExpression:Same expression on both sides of '|'.
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_irda.c@344: variableScope:The scope of the variable 'tmp' can be reduced
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_irda.c@423: variableScope:The scope of the variable 'tmp' can be reduced
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_irda.c@611: variableScope:The scope of the variable 'tmp' can be reduced
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_irda.c@674: variableScope:The scope of the variable 'tmp' can be reduced
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_irda.c@915: variableScope:The scope of the variable 'tmp' can be reduced
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_irda.c@979: variableScope:The scope of the variable 'tmp' can be reduced
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_opamp.c@319: duplicateExpression:Same expression on both sides of '|'.
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_opamp.c@332: duplicateExpression:Same expression on both sides of '|'.
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_opamp.c@245: variableScope:The scope of the variable 'status' can be reduced
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_pwr.c@267: unreadVariable:Variable 'tmp' is assigned a value that is never used
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_pwr.c@284: unreadVariable:Variable 'tmp' is assigned a value that is never used
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_rtc.c@825: duplicateBranch:Found duplicate branches for if and else.
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_rtc.c@859: duplicateBranch:Found duplicate branches for if and else.
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_rtc.c@1009: duplicateBranch:Found duplicate branches for if and else.
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_rtc.c@1042: duplicateBranch:Found duplicate branches for if and else.
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_smartcard.c@596: variableScope:The scope of the variable 'tmp' can be reduced
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_smartcard.c@659: variableScope:The scope of the variable 'tmp' can be reduced
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_spi.c@543: unreadVariable:Variable 'tmpreg' is assigned a value that is never used
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_spi.c@730: unreadVariable:Variable 'tmpreg' is assigned a value that is never used
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_spi.c@1660: unreadVariable:Variable 'tmpreg' is assigned a value that is never used
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_spi.c@1730: unreadVariable:Variable 'tmpreg' is assigned a value that is never used
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_spi.c@1854: unreadVariable:Variable 'tmpreg' is assigned a value that is never used
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_spi.c@1944: unreadVariable:Variable 'tmpreg' is assigned a value that is never used
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_spi.c@1988: unreadVariable:Variable 'tmpreg' is assigned a value that is never used
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_spi.c@2030: unreadVariable:Variable 'tmpreg' is assigned a value that is never used
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_spi.c@2169: unreadVariable:Variable 'tmpreg' is assigned a value that is never used
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_uart.c@206: duplicateBranch:Found duplicate branches for if and else.
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_uart.c@587: variableScope:The scope of the variable 'tmp' can be reduced
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_uart.c@665: variableScope:The scope of the variable 'tmp' can be reduced
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_uart.c@853: variableScope:The scope of the variable 'tmp' can be reduced
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_uart.c@919: variableScope:The scope of the variable 'tmp' can be reduced
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_uart.c@1414: variableScope:The scope of the variable 'tmp' can be reduced
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_uart.c@1480: variableScope:The scope of the variable 'tmp' can be reduced
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_usart.c@351: variableScope:The scope of the variable 'tmp' can be reduced
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_usart.c@418: variableScope:The scope of the variable 'tmp' can be reduced
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_usart.c@497: variableScope:The scope of the variable 'tmp' can be reduced
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_usart.c@745: variableScope:The scope of the variable 'tmp' can be reduced
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_usart.c@803: variableScope:The scope of the variable 'tmp' can be reduced
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_usart.c@872: variableScope:The scope of the variable 'tmp' can be reduced
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_usart.c@1377: variableScope:The scope of the variable 'tmp' can be reduced
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_usart.c@1433: variableScope:The scope of the variable 'tmp' can be reduced
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_usart.c@1486: variableScope:The scope of the variable 'tmp' can be reduced
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\system_stm32f3xx.c@426: unusedFunction:The function 'SysTick_Handler' is never used
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\TOOLCHAIN_ARM_MICRO\sys.cpp@42: unusedFunction:The function '__user_setup_stackheap' is never used

>>> STATIC ANALYSIS FOR MBED (NUCLEO_F334R8, uARM)
[warning] .\mbed\common\BusInOut.cpp@90: operatorEqVarError:Member variable 'BusInOut::_pin' is not assigned a value in 'BusInOut::operator='.
[warning] .\mbed\common\BusOut.cpp@66: operatorEqVarError:Member variable 'BusOut::_pin' is not assigned a value in 'BusOut::operator='.
[style] .\mbed\common\FilePath.cpp@54: cstyleCast:C-style pointer casting
[style] .\mbed\common\FilePath.cpp@67: cstyleCast:C-style pointer casting
[warning] .\mbed\common\FunctionPointer.cpp@20: uninitMemberVar:Member variable 'FunctionPointer::_member' is not initialized in the constructor.
[warning] .\mbed\api\FunctionPointer.h@42: uninitMemberVar:Member variable 'FunctionPointer::_member' is not initialized in the constructor.
[warning] .\mbed\api\FunctionPointer.h@42: uninitMemberVar:Member variable 'FunctionPointer::_membercaller' is not initialized in the constructor.
[style] .\mbed\common\InterruptIn.cpp@61: cstyleCast:C-style pointer casting
[style] .\mbed\common\SerialBase.cpp@56: cstyleCast:C-style pointer casting
[style] .\mbed\common\TimerEvent.cpp@28: cstyleCast:C-style pointer casting
[style] .\mbed\common\retarget.cpp@160: cstyleCast:C-style pointer casting
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_adc_ex.c@4212: duplicateBranch:Found duplicate branches for if and else.
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_adc_ex.c@4694: duplicateBranch:Found duplicate branches for if and else.
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_adc_ex.c@940: duplicateExpression:Same expression on both sides of '|'.
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_i2c.c@2875: duplicateExpression:Same expression on both sides of '|'.
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_irda.c@344: variableScope:The scope of the variable 'tmp' can be reduced
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_irda.c@423: variableScope:The scope of the variable 'tmp' can be reduced
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_irda.c@611: variableScope:The scope of the variable 'tmp' can be reduced
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_irda.c@674: variableScope:The scope of the variable 'tmp' can be reduced
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_irda.c@915: variableScope:The scope of the variable 'tmp' can be reduced
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_irda.c@979: variableScope:The scope of the variable 'tmp' can be reduced
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_opamp.c@319: duplicateExpression:Same expression on both sides of '|'.
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_opamp.c@332: duplicateExpression:Same expression on both sides of '|'.
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_opamp.c@245: variableScope:The scope of the variable 'status' can be reduced
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_pwr.c@267: unreadVariable:Variable 'tmp' is assigned a value that is never used
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_pwr.c@284: unreadVariable:Variable 'tmp' is assigned a value that is never used
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_rtc.c@825: duplicateBranch:Found duplicate branches for if and else.
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_rtc.c@859: duplicateBranch:Found duplicate branches for if and else.
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_rtc.c@1009: duplicateBranch:Found duplicate branches for if and else.
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_rtc.c@1042: duplicateBranch:Found duplicate branches for if and else.
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_smartcard.c@596: variableScope:The scope of the variable 'tmp' can be reduced
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_smartcard.c@659: variableScope:The scope of the variable 'tmp' can be reduced
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_spi.c@543: unreadVariable:Variable 'tmpreg' is assigned a value that is never used
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_spi.c@730: unreadVariable:Variable 'tmpreg' is assigned a value that is never used
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_spi.c@1660: unreadVariable:Variable 'tmpreg' is assigned a value that is never used
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_spi.c@1730: unreadVariable:Variable 'tmpreg' is assigned a value that is never used
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_spi.c@1854: unreadVariable:Variable 'tmpreg' is assigned a value that is never used
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_spi.c@1944: unreadVariable:Variable 'tmpreg' is assigned a value that is never used
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_spi.c@1988: unreadVariable:Variable 'tmpreg' is assigned a value that is never used
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_spi.c@2030: unreadVariable:Variable 'tmpreg' is assigned a value that is never used
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_spi.c@2169: unreadVariable:Variable 'tmpreg' is assigned a value that is never used
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_uart.c@206: duplicateBranch:Found duplicate branches for if and else.
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_uart.c@587: variableScope:The scope of the variable 'tmp' can be reduced
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_uart.c@665: variableScope:The scope of the variable 'tmp' can be reduced
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_uart.c@853: variableScope:The scope of the variable 'tmp' can be reduced
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_uart.c@919: variableScope:The scope of the variable 'tmp' can be reduced
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_uart.c@1414: variableScope:The scope of the variable 'tmp' can be reduced
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_uart.c@1480: variableScope:The scope of the variable 'tmp' can be reduced
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_usart.c@351: variableScope:The scope of the variable 'tmp' can be reduced
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_usart.c@418: variableScope:The scope of the variable 'tmp' can be reduced
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_usart.c@497: variableScope:The scope of the variable 'tmp' can be reduced
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_usart.c@745: variableScope:The scope of the variable 'tmp' can be reduced
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_usart.c@803: variableScope:The scope of the variable 'tmp' can be reduced
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_usart.c@872: variableScope:The scope of the variable 'tmp' can be reduced
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_usart.c@1377: variableScope:The scope of the variable 'tmp' can be reduced
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_usart.c@1433: variableScope:The scope of the variable 'tmp' can be reduced
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\stm32f3xx_hal_usart.c@1486: variableScope:The scope of the variable 'tmp' can be reduced
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\system_stm32f3xx.c@426: unusedFunction:The function 'SysTick_Handler' is never used
[style] .\mbed\targets\cmsis\TARGET_STM\TARGET_NUCLEO_F334R8\TOOLCHAIN_ARM_MICRO\sys.cpp@42: unusedFunction:The function '__user_setup_stackheap' is never used
[style] .\mbed\common\retarget.cpp@184: unusedFunction:The function '_close' is never used
[style] .\mbed\common\retarget.cpp@304: unusedFunction:The function '_fstat' is never used
[style] .\mbed\common\retarget.cpp@249: unusedFunction:The function '_isatty' is never used
[style] .\mbed\common\retarget.cpp@267: unusedFunction:The function '_lseek' is never used
[style] .\mbed\common\retarget.cpp@123: unusedFunction:The function '_open' is never used
[style] .\mbed\common\retarget.cpp@224: unusedFunction:The function '_read' is never used
[style] .\mbed\common\retarget.cpp@197: unusedFunction:The function '_write' is never used
[style] .\mbed\common\rtc_time.c@55: unusedFunction:The function 'clock' is never used
[style] .\mbed\common\retarget.cpp@324: unusedFunction:The function 'rename' is never used
[style] .\mbed\common\rtc_time.c@28: unusedFunction:The function 'time' is never used
[style] .\mbed\common\retarget.cpp@332: unusedFunction:The function 'tmpfile' is never used
[style] .\mbed\common\retarget.cpp@328: unusedFunction:The function 'tmpnam' is never used

Completed in: (483.67)s

All wikipages