Teensyduino 1.44 Released

Status
Not open for further replies.
No doubt Teensy_ports has moved to better interoperability from the first efforts - between cross platform and trapped inside the IDE and having the JAVA overlord - current solution seems good - though I don't generally use it.

There was some (one time) event that passed as noted around the time of the while(1) - simple attempt to repro didn't so some other element ... and I have a few non PJRC 'moving parts' with TyCommander and VisualTeensy - Win 10 and a couple of USB hubs - and my programming. Thus my starting that post with "Not sure what to do with this ..." With the machine up 10 days at that point I may very well have (ab)used IDE SerMon in that time with those items orphaned days before - at least they were 'idle at 0% usage'.

And a quick note for Thierry's retinal pleasure :)
OS_Usage.png
 
@Defragster:
The Meyer family goes on a hike through the forest. After a few hours Mr. Meyer says "Look, here is the ideal place for a picnic".

Ms Meyer replied: "Honey, you're right as always: Hundreds of thousands of ants can't be wrong!
.. oh..ok..not that funny after translation..





*** I use Windows, too. Often, but not always.
 
:) Funny enough … assuming you are referring to the number 1 OS … ANTdroid :)

Reminds me of the day my wife and Dale a co-worker and I hiked up a nice mountain for a picnic - found a great view and settled in to eat … wondering about the smell in this pristine place … after we finished eating it turns out another hiker had a large dog defecate nearby while they enjoyed the view from that obviously perfect spot … on same day Dale did pick up a stick waving it around like a sword … then discovering it was covered in Ants …
 
I installed 1.44 from the download page for Windows10 and just noticed, because somebody asked what version I was using, and the Arduino IDE shows that I am using 1.44 beta 2. Same when the loader pops up and I do an About. It is showing 1.44 beta2. Not sure if anyone else noticed.

Just wanted to let you know.

PLEASE IGNORE THE POST. I FOUND MY MISTAKE - HAD A SHORTCUT POINTING TO THE WRONG Version.
 
Last edited:
Windows 10, with Teensy serial monitor open (Raw HID), but nothing prints (Sketch prints in setup() a few lines, only), so there should'nt be any workload :
View attachment 14879
There are two tasks with more than 30%... noisy fans.

Edit: Arduino 1.8.7

err.. one task... but still 30% when doing nothing

I noticed, it's independend of the Serial Monitor. It happens when the compiler shows errors, and I need some time to edit the sketch.
But it happens in serial monitor, too, esp. if the window is in the background. Edit: If I close the serial monitor window, the CPU-usage becomes zero, and everything is fine again.
It is *really* very annoying, because the computer gets very loud due to the fast running fans.

Is there any solution?? I read somewhere it would help to delete all java installations. Did _not_ help.

Edit: Arduino 1.8.7
 
Last edited:
Paul,
Installed 1.44 on 1.8.7 on MacOS10.14.1 no problems.

Just wanted to thank you and express my amazement at the job you do with these upgrades !

Seems like a boiling cauldron with linux/window/mac fighting each other and screwing competition (java) and trying to obsolete their own products to sell more, yet somehow you manage to reign them all in and just work on top of their mess !

amazing !
 
The CPU usage problem may be a Java problem. Or it could be JSSC, if you've got a "Serial port" selected in Tools > Ports. Or if you have a "Teensy" port selected, then it could be my teensy_serialmon program. At least that last case is easy to see the difference, because it would be teensy_serialmon rather than Java burning up all the CPU time.

Arduino issue tracker has shown some people reporting this CPU usage problem with the version of Java that got used in 1.8.7.

Is there any solution?? I read somewhere it would help to delete all java installations. Did _not_ help.

Arduino bundles a copy of the Java JRE. It's supposed to ignore any Java you have elsewhere on your computer.

With the Linux version, if you just delete the "java" folder within Arduino, it will try to use whatever Java you have installed on your PC. Maybe the Windows version will do this too?

Or you could try downloading the Java JRE from Oracle and replace the contents of that folder. But I believe the Windows version is an installer, not just a simple .tar.gz like the Linux version, so you'd probably have to go through the extra step of installing and then trying to find where the installer put the files.

You could also try using Arduino 1.8.5 which has an older (probably better) version of Java.
 
No, it's without serialmon, too. Just simple compiler-messages (errors) in the terminal window lead to rising CPU usage.
Ok, serialmon is a bit worse, but if I close that window, all is back to normal again. I don't think that is a teensyduino issue.

I've finally solved this. I do not open the IDE anymore and have a way better solution.
attachment.php
 
Odd - just scanning this - looked at TaskMan JAVA was 15.6% CPU - had compiled a couple little things to a T_3.6 - no Teensy plugged in - last compile upload was a success - using TyComm and Frank B's 256 MHz TD 1.44 with IDE 1.87. This is an i7 desktop so not hearing fan change.

Put an error in open sketch (Frank's _isr remap) ( 1 of 8 open ) - failed and CPU use went single digits or less - compiled with no error and JAVA is running around 0.5 to 1.5%

Did another recompile and upload and now 15-17& on JAVA Platform - then it was under 1% ... then when IDE comes to forground it goes back up if it had dropped down - now using at 16-18%. It doesn't go over 25% during compile.

The other example Teensy-4 pin isr example went toward 0% after upload - now JAVA back to ~16.5 range after a short time and staying there.
 
Your machine is faster than mine!
Ok, mine is quite old.. I5.. still good enough for use at home - obviously not good enough for the Arduino so-called "IDE"
Do I need to add a water-cooling? :confused:
But still - as soon the black terminal shows errors, the cpu-usage rises. If I fix the error, and re-compile, it goes back to 1-2% when compilation is done.
I don't care anymore.
 
All this time later and TaskMan still shows the IDE JAVA at ~16-17%, it is doing something neurotic - not SerMon and no errors on last compile/upload. I do have 8 sketches open I keep wanting open to remind me of what I was once doing and thinking I'd get back to. But even so it does drop under 1% at times after upload then just goes back up.

Water cooling might be quieter :) - but a real pain to retrofit. I always run my laptops on a cooler pad - even without a fan it assures fresher air and less accumulated residual heat from reflected heat trapped underneath gives the internal fan less work to do, better for HDD's.

So now ATOM ... Visual Studio, VS Code, Eclipse, (PlatformIO) ... stand alone editor is nice aid to IDE - but leaves the IDE active. Thanks yet again to Koromix for TyCommander at least to make a good SerMon and multi Teensy loader interface to make those work!

<update Edit> 6 hours later - JAVA still ~16%. Closed 6 of the 8 open sketches. And uploaded for fun a time or two. Java would go to <1% ... then back up to ~16 in the process of window changing.
Seemed it was to stay <1% until in forground ... now in background again and at ~16% CPU with just two IDE sketches open ...
 
Last edited:
Same Java at ~16% after error free compile/upload with stock IDE 1.87 (no 256 MHz OC) and TeensyDuino 1.44 using PJRC Loader - only two active sketches from the start single connected T_3.6.
It did drop < 1% in background as I type this. Back ~16% up after 2nd sketch Upload - opened Win Stopwatch at 6+ minutes after last touching IDE still CPU elevated - some peaks now 20%. SerMon not opened - teensy_ports 0%.

Frank - you should make a thread with your batch file calling from Atom. { step1: install Atom #2:Instal Package:'Process-Palette' }

<edit>: It persists - stopwatch at 1hr 51 min and 17.1% JAVA CPU when machine left idle.

From post #36:
<update> 6 hours later - JAVA still ~16%. Closed 6 of the 8 open sketches. And uploaded for fun a time or two. Java would go to <1% ... then back up to ~16 in the process of window changing.
Seemed it was to stay <1% until in forground ... now in background again and at ~16% CPU with just two IDE sketches open ...
 
Last edited:
@Paul:
May I ask if it is possible to modify platform.txt, and boards.txt a little bit -for the next release- ?

It would allow to pass extra #defines more easyly.

In board.txt it needs one line more for every Teensy:
Code:
[B]teensy36.build.flags.extra=[/B]
[..]

In platform.txt:
Add this to recipe.cpp.o.pattern, recipe.c.o.pattern, recipe.S.o.pattern (and header? don't know - you know better)
Code:
[...] "{source_file}" [B]{build.flags.extra}[/B] -o "{object_file}" [...]

It allows to pass #defines with the "-prefs" argument to the builder.
For example ./arduino-builder -prefs="build.flags.extra=-DDEBUG" ....
And if it is the last argument (like above) it would allow to override other settings.

It is very useful if the builder gets called by 3rd-party tools.
The "-prefs" was added for exactly this use-case. And it would be a pity not to use it.
 
Posting this here for reference, I see it appearing in my compiler output

Code:
C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/wiring.h:128:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

   (_amt < _low) ? _low : ((_amt > _high) ? _high : _amt); \

EDIT: it dissapeared now, I added the UL suffix to constrain to the constructor value inputs

Code:
 settings = SPISettings(((constrain(_mhz, 4000000[B]UL[/B], 20000000[B]UL[/B]) != _mhz) ? 8000000UL : _mhz), MSBFIRST, SPI_MODE0);
 
Last edited:
just a small suggestion that can be usefull with minimal code needed and added to the installer: adding a selction for creating shortcut to the desktop for the audio design tool if the audio lib is installed?

[ also, just got around to use the forum again :p ]
 
Sometimes I open then generated symbol table to look for some addresses of variables. It is handy to filter for .bss and sort the output.
I added the the following line to platform.txt, which only works for windows and if there are no spaces in the paths. I hav'nt found a way to make this more compatible for other systems or for paths with spaces.
Is there any?

recipe.hooks.postbuild.3.pattern=
"{compiler.path}stdout_redirect" "{build.path}/{build.project_name}_bss.sym" "c:\windows\system32\cmd.exe" "/c C:\Arduino\hardware\tools\arm\bin\arm-none-eabi-objdump -t -j .bss -C {build.path}\{build.project_name}.elf | sort"

just adding " | find ".bss" | sort" to recipe.hooks.postbuild.2.pattern would be a bit easier - but it seems the stdout_redirect does not support that(?) - or is there a way I do not know, perhaps?

Edit:Output looks like this:
Code:
1fff11f0 g       .bss    00000000 _sbss
1fff11f0 l       .bss    00000000 __bss_start__
1fff11f0 l       .bss    00000000 completed.8605
1fff11f0 l    d  .bss    00000000 .bss
1fff11f4 l       .bss    00000000 object.8610
1fff120c g     O .bss    00000004 systick_millis_count
1fff1210 l     O .bss    00000004 ep0_tx_ptr
1fff1214 l     O .bss    00000010 rx_last
1fff1224 l     O .bss    00000002 ep0_tx_len
1fff1228 l     O .bss    00000040 ep0_rx0_buf
1fff1268 l     O .bss    00000010 rx_first
1fff1278 l     O .bss    00000001 ep0_tx_data_toggle
1fff1279 g     O .bss    00000001 usb_reboot_timer
1fff127c l     O .bss    00000040 ep0_rx1_buf
1fff12bc l     O .bss    00000010 tx_first
1fff12cc l     O .bss    00000010 tx_last
1fff12dc l     O .bss    00000008 setup
1fff12e4 l     O .bss    00000001 ep0_tx_bdt_bank
1fff12e5 g     O .bss    00000001 usb_rx_memory_needed
1fff12e8 l     O .bss    00000008 reply_buffer
1fff12f0 g     O .bss    00000001 usb_configuration
1fff12f4 l     O .bss    00000004 tx_state
1fff12f8 l     O .bss    00000001 tx_noautoflush
1fff12fc l     O .bss    00000004 tx_packet
1fff1300 l     O .bss    00000001 transmit_previous_timeout
1fff1304 l     O .bss    00000004 rx_packet
1fff1308 g     O .bss    00000001 usb_seremu_transmit_flush_timer
1fff1309 l     O .bss    00000001 yield::running
1fff130c g     O .bss    00000004 EventResponder::firstInterrupt
1fff1310 g     O .bss    00000004 EventResponder::lastInterrupt
1fff1314 g     O .bss    00000004 MillisTimer::listActive
1fff1318 g     O .bss    00000004 EventResponder::lastYield
1fff131c g     O .bss    00000004 EventResponder::firstYield
1fff1320 g     O .bss    00000001 EventResponder::runningFromYield
1fff1324 g     O .bss    00000004 MillisTimer::listWaiting
1fff1328 l     O .bss    00000001 calibrating
1fff1329 l     O .bss    00000001 analog_reference_internal
1fff132c l     O .bss    00000004 rts_pin
1fff1330 l     O .bss    00000001 rx_buffer_head
1fff1331 l     O .bss    00000001 rx_buffer_tail
1fff1334 l     O .bss    00000040 tx_buffer
1fff1374 l     O .bss    00000040 rx_buffer
1fff13b4 l     O .bss    00000001 transmitting
1fff13b5 l     O .bss    00000001 tx_buffer_tail
1fff13b8 l     O .bss    00000004 transmit_pin
1fff13bc l     O .bss    00000001 tx_buffer_head
1fff13c0 l     O .bss    00000004 rts_pin
1fff13c4 l     O .bss    00000001 transmitting
1fff13c5 l     O .bss    00000001 rx_buffer_tail
1fff13c8 l     O .bss    00000028 tx_buffer
1fff13f0 l     O .bss    00000040 rx_buffer
1fff1430 l     O .bss    00000001 rx_buffer_head
1fff1431 l     O .bss    00000001 tx_buffer_tail
1fff1434 l     O .bss    00000004 transmit_pin
1fff1438 l     O .bss    00000001 tx_buffer_head
1fff143c l     O .bss    00000004 rts_pin
1fff1440 l     O .bss    00000001 rx_buffer_head
1fff1441 l     O .bss    00000001 rx_buffer_tail
1fff1444 l     O .bss    00000028 tx_buffer
1fff146c l     O .bss    00000040 rx_buffer
1fff14ac l     O .bss    00000001 transmitting
1fff14ad l     O .bss    00000001 tx_buffer_tail
1fff14b0 l     O .bss    00000004 transmit_pin
1fff14b4 l     O .bss    00000001 tx_buffer_head
1fff14b8 l     O .bss    00000004 rts_pin
1fff14bc l     O .bss    00000001 rx_buffer_head
1fff14bd l     O .bss    00000001 rx_buffer_tail
1fff14c0 l     O .bss    00000028 tx_buffer
1fff14e8 l     O .bss    00000040 rx_buffer
1fff1528 l     O .bss    00000001 transmitting
1fff1529 l     O .bss    00000001 tx_buffer_tail
1fff152c l     O .bss    00000004 transmit_pin
1fff1530 l     O .bss    00000001 tx_buffer_head
1fff1534 l     O .bss    00000004 rts_pin
1fff1538 l     O .bss    00000001 rx_buffer_head
1fff1539 l     O .bss    00000001 rx_buffer_tail
1fff153c l     O .bss    00000028 tx_buffer
1fff1564 l     O .bss    00000040 rx_buffer
1fff15a4 l     O .bss    00000001 transmitting
1fff15a5 l     O .bss    00000001 tx_buffer_tail
1fff15a8 l     O .bss    00000004 transmit_pin
1fff15ac l     O .bss    00000001 tx_buffer_head
1fff15b0 l     O .bss    00000004 rts_pin
1fff15b4 l     O .bss    00000001 rx_buffer_head
1fff15b5 l     O .bss    00000001 rx_buffer_tail
1fff15b8 l     O .bss    00000028 tx_buffer
1fff15e0 l     O .bss    00000040 rx_buffer
1fff1620 l     O .bss    00000001 transmitting
1fff1621 l     O .bss    00000001 tx_buffer_tail
1fff1624 l     O .bss    00000004 transmit_pin
1fff1628 l     O .bss    00000001 tx_buffer_head
1fff162c g     O .bss    00000004 __malloc_max_total_mem
1fff1630 g     O .bss    00000004 __malloc_max_sbrked_mem
1fff1634 g     O .bss    00000004 __malloc_top_pad
1fff1638 g     O .bss    00000028 __malloc_current_mallinfo
1fff1660 g     O .bss    00000008 usb_rx_byte_count_data
1fff1668 g     O .bss    00000004 errno
1fff166c g       .bss    00000000 __bss_end
1fff166c g       .bss    00000000 _ebss
1fff166c l       .bss    00000000 __bss_end__
20030000 g       .bss    00000000 _estack
c:\temp\arduino_build_Blink.ino\Blink.ino.elf:     file format elf32-littlearm
SYMBOL TABLE:
*p.s. all the serial buffers still there.. we need to find a solution for this issue.
 
Last edited:
Status
Not open for further replies.
Back
Top