.net based Arduino Sketch Editor

I've started a "small" project to build a sketch editor in c#. i will only work in Windows for now...
It's not ready yet for a download but i have some screenshots that i like to share with you.

I don't have much time for a project like this but I've managed to "convince" the company that i work for to sponsor it by letting me spend some hours a week in the project... :sunglasses:

I will "opensource" it in the future... ( because of the sponsorship, some internal decisions have to be made... :wink: )

So, here are the screenshots:

I'am trying to make some sort of autocomplete (intellisence) ::slight_smile:

Can you give-me some opinions based on this (very very small amount of) information? :slight_smile:

My opinion is "wow!". Good work!

Andrew

great work!

When using visual basic (years ago, but getting back into it) i really like the popup menu with suggestions for what you are trying to write. Is this what i can see here? Looks very good anyway, keep us updated!

Great piece of work :).

I look forward to using it when you release it.

Very much looking forward to this!

intellisense is a fantastic feature! the one that would put it over the top for me would be step-through debugging. I can see all kinds of problems implementing that though.

That's great. Yeah, I use Visual Studio plus an add-in called Visual Assist for doing my sketches mostly for the intellisense, though also for the syntax coloring, refactoring functions, and auto-formatting. It'd be great to have this in a simpler package.

But it seems a shame to use C# for this and tie it down to one platform. I suppose the .net framework makes it easier to get the UI, etc. going quickly. Still, a lot of people use Windows, so it's probably worth it.

Good luck; I'm happy to beta test.

Cheers,
Paul

@Paul V.: couldn't this also run/be ported to Mono?

@Paul V.: couldn't this also run/be ported to Mono?

Theoretically yes, but it depends upon the version of .NET that was used, the amount Windows specific code used (Win32 API calls, COM objects, hard coded paths, UI methods, registry, etc).

As long as those types of things are not used, or segregated into libraries that can be replaced with mono compatible versions, then it is possible to either run directly on mono, or quickly port the app.

Mono

Interesting; I hadn't heard of it until now. Looks promising. Looks like as long as you don't use the .net 3.0 api's, porting should be straightforward.

That's good to know about.

-Paul

Just a screen shot of the current work.

The intellisense looks good. My question would be about extra libraries or imported routines. Does your code have some method to determine the correct syntax/options on imported libs? Or if I have created a function in the same file and try to use that function, do the options come up?

Perhaps now is the time to talk about self-documenting code. Where comments in the function are used by the editor to display 'sensed' options.

How did you implement the intellisense? Is it hard coded into the program or is there a config file with all options? When the arduino guys add a new command or function, how hard is it to add it to your library?

Also remember that the entire gcc library is available in an arduino sketch.

some replys:

harry:
yes thats a popup menu with suggestions for what you are trying to write

br3ttb:
i think that for step-through debugging i have some problems:

1 - i may try and use an integration with gdb/Simulavr - i think Simulavr is outdated and updating it is not simple... (gdb with an emulator?)
2 - writing a simulator from scratch is a very hard work...
3 - Integration with the simulator in avr-studio? i don't know if the sdk from Atmel allows this... maybe i can try an contact Atmel on the subject and see if I can get any response... ;D

Can anyone help give some opinions about this?

So, Maybe in the future step-through debugging will be possible...

Paul V.:
I didn't know Visual Assist (Opps)

Solidus117:
Robert Lee:
well my code is portable but i have to see if any of the components use some kind pinvoke thats w32 expecific... (i will run moma and see the results)

All:
thanks for all the nice words...

Mark Bramwell:

I use ctags for parsing and generating information for intellisence from the libraries header files.
Because of scopes for the code being written in the current sketch (project) an internal parser is used. this is still being worked on
(ctags just reads globals, classes, etc...)

:sunglasses:

Just another update.

I've been battling with the output of gmake under cygwin, apparently the processEasy function that gmake uses to execute commands (like avr-gcc) have some bugs under cygwin and i can't get the correct output from gmake.

for now i'am using a similar compile as the Java IDE the main difference is:

1 - made an external console application
2 - the external application uses a configuration file with a syntax similar to variable declaration in makefiles...

What i've been doing

1 - Plugin system to allow external assemblies loaded into the Editor
2 - Plugins can execute commands from other plugins
3 - Menus and toolbars configurable with XML files (can execute commands from plugins, etc)
4 - Compile and upload process
5 - Browser window to allow a "start page" and load web pages (help and stuff)

The five points that i mentioned are not all 100% but the are all > 80% done

with does 5 tasks completed i will release a 1 version to download

Then i will work into

. sketchs with pde files (like the original editor. now they are only cpp based)
. intellisence
. syntax highlight

also i have a couple of questions to the community:

1 - I have planed to allow .net code do be written in the editor and allow an easy integration with the hardware. what do you think?
2 - I've thinking of releasing the project in google code or code plex. where to put it?
3 - there are a growing number of similar projects in the forum and i've started to think if we really need an new Editor/IDE. what do you think?

Thanks!

i think that for step-through debugging i have some problems:

1 - i may try and use an integration with gdb/Simulavr - i think Simulavr is outdated and updating it is not simple... (gdb with an emulator?)
2 - writing a simulator from scratch is a very hard work...
3 - Integration with the simulator in avr-studio? i don't know if the sdk from Atmel allows this... maybe i can try an contact Atmel on the subject and see if I can get any response...

Curs0r you might want to check out David Etherton's AVR Mega644 emulator at the uzebox project. Dave wrote it to be AVR instruction clock accurate to display the uzebox's video output.

Curs0r you might want to check out David Etherton's AVR Mega644 emulator at the uzebox project. Dave wrote it to be AVR instruction clock accurate to display the uzebox's video output.

Thanks TonyD I will look into this. :wink:

[edit]There is a lot good work put into the Uzebox Emulator by David Etherton. I will try and compile the AVR part in VS in the weekend... [/edit]

Man - i totally forgot about this project.. and the way it looks i can give up my small idea of an IDE.. there dont need to be more than one Ide that look the same, especially when one looks better and seems to work much better than the other.

With other words: I like the shown IDE here already more than my piece of code i wrote for a few days ;0)

edit
One suggestion maybe.. while i was writing my small IDE i had one particular feature in mind, that would be something for you as well.. how about a panel that shows you the functions in the current viewn CPP file? I found that one in VS6 quite handy and used it all the time (it has shown the various class' functions, consts and variables and when doubleclicked brought you right at the declaration point)

When will you release the code? The IDE looks really great!

Put it on google code, it is a good way to go.

I offer my help, I am an experienced .NET developer and I am not happy with the current Java-based IDE (see my modifications for LumiNet).

We really need a new IDE. Emulation is not important. But it should be compatible... sketches for the original Arduino release must compile on the new IDE.