disk91 / stm32-it-sdk

Disk91 STM32 IoT SDK
https://www.disk91.com
GNU General Public License v3.0
45 stars 19 forks source link

Disk91 IoT_SDK not only for STM32

Version 1.7 - in development. For stable version go to version-1.6 branch

This project is a low level SDK with a harwdare abstraction layer designed to make IoT project. The purpose is to quickly be able to create communicating IoT device over LPWAN (LoRaWAn, Sigfox...) for fast prototyping but also being able to bring that firmware to production will all the necessary components avaoilable out-of-the-box. This SDK try to be fully configurable with header files. The objectif is to propose an abstraction layer between the software implementation and the MCU execution allowing to port the firmware on different plateform.

itsdk_architecture "IT-SDK Architecture"

The SDK is currently implementing STM32(W)L architecture. The abstraction layer allows to quickly add new platforms.

It implements different usefull function with (I hope) a cleaner code than the usual ST SDK components.

Most is done to preserve code size, the SDK can target small flash MCU from 16KB for simple applications.

Active Versions

Version Date Link
1.7 2024-07 master
1.6 2020-07-01 Release 1.6

Examples (project skeleton)

Repository Chipset Feature
itsdk-example-sigfox-seeedE5 Seeed E5 (STM32WLE5) Sigfox Communications
itsdk-example-murata-lora Murata ABZ (STM32/SX1276) LoRaWan Communications
itsdk-example-sigfox-sx1276 Murata ABZ (STM32/SX1276) Sigfox Communications
itsdk-example-catena-4618 MCCI Catena (Murata ABZ) Sigfox Communications
yadom-BRKABZ01-murata Yadom BRKABZ01 (Murata ABZ) LoRaWan Communications

Features

The second objective is to be able to port this SDK to different patform to make it a portable SDK. The SDK have a it-sdk directory where everything needs to be portable. stm32l-sdk contains all the subfunctions specific to this platform.

Project organization

Previously the devel branch was the living branch and master was stable. This way sound not optimal (at least for my github commit graph ;)/ So starting in 1.6 here is the new organization:

Start your project by configuring a skeleton with Cube Mx

When generating the Project

Import the SDK (this repository)

  1. Clone this repository into the root of your project.
  2. For the next configuration, you need to do it ifor both Debug and Release configuration
  3. Add in project properties >> C/C++ General >> Path&Symbol >> Source location >> the repository ItSdk Src directory.
  4. Add in project properties >> C/C++ Build >> Settings >> Tool Settings >> MCU GCC Compiler >> Includes Path >> Add the ItSdk Inc directory.
  5. Add in project properties >> C/C++ Build >> Settings >> Tool Settings >> MCU GCC Assembler >> Includes Path >> Add the ItSdk Inc directory.
  6. In C/C++ Build / Settings / Build Step / pre-build steps you can add the command _touch "${workspace_loc:/${ProjName}/stm32-it-sdk/Src/itsdk/console/console.c}" this will update the compile date on every build
  7. You can get detail on size of code generated on build by adding a post-build step "arm-none-eabi-size --format=sysV ${BuildArtifactFileName}"
  8. You can take a loop on various stm32 code optimization also.

Configure the SDK

  1. Copy one of the ItSdk/Src/project_main.c.template file into Core/Src/project_main.c and make the modification you want to get started.
  2. Copy the ItSdk/Inc/it_sdk/config.h.template file into Core/Inc/it_sdk/config.h
  3. Copy the ItSdk/Inc/it_sdk/configDrivers.h.template file into Core/Inc/it_sdk/configDrivers.h [needed when using some of the drivers]
  4. Copy the ItSdk/Inc/it_sdk/configSigfox.h.template file into Core/Inc/it_sdk/configSigfox.h [needed when using sigfox drivers]
  5. Copy the ItSdk/Inc/it_sdk/configLoRaWan.h.template file into Core/Inc/it_sdk/configLoRaWan.h [needed when using LoRaWAn drivers]
  6. Edit these files and fill the different settings according to your environment and your choices.

Modify the Cube Mx skeleton

Things to not forget once a cubeMx project has been created

Other modifications (need to be done on every CubeMx project regeneration):

Documentation

The documentation about the different components is available in /Doc directory. The function API are not documented in the .h files but more generally in the .c files. Work in progress...

Examples

The examples are published on different Git repo to simplify the distribution of the SDK. See /Example directory for a direct access to these ready to use projects.

Version Upgrade

When upgrading the SDK from a new version, the main impact is to add the new Settings expected in the different configuration file. Please find the different settings added version after version

from version 1.7.0

misc

config.h

configSigfox.h

configLoRaWan.h

configDriver.h

from version 1.6.0

project settings

config.h

configDriver.h

from version 1.5.0

config.h

confgiDriver.h

configLoRaWan.h

configSigfox.h

License

This code and ItSdk are under GPLv3. You can use it freely, you can modify, redistribute but you must publish your source code.

When included into a commercial product you have the following obligations:

Other licenses can be obtained by contacting me on disk91.com. Non public licence allows you to be released from the previously described obligations.