On Jun 23, 2016, at 4:00 AM, Georg-Johann Lay <a...@gjlay.de> wrote:
> Binutils don't produce a message

That's unfortunate.

> so there is nothing to scan for.  Hacking binutils is beyond my scope.

That's fine.

> avrtest behaves just as if the program under test would call abort.

That's unfortunate.  Would be nice if they said, can't load program, or some 
other unique thing we could check for.

> There are at least 2 other AVR simulators; dunno how they would handle the 
> situation.

That doesn't matter, as the tool chain has to be ported to each.  Of course, if 
they can self agree on common things, that would be best.  If they do, then the 
work on our side is 1/2 the work.

> I don't see how an a-posteriori test could be independent of simulator, 
> independent of board descriptions and all that stuff.

I can explain if detail, if you want.  Program loader always says 'program load 
failed, program too big', when that is true, then dejagnu can look for this 
string, and always know that the test case is unsupported, doesn't matter the 
board file, the platform, the OS, the chip architecture or the time of day.  
The reason is the program loader must know onto what it is loading.  Likewise, 
when linking, the board file can have details, like this target has 96KB of 
ram, and some linkers, given that detail, can create a memory segment that is 
that size, and as the linker fills that segment, it can print, segment 
overflowed.  Binutils usually does this for free, _if_ you give it memory 
segments.  On virtual memory systems, we never do, as there is little concept 
of memory overload at static link time; but, for fixed memory systems, it is 
perfectly reasonable to have memory segments that have this size, if one wants.

A program loader that can't complain in some fashion, is, well, not a nice 
program.

For binutils, you can have:

MEMORY {
       SRAM(rwx)     : ORIGIN = 0x00000000, LENGTH = 128K
}

to define SRAM as being 128KB for example.  The linker script can then put 
things into sram, and when it overflows, it will print an error.  By doing 
this, one never has to worry about load failures.

> Is this one ok?

Ok.

Reply via email to