PDA

View Full Version : Teensyduino 1.30 Beta #4 Available



Paul
09-05-2016, 11:16 PM
Here is a fourth beta test for Teensyduino 1.30.


Edit: old beta test linkes removed. Full non-beta release is here:
http://www.pjrc.com/teensy/td_download.html



Changes since Teensyduino 1.30-beta3 (https://forum.pjrc.com/threads/36165-Teensyduino-1-30-Beta-3-Available):


Fixes for Teensy 3.5 & 3.6
Update libraries: SPI, FastLED
Optimize analogRead

Wozzy
09-05-2016, 11:49 PM
Is it OK to run this over top of Beta3, or is a new installation recommended?

defragster
09-06-2016, 12:06 AM
Wozzy: I've never had a TD beta that didn't essentially freshen all that is Teensy, just always put on top unless the IDE had to change.

PaulStoffregen
09-06-2016, 12:28 AM
Yeah, it's ok to install over the top of 1.30-beta3.

One thing the installer does not handle well (or at all really) is the case where files are deleted from the new version. This issue is pretty rare, especially since I tend to avoid deleting files because I know this issue exists. But when a library like FastLED reorganizes and moves or deletes files, it's possible to end up with the new files plus the old one which should be gone.

defragster
09-06-2016, 12:38 AM
Using remote desktop to update my Teensy WIN10 Desktop from my laptop.

Started install and went to local machine. On return the DONE screen looked like this. Done button worked to EXIT installer:
8051

IDE 1.6.11 shows correct version. Three open editor files with changes were flagged as changed.

Compiled okay the new sdFat_SDIO_beta code, but left the ksT_3.6 in an odd state. Will have to go down and reset and investigate.

Tried TYQT integration - it wasn't able to communicate with that T_3.6, but showed online. Recompiled for ksT_3.5 and it went offline. Removed TYQT - going down to start over.

defragster
09-06-2016, 01:21 AM
Paul I got to my machine and restarted the devices and all seems well without TYQT in the picture.

Posting this on T_3.5 thread I saw the T_3.6 is showing the wrong number of PWM's at 20 not 22?
The code is printing this:: Serial.print( "CORE_NUM_PWM ="); Serial.println( CORE_NUM_PWM );

Also why does Serial.print( "F_MEM ="); Serial.println( F_MEM ); show such an odd number >> F_MEM =25714286?

for T_3.6::

CPU is T_3.6
F_CPU =180000000
ARDUINO =10611
F_PLL =180000000
F_BUS =60000000
F_MEM =25714286
NVIC_NUM_INTERRUPTS =100
DMA_NUM_CHANNELS =32
CORE_NUM_TOTAL_PINS =64
CORE_NUM_DIGITAL =64
CORE_NUM_INTERRUPT =64
CORE_NUM_ANALOG =23
CORE_NUM_PWM =20

defragster
09-06-2016, 01:27 AM
Paul one other question:
The Teensy bootloader is on the secondary processor. Is that ever changed once it leaves your hands? That is can you reprogram that chip with a TeensyDuino update?

I ask because TYQT was working better it seems before the TD1.30b4 install. I'm wondering if there are ever changes to improve bootloader behavior that might explain why TYQT is not looking right when it was just before.

KurtE
09-06-2016, 02:15 AM
I installed the new beta, which pretty well matched my core stuff, except I see Paul fixed a few comments and the like in Analog so sunk up...

The one thing I brought back in was the outstanding Pull request: https://github.com/PaulStoffregen/cores/pull/166
That grabs the Serial number before going into HSRun mode. As when I tried building the TeensySDIODemo program after the install for the T3.6 at 240mhz, when it finished, it changed Comm Ports, and when I loaded in the latest TyQt it showed the problem of no serial number.

So I patched to the two files and ran it again and now back to the right Comm Port and TyQT knows it is serial #: 2055....

Kurt

P.S. - Defragster as you mentioned there not sure about NUM_PWN being same?

if no one else looks at it, I will take a look in morning.

defragster
09-06-2016, 04:13 AM
I did my single file mk20dx128.c patch (https://forum.pjrc.com/threads/91-teensy-3-MAC-address?p=113762&viewfull=1#post113762) - just hitting the request before HSRUN - and everything after that goes fine with TYQT.

With Ethernet being a thing I'd vote for PJRC getting and storing ser# and MAC across the realm as needed - for USB and general purposes.

So that works - like yours Kurt across 120+ HSRUN and so does Frank's using the startup_early_hook() call. A single uniform solution would be cool, PJRC does it anyhow - then just one or two static 32 bit values and a macro or function?

defragster
09-06-2016, 04:27 AM
Looking at KS - I'm not sure how "25 Analog Inputs" squares with "CORE_NUM_ANALOG =23", are the two ADC's analog inputs too?:


62 I/O Pins (42 breadboard friendly)
•25 Analog Inputs to 2 ADCs with 13 bits resolution
•2 Analog Outputs (DACs) with 12 bit resolution
•20 PWM Outputs (Teensy 3.6 has 22 PWM)

KurtE
09-06-2016, 02:20 PM
Looking at KS - I'm not sure how "25 Analog Inputs" squares with "CORE_NUM_ANALOG =23", are the two ADC's analog inputs too?:
I put in Pull Request: https://github.com/PaulStoffregen/cores/pull/172
To separate the two sets of counts, and updated PWM to 22 on K66 and update Analog counts on both (25 and 27)

Not sure if Paul needs/wants to pull this in for this release or not...


On Other issue (T3.6 Serial #):

Will try your single file change for getting the serial number. Personally don't care which approach is taken, but would be nice if one was, as without it, I get random Serial ports on the different platforms, especially if you plug in two of them.

Edit:
Tried out the single file change and it appears like the serial number is working updated comments on pull request. Can either change/do other Pull or ....

PaulStoffregen
09-06-2016, 07:34 PM
We really need this long-overdue release to support Teensy 3.2, LC and older boards.

I'm freezing all updates for Teensy 3.5 & 3.6 in Teensyduino 1.30. Stuff like the eeprom & serial number in HSRUN will get merged after 1.30 releases, hopefully very soon. I'll begin betas for 1.31 in just a couple weeks, so there won't be a long wait. My general plan is a non-beta 1.31 release in mid-October around the time most people have received their 3.5 / 3.6 boards.

For now 1.30, I want to focus on stable for 3.2, LC and older.

PaulStoffregen
09-06-2016, 07:36 PM
Has anyone tried this with FastLED using hardware SPI and APA102 LEDs?

If not, I'll dig my APA102s out of a box later today.....

defragster
09-06-2016, 08:30 PM
I have my dotstar strip and a prop for T_3.1 and the T_3.5/T_3.6. Just need to find a quick sample to setup.

I just noticed a bare TEENSYŽ 3.1 on my desk - so teensy compared to the hulking KS units!

I posted an HSRUN edit (https://forum.pjrc.com/threads/91-teensy-3-MAC-address?p=113762&viewfull=1#post113762) for serial# - harder to do the PULL than the code - that was T_3.6 ifdef specific. Doing this read before HSRUN as far as I saw made the value usable thereafter the old ways, including USB usage for TYQT and other.


// if we need faster than the crystal, turn on the PLL
#if defined(__MK66FX1M0__)
#if F_CPU > 120000000
*(uint32_t *)&FTFL_FCCOB3 = 0x41070000;
FTFL_FSTAT = FTFL_FSTAT_CCIF;
while (!(FTFL_FSTAT & FTFL_FSTAT_CCIF)) {}
SMC_PMCTRL = SMC_PMCTRL_RUNM(3); // enter HSRUN mode
while (SMC_PMSTAT != SMC_PMSTAT_HSRUN) ; // wait for HSRUN
#endif

defragster
09-06-2016, 08:55 PM
IDE 1.6.11 installed with TeensyDuino 1.30 beta4 on Windows 10 Pro

DOTSTAR #30 count strip runs from Prop shield on T_3.2:
> Prop shield 9DOF tracking sketch
> Cylon sketch modified to my strip on Prop.

Cylon sketch Works on second Prop_LC shield:
> T_3.1
> T_3.5
> T_3.6 beta3



#include "FastLED.h"

#define NUM_LEDS 30
//#define DATA_PIN 7
#define DATA_PIN 11
#define CLK_PIN 13

CRGB leds[NUM_LEDS];

void setup() {
Serial.begin(57600);
Serial.println("resetting");
// LEDS.addLeds<WS2812,DATA_PIN,RGB>(leds,NUM_LEDS);
pinMode(7, OUTPUT);
digitalWrite(7, HIGH);
FastLED.addLeds<APA102, BGR>(leds, NUM_LEDS); // PJRC
LEDS.setBrightness(84);
}

// rest unchanged

Frank B
09-06-2016, 09:27 PM
For now 1.30, I want to focus on stable for 3.2, LC and older.
Sounds like a good plan :)

Frank B
09-06-2016, 09:33 PM
Paul one other question:
The Teensy bootloader is on the secondary processor. Is that ever changed once it leaves your hands? That is can you reprogram that chip with a TeensyDuino update?

Tim, I *think* I have read a long time ago that the teensyloader.exe updates that chip sometimes. I'm not sure, wether i'm remember that correctly or not..

Frank B
09-06-2016, 09:41 PM
Paul, did you include the serial-# for HS_RUN ?
This would be good as a *last* import to the current version.
The problem is, if you change between <=120MHz and >120MHz, then Teensys get a new COM-Port, at least with windows.... that's a bit annoying... esp. for users who don't use TYQT.

defragster
09-06-2016, 10:09 PM
Frank - Paul noted above he didn't want to do any changes to TD_1.30 other than stabilizing the already shipping models.

I agree with you that the failed Serial number makes using the HSRUN T_3.6 a real bother, and I proposed what I found to be a minimal K66 specific edit for this case only and post #14 above from some days back. It results in the current way of reading that area to work as it seems to pre-read that before the voltage wall goes up and the read seems to persists - if not forever - at least until the usb_init completes and some time after in typical sketches.

In fact the only avoidable trouble in the whole Beta test process to be honest was shipping the T_3.6 PROTO boards with no serial number set. Had they had at least a placeholder number this could have been resolved sooner to better effect. And with less trouble in using them.

KurtE
09-06-2016, 10:15 PM
We really need this long-overdue release to support Teensy 3.2, LC and older boards.

I'm freezing all updates for Teensy 3.5 & 3.6 in Teensyduino 1.30. Stuff like the eeprom & serial number in HSRUN will get merged after 1.30 releases, hopefully very soon. I'll begin betas for 1.31 in just a couple weeks, so there won't be a long wait. My general plan is a non-beta 1.31 release in mid-October around the time most people have received their 3.5 / 3.6 boards.

For now 1.30, I want to focus on stable for 3.2, LC and older.
Sounds great. Would be good to have a released version that supports the current released version of Arduino.

As for when you take in new pull requests, makes complete sense. For example the one about reporting the wrong number of PWM or Arduino pins, while the change is probably safe (ie. change a few #defines that really are not used anywhere), no reason to hold up getting this release out the door.

defragster
09-07-2016, 04:16 AM
Paul:
In July I took an older machine with virgin HDD with Win7 Pro upgraded to Win10 PRO and JUST put on IDE 1.6.11 and TD 1.30b4 and using '# pragma message "FastLED version 3.001.001"' sketch of CYLON and BLINK compiled and uploaded and ran with no issues one each on the Beta 1&3 K66's I got.

So on a fresh Win 10 machine with those Arduino tools - including FASTLED - all seems well. { whine - since I didn't need to use the Serial USB to debug with no serial # /whine }

NOTE: on first plugging in a SERIAL running Teensy, Windows 10 did interrupt for 'Installing USB Serial', so that hasn't changed.

PaulStoffregen
09-07-2016, 01:14 PM
I've (finally) released Teensyduino 1.30.

http://www.pjrc.com/teensy/td_download.html

KurtE
09-07-2016, 01:35 PM
:D - Any changes from beta 4?

PaulStoffregen
09-07-2016, 01:49 PM
Just a minor fix in TimerOne & TimerThree. Otherwise it's pretty much identical to beta4.

KurtE
09-07-2016, 07:49 PM
FYI - I updated to this release, then merged in my later changes and everything is happy!

Also installed Arduino 16.11 Plus TeensyDuino 1.30 on Odroid and so far looks like it works

I plugged in T3.6 beta board in to it, and was able to program Blink. First compile took maybe 15-20 seconds, but 2nd compile took about 5, which is not to bad when it is sitting maybe 15 feet from me and no cable connected from here...

Here shows picture of my desktop with Arduino running on it, plus VNCViewer to Odroid XU4 desktop, with Arduino running.

8082

Forgot to mention: I coppied my latest version of sources in Teensy3 over to Odroid and rebuilt blink and now lsusb -v shows proper serial #

defragster
09-07-2016, 08:16 PM
I did 3 installs - no problem.
Laptop on 1.6.9 and new 1.6.11 - but didn't compile/run anything. Used Remote desktop and updated my 1.6.11 beta4 to release TD_1.30, but again didn't compile anything yet. Have to update my 'new test' machine. And I copied my 'Serial#' read before HSRUN to one install so it goes well.

Side note I was watching on Remote Desktop and something about the TeensyInstaller UI doesn't show well under Remote Desktop as shown in post 5. I've not done this before so I'm not saying it is new, but not pretty after the 'install copy' starts - everything up until then was well drawn.

el_supremo
09-07-2016, 08:47 PM
Using Beta #4, I tested the problem which occurred in first release of K66 when a sketch had more than 512kB in flash - I don't know if this should be in the k66/T3.6 thread or whether it is TD related but I've posted it here for now. I used the code below which has a very large array in it. It uploads and is executed without crashing or losing the Serial port.

// Define a very large array as const to make sure that code over
// 512kB will upload to properly. When compiled, the IDE reports:
// Sketch uses 1,047,964 bytes (99%) of program storage space. Maximum is 1,048,576 bytes.
const short array[500 * 1024] = {43, 22, 67, -4};

void setup()
{
Serial.begin(9600);
while (!Serial);
delay(1000);

int32_t sum = 0;
for (int i = 0; i < rand(); i++) {
sum += array[i];
}
Serial.println(sum);
}

void loop()
{
}

BUT, I then tried the version of my vocoder which has all the sample loops in flash memory (which was what first detected the problem). TD uploads it and reports "Reboot OK" but it still loses the Serial port (Tools|Port is gray). Before I upload it, I make sure that the Serial port is correct.
I am going to make up a sketch which uses just the sample loop data to see whether it works. I'll report back once I've get that tested.

Pete

el_supremo
09-07-2016, 11:43 PM
The code in the attached zip file defines 11 large arrays of audio samples. It just prints a total of the number of samples in all the arrays.
In loops.cpp, loops8 is commented and the code will compile, upload and run.
Uncomment loops8 and the sketch will compile and upload, TD will say "Reboot OK" but the Serial port will be grayed out.

Pete

defragster
09-08-2016, 12:13 AM
Tim, I *think* I have read a long time ago that the teensyloader.exe updates that chip sometimes. I'm not sure, wether i'm remember that correctly or not..

Thanks Frank - I've never seen it said - but it seems like it would be an important tool (in the right hands) to correct any 'shortcomings'.

Hopefully Paul can address this as it could be important for those not using TeensyLoader generally if it is the case. Because I assume it would be something specific to that program to do this so using any other means of upload would never get those changes made. Like if it were done to alter T_3.6 behavior on large sketch uploads.

1101010
09-08-2016, 03:23 AM
In the GUI tool documentation sidebar for
AudioSynthToneSweep->play function, it states that time parameter is in milliseconds, but it is really (float) seconds.

Makes for some funny moaning noises when you put in 100. :)

defragster
09-08-2016, 07:30 AM
Used the released TeensyDuino 1.30 with SNOOZE Beta under IDE 1.6.11 to good effect - no issues - there is hope for writing EEPROM in a T_3.6 sketch compiled at HSRUN speeds!

tubelab.com
09-10-2016, 12:37 AM
Has anyone tried to use the Encoder library with a T3.6. Anything that I try to compile with TeensyDuino 1.30 release (or Beta 4) that includes Encoder.h generates several errors. I'm using Arduino 1.6.11. This even occurs with the two knobs example given on the Encoder library page. http://www.pjrc.com/teensy/td_libs_Encoder.html

I designed a breadboard for a music synthesizer that uses Paul's audio library, the audio shield, 53 pots (multiplexed), and 4 encoders with plans for more. The CPU board has a dual footprint for plugging in a T3.2 or a T3.6. Every I/O on a 3.2 is used, and I need more, hence the plans for using a 3.6. I just got my early reward T3.6 today, but can't get the encoder library to work. I am basically a hardware guy, and have limited software experience. The rest of my synthesizer seems to work with the T3.6 if I comment out the encoders and hard code their settings.

Wozzy
09-10-2016, 05:30 AM
Has anyone tried to use the Encoder library with a T3.6. Has anyone tried to use the Encoder library with a T3.6.

Tubelab.com
Yes, I'm using an encoder right now on my Teensy 3.6 with Arduino 1.6.11 and Teensyduino 1.3.0 b4
I successfully used both the encoder library, and the hardware quadrature decoder in FTM1
I haven't tried FTM2 yet.

tubelab.com
09-10-2016, 01:11 PM
I tried a fresh install of Arduino 1.6.11 and Teensyduino 1.3.0 b4. I get errors trying to compile the example code when T3.5 or T3.6 is chosen. It works and runs on T3.2. I am at a loss as to how to proceed. Anyone have and suggestions.

Errors:

Arduino: 1.6.11 (Windows 7), TD: 1.30-beta4, Board: "Teensy 3.6, Serial, 180 MHz, US English"

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries D:\Documents\Arduino\libraries -fqbn=teensy:avr:teensy36:usb=serial,speed=180opt,k eys=en-us -ide-version=10611 -build-path C:\Users\GEORGE~1\AppData\Local\Temp\buildfa0dca03 a37fee65eff087fd84d55fd8.tmp -warnings=none -verbose D:\Documents\Arduino\two_encoders\two_encoders.ino
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries D:\Documents\Arduino\libraries -fqbn=teensy:avr:teensy36:usb=serial,speed=180opt,k eys=en-us -ide-version=10611 -build-path C:\Users\GEORGE~1\AppData\Local\Temp\buildfa0dca03 a37fee65eff087fd84d55fd8.tmp -warnings=none -verbose D:\Documents\Arduino\two_encoders\two_encoders.ino
Using board 'teensy36' from platform in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr
Using core 'teensy3' from platform in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr
Detecting libraries used...
"C:\Program Files (x86)\Arduino\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -felide-constructors -std=gnu++0x -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK66FX1M0__ -DTEENSYDUINO=130 -DARDUINO=10611 -DF_CPU=180000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3" "C:\Users\GEORGE~1\AppData\Local\Temp\buildfa0dca03 a37fee65eff087fd84d55fd8.tmp\sketch\two_encoders.i no.cpp" -o "nul"
"C:\Program Files (x86)\Arduino\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -felide-constructors -std=gnu++0x -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK66FX1M0__ -DTEENSYDUINO=130 -DARDUINO=10611 -DF_CPU=180000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3" "-ID:\Documents\Arduino\libraries\Encoder" "C:\Users\GEORGE~1\AppData\Local\Temp\buildfa0dca03 a37fee65eff087fd84d55fd8.tmp\sketch\two_encoders.i no.cpp" -o "nul"
"C:\Program Files (x86)\Arduino\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -felide-constructors -std=gnu++0x -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK66FX1M0__ -DTEENSYDUINO=130 -DARDUINO=10611 -DF_CPU=180000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3" "-ID:\Documents\Arduino\libraries\Encoder" "D:\Documents\Arduino\libraries\Encoder\Encoder.cpp" -o "nul"
"C:\Program Files (x86)\Arduino\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -felide-constructors -std=gnu++0x -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK66FX1M0__ -DTEENSYDUINO=130 -DARDUINO=10611 -DF_CPU=180000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3" "-ID:\Documents\Arduino\libraries\Encoder" "C:\Users\GEORGE~1\AppData\Local\Temp\buildfa0dca03 a37fee65eff087fd84d55fd8.tmp\sketch\two_encoders.i no.cpp" -o "nul"
Generating function prototypes...
"C:\Program Files (x86)\Arduino\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -felide-constructors -std=gnu++0x -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK66FX1M0__ -DTEENSYDUINO=130 -DARDUINO=10611 -DF_CPU=180000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3" "-ID:\Documents\Arduino\libraries\Encoder" "C:\Users\GEORGE~1\AppData\Local\Temp\buildfa0dca03 a37fee65eff087fd84d55fd8.tmp\sketch\two_encoders.i no.cpp" -o "C:\Users\GEORGE~1\AppData\Local\Temp\buildfa0dca03 a37fee65eff087fd84d55fd8.tmp\preproc\ctags_target_ for_gcc_minus_e.cpp"
"C:\Program Files (x86)\Arduino\tools-builder\ctags\5.8-arduino10/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\Users\GEORGE~1\AppData\Local\Temp\buildfa0dca03 a37fee65eff087fd84d55fd8.tmp\preproc\ctags_target_ for_gcc_minus_e.cpp"
Compiling sketch...
"C:\Program Files (x86)\Arduino\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -c -O -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -fno-exceptions -felide-constructors -std=gnu++0x -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK66FX1M0__ -DTEENSYDUINO=130 -DARDUINO=10611 -DF_CPU=180000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3" "-ID:\Documents\Arduino\libraries\Encoder" "C:\Users\GEORGE~1\AppData\Local\Temp\buildfa0dca03 a37fee65eff087fd84d55fd8.tmp\sketch\two_encoders.i no.cpp" -o "C:\Users\GEORGE~1\AppData\Local\Temp\buildfa0dca03 a37fee65eff087fd84d55fd8.tmp\sketch\two_encoders.i no.cpp.o"
In file included from D:\Documents\Arduino\two_encoders\two_encoders.ino :8:0:

D:\Documents\Arduino\libraries\Encoder/Encoder.h:61:11: error: 'IO_REG_TYPE' does not name a type

volatile IO_REG_TYPE * pin1_register;

^

D:\Documents\Arduino\libraries\Encoder/Encoder.h:62:11: error: 'IO_REG_TYPE' does not name a type

volatile IO_REG_TYPE * pin2_register;

^

D:\Documents\Arduino\libraries\Encoder/Encoder.h:63:2: error: 'IO_REG_TYPE' does not name a type

IO_REG_TYPE pin1_bitmask;

^

D:\Documents\Arduino\libraries\Encoder/Encoder.h:64:2: error: 'IO_REG_TYPE' does not name a type

IO_REG_TYPE pin2_bitmask;

^

D:\Documents\Arduino\libraries\Encoder/Encoder.h: In constructor 'Encoder::Encoder(uint8_t, uint8_t)':

D:\Documents\Arduino\libraries\Encoder/Encoder.h:82:11: error: 'struct Encoder_internal_state_t' has no member named 'pin1_register'

encoder.pin1_register = PIN_TO_BASEREG(pin1);

^

D:\Documents\Arduino\libraries\Encoder/Encoder.h:82:46: error: 'PIN_TO_BASEREG' was not declared in this scope

encoder.pin1_register = PIN_TO_BASEREG(pin1);

^

D:\Documents\Arduino\libraries\Encoder/Encoder.h:83:11: error: 'struct Encoder_internal_state_t' has no member named 'pin1_bitmask'

encoder.pin1_bitmask = PIN_TO_BITMASK(pin1);

^

D:\Documents\Arduino\libraries\Encoder/Encoder.h:83:45: error: 'PIN_TO_BITMASK' was not declared in this scope

encoder.pin1_bitmask = PIN_TO_BITMASK(pin1);

^

D:\Documents\Arduino\libraries\Encoder/Encoder.h:84:11: error: 'struct Encoder_internal_state_t' has no member named 'pin2_register'

encoder.pin2_register = PIN_TO_BASEREG(pin2);

^

D:\Documents\Arduino\libraries\Encoder/Encoder.h:85:11: error: 'struct Encoder_internal_state_t' has no member named 'pin2_bitmask'

encoder.pin2_bitmask = PIN_TO_BITMASK(pin2);

^

D:\Documents\Arduino\libraries\Encoder/Encoder.h:92:31: error: 'struct Encoder_internal_state_t' has no member named 'pin1_register'

if (DIRECT_PIN_READ(encoder.pin1_register, encoder.pin1_bitmask)) s |= 1;

^

D:\Documents\Arduino\libraries\Encoder/Encoder.h:92:54: error: 'struct Encoder_internal_state_t' has no member named 'pin1_bitmask'

if (DIRECT_PIN_READ(encoder.pin1_register, encoder.pin1_bitmask)) s |= 1;

^

D:\Documents\Arduino\libraries\Encoder/Encoder.h:92:66: error: 'DIRECT_PIN_READ' was not declared in this scope

if (DIRECT_PIN_READ(encoder.pin1_register, encoder.pin1_bitmask)) s |= 1;

^

D:\Documents\Arduino\libraries\Encoder/Encoder.h:93:31: error: 'struct Encoder_internal_state_t' has no member named 'pin2_register'

if (DIRECT_PIN_READ(encoder.pin2_register, encoder.pin2_bitmask)) s |= 2;

^

D:\Documents\Arduino\libraries\Encoder/Encoder.h:93:54: error: 'struct Encoder_internal_state_t' has no member named 'pin2_bitmask'

if (DIRECT_PIN_READ(encoder.pin2_register, encoder.pin2_bitmask)) s |= 2;

^

D:\Documents\Arduino\libraries\Encoder/Encoder.h:93:66: error: 'DIRECT_PIN_READ' was not declared in this scope

if (DIRECT_PIN_READ(encoder.pin2_register, encoder.pin2_bitmask)) s |= 2;

^

D:\Documents\Arduino\libraries\Encoder/Encoder.h: In static member function 'static void Encoder::update(Encoder_internal_state_t*)':

D:\Documents\Arduino\libraries\Encoder/Encoder.h:271:40: error: 'struct Encoder_internal_state_t' has no member named 'pin1_register'

uint8_t p1val = DIRECT_PIN_READ(arg->pin1_register, arg->pin1_bitmask);

^

D:\Documents\Arduino\libraries\Encoder/Encoder.h:271:60: error: 'struct Encoder_internal_state_t' has no member named 'pin1_bitmask'

uint8_t p1val = DIRECT_PIN_READ(arg->pin1_register, arg->pin1_bitmask);

^

D:\Documents\Arduino\libraries\Encoder/Encoder.h:271:72: error: 'DIRECT_PIN_READ' was not declared in this scope

uint8_t p1val = DIRECT_PIN_READ(arg->pin1_register, arg->pin1_bitmask);

^

D:\Documents\Arduino\libraries\Encoder/Encoder.h:272:40: error: 'struct Encoder_internal_state_t' has no member named 'pin2_register'

uint8_t p2val = DIRECT_PIN_READ(arg->pin2_register, arg->pin2_bitmask);

^

D:\Documents\Arduino\libraries\Encoder/Encoder.h:272:60: error: 'struct Encoder_internal_state_t' has no member named 'pin2_bitmask'

uint8_t p2val = DIRECT_PIN_READ(arg->pin2_register, arg->pin2_bitmask);

^

Using library Encoder in folder: D:\Documents\Arduino\libraries\Encoder (legacy)
Error compiling for board Teensy 3.6.
^

D:\Documents\Arduino\libraries\Encoder/Encoder.h:93:66: error: 'DIRECT_PIN_READ' was not declared in this scope

if (DIRECT_PIN_READ(encoder.pin2_register, encoder.pin2_bitmask)) s |= 2;

^

D:\Documents\Arduino\libraries\Encoder/Encoder.h: In static member function 'static void Encoder::update(Encoder_internal_state_t*)':

D:\Documents\Arduino\libraries\Encoder/Encoder.h:271:40: error: 'struct Encoder_internal_state_t' has no member named 'pin1_register'

uint8_t p1val = DIRECT_PIN_READ(arg->pin1_register, arg->pin1_bitmask);

^

D:\Documents\Arduino\libraries\Encoder/Encoder.h:271:60: error: 'struct Encoder_internal_state_t' has no member named 'pin1_bitmask'

uint8_t p1val = DIRECT_PIN_READ(arg->pin1_register, arg->pin1_bitmask);

^

D:\Documents\Arduino\libraries\Encoder/Encoder.h:271:72: error: 'DIRECT_PIN_READ' was not declared in this scope

uint8_t p1val = DIRECT_PIN_READ(arg->pin1_register, arg->pin1_bitmask);

^

D:\Documents\Arduino\libraries\Encoder/Encoder.h:272:40: error: 'struct Encoder_internal_state_t' has no member named 'pin2_register'

uint8_t p2val = DIRECT_PIN_READ(arg->pin2_register, arg->pin2_bitmask);

^

D:\Documents\Arduino\libraries\Encoder/Encoder.h:272:60: error: 'struct Encoder_internal_state_t' has no member named 'pin2_bitmask'

uint8_t p2val = DIRECT_PIN_READ(arg->pin2_register, arg->pin2_bitmask);

^

Error compiling for board Teensy 3.6.

KurtE
09-10-2016, 03:05 PM
It appears to me that you have your own copy of encoder library which is in your Arduino\libraries folder.

As this library is found there, it is used instead of the one installed with current version of Teensyduino, which is located in:

(where your Arduino is installed)\hardware\teensy\avr\libraries\Encoder
The example for me compiles fine on Teensy 3.6. So try removing your local copy and see if it works for you.

tubelab.com
09-10-2016, 04:32 PM
Kurt,

Thanks for the help. The sketch now compiles fine without errors. There is still some broken stuff, but I can deal with that.

ElOtroMateo
09-13-2016, 06:49 PM
I believe I found an error in the Ethernet library. In socket.cpp, function socketRecv, line 236.

It is currently:


233: if (ret > len) ret = len; // more data available than buffer length
234: uint16_t ptr = state[s].RX_RD;
235: read_data(s, ptr, buf, ret);
236: ptr += len;
237: state[s].RX_RD = ptr;
238: state[s].RX_RSR -= ret;
239: uint16_t inc = state[s].RX_inc + ret;


but should be:


233: if (ret > len) ret = len; // more data available than buffer length
234: uint16_t ptr = state[s].RX_RD;
235: read_data(s, ptr, buf, ret);
236: ptr += ret; // len is requested length, ret is available length
237: state[s].RX_RD = ptr;
238: state[s].RX_RSR -= ret;
239: uint16_t inc = state[s].RX_inc + ret;

defragster
09-14-2016, 10:23 PM
This warning shows on EEPROM.h usage:



I:\arduino_16_11\hardware\teensy\avr\libraries\EEP ROM/EEPROM.h:144:15: warning: variable 'e' set but not used [-Wunused-but-set-variable]

EEPtr e = idx;

Not sure if 'e' is always unused and can just go away? Not new I looked before but never get to fixing it.

KurtE
09-14-2016, 10:39 PM
This warning shows on EEPROM.h usage:



Not sure if 'e' is always unused and can just go away? Not new I looked before but never get to fixing it.
It looks like it could be moved into the #else clause as it is not used in the __arm__ case

defragster
09-15-2016, 04:19 AM
Thanks Kurt - I was in there looking for a way to wrap anything when the K66 was first NoGo on EEPROM and never got back. Still on HSRUN- had an idea for watching cycle counts for timing and suddenly it isn't pretty . . . back to it.

KurtE
09-15-2016, 02:07 PM
Looking up at github, looks like there is a pull request created yesterday to fix this warning...

Jay1011
09-15-2016, 06:55 PM
I tried installing Arduino 1.6.11 and Teensyduino 1.30 on a fresh Fedora 24 MATE install. The Teensyduino installation script completed without error.

However, uploading to the Teensy failed with the message "unable to find Teensy loader."

I traced this down to Fedora 24 installing libpng version 1.6 (the newest) whereas the Teensy loader requires version 1.2 of libpng.

Running Teensy loader directly shows the problem:



[jsk@new-host-6 arduino]$ /home/jsk/arch/x86_64/packages/arduino/arduino-1.6.11/hardware/teensy/../tools/teensy
/home/jsk/arch/x86_64/packages/arduino/arduino-1.6.11/hardware/teensy/../tools/teensy: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory


The Fedora repos do contain version 1.2 of libpng, which can be installed concurrently with the default version 1.6. Doing so makes the Teensy loader work correctly. I'm not sure how to best address this problem at Teensyduino installation time. Unless there's a specific need to version 1.2 of libpng, it might be best to just load 'libpng.so' rather than a specific version, if that's possible (I'm hardly a Linux shared lib expert).

Frank B
09-20-2016, 09:22 PM
Please have a look here (BUG):
https://forum.pjrc.com/threads/37192-USB-quot-All-of-the-Above-quot-not-working-(Win-10)?p=115924#post115924

gnkarn
09-20-2016, 09:39 PM
after upgrade , i receive the following message
exec: "/hardware/tools/arm/bin/arm-none-eabi-g++": file does not exist

( still using arduino die 1.6.9 ), any hints?, thanks

MichaelMeissner
09-20-2016, 09:54 PM
after upgrade , i receive the following message
exec: "/hardware/tools/arm/bin/arm-none-eabi-g++": file does not exist

( still using arduino die 1.6.9 ), any hints?, thanks

Assuming you are running Linux, it may be the same error Jay1011 saw. Go in with the shell, and go to the Teensy install directory, and try to execute "./hardware/tools/arm/bin/arm-none-eabi-g++" (note there is almost certainly a period in front of the first /, which tells the OS to use the current directory). If you get the message like Jay1011 saw, then you need to load the old libpng.so. If you got a message saying that a shared library loader what not present, it likely means you are on a 64-bit system and loaded the 32-bit Teensy (or the ARM teensy), and vice versa if you are on a 32-bit system.

gnkarn
09-20-2016, 11:37 PM
Thankyou WILL revise my configuration,
Just to add more detail , is a mac , running Windows 10
I also use visual studio, and that one works fine ,
That is why I'm a little bit lost .

gnkarn
09-21-2016, 12:57 AM
after review of my config , i can confirm it is not the case .

the windows version is only one , no need to select 32 , 64b, so i have it correctly set.
so it seams that me other thing causing conflict on the teensyduino 1.3

does it work over 1.6.9 ?

other idea?

mongrol
10-16-2016, 02:29 AM
Looks like the missing libpng12 bug has hit Ubuntu Yakkety Yak as well. I'm assuming it's so old now that Distro's have dropped it and developers shouldn't be building against it. Are we likely to get a newer libpng1.6 teensy loader?

PaulStoffregen
10-31-2016, 09:54 AM
I believe I found an error in the Ethernet library. In socket.cpp, function socketRecv, line 236.


Yes, confirmed, that's a bug. Fixed it just now (https://github.com/PaulStoffregen/Ethernet/commit/5ad3a38aeb4571a17c90a2cb580e83d0e60304db). Thanks! :)

Frank B
11-14-2016, 07:27 PM
Does USB-Audio (output) not work, or is somethingwrong with my installation ?
Not even the WaveFilePlayerUSB Example works ? (T 3.6 )

Or is it just the full moon here.. or too much Bacardi ?

Edit: TD 1.31 (not beta)

Frank B
11-14-2016, 08:35 PM
Forget all what was written here..

Frank B
11-14-2016, 08:57 PM
Forget all what was written here..

duff
11-14-2016, 10:20 PM
Does USB-Audio (output) not work, or is somethingwrong with my installation ?
Not even the WaveFilePlayerUSB Example works ? (T 3.6 )

Or is it just the full moon here.. or too much Bacardi ?

Edit: TD 1.31 (not beta)
I can use Serial-Midi-Audio with my Mac 10.9.5, Teensyduino 1.31, did the USB Audio interface change between then? One thing I've noticed is that I have to use the button to get it reprogram. It doesn't recognize upload request.

Frank B
11-14-2016, 10:23 PM
Does not work at all with my machine (win10)

Not related to USB-Audio : Unfortuantely it is too late now and i must stop, but there is a tricky bug in SPI.h or SD.h.. i hope i can find it tomorrow-evening:

The line "NVIC_ICER2 = interruptSave[2];" in SPI.H causes Audio-problems. Perhaps with playing wav only( reading SD).

PaulStoffregen
11-17-2016, 10:52 AM
Looks like the missing libpng12 bug has hit Ubuntu Yakkety Yak as well. I'm assuming it's so old now that Distro's have dropped it and developers shouldn't be building against it. Are we likely to get a newer libpng1.6 teensy loader?

For the 1.31, I bundled a copy of libpng12. I tested on Ubuntu 16.10. My hope is it'll fix things on other distros, but I only test Ubuntu (x86) and Raspbian (arm).

The libpng situation is really tough. It's poorly planned approach to long-term binary compatibility for Linux desktop software. No matter which libpng you link for your program's own PNG image manipulation, the many GTK libraries depend on the system's libpng library. It's impossible (as nearly as I can tell) to create a program which links to the GTK system libraries for compatibility with the user's system, but doesn't depend on a specific version of libpng that was present on the build system.

Even when I link a static libpng12.a, the system's dynamic libpng also gets linked because of GTK's dependencies. The modern Linux linking process discovers and dynamically links *lots* of related libraries which aren't part of the actual linker command to build the program.

The best solution I've been able to find is linking with rpath and supplying a copy of libpng12.so.0.

defragster
11-22-2016, 07:21 AM
I think an error in the Ethernet library

You need to provide details on what led you to that for anything to happen to fix them . . .

PaulStoffregen
11-22-2016, 11:06 AM
I just recently worked quite a lot with the Ethernet library, to add support for the newer W5500 chip. The library does work very well with W5100 and W5200, and the new version (only on github today) supports W5500.

If there is some sort of problem, please see the "Forum Rule" which appears at the top of every page.