Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: [1] 2  Send TopicPrint
Very Hot Topic (More than 25 Replies) Teensy 3 Low Cost (LC) (Read 27273 times)
stevech
Member
***
Offline


Posts: 147
Location: So. Calif. US
Joined: Jun 16th, 2013
Teensy 3 Low Cost (LC)
Mar 9th, 2015 at 3:16am
Print Post  
As mentioned here recently -- 
Using Arduino 1.06 (not 1.6), Teensyduino libraries at beta7, I can compile and run using the (bleah) Arduino IDE. 

But in Atmel Studio 6.2 w/Visual Micro, there's an error when compiling - complaint by asm that a command line argument is invalid.

The LC's core is a different but same family MCU; slower clock, smaller memory, not as many on-chip peripherals. GCC with AS 6.2 does compile for it correctly, using Arduino 1.06.  Arduino 1.6 is future TBD.

What's needed and can I help, get VM to do as AS 6.2 with VM can do, for the Teensy LC? Or better, VS 2013/Community.
« Last Edit: Mar 9th, 2015 at 3:16am by stevech »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Teensy 3 Low Cost (LC)
Reply #1 - Mar 9th, 2015 at 1:54pm
Print Post  
Thanks,

Yes the Teensy LC is compiling okay for me using the latest Visual Micro releases and Teensy/Arduino 1.6

To test you would set the compiler defines for Visual Micro using the project properties.

So please email your sketch or a sketch that fails to info [at] visualmicro.com.

Thanks
  
Back to top
WWW  
IP Logged
 
stevech
Member
***
Offline


Posts: 147
Location: So. Calif. US
Joined: Jun 16th, 2013
Re: Teensy 3 Low Cost (LC)
Reply #2 - Mar 9th, 2015 at 4:25pm
Print Post  
you used Arduino 1.6?
I am trying to use 1.06 because Teensy and Arduino 1.6 is still in early beta.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Teensy 3 Low Cost (LC)
Reply #3 - Mar 9th, 2015 at 4:39pm
Print Post  
Yes Arduino 1.6

You will see that the Teensy option in Visual Studio has been renamed to Teensy 1.0. This is so that non-beta Teensy users get a consistent build using Visual Micro.

In the latest Teensy beta the build process has become compatible with Arduino 1.6 with a few minor Visual Micro tweaks that were published in the last release.

So for the teensy beta install Arduino 1.6, then apply the TeensyDuno beta upgrade and in Visual Micro select the Arduino 1.6 application. This is the only combination for beta Teensy that is supported in Visual Micro.

Thanks
  
Back to top
WWW  
IP Logged
 
stevech
Member
***
Offline


Posts: 147
Location: So. Calif. US
Joined: Jun 16th, 2013
Re: Teensy 3 Low Cost (LC)
Reply #4 - Mar 9th, 2015 at 4:51pm
Print Post  
OK, thanks.
Prior to Arduino 1.6, I put 2 or 3 board-specific settings in the boards.txt file, and not in the project properties - because this avoiding have to setup custom properties for each project. 

I did add those same properties to the boards.txt file for Teensy 3.1 and LC but got the error for an invalid asm command line.

Could you please tell us what property settings are required for T3.1? And if possible, the beta Teensy LC which uses a different MCU and clock speed. 

Perhaps easiest is to post or send a simple blinky or some such working VS/VM project for these two MCUs with the properties set, rather than using the boards.txt approach. 
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Teensy 3 Low Cost (LC)
Reply #5 - Mar 9th, 2015 at 10:21pm
Print Post  
Hi,

The new teensy config works slightly differently when it comes to the -defines but I looked at it again and you can put slightly different ones in boards.txt. Example for the LC which supports 24 or 48 mhz (see boards.txt for all options)

Code
Select All
teensyLC.build.usbtype=USB_SERIAL
teensyLC.build.fcpu=48000000
teensyLC.build.keylayout=US_ENGLISH 



Thanks
« Last Edit: Mar 9th, 2015 at 10:36pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
stevech
Member
***
Offline


Posts: 147
Location: So. Calif. US
Joined: Jun 16th, 2013
Re: Teensy 3 Low Cost (LC)
Reply #6 - Mar 9th, 2015 at 10:27pm
Print Post  
F_CPU is 24MHz? It's 48MHz. There's a PLL but I though F_CPU was always the result of clocks and dividers yielding the CPU clock.

  
Back to top
 
IP Logged
 
stevech
Member
***
Offline


Posts: 147
Location: So. Calif. US
Joined: Jun 16th, 2013
Re: Teensy 3 Low Cost (LC)
Reply #7 - Mar 9th, 2015 at 10:38pm
Print Post  
OK thanks. I see the change.
  
