Teensy software

Status
Not open for further replies.

Cubyte

Member
I'm currently using the teensy 3.1 which are brilliant, however I would like to use the K22FN512 or K22FN1M0 which are pin compatible with the K20DX256 and give up to 1MB flash and a 120Mhz clock. My question is how easy would it be to get the arduino compiler to program up to 1MB and is it possible to use the mini54 to program the chips.
:cool:
 
Could be a cool summer project! :)

All kidding aside, a lot of work goes into supporting a particular MCU, even if it's 'pin compatible'. See the ongoing issues with supporting the 1284P over in arduino-land. Many Arduino libraries still do not support the chip, even though it's merely a version of the 1280 series with fewer pins.

Unless Paul releases a product with the K22FN512 or K22FN1M0, I doubt he's going to spend the time needed to build support for the chip. Arguably, this could be a good move for him, i.e. offer a stepping stone between the Teensy 3.1 and the Teensy 3.x++ for users that don't need more I/O but that do need the RAM/Flash. The cost differences are pretty modest, i.e. $0.5 to step up to the 512 for and $3.75 for the 1M, in 100's quantities at Digikey.

A product priced at ~$10 higher than the 3.1 could hence allow for a healthy profit margin in commercial quantities, if in fact adding support for such a chip is as easy as you seem to think it is.
 
Last edited:
A product priced at ~$10 higher than the 3.1 could hence allow for a healthy profit margin in commercial quantities, if in fact adding support for such a chip is as easy as you seem to think it is.
In the unlikely event that Teensyduino were to make a major sea-state change and use MCU vendor I/O libraries with "wiring API wrappers" for Arudino-izing, then changing chips with all-DIY software will be hard. Others in the ARM world use the vendor libraries (HAL and equivalents) directly, and some make simple API wrappers to make it look more like Arduino. But Arduino may not have long to go, being usurped by better/simpler and high level languages like Javascript, Python, etc., rather than near-bear-metal as is the case with C/C++. Even on very low cost boards.
 
Last edited:
Has anyone made a Javascript or Python run on such low-end chips?

It's easy to predict a future where "very low cost" microcontrollers have a minimum of 2K, maybe even 4K of RAM. Can these languages work with so little?
 
It's more likely a matter of when vs. if. The capabilities of MCUs keep evolving, the price points keep dropping to the point where dedicated logic circuits have disappeared from most consumer products, to be replaced by general purpose MCUs. Heck, my latest vacuum cleaner features an Atmega controller.

I don't see the benefit of switching from C to Python, you still need to think a program through. It's not as if you can dictate a particular functionality to your desktop computer, which then takes care of the coding for you.

Staying close to bare-metal is important in many MCU-related applications, so I doubt that C will disappear. However, beagle and its brothers will likely continue their advance towards arduino in terms of price point, which will make it harder and harder to justify paying $30 for an Arduino. Arduino LLC likely sees that handwriting on the wall too, hence the search for a wider set of suppliers to allow them to hit more price / performance points.

Paul is the ultimate arbiter re work vs benefit of a larger memory chip. If this is indeed easy to do (and I have no idea!) then perhaps he could be persuaded to open a poll re demand for such a device or even make a trial batch as a special edition to gauge demand.
 
Last edited:
Well, sort of like that, except the "very low cost" part Steve talked about. Damien's Micro Python runs on one of the most powerful and most expensive microcontrollers currently available.
 
Last edited:
Well, sort of like that, except the "very low cost" part Steve talked about. Damien's Micro Python runs on one of the most powerful and most expensive microcontrollers currently available.

...as well as on the Teensy 3.1: https://github.com/micropython/micropython/tree/master/teensy

RAM and FLASH are a limiting factor, though...

