Visual Studio Ide for Arduino
https://www.visualmicro.com/forums/YaBB.pl
>> >> Newbie with VS 2013 Community and Teensy
https://www.visualmicro.com/forums/YaBB.pl?num=1425359966

Message started by stevech on Mar 3rd, 2015 at 5:19am

Title: Newbie with VS 2013 Community and Teensy
Post by stevech on 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 "C:\Users\steve\AppData\Local\V.Micro\Arduino\Builds\Blink\teensy31\memcpy-armv7m.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.


Title: Re: Newbie with VS 2013 Community and Teensy
Post by Visual Micro on 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

Title: Re: Newbie with VS 2013 Community and Teensy
Post by stevech on Mar 3rd, 2015 at 6:18pm
Not using Arduino 1.6.  Have not installed it.
Using 1.0x

Title: Re: Newbie with VS 2013 Community and Teensy
Post by Visual Micro on 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


Title: Re: Newbie with VS 2013 Community and Teensy
Post by stevech on 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.


Title: Re: Newbie with VS 2013 Community and Teensy
Post by Visual Micro on 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 :)


Title: Re: Newbie with VS 2013 Community and Teensy
Post by stevech on 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.

Title: Re: Newbie with VS 2013 Community and Teensy
Post by Visual Micro on 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

Title: Re: Newbie with VS 2013 Community and Teensy
Post by Visual Micro on 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.

Title: Re: Newbie with VS 2013 Community and Teensy
Post by stevech on Mar 3rd, 2015 at 7:23pm
Yes, it's from file
memcpy-armv7m.S


Title: Re: Newbie with VS 2013 Community and Teensy
Post by stevech on Mar 3rd, 2015 at 7:25pm
Here's the first few lines of that .S file

Code (c++):
#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);

Title: Re: Newbie with VS 2013 Community and Teensy
Post by Visual Micro on 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

Title: Re: Newbie with VS 2013 Community and Teensy
Post by stevech on 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.

Title: Re: Newbie with VS 2013 Community and Teensy
Post by stevech on 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.

Title: Re: Newbie with VS 2013 Community and Teensy
Post by stevech on 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.

Title: Re: Newbie with VS 2013 Community and Teensy
Post by Visual Micro on 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

Title: Re: Newbie with VS 2013 Community and Teensy
Post by Visual Micro on 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.


Title: Re: Newbie with VS 2013 Community and Teensy
Post by stevech on 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?

Title: Re: Newbie with VS 2013 Community and Teensy
Post by Visual Micro on 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

Title: Re: Newbie with VS 2013 Community and Teensy
Post by stevech on 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.

Title: Re: Newbie with VS 2013 Community and Teensy
Post by Visual Micro on Mar 4th, 2015 at 10:02am
I have made sp4 the official release so it is the main download and will not show as beta.

The nice thing about 1.6 is the build process is very flexible, so you can do whatever you want

Title: Re: Newbie with VS 2013 Community and Teensy
Post by stevech on Mar 21st, 2015 at 9:52pm
using Teensyduino release 1.21 (not beta), VM + VS 2013 community - compiler errors on invalid command line parameters.

Has anyone gotten this to work for Teensy 3.1 or Teensy LC?

Title: Re: Newbie with VS 2013 Community and Teensy
Post by stevech on Mar 21st, 2015 at 11:18pm
Ah - I worked more and can build with Teensyduino 1.21 and Arduino 1.6.1 in c:\Arduino (rather than where I had previously placed it).

I had to add to the boards.txt file for the above the following

Code (c++):
teensy31.build.flags.ldspecs=

because the build for Teensy expects that and errors without at least a dummy value for "ldspecs".

So now, it builds but does not use the Teensy downloader. I'll search for how to get that working again (it used to work).

Title: Re: Newbie with VS 2013 Community and Teensy
Post by Visual Micro on Mar 21st, 2015 at 11:20pm
Hi,

Please see current status in our release notes and also see the Teensy page for configuration instructions

http://www.visualmicro.com/page/Visual-Micro-Product-Version-History-Fixes-and-Additions.aspx
http://www.visualmicro.com/page/Teensy-for-Microsoft-Visual-Studio.aspx

Due to the fact that all Arduino 1.6.1 Teensy definitions are listed as AVR we will not be able to support it for a while. The above provides initial untested support for Teensy 121 with Arduino 1.0.x. Please follow the new releases section of the forum for future notifications about Teensy.

Thanks

Visual Studio Ide for Arduino » Powered by YaBB 2.5.2!
YaBB Forum Software © 2000-2019. All Rights Reserved.