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

What's your target? For Arduino MEGA 1280/2560, sketch is compiled with -O2 (optimize for speed) whereas Arduino IDE compiles with -Os (optimize for size). Faster code is normally larger.

The HEX files are also larger,  With the Arduino IDE the HEX file is 18,934 bytes whereas with CodeBlocks it's 21,573 bytes.

Looks like there's some more optimization to be done.
Logged


Colorado
Offline Offline
Edison Member
*
Karma: 47
Posts: 1562
Reviving dead brain cells with Arduinos.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

328P (genuine Arduino UNO)

I tried compiling a larger sketch and this time CodeBlocks came out about 100 bytes smaller:
Code:
Arduino IDE: 12,446 bytes
CodeBlocks: 12,322 bytes

For the HEX files
Code:
Arduino IDE: 35,019 bytes
CodeBlocks: 34,680 bytes

The previous sketch that I compiled has the same exact libraries included as this larger one, it just has less stuff written.
Logged

Colorado
Offline Offline
Edison Member
*
Karma: 47
Posts: 1562
Reviving dead brain cells with Arduinos.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Another question: in the Arduino IDE, I can add a new tab and add another file to the project which I can edit.  I do this to break up long sketches into separate, smaller chunks.  When I re-open the project, it re-opens all the necessary files in tabs for me to work on.  How do I accomplish this in CodeBlocks?
Logged

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

Click "Project" menu and choose "Add Files".
Logged


0
Offline Offline
Newbie
*
Karma: 0
Posts: 9
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

CodeBlocks Arduino slowing down?

I've noticed that Arduino CodeBlocks seems to be slowing down as the newer versions come out - has anyone else experienced this?

I've been using Arduino Codeblocks since release 10120127, and back then, the IDE moved right along - the last couple of versions leading up to 20130428 seem to "hesitate" more often. I've used the same versions on my laptop; with the earlier versions running smoothly, and the later ones hesitating for very noticeable periods of time. Checking the code blocks forums, it looked like the code completion plugin might be the culprit, and sure enough, disabling it has things running smoothly. However, I went back and checked 10120127, and it uses the same 1.0 version of code completion as 20130428, so plugin version isn't the issue. I'd hate to have to leave code completion disabled, as it's one of the real key feature of the IDE.

I've also checked the running processes in windows task manager, and can definitely say CodeBlocks is the only thing running.

Anyone else?

Logged

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

I didn't experience noticable slowing down on my end. I have been modifying and improving the building and uploading stage for Arduino but didn't change anything to the IDE's code editing and completion part.
« Last Edit: May 12, 2013, 10:11:14 pm by stanleyhuang » Logged


0
Offline Offline
Full Member
***
Karma: 0
Posts: 117
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@Stanley firstly, thanks for this excellent project. Came across this, thanks to another post on arduino forums.

Have gone through this entire thread, and did see one reference to what I was looking for, but no clear answer. So kindly bear with me on these questions about ArduinoDev CodeBlocks IDE (I call it ACI for rest of my mail).

1. Standard ArduinoIDE has settings to select the Arduino board type. How come, there is nothing similar (or that I could find) on ACI ? In the project creation Wizard, I see only 2 choices "Standard (8-bit AVR)" and "Due", however even between the 8-bit AVR boards/uC's there's a lot of difference in terms of peripherals, pins etc.

2. To use non-standard arduino-core's like MIT's High-Low Tech (HLT) arduino core for attiny45/85 or @CodingBadly's Arduino-tiny core ? Is there any way to use those cores ?

