Skip to content

development environment for ASMR SYSTEMS software/firmware

License

Notifications You must be signed in to change notification settings

asmr-systems/dev-environment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Development Environment

Getting Started

First, make sure that you have the following prerequisites installed:

On Linux,

sudo usermod -a -G vboxusers $USER  # grant VM access to USB devices
# log out and log back in for change to take affect

Now, you can start it up and log in

vagrant up   # could take 10 minutes while VM is built, you can eat a snack or something
vagrant ssh  # log into the VM

JTAG + Devboard Setup

  • make sure that the board itself is powered (plugged into wall wart or powered usb)! must have enough current (otherwise LEDs won't light)
  • J-Link Mini can be plugged into the powered USB port, but also needs enough current (otherwise its LED will blink rapidly)

JLinkExe (L-Link Commander)

To connect to the SAMD21 via J-Link Commander,

vagrant ssh
> JLinkExe
JLink> connect
device> ATSAMD21G18  # this is the name of our cpu.
TIF> S               # select 'S' (SWD) as the target interface.
Speed>               # default (4000kHz) seems fine.

Ideas

  • use OpenOCD instead of jlink for flashing (open source and configurable see this)
  • use UF2 bootloader (supports Mass Storage Bootloader (for end-users who want to update firmware) AND BOSSA Bootloader for programmatically flashing)
  • use BOSSA for updating firmware in development mode. (see this)
  • for final product, have a button which when double-tapped, puts the device in BOOTLOADER mode (see AdaFruit UF2 SAMD bootloader and Winterbloom's same thing)

BreadCrumbs [WIP]

!!!!! NOTE: "For CMSIS stuff you need to download ASF (still available as a standalone ZIP, I believe), disregard all the drivers stuff and just take header files. That will basically constitute all that Atmel has for CMSIS." see this look at AdaFruit's update from Atmel Start repo ALSO LLOOK AT this

Comparison of chips

Atmel MCUs

Next Steps

  1. Write test program to flash onto mcu (blink led in pattern) a. compile b. flash
  2. research OpenOCD + CMSIS + ASF
  3. write tools/process for: a. bootloading (writing a blank or possibly bricked device with a bootloader (UF2)) b. development programming (using BOSSA against UF2 bootloader) c. end-user firmware update via doubletapped button and usb.

Overview

Development Hardware:

FAQ

  • "why not use openOCD?" - technically, you can use a J-Link with openOCDbut according to this wiki page it is much slower than using the proprietary SEGGER J-LINK GDB Server.
  • "what is the device name when connecting via J-Link?" - ATSAMD21G18 (generally, search for names on here)

Inspiration & Acknowledgement

This development environment draws heavily on previous work by Mutable Instruments and Adafruit!

About

development environment for ASMR SYSTEMS software/firmware

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages