Code Monkey home page Code Monkey logo

edbg's Introduction

Build Status

CMSIS-DAP programmer (Formerly Atmel EDBG programmer)

This is a simple command line utility for programming ARM-based MCUs (currently only Atmel) through CMSIS-DAP SWD interface. It works on Linux, Mac OS X and Windows. It was tested with Atmel mEDBG- and EDBG-based boards, Atmel-ICE, LPC-Link2 and IBDAP.

Installation

Binary releases can be downloaded here. Binary releases are not tested, they are a result of automated build process.

If you want to build from the source code, simply run make all and you will get a small binary, called edbg.

Dependencies

The dependencies are minimal. In addition to normal development tools (GCC, make, etc) you will need:

  • Windows: none
  • Linux: libudev-dev
  • Mac OS X: libhidapi (built automatically by a Makefile)

Usage

Usage: edbg [options]
Options:
  -h, --help                 print this help message and exit
  -b, --verbose              print verbose messages
  -e, --erase                perform a chip erase before programming
  -p, --program              program the chip
  -v, --verify               verify memory
  -k, --lock                 lock the chip (set security bit)
  -r, --read                 read the contents of the chip
  -f, --file <file>          binary file to be programmed or verified; also read output file name
  -t, --target <name>        specify a target type (use '-t list' for a list of supported target types)
  -l, --list                 list all available debuggers
  -s, --serial <number>      use a debugger with a specified serial number
  -c, --clock <freq>         interface clock frequency in kHz (default 16000)
  -o, --offset <offset>      offset for the operation
  -z, --size <size>          size for the operation
  -F, --fuse <options>       operations on the fuses (use '-h fuse' for details)
Fuse operations format: <actions>,<index/range>,<value>
  <actions>     - any combination of 'r' (read), 'w' (write), 'v' (verify)
  <index/range> - index of the fuse, or a range of fuses (limits separated by ':')
                  specify ':' to read all fuses
                  specify '*' to read and write values from a file
  <value>       - fuses value or file name for write and verify operations
                  immediate values must be 32 bits or less

Exact fuse bits locations and values are target-dependent.

Examples

> edbg -bpv -t atmel_cm7 -f build/Demo.bin
Debugger: ATMEL EDBG CMSIS-DAP ATML2407060200000332 02.01.0157 (S)
Target type: Cortex-M7
Target: SAM V71J21
Programming....,.. done.
Verification....... done.

Fuse operations:

  -F w,1,1                -- set fuse bit 1
  -F w,8:7,0              -- clear fuse bits 8 and 7
  -F v,31:0,0x12345678    -- verify that fuse bits 31-0 are equal to 0x12345678
  -F wv,5,1               -- set and verify fuse bit 5
  -F r,:,                 -- read all fuses
  -F wv,*,fuses.bin       -- write and verify all fuses from a file

edbg's People

Contributors

ataradov avatar ooxi avatar aethaniel avatar prices avatar ant9000 avatar ragkousism avatar dylad avatar loiclefort avatar vac avatar untaugh avatar silseva avatar daniel-k avatar 5im000n avatar oleszczyk avatar mariorose avatar sarlacii avatar jeremysf avatar techaumnu avatar diamondo25 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.