using editra for a microcontroller development tool

Discuss any topics about the editor here

using editra for a microcontroller development tool

Postby reksa » Mon Apr 25, 2011 1:50 am

Hi,

I just found this editor last night and I like it very much, thankyou. It has a lot of nice features.
and seems highly configurable using plugins.

Over the last year I've been looking for the best generic editor for doing all sorts of
general programming projects. I ended up using PsPad both at home and at work, it is super
quick and feature rich. However it is closed source, which is the main reason I'm
looking for a replacement.

Recently I've been looking for an editor that I can use for an opensource Microcontroller development system.
(see http://processors.wiki.ti.com/index.php ... nchpadwiki)
I want to use something like Editra which can be the basis for the GUI.
It would be used to edit the source files, and has the output panes for capturing the IO.

Specifically I would like to configure the Toolbar with extra Icons and selection boxes and status boxes that
can run the users microcontroller code from a plugin. Is the toolbar easily accessible from the
plugins?

Thanks for a great product.

cheers

-mike
reksa
User
 
Posts: 16
Joined: Mon Apr 25, 2011 12:48 am

Re: using editra for a microcontroller development tool

Postby cody » Mon Apr 25, 2011 3:05 am

Hi,

There have already been a few other plugins for doing similar things:

http://wiki.cenditel.gob.ve/wiki/hlpd/idearduino_eng
http://code.google.com/p/jaluino/

You can access the toolbar from a reference to the main window but would suggest to use a ControlBar in the output window like all other plugins currently use as it keeps the actions more closely associated with the component they interact with.


Cody
User avatar
cody
Site Admin
 
Posts: 1315
Joined: Mon Oct 09, 2006 2:49 am
Location: United States

Re: using editra for a microcontroller development tool

Postby reksa » Mon Apr 25, 2011 5:02 am

Cody,

Amazing! Thanks for the links, this is very similar to the what I'm looking for.

-mike
reksa
User
 
Posts: 16
Joined: Mon Apr 25, 2011 12:48 am

Re: using editra for a microcontroller development tool

Postby reksa » Tue Apr 03, 2012 8:58 pm

Hi Cody,

After a bit of a delay I have made some progress with my MPY microcontroller
development tool project (fledgling website at http://www.mpyprojects.com).
I am still very interested in using Editra as the backbone of the tool but I have a few
open top level issues about how to structure the code, package it up and distribute it.

I'm aiming the MPY tool at kids (aged as young as 11) , to teach them electronics
and simple first steps in programming. It is really important for the success
of the project to make it very easy to install and for anyone to use, especially
for people with little computer experience.

So my objectives with the tool are:

1) Single click install (ie. includes all the components needed)
python, wxpython, editra, pluggins, drivers, and configuration files
I havn't worked on this yet but I'm thinking about using NSIS
(Only Windows to start with)
2) The initial configuration is pre-setup with the
plug-ins already enabled and the shelf already opened showing
two side-by-side tabs, and the user preferences set.
3) I would like to add a single 'Reset MPY Defaults' button on the
on the main toolbar, which would revert the window layout and settings back
to the original installation setting. (There are so many settings in Editra
that the novice user can easily get themselves into a bit of a mess, and
this button would get them out of a hole)

I have the basic code already working within Editra.
It uses 2 plugins based on the Launch plugin.
(I will be giving the tool away for anyone to download and all code will be opensource)

Do you see any specific problems with what I'm try to do?
Is this the sort of usage model that you have in mind with Editra?
(I think that on the surface Editra is a very traditional style editor
and I have found it very usable over the last year I have been using it. )

cheers

-mike
reksa
User
 
Posts: 16
Joined: Mon Apr 25, 2011 12:48 am

Re: using editra for a microcontroller development tool

Postby cody » Tue Apr 03, 2012 9:56 pm

Hi,

Sounds like a reasonable approach for such a distribution.

Guessing that to get the initial configuration you want you are opening editra configuring it then supplying that profile to the users configuration directory when you do the installation. Can't think of another way off the top of my head at the moment unless your plugins hack into the main window manager and reconfigure the layout when they are instantiated or something.

Also to get the default plugins to be pre-enabled you would need to install the plugins.cfg with the plugins names turned on as part of the installation into the users configuration directory.

Only problem I can see with the above as it may be difficult to work it for computer systems with multiple users on them as you can't really know at installation time what users to write these configurations out to. Only other thing I can think is that if you had hard coded the changes in to Editra which would provide some difficulty for you to upgrade the editra installation later on.

Adding the toolbar button should be easy to do through any plugin that implements the MainWindowI interface as it can just query the toolbar and add the button / event handlers when the plugin init method is called by the mainwindow.

Your totally welcome to use Editra in this way the only restrictions on Editra are against taking it and reselling it as a product or derived product. Free redistribution in opensource and free tools or charity purposes are no problem.

Let me know if you run into any issues once you get to the details. Extensions can be added to Edtira when necessary to make it easier for integration.

cody
User avatar
cody
Site Admin
 
Posts: 1315
Joined: Mon Oct 09, 2006 2:49 am
Location: United States

Re: using editra for a microcontroller development tool

Postby reksa » Wed Apr 04, 2012 4:12 am

Thanks for the tips. I'm sure I'll need help along the way!

-mike
reksa
User
 
Posts: 16
Joined: Mon Apr 25, 2011 12:48 am

Re: using editra for a microcontroller development tool

Postby reksa » Tue May 22, 2012 5:23 am

Hi Cody,

Just an update with the mpyeditor project which is based on Editra. Please let me know if you have any tips, advice or objections to the way I'm handling this. I don't have a strong computer science background so some of the ways I do things may not be very standard or pythonic!

I just uploaded the first alpha release of the 'mpyeditor' on sourceforge at https://sourceforge.net/projects/mpyeditor/?source=directory and the webpage is at http://www.mpyprojects.com

It's been a bit of a challenge to get an all in one Windows installation package working, and it needs
a lot more work to make it robust. (like testing the partial installation options, and registry updates)

The package is a bit of a monster as it includes the installation of Python 2.7.3, wxPython, Editra, (installed as source under C:\Python27) and then I have the mpy_editor, mspgcc, mspdebug, plus a few other components (installed under C:\MPY). I also install an editra plugin directory with the mpyeditor plugins pre-loaded. The mpyeditor plugin egg files are currently setup as links across to the C:MPY\mpy_editor directory. I also create the cfg file under the $APPDATA directories so that the plugins are pre-enabled, and the first example program is loaded when the user first runs the tool.

It's been tested it on several windows pcs (XP sp3, vista and w7, 32 and 64bit) and the full install seems to be working fairly smoothly. Currently the installation is hardcoded to the C:\Python27 and C:\MPY directories as I had several issues with some components if they were under the usual default 'C:\Program Files' directory (this is because the name has a space!). Ideally I would like to produce a single mpyeditor.exe file like your editra.exe

I hope you don't mind I used your nsis script as a starting point for mine. It has a components page where the user can select which components are installed. So users that already have python27/wxpyhton/editra can just select the mpyeditor part. However I have not tested all the combinations of different component selections yet.

cheers

mike
reksa
User
 
Posts: 16
Joined: Mon Apr 25, 2011 12:48 am

Re: using editra for a microcontroller development tool

Postby cody » Tue May 22, 2012 1:47 pm

Hi,

Looks very interesting!

Hope to be able to find some time to review it by this weekend.

Cody
User avatar
cody
Site Admin
 
Posts: 1315
Joined: Mon Oct 09, 2006 2:49 am
Location: United States


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron