Teensy 3.0 Beta10 Software

Status
Not open for further replies.

Paul

Administrator
Staff member
Update: Teensyduino for Teensy 3.0 has been officially released. These beta test copies will be removed.


Here is the latest "beta10" release for Teensy 3.0


Old beta download links removed. Please use the latest version:
https://www.pjrc.com/teensy/td_download.html



For use without Arduino, see the sample makefile in hardware/teensy/cores/teensy3

For first-time use on Windows, the Serial Installer is needed.

http://www.pjrc.com/teensy/serial_install.exe
http://www.pjrc.com/teensy/windows8.txt

For first-time use on Linux (as a non-root user), this udev rule is required.

http://www.pjrc.com/teensy/49-teensy.rules

Beta 10 is mainly a bug fix release.

Beta 10 also adds a RAM usage estimate after compiling. Please do not freak out: there is a known issue where Teensy 3.0 uses 4K RAM by default. Approximately 2.5K is USB buffering, and 1.5K is unnecessary code that's always included (eg, serial port buffers, etc). Future versions will eliminate unused code, and reduce USB buffering.

Please report any bugs. Always try to include a sample program that reproduces the problem!
 
Ok, here's a list that I believe covers most of the changes from beta 9 to 10.

Add missing newlib syscalls - fixes sprintf
Turn off strict ANSI - fixes snprintf and other non-ansi functions
Fix digitalWrite pullup resistor disable when writing low in input mode
Add Serial+Keyboard+Mouse+Joystick USB Type
Cleaned up USB #ifdef checks in device types (not a bug, just a code cleanup)
Fix SPI waveform timing
Fix SPI compile error (was missing ability to read SPCR - very rarely used by AVR code)
Fix makefile so avr/xxx.h files can used (was missing -I.)
Fix misc/obscure MK20DX128 register names & definitions
Add extern "C" xxx_isr function prototype
Define digitalPinToPortReg & digitalPinToBit (needed for some library)
Define _SFR_BYTE (for some library... I don't remember which one)
Keyword highlight analogReadAveraging
Added command line compile option to Arduino
Added ERW's auto-insert patch (places cursor at setup function)
Fixed special Keyboard error - was sometimes showing Leonardo's message
Added RAM usage estimate after compile
Added auto-scrolling to sketchbook and examples menus
 
Last edited:
Upon installing this the first time it seemed to work well, yesterday. I quit the app and restarted it this morning and I am getting this upon starting the Arduino app:

Cannot launch Java application

Uncaught exception in main method:
java.lang.ArithmeticException: / by zero

The only thing I can do from there is quit.

This is on OSX 10.7.5

I did install a new library last night, but I removed that, same thing. I removed the complete Arduino.app and just unzipped arduino-1.0.3-teensy3-beta10-macos.zip in /Applications, same thing happening. Then I downloaded 1.0.2 and that works okay. I have no idea what could be the problem. I didn't tinker with Java or antyhing like that. Could well be something on my machine, but I have yet to find out.
 
i had also this error, workarround: open "old" arduino, close all open sketches, close old arduino ide, reopen beta10 arduino.

cheers
 
Please post the full error, including the entire stack trace (many lines) with all files and line numbers.

Here's a screenshot. This is all I get, and then I can only quit the app.

screenshot20130119at448.png


It seems to happen when I switch to using an external editor. I just did the workaround suggested by michu, which worked, but then I edited my .ino file using vim, started the IDE again, and the same thing immediately happens.

Where can I find the stack trace? I've just started with the Arduino stuff a few weeks ago...
 
Last edited:
I too ran into the Divide by 0 exception. For me, it was with Beta 11. I thought it was just me because I had installed Java 7, installed some OS X updates and been playing with embedXcode around the same time. I spent some time investigating but could not find the root cause. Eventually the issue went away when I tried running Beta 9 and it did not throw the exception. After that, Beta 11 no longer threw the exception either. I hope this helps.

OS X 10.8.2
java version "1.6.0_37"
 
Sorry, forgot to say... I looked for something in the logs but never was able to find a log file with anything that looked connected to the Divide by 0 exception. Any advice on which log file to expect to see this in?
 
Do you have a "console" program in /Applications/Utilities? Maybe it will have the full java error in the logs?

Here is what I have in my console log, from the start of the app, to the quit:

20/1/13 12:36:57.629 PM [0x0-0x3f03f].cc.arduino.Arduino.teensyduino: [JavaAppLauncher] Requested [1.5*], launching in [1.6] instead.
20/1/13 12:36:59.065 PM [0x0-0x3f03f].cc.arduino.Arduino.teensyduino: Stable Library
20/1/13 12:36:59.065 PM [0x0-0x3f03f].cc.arduino.Arduino.teensyduino: =========================================
20/1/13 12:36:59.065 PM [0x0-0x3f03f].cc.arduino.Arduino.teensyduino: Native lib Version = RXTX-2.1-7
20/1/13 12:36:59.065 PM [0x0-0x3f03f].cc.arduino.Arduino.teensyduino: Java lib Version = RXTX-2.1-7
20/1/13 12:36:59.459 PM [0x0-0x3f03f].cc.arduino.Arduino.teensyduino: [LaunchRunner Error] processing.app.Base.main(String[]) threw an exception:
20/1/13 12:36:59.459 PM [0x0-0x3f03f].cc.arduino.Arduino.teensyduino: java.lang.ArithmeticException: / by zero.main(String[]) threw an exception:
20/1/13 12:36:59.459 PM [0x0-0x3f03f].cc.arduino.Arduino.teensyduino: at processing.app.syntax.TextAreaPainter.nextTabStop(TextAreaPainter.java:497)
20/1/13 12:36:59.459 PM [0x0-0x3f03f].cc.arduino.Arduino.teensyduino: at processing.app.syntax.TextAreaPainter.nextTabStop(TextAreaPainter.java:497)
20/1/13 12:36:59.459 PM [0x0-0x3f03f].cc.arduino.Arduino.teensyduino: at javax.swing.text.Utilities.getTabbedTextWidth(Utilities.java:242).java:497)
20/1/13 12:36:59.459 PM [0x0-0x3f03f].cc.arduino.Arduino.teensyduino: at javax.swing.text.Utilities.getTabbedTextWidth(Utilities.java:191).java:497)
20/1/13 12:36:59.460 PM [0x0-0x3f03f].cc.arduino.Arduino.teensyduino: at processing.app.syntax.JEditTextArea._offsetToX(JEditTextArea.java:582):497)
20/1/13 12:36:59.460 PM [0x0-0x3f03f].cc.arduino.Arduino.teensyduino: at processing.app.syntax.JEditTextArea.scrollTo(JEditTextArea.java:464)2):497)
20/1/13 12:36:59.460 PM [0x0-0x3f03f].cc.arduino.Arduino.teensyduino: at processing.app.syntax.JEditTextArea.scrollToCaret(JEditTextArea.java:429)7)
20/1/13 12:36:59.460 PM [0x0-0x3f03f].cc.arduino.Arduino.teensyduino: at processing.app.syntax.JEditTextArea.select(JEditTextArea.java:1205)a:429)7)
20/1/13 12:36:59.460 PM [0x0-0x3f03f].cc.arduino.Arduino.teensyduino: at processing.app.Editor.setSelection(Editor.java:1616)Area.java:1205)a:429)7)
20/1/13 12:36:59.460 PM [0x0-0x3f03f].cc.arduino.Arduino.teensyduino: at processing.app.Base.findInsertPoint(Base.java:737)6)Area.java:1205)a:429)7)
20/1/13 12:36:59.460 PM [0x0-0x3f03f].cc.arduino.Arduino.teensyduino: at processing.app.Base.handleOpen(Base.java:922):737)6)Area.java:1205)a:429)7)
20/1/13 12:36:59.460 PM [0x0-0x3f03f].cc.arduino.Arduino.teensyduino: at processing.app.Base.restoreSketches(Base.java:503)6)Area.java:1205)a:429)7)
20/1/13 12:36:59.460 PM [0x0-0x3f03f].cc.arduino.Arduino.teensyduino: at processing.app.Base.<init>(Base.java:420)java:503)6)Area.java:1205)a:429)7)
20/1/13 12:36:59.460 PM [0x0-0x3f03f].cc.arduino.Arduino.teensyduino: at processing.app.Base.main(Base.java:194)0)java:503)6)Area.java:1205)a:429)7)
20/1/13 12:36:59.461 PM [0x0-0x3f03f].cc.arduino.Arduino.teensyduino: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)va:1205)a:429)7)
20/1/13 12:36:59.461 PM [0x0-0x3f03f].cc.arduino.Arduino.teensyduino: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
20/1/13 12:36:59.461 PM [0x0-0x3f03f].cc.arduino.Arduino.teensyduino: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
20/1/13 12:36:59.461 PM [0x0-0x3f03f].cc.arduino.Arduino.teensyduino: at java.lang.reflect.Method.invoke(Method.java:597)DelegatingMethodAccessorImpl.java:25)
20/1/13 12:36:59.461 PM [0x0-0x3f03f].cc.arduino.Arduino.teensyduino: at apple.launcher.LaunchRunner.run(LaunchRunner.java:116)tingMethodAccessorImpl.java:25)
20/1/13 12:36:59.461 PM [0x0-0x3f03f].cc.arduino.Arduino.teensyduino: at apple.launcher.LaunchRunner.callMain(LaunchRunner.java:51)MethodAccessorImpl.java:25)
20/1/13 12:36:59.461 PM [0x0-0x3f03f].cc.arduino.Arduino.teensyduino: at apple.launcher.JavaApplicationLauncher.launch(JavaApplicationLauncher.java:52)ava:25)
20/1/13 12:37:01.596 PM [0x0-0x3f03f].cc.arduino.Arduino.teensyduino: Experimental: JNI_OnLoad called.


