Pages: 1 [2] 3 4 ... 8   Go Down
Author Topic: CodeBlocks Arduino IDE - real C++ IDE for Arduino development (rev.20130827)  (Read 58805 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

Actually you can hack into the core files under ardusim directory (forked from arduino core files) to do whatever you want when arduino APIs are called.

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


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

I will include "." in search path by default.

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

I see them alright, but I'm not sure where should I start from. I guess maybe the simulator could listen to a port for signals?
Could someone give an example using wiring_analog.c?


Actually you can hack into the core files under ardusim directory (forked from arduino core files) to do whatever you want when arduino APIs are called.

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


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

Actully my long-term goal is to implement a simulator which acts like a http server and use HTML to render the simulation.
About hacking into arduino core files, taking digitalWrite as an example, I just added one line at the end like this:
Code:
void digitalWrite(uint8_t pin, uint8_t val)
{
uint8_t timer = digitalPinToTimer(pin);
uint8_t bit = digitalPinToBitMask(pin);
uint8_t port = digitalPinToPort(pin);
volatile uint8_t *out;

if (port == NOT_A_PIN) return;

// If the pin that support PWM output, we need to turn it off
// before doing a digital write.
if (timer != NOT_ON_TIMER) turnOffPWM(timer);

out = portOutputRegister(port);

uint8_t oldSREG = SREG;
cli();

if (val == LOW) {
*out &= ~bit;
} else {
*out |= bit;
}

SREG = oldSREG;

#ifdef ARDUSIM
    fprintf(stderr, "[MCU] Pin %d state changed to %s\n", pin, val ? "HIGH" : "LOW");
#endif
}
I see them alright, but I'm not sure where should I start from. I guess maybe the simulator could listen to a port for signals?
Could someone give an example using wiring_analog.c?
Logged


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

Project path is added as include file search path by default in latest release.

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.
Logged


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

Hello Everyone,

Not sure what I'm missing... installed the latest version 20130322 on Win7 x64 but I can't get the "Build target" to show anything. From all the reading and searching I've done, it seems like this needs to show the board I'm working with. I have an Arduino UNO connected and can use it using Arduino IDE. I'm very excited to get this working - very nice IDE, thank you Stanley for the Arduino integration.

Ahe Arduino Builder works (Tools > Arduino Builder), it can access the board.

Can somebody help me out or point me to documents/discussion regarding the setup?

Thank you,
Max
Logged

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

You need to start a Arduino project in the IDE before you can have anything in the build target list.
I will publish a tutorial for beginners soon.

Not sure what I'm missing... installed the latest version 20130322 on Win7 x64 but I can't get the "Build target" to show anything. From all the reading and searching I've done, it seems like this needs to show the board I'm working with. I have an Arduino UNO connected and can use it using Arduino IDE. I'm very excited to get this working - very nice IDE, thank you Stanley for the Arduino integration
Logged


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

That worked!
Thank you!!!
Logged

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

I work now with CodeBlocks Arduino IDE for a few days - it's a pleasure.
I want to say..

Thank you, thanks for this great project. 
 
Andree
Logged

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

It's always a great pleasure to see my work being useful to others.
Logged


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

Stanley -

Thanks so much for your efforts on this project. While the initial codeblock learning curve took a little getting used to, I find it so much easier to navigate through code, and to SEE how my variables and functions relate to each other.

One question though - in your future releases, would it be possible to include a a couple more of the "Additional" Plugins? Reading through the Codeblocks forum and Wiki, plugins have to be added at installation, and can't be added after the fact. I don't know exactly how you assemble the arduino package, but if possible, I'd really like to see the Library finder (yes I have used add files recursively) and Code Snippets plugins added.

Thanks Again
Paul G.
Logged

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

Actually I specially removed many plugins from original codeblocks in order to provide Arduino users a clean and simple environment. You can re-add your needed plugin simply by copying the plugin file (install dir\share\codeblocks\plugins) from original codeblocks installation. I think I will add the two plugins you mentioned in the future release.
« Last Edit: March 28, 2013, 11:36:47 pm by stanleyhuang » Logged


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

Hello ,

first of all great work!! I just found this today and I'm looking forward to work with CodeBlocks instead of the native Arduino IDE.

One thing I noticed when testing a Arduino project with the Project builder. It sets up a Blink sketch. It compiles and when run, it shows the results in the Sim window. Great so far. However, when I use the stop button, the Sim window dissaprears but the compile and run buttons stay greyed out. With the task manager I found that the program is still executing and I need to kill the process with the Win Task manager.

If however I close the Sim window directly, everything works. So it looks like the stop button has a problem.

I'm using •Revision 20130329

Woud be great of you could fix this in one of the next releases.

Thanks,
Peter
Logged

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

Thanks for the report. This issue is just fixed in revision 20130330.
https://sourceforge.net/projects/arduinodev/files/
« Last Edit: March 30, 2013, 05:55:41 am by stanleyhuang » Logged


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

Thank You!

Greetings
Peter
Logged

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