Why the boat loader ?

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 ?

sparkylabs:
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

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.

sparkylabs:
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.

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!

Why the boat loader ?

:smiley: :smiley: It saves a boat load of time, trouble, and frustration.

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

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 ?

retrolefty:
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)

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://arduino.cc/forum/index.php/topic,16812.0.html

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.