Git Product home page Git Product logo

stm32-from-scratch's Introduction

STM32-From-Scratch

Programming an STM32F103 microcontroller at the register level. Writing my own minimal HAL and eventually a simple RTOS.

The goal is to write low level drivers, and eventually an RTOS, without the use of fancy libraries and IDEs for embedded development.

Everything should be able to be done with just a Unix machine, make, and the gnu arm embedded toolchain.

Directories

  • 00 - Blinky -> Blink program. Simple code to make on-board LED blink.
  • 01 - Blinky 2 -> Blink program, but improved. Code clean up and improved directory structure.
  • 02 - Blinky 3 -> Blink program, but more improved. Added separate header and implementation files for GPIO and RCC registers.
  • 03 - Extern Blinky -> Blink program, but with an external LED on A0. Started using OpenOCD and GDB server for debugging.
  • 04 - Extern Blinky 2 -> External blink program with more organized code and extends to all GPIO pins.
  • 05 - Timer2 Interrupt -> Enabling and using timer 2 interrupt to blink an LED while the main loop fires.
  • 06 - General Timer Interrupt -> Enabling and using all general purpose timers and timer interrupts.
  • 07 - Systick Interrupt -> Enabling and using Systick interrupt and counter for improved timing delays.
  • 08 - PWM -> Using general purpose timers to generate a PWM signal. Started using objdump for disassembly. Also code cleanup and fixed issue with timing.
  • 09 - SCB -> Adding system control block exception handlers.
  • 10 - Serial -> Enabling and using USART/Serial communication.
  • 11 - HAL -> Non-exhaustive hardware abstraction layer.
  • 12 - RTOS -> Minimal Real Time Operating System Kernel. Work in progress.

Getting Started

Install arm-none-eabi toolchain and openocd.

MacOS

brew install arm-gcc-bin openocd

stm32-from-scratch's People

Contributors

edwardlu2018 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

stm32-from-scratch's Issues

Advice for Beginners

Can you give us, the beginners of register-level embedded world, advice? Which books or courses you've followed during the making of this repo? Any help will be very useful. Thank you.

Note: Maybe this project can grow up with creating documentation -- like the lessons.

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.