Moving project to Teensy 3.6 or Teensy 4.0

Status
Not open for further replies.

32bits

Member
I am looking to move my current project which is based on a PIC32 and MAX32 board to a Teensy 3.6 or 4.0 platform. The MAX32 is programmed in C (so not Arduino) using Mikro C Pro IDE, the display is 5" and the plan is to move to 7" SPI TFT with much faster screen updating. I have done some initial tests with a Teensy 3.6 + RA8875 7" display and using Sumotoy's lib and updated by KurtE, this looks a good way forward.

As my code size is around 8,000 lines Teensy 4.0 would be more suitable with its larger memory, is Teensy 4.0 supported by Sumotoy’s lib and would screen updating be any faster compared to Teensy 3.6?

I have setup Visual Studio with Vmicro Arduino plugin and while this works OK the compile time for simple code examples is very long, even compared to the Arduino IDE. Mikro C Pro compiles my 8,000 lines of code in around 3-4 seconds, both Arduino and Visual Studio even for simple code examples take significantly longer. It would be interesting to know which IDE’s are more suitable for larger code based projects and what typical compile times are to be expected for these IDE’s? I will most likely have to stay with an IDE which supports an Arduino plug-in to make use of Sumotoys lib.

My last question relates to uploading code to a Teensy board, is it possible to connect an external ARM programmer and are the programming pins broken out to allow this? If not, is the Teensy Loader Application supported in command line mode to run in a .bat file to load a hex file and then upload to the Teensy board?
 
Screen update speed - Is more likely to be bounded by SPI speed than the processor speed. So probably no real difference. RA8875 Speed - a lot depends on what you are needing it to do. If you do several primitives like rectangles, text... Then there are hardware speedups within the display that speed those up. If you wish to set a lot of random pixels, than these displays can be pretty slow. There is more information talking about this in Sumotoys wiki on these displays.

Compile speed: Not something I worry that much about. If it goes from 3-4 seconds to 30 seconds, it does not impact me that much... But that is just me. But then again when I first got started in programming, you had to do punch cards and in some cases, you put the cards into a bin and waited sometimes hours... :D I do at times get frustrated if the virus detection code changes the builds from seconds to minutes.

There are many different ways to setup to do builds for Teensy boards. A majority of the time I use the Arduino IDE, as it makes sure any code that other people use that I might touch, is likely to run/build the same for them... I do most major edits using Sublimetext and sometimes I use some scripts and the like setup by @defragster and @FrankB to allow me to build a sketch within the IDE using same tools as Arduino.

Others use Visual Studio, others platform IO...

As for Sumotoy libraries - AFAIK he has not touched any of them for a few years now. So for some of the newer processors, you will need to find where someone has added support for those boards...


For the most part you can not setup an external programmer to program a Teensy. There are some hardware hacks that others have done for some of the T3.x. Don't know of any for T4.

As for programming it over command line program, see: https://www.pjrc.com/teensy/loader_cli.html
 
I'm seeing the IDE 1.8.9 as re-building faster than 1.8.10 … it seems.

The defragster\TSET on github is Windows only - and uses TyCommander for uploading.

TyCommander has a GUI - with good SerMon and also a CLI version for upload to Teensy up to and including 4.0.

Using TSET and IDE 1.8.9 with TyCommander the build using Sublimetext seems to build quickly - perhaps faster than in the IDE - though it executes the same underlying tool with the same commands.

I get stuck in the IDE - like now - not reverting my build to Sublimetext so I haven't seen it with the IDE 1.8.10 yet. The build times are longer - which is only trouble when trying to test 5 different quick changes like yesterday with long Audio build and 1.8.10 seemed to do too much each time.

{ well this was post 10,001 }
 
Any Teensy board should easily manage 8000 lines project since the program is stored in the MCU flash memory. The dynamic memory usage is more likely to become a bottleneck, i.e. how you do heap and stack memory allocations in your program, so you need to be more mindful about that than your code size.

For larger project the code navigation becomes increasingly important which is why I find Arduino IDE quite inadequate and only suitable for small project and prefer Visual Studio + Visual Assist instead.
 
Now 10,002 ...

@defragster - #3 showing 10011, CONGRATS! Thanks for all your help:)

And this is 10,020 - the count goes on … fun to offer @wwatson help - especially when it helps get good stuff done.

As far as Dev tools for Windows when the IDE gets tiresome using the SublimeText editor KurtE pointed me to, then FrankB decoded command line to execute the Arduino build and I spiff'd it up with Batch Files to make a set that create a build for Teensy board and specs that runs resulting Batch/CMD file from editor that can run and capture CMDLine output, or File Explorer, or 'DOS' box to build - seems to go faster Defragster/tset.
 
The problem with VMicro is that it copies all the dependent files needed for the project to a temp dir when you first time compile it, which can take a long time. After the initial compilation the succeeding compilations are much faster. For reference, my ~2500 LOC project takes couple of seconds after the initial compilation.
 
Status
Not open for further replies.
Back
Top