Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 24 of 24

Thread: Teensy 3.0 Beta10 Software

  1. #1
    Administrator Paul's Avatar
    Join Date
    Oct 2012
    Posts
    124

    Teensy 3.0 Beta10 Software

    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

    http://www.pjrc.com/teensy/beta/ardu...linux32.tar.gz
    http://www.pjrc.com/teensy/beta/ardu...linux64.tar.gz
    http://www.pjrc.com/teensy/beta/ardu...ta10-macos.zip
    http://www.pjrc.com/teensy/beta/ardu...10-windows.zip

    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!

  2. #2
    Senior Member
    Join Date
    Nov 2012
    Posts
    342
    Beta 10 is mainly a bug fix release.
    Any specific details? I am looking for the SPI fix.

    BTW ... Your RAM usage indicator is great!

  3. #3
    Junior Member
    Join Date
    Dec 2012
    Posts
    8
    Beta 10 fixed the SPI issues that I was having

  4. #4
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    5,018
    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 by PaulStoffregen; 01-03-2013 at 07:48 PM.

  5. #5
    Senior Member
    Join Date
    Nov 2012
    Location
    Nice, France (I'm British though, not French)
    Posts
    714
    Yay for patch notes!

  6. #6
    Junior Member
    Join Date
    Jan 2013
    Posts
    15
    Hey Paul

    I try to compile the FastSPI library, that works fine on stock arduinos (including leonardo). however if I choose teensy 2.0 I get:

    FastSPI_LED/FastSPI_LED.cpp:540: error: ISO C++ forbids comparison between pointer and integer

    source: http://code.google.com/p/fastspi/sou...astSPI_LED.cpp

    any hints?

    cheers

  7. #7
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    5,018
    Quote Originally Posted by michu View Post
    FastSPI_LED/FastSPI_LED.cpp:540: error: ISO C++ forbids comparison between pointer and integer
    Change that line (and also line 555) to this:

    Code:
            if(pPort == (volatile uint8_t *)NOT_A_PIN) { /* do nothing */ }
    Or just use this copy:

    http://www.pjrc.com/teensy/arduino_l...astSPI_LED.zip

  8. #8
    Junior Member
    Join Date
    Jan 2013
    Posts
    15
    wow that was fast, thanks paul. I'll send this to the fastspi devs, thanks!

  9. #9
    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.

  10. #10
    Junior Member
    Join Date
    Jan 2013
    Posts
    15
    i had also this error, workarround: open "old" arduino, close all open sketches, close old arduino ide, reopen beta10 arduino.

    cheers

  11. #11
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    5,018
    Quote Originally Posted by neep View Post
    Uncaught exception in main method:
    java.lang.ArithmeticException: / by zero
    Please post the full error, including the entire stack trace (many lines) with all files and line numbers.

  12. #12
    Quote Originally Posted by PaulStoffregen View Post
    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.



    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 by neep; 01-19-2013 at 02:55 PM.

  13. #13
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    5,018
    Do you have a "console" program in /Applications/Utilities? Maybe it will have the full java error in the logs?

  14. #14
    Junior Member
    Join Date
    Jan 2013
    Posts
    9
    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"

  15. #15
    Junior Member
    Join Date
    Jan 2013
    Posts
    9
    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?

  16. #16
    Quote Originally Posted by PaulStoffregen View Post
    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(Util ities.java:242).java:497)
    20/1/13 12:36:59.459 PM [0x0-0x3f03f].cc.arduino.Arduino.teensyduino: at javax.swing.text.Utilities.getTabbedTextWidth(Util ities.java:191).java:497)
    20/1/13 12:36:59.460 PM [0x0-0x3f03f].cc.arduino.Arduino.teensyduino: at processing.app.syntax.JEditTextArea._offsetToX(JEd itTextArea.java:582):497)
    20/1/13 12:36:59.460 PM [0x0-0x3f03f].cc.arduino.Arduino.teensyduino: at processing.app.syntax.JEditTextArea.scrollTo(JEdit TextArea.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(JEditTe xtArea.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:161 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.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(Nativ e 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(Native MethodAccessorImpl.java:39)
    20/1/13 12:36:59.461 PM [0x0-0x3f03f].cc.arduino.Arduino.teensyduino: at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.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)De legatingMethodAccessorImpl.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(Java ApplicationLauncher.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.

  17. #17
    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.

  18. #18
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    5,018
    Quote Originally Posted by neep View Post
    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.....)

  19. #19
    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

  20. #20
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    5,018
    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.

  21. #21
    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 by neep; 01-20-2013 at 02:58 PM.

  22. #22
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    5,018
    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.

  23. #23
    Junior Member
    Join Date
    Feb 2013
    Posts
    1
    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.

  24. #24
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    5,018
    ARM-based Linux is not supported.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •