[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-libc-dev] How many bits wide is __data_load_end?
From: |
Simone Zamboni |
Subject: |
Re: [avr-libc-dev] How many bits wide is __data_load_end? |
Date: |
Sat, 02 Oct 2010 14:24:16 +0200 |
Joerg Wunsch wrote:
>
> Sorry, my fault. Change the "=r" constraint into "=a".
>
Shouldn't be "=d"? ldi instruction requires upper registers from r16 to
r31 but "=a" constrains registers only to r23 (works, but limited).
However, I think that Joerg is right: the only way to access that symbol
is through assembly. The "__data_load_start" symbol is evaluated as a
constant value and has no type, the assembly let you choose the data
width the "hard way" so the real width of the linker symbol doesn't
matter anymore.
I had experimented this technique a few months ago in an application
(using just XMEGA128A1): I had to calculate SHA-1 hash of the whole code
in the flash and needed to know its real dimensions and surprising I
come up to the same code as Joerg wrote.
By the way, a note for me: Bob, how much time does the XMEGA take to
verify all the code (roughly)? Reading all the flash data seems to take
a few seconds.
- Re: [avr-libc-dev] How many bits wide is __data_load_end?,
Simone Zamboni <=
[avr-libc-dev] Re: How many bits wide is __data_load_end?, David Brown, 2010/10/02