GithubHelp home page GithubHelp logo

qpc_nucleof031k6's Introduction

The NUCLEO-32 based F031K6 board STM32CubeMX based drivers

This is a repository that uses the IOC file generated from STM32CubeMX driver generation tool for the Nucleo-F031K6 board.

STM32CubeMX generation options

The following options are used while configuration of STM32CubeMX IOC project:

  • generates for STM32CubeIDE (tested on version 1.13.1)
  • generate low level drivers (stm32f0xx_hal_...) as links rather than files to make the driver more portable
  • use the STM32CubeF0 firmware repository on GitHub as the low level drivers
  • enforce the cubemx generated hal configuration file to guide the low level compilation

โš ๏ธ LLVM Fails to find NULL

The auto generated file sysmem.c uses NULL in the source without including string.h header file. This has to be re-introduced each time for a successful build.

CMake definitions

The following CMake definitions are required for a successful build on ARM based llvm.

Type Name Value Description
Environment CORTEX_TYPE CM0 Cortex M7 family name of the ARM controller to be used in cross compiler toolchain, always in UPPER_CASE
Environment LLVM_CLANG_ROOT_FOLDER toolchain path absolute path to the folder location of the toolchain as a string
Environment SEGGER_JLINK_ROOT_FOLDER debugger tool path absolute path to the folder location of the Segger JLink tools, used for tests on target hardware
CMake Cache Variable DEMO boolean String value of true sets the build to include blinky application to work that lights up the LD1 and LD3 on the board alternatively at 50ms interval.
CMake Cache Variable CMAKE_BUILD_TYPE Debug/Release String for debug optimised build.
CMake Cache Variable CMAKE_TOOLCHAIN_FILE path to cross compiler recepie String value that provides path where the toolchain recepie is set, usually one of the cmake files in the toolchain repositiory.
CMake Cache Variable GITHUB_BRANCH_TOOLCHAIN string String value of the GitHub branch or tag of the toolchain repoitory.
CMake Variable STM32_TYPE f0 String value of STM32 family.
CMake Variable STM32_DEVICE STH32F031x6 Case Sensitive string value of STM32 Device.
CMake Variable JLINK_DEVICE STM32F031K6 Case Sensitive string value of STM32 Device for Segger tools
CMake Cache Variable STM32_HAL_CONFIGURATION path to autogenerated HAL config file Absolute path to the autogenerated stm32f0xx_hal_conf.h file to be used for correct configuration of the HAL layer, specially the clocks.

CMake presets

The following presets are available at the time of writing this

$ cmake --list-presets
Available configure presets:

  "llvm-target-test" - llvm-target-test
  "llvm-host-test"   - llvm-host-test

CMake Project structure for each preset

llvm-target-test

This is the preset to perform unity based unit tests directly on the target hardware using Segger RTT based JRun. Alt text

llvm-host-test

This is the preset to perform unity based unit tests on host machine (Windows/Linux/Darwin) Alt text

qpc_nucleof031k6's People

Contributors

sohal avatar

Forkers

sohal

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.