Go Down

Topic: CodeBlocks Arduino IDE - real C++ IDE for Arduino development (rev.20130827) (Read 69736 times) previous topic - next topic

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?
My Arduino blog: http://arduinodev.com/blog

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





My Arduino blog: http://arduinodev.com/blog

tianshuo

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?

http://tianshuohu.diandian.com

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: [Select]

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?
My Arduino blog: http://arduinodev.com/blog

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.
My Arduino blog: http://arduinodev.com/blog

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

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
My Arduino blog: http://arduinodev.com/blog


Andree

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

It's always a great pleasure to see my work being useful to others.
My Arduino blog: http://arduinodev.com/blog

md10bldr

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.

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.
My Arduino blog: http://arduinodev.com/blog

nav2go

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

Thanks for the report. This issue is just fixed in revision 20130330.
https://sourceforge.net/projects/arduinodev/files/
My Arduino blog: http://arduinodev.com/blog


Go Up