Teensy 3.0

I have been using lots of Cortex boards including M4 boards and this is the most elegant board I have seen.

I pledged and can't wait to see the Teensy 3.0.

The Freescale Kinetis processor is an excellent choice. It's amazing to see that 64 pin part on such a tiny board. It truly is Teensy.

I hope this mean it will be open enough so I can port a RTOS like ChibiOS to it.

Teensy 3.0, an affordable 32 bit ARM Cortex-M4 board, for development in Arduino or C/C++.

I have been using ChibiOS and really like having the same RTOS on all boards.

Looks like a great board, but what tool chain will be used to code for it?

You should be able to use any tool chain that supports Cortex M4 processors.

The only problem could be how Paul's boot-loader works on Teensy 3.0. You need a hook to load you hex file.

The easy way is to use what ever Paul has packaged with his software. His stuff is always easy to use and reliable.

I am hoping to make ChibiOS a library for Teensy 3.0 using his tools. That way I can use his tools and have a RTOS.

I did that with the Arduino IDE for AVR processors.

I really like Freescale's documentation. Here is a good overview of true bare metal use of the device http://cache.freescale.com/files/32bit/doc/quick_ref_guide/KQRUG.pdf.

fat16lib:
The only problem could be how Paul's boot-loader works on Teensy 3.0. You need a hook to load you hex file.

This is what the page says about the boot-loader (not sure what it means but it sounds like it does not impact the tool chain 8) )

Teensy 3.0 features an off-chip bootloader design. On Teensy 2.0 and all Arduino(R)** brand boards, the bootloader consumes a small portion of the available flash memory. On most boards, the bootloader executes briefly before your own program. By storing the bootloader in a separate chip, your code can use all of the flash memory. Your code can also run immediately after a reset event, without bootloader interference.

Best regards
Jantje

I wasn't very clear, I am sure you can generate a hex file with any Cortex M4 tool chain.

Here is my question. How easy is it to load an arbitrary hex file?

I read this also

Teensy 3.0 features an off-chip bootloader design. On Teensy 2.0 and all Arduino(R)** brand boards, the bootloader consumes a small portion of the available flash memory. On most boards, the bootloader executes briefly before your own program. By storing the bootloader in a separate chip, your code can use all of the flash memory. Your code can also run immediately after a reset event, without bootloader interference.

I wonder how you start the boot loader?

My guess is that the button copies the boot-loader into RAM. The boot-loader can then program all flash.

Perhaps the boot-loader uses FlexMemory. I don't have a clear understanding of FlexMemory.

The next question is how do you send the hex file to the boot-loader?

All
Paul has been pledged $58,442. That is 11 times the requested amount.
He will be busy the next months ]:smiley:

Best regards
Jantje

If anyone here has any experience with the Leaflab Maple boards, you will know what a massive undertaking the porting of much of the AVR-based Arduino code over to the ARM architecture is. The Leaflab boards are great little Cortex-3 prototyping boards, with an Arduino derived IDE and a "wirish" port of the basic wiring stuff, but much of the promise of the hardware (DMA, advanced interrupt handling etc.) even to this day has yet to be really fully realised because of the at times painfully slow rate of porting across (or creation from scratch) of many of the libs we take for granted on the Arduino.

I have developed using the Maple boards, and to be honest, despite the raw hardware advantages, the Mega2560 is in many ways far more capable prototyping platform, apart from some niche applications. As a sage once said, "it's the software, stupid."

So, recent history ponts to where the challenge is. Building a good ARM dev board -- certainly not trivial, but pales into comparison to the effort required in building a complete software development environment that would be comparable to the Arduino ecosystem.

Having said all this, I might add I'm not surprised that the announced "team Arduino" development effort for an ARM based Arduino product is today a year old -- and not a public beta release in sight.

So good luck to Paul. But he's going to need more than good luck -- he's also going to need considerable community support if this platform is really going to take off.

Mine has shown up and is blinking (and the IDE works, so I've modified the blink rate and whatnot, and it uploads/etc.) I've soldered pins on "upside down" for easier access to the extra backside signals, although this hides the reset button and I'll have to remember to be really careful when trying to remove the board from the protoboard.
Pretty cool. It's very tiny (teensy!)

I just started porting SdFat to Teensy 3.0 and am really pleased with Teensy 3.0. Paul's modified IDE works well.

SdFat has about 8,500 lines of code and it took me about an hour to get it to compile. I commented out about 100 lines of AVR SPI code.

I found SPI examples on the Freescale website and am starting implementation of SD/SPI access routines. This should not take long.

The biggest problem is also the biggest opportunity. With AVR everything was based on the fact that SdFat would mostly be used on 328 processors with 2KB of memory. This really limited how caching was implemented and what SD command sequences could be used. Now I need to redesign SD access to take advantage of more memory and processor speed.

I am starting to redesign SD access for better performance. While waiting for the Teensy 3.0 I experimented with a Mega. I was able to increase write speed by almost a factor of three by using more memory and multi-block SD commands.

One shock was the old SdFat first ran much slower with more memory. This is because I had multiple blocks in the cache and user memory and was not writing them in sequential order. This slowed the write speed from 200KB/sec on an Uno to 90 KB/sec on a Mega. SD cards love streaming multi-block writes and die with random writes. Writing the blocks in the correct order increased the speed for this example from 90KB/sec to over 500KB/sec.

The Teensy will have 24 MHz SPI, a faster processor, and more memory so I hope to get 5-10 times faster file write speeds than SdFat on a Uno.

ARM for Arduino is great!

I have started looking at porting ChibiOS/RT to Teensy 3.0 and it also looks easy. I will make the RTOS a library so you can use it with Paul's core routines and other ported libraries in a multi-tasking environment.

Is there a place where I can download teensyduino for 3.0?
I havn't found a new version on the PCR site.
I would like to see the differences I need to make the elf file and how to upload. This to asses the impact on my eclipse plugin for when my teensy 3.0 and due arrive.
I asked paul but he is way to bussy with other things.
Best regards
Jantje

Jantje:
Is there a place where I can download teensyduino for 3.0?
I havn't found a new version on the PCR site.
I would like to see the differences I need to make the elf file and how to upload. This to asses the impact on my eclipse plugin for when my teensy 3.0 and due arrive.
I asked paul but he is way to bussy with other things.
Best regards
Jantje

http://www.pjrc.com/teensy/beta/arduino-1.0.1-teensy3-beta2-macos.zip

@cyclegadget
Great thanks
Jantje

Your welcome Jantie! Here are all the links that I have, I had to look through my email....I ordered a 3.0 and should have it next week.

http://www.pjrc.com/teensy/beta/arduino-1.0.1-teensy3-beta1-windows.zip
http://www.pjrc.com/teensy/beta/arduino-1.0.1-teensy3-beta1-linux64.tar.gz
http://www.pjrc.com/teensy/beta/arduino-1.0.1-teensy3-beta1-macos.zip

Qoute:
If you're using Windows and you've never used a Teensy before, you'll need the "serial installer" to add the driver (really just an INF to tell Windows to use its built-in driver). If you're using Linux, you'll need to install the udev rule to allow non-root access. They're available at the normal Teensyduino page:

http://www.pjrc.com/teensy/td_download.html

@fat16lib

I meant to say this last night but, thank you for working on porting your SDfat library to the 3.0! I really enjoy using your SDFat library and I am glad it can be used with the 3.0!

fat16lib:
I am starting to redesign SD access for better performance.

Ultimately you could go to using DMA to get the maximum performance. Might want to look at some of the Leaflabs Maple code to get some ideas on how that is done on the Cortex3.

LFNs an option with the additional memory?

I have this Maple version of SdFat Google Code Archive - Long-term storage for Google Code Project Hosting. and it doesn't use DMA.

I have examples of Kinetis SPI DMA and plan to try it but it won't help much.

SD, DMA, and SPI don't work too well together. The problem is the SD SPI protocol. SD cards indicate busy in SPI mode by holding MISO high so you can't just setup a DMA transfer and go away. The protocol uses control tokens in the data stream which is a pain.

The good news is that Kinetis has a four deep FIFO on SPI so I should be able to send/receive at 24 MHz easily. That's only 3 MB/sec.

The real winner is having an SDIO controller like high end STM32 and the Due if these pin are brought out.

I plan on LFN. I implemented most of LFN but didn't put it in the AVR version of SdFat because flash is so precious on 328 Arduinos.

So can anyone explain the steps better to be taken once I've downloaded the windows zip file. I can't seem to find any installation instructions other then

  1. Be sure arduino 1.0.1 is installed first
  2. If windows, run serial installer first
  3. Download Teensy 3.0 zip file

So where and how do I install/unpack the Teensy 3.0 zip file to?

Lefty

Lefty
I just downloaded "arduino-1.0.1-teensy3-beta2-windows"
It actually contains the whole environment (that is including the arduino stuff). So you just can unzip it at the locattion of your choice.
Given cyclegadget comment the driver is the same as for the teensy2.
Best regards
Jantje

Jantje:
Lefty
I just downloaded "arduino-1.0.1-teensy3-beta2-windows"
It actually contains the whole environment (that is including the arduino stuff). So you just can unzip it at the locattion of your choice.
Given cyclegadget comment the driver is the same as for the teensy2.
Best regards
Jantje

Thanks for that. I installed the zip file and the IDE seems to work fine and the the Teeney board is listed in the board selection menu. I then ran the serial installer and it seemed to load OK.

Then a show stopper. What kind of USB connector is that on the Teeny 3.0 board? I've owned a Seeeduino mega board ( http://www.seeedstudio.com/depot/seeeduino-v30-atmega-328p-p-669.html?cPath=132_133) for eons that uses a:

The Seeeduino Mega uses a 4 Position mini-Type B Jack while the rest of the Arduino family uses standard 4 Position Type B Jack.

But this Teeny 3 seem to be some other kind of miniture USB connector. Anyone know what I need and a link to it. The PJRC lists a seperate mini-Type B cable avalible but that appears to be what I already own but which doesn't fit the Teeny3. I'm confused.....

Thanks;
Lefty

The USB port on Teensy 3.0 is capable of USB host mode. A Micro-AB connector allows future use of USB host mode.

Initially, Teensy 3.0 will ship with only USB device support. USB host support, integrated in the Arduino(R)** environment with easy-to-use objects, is planned as a software-only upgrade in 2013. Programming a project using USB host mode will require a second Teensy 3.0 and a board-to-board link using the I2C pins (2 wires and ground), to provide a path for the Arduino IDE to upload code.

Teensy 3.0 uses a Micro AB connector, not a Mini connector.