Giter Club home page Giter Club logo

openmmc's Introduction

openMMC

Travis build status Open Source modular IPM Controller firmware

Installation:

The following packages are needed in your system in order to compile the firmware:

  • gcc-arm-none-eabi
  • cmake
  • cmake-gui (Optional)

gcc-arm-none-eabi can be installed from the pre-compiled files found at: https://launchpad.net/gcc-arm-embedded/+download or you can run the following command under Ubuntu:

sudo apt-get install gcc-arm-none-eabi

Next step is to clone this repository into your workspace.

git clone https://github.com/lnls-dig/openMMC

Compilation

Create a new folder wherever is suitable

cd <build_folder>

Run CMake using the path to the repository folder as an direct argument and the flag -DBOARD=<board_name> and -DVERSION=<board_version> to configure the compilation scripts to your specific board hardware

cmake <path_to_source> -DBOARD=<board_name> -DVERSION=<board_version>

Example:

cmake ~/openmmc/ -DBOARD=afc -DVERSION=3.1

After creating the build files with CMake, you can compile the firmware using make, optionally setting the VERBOSE flag to 1 if you wish to see all the compilation commands

make [VERBOSE=1]

Both a .axf file and a .bin file will be generated in the out folder. You can use any one you prefer to program your processor.

To clean the compilation files (binaries, objects and dependence files), just run

make clean

Programming

After creating the binaries, you can program them to your chip any way you want, using a JTAG cable, ISP Programmer, custom bootloader, etc. There are 2 program interfaces supported so far: LPCLink and LPCLink2 In order to select which interface will be used, include the flag -DDEBUG_PROBE=<probe_name> when running CMake (this option defaults to LPCLink).

cmake ~/openmmc/ -DBOARD=afc -DVERSION=3.1 -DDEBUG_PROBE=LPCLink2

LPCLink

If you own a LPCLink or LPCLink2 board, you can use it to program the LPC1764 processor via its JTAG interface

NOTE: In this case you must have the LPCXpresso installed in your machine, since we need to use the binaries for the interface chip on the LPCLink that they provide.

The CMake script should be able to find LPCXpresso path, but if this is not possible, open the <openMMC_root_folder>/CMakeLists.txt and change the following line

set(LPCXPRESSO_PATH <lpcxpresso_path>)

NOTE: You can also use cmake-gui to set this option.

To transfer only the application firmware, run

make program_app

To transfer only the bootloader firmware, run

make program_boot

If you want to erase the whole Flash and copy both firmwares:

make program_all

NOTE 2: We only have linker scripts to LPC1764 and LPC1769, so if you wish to compile to a different controller, you'll have to change the linker/lpc1764_boot.ld and linker/lpc1764_app.ld files, which defines the memory regions, otherwise you'll run into several HardFault errors.

openmmc's People

Contributors

aylons avatar henrique-silva avatar qermit avatar umairsiddiqui-digitek avatar

Watchers

 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.