From c8aa49d7623c8a8ab49b77271ad9b7a998893d16 Mon Sep 17 00:00:00 2001 From: Tristan Krause Date: Fri, 22 Mar 2019 15:12:53 +0100 Subject: [PATCH] init project --- .gitignore | 32 ++++ B15F.aps | 1 + b15f.aws | 1 + default/B15F.eep | 1 + default/B15F.elf | Bin 0 -> 8484 bytes default/B15F.hex | 12 ++ default/B15F.lss | 95 +++++++++++ default/B15F.map | 429 +++++++++++++++++++++++++++++++++++++++++++++++ default/Makefile | 74 ++++++++ main.c | 5 + spi.cpp | 0 spi.h | 0 12 files changed, 650 insertions(+) create mode 100644 .gitignore create mode 100644 B15F.aps create mode 100644 b15f.aws create mode 100644 default/B15F.eep create mode 100644 default/B15F.elf create mode 100644 default/B15F.hex create mode 100644 default/B15F.lss create mode 100644 default/B15F.map create mode 100644 default/Makefile create mode 100644 main.c create mode 100644 spi.cpp create mode 100644 spi.h diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..259148f --- /dev/null +++ b/.gitignore @@ -0,0 +1,32 @@ +# Prerequisites +*.d + +# Compiled Object files +*.slo +*.lo +*.o +*.obj + +# Precompiled Headers +*.gch +*.pch + +# Compiled Dynamic libraries +*.so +*.dylib +*.dll + +# Fortran module files +*.mod +*.smod + +# Compiled Static libraries +*.lai +*.la +*.a +*.lib + +# Executables +*.exe +*.out +*.app diff --git a/B15F.aps b/B15F.aps new file mode 100644 index 0000000..7cb06d5 --- /dev/null +++ b/B15F.aps @@ -0,0 +1 @@ +B15F22-Mar-2019 14:29:5422-Mar-2019 15:08:36241022-Mar-2019 14:29:5444, 19, 0, 730AVR GCCdefault\B15F.elfF:\JTAGICE mkIIATmega1284.xmlfalseR00R01R02R03R04R05R06R07R08R09R10R11R12R13R14R15R16R17R18R19R20R21R22R23R24R25R26R27R28R29R30R31Auto000main.cspi.cppspi.hdefault\B15F.lssdefault\B15F.mapc++NOatmega128111B15F.elfc++\0-Wall -gdwarf-2 -Os -std=gnu99 -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enumsdefaultNOatmega1284111B15F.elfdefault\0-Wall -gdwarf-2 -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums default0C:\avr8-gnu-toolchain-win32_x86\bin\avr-g++.exeC:\WinAVR-20100110\utils\bin\make.exeF:\spi.hF:\main.cF:\spi.cpp00000main.c1 diff --git a/b15f.aws b/b15f.aws new file mode 100644 index 0000000..98f2acd --- /dev/null +++ b/b15f.aws @@ -0,0 +1 @@ + diff --git a/default/B15F.eep b/default/B15F.eep new file mode 100644 index 0000000..1996e8f --- /dev/null +++ b/default/B15F.eep @@ -0,0 +1 @@ +:00000001FF diff --git a/default/B15F.elf b/default/B15F.elf new file mode 100644 index 0000000000000000000000000000000000000000..21b896820ff018b9bb0566e79e5165b2f380f71a GIT binary patch literal 8484 zcmd6tdu&_P9mkLDq_2cD>4Qg0Tc=IilwvowlfFWmIJT3zc^N<2(iSd`bCa0F4{WD& zu+erJ2n{wB)B)P0DQKN0K{ss-F*Y{X5Sn0PfRHw6VnS@1m^N)1*&hgPNZI#yu5bLy z5197Xw4>Z}&iC{CoyR@rKF&SPxyVqz!{JbNaH@o|RVUzUo0SS6?Nn~%RPAcDYSi|M zT>$BKsz*IiCk`sVl_JM^Z9`6nWrztkUh2mY`@c9^+P1v##^2xk<2x_@>cyr@ar7yL zL#gxcUVL}OS3bP7@WwzWbkN-%JQg?h8)MmuF))%cl7+%dW-6V{8v*ZLuix