Hope this helps! I see from some of the posts here that there is a beta11. I will give that a shot, too.
 
I just tried arduino-1.0.3-teensy3-beta11-macos.zip, and the same thing happens as with beta10. I like to use vim as my external editor, so I'm going back to arduino-1.0.2-teensy3-beta9 again, which seems to be friendly to this setting.
 
Hope this helps!

YES!!! That's exactly the info I need. Well, it'll probably lead to more questions, but at least I can start looking into this.

If you can find 2 more bits of info, they might really help. One is the sketch Arduino is trying to open. The other is Arduino's preferences file. On Linux, it's stored in ~/.arduino/preferences. I'm not sure where it is on a mac, and right now my mac is inaccessible (I'm porting the IRremote library and it's got a big pile of precariously connected electronics and test gear on top of it.....)
 
As for code, I found that when I deleted everything under my initialization stuff, including the contents of setup(), I will not get the exception anymore. Then I started eliminating things, trying to figure out what exactly is causing this, by going back and forth between 1.0.2 and 1.0.3. I am baffled by the results though. At this point I am looking at this code only, and I still get the error:

//#include <Wire.h>

void setup() {
// Wire.begin();
}

If I delete the only line left inside setup(), I don't get the exception anymore. It's almost as if there is *anything*, including comments, inside setup(), the exception is thrown. Very strange.

This is the contents of my preferences file, which lives at /Users/<user>/Library/Arduino/preferences.txt on a Mac:

Code:
last.sketch5.location=196,115,500,600,457
export.application.fullscreen=false
preproc.imports.list=java.applet.*,java.awt.Dimension,java.awt.Frame,java.awt.event.MouseEvent,java.awt.event.KeyEvent,java.awt.event.FocusEvent,java.awt.Image,java.io.*,java.net.*,java.text.*,java.util.*,java.util.zip.*,java.util.regex.*
editor.font.macosx=Monaco,plain,10
preproc.web_colors=true
last.sketch2.path=/Users/paul/Documents/Arduino/MPU/MPU.ino
export.application.platform=true
update.check=true
update.id=-4541663603756956906
editor.indent=true
serial.stopbits=1
serial.databits=8
editor.font=Monaco,plain,10
editor.window.height.default=600
run.options.memory=false
editor.divider.size=0
editor.caret.blink=true
preproc.color_datatype=true
export.applet.separate_jar_files=false
last.sketch3.path=/Users/paul/Documents/Arduino/libraries/AdafruitWS2801/examples/strandtest/strandtest.pde
editor.update_extension=true
preproc.output_parse_tree=false
run.window.bgcolor=#FFFFFF
console.lines=4
upload.using=bootloader
console.error.file=stderr.txt
run.options.memory.maximum=256
editor.tabs.expand=true
upload.verify=true
editor.window.height.min=290
editor.keys.home_and_end_travel_far=true
menu.usb=serial
editor.languages.current=
board=teensy3
console=true
run.present.exclusive.macosx=true
last.sketch4.path=/Users/paul/Downloads/Arduino.app/Contents/Resources/Java/examples/01.Basics/Blink/Blink.ino
serial.parity=N
editor.tabs.size=2
console.length=500
last.sketch0.location=708,29,943,982,699
serial.port=/dev/tty.usbmodem12341
last.sketch2.location=999,234,556,758,615
run.options=
console.auto_clear=true
update.last=1358689808810
last.sketch4.location=620,293,685,753,610
build.verbose=false
editor.window.width.min=400
run.present.exclusive=true
export.application.platform.linux=true
menu.keys=en-us
last.sketch5.path=/Users/paul/Downloads/Arduino.app/Contents/Resources/Java/libraries/LiquidCrystal/examples/Display/Display.ino
editor.keys.home_and_end_travel_far.macosx=true
run.present.bgcolor=#666666
export.application.platform.windows=true
target=teensy
run.options.memory.initial=64
editor.keys.alternative_cut_copy_paste=false
editor.window.width.default=500
console.output.file=stdout.txt
preproc.substitute_unicode=true
run.present.stop.color=#cccccc
editor.external=false
last.screen.height=1050
editor.keys.shift_backspace_is_delete=true
last.sketch.count=0
export.delete_target_folder=true
last.sketch0.path=/Users/paul/Documents/Arduino/arduino_1_0_3_teensy_crash_test_not/arduino_1_0_3_teensy_crash_test_not.ino
last.serial.location=771,100,588,868
preproc.substitute_floats=true
editor.keys.alternative_cut_copy_paste.macosx=false
menu.speed=48
browser.linux=mozilla
editor.invalid=false
serial.debug_rate=9600
sketchbook.path=/Users/paul/Documents/Arduino
export.application.stop=true
editor.divider.size.windows=2
last.sketch1.path=/Users/paul/Documents/Arduino/staff/staff.ino
preproc.enhanced_casting=true
run.display=1
last.sketch1.location=1030,98,500,600,457
platform.auto_file_type_associations=true
editor.antialias=false
upload.verbose=false
programmer=arduino:avrispmkii
last.sketch3.location=578,364,611,669,526
preproc.save_build_files=false
last.screen.width=1680
export.application.platform.macosx=true

