Author Topic: Arduino CPP  (Read 10426 times)

0 Members and 1 Guest are viewing this topic.

Offline CybernautwaTopic starter

  • Newbie
  • Posts: 1
Arduino CPP
« on: February 24, 2015, 02:19:14 pm »
Why can the Arduino IDE run INO and PDE, but not CPP? 

How does anyone examine, save,  or create CPP?

Where do I find OS and Info on the Web??
 

Offline JacquesBBB

  • Frequent Contributor
  • **
  • Posts: 829
  • Country: fr
Re: Arduino CPP
« Reply #1 on: February 24, 2015, 06:04:29 pm »
update on 24-2-2015: Now I understand !

What is INO ?  .ino
What is PDE ?  .pde
What is CPP ?  .cpp
What is OS ?   
What is Info ?
« Last Edit: February 24, 2015, 10:40:16 pm by JacquesBBB »
 

Offline donotdespisethesnake

  • Super Contributor
  • ***
  • Posts: 1093
  • Country: gb
  • Embedded stuff
Re: Arduino CPP
« Reply #2 on: February 24, 2015, 06:48:53 pm »
Arduino requires a PDE as INO as the "main" file, but the language is essentially C++. You can also add plain C++ files to the IDE and they will be compiled into the project.

CPP are just text files, use any text editor.

http://forum.arduino.cc/index.php might be a good place to go.
Bob
"All you said is just a bunch of opinions."
 

Offline Stonent

  • Super Contributor
  • ***
  • Posts: 3824
  • Country: us
Re: Arduino CPP
« Reply #3 on: February 24, 2015, 07:30:17 pm »
Maybe this will be more to your liking. It is free.

http://www.atmel.com/microsite/atmel_studio6/
The larger the government, the smaller the citizen.
 

Offline senso

  • Frequent Contributor
  • **
  • Posts: 951
  • Country: pt
    • My AVR tutorials
Re: Arduino CPP
« Reply #4 on: February 25, 2015, 03:07:30 pm »
The Arduino "IDE" as no sense of files, when you press Go, it smashes all the files in one gigantic file, does some mumbo jumbo so it compiles, and presto your blinky using 2K of flash is done.

Download Atmel Studio 6, its a very, very good and powerfull IDE.
 

Offline donotdespisethesnake

  • Super Contributor
  • ***
  • Posts: 1093
  • Country: gb
  • Embedded stuff
Re: Arduino CPP
« Reply #5 on: February 25, 2015, 09:47:15 pm »
Atmel Studio is a horrible piece of buggy bloatware, even worse than Eclipse, but otherwise it is free. :)

Bob
"All you said is just a bunch of opinions."
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6190
  • Country: us
Re: Arduino CPP
« Reply #6 on: February 25, 2015, 11:42:00 pm »
Why can the Arduino IDE run INO and PDE, but not CPP? 

How does anyone examine, save,  or create CPP?

Where do I find OS and Info on the Web??
the main file must have an Aretino extension and have the same name of the directory. Then you can add in the same directory as many as you want .h and. cpp files. The arduino idea support them with no problem. No need for external editors.
 

Offline jeffegg2

  • Newbie
  • Posts: 1
Re: Arduino CPP
« Reply #7 on: February 26, 2015, 12:59:35 am »
Still unable to get Studio to run under Windows 8. There are instructions to bypass this and that.... I'm waiting for it to provide support....
 

Offline Stonent

  • Super Contributor
  • ***
  • Posts: 3824
  • Country: us
Re: Arduino CPP
« Reply #8 on: February 28, 2015, 09:13:43 am »
Hmm, I didn't have problems with it under Windows 8.  It uses Visual Studio 2010 as its base.
The larger the government, the smaller the citizen.
 

Offline JohnnyBerg

  • Frequent Contributor
  • **
  • Posts: 474
  • Country: de
Re: Arduino CPP
« Reply #9 on: February 28, 2015, 09:26:12 am »
Maybe this will be more to your liking. It is free.

http://www.atmel.com/microsite/atmel_studio6/

Have yo ever tried compiling the Arduino ecosystem with Atmel Studio?

I have! Took me half a day.  Blood, Sweat and Tears, as we Dutch say!
In the end I moved back to the Arduino IDE, as there is nothing to gain with Atmel Studio in combination with Arduino.

What I found nice is Sublime Text. There is a very nice extentions, that turn Sublime Text into an Arduino IDE.
I don't have the link at hand, but if you Google for Sublime Stino, you'll find it.
 

Offline Muxr

  • Super Contributor
  • ***
  • Posts: 1369
  • Country: us
Re: Arduino CPP
« Reply #10 on: March 15, 2015, 02:30:51 am »
You can of course abandon all that and just use the linux tool chain for AVR programming it that's your cup of tea:

http://www.tldp.org/HOWTO/Avr-Microcontrollers-in-Linux-Howto/x207.html
 

Offline nuno

  • Frequent Contributor
  • **
  • Posts: 606
  • Country: pt
Re: Arduino CPP
« Reply #11 on: March 15, 2015, 03:26:48 am »
You can of course abandon all that and just use the linux tool chain for AVR programming it that's your cup of tea:

WinAVR is already bundled with the Arduino IDE package, so any Arduinoer already has the complete toolchain (including the simple code editor Programmer's Notepad 2, orders of magnitude better than that crap they call the Arduino editor).
« Last Edit: March 15, 2015, 03:28:24 am by nuno »
 

Online Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11622
  • Country: my
  • reassessing directives...
Re: Arduino CPP
« Reply #12 on: March 15, 2015, 05:48:25 am »
not that big, but this particular one is the stupidity of the "artists" who made the ide, changing cpp to ino instead of creating extra *.aswf (arduino specific workspace file) just like the rest of professionals. as i said, not that big that warrants extended rant and mourning as we "hackers" dont deal with such idiocy either, we dont use Arduino the IDE anyway for serious work. fwiw if latest version of atmel studio doesnt work, then forget all the technological advancement bullshit, forget the Win8, stick with what is works... WinXP, AVR Studio 4 and avrdude console (automate it in your favorite "scripter" such as the "holy" Basic or the abominal Phyton, yeah go mourn about that one! none of my business i just heard stories)
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline rs20

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
Re: Arduino CPP
« Reply #13 on: March 15, 2015, 06:31:44 am »
Have yo ever tried compiling the Arduino ecosystem with Atmel Studio?

I have! Took me half a day.  Blood, Sweat and Tears, as we Dutch say!
In the end I moved back to the Arduino IDE, as there is nothing to gain with Atmel Studio in combination with Arduino.

What I found nice is Sublime Text. There is a very nice extentions, that turn Sublime Text into an Arduino IDE.
I don't have the link at hand, but if you Google for Sublime Stino, you'll find it.

You're perhaps conflating two different concepts here (even putting the Ardunio IDE aside). There's Arduino, the hardware (specifically, an ATMega328P breakout board), and Arduino, the set of libraries (digitalWrite and his bloaty friends). If you want to use Atmel Studio with your Arduino hardware, and are happy to leave the Arduino libraries behind (which I for one, am very happy to do*), then you win an IDE that understands the concept of sharing a file between projects in a sane way, supports in-circuit debugging, and has the versatility to, I dunno, let you see the assembly code or experiment with optimization settings without scripting or restarting the "IDE". All around a superior experience, I'd say.

If, on the other hand, you want to use Arduino hardware AND Arduino libraries in Atmel Studio for some reason, you're doing something that neither Atmel nor Arduino had in mind, and you shouldn't be overly surprised that it was painful. Nevertheless, I expect that after an initial one-time configuration hurdle, it should be straightforward from then on? After all, everything that Arduino provides should be easily encapsulated as a #include <arduino.h>, right? Getting that file is the challenge.

Arduino's cross-platform ubiquity is one benefit, the only other I can think of is that it is quicker for embarrassingly simple single-file projects.

* Once, I was scratching my head with an Arduino sketch that wouldn't work with serial properly (would just output part of a string and then give up). Copied the provided C code straight out of the ATMega328P datasheet, wrote my own one-line string printing function and a four-line integer printing function, and it worked first time. What the?
 

Offline fmaimon

  • Supporter
  • ****
  • Posts: 165
  • Country: br
Re: Arduino CPP
« Reply #14 on: March 15, 2015, 01:58:03 pm »
You don't need to suffer to use arduino code and libraries inside Atmel Studio. There is a plugin for it that does everything for you. Inside Atmel Studio, you click in the Tools menu and then in the Extension Manager and look for Arduino IDE for Atmel Studio. You could also go directly to the plugin developer site: http://www.visualmicro.com/
 

Offline JohnnyBerg

  • Frequent Contributor
  • **
  • Posts: 474
  • Country: de
Re: Arduino CPP
« Reply #15 on: March 15, 2015, 06:02:35 pm »
You don't need to suffer to use arduino code and libraries inside Atmel Studio. There is a plugin for it that does everything for you. Inside Atmel Studio, you click in the Tools menu and then in the Extension Manager and look for Arduino IDE for Atmel Studio. You could also go directly to the plugin developer site: http://www.visualmicro.com/

Tried it a long time ago. I did not like it, although I cannot remember why.
 

Offline skyjumper

  • Regular Contributor
  • *
  • Posts: 87
Re: Arduino CPP
« Reply #16 on: March 28, 2015, 10:11:08 pm »
You don't need to suffer to use arduino code and libraries inside Atmel Studio. There is a plugin for it that does everything for you. Inside Atmel Studio, you click in the Tools menu and then in the Extension Manager and look for Arduino IDE for Atmel Studio. You could also go directly to the plugin developer site: http://www.visualmicro.com/

Would this somehow allow me to debug Arduino code? Or is JTAG needed for that?
 

Offline rs20

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
Re: Arduino CPP
« Reply #17 on: March 29, 2015, 03:33:56 am »
Would this somehow allow me to debug Arduino code? Or is JTAG needed for that?

You need JTAG, debugWire, or aWire to do in-circuit debugging. So if you have a standard Arduino board, I believe you can do it using debugWire, specifically with a jtagice (or clone) and the six-pin connector on the board.
 

Offline skyjumper

  • Regular Contributor
  • *
  • Posts: 87
Re: Arduino CPP
« Reply #18 on: March 29, 2015, 03:45:50 pm »
Interesting, thanks! I do have the AVR programmer, as I needed it to install my custom boot loader. I found a site that explains how to debug using Atmel Studio, for anyone interested:

http://www.hilltop-cottage.info/blogs/adam/debugging-arduino-using-debugwire-atmel-studio-and-an-avr-dragon/

 

Offline stevech

  • Contributor
  • Posts: 10
Re: Arduino CPP
« Reply #19 on: March 30, 2015, 05:32:48 am »
I use FREE Visual Studio 2013 COMMUNITY edition + FREE Visual Micro.
Doesn't get any better in IDEs.

The above supports the odd Arduino build process. Also for Teensy 3 ARM boards.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf