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
Locked Topic Newbie with VS 2013 Community and Teensy (Read 5754 times)
stevech
Member
***
Offline


Posts: 147
Location: So. Calif. US
Joined: Jun 16th, 2013
Newbie with VS 2013 Community and Teensy
Mar 3rd, 2015 at 5:19am
 
First  use of VS 2013/Community. Long time user of Atmel Studio, for AVR and Teensy.

Build for AVR, OK.
Build for Teensy 3.1 or Teensy LC gives this confusing error

C:\Arduino\hardware\tools\arm\bin\arm-none-eabi-gcc -c -g -assembler-with-cpp -mcpu=cortex-m4 -DUSB_VID=null -DUSB_PID=null -DARDUINO=106 -I"C:\Arduino\hardware\teensy\cores\teensy3" "C:\Arduino\hardware\teensy\cores\teensy3\memcpy-armv7m.S" -o m.S.o"  -mthumb -nostdlib -D__MK20DX256__ -DTEENSYDUINO=121 -DF_CPU=96000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH
arm-none-eabi-gcc*:error: unrecognized command line option '-assembler-with-cpp'
Error compiling core


the green highlights are items added to the Boards.text file as has long been done. Instead of properties in the VS project.

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


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Newbie with VS 2013 Community and Teensy
Reply #1 - Mar 3rd, 2015 at 12:58pm
 
Hi,

I guess you are using the new teensy beta for Arduino 1.6 that was release in the last week or so?

We don't support it yet because it works slightly differently to the previous version.

The work is done so we should be releasing an update during the next few days.

The Teensy page or our release service will show when support is available

http://www.visualmicro.com/page/Teensy-for-Microsoft-Visual-Studio.aspx

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


Posts: 147
Location: So. Calif. US
Joined: Jun 16th, 2013
Re: Newbie with VS 2013 Community and Teensy
Reply #2 - Mar 3rd, 2015 at 6:18pm
 
Not using Arduino 1.6.  Have not installed it.
Using 1.0x
« Last Edit: Mar 3rd, 2015 at 6:18pm by stevech »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Newbie with VS 2013 Community and Teensy
Reply #3 - Mar 3rd, 2015 at 7:03pm
 
Oh okay. Paul from pjrc just wrote a few days ago to say he was working on a beta so I assumed it was the only system that included support for the LC board.

The 1.0.x version of Arduino has hard coded build params and -assembler-with-cpp is always applied to cpp files.

I will look later today to see fif Paul has added a custom boards.txt property to signify not to use -assembler-with-cpp

If so I will add support to the 1.0.x ver and also build the 1.6 ver at the same time. 

I'll post here when the version is available

Thanks

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


Posts: 147
Location: So. Calif. US
Joined: Jun 16th, 2013
Re: Newbie with VS 2013 Community and Teensy
Reply #4 - Mar 3rd, 2015 at 7:08pm
 
The boards.txt file I long used with Atmel Studio 6.2 have, for Teensy, 3 lines added for Teensy 3.1 and 3.0. They're in the latest teensyduino release (uncommented-out as Paul ships with them commented for some reason).

I'm using Arduino 1.0x and Teensyduino latest beta. 

I also added those lines to boards.txt for the new teensy LC (low cost) which runs at 48MHz.

these boards.txt adds I did long ago so that one does not have to create special project properties for each project.

No doubt, cockpit trouble on my side but I'm currently stumped as I try to move from AS 6.2 to VS 2014 Community.

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


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Newbie with VS 2013 Community and Teensy
Reply #5 - Mar 3rd, 2015 at 7:16pm
 
There should be no difference, concerning boards.txt, between visual micro in atmel studio or visual studio.

In this case I expect the Teensy LC is a new board that will fail to compile in both VS and AS6

The reason being that visual micro has hard coded -assembler-with-cpp in the compiler statement.

Hopefully the definition for the LC in the boards.txt has something to tell us to omit the -assembler-with-cpp otherwise I will hard code a hack Smiley

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


Posts: 147
Location: So. Calif. US
Joined: Jun 16th, 2013
Re: Newbie with VS 2013 Community and Teensy
Reply #6 - Mar 3rd, 2015 at 7:18pm
 
What do I do to get rid of the compiler error for the argument
-assembler-with-cpp

as shown in red, above.

Teensy LC - ignore for now. I get the error above with VS 2013/Community but I didn't, with AS 6.2, compiling for Teensy 3.x. 
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Newbie with VS 2013 Community and Teensy
Reply #7 - Mar 3rd, 2015 at 7:20pm
 
This suggests you are using a newer version of teensy that doesn't use the -assembler-with-cpp option and you would now get the error in AS6 if it uses the same Teensyduino backend
  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Newbie with VS 2013 Community and Teensy
Reply #8 - Mar 3rd, 2015 at 7:21pm
 
Oh I also see from the error that this is for .s files and not .cpp files. I will look into why this is.
  
Back to top
WWW  
IP Logged
 
stevech
Member
***
Offline


Posts: 147
Location: So. Calif. US
Joined: Jun 16th, 2013
Re: Newbie with VS 2013 Community and Teensy
Reply #9 - Mar 3rd, 2015 at 7:23pm
 
Yes, it's from file
memcpy-armv7m.S

  
Back to top
 
IP Logged
 
stevech
Member
***
Offline


Posts: 147
Location: So. Calif. US
Joined: Jun 16th, 2013
Re: Newbie with VS 2013 Community and Teensy
Reply #10 - Mar 3rd, 2015 at 7:25pm
 
Here's the first few lines of that .S file
Code (C++)
Select All
#if defined(__MK20DX128__) || defined(__MK20DX256__)
#if defined (__ARM_ARCH_7M__) || defined (__ARM_ARCH_7EM__)
#define __ARM_FEATURE_UNALIGNED 1

/* This memcpy routine is optimised for Cortex-M3/M4 cores with/without
   unaligned access.

   If compiled with GCC, this file should be enclosed within following
   pre-processing check:
   if defined (__ARM_ARCH_7M__) || defined (__ARM_ARCH_7EM__)

   Prototype: void *memcpy (void *dst, const void *src, size_t count); 

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


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Newbie with VS 2013 Community and Teensy
Reply #11 - Mar 3rd, 2015 at 10:20pm
 
Is this your code or teensy code?

I can't find a version of TeensyDuino 1.2 with the Teensy LC which leads me to believe I am downloading a teensyduino version from a different place to you? https://www.pjrc.com/teensy/td_download.html

For arduino 1.0.5 I downloaded from the standard teensyduino which doesn't have the LC board. 

For Arduino 1.6 I downloaded the Teensyduino beta which does have the Teensy LC board

So where can I download a teensyduino for Arduino 1.0.5/1.0.6 that also contains the Teensy LC board?

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


Posts: 147
Location: So. Calif. US
Joined: Jun 16th, 2013
Re: Newbie with VS 2013 Community and Teensy
Reply #12 - Mar 3rd, 2015 at 10:23pm
 
The .S file is Teensy 3 code, in the "core" directory.
The C code I was compiling is the usual blinky example.

None of my code involved.
  
Back to top
 
IP Logged
 
stevech
Member
***
Offline


Posts: 147
Location: So. Calif. US
Joined: Jun 16th, 2013
Re: Newbie with VS 2013 Community and Teensy
Reply #13 - Mar 3rd, 2015 at 10:25pm
 
We can ignore the LC board. 
The same error happens with the Teensy 3.1 as the target.

Maybe related to the teensyduino version beta that's going on now.
  
Back to top
 
IP Logged
 
stevech
Member
***
Offline


Posts: 147
Location: So. Calif. US
Joined: Jun 16th, 2013
Re: Newbie with VS 2013 Community and Teensy
Reply #14 - Mar 3rd, 2015 at 10:28pm
 
Here's the URL to download the Teensyduino betas

https://forum.pjrc.com/threads/27689-Teensy-LC-Beta-Testing

This is mainly to get Teensy 3 (not LC) to be compatible with Arduino 1.0x as well as 1.6.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Newbie with VS 2013 Community and Teensy
Reply #15 - Mar 3rd, 2015 at 10:42pm
 
Okay thanks.

I've just uploaded a new sp4 as the beta on the downloads page.

The new Teensy software is compatible with Arduino 1.6 it means the build process is flexible and soft coded via the Teensyduino config files.

There seems little point in going back to make changes to the 1.0.x version which will leave the current release of TeensyDuino working.

If you install the latest Arduino Ide (which is 1.6), then install the Teensyduino beta over the top, then in Visual Micro use the Arduino 1.6 Ide setting it should work.

This means you can either install the current TeensyDuino release and use the "Teensy 1.0" application config in Visual Micro and/or use the latest TeensyDuino beta along with the Arduino 1.6 option in Visual Micro. You should be able to switch between the two using the toolbar if you want to compare compiler outputs between the existing and beta teensyduino.

Thanks

Edit: In the visual micro beta for the teensy beta, intellisense in 1.6 might need a little more work
« Last Edit: Mar 3rd, 2015 at 10:51pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Newbie with VS 2013 Community and Teensy
Reply #16 - Mar 3rd, 2015 at 10:55pm
 
ps: 

I don't think you should use the boards.txt definitions for Teensy any longer. It's best to use the visual micro project properties (shown here) because Teensy has changed how the core definitions work.

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


Posts: 147
Location: So. Calif. US
Joined: Jun 16th, 2013
Re: Newbie with VS 2013 Community and Teensy
Reply #17 - Mar 4th, 2015 at 12:24am
 
Aw shoot.

Is there an easy way to setup a template project to reuse so I don't have to reenter the properties for each new project? Or is there a way to "import" properties from a file?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Newbie with VS 2013 Community and Teensy
Reply #18 - Mar 4th, 2015 at 12:35am
 
Yes I will tell you what to change in boards.txt after next release. For now you can hard code in platform.txt pattern properties
  
Back to top
WWW  
IP Logged
 
stevech
Member
***
Offline


Posts: 147
Location: So. Calif. US
Joined: Jun 16th, 2013
Re: Newbie with VS 2013 Community and Teensy
Reply #19 - Mar 4th, 2015 at 12:40am
 
That sounds great.

Others on the Teensy forum use Visual Micro but perhaps none but me are using the Teensyduino beta update with VM.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint