There is a project here on hackaday.io ( #MiniSam-Zero) which is using also a SAMD09. @Jeremy g. wrote also a bootloader for his project. And this boot loader can be also used for this board. In this log I will describe in short how. You should also take a look at Jeremy's project were he describes the usage of his bootloader in detail. For my needs I did also changed his bootloader a little bit: His and my boards are using different pins for a user LED. I did adapt his bootloader in this point.
I will only write additional notes here, Jeremy did a quite good job to describe the work flow in detail here.
Before you can use the bootloader you must flash your SAMD09 with it. For that you need some SWD-Programmer like the Atmel ICE or the Segger J-Link. you can either use the original bootloader from Jeremy or my modified version.
You can test if the bootloader is available by sending a 'i' to the SAMD09 over uart (115200 8N1) with some terminal program (I like Termite):
It should return some information (the green text).
Programs which you want to upload need to have an different start address. This can be set in Atmel Studio. For details see Jeremy's log.
After compiling your code you now should have a *.bin file somewhere in the output files. This file will be used by the bootloader's front end. This front end is some python2 script. If you did not used python before like me here are the steps I took (win7):
- Download python 2.x
- open a cmd window
- navigate to your python script path (like: C:\Python27\Scripts)
- activate pip (package manger) with: python -m pip install -U pip
- install pyserial with: pip install pyserial
Now you should be able to use Jeremy's uplaoder script. Just place it in the same directory as you *.bin file an execute it in this file like:
upload.py -c com10 -b 115200 -i Blink.binThe script asked you to rest the SAMD09 and asks if the boot led (with my modified bootloder the on board user LED) is on. The bootled is on if you are in bootloader mode. To get ther you have to pull down PA15 during reset or connect it to the DTR pin of the CH340 (2nd not test by me yet).
When the script is ready. Your program should run after a reset. You can find all files I used including a test *.bin file in my github repository. But all of Jeremy's stuff should also work (as long the programs are not to big for the smaller flash of the SOIC SAMD09).
If you do not get out of the bootloader-mode (LED is always on) connect PA15 to 3.3V during reset. This will happen if you use Jeremy's or an very early version of my modified bootloader.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
thanks for the mention :)
Are you sure? yes | no