Pages: [1] 2 3 ... 8   Go Down
Author Topic: CodeBlocks Arduino IDE - real C++ IDE for Arduino development (rev.20130827)  (Read 58710 times)
0 Members and 2 Guests are viewing this topic.
Sydney
Offline Offline
Full Member
***
Karma: 1
Posts: 108
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

CodeBlocks Arduino IDE is a complete out-of-box C++ IDE for Arduino development. It will be liked by software engineers demanding a more powerful IDE and those who need to heavily modify or develop Arduino libraries. I have been maintaining the project basically to provide myself a productive and flexible Arduino development environment. Right now I only release for Windows builds, while someone else has forked my code (but seems not updating often) and provdes some instructions how to use the IDE on Linux.



Download Latest Release

Changelog

Release 20130428

    Improved Arduino Builder integration with CodeBlocks (no need to close the window after uploading)
    Updated several Arduino libraries (OBD, MPU6050, MultiLCD)
    Compile with -O2 instead of -Os when target MCU has 64KB or larger program memory

Release 20130401

    Fixed stop running button not terminating simulation process bug
    All compiled files now stored in build directory in project path
    Improving user experience of project wizard in several aspects
    Re-added "Simulator - Debug" target for debugging in simulation

Release 20130329

    Automatically building referenced Arduino libraries
    Built Arduino core files now cached for improving project building speed
    Fixed issues with Microduino
    Fixed a bug causing wrong board type choice on uploading
    Arduino Builder 0.8.3

Release 20130324

    Updated Arduino core and library files to 1.0.4
    Arduino Builder 0.8.1

Release 20130322

    Including project folder in include file search path by default
    Arduino Builder 0.8.0

Release 20130319

    Added opening serial terminal right after uploading
    Updated Arduino Uploader to 0.7.1

Release 20130318

    Added MCU operating frequency option (16/12/8 Mhz)
    Added support for Microduino Core+ (ATMega644PA)
    Updated Arduino Uploader to 0.7.0

Release 20130308

    Windows XP compatibility issue fixed
    Arduino Uploader updated
    Added “-lm” option in linking command line

Release 20130302

    Using Arduino Uploader GUI version for uploading
    Changed default sketch file extension from .cpp to .ino

Something about the simulator

As you may have noticed (in the screenshot above, there are two simulator targets in every Arduino project created with the project wizard. These are for building and running an Arduino sketch on PC. The idea is to re-write the underlying Arduino core files (and some AVR C routines) to simulate the behavior of a AVR chip (SFR, interrupts) and Arduino (digital/analog pins, serial UART). As an Arduino sketch is built with AVR-GCC, the code can be compiled with x86-GCC with no modification and so are the most libraries. As is running on PC as a native program, the program logic can be debugged more easily within the IDE (by GDB, with break point, single step, variable watch etc.). For the hardware simulation, right now I have only implemented serial UART simulation with hardware serial port on PC. This is useful for debugging code dealing with any serial devices by connecting the device directly to PC via a USB-TTL adapter. I have managed to run a sketch based on TinyGPS with a USB GPS receiver.
For example, to use PC serial port COM5 to simulate Arduino's Serial1, you can do like this in the sketch:
Code:
Serial1.begin(115200, 5);
This will open PC serial port COM5 and subsequential calls to Serial1 will act on the PC serial port.

I will keep working on this API-level simulator and the next hardware to be simulated will be LCD and SD device. Progress will always be published together with the release of IDE distribution as the simlator is useless without the IDE. It's source code is located in ardusim sub-directory of the package.


* cb_arduino_20130127.png (24.81 KB, 979x728 - viewed 328 times.)

* cbarduino.png (87.73 KB, 800x562 - viewed 237 times.)

* cbwizard.png (22.29 KB, 583x433 - viewed 212 times.)
« Last Edit: November 22, 2013, 05:26:07 am by stanleyhuang » Logged


Sydney
Offline Offline
Full Member
***
Karma: 1
Posts: 108
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Updated again.
The latest release now supports uploading to Arduino by clicking IDE's run button (or press F9 to build and run). This is like running a compiled binary on PC.
The simulation target (which simulate Arduino API) is also being developed as a portion of the IDE now.
« Last Edit: February 24, 2013, 01:02:54 pm by stanleyhuang » Logged


Sydney
Offline Offline
Full Member
***
Karma: 1
Posts: 108
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I've made some progress in the API-level Arduino simulator, which is also included in the new release. Serial UART can be simulated now with hardware serial port on PC. This will be very useful to debug serial communication.
Logged


Sydney
Offline Offline
Full Member
***
Karma: 1
Posts: 108
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Revision 20130306 fixed Windows XP compatibility issues.
Logged


Wellington, New Zealand
Offline Offline
Jr. Member
**
Karma: 0
Posts: 65
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Looks very interesting!!!
Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Just installed this, works great! So much better than the official Arduino IDE! Thanks a lot!
Logged

Sydney
Offline Offline
Full Member
***
Karma: 1
Posts: 108
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for your compliment. An update is just released.
The IDE maybe a little bit tricky for non-progreammers but once you grab it, it's definitely more efficient. I will write some tutorials in future.
« Last Edit: March 17, 2013, 11:30:13 am by stanleyhuang » Logged


Michigan, USA
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This version does everything I need.  It allows me to specify a 12 MHz clock rate for my project which is a 3.3v ATmega328p which does not support 16 MHz clock.  My project can now proceed.  I just put a scope on my 10 millisecond interrupt and it happens every 10 ms, which proves the code now is using a 12 MHz clock.  Thank you Stanley.  Nice job and thank you for the great tool you have generously provided.
Logged

Douglas S. Basberg, MSEE, PE
Embedded Controls Consultant
DSB Engineering, Inc.

Sydney
Offline Offline
Full Member
***
Karma: 1
Posts: 108
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

So glad to see it works for you.
Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Great project, but how can i add a custom library ?

In Arduino Ide, i put the files to "E:\Eigene Dateien\Arduino\libraries" and i can work with it.

How does this work in codeblocks?

Andree
Logged

Sydney
Offline Offline
Full Member
***
Karma: 1
Posts: 108
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Of course.
Simply place the library files in the sketch folder and add the .cpp file into the project (choose menu Project->Add Files).
Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks, but did not work.

Windows-XP.
Starting codeblocks, create new arduino project "test".
Copy folder "RTClib" to folder "C:\arduino\test".
Add "RTClib\RTClib.h" + "RTClib\RTClib.cpp"  to project.
edit "scetch.ino"
#include <Wire.h>
#include "RTClib.h"

compile....
C:\arduino\test\RTClib\RTClib.cpp|4|fatal error: Wire.h: No such file or directory|

RTClib.cpp 4:  #include <Wire.h>

Logged

Sydney
Offline Offline
Full Member
***
Karma: 1
Posts: 108
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I bet you have not changed build target from "Simulator" to an actual arduino board type. You also need to enable compile and link option for Wire library (right click the Wire.cpp in libraries sub-folder in project view).
« Last Edit: March 20, 2013, 11:35:49 am by stanleyhuang » Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You are right, now Build target "Mega260" , sorry about that.

sketch.ino|3|error: RTClib.h: No such file or directory.

Ok, set up a search path to RTClib - directory under build options.

its working now.

Thanks a lot.

Andree

 


Logged

Beijing, China
Offline Offline
Newbie
*
Karma: 0
Posts: 2
http://tianshuohu.diandian.com
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, I'd like to know if somehow we can use the simulator to mock digitalRead/analogRead/interupt signals?


CodeBlocks Arduino IDE is a complete out-of-box C++ IDE for Arduino development most suitable for software engineers demanding a more powerful IDE and those who need to heavily modify or develop Arduino libraries. I have been maintaining the project basically to provide myself a productive and flexible Arduino development environment. Now I mainly release for Windows only, while someone else has forked my code on github and maintain the linux port.

Logged


Pages: [1] 2 3 ... 8   Go Up
Jump to: