diff --git a/README.md b/README.md index 5621e74..fd25e74 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,9 @@ +# Important note + +**This repository has been archived as no further evolutions are planned.** + +**As an alternative, consider using [STM32C0xx series](https://www.st.com/en/microcontrollers-microprocessors/stm32c0-series.html) supported by the [Arduino_Core_STM32](https://github.com/stm32duino/Arduino_Core_STM32).** + # Arduino core support for STM8 based boards [![GitHub release](https://img.shields.io/github/release/stm32duino/Arduino_Core_STM8.svg)](https://github.com/stm32duino/Arduino_Core_STM8/releases/latest) @@ -17,7 +23,7 @@ This porting is based on several external components : * [SPL for STM8S](https://www.st.com/en/embedded-software/stsw-stm8069.html) * Cosmic compiler, allowing to compile c++ source code on stm8 family (http://www.cosmic-software.com/) -For now, the solution is running on Windows only. +Solution is running on Windows only. ## Getting Started @@ -25,7 +31,11 @@ This repo is available as a package usable with [Arduino Boards Manager](https:/ Use this link in the "*Additional Boards Managers URLs*" field: -https://github.com/stm32duino/BoardManagerFiles/raw/master/STM8/package_stm8_index.json +https://github.com/stm32duino/BoardManagerFiles/raw/main/package_stmicroelectronics_index.json + +**Warning**: +* Default branch has changed to main. +* Since core release 1.0.0 this link has changed. For full instructions on using the "**Boards Manager**", see the [Getting Started](https://github.com/stm32duino/wiki/wiki/Getting-Started) page. @@ -50,7 +60,5 @@ We have several known issues : *STM8 microcontrollers are natively Big Endian whereas Arduino boards and STM32 microcontrollers are Little Endian. By default, some libraries don't handle endianess, therefore these won't be directly compatible with STM8 (this is the case of SD library for example).* -If you have any issue, you could [file an issue on Github](https://github.com/stm32duino/Arduino_Core_STM8/issues/new). - If you have a question about compiler, you can also send a mail to Cosmic support : [send a mail to Cosmic support](mailto:support@cosmic.fr) diff --git a/boards.txt b/boards.txt index e9063d2..952babd 100644 --- a/boards.txt +++ b/boards.txt @@ -1,4 +1,4 @@ -# See: https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5-3rd-party-Hardware-specification +# See: https://arduino.github.io/arduino-cli/latest/platform-specification/ menu.xserial=Serial interface menu.upload_method=Upload Method diff --git a/cores/arduino/stm8/stm8_def.h b/cores/arduino/stm8/stm8_def.h index bdde6ec..5e5eff6 100644 --- a/cores/arduino/stm8/stm8_def.h +++ b/cores/arduino/stm8/stm8_def.h @@ -1,6 +1,24 @@ #ifndef _STM8_DEF_ #define _STM8_DEF_ +/** + * @brief STM8 core version number + */ +#define STM8_CORE_VERSION_MAJOR (0x01U) /*!< [31:24] major version */ +#define STM8_CORE_VERSION_MINOR (0x00U) /*!< [23:16] minor version */ +#define STM8_CORE_VERSION_PATCH (0x00U) /*!< [15:8] patch version */ +/* + * Extra label for development: + * 0: official release + * [1-9]: release candidate + * F[0-9]: development + */ +#define STM8_CORE_VERSION_EXTRA (0x00U) /*!< [7:0] extra version */ +#define STM8_CORE_VERSION ((STM8_CORE_VERSION_MAJOR << 24U)\ + |(STM8_CORE_VERSION_MINOR << 16U)\ + |(STM8_CORE_VERSION_PATCH << 8U )\ + |(STM8_CORE_VERSION_EXTRA)) + #if defined(STM8Sxx) #include "stm8s.h" #elif defined(STM8Lxx) diff --git a/platform.txt b/platform.txt index ed8a4fa..55aa53e 100644 --- a/platform.txt +++ b/platform.txt @@ -3,7 +3,7 @@ # ------------------------------ # # For more info: -# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5-3rd-party-Hardware-specification +# https://arduino.github.io/arduino-cli/latest/platform-specification/ name = STM8 Boards version=1.0.0 @@ -45,7 +45,7 @@ compiler.define=-dARDUINO= system.path=C:\windows\system32\ -# This can be overriden in boards.txt +# This can be overridden in boards.txt build.extra_flags= # These can be overridden in platform.local.txt @@ -101,7 +101,7 @@ recipe.c.combine.pattern="{compiler.path}{compiler.c.sm8.cmd}" {compiler.c.sm8.f recipe.objcopy.1hex.pattern="{compiler.path}{compiler.sm82hex.cmd}" {compiler.sm82hex.flags} {compiler.sm82hex.extra_flags} -o "{build.path}/{build.project_name}.hex" "{build.path}/{build.project_name}.sm8" ## Create output (.bin file) -recipe.objcopy.2bin.pattern="{runtime.tools.STM8Tools.path}/tools/win/{compiler.hex2bin.cmd}" {compiler.hex2bin.flags} "{build.path}/{build.project_name}.hex" +recipe.objcopy.2bin.pattern="{runtime.tools.STM8Tools.path}/win/{compiler.hex2bin.cmd}" {compiler.hex2bin.flags} "{build.path}/{build.project_name}.hex" ## Compute size recipe.size.pattern="{system.path}{compiler.size.cmd}" /C type "{build.path}\\{build.project_name}.map" @@ -112,14 +112,14 @@ recipe.size.regex.data=data:\s+([0-9]+) # ------------------- #Upload via MassStorage -tools.massStorageCopy.path={runtime.tools.STM8Tools.path}/tools/win +tools.massStorageCopy.path={runtime.tools.STM8Tools.path}/win tools.massStorageCopy.cmd.windows=massStorageCopy.bat tools.massStorageCopy.upload.params.verbose= tools.massStorageCopy.upload.params.quiet= tools.massStorageCopy.upload.pattern="{path}/{cmd}" {upload.verbose} -I "{build.path}/{build.project_name}.bin" -O "{node}" #Upload via stm8Tools -tools.stm8Flasher.path={runtime.tools.STM8Tools.path}/tools/win +tools.stm8Flasher.path={runtime.tools.STM8Tools.path}/win tools.stm8Flasher.cmd.windows=stm8Flasher.bat tools.stm8Flasher.upload.params.verbose= tools.stm8Flasher.upload.params.quiet= diff --git a/system/Drivers/STM8Lxx_StdPeriph_Driver/stm8l15x-16x-05x_al31-l_stdperiph_drivers_um.chm b/system/Drivers/STM8Lxx_StdPeriph_Driver/stm8l15x-16x-05x_al31-l_stdperiph_drivers_um.chm deleted file mode 100644 index 043a066..0000000 Binary files a/system/Drivers/STM8Lxx_StdPeriph_Driver/stm8l15x-16x-05x_al31-l_stdperiph_drivers_um.chm and /dev/null differ diff --git a/system/Drivers/STM8Sxx_StdPeriph_Driver/stm8s-a_stdperiph_drivers_um.chm b/system/Drivers/STM8Sxx_StdPeriph_Driver/stm8s-a_stdperiph_drivers_um.chm deleted file mode 100644 index e2afdc8..0000000 Binary files a/system/Drivers/STM8Sxx_StdPeriph_Driver/stm8s-a_stdperiph_drivers_um.chm and /dev/null differ diff --git a/variants/NUCLEO_8L152R8/variant.h b/variants/NUCLEO_8L152R8/variant.h index 2ddd50b..fbf1cde 100644 --- a/variants/NUCLEO_8L152R8/variant.h +++ b/variants/NUCLEO_8L152R8/variant.h @@ -56,7 +56,7 @@ enum { PC2, //D5 PWM PC3, //D6 PWM PD1, //D7 - PD8, //D8 + PD3, //D8 PC4, //D9 PWM PB4, //D10 SPI Clock PB6, //D11 SPI MOSI diff --git a/variants/NUCLEO_8S208RB/variant.cpp b/variants/NUCLEO_8S208RB/variant.cpp index 6e81020..6ae409f 100644 --- a/variants/NUCLEO_8S208RB/variant.cpp +++ b/variants/NUCLEO_8S208RB/variant.cpp @@ -48,7 +48,7 @@ const PinName digitalPin[] = { PC_2, //D5 PWM PC_3, //D6 PWM PD_1, //D7 - PD_3, //D8 + PD_3, //D8 PWM PC_4, //D9 PWM PE_5, //D10 SPI Clock PC_6, //D11 SPI MOSI @@ -62,7 +62,7 @@ const PinName digitalPin[] = { PG_5, //D17 PE_7, //D18 PE_6, //D19 - PA_3, //D20 + PA_3, //D20 PWM PA_4, //D21 PA_5, //D22 PA_6, //D23 @@ -74,7 +74,7 @@ const PinName digitalPin[] = { // CN9 Right Side PB_7, //D27 PB_6, //D28 - PD_4, //D29 + PD_4, //D29 PWM PF_7, //D30 PF_6, //D31 PF_5, //D32 @@ -82,7 +82,7 @@ const PinName digitalPin[] = { PF_3, //D34 PF_0, //D35 PD_2, //D36 - PD_0, //D37 + PD_0, //D37 PWM PG_1, //D38 PE_4, //D39 PE_3, //D40