Giter Site home page Giter Site logo

dsr_estc2019's Introduction

ESTC OS-les build system

Build system for ESTC OS-less tasks

Prerequisites

System reference

  • common_defs.mk -- file with many useful rules. Every makefile that builds something should include it and define BUILD_ROOT variable -- path to this file.
  • Makefile -- "main hub" for a project. Here you can add you workshop directories and call make on them. Take a look at the example lab1 target.
  • common -- directory with various common stuff like startup files and interrupt tables. It's compiled once as a static library libstmcommon.a and linked with every binary produced with the build system.
  • stm_spl -- Standard Peripherials Library form ST. It makes development much easier but with an overhead.
  • projects -- directory with workshops. Every workshop should be in a separate directory inside and should define its own makefile rules. Take a look at the led_test as an example.

Various notes

  • You can put worhskops git repository to projects directory.
  • It's possible to use helper commands from common_defs.mk to link your binaries. Example:
main: main.o
    @echo "Linking ELF"
    $(LINK_ELF)
    @echo "Making image"
    $(MAKE_IMAGE)

Debugging

If you have arm-none-eabi-gdb binary installed, then you can skip right to step 2 of this instruction. Otherwise, stat from the beginning

  1. Install gdb for ARM. In ubuntu:
    #> sudo apt install gdb-mutiarch
    
  2. Connect a board and use st-util to start a GB server on it:
    ?> st-util -m -p 4242
    
  3. Navigate to your project directory and launch gdb. For ubuntu:
    ?> gdb-multiarch main.elf
    
  4. Connect to a gdb server on board and load your binary:
    gdb> target extended-remote :4242
    gdb> load main.elf
    gdb> continue
    
    Tou can put those lines (omitting gdb> prefix) to the ~/.gbinit file.
  5. Press a reset on the board
  6. Debug normally. GDB reference: GDB refcard.

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.