search for: atmega328p

Displaying 12 results from an estimated 12 matches for "atmega328p".

2020 Mar 25
2
Build Clang/LLVM for AVR
Thank you for both of your input. Yes, I try to cross-compile for AVR, the simple ATMEGA328P used in every Arduino Uno. My main motivation being that I hope to be able to use a couple of STL containers, <functional> and <type_traits> on the MCU. Not sure though if this can be reached by going via the clang route. Getting back to the compilation: when I run clang with both both...
2020 Mar 25
3
Build Clang/LLVM for AVR
...CMAKE_BUILD_TYPE=Release ../llvm make -j8 sudo make install Next I created a pretty empty main.cpp and tried to compile that: #include <stdint.h> int main() { for(;;) { } return 0; } Here's the result of attempting the compilation ... $ clang++ --target=avr -mmcu=atmega328p -c main.cpp -o main.o -v clang version 11.0.0 (https://github.com/llvm/llvm-project 177dd63c8d742250dac6ea365e7c30f0fbab3257) Target: avr Thread model: posix InstalledDir: /usr/local/bin Found candidate GCC installation: /usr/lib/gcc/avr/5.4.0 Selected GCC installation: /usr/lib/gcc/avr...
2020 Mar 30
2
How to add new AVR targets?
Hey Wilhelm, Could you post the LLVM IR generated from your C++ file? This can be achieved with 'clang -S -emit-llvm' Cheers On Sat, Mar 28, 2020 at 6:36 PM Wilhelm Meier <wilhelm.meier at hs-kl.de> wrote: > Answering partly to myself there was a extern "C" missing. > > But the register pushes ans reti are still missing. > > Whats wrong? > > Am
2020 Mar 31
2
How to add new AVR targets?
...lan, > > I used the following commandline: > > clang++ -Os -DF_OSC=20000000 -DF_CPU=20000000 --target=avr -I. > -I../include0 -I../../include0 -I../../../include0 -I../../include0/std > -I../include0/std -I../../../include0/std -I../../3rdparty/boost > -I/usr/avr/include -mmcu=atmega328p > /home/lmeier/Projekte/wmucpp/clang/bm00/bm00.cc -S -emit-llvm --output > bm00.ir > > Please find the IR attached in the file bm00.ir > > Thanks, > Wilhelm > > > Am 30.03.20 um 13:44 schrieb Dylan McKay: > > Hey Wilhelm, > > > > Could you post the L...
2020 Mar 31
3
How to add new AVR targets?
...commandline: >> >> clang++ -Os -DF_OSC=20000000 -DF_CPU=20000000 --target=avr  -I. >> -I../include0 -I../../include0 -I../../../include0 -I../../include0/std >> -I../include0/std -I../../../include0/std -I../../3rdparty/boost >> -I/usr/avr/include -mmcu=atmega328p >> /home/lmeier/Projekte/wmucpp/clang/bm00/bm00.cc -S -emit-llvm --output >> bm00.ir <http://bm00.ir> >> >> Please find the IR attached in the file bm00.ir <http://bm00.ir> >> >> Thanks, >>  Wilhelm >> >> >>...
2020 May 21
2
Updated llc does not compile my .ll files any more [addrspace on AVR problem?]
...o-frame-pointer-elim-non-leaf" "target-cpu"="core2" "target-features"="+ssse3,+cx16,+fxsr,+mmx,+x87,+sse,+sse2,+sse3" } attributes #5 = { argmemonly nounwind } attributes #6 = { nounwind } I am using this command to build it. llc -O3 -march=avr -mcpu=atmega328p -filetype=obj -function-sections -o main.o main.clean.ll On my old llvm source code it used to work but now it fails with errors like... llc: error: /Code/llvm-project/build/bin/llc: main.clean.ll:101:22: error: '%load' defined with type 'i8* (i64, i64)*' but expected 'i8* (i...
2020 Apr 08
2
How to add new AVR targets?
...t;> clang++ -Os -DF_OSC=20000000 -DF_CPU=20000000 --target=avr  -I. >>>> -I../include0 -I../../include0 -I../../../include0 -I../../include0/std >>>> -I../include0/std -I../../../include0/std -I../../3rdparty/boost >>>> -I/usr/avr/include -mmcu=atmega328p >>>> /home/lmeier/Projekte/wmucpp/clang/bm00/bm00.cc -S -emit-llvm --output >>>> bm00.ir <http://bm00.ir> >>>> >>>> Please find the IR attached in the file bm00.ir <http://bm00.ir> >>>> >>>> Thanks,...
2017 Dec 01
2
Schedules, latency and register liveness for complex instructions
Hi Martin, > The CPU that I am targeting is VLIW with no hardware interlocking (the next instruction does not wait for the previous to complete). This leads to fairly complex scheduling, but can be generally accommodated well in LLVM. Thanks for sharing your usecase about instruction scheduling, I am learning Instruction Selector by reading ARM and AMDGPU target's source code, then
2020 May 21
2
Updated llc does not compile my .ll files any more [addrspace on AVR problem?]
...t;target-cpu"="core2" "target-features"="+ssse3,+cx16,+fxsr,+mmx,+x87,+sse,+sse2,+sse3" } > attributes #5 = { argmemonly nounwind } > attributes #6 = { nounwind } > > > > I am using this command to build it. > > llc -O3 -march=avr -mcpu=atmega328p -filetype=obj -function-sections -o main.o main.clean.ll > > On my old llvm source code it used to work but now it fails with errors like... > > > llc: error: /Code/llvm-project/build/bin/llc: main.clean.ll:101:22: error: '%load' defined with type 'i8* (i64, i64)*'...
2020 May 21
2
Updated llc does not compile my .ll files any more [addrspace on AVR problem?]
...uot; "target-features"="+ssse3,+cx16,+fxsr,+mmx,+x87,+sse,+sse2,+sse3" } >> attributes #5 = { argmemonly nounwind } >> attributes #6 = { nounwind } >> >> >> >> I am using this command to build it. >> >> llc -O3 -march=avr -mcpu=atmega328p -filetype=obj -function-sections -o main.o main.clean.ll >> >> On my old llvm source code it used to work but now it fails with errors like... >> >> >> llc: error: /Code/llvm-project/build/bin/llc: main.clean.ll:101:22: error: '%load' defined with type '...
2018 Jul 14
2
Lowering a reasonably complex struct seems to create over complex and invalid assembly fixups on some targets
...o the AVR rust team about this but I’m not sure it’s an AVR only problem. I’d like some help with understanding why these fixups are being created. When compiled on AVR, I get the error "LLVM ERROR: expected relocatable expression”. If I compile to asm, I get these fixups… llc -march=avr -mcpu=atmega328p cause-relocation-error.ll -filetype=obj -debug 2>&1| grep unnamed_4 Fixups:[<MCFixup Offset:0 Value:(__unnamed_4&65535)-((_TMRfV4main10Brightness&65535)+16) Kind:2>]>, (__unnamed_4, Index:0, ), Fixups:[<MCFixup Offset:0 Value:(__unnamed_4&65...
2017 Sep 14
4
Do I need to modify the AddrLoc of LLD for ARC target?
Hello Leslie, I think we are going to need to know a bit more about the ELF ABI for what looks like the ArcCompact before we can help you. LLD's calculation of P (the place to be relocated) is as it is in the generic ELF specification. The Rel.Offset corresponds to the ELF r_offset field. This is covered by: "For a relocatable file, the value is the byte offset from the beginning of the