I found the Esprunio pico (http://www.espruino.com/Pico) might be an interesting option: runs Javascript, has 384 kb Flash, 96 kb RAM and is smaller than the Teensy. US$ 25 is not VERY low cost, but only slightly above our beloved Teensy. [RANT]Javascript, however. Not typesafe. Ugly. Don't like it.[/RANT]
 
@Steve - Can you elaborate on your "even on very low cost boards" opinion? I know you evaluate lots of microcontroller products and look for trends. Are you really seeing signs that languages like Python and Javascript will target the (future) low end of microcontrollers?
 
@Steve - Can you elaborate on your "even on very low cost boards" opinion? I know you evaluate lots of microcontroller products and look for trends. Are you really seeing signs that languages like Python and Javascript will target the (future) low end of microcontrollers?

Yes... Javascript on embedded processors is new and is reallly appealing as hoards of computer people know Javascript from PCs, web servers, and client-side/interpreted javascript (including me). The best I've yet seen is http://www.espruino.com/Pico and example code http://www.espruino.com/Tutorials.

A great Python board is https://micropython.org. I use the heck out of python on PC/Mac/Linux for platform independent GUI programs (using PyQt and Qt Designer, all free). https://docs.particle.io/guide/getting-started/start/photon/ is the documentation web site. The product pitch is here: https://www.particle.io/

But I think Javascript is the better way for hobby. Both are great.

Both the Javascript and Python boards are based on re-porting existing bytecode interpreters to run on ARMs. Not a huge effort.
Speedy I/O comes from C/C++ code in the interpreter, so the nay-sayers on interpreters are squelched.

Of course, RPi is a cheap superset of all of this.

I think both are full open source hardware/software.

The particle.io "python" board is amazing. I have one. Has a Broadcom WiFi radio aboard that is superbly integrated with over the INTERNET reprogramming. The IDE is so simple and clean, browser based (or local PC as an option). GCC. It's C/C++ with big libraries, nice docs. They've sold big volumes quickly.

The state of the art in these has rocketed in the last year. Having used all the above here, using a simple MCU on a board feels crude now. Esp. with the new IDEs.
 
Last edited:
What I want is a dual core CPU that runs Linux on one core and bare metal on the other, with some APIs for communications between them. The Beaglebone is close, although I'd like to see a full featured ARM for both cores. Might as well ask for teensy pricing and size and wifi too.
 
@jonr: The Xilinx Zynq is a dual processor Cortex-A9 with FPGA fabric. You can run Linux on one core and bare metal on the other. Plus you've got the FPGA fabric for all your realtime and accelerator needs. There are some small dev boards and system on module boards. Board prices are about 10x Teensy pricing and up. No built-in wifi or pony that I'm aware of.
 
Geeze, is this two-brained gizmo going on a NASA satellite to do onboard image processing? (Send GBs and hardware DCTs)
 
Javascript on Microcontrollers ?
For me a nightmare.

If it sometime is usual to run Javascript on MCU, its time for me to quit this hobby.
So don't use Javascript on an MCU.
It with speedy C++ code in the interpreter enables people to enjoy embedded and IoT, even though they are not able/willing to struggle with near bare metal in C++.
Why not?
You could at least look at what these are. Cost you less than a Coke on the Champs-Élysées.
 
Last edited:
I can see how a feature-rich Javascript interpreter could be useful for people who are familiar with Javascript. While I'm far from a Javascript expert, I have dabbled in it a bit... most recently hacking the Node-Red GUI code to become the audio library design tool.

Long ago, around 2006, before libraries like jQuery & D3 existed, I also played quite a bit with Javascript. It felt very different then!

So really, I have 2 questions about Javascript on microcontrollers.

First, is it genuinely useful without lots of commonly used libraries, like jQuery?

Second, I'd like to ask again about this concept of Javascript on "very low cost boards":

But Arduino may not have long to go, being usurped by better/simpler and high level languages like Javascript, Python, etc., rather than near-bear-metal as is the case with C/C++. Even on very low cost boards.

Perhaps the words "very low cost boards" mean different things to different people? To me, "very low cost" microcontrollers means 8 bit AVR (under 40 pins) and Cortex-M0+, like Teensy-LC.

If what you meant by "very low cost boards" was really Damien's STM32F4-based product, please just say so.

But if you meant to say you see Javascript becoming viable on Cortex-M0+ (the low cost end of ARM microcontrollers), I'd really like to hear your thoughts on that? I really am interested in where things are going, long term.... and whether languages like Javascript are ever going to really become useful on Cortex-M0 scale microcontrollers.
 
Status
Not open for further replies.
Back
Top