simulavr-devel
[Top][All Lists]
Advanced

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

Re: [Simulavr-devel] Discussion: siminfo feature as proposed by Markus H


From: Klaus Rudolph
Subject: Re: [Simulavr-devel] Discussion: siminfo feature as proposed by Markus Hitter
Date: Thu, 27 Feb 2014 18:54:10 +0100
User-agent: Thunderbird 2.0.0.23 (X11/20090817)

Michael Hennebry schrieb:
> On Wed, 26 Feb 2014, Markus Hitter wrote:
> 
>> Am 26.02.2014 20:31, schrieb Klaus Rudolph:
>> The tricky thing here is to make the linker keeping this section.
>> Typically, code for AVRs is compiled into a binary as small as possible
>> and this also means removing unused sections. So far I couldn't find a
>> linker option to do heavy optimisation _except_ for the .siminfo section.
> 
> Isn't that what KEEP in a linker script is for?

Exactly! And there is allready a section for that kind of use:
MEMORY
{
  text   (rx)   : ORIGIN = 0, LENGTH = 8K
  data   (rw!x) : ORIGIN = 0x800060, LENGTH = 0
  eeprom (rw!x) : ORIGIN = 0x810000, LENGTH = 64K
  fuse      (rw!x) : ORIGIN = 0x820000, LENGTH = 1K
  lock      (rw!x) : ORIGIN = 0x830000, LENGTH = 1K
  signature (rw!x) : ORIGIN = 0x840000, LENGTH = 1K
}

The signature section can be used for that. To extend the information
there for the clock frequency etc. is not a problem but must be checked
against other tools which reading these sections.

To write inside this section take a look in

#include <avr/signature.h>


I expect that is no problem to add any needed information behind the
already defined content.

Regards
 Klaus






reply via email to

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