simulavr-devel
[Top][All Lists]
Advanced

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

Re: [Simulavr-devel] Re: interrupt flag/enable bits update


From: Theodore A. Roth
Subject: Re: [Simulavr-devel] Re: interrupt flag/enable bits update
Date: Sat, 29 Nov 2003 20:08:53 -0800 (PST)

On Sat, 29 Nov 2003, John Regehr wrote:

> > hits a breakpoint. The test program should have multiple loops labeled like
> > PASS_DONE, FAILn_DONE, etc. The sim will need to spit out which address it
> > terminated on and the harness can parse that to see if the test passed or
> > not. The hard part is taking the rom image and figuring out where the break
> > points should be set at. I'm not quite ready to start implementing this yet
> > though, still hashing it out in my head.
> 
> Ok, I've attached a small program that should do what you want.  It was
> very quick to implement since I borrowed most code from an existing
> project.
> 
> Compile and run something like this:
> 
>   gcc -O -Wall readelf.c -o readelf -l elf
>   ./readelf ./test6.elf
> 
> When run it prints the addresses of three functions: __success, __failure,
> and main.  main() is just a sanity check I left in, you'll probably want
> to delete this.  Output is trivially parsed by a perl or python or
> whatever script invokes simulavr.

I'm kinda partial to just using avr-nm:

  address@hidden test_8515]$ avr-nm test_cntr | grep DONE
  0000003a t DONE

  address@hidden test_c]$ avr-nm deep_frame | grep main
  00000118 T main

I think that would be more portable and easier to maintain. It's trivial to 
run it from python and capture/parse the output. I'm not too keen on 
compiling another tool to run the test suite if it can be avoided. I am 
assuming that avr-nm is going to be available if avr-gcc is available. 
It would be easy to have configure check for it.

I do like the idea of __success and __failure functions.

Right now, my --breakpoint hack is a bit lacking. I need to update it to 
allow specifying more than one breakpoint. Shouldn't be that hard though.

Ted Roth





reply via email to

[Prev in Thread] Current Thread [Next in Thread]