Giter Site home page Giter Site logo

vbolshakov / stm32f103_projects Goto Github PK

View Code? Open in Web Editor NEW

This project forked from metametaclass/stm32f103_projects

0.0 1.0 0.0 1.07 MB

libopencm3 based projects for noname stm32f103c8t6 board

Makefile 6.83% C 64.37% Python 0.96% Batchfile 0.11% C++ 24.21% Ragel 3.53%

stm32f103_projects's Introduction

stm32f103 projects

libopencm3-based software projects for generic stm32f103c8t6 board

Build libopencm3 and projects on Windows:

  • Clone projects repo:
git clone https://github.com/metametaclass/stm32f103_projects
  • init libopencm3 submodule:
git submodule init
git submodule update
rem change path to installed python and gcc-arm 'bin' folder
set PATH=%PATH%;D:\Programm\Python27;D:\Programm\gcc-arm\bin
call %~dp0msys.bat
  • build libopencm3:

In opened MSYS shell cd to libopencm3 folder and run make:

cd /c/work/stm32f103_projects/libopencm3/
make
  • build projects: cd to any project folder and run make:
cd ../projects/blink
make

Programming on Linux with STLinkV2:

https://github.com/rogerclarkmelbourne/Arduino_STM32/wiki/Programming-an-STM32F103XXX-with-a-generic-%22ST-Link-V2%22-programmer-from-Linux

  • Wiring

stlink -> board programming pins

8 Vcc(3.3) -> 3.3
2 SWDIO    -> SWDIO  (PA13, pin 34)
6 SWCLK    -> SWDCLK (PA14, pin 37)
4 Ground   -> GND
  • interactive programming: run openocd
openocd -f /usr/share/openocd/scripts/interface/stlink-v2.cfg -f /usr/share/openocd/scripts/target/stm32f1x_stlink.cfg
  • run in separate terminal:
telnet localhost 4444
reset halt; flash write_image erase binary.elf; reset run

  • automatic programming from script:
openocd -f /usr/share/openocd/scripts/interface/stlink-v2.cfg \
        -f /usr/share/openocd/scripts/target/stm32f1x_stlink.cfg \
        -c init -c "reset halt; flash write_image erase binary.elf; reset run; shutdown"

init command is imporant, all other commands works only after init call

stm32f103_projects's People

Contributors

metametaclass avatar kristinaetc avatar sagb avatar

Watchers

James Cloos 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.