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



Hi Lucas,


Le 23/06/2011 16:57, Lucas van Dijk a écrit :
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).

I would prefer to avoid GUI code in the IAnjutaEnvironment plugin and get only a list of properties with a type. Then the build plugin can choose the best way to create entry widgets. But this solution is easier and I haven't a really better proposal currently. I think it's better to keep it.


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:
https://gitorious.org/anjuta-avr-environment/anjuta-avr

OK, thanks I will look at this.


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

Ok.


I also started a bit with the configure.ac <http://configure.ac> 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
configure.ac <http://configure.ac>:
https://gitorious.org/anjuta-avr-environment/anjuta-avr-plugin/commit/19807b082b6caee395e548da952ea22b065f9060

I think I need to have all the configuration with all the corresponding configure flags. So, perhaps your target widget can change the flags for all configurations and the dialog will take care of detecting such change to update the argument entry box. I don't know exactly how to do it, but Anjuta shell contains values and a plugin can be notified when such value change. It's probably to use such value.


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?

I have already get this error but I don't remember exactly how I have fixed it. I think it's because the vala plugin doesn't build outside the source directory. One solution is to disable vala support. I think I have just erase the vala plugin from the Makefile in plugins directory or copy the needed file in the build directory.

The right solution will be to fix the build script.


Regards,

Sébastien



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