Teensy LC/3.5/3.6 WITHOUT Arduino

Status
Not open for further replies.

dak246

New member
Hello. I was hoping someone could answer the following questions:

1. Does Teensy LC, Teensy 3.5, or Teensy 3.6 come with anything Arduino-related pre-installed on it? If yes, are these things completely removable?
2. Can all of these products be used as-is without Arduino?

I currently use the Teensy 2.0 for developing/debugging assembly (and occasionally C) projects for AVRs - it makes development very quick and very convenient. When ready, I program a standalone dip chip with my AVR dragon (making necessary alterations if the chip isn't a atmega32u4) and drop it into my project. If changes need to be made to the software after this point I use ICSP. I am not interested in using Arduino in any way/shape/form.

I'd like to continue with this same general procedure using ARM Cortex MCUs, I just want to know before hand if there is anything Arduino-related that I need to be aware of. Thanks!

-Dave
 
1. No.
2. yes.

This will not be easy, beacuse the ARM needs - at minimum - special startup-code - but if you want to dig into this..
You know, that ARM uses a totally different architecture and assembler ? You'll have much to learn...
I'd begin with the >1000 pages manual, PLUS an ARM-manual for the cpu.

have fun,
Frank.
 
Last edited:
1. Does Teensy LC, Teensy 3.5, or Teensy 3.6 come with anything Arduino-related pre-installed on it?

They come pre-programmed with the LED blink example.

If yes, are these things completely removable?

The entire flash memory is erased at the beginning of every upload.

When ready, I program a standalone dip chip with my AVR dragon (making necessary alterations if the chip isn't a atmega32u4) and drop it into my project. If changes need to be made to the software after this point I use ICSP. I am not interested in using Arduino in any way/shape/form.

I'd like to continue with this same general procedure using ARM Cortex MCUs,

The 32 bit Teensy boards use a separate chip for their bootloader.

Unlike AVR, where part of the chip you program is reserved for bootloader code, on Teensy LC & 3.x, your program runs on the chip without any bootloader or other code in the flash memory. The idea is you can just program that HEX file onto a blank chip, using a hardware programmer like the ones from P&E Micro. Or you can buy just the bootloader chip from PJRC and make your own programming adaptor.

Of course, without the bootloader chip, you lose the ability to go into bootloader mode. If you run the default Teensyduino USB stack which recognizes requests to enter bootloader mode and executes a breakpoint instruction to request the bootloader chip to take over, without that chip present you'll just execute the breakpoint exception (basically, the same as an interrupt) which defaults to an infinite do-nothing loop (similar to the avr-libc default for unused interrupts on AVR chips).
 
If you want to do all "bare metal" development without Arduino, you might start by looking at the sample makefile. The Teensyduino installer puts it into hardware/teensy/avr/cores/teensy3 within Ardiuno. So you'll need a copy of Arduino to do the install to get those files, but if you really, really do not want to ever run Arduino, you don't have to. The makefile has some comments about which folders from the Arduino install you need to keep for the toolchain. You can delete the rest if you never want to use Arduino.
 
I am not interested in using Arduino in any way/shape/form.

Which, for me means also, you are not really interested in help from this forum.

As the forum rule says "Always post complete source code & details to reproduce any issue! " without and Arduino compatible source code, only very view people can reproduce a problem you may have.

Having said this, I'm not using Arduino/Teensyduino for my day-to-day programming, but keep it for testing code presented on this forum and why not to help others in the community that are using Arduino/Teensyduino. And when you scan the forum, you will find a lot of discussion on alternatives to Arduino IDE.
 
Thank you everybody for the replies, they were all very helpful. That being said, I felt a bit of sarcasm/ridicule in a couple of them - if I offended anybody or if my post came off in a negative way, I apologize. It was not my intention.

You know, that ARM uses a totally different architecture and assembler ? You'll have much to learn...
Yes, I am aware. I've been reading up on ARMs extensively, and have made a lot of progress using a couple Atmel SAM dev boards. I'm absolutely a beginner when it comes to 32-bit MCUs, but I've been working with 8-bit MCUs for over a decade. I realize that for many people embedded programming is a means to an end, but for me it id the centerpiece of my hobby. I'm not trying to create a specific gadget or anything like that. I enjoy working close to the hardware, digging through datasheets, reinventing the wheel (in some cases), etc.

Which, for me means also, you are not really interested in help from this forum.
Is this not a resource for Teensy-specific information and help? In that respect, I am certainly interested in help from this forum. I wouldn't expect anybody to consider this forum their first choice for information/help regarding assembly language programming of ARM-based MCUs.

Again, thank you everybody for the replies. Much appreciated!
 
Actually, we've had a good number of people determined to use 32 bit Teensy in a fully "bare metal" and "from scratch" way, some even opting to even try 100% hand crafted assembly. Some of them have even taken the time to write some excellent blog articles, which you can find by google or other searching. Here's a couple:

http://disconnected.systems/posts/bare-metal-assembly-on-the-teensy-3.1/

http://kevincuzner.com/2014/12/12/teensy-3-1-bare-metal-writing-a-usb-driver/

If you go down this path, I highly recommend getting Joseph Yiu's book. The NXP/Freescale reference manual documents all the chip's peripherals pretty well, but for the ARM processor you really need that book. It's much more approachable than ARM's rather cryptic and fragmented reference documentation. But if you want ARM's info, the magic code to search for is "DDI0403E".
 
Thank you Paul. I just gave those links a quick look and they appear to be an absolute goldmine. As for the book, someone on AVR freaks recommended it as well. At this point, getting it is all but an inevitability. The NXP docs have been my primary study material to this point but they really aren't cutting it.
 
Status
Not open for further replies.
Back
Top