Re: [anjuta-devel] Selecting and storing AVR debug platform and target device

You define new interface by describing it in the file libanjuta/interfaces/libanjuta.idl. The syntax is quite simple, you can take other interfaces as example.

I'm not sure you need to define a new interface for these functions, I think you can add them in the already existing IAnjutaEnvironment interface.

Ok, I modified the existing IAnjutaEnvironment interface with these additional functions and signals:

    GtkWidget* get_extra_configure_widget();
    gchar* get_extra_configure_flags();
    void ::changed();

In this way the plugin loads the widget from the glade file, or creates it with just code, and returns that. That widget should be a member of the plugin class, because it's needed in 'get_extra_configure_flags', which will return a string of extra flags based on the current UI state.

The plugin can also connect to the destroy signal of the widget, and for example save the last selected target device in the Anjuta session. (And probably set pointer to the widget to NULL).
- Perhaps we could plan a similar interface for adding entries to other part in anjuta, like execute parameter dialog by example?

Yeah that's probably a good idea, I also thought of a debugger properties dialog, and move the 'gdb executable' preference to that dialog, along with some other preferences, for example if you want to debug remote (Makes that menu entry obsolete), some initial commands for gdb etc. And also let plugins extend it.

- What's happen when you have a makefile project, there is no configure file so how do you select the target? Perhaps we could just display the configure dialog in this case?

That's something we still have to think about.
I'm currently working on this plugin and I have done some reorganization, like using GFile* instead of gchar*. I think the file plugin.c is too big and should be better split in smaller pieces. For the configuration dialog, it is implemented in build-options.c

I modified the build plugin a bit, unfortunately the diff is too big to view online (I also modified the glade file with glade3 and it added a lot of properties), it does compile, but I couldn't test it yet because I anjuta itself wouldn't compile (see below). You can find the commit here:
I have no particular preference, you can use the output of avr-gcc or install a .xml or .ini listing all targets. Parsing the output of avr-gcc could be better but it could fail for a stupid reason.

I'll probably use an ini file, because reading the output of avr-gcc is too error prone I think. 

I also started a bit with the for AVR projects, and ran into a problem:
You need to change the compiler flags to set the target device. This can be done using CFLAGS='--mmcu=target', but when you select a configuration in the configure dialog, it already defines CFLAGS, and that's going to be tricky.

A solution can be to make an AC_ARG_VAR called DEVICE and add --mmcu=DEVICE somehow to the CC var. Here's the commit with the

And when trying to 'Build project (shift+f7)', with the lastest anjuta from master loaded, it gives me the following error message:

make[3]: *** No rule to make target `/home/lucas/Coding/C/anjuta-avr/plugins/language-support-vala/libanjuta_language_vala_la_vala.stamp', needed by `/home/lucas/Coding/C/anjuta-avr/plugins/language-support-vala/locator.c'.  Stop.

Any idea how I can fix this?


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]