Re: [anjuta-devel] Selecting and storing AVR debug platform and target device
- From: Sébastien Granjoux <seb sfo free fr>
- To: anjuta-devel-list gnome org
- Subject: Re: [anjuta-devel] Selecting and storing AVR debug platform and target device
- Date: Mon, 30 May 2011 19:31:44 +0200
Hi,
Le 30/05/2011 12:57, Lucas van Dijk a écrit :
You have several AVR debug platforms, like the AVR Dragon, the JTAG ICE
mkII, JTAG ICE mkI, and the simulator. each platform does not support
all devices, and their supported devices list will differ from each
other. So when creating a new project, and you select a certain debug
platform, the list where you can select the target device should be
dynamically filled with data. Is that possible with the autogen based
project wizards? And if not, how should I implement it? Create a dialog
in C which opens directly after the project wizard? Create a dialog
which opens before compiling/debugging if the target device isn't yet
selected?
It is possible to change something dynamically in the project wizard.
That's the reason why there are several pages. After choosing something
on one page, you can check the value to display something different in
the other pages.
By example
<property type="boolean" name="HavePackageExtra" _label="Configure
external packages:" _description="Use pkg-config to add library support
from other packages" default="0"/>
</page>
[+IF (=(get "HavePackageExtra") "1")+]
<page name="packages" _label="Configure external packages"
_description="Configure external packages">
<property type="package" name="PackageModule2" _label="Require
Package:" _description="Give a package name that your project require.
You may also mention what is the required version of the package. For
example, 'libgnomeui-2.0' or 'libgnomeui-2.0 >= 2.2.0'" mandatory="yes"/>
</page>
[+ENDIF+]
Here the whole page "Configure external packages" will be displayed only
if you have checked HavePackageExtra on the previous page.
If your relation between device and debug platform is known, it should
not be a problem, you have a CASE macro. If you need to run a script,
it's a bit more annoying but I think it's possible.
I think it would be better to be able to configure this in the project
wizard. The advantage is that you don't need to write a new dialog. The
issue is that if you need to change it after creating the project you
will have to create a dialog for this but you will still have a default
value. I don't know if it makes sense or not. Note that several project
properties are set in the project wizard but can still be changed
afterward in the project properties dialog.
And when the user selects a debug platform and target device, where do
we store that information? It's required in almost every part of the
development process: compiling, debugging and programming it on to the
AVR. So a configure.ac <http://configure.ac> is required to check if
avr-gcc is available, and sets the CC to avr-gcc, and must set some
compiler arguments too containing the target device and maybe the CPU
frequency as a define.
Is it something that is inside the configure.ac (the program is working
only for a predefined platform) or is it something that is set when you
run configure (the program could be compiled for different platform) ?
If it is inside configure.ac, the project manager parses it so it should
be able to give you all informations needed. It could need some
improvements in the autotools backend. As I'm currently working on it,
it shouldn't be a big problem.
If it is an option of the configure step, it's saved in anjuta session
data. (in .anjuta/session/anjuta.session). Perhaps we could check
config.status to get more information but it's not done currently.
When debugging, a GDB server has to be started, for example AVaRICE for
JTAG or debugWire debugging. AVaRICE (and the simulator too) requires
the target device when starting. avr-gdb doesn't require the target
device so that makes it a little easier. But where do we get the target
device from? I think I'll make an entry in the tools (or an AVR specifc)
menu, where you can start/stop AVaRICE or the simulator. The best thing
would be start, without any dialog to enter additional information like
the target device (as it's already given in the project creation
wizard), but we need to retreive the given target device from somewhere.
AVRDude also requires the target device, so we need the target device
available in the code.
Do you have any suggestions about that?
If your project is really specific to a device. I think this should be
written in the configure.ac file. The project wizard can ask the
information and write the corresponding configure.ac. Then the project
manager will read this file and this information will appear as one of
the project properties.
But, I'm not sure a program is really specific to one device and then
it's less clear.
Best Regards,
Sébastien
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]