I would like to clarify a couple of things...
a) The hard coder job...
"Development boards" are boards with a micro controller (uC) where a programmer just test his code. Sometimes he needs to download modifications and then other modifications and then corrections and so on (sometimes for hundreds of times)...
From now on I'll referr to micro controller as "uC".
Times ago development boards was very primitive.
The poor coder was forced to remove the uC from the board, and put it in a programmer board for erase and reprogram.
At that time, the programmed used to accurately design and then code all the program in forehand, just to avoid stress and time loss, by mounting and unmounting chips.
Then, were released some uC with the capability to be written, with a special programming device, directly "in the circuit", without removing the chip from the destination board.
The only thing the designer of the board had to do was to bring specific pins of the uC on a special header for programming device connection. This method, currently commonly used, is known as In Circuit Serial Programming ICSP or ICP. Very usefull also for software updates.
Today a lot of circuits just sport a usb connection, handled directly by the micro controller.
And here is the idea! Why do the programmer have to mount/unmount the chip or even use a ICSP programming device?
It is so simple to just upload the new code in our board through the USB cable.
Isn't it fantastic? Imagine... you're working on your DIY Keyboard-Controller were the USB connection is used to connect your "borning keyboard" to the pc. Then, when you need to correct a bug or implement a new feature, you just press a little thiny button on your development board and suddenly your uC stops acting according to your code and turns in a "Waiting for new code" state. Now, all you have to do is lauch on the pc your uploading software and, click, upload your new code.
When uploading is complete, uC resets by itself and restart acting according to the just uploaded code.
This, last described, method is achived by a bootloader.
b) A profane explains what a bootloader is.
Note 1: Just a note for jump-readers like me, I'll use some of the concept explained in previous point, so in case you don't fully follow, please spend some minute to read it;
Note 2: Feel free to correct all errors I'll write, just don't consider it as a technical document but more like a scientific divulgation;
In simple words a bootloader is a little piece of software loaded in a specific position of the uC: let's say, for example, it resides in the first 4kB of the program memory.
When the uC is powered up, it starts executing instructions form first position in program memory.
And the very first instruction is: "jump to position 5kB"... in other words "By-pass the bootloader code".
when a little special hardware button, mounted on teh dev-board, is pressed, the program pointer is attracted on the first instruction of the bootloader (not the "jump to 5kB", but the very next one) so it start to execute istructions from there.
When uC executes the bootloader (act according the bootloader code) it transform itself in a "memory programmer".
Means that all code somebody (likely a pc application) sends down the USB connection now, with a certain protocol, is written in the uC's program memory by the uC itself, starting from 5kB (so bootloader is not overwritten).
When finished somebody (likely a pc application) sends down the USB connection a special instruction that is interpreted by the bootloader code as "Jump to 5kB"... so the execution starts from "just uploaded" code.
So when you buy a uC from some producer, and want to build your development board, how can you program the bootloader?
Choice 1: yourself with an hardware programmer (good old methods);
Choice 2: buy an already made dev-board, with already loaded bootloader;
When coding session is complete, and it's time to mass produce your board, it is not needed a bootloader anymore.
The executable code is simply written one by one with a programmer or with industrial equipment for large scale production (I think I was reading that big uC producers like MicroChip, Atmel or STS offers mass programming service with a lot of options).
But for me, when I'm doing one of my silly, little, projects I normally stop before mass-production and leave bootloader in.
c) What is Teensy ?
Teensy is a development board based on a chip from Atmel.
The dev board is produced and sold by Paul J Stoffregen and Robin C Coon (
http://www.pjrc.com).
There are various different Teensy models, some older, some newer, based on different Atmel chips. The most recent, now when I'm writing, is based on Atmel AT90USB1286 and is called Teensy++ 2.0.
But there are also a lot of other development boards based on exactly same chip, developed by somebody else.
Atmel itself have his own boards, this one, for example, is exactly same as Teensy++ 2.0:
http://www.atmel.com/devices/AT90USB1286.aspx
Other good alternatives:
http://code.google.com/p/micropendous/ (This one is based on AT90USB1287, Teensy++ 2.0 is based on AT90USB1286)
http://www.olimex.com/dev/avr-usb-162.html (Teensy 1.0 AT90USB162)
Or just search on eBay... there's a load of cheap (and even bad quality) development boards selled as "Teensy" but not produced by PRJC, used by people for some PS3 modification... let's referr to them as Clones.
It simply turns out that the term "Teensy" is today a way to identify a development board based on certain Atmel uC.
What's really the difference between Teensy, AT90USBKey (Atmel) and a Clone ?
OK, prices... Teensy and Clones appears to be cheaper than other dev-boards.
But the real difference is the bootloader!
Atmel and Clones uses proprietary DFU (by Atmel), Teensy uses the proprietary HalfKay (for his size Half Kilobyte).
d) Conclusions:
Free-software is a "style of life". Personally I believe I found a 2nd spring in my life when I switched to Linux.
But unfortunatelly I'm not contributing at all in any of the source improvements: not kernel, not any of the millions of applications out there... I'm not that good.
PRJC provides schematics, documentation and examples, it's considerable as a form of open-source. From what I read here and there it seems that the hard point is Proprietary bootloader, and pc-mac applications, also not released as open-source, but protocol is described
http://pjrc.com/teensy/halfkay_protocol.html (if somebody want's to experiment could write his pc/mac side download application).
Personally I understand that Paul J Stoffregen is gelous about his piece of code... maybe it's his only protection from "rising sun companies copies invasion". [ Would like to know what Litster thinks about
![Smile :)](./images/smilies/icon_e_smile.gif)
]
So, for us there are different solutions/alternatives:
Solution 1- Consider Teensy for what it is and accept it: a ggod quality, very supported, and prize competitive development board;
Solution 2- Buy a AT90USB1286 from Atmel, you'll have a fully supported by Atmel DFU bootloader, but still proprietary and more expensive.
I'm personally experimenting on a Clone: I was cheated on eBay were I was buing it. When I realised it was a clone, it was too late (I left the dev-board in the drawer for too long before dedicating my attention to it).
But still I'm using it with examples from
http://www.PRJC.com and with LUFA
http://www.fourwalledcubicle.com , I just have to use Flip software to download and it's based on AT90USB162 (therefore only Teensy 1.0).
Solution 3- BURN AN OPEN SOURCE BOOATLOADER. Overwrite the DFU/HalfKay bootloaders with LUFA opensource HID-Bootloader... please read those marvellous tutorials
http://elasticsheep.com/2010/01/install ... ootloader/
http://www.waitingforfriday.com/index.p ... troduction
Just keep in mind that, since PJRC do not publish the code, once replaced there's no way to reprogram back the HalfKay on the Teensy uC (and it seems you cannot even copy it from a brand new Teensy cause it's protected).
You've been warned... after you messed up please don't ask help to me, cause I'm not so deep in details it by myself
![Wink ;)](./images/smilies/icon_e_wink.gif)
...not for now at least.
nfc.