Go to Post It's good to hear I'm not nuts. - sanddrag [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 02-08-2016, 22:02
joeojazz joeojazz is offline
Registered User
FRC #5712
 
Join Date: Jan 2016
Location: Hemlock
Posts: 42
joeojazz is an unknown quantity at this point
Visual Studio

Our team wants to switch to c++ and program in Visual Studio we where wondering if it is possible to program and deploy code to the robo-rio from Visual Studio. We have found c sharp templates to deploy from Visual Studio but not a c++ one.
__________________
Reply With Quote
  #2   Spotlight this post!  
Unread 02-08-2016, 22:37
marshall's Avatar
marshall marshall is offline
My pants are louder than yours.
FRC #0900 (The Zebracorns)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2003
Location: North Carolina
Posts: 1,258
marshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond repute
Re: Visual Studio

Quote:
Originally Posted by joeojazz View Post
Our team wants to switch to c++ and program in Visual Studio we where wondering if it is possible to program and deploy code to the robo-rio from Visual Studio. We have found c sharp templates to deploy from Visual Studio but not a c++ one.
I'll bite... why Visual Studio?
__________________
"La mejor salsa del mundo es la hambre" - Miguel de Cervantes
"The future is unwritten" - Joe Strummer
"Simplify, then add lightness" - Colin Chapman
Reply With Quote
  #3   Spotlight this post!  
Unread 02-08-2016, 23:50
balloman balloman is offline
Sophomore Programmer
AKA: Bernard
FRC #0034 (Rockets)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2016
Location: Athens, AL
Posts: 14
balloman is on a distinguished road
Re: Visual Studio

Quote:
Originally Posted by marshall View Post
I'll bite... why Visual Studio?
I assume because of how nice it is to code in Visual Studio
Reply With Quote
  #4   Spotlight this post!  
Unread 03-08-2016, 00:02
JamesTerm's Avatar
JamesTerm JamesTerm is offline
Terminator
AKA: James Killian
FRC #3481 (Bronc Botz)
Team Role: Engineer
 
Join Date: May 2011
Rookie Year: 2010
Location: San Antonio, Texas
Posts: 298
JamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to behold
Re: Visual Studio

Quote:
Originally Posted by marshall View Post
I'll bite... why Visual Studio?
The Visual Studio compiler is much more powerful and easier to use... well easier for someone who uses it professionally on a daily basis.

Maybe I'm bias, but it has been so much preferred that we went through the trouble of writing all the code simulated in visual studio environment, and then porting it over later. As debugging remotely is a real nightmare and 10x more time consuming (that 10x is a conservative estimate, probably more time considering all the times we had to redeploy code).

Last I checked, visual studio 2013 and above can have an Arduino IDE environment, but I've never tested that yet. It could work, but then the trick would be to get WPI libraries built as well... or link to them from VS. I think it can be done, but I haven't really had a chance to pursue this.
Reply With Quote
  #5   Spotlight this post!  
Unread 03-08-2016, 00:20
Jaci's Avatar
Jaci Jaci is offline
Registered User
AKA: Jaci R Brunning
FRC #5333 (Can't C# | OpenRIO)
Team Role: Mentor
 
Join Date: Jan 2015
Rookie Year: 2015
Location: Perth, Western Australia
Posts: 253
Jaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond repute
Re: Visual Studio

If you want to get the code to work nicely with Visual Studio, you're going to have to do a bit of manual work.

Step 1: Get the WPILib and NT-Core header files. These will usually be under ~/wpilib

You can add these to your project's header files include directory. This should fix up any false-alarm syntax errors you might be getting.

Step 2: Configure your build system.

This is a bit difficult. First, you need the FRC C++ toolchain installed and added to your PATH.

Next, you have to use some form of build system to send over and compile your code. You can use the one provided by WPILib for this.
WPILib uses ANT to build and deploy code. Visual Studio supports ANT builds and you can find instructions here. Reconfigure your build targets to use this build system, and you should be set to go. If you're stuck looking for what tasks to run, run a simple build in eclipse and take note of what tasks are executed, that should help you.

Keep in mind this is only to build and deploy code. The code you build will not run on your system, as it's built for an ARM target (the roborio)
__________________
Jacinta R

Curtin FRC (5333+5663) : Mentor
5333 : Former [Captain | Programmer | Driver], Now Mentor
OpenRIO : Owner

Website | Twitter | Github
jaci.brunning@gmail.com
Reply With Quote
  #6   Spotlight this post!  
Unread 03-08-2016, 07:26
marshall's Avatar
marshall marshall is offline
My pants are louder than yours.
FRC #0900 (The Zebracorns)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2003
Location: North Carolina
Posts: 1,258
marshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond repute
Re: Visual Studio

Quote:
Originally Posted by JamesTerm View Post
The Visual Studio compiler is much more powerful and easier to use... well easier for someone who uses it professionally on a daily basis.
I had no idea Visual Studio was a compiler.

That's sarcasm folks, calm down. For the record, I work in a plethora of development environments as well as compilers as a professional on a daily basis. They are all equally crap, except for VIM, which isn't technically an IDE but there are enough enhancements to it these days that I count it as one.
__________________
"La mejor salsa del mundo es la hambre" - Miguel de Cervantes
"The future is unwritten" - Joe Strummer
"Simplify, then add lightness" - Colin Chapman

Last edited by marshall : 03-08-2016 at 07:28.
Reply With Quote
  #7   Spotlight this post!  
Unread 03-08-2016, 07:40
Jaci's Avatar
Jaci Jaci is offline
Registered User
AKA: Jaci R Brunning
FRC #5333 (Can't C# | OpenRIO)
Team Role: Mentor
 
Join Date: Jan 2015
Rookie Year: 2015
Location: Perth, Western Australia
Posts: 253
Jaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond repute
Re: Visual Studio

Quote:
Originally Posted by marshall View Post
I had no idea Visual Studio was a compiler.

That's sarcasm folks, calm down. For the record, I work in a plethora of development environments as well as compilers as a professional on a daily basis. They are all equally crap, except for VIM, which isn't technically an IDE but there are enough enhancements to it these days that I count it as one.

Visual Studio isn't a compiler, but MSVC is

I think the main attraction to Visual Studio is just how $@#$@#$@#$@# good IntelliSense is. The only system I've seen come close is JetBrains' code completion, but IntelliSense still tops it IMHO.
__________________
Jacinta R

Curtin FRC (5333+5663) : Mentor
5333 : Former [Captain | Programmer | Driver], Now Mentor
OpenRIO : Owner

Website | Twitter | Github
jaci.brunning@gmail.com
Reply With Quote
  #8   Spotlight this post!  
Unread 03-08-2016, 07:50
marshall's Avatar
marshall marshall is offline
My pants are louder than yours.
FRC #0900 (The Zebracorns)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2003
Location: North Carolina
Posts: 1,258
marshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond repute
Re: Visual Studio

Quote:
Originally Posted by Jaci View Post
Visual Studio isn't a compiler, but MSVC is

I think the main attraction to Visual Studio is just how $@#$@#$@#$@# good IntelliSense is. The only system I've seen come close is JetBrains' code completion, but IntelliSense still tops it IMHO.
It does have some perks. If I were writing in a consistent language then I could see where that would be very useful. I've been using VS lately with some work in Unity and on the CTRE HERO board.
__________________
"La mejor salsa del mundo es la hambre" - Miguel de Cervantes
"The future is unwritten" - Joe Strummer
"Simplify, then add lightness" - Colin Chapman
Reply With Quote
  #9   Spotlight this post!  
Unread 03-08-2016, 11:30
ozrien's Avatar
ozrien ozrien is offline
Omar Zrien
AKA: Omar
no team
Team Role: Mentor
 
Join Date: Sep 2006
Rookie Year: 2003
Location: Sterling Heights, MI
Posts: 521
ozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant futureozrien has a brilliant future
Re: Visual Studio

Quote:
Originally Posted by Jaci View Post
...I think the main attraction to Visual Studio is just how $@#$@#$@#$@# good IntelliSense is...
+1 this.
Reply With Quote
  #10   Spotlight this post!  
Unread 03-08-2016, 11:57
JamesTerm's Avatar
JamesTerm JamesTerm is offline
Terminator
AKA: James Killian
FRC #3481 (Bronc Botz)
Team Role: Engineer
 
Join Date: May 2011
Rookie Year: 2010
Location: San Antonio, Texas
Posts: 298
JamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to behold
Re: Visual Studio

Quote:
Originally Posted by marshall View Post
I had no idea Visual Studio was a compiler.
Yes, Visual Studio Compiler...
That's my wording and I'm sticking with it!

Also... in your critique of Visual Studio... did you try it with the Visual Assist plugin? This really makes a difference.
Reply With Quote
  #11   Spotlight this post!  
Unread 03-08-2016, 13:06
ahaltom ahaltom is offline
Registered User
FRC #5712
 
Join Date: Jan 2015
Location: Hemlock High School
Posts: 11
ahaltom is a glorious beacon of lightahaltom is a glorious beacon of lightahaltom is a glorious beacon of lightahaltom is a glorious beacon of lightahaltom is a glorious beacon of light
Re: Visual Studio

Quote:
Originally Posted by Jaci View Post
If you want to get the code to work nicely with Visual Studio, you're going to have to do a bit of manual work.

Step 1: Get the WPILib and NT-Core header files. These will usually be under ~/wpilib

You can add these to your project's header files include directory. This should fix up any false-alarm syntax errors you might be getting.

Step 2: Configure your build system.

This is a bit difficult. First, you need the FRC C++ toolchain installed and added to your PATH.

Next, you have to use some form of build system to send over and compile your code. You can use the one provided by WPILib for this.
WPILib uses ANT to build and deploy code. Visual Studio supports ANT builds and you can find instructions here. Reconfigure your build targets to use this build system, and you should be set to go. If you're stuck looking for what tasks to run, run a simple build in eclipse and take note of what tasks are executed, that should help you.

Keep in mind this is only to build and deploy code. The code you build will not run on your system, as it's built for an ARM target (the roborio)
Thanks for the reply, Jaci! It's great to see that someone has worked with robot code in Visual Studio. I've used Visual Studio a TON in college, so it really appeals to me more than Eclipse does (IntelliSense is amazing). I'll work with Joeojazz and try to get Visual Studio working properly. You may hear from Team 5712 in the next few days if we hit any bumps in the road, but we'll give it a shot!

Alex
Team 5712 Mentor

Last edited by ahaltom : 03-08-2016 at 13:11. Reason: typo
Reply With Quote
  #12   Spotlight this post!  
Unread 03-08-2016, 13:33
Rangel(kf7fdb)'s Avatar
Rangel(kf7fdb) Rangel(kf7fdb) is offline
John Rangel
FRC #0842 (Falcon Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Phoenix, AZ
Posts: 725
Rangel(kf7fdb) has a reputation beyond reputeRangel(kf7fdb) has a reputation beyond reputeRangel(kf7fdb) has a reputation beyond reputeRangel(kf7fdb) has a reputation beyond reputeRangel(kf7fdb) has a reputation beyond reputeRangel(kf7fdb) has a reputation beyond reputeRangel(kf7fdb) has a reputation beyond reputeRangel(kf7fdb) has a reputation beyond reputeRangel(kf7fdb) has a reputation beyond reputeRangel(kf7fdb) has a reputation beyond reputeRangel(kf7fdb) has a reputation beyond repute
Re: Visual Studio

If you are interested in using C#, RobotDotNet seems to be a pretty solid solution: https://www.chiefdelphi.com/forums/s...d.php?t=140972
__________________
2012 Dean's List Winner
2011-2014 Arizona Regional Winners
2016 Las Vegas Regional Winner
2014-? Mentor


Reply With Quote
  #13   Spotlight this post!  
Unread 04-08-2016, 00:16
marshall's Avatar
marshall marshall is offline
My pants are louder than yours.
FRC #0900 (The Zebracorns)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2003
Location: North Carolina
Posts: 1,258
marshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond repute
Re: Visual Studio

Quote:
Originally Posted by JamesTerm View Post
Yes, Visual Studio Compiler...
That's my wording and I'm sticking with it!

Also... in your critique of Visual Studio... did you try it with the Visual Assist plugin? This really makes a difference.
I am by no means a critic, just a cynic. I'll check out the plugin though. Always open to new stuff.
__________________
"La mejor salsa del mundo es la hambre" - Miguel de Cervantes
"The future is unwritten" - Joe Strummer
"Simplify, then add lightness" - Colin Chapman
Reply With Quote
  #14   Spotlight this post!  
Unread 04-08-2016, 09:03
JamesTerm's Avatar
JamesTerm JamesTerm is offline
Terminator
AKA: James Killian
FRC #3481 (Bronc Botz)
Team Role: Engineer
 
Join Date: May 2011
Rookie Year: 2010
Location: San Antonio, Texas
Posts: 298
JamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to beholdJamesTerm is a splendid one to behold
Re: Visual Studio

Quote:
Originally Posted by marshall View Post
I'll check out the plugin though. Always open to new stuff.
For reference:
http://www.wholetomato.com/

I've been using this since around 2002... (It works on all versions of visual studio)
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 13:30.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi