avr-gcc-list
[Top][All Lists]
Advanced

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

Re: [avr-gcc-list] Problems with avrtest simulator and avr-gcc testsuite


From: Paulo Marques
Subject: Re: [avr-gcc-list] Problems with avrtest simulator and avr-gcc testsuite.
Date: Tue, 19 Apr 2011 12:18:57 +0100
User-agent: Thunderbird 2.0.0.23 (X11/20090817)

Georg-Johann Lay wrote:
> Georg-Johann Lay schrieb:
>> With the avrtest simulator, I observe the following problem with the
>> -m option (max instruction count):
>>
>>> avrtest var-expand2.exe -mmcu=avr51 -m 1019948
>>  exit status: TIMEOUT
>>       reason: instruction count limit reached
>>      program: var-expand2.exe
>> exit address: 000318
>> total cycles: 1483103
>>
>>> avrtest var-expand2.exe -mmcu=avr51 -m 1019949
>>  [...avrtest hangs...]
>>
>> So there is a barrier: for all -m values >= 1019949 avrtest hangs, for
>> -m <= 1019948 avrtest stops as desired.
>>
>> I am using avrtest as of
>>   http://winavr.cvs.sourceforge.net/viewvc/winavr/avrtest/
>>
>> All this blocks my work on avr-gcc, because I use avrtest as simulator
>> to run regression tests. FYI, I attached the avr-elf32 executable
>> var-expand2.exe (as tar, because mailing list rejects .exe).
>>
>> Is there a place that hosts updated versions of avrtest or is there a
>> site with more stable simulator that can run avr regression tests?
>>
>> Thanks for any hints on that.
> 
> The problem is in avrtest.c:335
> 
> static int data_read_byte_raw(int address)
> {
>       // add code here to handle special events
> 
>       if (address == STDIO_PORT)
>               return getchar();
> 
>       return cpu_data[address];
> }
> 
> address happens to be 82 which equals STDIO_PORT, therefore avrtest
> waits for input. I removed the if and avrtest works as expected; the
> test program hits ABORT in the remainder.

This "happens to be" is quite strange. If this is happening I would
expect the var-expand2 program to have a bug and is actually reading
stdin for some reason.

Or maybe you are compiling the test suite for a cpu model that has RAM
at those adresses? The last time I ran the test suite I was compiling
for an atmega128 IIRC.

BTW, I was just looking at the repository and it seems that my last
change to implement cycle counters (very useful for benchmarking) that I
thought I committed is not there. Did I forgot to commit or did the
repository went back in time at some point?

-- 
Paulo Marques
Software Development Department - Grupo PIE, S.A.
Phone: +351 252 290600, Fax: +351 252 290601
Web: www.grupopie.com

"To know recursion, you must first know recursion."



reply via email to

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