Back to top
 
IP Logged
 
stevech
Member
***
Offline


Posts: 147
Location: So. Calif. US
Joined: Jun 16th, 2013
Re: Teensy 3 Low Cost (LC)
Reply #8 - Mar 10th, 2015 at 5:37am
Print Post  
Almost... but... here's what I've done, in time order

  • Install Arduino 1.6 replacing older 1.06
  • Install Teensyduino beta (latest) 
  • Install latest Visual Micro
  • Run Arduino 1.6. Teensy 3.x and Teensy LC are in the tools list. Built and ran blinky for the LC. 
  • Run AS 6.2.  The VM toolbar has Teensy 1.0 but no boards.
    No other Teensy choices. Arduino/AVR boards are there.

The instruction, earlier in this thread confuses me:
Quote:
for the teensy beta install Arduino 1.6, then apply the TeensyDuno beta upgrade and in Visual Micro select the Arduino 1.6 application.

Does the highlighted part, above, mean choose Arduino 1.6 from the VM toolbar where I do find Teensy 1.0, Arduino 1.0+ and 1.05+ but no Arduino 1.6?

Or is all this assuming I'm using VS 2013-Community and not AS 6.2?
Run VS 2013 community and I get the same VM menu choices as listed above.

I appreciate you patience with me.

« Last Edit: Mar 10th, 2015 at 5:44am by stevech »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Teensy 3 Low Cost (LC)
Reply #9 - Mar 10th, 2015 at 2:39pm
Print Post  
It would have been less confusing for you to leave the older arduino install and additional install Arduino 1.6 using the zip and not the windows installer.

With Arduino 1.6 in Visual Micro you need to remove the teensy 1.0 option by clearing the path and set the path for the Arduino 1.6 application.

In Visual Micro you will now only have Arduino 1.6 showing on the tool bar

Thanks
  
Back to top
WWW  
IP Logged
 
stevech
Member
***
Offline


Posts: 147
Location: So. Calif. US
Joined: Jun 16th, 2013
Re: Teensy 3 Low Cost (LC)
Reply #10 - Mar 10th, 2015 at 9:39pm
Print Post  
thanks. I used the msi installer rather than the zip simply because I didn't know the zip should have been used.

So now... using VS 2013 and VM I tried a hello world build for Teens 3.1 then Teensy LC. Both fail, for different reasons:

Compiling 'Teensy_helloWorld' for 'Teensy LC'

Build folder: ensyLC
Summary: Header=1 Prototypes=3 Imports=0
Additional Defines: 
Architecture Tools: c:\arduino/
Sketchbook: file:///C:/Users/steve/Documents/Arduino
Core Include Paths
Include Path 'c:\arduino\hardware\teensy\avr\cores\teensy3'
"c:\arduino/hardware/tools/arm/bin/arm-none-eabi-g++" -c {build.flags.optimize} -g -Wall -ffunction-sections -fdata-sections -MMD -nostdlib -fno-exceptions -felide-constructors -std=gnu++0x -fno-rtti -mthumb -mcpu=cortex-m0plus -D__MKL26Z64__ -DTEENSYDUINO=121 -DARDUINO=160 -DF_CPU={build.fcpu} -DARDUINO_ARCH_AVR -D{build.usbtype} -DLAYOUT_{build.keylayout} -I"c:\arduino\hardware\teensy\avr\cores\teensy3" Teensy_helloWorld.cpp" -o Teensy_helloWorld.cpp.o"
arm-none-eabi-g++*:error: {build.flags.optimize}: No such file or directory
Error compiling



and for Teensy 3.1 something is wrong with the properties
Build folder: ensy31
Summary: Header=1 Prototypes=3 Imports=0
Additional Defines: 
Architecture Tools: c:\arduino/
Sketchbook: file:///C:/Users/steve/Documents/Arduino
Core Include Paths
Include Path 'c:\arduino\hardware\teensy\avr\cores\teensy3'
"c:\arduino/hardware/tools/arm/bin/arm-none-eabi-g++" -c -Os -g -Wall -ffunction-sections -fdata-sections -MMD -nostdlib -fno-exceptions -felide-constructors -std=gnu++0x -fno-rtti -mthumb -mcpu=cortex-m4 -D__MK20DX256__ -DTEENSYDUINO=121 -DARDUINO=160 -DF_CPU={build.fcpu} -DARDUINO_ARCH_AVR -D{build.usbtype} -DLAYOUT_{build.keylayout} -I"c:\arduino\hardware\teensy\avr\cores\teensy3" Teensy_helloWorld.cpp" -o Teensy_helloWorld.cpp.o"
:macro names must be identifiers
:ISO C99 requires whitespace after the macro name [enabled by default]
:token "{" is not valid in preprocessor expressions


  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Teensy 3 Low Cost (LC)
