Go Down

Topic: Arduino and Visual Studio VC++ 2010 (Read 3 times) previous topic - next topic

cha

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: [Select]

#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)




cha

Marius

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?
Rather people think you to be a fool than you open your mouth and confirm it.

cha

cha

cha

#18
Sep 23, 2011, 11:23 am Last Edit: Sep 23, 2011, 12:32 pm by cha Reason: 1
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) ?
cha

Marius

Thanks Francois, I will check it out during the weekend.
Rather people think you to be a fool than you open your mouth and confirm it.

Marius

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: [Select]

/*
   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.
Rather people think you to be a fool than you open your mouth and confirm it.

Go Up