Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: arduino-collections/Arduino_Core_STM8
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: stm32duino/Arduino_Core_STM8
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
  • 8 commits
  • 7 files changed
  • 2 contributors

Commits on Jul 14, 2021

  1. system: remove *.chm files

    Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
    fpistm committed Jul 14, 2021
    Copy the full SHA
    79dd61d View commit details
  2. core: add STM8 core version number

    Based on Semantic Versioning 2.0.0 (https://semver.org/)
    This will ease core dependencies.
    
    * STM8_CORE_VERSION_MAJOR -> major version
    * STM8_CORE_VERSION_MINOR -> minor version
    * STM8_CORE_VERSION_PATCH -> patch version
    * STM8_CORE_VERSION_EXTRA -> Extra label
      with:
      - 0: official release
      - [1-9]: release candidate
      - F[0-9]: development
    
    * STM8_CORE_VERSION --> Full version number
    
    Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
    fpistm committed Jul 14, 2021
    Copy the full SHA
    f881a27 View commit details

Commits on Jul 15, 2021

  1. config: update platform specification

    Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
    fpistm committed Jul 15, 2021
    Copy the full SHA
    9703756 View commit details
  2. config: remove redundant tools/ directory in STM8Tools

    Before path was:
     STM8/tools/STM8Tools/<version>/tools/
    now:
     STM8/tools/STM8Tools/<version>/
    
    Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
    fpistm committed Jul 15, 2021
    Copy the full SHA
    1f8e719 View commit details
  3. Update README.md

    fpistm authored Jul 15, 2021

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f76fa28 View commit details

Commits on Oct 5, 2021

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    64888ab View commit details

Commits on Dec 8, 2021

  1. Copy the full SHA
    784261b View commit details

Commits on Mar 31, 2023

  1. chore: add important note before archive

    Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
    fpistm authored Mar 31, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    cc4d30f View commit details
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -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)

@@ -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)

2 changes: 1 addition & 1 deletion boards.txt
Original file line number Diff line number Diff line change
@@ -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
18 changes: 18 additions & 0 deletions cores/arduino/stm8/stm8_def.h
Original file line number Diff line number Diff line change
@@ -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)
10 changes: 5 additions & 5 deletions platform.txt
Original file line number Diff line number Diff line change
@@ -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=
Binary file not shown.
Binary file not shown.
8 changes: 4 additions & 4 deletions variants/NUCLEO_8S208RB/variant.cpp
Original file line number Diff line number Diff line change
@@ -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,15 +74,15 @@ 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
PF_4, //D33
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