Code Monkey home page Code Monkey logo

yhua123 / mbed-make Goto Github PK

View Code? Open in Web Editor NEW

This project forked from calebreister/mbed-make

0.0 2.0 0.0 848 KB

This repo contains a makefile project that links in the ARM mbed and mbed-rtos libraries. It requires that users supply their own copies of each library. Mainly, this was a practice project for me. It demonstrates how to create a fairly generic multi-directory makefile. I will probably use a very similar configuration in future projects.

License: MIT License

Makefile 80.30% GDB 8.99% C++ 10.71%

mbed-make's Introduction

!Certified to work on my machine

Introduction

This project is designed as a template for a multi-directory ARM makefile project that also links to the mbed and mbed-rtos libraries. I tried to keep the build system fairly simple, but at the same time I wanted to keep everything neatly organized. The table below explains the contents of each top-level folder.

Folder Description
debug Debugging symbols and binaries from the compiled project
lib Libraries that will be linked in or compiled as part of the project
obj Destination for all intermediate object files
release Binaries compiled without debugging symbols, size-optimized by default
scripts Scripts used during the build process (see below)
src Source code

Obtaining copies of mbed and mbed-rtos

I have not included copies of mbed and mbed-rtos with this project directly because up-to-date versions are easily obtainable from the mbed website. The links above provide access to the downloads. If you have an mbed account (which is free), you can download mbed as a Mercurial repository, which can be more convenient in some cases. Otherwise, anyone can download the zip or gz files for the current versions.

Using the Makefile

At the top of the makefile, there are several user-configurable parameters designed to enable the Makefile to be easily portable.

Variable Description
PROJECT Project name, used to name the binary
TARGET Target board/device to use
DEBUG 1 => compile with debugging symbols; 0 => compile with -Os

There are also a variety of rules that help with project management and debugging...

Rule Description
clean Deletes automatically generated files (object files, logs, ...) and reverts submodules to their last commit
update Pulls lastest changes in submodules
size Outputs the size of the most recently compiled code
flash Writes current binary to micrcontroller flash
gdb Invokes gdb with the appropriate arguments

mbed-make's People

Watchers

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