Using Arduino IDE to build Ardupilot code - arduino

I try to open and compile arduPilot code using Arduino IDE (V. 1.0.5). But it's not working. I found the code is not compatible with standard IDE.
How can you modify the code and build it? any help is appreciated.

It just worked for me. ArduPilot 2.7.1 and Arduino 1.0.5 on Windows.
Note that the ArduPilot build was last updated in 2010, back when Arduino was not using the new INO files, but PDE files. So you have to manually go to file->open, then select ardupilot_2-7.pde to open.

As you can see above ArduPilot has a modified Arduino IDE. The Visual Micro plugin for Atmel Studio also supports the APM modifications.

Related

How to add Arduino library to CLion PlatformIO project

I worked through the steps at https://www.jetbrains.com/help/clion/platformio.html to get PlatformIO installed and working with CLion. The following program now works:
void setup() {
Serial.begin(9600);
Serial.println("yay, I'm working.");
}
void loop() {
}
Now... I need to get an ESP32-compatible SSD1306 library installed (among others), so I can actually do something useful.
As far as I can tell, CLion (with or without the PlatformIO plugin) has nothing like the library browser in the Arduino IDE. Is there a less barbaric way of getting Arduino libraries into a CLion-PlatformIO project than grabbing the library's repo from Github and hand-copying files (and their recursive dependencies)?
Are PlatformIO projects created via CLion round-trip compatible with VSCode+PlatformIO? Like, can I create the PlatformIO project in CLion, exit CLion, launch VSCode, open the same project, use VSCode to add the libraries, exit VSCode, then go back into CLion and use them? Or is that a recipe for pain, tears, and corrupt config files?
Opening a CLion+PlatformIO project in Visual Studio Code works fine especially when you just want to add Libraries.
As far as am concerned PlatformIO works best with Visual Studio Code.
As far as I can tell, CLion (with or without the PlatformIO plugin) has nothing like the library browser in the Arduino IDE. Is there a less barbaric way of getting Arduino libraries into a CLion-PlatformIO project than grabbing the library's repo from Github and hand-copying files (and their recursive dependencies)?
Using PlatformIO, you just need to add the library name into platformio.ini file. PlatformIO provides PlatformIO Home to help you with searching and adding library into platformio.ini file. Run pio home in the your terminal. If your setup is correct you will be able to run the command and access the web app.
For your reference:
Home page
Library Browser
Adding library to your project
platformio.ini
Are PlatformIO projects created via CLion round-trip compatible with VSCode+PlatformIO? Like, can I create the PlatformIO project in CLion, exit CLion, launch VSCode, open the same project, use VSCode to add the libraries, exit VSCode, then go back into CLion and use them? Or is that a recipe for pain, tears, and corrupt config files?
Yes. You can open it from both IDE. You can view more in their docs

Can't make Qt Creator Work

I've downloaded and installed Qt Creator from its online installer and the latest version but when i try to create a Qt Console Application i get the following error. I haven't touched options. The picture is an error from when i tried to open a file from my professor but i get the same error when i try to create a new one. It could be pretty simple but its the 1st time im using this program as a student and have no idea whats going on. Thanks in regards for your timeenter image description here
If you are using Qt Creator with MSVC Compiler (Visual Studio), you need to also download the Visual Studio Compiler. Qt for MSVC doesn't come with a compiler.
It seems that you are trying to compile with VS 2017. You can Download Visual Studio 2017 from: https://www.visualstudio.com/es/downloads/
Express is free, the other two are paid, but don't download VS Code, it's for another purpose.
Alternatively, you can download only the compiler from: http://landinghub.visualstudio.com/visual-cpp-build-tools It's ligther but you don't get the IDE.
Also, for debugging, if you are on x86 or x64, download Windows CDB from: https://learn.microsoft.com/en-us/windows-hardware/drivers/debugger/debugger-download-tools
After you install this, you can reboot Qt and then it will show it has the appropiate compiler and debugger, like this (note that I use VS 2013):
There is another option if you don't want to download or use Visual Studio. Go to the Qt Maintenance Tool (uninstaller), Add or remove components, then install MinGW binaries of your favorite Qt Version, like this:
MinGW is free and it comes bundled with Qt, so you can build and run (and debug!) right away.

How can I use PlatformIO with ESP8266 Arduino library git version?

I can use PlatformIO with official stable ESP8266 Arduino library.
However, I'd like to use PlatformIO with the git version of this library (the latest version available). How can I achieve that?
I tried inspecting boards json files but without any luck.
platformio platform install https://github.com/platformio/platform-espressif8266.git#feature/stage
Set platform to espressif8266_stage in platformio.ini
[env:nodemcuv2]
platform = espressif8266_stage
board = nodemcuv2
framework = arduino
origin

I am looking for an Arduino Zero cmake enviroment

I am trying to get cmake working with an Arduino zero/m0.
I was trying to get it working based on the work of tmpsantos at https://github.com/tmpsantos/Arduino-CMake-Template but without success.
Hi I wrote now a CMake Project and placed it on github.
https://github.com/maxbader/Arduino-CMake-Template
It is not perfect but working

Using Arduino Libraries for a standalone MCU (ATMega328p

I'm wondering how to use Arudino libraries for projects using regular microprocessors, in my case, the ATMega328p. I just have a PDIP processor on a breadboard and I'm not using an Arudino Uno or anything. I also don't want to be use the setup() and loop() Arduino programming environment, but I do want to be able to download and use the EtherCard library, which includes Arduino.h within it.
I'm using Atmel Studio 6.2 on Windows 8.1. I've found this post Using the Arduino libraries for regular AVR code which includes an excellent response, but it's specific (i think) to the linux environment. Has anyone used Arudino libraries for a non-arduino project? If so, how do I properly include them in Atmel Studio?
Thanks in advance for any input you may have.
There are two sets of libraries in Arduino tree. The first general AVR libraries (C) and the second Arduino libs (C++). Arduino extends AVR libraries providing some implicit functionality clock (msec, sec), streams, UART buffered handler etc. Obscure .ino extension file is copied to .cpp with added #include "Arduino.h" line. From my point of view Arduino IDE is wrong idea because it does not use normal make file but it's somehow hardcoded it in java (using only external avr-gcc).
Also "to-be-implemented" loop(), setup() seems like obscure idea introduced by Arduino's main.cpp implicitly linked in every project.
But I'm using both AVR and Arduino libraries and compile with avr-gcc (installed in Arduino tree). I recommend more fresh gcc (4.7 or so unless it causes problem in Avrstudio as Avrstudio 4.19 toolchain using gcc 4.7.x). I have own Makefile and using in Windows XP. You can override also some Arduino functions implemented using attribute ((weak)).
Please connect the ATMEGA USBASP programmer and the ATMEGA328 controller like shown below:
(source: learningaboutelectronics.com)
Then write the ATMEGA Uno firmware code to the controller. It is available over here - https://github.com/arduino/Arduino/tree/master/hardware/arduino/bootloaders/optiboot
Download the 328 hex version over there. These boot loaders will also be available in you computer if you have successfully installed Arduino Sketch IDE. Now write the hex code to the micro-controller using he programmer and from then onwards the controller will work as a arduino uno. Connect the basic crystal and use a breadboard circuit as shown below.
Now you continue your programming and loading on arduino sketch.

Resources