From 13455987aea545f0ceacf4fa941a90a864e4d430 Mon Sep 17 00:00:00 2001 From: Valeriy Koval Date: Mon, 9 Mar 2015 12:18:46 +0200 Subject: [PATCH] Rename "stm32" platform to "ststm32" --- docs/platforms/index.rst | 2 +- docs/platforms/stm32.rst | 104 ------- docs/platforms/ststm32.rst | 224 ++++++++++++++ .../stm32/stm32-cmsis-blink/platformio.ini | 18 +- .../stm32/stm32-opencm3-blink/platformio.ini | 18 +- examples/stm32/stm32-spl-blink/platformio.ini | 18 +- platformio/boards/stm32.json | 56 ---- platformio/boards/ststm32.json | 280 ++++++++++++++++++ .../builder/scripts/{stm32.py => ststm32.py} | 21 +- platformio/platforms/{stm32.py => ststm32.py} | 8 +- tests/commands/test_boards.py | 2 +- 11 files changed, 554 insertions(+), 197 deletions(-) delete mode 100644 docs/platforms/stm32.rst create mode 100644 docs/platforms/ststm32.rst delete mode 100644 platformio/boards/stm32.json create mode 100644 platformio/boards/ststm32.json rename platformio/builder/scripts/{stm32.py => ststm32.py} (67%) rename platformio/platforms/{stm32.py => ststm32.py} (79%) diff --git a/docs/platforms/index.rst b/docs/platforms/index.rst index 5aa06bcc..ee95d183 100644 --- a/docs/platforms/index.rst +++ b/docs/platforms/index.rst @@ -16,7 +16,7 @@ MCU, upload protocol or etc. Please use ``board`` option. atmelavr atmelsam - stm32 + ststm32 teensy timsp430 titiva diff --git a/docs/platforms/stm32.rst b/docs/platforms/stm32.rst deleted file mode 100644 index 4748f6a9..00000000 --- a/docs/platforms/stm32.rst +++ /dev/null @@ -1,104 +0,0 @@ -.. _platform_stm32: - -Platform ``stm32`` -================== - -`The STM32 family of 32-bit Flash MCUs `_ based on the ARM® Cortex®-M processor is designed to offer new degrees of freedom to MCU users. It offers a 32-bit product range that combines very high performance, real-time capabilities, digital signal processing, and low-power, low-voltage operation, while maintaining full integration and ease of development. - -The unparalleled and large range of STM32 devices, based on an industry-standard core and accompanied by a vast choice of tools and software, makes this family of products the ideal choice, both for small projects and for entire platform decisions. - -.. contents:: - -Packages --------- - -.. list-table:: - :header-rows: 1 - - * - Name - - Alias - - Contents - * - ``toolchain-gccarmnoneeabi`` - - toolchain - - `gcc-arm-embedded `_, - `GDB `_ - * - ``tool-stlink`` - - uploader - - `STLink `_ - * - ``framework-cmsis`` - - - - See below in :ref:`stm32_frameworks` - * - ``framework-spl`` - - - - See below in :ref:`stm32_frameworks` - * - ``framework-opencm3`` - - - - See below in :ref:`stm32_frameworks` - -.. warning:: - **Linux Users:** Don't forget to install "udev" rules file - `99-platformio-udev.rules `_ (an instruction is located in the file). - - -.. _stm32_frameworks: - -Frameworks ----------- - -.. list-table:: - :header-rows: 1 - - * - Type ``framework`` - - Name - - Reference - * - ``cmsis`` - - Vendor-independent hardware abstraction layer for the Cortex-M processor series - - `Documentation `__ - * - ``spl`` - - Standard Peripheral Library for STM32 MCUs - - `Documentation `__ - * - ``opencm3`` - - libOpenCM3 Framework - - `Documentation `__ - - -Boards ------- - -.. note:: - * You can list pre-configured boards by :ref:`cmd_boards` command - * For more detailed ``board`` information please scroll tables below by - horizontal. - -.. list-table:: - :header-rows: 1 - - * - Type ``board`` - - Name - - Microcontroller ``board_mcu`` - - Frequency ``board_f_cpu`` - - Flash - - RAM - * - ``stm32ldiscovery`` - - `Discovery kit for STM32L151/152 line `_ - - STM32L152rbt6 ``cortex-m3`` - - 32 MHz ``32000000L`` - - 128 Kb - - 16 Kb - * - ``stm32f3discovery`` - - `Discovery kit for STM32F303xx microcontrollers - `_ - - STM32F303vct6 ``cortex-m4`` - - 72 MHz ``72000000L`` - - 256 Kb - - 48 Kb - * - ``stm32f4discovery`` - - `Discovery kit for STM32F407/417 lines - `_ - - STM32F407vgt6 ``cortex-m4`` - - 168 Mhz ``168000000L`` - - 1 Mb - - 192 Kb - -More detailed information you can find here -`STM32 Discovery kits `_. diff --git a/docs/platforms/ststm32.rst b/docs/platforms/ststm32.rst new file mode 100644 index 00000000..4f024041 --- /dev/null +++ b/docs/platforms/ststm32.rst @@ -0,0 +1,224 @@ +.. _platform_ststm32: + +Platform ``ststm32`` +==================== + +`The STM32 family of 32-bit Flash MCUs `_ based on the ARM® Cortex®-M processor is designed to offer new degrees of freedom to MCU users. It offers a 32-bit product range that combines very high performance, real-time capabilities, digital signal processing, and low-power, low-voltage operation, while maintaining full integration and ease of development. + +The unparalleled and large range of STM32 devices, based on an industry-standard core and accompanied by a vast choice of tools and software, makes this family of products the ideal choice, both for small projects and for entire platform decisions. + +.. contents:: + +Packages +-------- + +.. list-table:: + :header-rows: 1 + + * - Name + - Alias + - Contents + * - ``toolchain-gccarmnoneeabi`` + - toolchain + - `gcc-arm-embedded `_, + `GDB `_ + * - ``tool-stlink`` + - uploader + - `STLink `_ + * - ``framework-cmsis`` + - + - See below in :ref:`ststm32_frameworks` + * - ``framework-spl`` + - + - See below in :ref:`ststm32_frameworks` + * - ``framework-opencm3`` + - + - See below in :ref:`ststm32_frameworks` + * - ``framework-mbed`` + - + - See below in :ref:`ststm32_frameworks` + +.. warning:: + **Linux Users:** Don't forget to install "udev" rules file + `99-platformio-udev.rules `_ (an instruction is located in the file). + + +.. _ststm32_frameworks: + +Frameworks +---------- + +.. list-table:: + :header-rows: 1 + + * - Type ``framework`` + - Name + - Reference + * - ``cmsis`` + - Vendor-independent hardware abstraction layer for the Cortex-M processor series + - `Documentation `__ + * - ``spl`` + - Standard Peripheral Library for ST STM32 MCUs + - `Documentation `__ + * - ``opencm3`` + - libOpenCM3 Framework + - `Documentation `__ + * - ``mbed`` + - MBED Framework + - `Documentation `__ + + +Boards +------ + +.. note:: + * You can list pre-configured boards by :ref:`cmd_boards` command + * For more detailed ``board`` information please scroll tables below by + horizontal. + +.. list-table:: + :header-rows: 1 + + * - Type ``board`` + - Name + - Microcontroller ``board_mcu`` + - Frequency ``board_f_cpu`` + - Flash + - RAM + * - ``disco_l152rb`` + - `STM32LDISCOVERY + `_ + - STM32L152rbt6 ``cortex-m3`` + - 32 MHz ``32000000L`` + - 128 Kb + - 16 Kb + * - ``disco_f303vc`` + - `STM32F3DISCOVERY + `_ + - STM32F303vct6 ``cortex-m4`` + - 72 MHz ``72000000L`` + - 256 Kb + - 48 Kb + * - ``disco_f407vg`` + - `STM32F4DISCOVERY + `_ + - STM32F407vgt6 ``cortex-m4`` + - 168 Mhz ``168000000L`` + - 1 Mb + - 192 Kb + * - ``disco_f100rb`` + - `STM32VLDISCOVERY + `_ + - STM32F100rbt6 ``cortex-m3`` + - 24 Mhz ``24000000L`` + - 128 Kb + - 8 Kb + * - ``disco_f051r8`` + - `STM32F0DISCOVERY + `_ + - STM32F051r8t6 ``cortex-m0`` + - 48 Mhz ``48000000L`` + - 64 Kb + - 8 Kb + * - ``disco_f334c8`` + - `32F3348DISCOVERY + `_ + - STM32F334c8t6 ``cortex-m4`` + - 72 Mhz ``72000000L`` + - 64 Kb + - 16 Kb + * - ``disco_f401vc`` + - `32F401CDISCOVERY + `_ + - STM32F401vct6 ``cortex-m4`` + - 84 Mhz ``84000000L`` + - 256 Kb + - 64 Kb + * - ``disco_f429zi`` + - `32F429IDISCOVERY + `_ + - STM32F429zit6 ``cortex-m4`` + - 180 Mhz ``180000000L`` + - 2 Mb + - 256 Kb + * - ``nucleo_f030r8`` + - `ST Nucleo F030R8 + `_ + - STM32F030r8t6 ``cortex-m0`` + - 48 Mhz ``48000000L`` + - 64 Kb + - 8 Kb + * - ``nucleo_f070rb`` + - `ST Nucleo F070RB + `_ + - STM32F070rbt6 ``cortex-m0`` + - 48 Mhz ``48000000L`` + - 128 Kb + - 16 Kb + * - ``nucleo_f072rb`` + - `ST Nucleo F072RB + `_ + - STM32F072rbt6 ``cortex-m0`` + - 48 Mhz ``48000000L`` + - 128 Kb + - 16 Kb + * - ``nucleo_f091rc`` + - `ST Nucleo F091RC + `_ + - STM32F091rct6 ``cortex-m0`` + - 48 Mhz ``48000000L`` + - 256 Kb + - 32 Kb + * - ``nucleo_f103rb`` + - `ST Nucleo F103RB + `_ + - STM32F103rbt6 ``cortex-m3`` + - 72 Mhz ``72000000L`` + - 128 Kb + - 20 Kb + * - ``nucleo_f302r8`` + - `ST Nucleo F302R8 + `_ + - STM32F302r8t6 ``cortex-m4`` + - 72 Mhz ``72000000L`` + - 64 Kb + - 16 Kb + * - ``nucleo_f334r8`` + - `ST Nucleo F334R8 + `_ + - STM32F334r8t6 ``cortex-m4`` + - 72 Mhz ``72000000L`` + - 64 Kb + - 16 Kb + * - ``nucleo_f401re`` + - `ST Nucleo F401RE + `_ + - STM32F401ret6 ``cortex-m4`` + - 84 Mhz ``84000000L`` + - 512 Kb + - 96 Kb + * - ``nucleo_f411re`` + - `ST Nucleo F411RE + `_ + - STM32F411ret6 ``cortex-m4`` + - 100 Mhz ``100000000L`` + - 512 Kb + - 128 Kb + * - ``nucleo_l053r8`` + - `ST Nucleo L053R8 + `_ + - STM32L053r8t6 ``cortex-m0`` + - 48 Mhz ``48000000L`` + - 64 Kb + - 8 Kb + * - ``nucleo_l152re`` + - `ST Nucleo L152RE + `_ + - STM32L152ret6 ``cortex-m3`` + - 32 Mhz ``32000000L`` + - 512 Kb + - 80 Kb + +More detailed information you can find here +`STM32 Discovery kits `_ and here +`ST Nucleo boards with MBED support `_. diff --git a/examples/stm32/stm32-cmsis-blink/platformio.ini b/examples/stm32/stm32-cmsis-blink/platformio.ini index c90f099e..d19acf8d 100644 --- a/examples/stm32/stm32-cmsis-blink/platformio.ini +++ b/examples/stm32/stm32-cmsis-blink/platformio.ini @@ -17,17 +17,17 @@ # Automatic targets - enable auto-uploading # targets = upload -[env:stm32f4discovery] -platform = stm32 +[env:disco_f407vg] +platform = ststm32 framework = cmsis -board = stm32f4discovery +board = disco_f407vg -[env:stm32ldiscovery] -platform = stm32 +[env:disco_l152rb] +platform = ststm32 framework = cmsis -board = stm32ldiscovery +board = disco_l152rb -[env:stm32f3discovery] -platform = stm32 +[env:disco_f303vc] +platform = ststm32 framework = cmsis -board = stm32f3discovery +board = disco_f303vc \ No newline at end of file diff --git a/examples/stm32/stm32-opencm3-blink/platformio.ini b/examples/stm32/stm32-opencm3-blink/platformio.ini index 3c472f00..4055d71f 100644 --- a/examples/stm32/stm32-opencm3-blink/platformio.ini +++ b/examples/stm32/stm32-opencm3-blink/platformio.ini @@ -17,17 +17,17 @@ # Automatic targets - enable auto-uploading # targets = upload -[env:stm32f4discovery] -platform = stm32 +[env:disco_f407vg] +platform = ststm32 framework = opencm3 -board = stm32f4discovery +board = disco_f407vg -[env:stm32ldiscovery] -platform = stm32 +[env:disco_l152rb] +platform = ststm32 framework = opencm3 -board = stm32ldiscovery +board = disco_l152rb -[env:stm32f3discovery] -platform = stm32 +[env:disco_f303vc] +platform = ststm32 framework = opencm3 -board = stm32f3discovery +board = disco_f303vc diff --git a/examples/stm32/stm32-spl-blink/platformio.ini b/examples/stm32/stm32-spl-blink/platformio.ini index 6ba5b0c1..1324053c 100644 --- a/examples/stm32/stm32-spl-blink/platformio.ini +++ b/examples/stm32/stm32-spl-blink/platformio.ini @@ -17,17 +17,17 @@ # Automatic targets - enable auto-uploading # targets = upload -[env:stm32f4discovery] -platform = stm32 +[env:disco_f407vg] +platform = ststm32 framework = cmsis,spl -board = stm32f4discovery +board = disco_f407vg -[env:stm32ldiscovery] -platform = stm32 +[env:disco_l152rb] +platform = ststm32 framework = cmsis,spl -board = stm32ldiscovery +board = disco_l152rb -[env:stm32f3discovery] -platform = stm32 +[env:disco_f303vc] +platform = ststm32 framework = cmsis,spl -board = stm32f3discovery +board = disco_f303vc diff --git a/platformio/boards/stm32.json b/platformio/boards/stm32.json deleted file mode 100644 index 2dae3544..00000000 --- a/platformio/boards/stm32.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "stm32f4discovery": { - "build": { - "core": "stm32", - "extra_flags": "-DSTM32F40_41xxx", - "f_cpu": "168000000L", - "ldscript": "stm32f405x6.ld", - "cpu": "cortex-m4", - "mcu": "stm32f407vgt6", - "variant": "stm32f4" - }, - "framework": "cmsis", - "name": "STM32F4Discovery (168 MHz) with digital accelerometer, digital microphone, audio DAC", - "platform": "stm32", - "upload": { - "maximum_ram_size": 131071, - "maximum_size": 1048575 - } - }, - "stm32ldiscovery": { - "build": { - "core": "stm32", - "extra_flags": "-DSTM32L1XX_MD", - "f_cpu": "32000000L", - "ldscript": "stm32l15xx6.ld", - "cpu": "cortex-m3", - "mcu": "stm32l152rbt6", - "variant": "stm32l1" - }, - "framework": "cmsis", - "name": "STM32LDiscovery (32 MHz) ultra low-power development kit", - "platform": "stm32", - "upload": { - "maximum_ram_size": 16384, - "maximum_size": 131072 - } - }, - "stm32f3discovery": { - "build": { - "core": "stm32", - "extra_flags": "-DSTM32F303xC", - "f_cpu": "72000000L", - "ldscript": "stm32f30xx.ld", - "cpu": "cortex-m4", - "mcu": "stm32f303vct6", - "variant": "stm32f3" - }, - "framework": "cmsis", - "name": "STM32F3Discovery (72 MHz) with accelerometer, gyroscope and e-compass", - "platform": "stm32", - "upload": { - "maximum_ram_size": 262144, - "maximum_size": 131072 - } - } -} \ No newline at end of file diff --git a/platformio/boards/ststm32.json b/platformio/boards/ststm32.json new file mode 100644 index 00000000..0f5f673d --- /dev/null +++ b/platformio/boards/ststm32.json @@ -0,0 +1,280 @@ +{ + "disco_f407vg": { + "build": { + "core": "stm32", + "extra_flags": "-DSTM32F40_41xxx", + "f_cpu": "168000000L", + "ldscript": "stm32f405x6.ld", + "cpu": "cortex-m4", + "mcu": "stm32f407vgt6", + "variant": "stm32f4" + }, + "framework": "cmsis", + "name": "STM32F4DISCOVERY", + "platform": "ststm32", + "upload": { + "maximum_ram_size": 131072, + "maximum_size": 1048576 + } + }, + "disco_l152rb": { + "build": { + "core": "stm32", + "extra_flags": "-DSTM32L1XX_MD", + "f_cpu": "32000000L", + "ldscript": "stm32l15xx6.ld", + "cpu": "cortex-m3", + "mcu": "stm32l152rbt6", + "variant": "stm32l1" + }, + "framework": "cmsis", + "name": "STM32LDISCOVERY", + "platform": "ststm32", + "upload": { + "maximum_ram_size": 16384, + "maximum_size": 131072 + } + }, + "disco_f303vc": { + "build": { + "core": "stm32", + "extra_flags": "-DSTM32F303xC", + "f_cpu": "72000000L", + "ldscript": "stm32f30xx.ld", + "cpu": "cortex-m4", + "mcu": "stm32f303vct6", + "variant": "stm32f3" + }, + "framework": "cmsis", + "name": "STM32F3DISCOVERY", + "platform": "ststm32", + "upload": { + "maximum_ram_size": 49152, + "maximum_size": 262144 + } + }, + "disco_f100rb": { + "build": { + "f_cpu": "24000000L", + "cpu": "cortex-m3", + "mcu": "stm32f100rbt6" + }, + "framework": "mbed", + "name": "STM32VLDISCOVERY", + "platform": "ststm32", + "upload": { + "maximum_ram_size": 8192, + "maximum_size": 131072 + } + }, + "disco_f051r8": { + "build": { + "f_cpu": "48000000L", + "cpu": "cortex-m0", + "mcu": "stm32f051r8t6" + }, + "framework": "mbed", + "name": "STM32F0DISCOVERY", + "platform": "ststm32", + "upload": { + "maximum_ram_size": 8192, + "maximum_size": 65536 + } + }, + "disco_f334c8": { + "build": { + "f_cpu": "72000000L", + "cpu": "cortex-m4", + "mcu": "stm32f334c8t6" + }, + "framework": "mbed", + "name": "32F3348DISCOVERY", + "platform": "ststm32", + "upload": { + "maximum_ram_size": 16384, + "maximum_size": 65536 + } + }, + "disco_f401vc": { + "build": { + "f_cpu": "84000000L", + "cpu": "cortex-m4", + "mcu": "stm32f401vct6" + }, + "framework": "mbed", + "name": "32F401CDISCOVERY", + "platform": "ststm32", + "upload": { + "maximum_ram_size": 65536, + "maximum_size": 262144 + } + }, + "disco_f429zi": { + "build": { + "f_cpu": "180000000L", + "cpu": "cortex-m4", + "mcu": "stm32f429zit6" + }, + "framework": "mbed", + "name": "32F429IDISCOVERY", + "platform": "ststm32", + "upload": { + "maximum_ram_size": 262144, + "maximum_size": 2097152 + } + }, + "nucleo_f030r8": { + "build": { + "f_cpu": "48000000L", + "cpu": "cortex-m0", + "mcu": "stm32f030r8t6" + }, + "framework": "mbed", + "name": "ST Nucleo F030R8", + "platform": "ststm32", + "upload": { + "maximum_ram_size": 8192, + "maximum_size": 65536 + } + }, + "nucleo_f070rb": { + "build": { + "f_cpu": "48000000L", + "cpu": "cortex-m0", + "mcu": "stm32f070rbt6" + }, + "framework": "mbed", + "name": "ST Nucleo F070RB", + "platform": "ststm32", + "upload": { + "maximum_ram_size": 16384, + "maximum_size": 131072 + } + }, + "nucleo_f072rb": { + "build": { + "f_cpu": "48000000L", + "cpu": "cortex-m0", + "mcu": "stm32f072rbt6" + }, + "framework": "mbed", + "name": "ST Nucleo F072RB", + "platform": "ststm32", + "upload": { + "maximum_ram_size": 16384, + "maximum_size": 131072 + } + }, + "nucleo_f091rc": { + "build": { + "f_cpu": "48000000L", + "cpu": "cortex-m0", + "mcu": "stm32f091rct6" + }, + "framework": "mbed", + "name": "ST Nucleo F091RC", + "platform": "ststm32", + "upload": { + "maximum_ram_size": 32768, + "maximum_size": 262144 + } + }, + "nucleo_f103rb": { + "build": { + "f_cpu": "72000000L", + "cpu": "cortex-m3", + "mcu": "stm32f103rbt6" + }, + "framework": "mbed", + "name": "ST Nucleo F103RB", + "platform": "ststm32", + "upload": { + "maximum_ram_size": 20480, + "maximum_size": 131072 + } + }, + "nucleo_f302r8": { + "build": { + "f_cpu": "72000000L", + "cpu": "cortex-m4", + "mcu": "stm32f302r8t6" + }, + "framework": "mbed", + "name": "ST Nucleo F302R8", + "platform": "ststm32", + "upload": { + "maximum_ram_size": 16384, + "maximum_size": 65536 + } + }, + "nucleo_f334r8": { + "build": { + "f_cpu": "72000000L", + "cpu": "cortex-m4", + "mcu": "stm32f334r8t6" + }, + "framework": "mbed", + "name": "ST Nucleo F334R8", + "platform": "ststm32", + "upload": { + "maximum_ram_size": 16384, + "maximum_size": 65536 + } + }, + "nucleo_f401re": { + "build": { + "f_cpu": "84000000L", + "cpu": "cortex-m4", + "mcu": "stm32f401ret6" + }, + "framework": "mbed", + "name": "ST Nucleo F401RE", + "platform": "ststm32", + "upload": { + "maximum_ram_size": 98304, + "maximum_size": 524288 + } + }, + "nucleo_f411re": { + "build": { + "f_cpu": "100000000L", + "cpu": "cortex-m4", + "mcu": "stm32f411ret6" + }, + "framework": "mbed", + "name": "ST Nucleo F411RE", + "platform": "ststm32", + "upload": { + "maximum_ram_size": 131072, + "maximum_size": 524288 + } + }, + "nucleo_l053r8": { + "build": { + "f_cpu": "48000000L", + "cpu": "cortex-m0", + "mcu": "stm32l053r8t6" + }, + "framework": "mbed", + "name": "ST Nucleo L053R8", + "platform": "ststm32", + "upload": { + "maximum_ram_size": 8192, + "maximum_size": 65536 + } + }, + "nucleo_l152re": { + "build": { + "f_cpu": "32000000L", + "cpu": "cortex-m3", + "mcu": "stm32l152ret6" + }, + "framework": "mbed", + "name": "ST Nucleo L152RE", + "platform": "ststm32", + "upload": { + "maximum_ram_size": 81920, + "maximum_size": 524288 + } + } +} \ No newline at end of file diff --git a/platformio/builder/scripts/stm32.py b/platformio/builder/scripts/ststm32.py similarity index 67% rename from platformio/builder/scripts/stm32.py rename to platformio/builder/scripts/ststm32.py index 4cd991af..9bc2f4c8 100644 --- a/platformio/builder/scripts/stm32.py +++ b/platformio/builder/scripts/ststm32.py @@ -2,15 +2,23 @@ # See LICENSE for details. """ - Builder for STMicroelectronics - STM32 Series ARM microcontrollers. + Builder for ST STM32 Series ARM microcontrollers. """ from os.path import join +from shutil import copyfile from SCons.Script import (COMMAND_LINE_TARGETS, AlwaysBuild, Default, DefaultEnvironment, SConscript) + +def UploadToDisk(target, source, env): # pylint: disable=W0613,W0621 + env.AutodetectUploadPort() + copyfile(join(env.subst("$BUILD_DIR"), "firmware.bin"), + join(env.subst("$UPLOAD_PORT"), "firmware.bin")) + print ("Firmware has been successfully uploaded.\n" + "Please restart your board.") + env = DefaultEnvironment() SConscript(env.subst(join("$PIOBUILDER_DIR", "scripts", "basearm.py"))) @@ -38,13 +46,11 @@ env.Append( ] ) -CORELIBS = env.ProcessGeneral() - # # Target: Build executable and linkable firmware # -target_elf = env.BuildFirmware(["c", "gcc", "m", "nosys"] + CORELIBS) +target_elf = env.BuildFirmware() # # Target: Build the .bin file @@ -66,7 +72,10 @@ AlwaysBuild(target_size) # Target: Upload by default .bin file # -upload = env.Alias(["upload", "uploadlazy"], target_firm, "$UPLOADCMD") +if "mbed" in env.subst("$FRAMEWORK"): + upload = env.Alias(["upload", "uploadlazy"], target_firm, UploadToDisk) +else: + upload = env.Alias(["upload", "uploadlazy"], target_firm, "$UPLOADCMD") AlwaysBuild(upload) # diff --git a/platformio/platforms/stm32.py b/platformio/platforms/ststm32.py similarity index 79% rename from platformio/platforms/stm32.py rename to platformio/platforms/ststm32.py index 63607d95..bf1e99bf 100644 --- a/platformio/platforms/stm32.py +++ b/platformio/platforms/ststm32.py @@ -4,10 +4,10 @@ from platformio.platforms.base import BasePlatform -class Stm32Platform(BasePlatform): +class Ststm32Platform(BasePlatform): """ - An embedded platform for STMicroelectronics ARM microcontrollers + An embedded platform for ST STM32 ARM microcontrollers """ PACKAGES = { @@ -36,5 +36,9 @@ class Stm32Platform(BasePlatform): "framework-opencm3": { "default": True + }, + + "framework-mbed": { + "default": True } } diff --git a/tests/commands/test_boards.py b/tests/commands/test_boards.py index 3dfd1a11..dfeef591 100644 --- a/tests/commands/test_boards.py +++ b/tests/commands/test_boards.py @@ -44,7 +44,7 @@ def test_board_options(platformio_setup, clirunner, validate_cliresult): def test_board_ldscripts(platformio_setup, clirunner, validate_cliresult): result = clirunner.invoke( install_cli, [ - "stm32", + "ststm32", "--skip-default-package", "--with-package=ldscripts" ])