Coder Social home page Coder Social logo

aghosh993 / cmxx-demos Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 155 KB

Demos of the use of cmxx auto-generated projects for various MCU platforms.

License: BSD 3-Clause "New" or "Revised" License

Makefile 0.17% C++ 99.82% Shell 0.01% GDB 0.01%

cmxx-demos's Introduction

cmxx-demos

Demos of the use of cmxx auto-generated projects for various MCU platforms. Currently targeting the STM32F3 Discovery board (MCU datasheet, Cortex M programming manual, Reference Manual, ARM Info Center online reference)

Purpose

This repo showcases a first-principles approach to driver development for the Cortex-M line of microcontrollers. There is absolutely no vendor code/IP utilized beyond the SVD (System View Description) XML file. The cmxx submodule contains a Python script that accepts an SVD file as an input and auto-generates a project structure containing device header and startup code, along with a functional Makefile and linker script. Practically all code that ends up on the chip at runtime is within this generated project structure, allowing for a better understanding of the exact hardware initialization process as it should occur in conjunction with the use of C++11 for better source readability and compile-time optimization.

Quickstart

Recursively clone this repo. It is assumed a working arm-none-eabi toolchain is in your PATH. If not, head over here, download and extract the relevant package and add the binary directory to your system PATH. Alternatively, don't modify your PATH, but rather modify the TOOLCHAIN_ROOT and PREFIX in the Makefiles in this repo's demos to point to the toolchain you wish to use.

Once a recursive clone is complete, cd into any given demo, and run "make". If you have OpenOCD installed, "make load" should load the resulting binary via the STLink, assuming Udev has been configured correctly and your STM32 Discovery board is plugged in.

Extending and adding examples

Do the following to generate a new project template for your device (assuming you have an SVD file.. check the cmxx/cmsis-svd/data directory to view pre-packaged SVD files):

cd cmxx/scripts
./mkproject.py PATH_TO_SVD ../../project_name

(c) 2017-2018, Abhimanyu Ghosh

cmxx-demos's People

Contributors

aghosh993 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.