0

Trinket M0 Bootloader modification? ++ KUDOS.
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Re: Trinket M0 Bootloader modification? ++ KUDOS.

by Govner on Wed Aug 15, 2018 2:50 am

Good morning.. sorry for late reply - it's 2AM and going strong but my hours are out-of-phase with most norms right now. All good though -- it's quiet & just me and Mr. Tinnitus.

>> May I ask what your working on that needs so many uP/s ? (Paraphrasing your question).

At the risk of sounding mysteriously slippery, please pardon me if I refrain from giving a direct answer. I once made the mistake on another "helpful" forum of laying out my methodology at an intermediate stage in development and man, oh, man did the woodwork come alive! Wow, yeah, hold on to your hat Thevenin!

If I do get this stuff working after over 6 months of constant attention, I will enjoy making a nice YouTube video, giving due credit of course, to folks like yourself who very generously offered helping hands. Thanks for that -- it's very much respected & appreciated.

Carry on comrades.
Govner

Govner
 
Posts: 73
Joined: Wed Sep 14, 2016 4:42 pm

Re: Trinket M0 Bootloader modification? ++ KUDOS.

by aaronaverill on Wed Aug 15, 2018 9:51 am

Sometimes the joy is in the journey, not the destination, which others may not appreciate. :)

Well you went for the M4, so that will have 2MB off chip flash, 2x the M0 flash (512K) and 6x the RAM (192K), so if that doesn't meet your needs, well... maybe scavenge the parts from a laptop... bwhahah.

You didn't say what kind of memory you need but there are other options such as SD card reader breakouts. And I hesitate to mention, but there are also articles online on how to replace the 2MB chip on the M0 series with an 8MB you can get from digikey or something, if you're willing to potentially burn it up, void the warantee, etc.

Sounds like fun!

aaronaverill
 
Posts: 80
Joined: Sun Jun 03, 2018 10:45 am

Re: Trinket M0 Bootloader modification? ++ KUDOS.

by aaronaverill on Wed Aug 15, 2018 10:00 am

By the way, below is a chart comparing the Adafruit SAMD board capabilities I made. I sort of got "burned" buying the trinket and not knowing it would be so neutered compared to my feather (I will go for itsy bitsy in the future).

Adafruit SAMD Boards.png
Adafruit SAMD Boards.png (17.23 KiB) Viewed 215 times

I wish Adafruit had a comparison chart like this on their website, front and center. An interactive one would be awesome - there are so many free options to build a webpage for that and pull from their product database... and they would have ended up selling me a higher priced product so it's win-win.

@webmaster - hopefully this request gets to you

aaronaverill
 
Posts: 80
Joined: Sun Jun 03, 2018 10:45 am

Re: Trinket M0 Bootloader modification? ++ KUDOS.

by adafruit_support_bill on Wed Aug 15, 2018 10:21 am

Thanks for the suggestion - and the chart. I will forward that to our web team.

adafruit_support_bill
 
Posts: 72719
Joined: Sat Feb 07, 2009 10:11 am

Re: Trinket M0 Bootloader modification? ++ KUDOS.

by aaronaverill on Wed Aug 15, 2018 12:46 pm

adafruit_support_bill wrote:Thanks for the suggestion - and the chart. I will forward that to our web team.


Yay!! I'm sure y'all are totally buried with stuff to do but there is a zen cart plugin for product comparison. Would be nice to filter your boards by processor, memory, other features like lipo charging. Would be great for selecting neopixels too. Great for search engine traffic as well :P

aaronaverill
 
Posts: 80
Joined: Sun Jun 03, 2018 10:45 am

Re: Trinket M0 Bootloader modification? ++ KUDOS.

by Govner on Wed Aug 15, 2018 6:02 pm

UPDATE: In my quest to have consistent uploading of sketches to the array of Trinket M0s that I have here, I identified the "good actor" among them and copied the CURRENT.UF2 file from it to all the others. BINGO. Even though the Serial Monitor port repetitive re-selection in the Arduino IDE menu is required, at least when I click the menu to UPLOAD sketches, all the Trinket M0s accept this without any further action from me. This I like. Some Trinket M0s had a very small .UF2 file on them and paging through the product introduction pages (beating off the snakes..ahmmmm..) I finally found good info about UF2 files. I don't understand the big picture of the F:/ virtual drive thing but I'm much happier with how the IDE is behaving than when I first tangled with these issues. So, I'm happy to report -- it's very workable now. Thanks.

Govner
 
Posts: 73
Joined: Wed Sep 14, 2016 4:42 pm

Re: Trinket M0 Bootloader modification? ++ KUDOS.

by Govner on Wed Aug 15, 2018 6:09 pm

aaronaverill wrote:
adafruit_support_bill wrote:Thanks for the suggestion - and the chart. I will forward that to our web team.


Yay!! I'm sure y'all are totally buried with stuff to do but there is a zen cart plugin for product comparison. Would be nice to filter your boards by processor, memory, other features like lipo charging. Would be great for selecting neopixels too. Great for search engine traffic as well :P



I was thinking this same thing the other day when I was looking at a product comparison checklist for an unrelated company. It sure makes things easy!! I, too, ordered some stuff and later read the details I'd missed. Thanks for the chart and time you spent on it.

Govner
 
Posts: 73
Joined: Wed Sep 14, 2016 4:42 pm

Re: Trinket M0 Bootloader modification? ++ KUDOS.

by aaronaverill on Wed Aug 15, 2018 6:40 pm

The Plot Thickens!!

When you plug in your trinket and double-click the RESET button on the board to get to the bootloader flash drive, what does the contents of the INFO_UF2.TXT file read? And do you have the CURRENT.UF2 backed up from your boards that weren't working.

I'm using custom builds of circuit python 3 which might effect my UF2 bootloaders, but my trinket looks like this:

Code: Select all | TOGGLE FULL SIZE
UF2 Bootloader v1.23.0 SFHR
Model: Trinket M0
Board-ID: SAMD21E18A-Trinket-v0

And my feather looks like this:

Code: Select all | TOGGLE FULL SIZE
UF2 Bootloader v2.0.0-adafruit.0-10-g3178c06 SFHWRO
Model: Feather M0
Board-ID: SAMD21G18A-Feather-v0

So it looks like I'm running an older bootloader on my feather. Maybe you are too.

You can get updated ones here:

https://github.com/adafruit/uf2-samdx1/ ... adafruit.5

All the code is there too. And it's open source. It looks like there has been development as recently as 1 month ago. So the behavior change you notice is probably due to code updates. Perhaps you would benefit from a newer UF2 bootloader? Backup the old one and try a release above.

EDIT: I updated my trinket to the latest and now it reads this:

Code: Select all | TOGGLE FULL SIZE
UF2 Bootloader v2.0.0-adafruit.5 SFHWRO
Model: Trinket M0
Board-ID: SAMD21E18A-Trinket-v0


EDIT #2: When I reflash my board with my circuit python UF2 it kept the same updated UF2 bootloader, so it seems to reside in different space.

EDIT #3: It looks like my trinket UF2 bootloader was from June 2017 and the latest update was May 2018 !! Ouch.

aaronaverill
 
Posts: 80
Joined: Sun Jun 03, 2018 10:45 am

Re: Trinket M0 Bootloader modification? ++ KUDOS.

by Govner on Wed Aug 15, 2018 10:22 pm

Good sleuthing there Inspector.

Yes, here is the current version loaded. I had verified this version as the latest and greatest via the product site.

Regarding your question of whether I have an older copy, I looked around my file system. I rarely keep old versions if the vendor issues new ones. So, we don't have anything to compare but I know just from the file size difference (old version of .uf2 was less than 30kb and this version is around 512k .. go figure. My automatic BackUP4All application has an incremental bkup of the file but I don't see the value of digging through that can of worms.

Here's what we both have, I suppose:


UF2 Bootloader v2.0.0-adafruit.5 SFHWRO
Model: Trinket M0
Board-ID: SAMD21E18A-Trinket-v0


Moving right along....

Govner
 
Posts: 73
Joined: Wed Sep 14, 2016 4:42 pm

Re: Trinket M0 Bootloader modification? ++ KUDOS.

by Govner on Sun Aug 19, 2018 1:20 pm

Hi aaronaverill,

I haven't heard from you for a while so here's just an FYI.

You know, I did purchase a couple of the ItsyBitsy Express M4s as suggested in hopes that it would be an easy expansion of the current board, Trinket MO (that I've really got working well now). But, not so fast with the M4. That is, I uploaded the sketch that compiles great on the Trinket MO but unfortunately pulls all sorts of exceptions/errors on the ItsyBitsy. So much for the drop-in solution to expansion.

Of course I did edit the sketch for an hour or so (pin changes etc.) but the problems are associated with libraries that ran fine on the SAMD21 but throw lots and lots errors on the SAMD51 board. In fact there are so many compiler warnings that I'm just going to stick with my present use of the MCP23017 expansion I set up for the Trinket MO and so, just shelf the Express M4 for now. I'm just not up for unraveling the spaghetti for my current flight simulation projects. I'm sure the M4 will come in handy down the road.

Thanks again for your interest and time.

Keep the press,
Gov

Govner
 
Posts: 73
Joined: Wed Sep 14, 2016 4:42 pm

Re: Trinket M0 Bootloader modification? ++ KUDOS.

by Govner on Sun Aug 19, 2018 2:56 pm

In the running commentary... I uncovered the culprit.. as it turns out, it's the FastLED library that throws all the errors. The following sketch will not compile on the M4:

#include <FastLED.h>

void setup(){
}
void loop(){
}

----------------------

However, substituting the <Adafruit_NeoPixel.h> library works fine. Comments by the author of FastLED have insights. I'll look for updates to the library or will have to re-write my original code. The Adafruit library is great also, but I like all the math functions of FastLED, that's all.

Just wanted to clear the air so as not to place uncertainty about the SAMD51 boards. Fair debugging, that's me.

Later all.
Gov

Govner
 
Posts: 73
Joined: Wed Sep 14, 2016 4:42 pm

Re: Trinket M0 Bootloader modification? ++ KUDOS.

by aaronaverill on Mon Aug 20, 2018 10:39 am

Aye! Judging from the fastled GitHub it looks like issues were raised just this week and there are some people looking into pin changes.

If the adafruit library is working, I guess there would be hints in the code sections pertaining to the SAMD51. Looking into that or passing it along to the developers might speed up support.

aaronaverill
 
Posts: 80
Joined: Sun Jun 03, 2018 10:45 am

Re: Trinket M0 Bootloader modification? ++ KUDOS.

by Govner on Sun Sep 23, 2018 2:20 pm

Sorry for the delayed reply.. I had overlooked your question as to what we are doing that needs the extra uProcessors. I also remembered that you are quite knowledgeable and perhaps you might offer a solution?

To your question as to why we use multiple uProcessors: Well, in a nutshell, FFT.

Please take a look at this post of the late development snafu that we encountered. This really surprised us having taken a great deal of care to do the initial fitness-for-purpose testing on the Trinket M0. If you do read this post and are interested, note the most important fact: There are two distinct groups. Each group of devices runs at its very own, stable, fixed CPU clock speed. This is NOT a RC or temperature or other such RANDOM variation. There MUST be a solution and I'm putting out feelers for the person who knows how to unify the value. Adding a 32.768 Khz OSC solves the problem but is unnecessary and impractical. Each GROUP is more than stable enough but we can't mix them. It's just that they are operating differently by a CONSTANT value of deviation. WHY? Often times, other forums are very long on the theoretical, guesses, and as if it were a lawnmower, "Try it again SAM!", If donating 1,000+ hours of personal time and dinero for pro bono developments for DIYers makes my request for a little help more palatable then maybe someone will offer some code, board library mod, whatever it takes to set these CPU clock values to ANY consistent value.

Thanks in advance if you happen to be the SAMD21 CPU-sans-XTAL clocking 'Messiah'. :-)

GOV

POST: viewtopic.php?f=52&t=141265

Govner
 
Posts: 73
Joined: Wed Sep 14, 2016 4:42 pm

Re: Trinket M0 Bootloader modification? ++ KUDOS.

by Govner on Mon Feb 11, 2019 3:54 pm

Whoops. Now I am the one who is apologizing. Sorry I just completely lost track of this thread. Despite the span of time, lots has been going on that will answer this question as to what I need all the micro-processors for. For about 9 months now, I have been doing a project for one my favorite nieces. There is a threat that pretty well covers the development process with photos and videos.

I am assembling the last of 11 units as we speak. My niece is traveling from VA to FL this week to come down and get the fruits of our 9-month efforts. I would love to do a Adafruit "Show and Tell" this Thursday before my niece gets here and takes these back to VA. The problem is I am not "camera ready". FaceTime works great but I don't think that's what's needed for the conference type of video format used. Thanks for suggesting it -- I'd love to do it -- but just don't have the studio savvy to pull it off I suppose.

Again, sorry for the late reply. Check my threat "Great Success with Trinket M0" if you would like to see the project.

Best,
Gov

Govner
 
Posts: 73
Joined: Wed Sep 14, 2016 4:42 pm

Re: Trinket M0 Bootloader modification? ++ KUDOS.

by Govner on Wed Feb 13, 2019 11:19 am

Here's a pretty good :50 second demo of the final outcome.

https://www.youtube.com/watch?v=42ZAsxhmuLA

Govner
 
Posts: 73
Joined: Wed Sep 14, 2016 4:42 pm

Please be positive and constructive with your questions and comments.