Pages: [1]   Go Down
Author Topic: Why the boat loader ?  (Read 1099 times)
0 Members and 1 Guest are viewing this topic.
Northants - UK
Offline Offline
Sr. Member
****
Karma: 1
Posts: 258
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm slightly confused as to what the boot loader is for. Surely all neccesary code can be loaded as the sketch and surely the chip doing the USB communication can emulate the ICSP ? Just wondering.

The reason i ask is i wonder if the platform will ever extend to smaller chips for more compact projects like the ATtiny's ?

The other thing I'm wondering is there are menu items in the IDE that refer to burning the boatloader to the MCU and loading the program with an AVRISCPII ? so potentially standalone projects could be more easily updated ?
Logged


Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 212
Posts: 13085
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The reason i ask is i wonder if the platform will ever extend to smaller chips for more compact projects like the ATtiny's ?

Yes.  For a few years now.  This should get you started...
https://www.google.com/search?q=arduino+attiny
Logged

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 76
Posts: 7307
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

A TTL USB adapter and a bootloaded ATMEGA is a simple recipe. I am not sure if you can program any TTL USB adapter to use ICSP header. Some probably could. If you program a small chip with an ICSP programmer or another Arduino Dev board, you will erase the original bootloader (if the small chip had one) and your code will take the entire Flash as needed. Remember, Arduino is not a project that is trying to cram a project into the smallest and cheapest chips, like an engineering product.
Logged


Fort Lauderdale, FL
Online Online
Faraday Member
**
Karma: 71
Posts: 6144
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Surely all neccesary code can be loaded as the sketch and surely the chip doing the USB communication can emulate the ICSP
The elegant solution you suggest isn't so elegant.

The "USB" would have to emulate a device.  What device will you emulate?  The nice thing about looking like a USB modem  is that you don't need any actual drivers developed for all major platforms.  If you emulate something proprietary, that advantage goes away.

So okay you decide to emulate a usbmodem and just make the chip smart enough to know when it is boot loading.  That's complicated.  Also it means you have to have multiple IO pins connected to two devices.  Then what happens when you want to use USB to speak serial to the chip?  How will the "bootloader chip" know?  To talk serial it has to communicate to different pins.  So you Send an escape sequence?  That's bound to cause problems eventually in code that inadvertently sends that escape.
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.c

Offline Offline
Edison Member
*
Karma: 37
Posts: 1355
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've worked on a couple of systems that didn't have one...  Typically, you'd have to BUY a hardware development system, a software development system, and maybe a separate programmer.  That's usually a few-hundred dollars, and it could run into thousands.   Oh...  You also need a power supply for the development board.

I was AMAZED that I could buy an Arduino (and nothing else), and in about 15 minutes I had compiled, uploaded, and was running the "blink LED" example.   That process usually takes about a day!   

Quote
Why the boat loader ?
smiley-grin smiley-grin It saves a boat load of time, trouble, and frustration.
« Last Edit: March 27, 2013, 04:27:09 pm by DVDdoug » Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 362
Posts: 17308
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The easiest method these days to program avr ATtiny processors using the arduino IDE (after modifying the IDE with the required ATtiny support files) is to utilize an inexpensive USBasp hardware programmer ($5) or using an arduino board running the arduinoISP sketch. Then develop your tiny sketch in the IDE and use the IDE file menu option of 'upload using programmer' to burn the sketch into the attached target ATtiny chip. So no bootloader code needed on the tiny.

Lefty
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 212
Posts: 13085
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Why the boat loader ?

At any given transfer rate, uploading through a bootloader is faster.
Logged

Northants - UK
Offline Offline
Sr. Member
****
Karma: 1
Posts: 258
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Why the boat loader ?

At any given transfer rate, uploading through a bootloader is faster.


really we worry about transfer rate for a few KB of data ?
Logged


Northants - UK
Offline Offline
Sr. Member
****
Karma: 1
Posts: 258
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The easiest method these days to program avr ATtiny processors using the arduino IDE (after modifying the IDE with the required ATtiny support files) is to utilize an inexpensive USBasp hardware programmer ($5) or using an arduino board running the arduinoISP sketch. Then develop your tiny sketch in the IDE and use the IDE file menu option of 'upload using programmer' to burn the sketch into the attached target ATtiny chip. So no bootloader code needed on the tiny.

Lefty


you validated my suggestion of using one avr as an isp programmer rather than as communicating with serial after using another programmer to "burn" a bootloader so that the chip can be programmed from a different software interface than the already hardware available ISP interface (bus)

So can the arduino IDE interface with the AVR ISP programmer and burn sketches directly without using the shield as a programming platform ? that would open up the possibility of writing direct from IDE to ATtiny's and any other non native arduino mcu.

My background is trying (trying being the operative word) to program mcu's from the vendors interface and software but not being a programming wizkid I keep stumbling around but I'm used to that freedom which I'm trying to keep to some extent with using the arduino whilst benefiting from the friendlier IDE (and support)
Logged


Offline Offline
Sr. Member
****
Karma: 6
Posts: 429
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So, you want to store the compiled program on the programming device and then press a button to program an ATtiny etc?

A quick google gives these links
http://arduino.cc/forum/index.php/topic,151774.0.html
http://www.hobbytronics.co.uk/arduino-xloader
http://arduino.cc/forum/index.php/topic,16812.0.html
http://www.roguerobotics.com/wikidocs/code/bootloader_using_ummc

Logged

Northants - UK
Offline Offline
Sr. Member
****
Karma: 1
Posts: 258
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

if the arduino IDE will work an AVRISP MK2 the "sketch" can be written straight to the ATtiny rather than involving the arduino hardware. if your programming the arduino hardware to act as the ISP and the IDE can control the actual AVR ISP unit then why not just program the mcu's (any be it the mega's or the tiny's) directly with that, if i have one, if not yes program the arduino to work as the ISP saving people from having to buy one.
Logged


Pages: [1]   Go Up
Jump to: