Coder Social home page Coder Social logo

msp430-vagrant's Introduction

Vagrant Environment for Compiling and Simulating MSPFRXX Code

This repo contains a Vagrant virtual machine environment to compile C code for MSP430 target. The virtual machine comes with:

Installation steps

  • Install Vagrant environment.

  • Clone this repository:

      git clone https://github.com/sinanyil81/mspsim-vagrant.git
    

Running the virtual machine

  • After clomning this repository, change your directory: $ cd mspsim-vagrant
  • $ vagrant up creates the VM for the first time (it might take some time)
  • $ vagrant ssh lets you log into the VM

Building SIREN Instruction Level Simulator

  • In the virtual machine, change directory: $cd /vagrant. This directory (in the virtual machine) is shared between your host machine and the virtual machine. It includes the cloned repository. Any change you do in your host machine is accesible in the virtual machine, or vice versa.

  • Compile SIREN by performing the following steps:

      $ cd mspsim
      $ make
      $ make jar
    

Compiling application C code and sample firmware

  • Place your application code (C code) that is targeted for the MSP430FR6989 platform in the virtual machine and compile it using msp430-elf-gcc to output the firmware file, e.g., main.out.

  • Alternatively, on your host machine, you may want to install Code Composer Studio (CCS) Integrated Development Environment (IDE) CCSTUDIO that helps you to compile your C application using TI GCC for MSP430. You can also install TI GCC for MSP430s on your host to compile your C application. After compilation, place the firmware file, e.g., main.out, into mspsim directory.

  • There are also sample C programs targeting MSP430FR6989 in mspsim/firmware/ directory. You can compile these applications in the virtual machine, as an example:

      $ cd firmware/sense_and_send
      $ cd static
      $ make
    

that outputs main.out

Running the simulator

  • In order to simulate your application code, e.g., firmware/sense_and_send/main.out:

      $ cd /vagrant/mspsim
      $ make run FIRMWAREFILE=firmware/sense_and_send/main.out
    
  • You can write stop to stop simulation.

  • You can write profile to see the profiling information of the functions, i.e., how many cycles it took to execute the corresponding functions in the applicaion.

  • Check commands to see which commands are available for the simulator.

  • Modify mspsim/scripts/mayfly.sc file to configure the simulator.

msp430-vagrant's People

Contributors

sinanyil81 avatar

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.