Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.

#1 Nov. 15, 2005 11:33:05

David B.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[avr-gcc-list] Regression tests


I've seen on the avr-libc-dev list that regression tests were used and onavr-freaks that one guy was building a test suite for his embeddedapplications but he didn't tell anything about how to do it.My question is wether it's possible or not to use regression tests for Cembedded applications. I can't imagine how this can work with hardwarerelated functions. What do you use it for in avr-libc developmment?I coudn't find much information on the subject. I found some keywords likeAvrora, gdb serial protocol, MUL, dejagnu but couldn't get any clear ideastanding out of all this.Thanks for any clarification,

David Bourgeois, still on his quest towards better programming :-)http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=25684&highlight=regression"Build a test suite, as early as possible. Start small, and plan forgrowth.Add (at least) one new test for every new feature or resolved bug.
Make it easy and (reasonably) quick to run, so no one has an excuse
for not running it before Every check-in. I have been repeatedly
rescued by the Regression Test Suite when I've inadvertantly stuck my
elbow into something. Moreover, the very exercise of writing the tests
can help point out holes in the specification/design."


_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.orghttp://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Offline

#2 Nov. 15, 2005 13:06:46

Klaus R.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[avr-gcc-list] Regression tests


Hi David,

I have a lot of regression tests running for my embedded code. I use
my simulator (simulavrxx) which also give the ability to manipulate external
pin states and interconnections between multiple avr devices. A lot of
timing parameters could be measured also
under differnt interrupt conditions so that worst case tests could be
done. I think this could never work in real hardware, also jtag give
not full access in real time environment.

Bye
Klaus


> I've seen on the avr-libc-dev list that regression tests were used and on
> avr-freaks that one guy was building a test suite for his embedded
> applications but he didn't tell anything about how to do it.
>
> My question is wether it's possible or not to use regression tests for C
> embedded applications. I can't imagine how this can work with hardware
> related functions. What do you use it for in avr-libc developmment?
>
> I coudn't find much information on the subject. I found some keywords like
>
> Avrora, gdb serial protocol, MUL, dejagnu but couldn't get any clear idea
> standing out of all this.
>
> Thanks for any clarification,
>
> David Bourgeois, still on his quest towards better programming :-)
>
>
>http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=25684&highlight=regression> "Build a test suite, as early as possible. Start small, and plan for
> growth.
> Add (at least) one new test for every new feature or resolved bug.
> Make it easy and (reasonably) quick to run, so no one has an excuse
> for not running it before Every check-in. I have been repeatedly
> rescued by the Regression Test Suite when I've inadvertantly stuck my
> elbow into something. Moreover, the very exercise of writing the tests
> can help point out holes in the specification/design."
>
>
> _______________________________________________
> AVR-GCC-list mailing list
> AVR-GCC-l***@*ongnu.org
>http://lists.nongnu.org/mailman/listinfo/avr-gcc-list>

--
Highspeed-Freiheit. Bei GMX supergünstig, z.B. GMX DSL_Cityflat,
DSL-Flatrate für nur 4,99 Euro/Monat*http://www.gmx.net/de/go/dsl_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.orghttp://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Offline

#3 Nov. 15, 2005 13:23:11

David B.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[avr-gcc-list] Regression tests


Hi Claus,

This sounds very exciting!
Is there any place I can learn about it? Any examples lying around?

Thanks,
DavidOn Tue, 15 Nov 2005 12:58:05 +0100, Klaus Rudolph <>wrote:Hi David,

I have a lot of regression tests running for my embedded code. I usemy simulator (simulavrxx) which also give the ability to manipulateexternalpin states and interconnections between multiple avr devices. A lot of
timing parameters could be measured also
under differnt interrupt conditions so that worst case tests could be
done. I think this could never work in real hardware, also jtag give
not full access in real time environment.

Bye
KlausI've seen on the avr-libc-dev list that regression tests were used andonavr-freaks that one guy was building a test suite for his embedded
applications but he didn't tell anything about how to do it.

My question is wether it's possible or not to use regression tests for C
embedded applications. I can't imagine how this can work with hardware
related functions. What do you use it for in avr-libc developmment?I coudn't find much information on the subject. I found some keywordslikeAvrora, gdb serial protocol, MUL, dejagnu but couldn't get any clearideastanding out of all this.

Thanks for any clarification,

David Bourgeois, still on his quest towards better programming :-)

http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=25684&highlight=regression"Build a test suite, as early as possible. Start small, and plan for
growth.
Add (at least) one new test for every new feature or resolved bug.
Make it easy and (reasonably) quick to run, so no one has an excuse
for not running it before Every check-in. I have been repeatedly
rescued by the Regression Test Suite when I've inadvertantly stuck my
elbow into something. Moreover, the very exercise of writing the tests
can help point out holes in the specification/design."


_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-l***@*ongnu.orghttp://lists.nongnu.org/mailman/listinfo/avr-gcc-list--
David Bourgeois

C2ME - Centre de Conception en Microtechnologies Européen sa
Parc Initialis - Rue René Descartes, 2 - 7000 Mons (Belgium)
Phone : +32 65 37 42 25 - Fax +32 65 37 42 36


_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.orghttp://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Offline

#4 Nov. 15, 2005 15:10:46

Klaus R.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[avr-gcc-list] Regression tests


Hi David,


> Hi Claus,
-----K----- :-)

simple check out from the sources and look for the tcl scripts under
examples. There you can see how things can be activated and also
be read out. And also the gdb interface is available via normal
unix socket. So all internal and external events/states could be
set or analysed. You can write your own C/C++/Tcl/Python programs/scripts
which do the check itself. So you have the complete simulated environment
and also the full ability for all tests you need. There is no "generic"
regression test toolset, but I also have never a need for such "generic"
tests.
What I normaly do is to get a bus protocal analysis which is taken
from a 2 wire bus (clk/data) which is monitored and connected to
a lot of simulated controllers. And if the traced protocol is what I expect
nearly all things in all the controllers seems to work fine.
I use it for a model railway control system which uses lots of
avr controllers. I simulate also the behaviour of trains, the
signaling and a lot of other things. If the train arrives at
full simulated endpoint and protocoll tells that no errors occur
and the state of all control elements is in start condition after the run,
all seems to be ok. If this
is true the simulated environment has no failures and should also
work in real conditions and hardware (and it works :-).

Bye
Klaus



>
> This sounds very exciting!
> Is there any place I can learn about it? Any examples lying around?
>
> Thanks,
> David
>
> On Tue, 15 Nov 2005 12:58:05 +0100, Klaus Rudolph <>
> wrote:
>
> > Hi David,
> >
> > I have a lot of regression tests running for my embedded code. I use
> > my simulator (simulavrxx) which also give the ability to manipulate
> > external
> > pin states and interconnections between multiple avr devices. A lot of
> > timing parameters could be measured also
> > under differnt interrupt conditions so that worst case tests could be
> > done. I think this could never work in real hardware, also jtag give
> > not full access in real time environment.
> >
> > Bye
> > Klaus
> >
> >
> >> I've seen on the avr-libc-dev list that regression tests were used and
> >> on
> >> avr-freaks that one guy was building a test suite for his embedded
> >> applications but he didn't tell anything about how to do it.
> >>
> >> My question is wether it's possible or not to use regression tests for
> C
> >> embedded applications. I can't imagine how this can work with hardware
> >> related functions. What do you use it for in avr-libc developmment?
> >>
> >> I coudn't find much information on the subject. I found some keywords
> >> like
> >>
> >> Avrora, gdb serial protocol, MUL, dejagnu but couldn't get any clear
> >> idea
> >> standing out of all this.
> >>
> >> Thanks for any clarification,
> >>
> >> David Bourgeois, still on his quest towards better programming :-)
> >>
> >>
> >>
> >
>http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=25684&highlight=regression> >> "Build a test suite, as early as possible. Start small, and plan for
> >> growth.
> >> Add (at least) one new test for every new feature or resolved bug.
> >> Make it easy and (reasonably) quick to run, so no one has an excuse
> >> for not running it before Every check-in. I have been repeatedly
> >> rescued by the Regression Test Suite when I've inadvertantly stuck my
> >> elbow into something. Moreover, the very exercise of writing the tests
> >> can help point out holes in the specification/design."
> >>
> >>
> >> _______________________________________________
> >> AVR-GCC-list mailing list
> >> AVR-GCC-l***@*ongnu.org
> >>http://lists.nongnu.org/mailman/listinfo/avr-gcc-list> >>
> >
>
>
>
> --
> David Bourgeois
>
> C2ME - Centre de Conception en Microtechnologies Européen sa
> Parc Initialis - Rue René Descartes, 2 - 7000 Mons (Belgium)
> Phone : +32 65 37 42 25 - Fax +32 65 37 42 36
>
>
> _______________________________________________
> AVR-GCC-list mailing list
> AVR-GCC-l***@*ongnu.org
>http://lists.nongnu.org/mailman/listinfo/avr-gcc-list>

--
Telefonieren Sie schon oder sparen Sie noch?
NEU: GMX Phone_Flathttp://www.gmx.net/de/go/telefonie_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.orghttp://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Offline

#5 Nov. 15, 2005 17:30:34

Mark E.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[avr-gcc-list] Regression tests


Can you simulate devices attached other than an AVR in this simulator? For
instance, I would like to simulate being attached to a SPI RTC, some flash
memory, and a number of devices attached via pins. If I could somehow write
code to simulate those, I would be the happiest person!

Mark E. Scott, Jr.

AWS, Inc.
512-478-7727


-----Original Message-----
From: On Behalf Of Klaus Rudolph
Sent: Tuesday, November 15, 2005 5:58 AM
To: David Bourgeois
Cc: avr-gcc-l***@*ongnu.org
Subject: Re: Regression tests

Hi David,

I have a lot of regression tests running for my embedded code. I use
my simulator (simulavrxx) which also give the ability to manipulate external
pin states and interconnections between multiple avr devices. A lot of
timing parameters could be measured also
under differnt interrupt conditions so that worst case tests could be
done. I think this could never work in real hardware, also jtag give
not full access in real time environment.

Bye
Klaus


> I've seen on the avr-libc-dev list that regression tests were used and on
> avr-freaks that one guy was building a test suite for his embedded
> applications but he didn't tell anything about how to do it.
>
> My question is wether it's possible or not to use regression tests for C
> embedded applications. I can't imagine how this can work with hardware
> related functions. What do you use it for in avr-libc developmment?
>
> I coudn't find much information on the subject. I found some keywords like
>
> Avrora, gdb serial protocol, MUL, dejagnu but couldn't get any clear idea
> standing out of all this.
>
> Thanks for any clarification,
>
> David Bourgeois, still on his quest towards better programming :-)
>
>
>http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=25684&highlight=regression> "Build a test suite, as early as possible. Start small, and plan for
> growth.
> Add (at least) one new test for every new feature or resolved bug.
> Make it easy and (reasonably) quick to run, so no one has an excuse
> for not running it before Every check-in. I have been repeatedly
> rescued by the Regression Test Suite when I've inadvertantly stuck my
> elbow into something. Moreover, the very exercise of writing the tests
> can help point out holes in the specification/design."
>
>
> _______________________________________________
> AVR-GCC-list mailing list
> AVR-GCC-l***@*ongnu.org
>http://lists.nongnu.org/mailman/listinfo/avr-gcc-list>

--
Highspeed-Freiheit. Bei GMX supergünstig, z.B. GMX DSL_Cityflat,
DSL-Flatrate für nur 4,99 Euro/Monat*http://www.gmx.net/de/go/dsl_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-l***@*ongnu.orghttp://lists.nongnu.org/mailman/listinfo/avr-gcc-list_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.orghttp://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Offline

#6 Nov. 15, 2005 17:49:24

Uwe F.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[avr-gcc-list] Regression tests


Mark E. Scott Jr. schrieb:Can you simulate devices attached other than an AVR in this simulator? For
instance, I would like to simulate being attached to a SPI RTC, some flash
memory, and a number of devices attached via pins. If I could somehow write
code to simulate those, I would be the happiest person!Well, I don't think, that this is possible in the moment.There is one open source project, that supports mixed mode simulationfor pic processors, but not for avr.Look at:http://ktechlab.org/I ask them for avr support, and I want to quote from the answer I got:One possible route would be to use an existing AVR emulator. As far as I'maware, Simulavr is the only notable one.Then, you'd then need to integrate the emulator with KTechlab's simulation.Gpsim, for example, has the simulation logic provided in seperate libraries tothe user interface, and so KTechlab uses gpsim's shared libraries for PICsimulation - the next two files show most of how gpsim is used:Interface to gpsim:https://svn.fadedminds.com/ktechlab/src/electronics/gpsimprocessor.cppBridge from gpsim to simulation:https://svn.fadedminds.com/ktechlab/src/electronics/components/piccomponentpin.cppIf you wanted to do something similar with simulavr (or another AVR emulator),you'd need to ensure that that emulator provided its simulation logic inseperate libraries, so that ktechlab could load them and control thesimulation. As far as I can tell, Simulavr comes in one monolothic program -so using Simulavr as a loadable library would involve coding on simulavrfirst, and sending patches off to its maintainers.The only other alternative would be to write your own emulator, or use codedirectly from Simulavr (neither of which I'd reccommend).Then there is at least one commercial solution:http://www.labcenter.co.uk/Not cheap, and the newest AVR they support is the mega128.

I run my unit tests in the following way:- all the c code is organized in classes (a struct of date and functionsworking on this data)- the state of the class can be read from the pc
- all methods can be called from the pc- I have a kind of RPC framework on the pc in delphi, so I can call allthe methods in the embedded device- I write unit tests in delphi to test the embedded device.

Not an easy solution, but it works.

Regards:

Uwe


_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.orghttp://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Offline

#7 Nov. 15, 2005 18:15:59

K.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[avr-gcc-list] Regression tests


On Tuesday 15 Nov 2005 11:19 pm IST, Uwe Fechner wrote:
UF> Then there is at least one commercial solution:
UF>
UF>http://www.labcenter.co.uk/And there is VMlab (http://www.amctools.com/vmlab.htm)

If i recall correctly it does support adding customized peripherals for
those which do not exist in its library.
--
Cheers!
Kitts



_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.orghttp://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Offline

#8 Nov. 16, 2005 08:19:29

Klaus R.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[avr-gcc-list] Regression tests


Hi Mark,

> Can you simulate devices attached other than an AVR in this simulator?
> For instance, I would like to simulate being attached to a SPI RTC, some
> flash memory, and a number of devices attached via pins. If I could
somehow
> write code to simulate those, I would be the happiest person!

Allready simulated are: external UART, LCD 4lines/20chars, switches,
analog "entry fields". So there is really absolute no problem to simulate
any other device you want to have. And the devices could be simulated
not in a simply clocked mode but also with "personal timing" behaviour.
Please spend your devices to the simulavrxx project!

Have fun!

Regards
Klaus

--
Highspeed-Freiheit. Bei GMX supergünstig, z.B. GMX DSL_Cityflat,
DSL-Flatrate für nur 4,99 Euro/Monat*http://www.gmx.net/de/go/dsl_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.orghttp://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Offline

#9 Nov. 17, 2005 12:30:04

David B.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[avr-gcc-list] Regression tests


On Tue, 15 Nov 2005 14:59:48 +0100, Klaus Rudolph <>wrote:Hi David,Hi Claus,-----K----- :-)Oops, sorry for thatsimple check out from the sources and look for the tcl scripts under
examples. There you can see how things can be activated and alsoFound the sources in simulavrxx project. Seems there's still a long wayfor me to get there. :-/I should switch to linux for avr developpment pretty soon. I'll need acouple more beers probablyThanks to you,
David


_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.orghttp://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Offline

Board footer

Moderator control

Enjoy the 20th of November
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support