Thanks for this, Mick! I've been toying with an SAML21 for some time and they're a bit different than the AVR chips of yore. I am looking forward to your next video! Don't delay!
SAMLs are nice. They can sip only 4uA on idle, (with RTC going). A nice chip. They are very different to the AVRs. So, getting it going without the Arduino IDE is really a learning curve.
Very nice and feature full as usual. Jumping out from the usual IDE's / Arduino environment for the first time can be pretty scary. Just to add a little for debuggers / JTags I have used with success the STLinkV2 and the Tin Can Tools Flyswatter2 with openOCD out of the box.
Hi... Do you know if it is possibble to burn a bootloader in a SAMD21G with a raspberry pi3, to use the final board with Atmel Studio insted of using Arduino IDE?
@@MickMake Please make a video on this, the official ICE is prohibitively expensive for just casually messing around, meanwhile, I've got a stack of Pi's
Finally I could do this, burn a bootloader into my samd21, it's pretty easy, you can find a tutorial in adafruit about openOCD, they explain in detail how to burn a bootloader with a raspberry pi, casually they burn the arduino bootloader into a samd21g18a...you only need to be sure which are your SWD pins in your own samd21 board and in your raspberry.... There is also a small thing different from the adafruit tutorial and it's that in some point it seems to go nowhere you have to open another command window and write "telnet localhost 4444" and in there you can write the commands to erase the chip, turn off the protections to write the bootloader program you .bin or .hex into your chip turn on the bootloader protections again and reset the chip, it's almost everything. I had the opportunity to burn the microchip bootloader version to work with samba monitor, but I don't have enough knowledge about registers and mapping memories so I decided to use Arduino bootloader, the main thing is that you SHOULD use the external 32kHz oscillator, if you don't put it in your PCB, it won't work at all, trust me, I have done that and it's a headache to try to figure it out...
OpenOCD allows you to interface to a bucket load of on-chip debuggers and program flash. In terms of advantages over Atmel Studio? Well, it's a different thing. This method shows you a very simple way of getting your code onto the SAM MCUs without having to go through all the Atmel Studio bloatware. For some; useful if you want to load up a boot-loader and then start using an IDE, or you can continue on using it.
Oy Mick, you may want to consider using Red Hat Linux as it has functions to probe hardware that Debian doesn't. I've found it massively helpful in creating drivers for some of my PCI projects for custom interface boards. It's been ages since I did that last and I think it's "finger" but I don't remember off the top of my head. I think you find the device's port ID then finger that address. I'm not sure that's 100% correct but I know it's possible. Once sent the command reads the hardware ID and returns all the information that it finds. This is especially useful when trying to install the right driver or make one of your own. This should work equally well with what you're trying to do there. That's why I switched to Red Hat instead of Debian, Gnome, or KDE.
BeyElder how low cost? Adafruit feather m0 are generally under 30 USD including an additional feature like wifi, Bluetooth, or SD card slot. If that's too expensive, Teensy LC can be bought for 15 USD or so.
well... stm32's on aliexpress is under $2. so i expected at least something under $10. for $9 it is already OrangePi Zero 512, which a lot more, than SAM. i just don't understand - which segment of market their targets.
+BeyElder The MCU market is for serious real-time apps that don’t need or don’t want any O/S getting in the way. Since there’s no O/S in the way there’s less complexity and reliability increases. For the casual Maker, an SBC is good enough, but having to wait 20 seconds for an O/S to boot before your code starts isn’t acceptable in most real-time apps.
thanks for answer! so, there are no cheap boards with SAM to play (for me), thats pity. (btw, i use both atmel & orange )) know how they are works )) )
+BeyElder Unfortunately the cost of the cheapest SAMDs are around $1.08 @ 1k quantities. So it doesn’t leave much profit margin when selling it for even around $5/each.
Ha ha. That was a brain fart typo when I wrote the script and I didn't think about it when I was shooting and it was too late once I shot to go back and re-shoot.
Hi! Could you please explain the difference between Atmel-ICE, Atmel-ICE-basic and SAM-ICE debuggers? I can't understand which one to buy. Also do I understand correctly that if the debugger maximum clock is 12 Mz then I can't debug chips which runs on higher frequency?
Yup, I haven't quite figured out a good way of publishing the website article just for Patreon supporter early video release. I'll publish it soon though!
With next weeks video, Are you going to program a Pi without linux being on the Pi ? If wish I could program a Pi just like these magic MCU's. I want to be able to make software for Pi hardware with no linux in sight. I am not anti-linux, don't get me wrong there. I just don't any OS ruling my software.
You may want to look at an RTOS then, the PI is very big iron so why go through the hassle of no OS?. Its not ruling it at all, its just presenting everything from the phy layers up the stack to userspace in a sane manner, you just right your app and done.
I like not having to deal with uncertain software. I have looked at RTOS, looks like a nightmare to me. I just want to be able to write programs that use many Meg of RAM and have uninterrupted code execution if need be. The Pi's would be great for me if I can use them as close to an Arduino as possible. I'm not an advanced programmer, So ditching the OS for library's would suit me better for many crappy reasons. eg, What if I wanted to read a pin at full speed for minutes at a time, just to look for a single change of some kind. I would need to turn interrupts off, This will break any OS right ?
+ProCactus The Pi can toggle bits much faster than any Arduino. So even with all that extra stuff running you wouldn’t notice the occasional hiccup. If you really do need no other process interrupting, you could replace “init” with your program. Very easy thing to do, and you’d only ever have that one process running. A lot embedded systems, (routers, gateways), do this already. The only catch is that you’d have to implement a lot of the initialisation that occurs during init.
Thank you so much for this video Mick! With your tutorial, I was able to get my code up on running on the ATSAMC21! Was there ever a follow up to this where you did the programming on a Raspberry Pi, rather than an Atmel-ICE?
I have SAME70 XPLAINED board. I am using MPLABX IDE with Harmony v3 peripheral libraries. I have written a simple uart program using harmony v3 framework and genertaed the hex file. I programmed the hex file using MPLAB IPE. THEN I PLUGGED THE J200 JUMPER ON THE BOARD. THIS JUMPER IS CHIP ERASE. after that board is non responsive on any of the programming tool. Neither on IPE NOR ON onbarad EDBG. Some data sheets say that controller is in deep sleep mode. Can someone tell how to solve this problem
Very interested in your take on the latest/greatest rPi bitbang method of a building a DIY JTAG device. I found this: learn.adafruit.com/programming-microcontrollers-using-openocd-on-raspberry-pi using "./configure --enable-sysfsgpio --enable-bcm2835gpio" to get the pi's I/O pins ready to interface. It would be GREAT to have a Pi Zero hat that does ISP/PDI/JTAG ... and maybe even the high-voltage-reset protocols. So many rabbit holes to hell, so little time.
+GnuReligion Yup, would be nice. I think a lot of people are turned off with bit banging, but really a lot of early ICE would use it and if implemented properly is waaay cheaper and easier to fix should something go wrong.
Thanks for this, Mick! I've been toying with an SAML21 for some time and they're a bit different than the AVR chips of yore. I am looking forward to your next video! Don't delay!
SAMLs are nice. They can sip only 4uA on idle, (with RTC going). A nice chip. They are very different to the AVRs. So, getting it going without the Arduino IDE is really a learning curve.
The more MickMake shows his talents, the more I wonder if he once used to be a hacker.
+Harry Svensson
Well, yes, sad but true. I once was a hacker, (aka white hat terminology), but still a hacker, (as in “make things work”).
+Mike Meyer
Sadly... yes...
Just what I needed, thanks from Colorado.
Very nice and feature full as usual. Jumping out from the usual IDE's / Arduino environment for the first time can be pretty scary. Just to add a little for debuggers / JTags I have used with success the STLinkV2 and the Tin Can Tools Flyswatter2 with openOCD out of the box.
+Nigel Sollars
Yup, it can be scary for newbies. It’s not as bad as that though.
I tried this out, but running openocd after creating the config file, I get a buffer overflow error. any idea what I'm doing wrong?
Hi... Do you know if it is possibble to burn a bootloader in a SAMD21G with a raspberry pi3, to use the final board with Atmel Studio insted of using Arduino IDE?
Absolutely you can. Do you want a video?
@@MickMake Yes, It would be incredible... :)
@@MickMake Please make a video on this, the official ICE is prohibitively expensive for just casually messing around, meanwhile, I've got a stack of Pi's
Finally I could do this, burn a bootloader into my samd21, it's pretty easy, you can find a tutorial in adafruit about openOCD, they explain in detail how to burn a bootloader with a raspberry pi, casually they burn the arduino bootloader into a samd21g18a...you only need to be sure which are your SWD pins in your own samd21 board and in your raspberry.... There is also a small thing different from the adafruit tutorial and it's that in some point it seems to go nowhere you have to open another command window and write "telnet localhost 4444" and in there you can write the commands to erase the chip, turn off the protections to write the bootloader program you .bin or .hex into your chip turn on the bootloader protections again and reset the chip, it's almost everything. I had the opportunity to burn the microchip bootloader version to work with samba monitor, but I don't have enough knowledge about registers and mapping memories so I decided to use Arduino bootloader, the main thing is that you SHOULD use the external 32kHz oscillator, if you don't put it in your PCB, it won't work at all, trust me, I have done that and it's a headache to try to figure it out...
Excellent installation run through. I'm not so familiar with OpenOCD, what advantages does it bring over Atmel Studio v7?
OpenOCD allows you to interface to a bucket load of on-chip debuggers and program flash. In terms of advantages over Atmel Studio? Well, it's a different thing.
This method shows you a very simple way of getting your code onto the SAM MCUs without having to go through all the Atmel Studio bloatware. For some; useful if you want to load up a boot-loader and then start using an IDE, or you can continue on using it.
1:06 "Arduino Ice" ??? Don't you mean Atmel Ice ?
Oy Mick, you may want to consider using Red Hat Linux as it has functions to probe hardware that Debian doesn't. I've found it massively helpful in creating drivers for some of my PCI projects for custom interface boards. It's been ages since I did that last and I think it's "finger" but I don't remember off the top of my head. I think you find the device's port ID then finger that address. I'm not sure that's 100% correct but I know it's possible. Once sent the command reads the hardware ID and returns all the information that it finds. This is especially useful when trying to install the right driver or make one of your own. This should work equally well with what you're trying to do there. That's why I switched to Red Hat instead of Debian, Gnome, or KDE.
hmmm... Mick, tell, is there a low cost boards with Atmel SAM, just like Arduino?
BeyElder how low cost? Adafruit feather m0 are generally under 30 USD including an additional feature like wifi, Bluetooth, or SD card slot. If that's too expensive, Teensy LC can be bought for 15 USD or so.
well... stm32's on aliexpress is under $2. so i expected at least something under $10. for $9 it is already OrangePi Zero 512, which a lot more, than SAM. i just don't understand - which segment of market their targets.
+BeyElder
The MCU market is for serious real-time apps that don’t need or don’t want any O/S getting in the way. Since there’s no O/S in the way there’s less complexity and reliability increases.
For the casual Maker, an SBC is good enough, but having to wait 20 seconds for an O/S to boot before your code starts isn’t acceptable in most real-time apps.
thanks for answer! so, there are no cheap boards with SAM to play (for me), thats pity. (btw, i use both atmel & orange )) know how they are works )) )
+BeyElder
Unfortunately the cost of the cheapest SAMDs are around $1.08 @ 1k quantities. So it doesn’t leave much profit margin when selling it for even around $5/each.
What's Arduino ICE? (1:06)
Ha ha. That was a brain fart typo when I wrote the script and I didn't think about it when I was shooting and it was too late once I shot to go back and re-shoot.
Hi! Could you please explain the difference between Atmel-ICE, Atmel-ICE-basic and SAM-ICE debuggers? I can't understand which one to buy. Also do I understand correctly that if the debugger maximum clock is 12 Mz then I can't debug chips which runs on higher frequency?
Thanks for sharing 😀👍
Thanks Mick. You going to cover specifically installing an Arduino boot loader?
Sound like a good idea for another video.
where is the Raspberry Pi video?
Is there a video yet on doing this with a Raspberry Pi?
Sounds like I need to publish one.
Hey Mick,
FYI ... the "Moe info" link on YT appears to be broken
Yup, I haven't quite figured out a good way of publishing the website article just for Patreon supporter early video release. I'll publish it soon though!
MickMake I see it's fixed now (tick)
Can I flash a ATSAMD21E18A-U with Rapberry Pi Zero by this way?
Absolutely!
excelent Mick Thanks a lot.!
With next weeks video, Are you going to program a Pi without linux being on the Pi ?
If wish I could program a Pi just like these magic MCU's. I want to be able to make software for Pi hardware with no linux in sight.
I am not anti-linux, don't get me wrong there. I just don't any OS ruling my software.
You may want to look at an RTOS then, the PI is very big iron so why go through the hassle of no OS?. Its not ruling it at all, its just presenting everything from the phy layers up the stack to userspace in a sane manner, you just right your app and done.
I like not having to deal with uncertain software. I have looked at RTOS, looks like a nightmare to me.
I just want to be able to write programs that use many Meg of RAM and have uninterrupted code execution if need be. The Pi's would be great for me if I can use them as close to an Arduino as possible.
I'm not an advanced programmer, So ditching the OS for library's would suit me better for many crappy reasons.
eg, What if I wanted to read a pin at full speed for minutes at a time, just to look for a single change of some kind. I would need to turn interrupts off, This will break any OS right ?
+ProCactus
The Pi can toggle bits much faster than any Arduino. So even with all that extra stuff running you wouldn’t notice the occasional hiccup.
If you really do need no other process interrupting, you could replace “init” with your program. Very easy thing to do, and you’d only ever have that one process running.
A lot embedded systems, (routers, gateways), do this already. The only catch is that you’d have to implement a lot of the initialisation that occurs during init.
Thank you so much for this video Mick! With your tutorial, I was able to get my code up on running on the ATSAMC21! Was there ever a follow up to this where you did the programming on a Raspberry Pi, rather than an Atmel-ICE?
how does one do this with a raspberry pi instead???
I have SAME70 XPLAINED board. I am using MPLABX IDE with Harmony v3 peripheral libraries.
I have written a simple uart program using harmony v3 framework and genertaed the hex file. I programmed the hex file using MPLAB IPE. THEN I PLUGGED THE J200 JUMPER ON THE BOARD. THIS JUMPER IS CHIP ERASE.
after that board is non responsive on any of the programming tool. Neither on IPE NOR ON onbarad EDBG. Some data sheets say that controller is in deep sleep mode. Can someone tell how to solve this problem
I would like to code and program stm32f103c8 without an IDE. I hope I find a video about that someday.
Check libopencm3 project along with stlink programmer. Easy as.
The board has SAME70Q21B mcu
Wow that's complex. Somebody should write an app that takes care of getting that right. (If I only had the time...)
Not so complex! :-D
Very interested in your take on the latest/greatest rPi bitbang method of a building a DIY JTAG device. I found this: learn.adafruit.com/programming-microcontrollers-using-openocd-on-raspberry-pi using "./configure --enable-sysfsgpio --enable-bcm2835gpio" to get the pi's I/O pins ready to interface. It would be GREAT to have a Pi Zero hat that does ISP/PDI/JTAG ... and maybe even the high-voltage-reset protocols. So many rabbit holes to hell, so little time.
+GnuReligion
Yup, would be nice. I think a lot of people are turned off with bit banging, but really a lot of early ICE would use it and if implemented properly is waaay cheaper and easier to fix should something go wrong.
Who uses vim in 2017…
+suraj bhawal
Oh no. I haven’t started another Vi vs Emacs war, have I?
Everybody I know who's working on *nix -- just about every day.
Madscientist Microneil our first contender has joined the fight.
Emacs is just a mail client. :-D
You're just using Vi because you don't know how to quit it.... XD