pHN@ z-R14{cHsQ#aCoZcigL(Nz{t?a_fj6AS*aCB2&r@>XHKSl{{1xKN?nh`sUBHw)uhyA zXc{{^d>IxRXV`Ud$~jjfa;$J&L;2-(>yXrMM6|G4EpsEqjNow8yOg@1mhaMpoIvhT z=hX`8w^CIS16kR{$vKc!-JJX!q@kCSpMo?FaPl*dt426^38X2d3H1)GzYMba6!+N* z(wyd`6{KZ?6F113X->9-ti6+yHjs5^IN1iW{vJ-+L9V{Q$xe`K?&o9&$h8l0vK!>O zhdH?cWW%GJ>;l>NHBOFzT>k_o10b8e#YsQN=5KQn0on2lCt(ox^PJ>CT3_O%3uNmn zoP;>8WHYevncKm^p3m`lH%*p3L+TYh?BVx?y7eID>z{vw3H+;m& z7eRJA_4QjVbw9|B%QdN9heZ%i6DRvXyz4mmF36sZoO}-lLAUpx1C2E^~> zp(0&*~|Np&p_s4|H^%OLE`hA^nfHj;N&MD$&WaB4kYE!kM8R1 z{21ieGERO7a=d|)=Rr<1bMhmQTh?>(I>^ZloV)^Zs+E&hK~A@G@(Yk#_h?c*)7L<5 z>*78mAjUyXhCy!c;baIT9p>bAkg-8d43JDrlWJSHf{Z7)56y*n3nw%e69y*}Ad?fE zq(P=;I7xtH@8skZ$Q^faG6*t#FDFMqX71zUFi7qpPR2p<4|8IIsD3=zoN5=|%XN;Y zV6A%s(WBZ;Kl607ft(z7;0^3>^&x*5$CEf*kGP!bufWve*xuBPx4pAXxtbap z4mZG|maTI*qHFPLZ&lH?d$8VG)(NkJ4c!gVwLOi_RZ10oLG4@2CS3 z9F(A2f}12bB*9?`dL-zTASgkf1R)8+5=12Emta7GBN9XMV{iI3MMcHtigaThZyAoR=I%HV8CiH zKm}o;ST`6@iP$iWWCX1T5#vk{_s3N%glxb{{8r+#5)5d_@<16($8hQdO^P)!=#(`- zG&LP)C>&SAp%feuQ#+9$MWB%gjnnbqFvWcoX$_y`ahPF=)68Oe(LW55POO>rSu^WH z=i!-%p-du%(#OL|I+sK|G61lo-O)rS6dY2ap}`m&hT$9!4#!Tafmn1j?za-3mEipJ zRTD?s{RdBvn-l5TnTo1i=h)XHV501 zX7UA3c{*G4jLlBM52{qDWUZW;pD2_vrpKJ}l#6DDYK7fAn=y-(Y$0D(bhpykl#5w! zrdV8DYFqc?r^eW?q~Nl4<#gWCOIPwPc<|s-bzH(qJE67UTC#gb_2WZ<1()6ltO1w8 zgM|f`!or>fmugtj!#Xv;Ku@;Ai$3!UEyy2Ynm#^ynBInbH`BCVSqt+E2O#vPtA_In z^o3)G|3!P&uA$W;wRa5JD|QF){5FxFt7iYrGhqNNQQ~eTo+UKS~`Yoh$BoN5|9i($45J>+8=^P0J^8Y8&TKV~fRT$hkG9r-w zdZAmPdHVrjKP>c7XkPzmQGQDJSD@|7md>Acf99w&2-F|i>6z2Y(%*o#`$P68h5cEf zX|INte_iO`Leo|>1sb3CwANDV_l3W;k7C)W{i|?G&RJ5CzEG(??a(C;}J%i4;0)^r>fJBG;0!Qyf!g=Gwj=-=d`y~ z-yWg6g&q((0gXQ$sD9c8Q5bg$q%R16{Rqc`%PaTF27k2G)XR zsWe+8zwvY>ZOjxv&HQ-HcW*5lppNmDmN*7#j(*D5>Z^9h7{^JMm)0KWfalO?Xz>Ba0{`sjsYn<&-w|Znv6`~+^SMS<3BUad<%N&dS???1y;KZ5Ygw0-j!?R@2z1neb;YOq(4QE2kF z!zBo}Es)x_6D&{WXJGgpYrys!7k(G9yd3)kzmo9#2R>@8-)gD$TD$kMJn: + 0: 0c 94 46 00 jmp 0x8c ; 0x8c <__ctors_end> + 4: 0c 94 50 00 jmp 0xa0 ; 0xa0 <__bad_interrupt> + 8: 0c 94 50 00 jmp 0xa0 ; 0xa0 <__bad_interrupt> + c: 0c 94 50 00 jmp 0xa0 ; 0xa0 <__bad_interrupt> + 10: 0c 94 50 00 jmp 0xa0 ; 0xa0 <__bad_interrupt> + 14: 0c 94 50 00 jmp 0xa0 ; 0xa0 <__bad_interrupt> + 18: 0c 94 50 00 jmp 0xa0 ; 0xa0 <__bad_interrupt> + 1c: 0c 94 50 00 jmp 0xa0 ; 0xa0 <__bad_interrupt> + 20: 0c 94 50 00 jmp 0xa0 ; 0xa0 <__bad_interrupt> + 24: 0c 94 50 00 jmp 0xa0 ; 0xa0 <__bad_interrupt> + 28: 0c 94 50 00 jmp 0xa0 ; 0xa0 <__bad_interrupt> + 2c: 0c 94 50 00 jmp 0xa0 ; 0xa0 <__bad_interrupt> + 30: 0c 94 50 00 jmp 0xa0 ; 0xa0 <__bad_interrupt> + 34: 0c 94 50 00 jmp 0xa0 ; 0xa0 <__bad_interrupt> + 38: 0c 94 50 00 jmp 0xa0 ; 0xa0 <__bad_interrupt> + 3c: 0c 94 50 00 jmp 0xa0 ; 0xa0 <__bad_interrupt> + 40: 0c 94 50 00 jmp 0xa0 ; 0xa0 <__bad_interrupt> + 44: 0c 94 50 00 jmp 0xa0 ; 0xa0 <__bad_interrupt> + 48: 0c 94 50 00 jmp 0xa0 ; 0xa0 <__bad_interrupt> + 4c: 0c 94 50 00 jmp 0xa0 ; 0xa0 <__bad_interrupt> + 50: 0c 94 50 00 jmp 0xa0 ; 0xa0 <__bad_interrupt> + 54: 0c 94 50 00 jmp 0xa0 ; 0xa0 <__bad_interrupt> + 58: 0c 94 50 00 jmp 0xa0 ; 0xa0 <__bad_interrupt> + 5c: 0c 94 50 00 jmp 0xa0 ; 0xa0 <__bad_interrupt> + 60: 0c 94 50 00 jmp 0xa0 ; 0xa0 <__bad_interrupt> + 64: 0c 94 50 00 jmp 0xa0 ; 0xa0 <__bad_interrupt> + 68: 0c 94 50 00 jmp 0xa0 ; 0xa0 <__bad_interrupt> + 6c: 0c 94 50 00 jmp 0xa0 ; 0xa0 <__bad_interrupt> + 70: 0c 94 50 00 jmp 0xa0 ; 0xa0 <__bad_interrupt> + 74: 0c 94 50 00 jmp 0xa0 ; 0xa0 <__bad_interrupt> + 78: 0c 94 50 00 jmp 0xa0 ; 0xa0 <__bad_interrupt> + 7c: 0c 94 50 00 jmp 0xa0 ; 0xa0 <__bad_interrupt> + 80: 0c 94 50 00 jmp 0xa0 ; 0xa0 <__bad_interrupt> + 84: 0c 94 50 00 jmp 0xa0 ; 0xa0 <__bad_interrupt> + 88: 0c 94 50 00 jmp 0xa0 ; 0xa0 <__bad_interrupt> + +0000008c <__ctors_end>: + 8c: 11 24 eor r1, r1 + 8e: 1f be out 0x3f, r1 ; 63 + 90: cf ef ldi r28, 0xFF ; 255 + 92: d0 e4 ldi r29, 0x40 ; 64 + 94: de bf out 0x3e, r29 ; 62 + 96: cd bf out 0x3d, r28 ; 61 + 98: 0e 94 52 00 call 0xa4 ; 0xa4

+ 9c: 0c 94 55 00 jmp 0xaa ; 0xaa <_exit> + +000000a0 <__bad_interrupt>: + a0: 0c 94 00 00 jmp 0 ; 0x0 <__vectors> + +000000a4
: + + +int main() { + return 0; +} + a4: 80 e0 ldi r24, 0x00 ; 0 + a6: 90 e0 ldi r25, 0x00 ; 0 + a8: 08 95 ret + +000000aa <_exit>: + aa: f8 94 cli + +000000ac <__stop_program>: + ac: ff cf rjmp .-2 ; 0xac <__stop_program> diff --git a/default/B15F.map b/default/B15F.map new file mode 100644 index 0000000..90e2dda --- /dev/null +++ b/default/B15F.map @@ -0,0 +1,429 @@ +Archive member included to satisfy reference by file (symbol) + +c:/avr8-gnu-toolchain-win32_x86/bin/../lib/gcc/avr/5.4.0/avr51\libgcc.a(_exit.o) + c:/avr8-gnu-toolchain-win32_x86/bin/../lib/gcc/avr/5.4.0/../../../../avr/lib/avr51/crtatmega1284.o (exit) + +Memory Configuration + +Name Origin Length Attributes +text 0x00000000 0x00020000 xr +data 0x00800100 0x0000ff00 rw !x +eeprom 0x00810000 0x00010000 rw !x +fuse 0x00820000 0x00000003 rw !x +lock 0x00830000 0x00000400 rw !x +signature 0x00840000 0x00000400 rw !x +user_signatures 0x00850000 0x00000400 rw !x +*default* 0x00000000 0xffffffff + +Linker script and memory map + +Address of section .data set to 0x800100 +LOAD c:/avr8-gnu-toolchain-win32_x86/bin/../lib/gcc/avr/5.4.0/../../../../avr/lib/avr51/crtatmega1284.o +LOAD main.o +LOAD spi.o +LOAD c:/avr8-gnu-toolchain-win32_x86/bin/../lib/gcc/avr/5.4.0/avr51\libgcc.a +LOAD c:/avr8-gnu-toolchain-win32_x86/bin/../lib/gcc/avr/5.4.0/../../../../avr/lib/avr51\libm.a +START GROUP +LOAD c:/avr8-gnu-toolchain-win32_x86/bin/../lib/gcc/avr/5.4.0/avr51\libgcc.a +LOAD c:/avr8-gnu-toolchain-win32_x86/bin/../lib/gcc/avr/5.4.0/../../../../avr/lib/avr51\libm.a +LOAD c:/avr8-gnu-toolchain-win32_x86/bin/../lib/gcc/avr/5.4.0/../../../../avr/lib/avr51\libc.a +LOAD c:/avr8-gnu-toolchain-win32_x86/bin/../lib/gcc/avr/5.4.0/../../../../avr/lib/avr51\libatmega1284.a +END GROUP + 0x00020000 __TEXT_REGION_LENGTH__ = DEFINED (__TEXT_REGION_LENGTH__)?__TEXT_REGION_LENGTH__:0x20000 + 0x0000ff00 __DATA_REGION_LENGTH__ = DEFINED (__DATA_REGION_LENGTH__)?__DATA_REGION_LENGTH__:0xff00 + 0x00010000 __EEPROM_REGION_LENGTH__ = DEFINED (__EEPROM_REGION_LENGTH__)?__EEPROM_REGION_LENGTH__:0x10000 + [0x00000003] __FUSE_REGION_LENGTH__ = DEFINED (__FUSE_REGION_LENGTH__)?__FUSE_REGION_LENGTH__:0x400 + 0x00000400 __LOCK_REGION_LENGTH__ = DEFINED (__LOCK_REGION_LENGTH__)?__LOCK_REGION_LENGTH__:0x400 + 0x00000400 __SIGNATURE_REGION_LENGTH__ = DEFINED (__SIGNATURE_REGION_LENGTH__)?__SIGNATURE_REGION_LENGTH__:0x400 + 0x00000400 __USER_SIGNATURE_REGION_LENGTH__ = DEFINED (__USER_SIGNATURE_REGION_LENGTH__)?__USER_SIGNATURE_REGION_LENGTH__:0x400 + +.hash + *(.hash) + +.dynsym + *(.dynsym) + +.dynstr + *(.dynstr) + +.gnu.version + *(.gnu.version) + +.gnu.version_d + *(.gnu.version_d) + +.gnu.version_r + *(.gnu.version_r) + +.rel.init + *(.rel.init) + +.rela.init + *(.rela.init) + +.rel.text + *(.rel.text) + *(.rel.text.*) + *(.rel.gnu.linkonce.t*) + +.rela.text + *(.rela.text) + *(.rela.text.*) + *(.rela.gnu.linkonce.t*) + +.rel.fini + *(.rel.fini) + +.rela.fini + *(.rela.fini) + +.rel.rodata + *(.rel.rodata) + *(.rel.rodata.*) + *(.rel.gnu.linkonce.r*) + +.rela.rodata + *(.rela.rodata) + *(.rela.rodata.*) + *(.rela.gnu.linkonce.r*) + +.rel.data + *(.rel.data) + *(.rel.data.*) + *(.rel.gnu.linkonce.d*) + +.rela.data + *(.rela.data) + *(.rela.data.*) + *(.rela.gnu.linkonce.d*) + +.rel.ctors + *(.rel.ctors) + +.rela.ctors + *(.rela.ctors) + +.rel.dtors + *(.rel.dtors) + +.rela.dtors + *(.rela.dtors) + +.rel.got + *(.rel.got) + +.rela.got + *(.rela.got) + +.rel.bss + *(.rel.bss) + +.rela.bss + *(.rela.bss) + +.rel.plt + *(.rel.plt) + +.rela.plt + *(.rela.plt) + +.text 0x00000000 0xae + *(.vectors) + .vectors 0x00000000 0x8c c:/avr8-gnu-toolchain-win32_x86/bin/../lib/gcc/avr/5.4.0/../../../../avr/lib/avr51/crtatmega1284.o + 0x00000000 __vector_default + 0x00000000 __vectors + *(.vectors) + *(.progmem.gcc*) + 0x0000008c . = ALIGN (0x2) + 0x0000008c __trampolines_start = . + *(.trampolines) + .trampolines 0x0000008c 0x0 linker stubs + *(.trampolines*) + 0x0000008c __trampolines_end = . + *libprintf_flt.a:*(.progmem.data) + *libc.a:*(.progmem.data) + *(.progmem*) + 0x0000008c . = ALIGN (0x2) + *(.jumptables) + *(.jumptables*) + *(.lowtext) + *(.lowtext*) + 0x0000008c __ctors_start = . + *(.ctors) + 0x0000008c __ctors_end = . + 0x0000008c __dtors_start = . + *(.dtors) + 0x0000008c __dtors_end = . + SORT(*)(.ctors) + SORT(*)(.dtors) + *(.init0) + .init0 0x0000008c 0x0 c:/avr8-gnu-toolchain-win32_x86/bin/../lib/gcc/avr/5.4.0/../../../../avr/lib/avr51/crtatmega1284.o + 0x0000008c __init + *(.init0) + *(.init1) + *(.init1) + *(.init2) + .init2 0x0000008c 0xc c:/avr8-gnu-toolchain-win32_x86/bin/../lib/gcc/avr/5.4.0/../../../../avr/lib/avr51/crtatmega1284.o + *(.init2) + *(.init3) + *(.init3) + *(.init4) + *(.init4) + *(.init5) + *(.init5) + *(.init6) + *(.init6) + *(.init7) + *(.init7) + *(.init8) + *(.init8) + *(.init9) + .init9 0x00000098 0x8 c:/avr8-gnu-toolchain-win32_x86/bin/../lib/gcc/avr/5.4.0/../../../../avr/lib/avr51/crtatmega1284.o + *(.init9) + *(.text) + .text 0x000000a0 0x4 c:/avr8-gnu-toolchain-win32_x86/bin/../lib/gcc/avr/5.4.0/../../../../avr/lib/avr51/crtatmega1284.o + 0x000000a0 __vector_22 + 0x000000a0 __vector_28 + 0x000000a0 __vector_1 + 0x000000a0 __vector_32 + 0x000000a0 __vector_34 + 0x000000a0 __vector_24 + 0x000000a0 __vector_12 + 0x000000a0 __bad_interrupt + 0x000000a0 __vector_6 + 0x000000a0 __vector_31 + 0x000000a0 __vector_3 + 0x000000a0 __vector_23 + 0x000000a0 __vector_30 + 0x000000a0 __vector_25 + 0x000000a0 __vector_11 + 0x000000a0 __vector_13 + 0x000000a0 __vector_17 + 0x000000a0 __vector_19 + 0x000000a0 __vector_7 + 0x000000a0 __vector_27 + 0x000000a0 __vector_5 + 0x000000a0 __vector_33 + 0x000000a0 __vector_4 + 0x000000a0 __vector_9 + 0x000000a0 __vector_2 + 0x000000a0 __vector_21 + 0x000000a0 __vector_15 + 0x000000a0 __vector_29 + 0x000000a0 __vector_8 + 0x000000a0 __vector_26 + 0x000000a0 __vector_14 + 0x000000a0 __vector_10 + 0x000000a0 __vector_16 + 0x000000a0 __vector_18 + 0x000000a0 __vector_20 + .text 0x000000a4 0x0 main.o + .text 0x000000a4 0x0 spi.o + .text 0x000000a4 0x0 c:/avr8-gnu-toolchain-win32_x86/bin/../lib/gcc/avr/5.4.0/avr51\libgcc.a(_exit.o) + 0x000000a4 . = ALIGN (0x2) + *(.text.*) + .text.startup 0x000000a4 0x6 main.o + 0x000000a4 main + .text.libgcc.mul + 0x000000aa 0x0 c:/avr8-gnu-toolchain-win32_x86/bin/../lib/gcc/avr/5.4.0/avr51\libgcc.a(_exit.o) + .text.libgcc.div + 0x000000aa 0x0 c:/avr8-gnu-toolchain-win32_x86/bin/../lib/gcc/avr/5.4.0/avr51\libgcc.a(_exit.o) + .text.libgcc 0x000000aa 0x0 c:/avr8-gnu-toolchain-win32_x86/bin/../lib/gcc/avr/5.4.0/avr51\libgcc.a(_exit.o) + .text.libgcc.prologue + 0x000000aa 0x0 c:/avr8-gnu-toolchain-win32_x86/bin/../lib/gcc/avr/5.4.0/avr51\libgcc.a(_exit.o) + .text.libgcc.builtins + 0x000000aa 0x0 c:/avr8-gnu-toolchain-win32_x86/bin/../lib/gcc/avr/5.4.0/avr51\libgcc.a(_exit.o) + .text.libgcc.fmul + 0x000000aa 0x0 c:/avr8-gnu-toolchain-win32_x86/bin/../lib/gcc/avr/5.4.0/avr51\libgcc.a(_exit.o) + .text.libgcc.fixed + 0x000000aa 0x0 c:/avr8-gnu-toolchain-win32_x86/bin/../lib/gcc/avr/5.4.0/avr51\libgcc.a(_exit.o) + 0x000000aa . = ALIGN (0x2) + *(.fini9) + .fini9 0x000000aa 0x0 c:/avr8-gnu-toolchain-win32_x86/bin/../lib/gcc/avr/5.4.0/avr51\libgcc.a(_exit.o) + 0x000000aa _exit + 0x000000aa exit + *(.fini9) + *(.fini8) + *(.fini8) + *(.fini7) + *(.fini7) + *(.fini6) + *(.fini6) + *(.fini5) + *(.fini5) + *(.fini4) + *(.fini4) + *(.fini3) + *(.fini3) + *(.fini2) + *(.fini2) + *(.fini1) + *(.fini1) + *(.fini0) + .fini0 0x000000aa 0x4 c:/avr8-gnu-toolchain-win32_x86/bin/../lib/gcc/avr/5.4.0/avr51\libgcc.a(_exit.o) + *(.fini0) + 0x000000ae _etext = . + +.data 0x00800100 0x0 load address 0x000000ae + [!provide] PROVIDE (__data_start, .) + *(.data) + .data 0x00800100 0x0 c:/avr8-gnu-toolchain-win32_x86/bin/../lib/gcc/avr/5.4.0/../../../../avr/lib/avr51/crtatmega1284.o + .data 0x00800100 0x0 main.o + .data 0x00800100 0x0 spi.o + .data 0x00800100 0x0 c:/avr8-gnu-toolchain-win32_x86/bin/../lib/gcc/avr/5.4.0/avr51\libgcc.a(_exit.o) + *(.data*) + *(.gnu.linkonce.d*) + *(.rodata) + *(.rodata*) + *(.gnu.linkonce.r*) + 0x00800100 . = ALIGN (0x2) + 0x00800100 _edata = . + [!provide] PROVIDE (__data_end, .) + +.bss 0x00800100 0x0 + [!provide] PROVIDE (__bss_start, .) + *(.bss) + .bss 0x00800100 0x0 c:/avr8-gnu-toolchain-win32_x86/bin/../lib/gcc/avr/5.4.0/../../../../avr/lib/avr51/crtatmega1284.o + .bss 0x00800100 0x0 main.o + .bss 0x00800100 0x0 spi.o + .bss 0x00800100 0x0 c:/avr8-gnu-toolchain-win32_x86/bin/../lib/gcc/avr/5.4.0/avr51\libgcc.a(_exit.o) + *(.bss*) + *(COMMON) + [!provide] PROVIDE (__bss_end, .) + 0x000000ae __data_load_start = LOADADDR (.data) + 0x000000ae __data_load_end = (__data_load_start + SIZEOF (.data)) + +.noinit 0x00800100 0x0 + [!provide] PROVIDE (__noinit_start, .) + *(.noinit*) + [!provide] PROVIDE (__noinit_end, .) + 0x00800100 _end = . + [!provide] PROVIDE (__heap_start, .) + +.eeprom 0x00810000 0x0 + *(.eeprom*) + 0x00810000 __eeprom_end = . + +.fuse + *(.fuse) + *(.lfuse) + *(.hfuse) + *(.efuse) + +.lock + *(.lock*) + +.signature + *(.signature*) + +.user_signatures + *(.user_signatures*) + +.stab + *(.stab) + +.stabstr + *(.stabstr) + +.stab.excl + *(.stab.excl) + +.stab.exclstr + *(.stab.exclstr) + +.stab.index + *(.stab.index) + +.stab.indexstr + *(.stab.indexstr) + +.comment 0x00000000 0x30 + *(.comment) + .comment 0x00000000 0x30 main.o + 0x31 (size before relaxing) + .comment 0x00000030 0x31 spi.o + +.note.gnu.avr.deviceinfo + 0x00000000 0x40 + .note.gnu.avr.deviceinfo + 0x00000000 0x40 c:/avr8-gnu-toolchain-win32_x86/bin/../lib/gcc/avr/5.4.0/../../../../avr/lib/avr51/crtatmega1284.o + +.note.gnu.build-id + *(.note.gnu.build-id) + +.debug + *(.debug) + +.line + *(.line) + +.debug_srcinfo + *(.debug_srcinfo) + +.debug_sfnames + *(.debug_sfnames) + +.debug_aranges 0x00000000 0x20 + *(.debug_aranges) + .debug_aranges + 0x00000000 0x20 main.o + +.debug_pubnames + *(.debug_pubnames) + +.debug_info 0x00000000 0x7dc + *(.debug_info .gnu.linkonce.wi.*) + .debug_info 0x00000000 0x792 c:/avr8-gnu-toolchain-win32_x86/bin/../lib/gcc/avr/5.4.0/../../../../avr/lib/avr51/crtatmega1284.o + .debug_info 0x00000792 0x4a main.o + +.debug_abbrev 0x00000000 0x762 + *(.debug_abbrev) + .debug_abbrev 0x00000000 0x729 c:/avr8-gnu-toolchain-win32_x86/bin/../lib/gcc/avr/5.4.0/../../../../avr/lib/avr51/crtatmega1284.o + .debug_abbrev 0x00000729 0x39 main.o + +.debug_line 0x00000000 0x55 + *(.debug_line .debug_line.* .debug_line_end) + .debug_line 0x00000000 0x1a c:/avr8-gnu-toolchain-win32_x86/bin/../lib/gcc/avr/5.4.0/../../../../avr/lib/avr51/crtatmega1284.o + .debug_line 0x0000001a 0x3b main.o + .debug_line 0x00000055 0x0 spi.o + +.debug_frame 0x00000000 0x24 + *(.debug_frame) + .debug_frame 0x00000000 0x24 main.o + +.debug_str 0x00000000 0x37a + *(.debug_str) + .debug_str 0x00000000 0x296 c:/avr8-gnu-toolchain-win32_x86/bin/../lib/gcc/avr/5.4.0/../../../../avr/lib/avr51/crtatmega1284.o + .debug_str 0x00000296 0xd9 main.o + .debug_str 0x0000036f 0xb spi.o + 0xd5 (size before relaxing) + +.debug_loc + *(.debug_loc) + +.debug_macinfo + *(.debug_macinfo) + +.debug_weaknames + *(.debug_weaknames) + +.debug_funcnames + *(.debug_funcnames) + +.debug_typenames + *(.debug_typenames) + +.debug_varnames + *(.debug_varnames) + +.debug_pubtypes + *(.debug_pubtypes) + +.debug_ranges 0x00000000 0x10 + *(.debug_ranges) + .debug_ranges 0x00000000 0x10 main.o + +.debug_macro + *(.debug_macro) +OUTPUT(B15F.elf elf32-avr) +LOAD linker stubs diff --git a/default/Makefile b/default/Makefile new file mode 100644 index 0000000..4aa90c1 --- /dev/null +++ b/default/Makefile @@ -0,0 +1,74 @@ +############################################################################### +# Makefile for the project B15F +############################################################################### + +## General Flags +PROJECT = B15F +MCU = atmega1284 +TARGET = B15F.elf +CC = avr-g++ + +CPP = avr-g++ + +## Options common to compile, link and assembly rules +COMMON = -mmcu=$(MCU) + +## Compile options common for all C compilation units. +CFLAGS = $(COMMON) +CFLAGS += -Wall -gdwarf-2 -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums +CFLAGS += -MD -MP -MT $(*F).o -MF dep/$(@F).d + +## Assembly specific flags +ASMFLAGS = $(COMMON) +ASMFLAGS += $(CFLAGS) +ASMFLAGS += -x assembler-with-cpp -Wa,-gdwarf2 + +## Linker flags +LDFLAGS = $(COMMON) +LDFLAGS += -Wl,-Map=B15F.map + + +## Intel Hex file production flags +HEX_FLASH_FLAGS = -R .eeprom -R .fuse -R .lock -R .signature + +HEX_EEPROM_FLAGS = -j .eeprom +HEX_EEPROM_FLAGS += --set-section-flags=.eeprom="alloc,load" +HEX_EEPROM_FLAGS += --change-section-lma .eeprom=0 --no-change-warnings + + +## Objects that must be built in order to link +OBJECTS = main.o spi.o + +## Objects explicitly added by the user +LINKONLYOBJECTS = + +## Build +all: $(TARGET) B15F.hex B15F.eep B15F.lss## Compile +main.o: ../main.c + $(CPP) $(INCLUDES) $(CFLAGS) -c $< + +spi.o: ../spi.cpp + $(CPP) $(INCLUDES) $(CFLAGS) -c $< + +##Link +$(TARGET): $(OBJECTS) + $(CPP) $(LDFLAGS) $(OBJECTS) $(LINKONLYOBJECTS) $(LIBDIRS) $(LIBS) -o $(TARGET) + +%.hex: $(TARGET) + avr-objcopy -O ihex $(HEX_FLASH_FLAGS) $< $@ + +%.eep: $(TARGET) + -avr-objcopy $(HEX_EEPROM_FLAGS) -O ihex $< $@ || exit 0 + +%.lss: $(TARGET) + avr-objdump -h -S $< > $@ + +## Clean target +.PHONY: clean +clean: + -rm -rf $(OBJECTS) B15F.elf dep/* B15F.hex B15F.eep B15F.lss B15F.map + + +## Other dependencies +-include $(shell mkdir dep 2>NUL) $(wildcard dep/*) + diff --git a/main.c b/main.c new file mode 100644 index 0000000..d085acc --- /dev/null +++ b/main.c @@ -0,0 +1,5 @@ + + +int main() { + return 0; +} diff --git a/spi.cpp b/spi.cpp new file mode 100644 index 0000000..e69de29 diff --git a/spi.h b/spi.h new file mode 100644 index 0000000..e69de29