<div dir="ltr"><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
The new are of xmega3 architecture, which is already included. So this<br>
should be simple.<br><br>
Where is the information about ISR-vector table, SRAM addresses and so<br>
on stored?</blockquote><div><br></div><div>At the moment, this is not implemented in LLVM; these details are left to the frontend. Clang/compiler-rt does not include the usual ISR table or AVR-specific startup routines to initialize SRAM from program memory - avr-clang-compiled executables must currently be linked with avr-libc/libgcc. Users of the AVR-Rust frontend have implemented these tables and routines in assembly in each source repository, or more commonly just linked against avr-libc and GCC's AVR CRT libraries. Ideally, we would provide our own implementation of these independent of the GCC/GNU ecosystem in somewhere like compiler-rt.</div><div><br></div><div>Hope that helps,</div><div><br></div><div>Regards,</div><div>Dylan<br></div>
</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 4, 2020 at 11:10 PM Wilhelm Meier <<a href="mailto:wilhelm.meier@hs-kl.de">wilhelm.meier@hs-kl.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Thanks!<br>
<br>
The new are of xmega3 architecture, which is already included. So this<br>
should be simple.<br>
<br>
Where is the information about ISR-vector table, SRAM addresses and so<br>
on stored?<br>
<br>
--<br>
Wilhelm<br>
<br>
Am 04.03.20 um 11:03 schrieb Dylan McKay:<br>
> Hey Wilhelm,<br>
> <br>
> This should be possible by editing the 'AVRDevices.td' [1]TableGen<br>
> definitions to add an entry for the newer chip types. You will need to<br>
> instruct LLVM which features are available on the chip (such as extended<br>
> LPM support), cross referencing with the instruction set manual for the<br>
> AVR MCU you're adding to figure out what is allowed and what is not.<br>
> <br>
> If there are newer instructions not yet supported by the AVR backend, or<br>
> if their are device-specific constraints not already handled by the<br>
> backend in its AVRDevices feature declarations, then you will need to<br>
> either extend the backend to support it, or declare the chip with a<br>
> lower level of support than is strictly required as a workaround.<br>
> <br>
> Then after that, it should be possible to recompile the backend and<br>
> target the new chip type with 'llc -march=avr -mcpu=tiny1614'. for example.<br>
> <br>
> * [1] -<br>
> <a href="https://github.com/llvm/llvm-project/blob/96fdc65dc4b19944079fa7f61ea52e4e0f999985/llvm/lib/Target/AVR/AVRDevices.td#L255" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-project/blob/96fdc65dc4b19944079fa7f61ea52e4e0f999985/llvm/lib/Target/AVR/AVRDevices.td#L255</a><br>
> <br>
> <br>
> Regards,<br>
> Dylan<br>
> <br>
> <br>
> On Wed, Mar 4, 2020 at 10:19 PM Wilhelm Meier via llvm-dev<br>
> <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a> <mailto:<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>>> wrote:<br>
> <br>
> I'm beginning to use the AVR backend. I ran into the problem, that newer<br>
> (tiny1, mega0) µC as a tiny1614 are not supported. How do I add these to<br>
> the AVR backend?<br>
> <br>
> Thanks!<br>
> _______________________________________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a> <mailto:<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>><br>
> <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
> <br>
<br>
-- <br>
Wilhelm Meier<br>
Vor dem Hirschberg 5<br>
D-66459 Kirkel-Limbach<br>
0151-12414315<br>
</blockquote></div>