Code Monkey home page Code Monkey logo

msp-tool's Introduction

msp-tool

msp-tool is a command line tool for streamlining the write/compile/flash/debug cycle in MSP based flight controller firmwares.

It's regularly tested with both iNAV and Betaflight, but should work with any other MSP based firwmare.

Installation from source

msp-tool is under development, so there are no binary releases at this time. Instead, developers should install it from its source.

To do so, install Go in your system, then type the following command:

  $ go get -v github.com/fiam/msp-tool

msp-tool will be installed to ${GOPATH}/bin.

Using msp-tool

To start msp-tool, the only required argument is -p, which indicates the serial port it should open to connect to the flight controller. Once connected, it will print some information about the firmware and the board. For example:

$ msp-tool -p /dev/tty.usbmodem14211 

Connected to /dev/tty.usbmodem14211 @ 115200bps. Press 'h' for help.
MSP API version 2.1 (protocol 0)
INAV 1.9.0 (board OBSD, target OMNIBUSF4PRO)
Build 2bcdc237 (built on Feb 16 2018 @ 23:16:49)
[DEBUG] [     4.794] Barometer calibration complete (1931)
[DEBUG] [     5.413] Gyro calibration complete (-37, 23, -46)

msp-tool will automatically enable DEBUG_TRACE output from the FC and print all output to the terminal. Additionally, it supports keyboard shortcuts for the following functions:

  • h: Print the help with all the supported commands
  • q: Quit msp-tool
  • r: Reboot the board
  • f: Compile the firmware for the board, flash it and reboot (see Flashing below).

Flashing

msp-tool allows quickly rebuilding the firmware and flashing it to the board with a single keystroke via the f shortcut. To do so, you need to tell msp-tool a couple more things via command line arguments:

  • The root directory of the firmware source code, via the -s command line option. Its default value is . (the current directory), so it doesn't need to be provided if you're starting msp-tool from the same directory where the Makefile for the firmware is located.
  • The target name, via the -t command line option. Note that this is not needed in INAV 1.9+ and Betaflight 3.4+, since MSP_BOARD_INFO includes the target name and msp-tool automatically detects it.

For example:

  $ msp-tool -p /dev/tty.usbmodem14211 -s ~/src/inav -t OMNIBUSF4PRO

Note that flashing requires dfu-util to be present in your $PATH, since it's used to actually download the firmware into the flight controller.

Additional command line options

Call msp-tool with the -h argument to print a list of all the available command line options.

Getting in touch

I'm usually idling in both INAV's and Betaflights's Slack rooms as alberto. Feel free to send me a message if you'd like to discuss new features.

msp-tool's People

Contributors

fiam avatar silasb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

msp-tool's Issues

ubuntu 22.04 + go1.21.3 + latest git code = error

How to handle this issue, any guide or suggestion?

daniel@palfocus:~/iNavFlight$ go version
go version go1.21.3 linux/amd64
daniel@palfocus:~/iNavFlight$ go get -v github.com/fiam/msp-tool
go: go.mod file not found in current directory or any parent directory.
        'go get' is no longer supported outside a module.
        To build and install a command, use 'go install' with a version,
        like 'go install example.com/cmd@latest'
        For more information, see https://golang.org/doc/go-get-install-deprecation
        or run 'go help get' or 'go help install'.

"out of band MSP" it might be out of date.

$ ~/go/bin/msp-tool -p /dev/ttyUSB0 -t AOCODARCF435V2
Connected to /dev/ttyUSB0 @ 115200bps. Press 'h' for help.
out of band MSP byte 0x42
out of band MSP byte 0x82
out of band MSP byte 0x79
out of band MSP byte 0xbb
out of band MSP byte 0x46
out of band MSP byte 0xa1
out of band MSP byte 0x4a
out of band MSP byte 0xce
out of band MSP byte 0x4a
out of band MSP byte 0x22
out of band MSP byte 0x4a
out of band MSP byte 0x25
out of band MSP byte 0x75
out of band MSP byte 0x33
out of band MSP byte 0x4a
out of band MSP byte 0xd7
out of band MSP byte 0x4e
out of band MSP byte 0x69
out of band MSP byte 0x4e
out of band MSP byte 0x86
out of band MSP byte 0x42
out of band MSP byte 0xc0
out of band MSP byte 0x7b
out of band MSP byte 0xc5
out of band MSP byte 0xfb
out of band MSP byte 0xc2
out of band MSP byte 0x10
out of band MSP byte 0xea
out of band MSP byte 0xec
out of band MSP byte 0x21
out of band MSP byte 0xdc
out of band MSP byte 0x42
out of band MSP byte 0x06
out of band MSP byte 0x61
out of band MSP byte 0x61
out of band MSP byte 0x73
out of band MSP byte 0x23
out of band MSP byte 0x46
out of band MSP byte 0x02
out of band MSP byte 0x73
out of band MSP byte 0x64
out of band MSP byte 0xa9
out of band MSP byte 0x42
out of band MSP byte 0x4e
out of band MSP byte 0x4a
out of band MSP byte 0xc2
out of band MSP byte 0x42
out of band MSP byte 0x86
out of band MSP byte 0x21
out of band MSP byte 0xb7
out of band MSP byte 0x85
out of band MSP byte 0x42
out of band MSP byte 0xca
out of band MSP byte 0x42
out of band MSP byte 0x46
out of band MSP byte 0xf7
out of band MSP byte 0xc3
out of band MSP byte 0x42
out of band MSP byte 0x82
out of band MSP byte 0xa1
out of band MSP byte 0xbc
out of band MSP byte 0x42
out of band MSP byte 0x82
out of band MSP byte 0xa1
out of band MSP byte 0xcf
out of band MSP byte 0xbc
out of band MSP byte 0x5a
out of band MSP byte 0xfe

图片

INAV 6 support

Hi!
Are you planning to support INAV6 and MSPv2?
Is it possible to upload FC firmware without resetting the config (EEPROM)?

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.