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. _______________________________________________ AVR-libc-dev mailing list AVR-libc-dev@nongnu.org http://lists.nongnu.org/mailman/listinfo/avr-libc-dev