Pages: 1 [2]   Go Down
Author Topic: Arduino and Visual Studio VC++ 2010  (Read 3188 times)
0 Members and 1 Guest are viewing this topic.
Belgium
Offline Offline
Newbie
*
Karma: 0
Posts: 15
If you don't have the right tool... build it.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

mmmh... It seems that you should add  #include "MySecondPDEFile.pde" or the  intelissense wont work...

It should be included like this :  in the main pde header like this  :
Code:
#ifdef _MSC_VER
#define __AVR_ATmega2560__
#define __attribute__(x)
#define __inline__
#define __cplusplus
#define __builtin_va_list int
#define __asm__(x)
#include "WProgram.h"
#include "test.pde" // <-------------------- HERE
#endif

Since _MSC_VER is defined by the VisualStudio environment, it will be fine when compiled with the Arduino IDE. (Reference : http://msdn.microsoft.com/en-us/library/b0084kay(vs.80).aspx)




Logged

cha

Centurion RSA
Offline Offline
Full Member
***
Karma: 0
Posts: 166
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Francois
Do you think you can add the rest of the pde files in the include section as you pick them up from the conversion?
Logged

Rather people think you to be a fool than you open your mouth and confirm it.

Belgium
Offline Offline
Newbie
*
Karma: 0
Posts: 15
If you don't have the right tool... build it.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

definitely doable ;-)

Logged

cha

Belgium
Offline Offline
Newbie
*
Karma: 0
Posts: 15
If you don't have the right tool... build it.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey hi !


Just to let you know that I submitted a new build. --> http://arduinotovsconverter.codeplex.com/


It implement the request that Marius submitted few month ago.. (I know I'm a bit slow... )

By the way, is it worth publishing on the playground pages ?  (http://arduino.cc/playground/Main/DevelopmentTools) ?
« Last Edit: September 23, 2011, 05:32:58 am by cha » Logged

cha

Centurion RSA
Offline Offline
Full Member
***
Karma: 0
Posts: 166
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks Francois, I will check it out during the weekend.
Logged

Rather people think you to be a fool than you open your mouth and confirm it.

Centurion RSA
Offline Offline
Full Member
***
Karma: 0
Posts: 166
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Francois,
I installed and used it. No error was reported but the generated main PDE is not correct. It does not include the other PDE's of the sketch into the declaration. It looks like this -

Code:
/*
   This project  has been created using Arduino to Visual Studio converter.
   See http://arduinotovcconverter.codeplex.com/  or http://blog.digicious.be for more details.         
*/

#ifdef _MSC_VER
// MSC_VER is defined by Visual Studio ...
// So there no need to comment this block before compiliation since it won't be included.
// DEFINE your target microcontroller here...
// #define __AVR_ATmega8__
// #define __AVR_ATmega16__
// #define __AVR_ATmega64__
// #define __AVR_ATmega128__
// #define __AVR_ATmega328__
// #define__AVR_ATmega328P__
// #define __AVR_ATmega1280__

#define __AVR_ATmega2560__

#define __attribute__(x)
#define __inline__
#define __cplusplus
#define __builtin_va_list int
#define __asm__(x)

#include "WProgram.h"

<!--PDEFILES-->
#endif

Notice - no pde's included.
Logged

Rather people think you to be a fool than you open your mouth and confirm it.

Pages: 1 [2]   Go Up
Jump to: