Tiny Safe Boot on newer ATtiny's ???

Go To Last Post
8 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I am looking for a boot loader for a new project.  TSB looks perfect.  Had it up and running in no time on an older board here with a ATmega48pa, which is really more like a tiny as it lacks boot specific stuff.  

 

My challenge is that I need to use this on the brand new ATtiny816 which isn't on the TSB list of supported parts so it won't auto generate the object code.  The download package does include the full source for the executable and it doesn't appear too challenging to update.  Just wondering if anyone has used TSB with a part not on the official list and what the general process was like.

 

I suppose I could consider other boot loaders but this hit all the right buttons except for tiny816 support.

 

Dave

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

TSB apparently is "Tiny Safe Boot". Which I would not have guessed without re-reading the title.

http://www.jtxp.org/tech/tinysaf...

In this context TSB is not one of the following:

TSB	Technology Strategy Board (UK)
TSB	Technical Service Bulletin
TSB	Transportation Safety Board of Canada
TSB	TPS (Thermal Protection System) Sample Box
TSB	Telecommunication Standardization Bureau
TSB	Trypticase Soy Broth (microbiology growth medium)
TSB	Tecnologías para la Salud y el Bienestar (Spanish)
TSB	Trustee Savings Bank
TSB	Total Serum Bilirubin
TSB	Tecmo Super Bowl (video game)
TSB	Telecommunications Systems Bulletin
TSB	Technical Support Branch (National Hurricane Center)
TSB	Transportation Support Battalion
TSB	Technical Security Branch (RCMP; Canada)
TSB	Training Support Battalion
TSB	Training Support Brigade
TSB	Traffic Safety Board
TSB	Termination Status Block
TSB	The Silent Ballet (website)
TSB	Technical Services Building
TSB	Textiles Surveillance Body
TSB	Transportation Services Branch
TSB	Toronto School of Business
TSB	Telecommunications Standardization Board
TSB	Time-Share-Börse
TSB	Trunk Signaling Buffer
TSB	Theater Staging Base
TSB	Thrift Savings Bank
TSB	Track Suit Bottom
TSB	Technology Systems Branch (India)
TSB	Technical Staffs Branch (UK)
TSB	Telecom Support Board (NASA)
TSB	Truth Supervenes on Being (philosophy)
TSB	Tangential-Sphere Bound
TSB	Tall Shiny Building
TSB	Tepid Sponge Bath (fever management)
TSB	Telecommunications Standard Block
TSB	Twin Side Band
TSB	Transmission Synchronizer Brake
TSB	Towed Sonar Buoy
TSB	Transportation Service Bulletin
TSB	Thrust Sector Blower
TSB	Transmit Silence Bit
TSB	Tepper School of Buisness
TSB	The Spiriting Board
TSB	Texas State Bank
TSB	Technology Solutions for Business (Westlake, OH)
TSB	Tech Support Bulletin (various companies)
TSB	True Soulja Boyz (band)
TSB	Technology Services Board (various locations)
TSB	The Service Business (UK)

Doing magic with a USD 7 Logic Analyser: https://www.avrfreaks.net/comment/2421756#comment-2421756

Bunch of old projects with AVR's: http://www.hoevendesign.com

Last Edited: Sat. Aug 5, 2017 - 02:07 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, OK.  Maybe I shouldn't have assumed everyone would read the title?  smiley.   I was deliberately trying to be concise and thought one instance of the full name was adequate.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So what is it in TSB that dictates what devices it "supports". I can't think there can be that much in a bootloader that is device dependent apart from section sizes?
.
I had a look at the ZIP file, it looks like it's only the include that changes.

Last Edited: Sat. Aug 5, 2017 - 03:19 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
I had a look at the ZIP file, it looks like it's only the include that changes.
And I had a look at the ATtiny816 datasheet. It is much more than that. The Flash programming is different. There is no SPM instruction, instead there is a NVM-controller with a set of registers to accomplish that task. And the ATtiny816 has a BOOT section, but it is at the start of the Flash. I have no idea how that works with other details like the vector table.

Stefan Ernst

Last Edited: Sat. Aug 5, 2017 - 04:24 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Oh it's these "tiny Xmega" things is it? In that case I suppose all bets are off. But if Atmel have added a new bootloader scheme you'd have thought there'd be an app note to explain it? Or maybe there's some example code in ASF/Start?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
Or maybe there's some example code in ASF/Start?
Yes

http://start.atmel.com/#examples/boot

...

STK500 Serial Bootloader Tiny817

...

 

(open its User Guide)

...

Out-of the box, the bootloader will have a code size of approximately 1432 bytes (may vary slightly depending on the version of the compiler you are using). This is using the standard -O1 optimization used by Studio.

To reduce the code size, do the following:

...

This should reduce the code size to approximately 502 bytes. Since we now have reduced the size of the bootloader, we can configure the application section to be larger by:

...

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Someone else had suggested the Atmel START code.  I will give it a look.  

 

I was intrigued by the pre-built bootloader images that TSB can generate.  Select the Part type, Select RXD/TXD pins.  Run the command line tool and you are done.  I had that up an running in no time on a mega48 board this morning.

 

If there was some easy to to use an existing TSB target or easily modify the thing I thought I would give it a try. It sounds like they might be using the ATmega boot stuff, but even that doesn't look to be the case.

 

The Atmel example might not be too bad.  Will give it a look tomorrow.   Appreciate the comments.

 

Dave