3. Was curious about how to add custom Arduino libraries, but I found the answer in one of the replies in this thread. (Just to show that I've read through :-) )

4. Do you plan to set up a FAQ re your IDE ? This thread is currently 5-pages long, and not difficult to miss some point in an answer. A FAQ, when you get time, would be so useful.
Logged

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

I am really looking forward to using this IDE. It is just what I was looking for. I having some issues with it right now, though. To use some library, I believe you said all you have to do is copy the files into your project folder and then include them.

So...I copied the normal Servo.h and Servo.cpp files into my project, and then added them to my project. However, when I build, I got four identical errors on four similar areas of code in Servo.cpp

Quote
error: cannot convert 'uint8_t* {aka unsigned char*}' to 'volatile uint16_t* {aka volatile short unsigned int*}' for argument '2' to 'void handle_interrupts(timer16_Sequence_t, volatile uint16_t*, volatile uint16_t*)'|

and the four pieces of code are identical, except the timer numbers are changed. the error is on the handle_interrupts line. If anyone is looking for this part of the Servo.cpp code, the first error is on line 105

Code:
#if defined(_useTimer1)
SIGNAL (TIMER1_COMPA_vect)
{
  handle_interrupts(_timer1, &TCNT1, &OCR1A);
}
#endif

I would love to get this working because this seems a much better IDE and i have been looking for an Arduino simulator.

Thanks
Gabriel
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 126
Posts: 8472
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Question about CodeBlocks, does it grey out or otherwise highlight any non-functional code inside #if and #ifdef blocks ?

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

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

Hi,

I just installed CodeBlocks (Revision 20130402), and I have tried to use it with my Arduino Mega 2560. It builds without any issues, but it gives an "error generating HEX file" message.

I have just created the default "LED on for one second, then off for one second" routine that is included by default when you create a new project. I saw some people asking the same questions before, but I can not see any specific resolution.

Can anyone please give some advice - or is this a known bug in CodeBlocks when using it with say Arduino Mega?

Thanks!
Logged

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

How do you use the WIRE.h library with the simulator (ARDUSIM)? Cant find a way of adding libraries to a project.
« Last Edit: June 14, 2013, 05:48:28 am by sean_8 » Logged

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

I have a question。
Serial.or::or->  How to automatically prompt members
Logged

Offline Offline
Jr. Member
**
Karma: 2
Posts: 59
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I downloaded CodeBlocks and tried to open a simple test project and compiling it.

But nothing compiles, not even a single example:
- A lot of compiler errors which I could eliminate by setting -fpermissive. But why? Why no problems on Arduino IDE??
- A lot of cannot open/find/missing header file

I tried to add files to the project, but that only results in more compiler errors in the Arduino files (like malloc.c). Some of the header files still can't be found, although I added the complete Arduino libraries folder (recursively) to the project...

So I'm doing something wrong, but can't find any manual to setup codeblocks for the Arduino environment and get a WORKING environment that does compile existing sketches and libraries, just as the Arduino IDE...


Update @8 July:
I downloaded Stanleys ArduinoOBD / obdlogger, and was able to compile that project using Code::Blocks, so at least I know that the intallation of Code::Blocks is ok!
Now if I can find why this project compiles fine, and mine not, I guess I found the problem  smiley-razz

I really like Code::Blocks features, so must find a way to compile my own sketches and libraries!
« Last Edit: July 10, 2013, 08:49:08 am by MarsWarrior » Logged

0
Offline Offline
Sr. Member
****
Karma: 3
Posts: 448
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
error: cannot convert 'uint8_t* {aka unsigned char*}' to 'volatile uint16_t* {aka volatile short unsigned int*}' for argument '2' to 'void handle_interrupts(timer16_Sequence_t, volatile uint16_t*, volatile uint16_t*)'|

I got the same error today.
Logged

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

Hello,

I have exact same problem and didn't find answer.... can anybody help? If I start ArduinoBuilder manually and select file, it works. I guess there is a problem with settings in CodeBlocks? I tried some, but no success.

I've downloaded version  20130704, but when installed, it says ver 12.11 build nov 25 2012 !?

Thanks,

Damo


Hi,

I just installed CodeBlocks (Revision 20130402), and I have tried to use it with my Arduino Mega 2560. It builds without any issues, but it gives an "error generating HEX file" message.

I have just created the default "LED on for one second, then off for one second" routine that is included by default when you create a new project. I saw some people asking the same questions before, but I can not see any specific resolution.

Can anyone please give some advice - or is this a known bug in CodeBlocks when using it with say Arduino Mega?

Thanks!

« Last Edit: July 19, 2013, 04:12:55 pm by damo1023 » Logged

Pages: 1 ... 3 4 [5] 6 7 8   Go Up
Jump to: