Giter VIP home page Giter VIP logo

chibios-bazel's Introduction

ChibiOS / Bazel Example

This repository contains a skeleton project that integrates ChibiOS with Bazel using the bazel-embedded for an STM32F4 target.

The board/configuration files are based on the RT-STM32F469I-DISCOVERY files form ChibiOS source tree.

Prerequisites

You'll need to have bazel on your machine. It's recommended to use bazelisk so that it can automatically load the correct version of bazel (from .bazelversion).

This has only been tested in a Linux environment (specifically Ubuntu 20.04)

To build the example

build //example --platforms=@bazel_embedded//platforms:cortex_m4_fpu

You'll end up with a binary at bazel-bin/example/example

$ readelf -h bazel-bin/example/example
ELF Header:
  Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
  Class:                             ELF32
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              EXEC (Executable file)
  Machine:                           ARM
  Version:                           0x1
  Entry point address:               0x8000241
  Start of program headers:          52 (bytes into file)
  Start of section headers:          151988 (bytes into file)
  Flags:                             0x5000400, Version5 EABI, hard-float ABI
  Size of this header:               52 (bytes)
  Size of program headers:           32 (bytes)
  Number of program headers:         4
  Size of section headers:           40 (bytes)
  Number of section headers:         34
  Section header string table index: 33

How to adapt this for your own project

You'll have to modify the following files:

  • board.h - board-specific configuration
  • chconf.h - ChibiOS configuration options
  • halconf.h - ChibiOS/HAL configuration options
  • STM32F4.ld - Linker script

chibios-bazel's People

Contributors

bsirang avatar

Stargazers

 avatar

Watchers

 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.