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 Send TopicPrint
Hot Topic (More than 8 Replies) Compiler Options for Teensy 3.1 (Read 8657 times)
Sina Sou
Newbies
*
Offline


Posts: 5
Joined: Nov 17th, 2013
Compiler Options for Teensy 3.1
Jul 15th, 2015 at 9:50pm
Print Post  
I am using AtmelStudio 6.2.1548+SP2 and I already installed the Teensyduino and VisualMicro in that environment .
I am wondering how can I change the compiler settings for arm gcc that is used for Teensy (Which menu options) I want to activate C++11 features in this environment.
Cheesy
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Compiler Options for Teensy 3.1
Reply #1 - Jul 16th, 2015 at 11:50am
Print Post  
Hi,

I am not sure exactly what you need to add but if just a simple compiler switch then you can try to add it to the "Extra Flags" in the Project (Global) section of the project properties.

Extra Flags - Project
Extra Flags - Configuration

To view the properties select the project node in the solution explorer and press "Alt+Enter" or "View>Properties Window". The properties should display as a tool window.
  
Back to top
IP Logged
 
Sina Sou
Newbies
*
Offline


Posts: 5
Joined: Nov 17th, 2013
Re: Compiler Options for Teensy 3.1
Reply #2 - Jul 16th, 2015 at 7:53pm
Print Post  
Tim@Visual Micro wrote on Jul 16th, 2015 at 11:50am:
Hi,

I am not sure exactly what you need to add but if just a simple compiler switch then you can try to add it to the "Extra Flags" in the Project (Global) section of the project properties.

Extra Flags - Project
Extra Flags - Configuration

To view the properties select the project node in the solution explorer and press "Alt+Enter" or "View>Properties Window". The properties should display as a tool window.


No,
This does not work even the project settings are related o AVR8 I think none of the settings from AtmelStudio affect the Teensy board selection settings.
I think it takes the settings saved and taken from a TeensyDuino setting file that I do not know its name but I am not sure how visual micro override some settings to the compiler like CPUFreq,....
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Compiler Options for Teensy 3.1
Reply #3 - Jul 17th, 2015 at 12:20pm
Print Post  
Hi,

If you are using a recent version of Visual Micro this property should be passed to the compiler. It will not affect the Ide but the first task musty be to affect the compile.

Arduino/Teensy build defs normally allow for the extra flags param and this is how Visual Micro manages to pass the flags to the compiler.

Please set "Extra Flags - Project" and also turn on "tools>visual micro>versbose". Then build and post the compiler output for one file.

Thanks
  
Back to top
IP Logged
 
Sina Sou
Newbies
*
Offline


Posts: 5
Joined: Nov 17th, 2013
Re: Compiler Options for Teensy 3.1
Reply #4 - Jul 17th, 2015 at 2:47pm
Print Post  
Tim@Visual Micro wrote on Jul 17th, 2015 at 12:20pm:
Hi,

If you are using a recent version of Visual Micro this property should be passed to the compiler. It will not affect the Ide but the first task musty be to affect the compile.

Arduino/Teensy build defs normally allow for the extra flags param and this is how Visual Micro manages to pass the flags to the compiler.

Please set "Extra Flags - Project" and also turn on "tools>visual micro>versbose". Then build and post the compiler output for one file.

Thanks


Hi,
Thanks for your reply.
I retried again and I filled the Extra Flags - Project with wrong switch 
In fact it should not compile, but this switch did not reflect into compiler parameters.
Please check the screenshot and the enclosed build output(verbose).

compiling 'SomeTeensyxx11' for 'Teensy 3.1'
Build folder: eensy31
Summary: Header=1 Prototypes=3 Imports=0
Additional Defines: 
Architecture Tools: C:\Program Files (x86)\Arduino/
Sketchbook: file:///C:/Users/lenovo-i5/Documents/Arduino
Core Include Paths
Include Path 'C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3'
"C:\Program Files (x86)\Arduino/hardware/tools/arm/bin/arm-none-eabi-g++" -c -O -g -Wall -ffunction-sections -fdata-sections -MMD -nostdlib -fno-exceptions -felide-constructors -std=gnu++0x -fno-rtti -mthumb -mcpu=cortex-m4 -D__MK20DX256__ -DTEENSYDUINO=124 -DARDUINO=165 -DF_CPU=96000000 -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I"C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3" \SomeCPPCX11.cpp" -o \SomeCPPCX11.cpp.o"
"C:\Program Files (x86)\Arduino/hardware/tools/arm/bin/arm-none-eabi-g++" -c -O -g -Wall -ffunction-sections -fdata-sections -MMD -nostdlib -fno-exceptions -felide-constructors -std=gnu++0x -fno-rtti -mthumb -mcpu=cortex-m4 -D__MK20DX256__ -DTEENSYDUINO=124 -DARDUINO=165 -DF_CPU=96000000 -DARDUINO_ARCH_AVR -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I"C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3" \SomeTeensyxx11.cpp" -o \SomeTeensyxx11.cpp.o"
Build Core Paths: C:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3
"C:\Program Files (x86)\Arduino/hardware/tools/arm/bin/arm-none-eabi-gcc" -O -Wl,--gc-sections,--relax,--defsym=__rtc_localtime=52711190 "-TC:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3/mk20dx256.ld" -mthumb -mcpu=cortex-m4 -o /SomeTeensyxx11.elf" \SomeCPPCX11.cpp.o" \SomeTeensyxx11.cpp.o" /core.a" 31" -larm_cortexM4l_math -lm
"C:\Program Files (x86)\Arduino/hardware/tools/arm/bin/arm-none-eabi-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 /SomeTeensyxx11.elf" /SomeTeensyxx11.eep"
"C:\Program Files (x86)\Arduino/hardware/tools/arm/bin/arm-none-eabi-objcopy" -O ihex -R .eeprom /SomeTeensyxx11.elf" /SomeTeensyxx11.hex"
Binary sketch size: 15,328 bytes (used 6% of a 262,144 byte maximum) (0.60 secs)
Minimum Memory Usage: 4616 bytes (7% of a 65536 byte maximum)
recipe.hooks.postbuild.1.pattern
"C:\Program Files (x86)\Arduino/hardware/tools/teensy_post_compile" "-file=SomeTeensyxx11" ensy31" "-tools=C:\Program Files (x86)\Arduino/hardware/tools" "-board=TEENSY31"
"C:\Program Files (x86)\Arduino/hardware/tools/teensy_post_compile" "-file=SomeTeensyxx11" ensy31" "-tools=C:\Program Files (x86)\Arduino/hardware/tools" "-board=TEENSY31"

  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Compiler Options for Teensy 3.1
Reply #5 - Jul 17th, 2015 at 2:51pm
Print Post  
Thanks for the info. Please confirm your visual micro version from tools>options>visual micro>version>version and versionMinor

Thanks
  
Back to top
IP Logged
 
Sina Sou
Newbies
*
Offline


Posts: 5
Joined: Nov 17th, 2013
Re: Compiler Options for Teensy 3.1
Reply #6 - Jul 17th, 2015 at 9:09pm
Print Post  
My version is 1.1507.05 
Version Minor 1
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Compiler Options for Teensy 3.1
Reply #7 - Jul 17th, 2015 at 11:36pm
Print Post  
Thanks, I just tested it and its a bug

There will be a fix over the next 24/48. 

Thanks for the report
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Compiler Options for Teensy 3.1
Reply #8 - Jul 18th, 2015 at 10:02pm
Print Post  
Sp2 is out with a fix for the extra flags. there are also some new ones pls see release notes or the project properties list
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint