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

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

Re: [avr-gcc-list] Re: Patch: avrtest elf reader


From: hutchinsonandy
Subject: Re: [avr-gcc-list] Re: Patch: avrtest elf reader
Date: Wed, 21 May 2008 08:33:29 -0400

I agree with Paulo!

Exit as indicated to allow gcc testsuite to recognise error and include description. It might be useful to prefix message with AVRTEST --

That would make is slightly easier for me to scan results and see what triggered error (compiler, assembler, linker, AVRtest).

On no account, bypass normal code execution. We depend on AVRtest being able to run code and detect errors. (Ok with options you can do what you like I suppose)

Thanks for the effort!

Andy


-----Original Message-----
From: Paulo Marques <address@hidden>
To: Tristan Gingold <address@hidden>
Cc: address@hidden
Sent: Wed, 21 May 2008 7:39 am
Subject: [avr-gcc-list] Re: Patch: avrtest elf reader


Tristan Gingold wrote: 
Hi, 
 
Hi, 
 
I don't know if this is the right list to speak about avrtest or if >
patches can be sent by mails. If not, 
please tell me the right way. 
 
Since avrtest was born mostly to run gcc's testsuite, I guess this is the best mailing list for it. 
 
We (=AdaCore) have been using avrtest for a while, using the first >
posted version. We have improved its 
speed and feature. In the same time, avrtest had had a repository and has been improved (predecoding). 
> I am now trying to do a local merge. 
 
Great! 
 
One of our improvement is direct support of ELF files. This avoids to launch avr-objcopy and also 
directly load the SRAM.  
I have been wanting to do this for a while now, and I must say that the code looks very similar to something I would have done myself. So, good work! :) 
 
The only thing I think needs to be changed is the way the program aborts on error. The gcc testsuite requires the program to print either "EXIT", "ABORTED" or "TIMEOUT" to give a PASS / FAIL / etc. result to the test. 
 
So, maybe changing the lines that simply "return -1" in the "load_elf" function to 'leave(EXIT_STATUS_ABORTED, "...")' would be enough. For instance, change: 
 
+ if (addr + memsz > MAX_FLASH_SIZE) 
+ return -1; 
 
to: 
 
+ if (addr + memsz > MAX_FLASH_SIZE) 
+ leave(EXIT_STATUS_ABORTED, "program too big to fit in flash"); 
 
This would ensure that the testsuite would correctly FAIL this test, and the user would quickly understand why. 
 
This second feature allows to use a strip down version of crt1 that
doesn't 
initialize the SRAM. 
 
The only downside of this, is that if we introduce a bug in the "real" crt1, the testsuite might not catch it, because the memory is being "magically" initialized to the correct values. Maybe change this to a command line option? 
 
Comments are welcome. 
 
All in all, good work :) 
 
This also opens the way for reading the symbols directly from the elf file. This would allow avrtest to have symbolic breakpoints and better address <-> name translations in the logged version to make it easier to follow code execution. 
 
-- Paulo Marques 
Software Development Department - Grupo PIE, S.A. 
Phone: +351 252 290600, Fax: +351 252 290601 
Web: www.grupopie.com 
 
"All generalizations are false." 
 
_______________________________________________ 
AVR-GCC-list mailing list 
address@hidden
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list 





reply via email to

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