Re: Version/Signature in Flash
Jim Brain <[email protected]> Wed, 19 Jan 2022 10:21:00 -0600
| Newsgroups | gmane.comp.hardware.avr.gcc |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--------------pBTxkSTlSMhEyorXGr9aqL9S
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
On 1/19/2022 10:05 AM, Michael Kwasnicki wrote:
> I am not sure if I got it right.
> The linker is only involved until the .elf file has been created.
> If the question is to pad out the content of the .hex file so it is
> one continuous block then it can be done with :
>
> avr-objcopy -j .text -j .data -j .my_signature *--gap-fill 0xFF* -O
> ihex prog.elf prog.hex
>
> The gap-fill argument fills the blanks with a specific value (0xFF in
> this case).
You are correct. I thought the work was done in the linker. In the
above case, though, does the output have <code> <padded bytes up to max
code space> <my_signature>? That appears to be the requirement in the
resulting file.
Jim
--------------pBTxkSTlSMhEyorXGr9aqL9S
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">On 1/19/2022 10:05 AM, Michael
Kwasnicki wrote:<br>
</div>
<blockquote type="cite"
cite="mid:[email protected]">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<div class="">I am not sure if I got it right.</div>
<div class="">The linker is only involved until the .elf file has
been created.</div>
<div class="">If the question is to pad out the content of the
.hex file so it is one continuous block then it can be done with
:</div>
<div class=""><br class="">
</div>
<div class="">
<div style="margin: 0px; font-stretch: normal; line-height:
normal; font-family: Menlo; color: rgba(0, 0, 0, 0.85098);
background-color: rgb(255, 255, 255);" class=""><span class="Apple-tab-span" style="white-space:pre"> </span><span
class="">avr-objcopy </span><span class="">-j .text -j .data
-j .my_signature <b class="">--gap-fill 0xFF</b> -O ihex
prog.elf prog.hex</span> </div>
</div>
<div class=""><br class="">
</div>
<div class="">The gap-fill argument fills the blanks with a
specific value (0xFF in this case).</div>
</blockquote>
<p>You are correct. I thought the work was done in the linker. In
the above case, though, does the output have <code>
<padded bytes up to max code space> <my_signature>?
That appears to be the requirement in the resulting file.</p>
<p>Jim</p>
<br>
</body>
</html>
--------------pBTxkSTlSMhEyorXGr9aqL9S--