Good luck digging out your Mac, BTW :)
 
I haven't had time to look at this yet... but I did wrap up IRremote, so my mac is available again. ;)

I do have a hunch, or really just a guess. Here's a replacement pde.jar that removes one of the features that was added for Beta 10.

http://www.pjrc.com/teensy/beta/mac_div0_error_try1.zip

To install this, control-click on Arduino and choose "show package contents". The navigate to Contents/Resources/Java. Replace pde.jar in that folder with this one.
 
That fixed it! You're amazing ;-) So I'm onto trying beta12 now... unless you tell me that jar isn't compatible with beta12? Or should I just wait for a new beta with that fix?

What do you reckon is the feature that caused this, by the way?
 
Last edited:
Teensyduino 1.12 has the fix for this problem.

It turned out to be caused by code I adapted from ERW that attempted to position the cursor in your setup() function when opening a new file. ERW only tests his special Arduino modifications on Windows. It turned out to be somewhat buggy and even through it was only Java code, caused trouble on Macs. The same bug might happen on Windows. I saw it happen on Linux once, but the error was printed to the console panel, not causing Arduino to fail at startup. Obviously it was much worse on Mac OS-X.

Also, this sounded like a nice feature, but in practice it didn't work so well. I think it causes as much confusion as the supposed convenience it adds. I simply removed that code.
 
Hi, I'm getting an error when trying to compile anything in the gui on linux. I'm actually on Raspbian Wheezy.

My error is

/home/pi.../arduino-1.0.3/hardware/tools/arm-none-eabi/bin/arm-none-eabi-g++: 1: /home/pi.../arduino-1.0.3/hardware/tools/arm-none-eabi/bin/arm-none-eabi-g++: Syntax error: word unexpected (expecting ")" )
/home/pi.../arduino-1.0.3/hardware/tools/arm-none-eabi/bin/arm-none-eabi-g++ returned 2

I'm going to mess around with it and hopefully figure this out, but has anyone ran into this issue or know a fix? I tried verifying the examples scripts and everything is giving me this error.
 
Status
Not open for further replies.
Back
Top