Reply #11 - Mar 10th, 2015 at 9:40pm
Print Post  
Zip did not have to be used but the windows installer uninstalls the older version which can be annoying
  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Teensy 3 Low Cost (LC)
Reply #12 - Mar 10th, 2015 at 9:43pm
Print Post  
Can you first try with the project properties so that you replicate the testing here

F_CPU=48000000;USB_SERIAL_HID;LAYOUT_US_ENGLISH

Thanks
  
Back to top
WWW  
IP Logged
 
stevech
Member
***
Offline


Posts: 147
Location: So. Calif. US
Joined: Jun 16th, 2013
Re: Teensy 3 Low Cost (LC)
Reply #13 - Mar 10th, 2015 at 11:25pm
Print Post  
here's my latest attempt. This error is something missing in compiler optimization options flags obtained from the IDE by some unknown means:

Sketchbook: file:///C:/Users/steve/Documents/Arduino
Core Include Paths
Include Path 'c:\arduino\hardware\teensy\avr\cores\teensy3'
"c:\arduino/hardware/tools/arm/bin/arm-none-eabi-g++" -c {build.flags.optimize} -g -Wall -ffunction-sections -fdata-sections -MMD -nostdlib -fno-exceptions -felide-constructors -std=gnu++0x -fno-rtti -mthumb -mcpu=cortex-m0plus -D__MKL26Z64__ -DTEENSYDUINO=121 -DARDUINO=160 -DF_CPU={build.fcpu} -DARDUINO_ARCH_AVR -D{build.usbtype} -DLAYOUT_{build.keylayout} -I"c:\arduino\hardware\teensy\avr\cores\teensy3" Teensy_helloWorld.cpp" -o Teensy_helloWorld.cpp.o" -DF_CPU=48000000 -DUSB_SERIAL_HID -DLAYOUT_US_ENGLISH
arm-none-eabi-g++*:error: {build.flags.optimize}:
No such file or directory
Error compiling
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Teensy 3 Low Cost (LC)
Reply #14 - Mar 10th, 2015 at 11:56pm
Print Post  
Well Paul at pjrc does say it is beta Smiley

I just installed the latest version, my teensy was from last week.

In the latest version paul has added {build.flags.optimize}. You can see that in platform.txt

In the boards.txt he has added "build.flags.optimize=-Os" for all boards apart from Teensy LC which has the setting per speed 24/48

You can simply add the following to boards.txt

Code
Select All
teensyLC.build.flags.optimize=-Os 






« Last Edit: Mar 10th, 2015 at 11:57pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
stevech
Member
***
Offline


Posts: 147
Location: So. Calif. US
Joined: Jun 16th, 2013
Re: Teensy 3 Low Cost (LC)
Reply #15 - Mar 10th, 2015 at 11:58pm
Print Post  
And today Arduino released version 1.6.1. 
Paul has a new Teensyduino beta to match.
  
Back to top
 
IP Logged
 
stevech
Member
***
Offline


Posts: 147
Location: So. Calif. US
Joined: Jun 16th, 2013
Re: Teensy 3 Low Cost (LC)
Reply #16 - Mar 10th, 2015 at 11:59pm
Print Post  
Not your decision, but compiler optimization choice should be a project property, NOT a board property.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Teensy 3 Low Cost (LC)
Reply #17 - Mar 11th, 2015 at 12:02am
Print Post  
Point releases will usually work okay and I just used Paul latest beta release of today.

I don't think there is anything in 1.6.1 that will affect us.

The only item for discussion would be this but it's a discussion that has been had and changed so many times it probably doesn't affect us anymore

Quote:
Improved library name matching @PaulStoffregen. Avoids conflicts with libraries that bundle files equally named
  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Teensy 3 Low Cost (LC)
Reply #18 - Mar 11th, 2015 at 12:04am
Print Post  
Quote:
Not your decision, but compiler optimization choice should be a project property, NOT a board property


Agreed, in Visual Micro it will be project or configuration, in the same way that defines are at the moment.

When using a "debug" configuration you might want a different optimization level.

  
Back to top
WWW  
IP Logged
 
stevech
Member
***
Offline


Posts: 147
Location: So. Calif. US
Joined: Jun 16th, 2013
Re: Teensy 3 Low Cost (LC)
Reply #19 - Mar 11th, 2015 at 12:40am
Print Post  
In the most recent teensyduino beta, I this line is wrong

teensyLC.build.flags.c=

I'll tell Paul.
Maybe Arduino's  IDE doesn't care?
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint