From 17d25f09cec00397319ab38394501392d9ee4519 Mon Sep 17 00:00:00 2001 From: David Welch Date: Thu, 28 Jun 2012 22:37:33 -0400 Subject: [PATCH] adding MIT License. Including all built files, makes it easier on me if I am going to provide any. Folks are experiencing problems using these examples, the binaries and disassemblies may help close the gap between my success and any problems. --- blinker02/blinker02.c | 13 ++++++ blinker02/blinker02.clang.bc | Bin 0 -> 892 bytes blinker02/blinker02.clang.bin | Bin 0 -> 140 bytes blinker02/blinker02.clang.hex | 11 +++++ blinker02/blinker02.clang.opt.bc | Bin 0 -> 768 bytes blinker02/blinker02.clang.opt.elf | Bin 0 -> 33508 bytes blinker02/blinker02.clang.opt.list | 66 +++++++++++++++++++++++++++++ blinker02/blinker02.clang.opt.o | Bin 0 -> 896 bytes blinker02/blinker02.clang.opt.s | 64 ++++++++++++++++++++++++++++ blinker02/blinker02.hex | 11 +++++ blinker02/blinker02.o | Bin 0 -> 1008 bytes blinker02/memmap | 17 +++++++- blinker02/vectors.o | Bin 0 -> 800 bytes blinker02/vectors.s | 19 +++++++++ 14 files changed, 200 insertions(+), 1 deletion(-) create mode 100644 blinker02/blinker02.clang.bc create mode 100755 blinker02/blinker02.clang.bin create mode 100644 blinker02/blinker02.clang.hex create mode 100644 blinker02/blinker02.clang.opt.bc create mode 100755 blinker02/blinker02.clang.opt.elf create mode 100644 blinker02/blinker02.clang.opt.list create mode 100644 blinker02/blinker02.clang.opt.o create mode 100644 blinker02/blinker02.clang.opt.s create mode 100644 blinker02/blinker02.hex create mode 100644 blinker02/blinker02.o create mode 100644 blinker02/vectors.o diff --git a/blinker02/blinker02.c b/blinker02/blinker02.c index 36a39a1..58121b1 100644 --- a/blinker02/blinker02.c +++ b/blinker02/blinker02.c @@ -44,3 +44,16 @@ int notmain ( void ) } //------------------------------------------------------------------------- //------------------------------------------------------------------------- + + +//------------------------------------------------------------------------- +// +// Copyright (c) 2012 David Welch dwelch@dwelch.com +// +// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +//------------------------------------------------------------------------- diff --git a/blinker02/blinker02.clang.bc b/blinker02/blinker02.clang.bc new file mode 100644 index 0000000000000000000000000000000000000000..ea5782ddbfd56e3c71d70540ff7d6d40b966f6cc GIT binary patch literal 892 zcmZ8gT}V@57=F)ocD|!Kn`dsxR{l(<-Xi_ zsU_2bIa6s@Ihtp6{$wKQn)^x-o(3a;l32C)o2-%)ap9U7KtpU*8JlCiFhuLi?u$fy z5U1jX{KkJ(6zN4+Hc zuS7sSI}F5GW;S=Do4e61IqY?zu$;Wbqb}0!A06bip#&mAa)N@kALPMg{@}Vak~9Ws zvCPcKRdogmFnLR0yvw^J3n~61C}i(jCHY)X&Emq$Mq$7}9T}-}inC)LjIQ*f?ukxr z6Y{?B+8kqW<&KXPWZ_J4-M_M2- zyai^4Q%08Z4Ks9l#7#lkznE{7*E6yi?%|qDD^}6w|g}roYJ#N?dM7t9W~mrwZ(_6r!$QHmf&K7PlQQ lg@wl@k%-~wYi`cXF0QOGg!WRN2)2biTMP>uFmyY1*B$@WBV&(o71rJ6DeOpgn{S5jTyVTFhy>CdAS1 z+9V0Hm%Ritde}n`Vqj0fGKqmx7Cja*iG;#HqNInQ&b<<3hyR@aJLmuY@BEzqD52s9 zj|lJr08A9X&OM&;J_wdjM4-M?^CnF^Rzn(^(7ho>!)9gPrfAgX>?W>=)z{n7XPxtS zS1&NJ!INmgC30}6kS_#Y@0hqw#05~py-oYg$I+5HwW9+IKZY3@pq6`IGdUn%O(RG1 z6OAt)wS_sSJ(``hX$UWpXWKAj^!+;7w>cx@WddVNMiJy>CE8gZ^y&?pLZWG_D4&IUbbrCPQluaKt1 z+Hqc~vbj&-iSH~s)%iJg=lyoUOpCiGwL=k ztX=!Gxpp|rO8@vr9G}e2z8knwG_d?#^DQ|Xx`qDWi_WV$x9)ORM6f z)|0(+U-iDMl*@}+*{YN)+Se~CTu={c4RIx%&Ukq@=jOelJL^iB1$Whn-#uuBK}~zu z8TXxZ7S^AK;;%n^;0IyYY1H<^diUS|i1T{X*`4-CG_Ib_laWojePTvrFJ13NBA3#j z-QHp2w3eQmjJJ`<^-213&dz&N>qoCdjx_6kB6%&lx1cqrHT}N+Ymqy;mX7q^H2>A3 zamq}-F3sL}CE2&HvitH=+3rn8R=&k{PdQ3goRoF?Vk%$OTugF7-*-jxsj0lI*`9A| zKco9MwTosOcK){Z#mLe)%TgdaLHnuHnvM3edZ)VLZ#6ahyL+Ku+mfYixwrA?#)@n{ Yw%_({*a{kLdD0DoPAJ>^t=57327JPb: + 8000: e3a0d902 mov sp, #32768 ; 0x8000 + 8004: eb000005 bl 8020 + +00008008 : + 8008: eafffffe b 8008 + +0000800c : + 800c: e5801000 str r1, [r0] + 8010: e12fff1e bx lr + +00008014 : + 8014: e5900000 ldr r0, [r0] + 8018: e12fff1e bx lr + +0000801c : + 801c: e12fff1e bx lr + +00008020 : + 8020: e92d4010 push {r4, lr} + 8024: e59f4050 ldr r4, [pc, #80] ; 807c + 8028: e1a00004 mov r0, r4 + 802c: ebfffff8 bl 8014 + 8030: e3c00707 bic r0, r0, #1835008 ; 0x1c0000 + 8034: e3801701 orr r1, r0, #262144 ; 0x40000 + 8038: e1a00004 mov r0, r4 + 803c: ebfffff2 bl 800c + 8040: e59f0038 ldr r0, [pc, #56] ; 8080 + 8044: e3a01801 mov r1, #65536 ; 0x10000 + 8048: ebffffef bl 800c + 804c: e59f0030 ldr r0, [pc, #48] ; 8084 + 8050: ebffffef bl 8014 + 8054: e3100501 tst r0, #4194304 ; 0x400000 + 8058: 0afffffb beq 804c + 805c: e59f0024 ldr r0, [pc, #36] ; 8088 + 8060: e3a01801 mov r1, #65536 ; 0x10000 + 8064: ebffffe8 bl 800c + 8068: e59f0014 ldr r0, [pc, #20] ; 8084 + 806c: ebffffe8 bl 8014 + 8070: e3100501 tst r0, #4194304 ; 0x400000 + 8074: 1afffffb bne 8068 + 8078: eafffff0 b 8040 + 807c: 20200004 eorcs r0, r0, r4 + 8080: 2020001c eorcs r0, r0, ip, lsl r0 + 8084: 20003004 andcs r3, r0, r4 + 8088: 20200028 eorcs r0, r0, r8, lsr #32 + +Disassembly of section .ARM.attributes: + +00000000 <.ARM.attributes>: + 0: 00002141 andeq r2, r0, r1, asr #2 + 4: 61656100 cmnvs r5, r0, lsl #2 + 8: 01006962 tsteq r0, r2, ror #18 + c: 00000017 andeq r0, r0, r7, lsl r0 + 10: 01080206 tsteq r8, r6, lsl #4 + 14: 020a0109 andeq r0, sl, #1073741826 ; 0x40000002 + 18: 01150114 tsteq r5, r4, lsl r1 + 1c: 01180317 tsteq r8, r7, lsl r3 + 20: Address 0x00000020 is out of bounds. + diff --git a/blinker02/blinker02.clang.opt.o b/blinker02/blinker02.clang.opt.o new file mode 100644 index 0000000000000000000000000000000000000000..1cb27cbb3cbf23e45360b8b19065e6068ff505a6 GIT binary patch literal 896 zcma)5O)mpc6g^L;EsaG9Y0*$p(nP&9Wno!~j}1v9>}=jJp)swdeG*pu6a5K(g7_!W zSYX3iV%%%qt6{@S?woV(J@3AGcQRKS+nYiN*d#rvtgR zyCap>?Yeuey^g*3KX8UTJdT9%@=Scg863l>2!{-3sKtOXVUmLPvu}`M-e@X+t*$`} z;pl-yO0fSgAD=;b1)idFZR=u{>*O=^mn>P&h*KOgB`$iLH&jThis Loop Header: Depth=1 + @ Child Loop BB0_4 Depth 2 + @ Child Loop BB0_2 Depth 2 + ldr r0, .LCPI0_1 + mov r1, #65536 + bl PUT32 +.LBB0_2: @ %while.body2 + @ Parent Loop BB0_1 Depth=1 + @ => This Inner Loop Header: Depth=2 + ldr r0, .LCPI0_2 + bl GET32 + tst r0, #4194304 + beq .LBB0_2 +@ BB#3: @ %while.end + @ in Loop: Header=BB0_1 Depth=1 + ldr r0, .LCPI0_3 + mov r1, #65536 + bl PUT32 +.LBB0_4: @ %while.body6 + @ Parent Loop BB0_1 Depth=1 + @ => This Inner Loop Header: Depth=2 + ldr r0, .LCPI0_2 + bl GET32 + tst r0, #4194304 + bne .LBB0_4 + b .LBB0_1 + .align 2 +@ BB#5: +.LCPI0_0: + .long 538968068 @ 0x20200004 +.LCPI0_1: + .long 538968092 @ 0x2020001c +.LCPI0_2: + .long 536883204 @ 0x20003004 +.LCPI0_3: + .long 538968104 @ 0x20200028 +.Ltmp0: + .size notmain, .Ltmp0-notmain + + diff --git a/blinker02/blinker02.hex b/blinker02/blinker02.hex new file mode 100644 index 0000000..1b5468f --- /dev/null +++ b/blinker02/blinker02.hex @@ -0,0 +1,11 @@ +:1080000002D9A0E3050000EBFEFFFFEA001080E5C7 +:108010001EFF2FE1000090E51EFF2FE11EFF2FE164 +:1080200008402DE94C009FE5F9FFFFEB0717C0E37F +:10803000011781E33C009FE5F3FFFFEB38009FE56C +:108040000118A0E3F0FFFFEB30009FE5F0FFFFEB2E +:10805000010510E3FBFFFF0A24009FE50118A0E3E0 +:10806000E9FFFFEB14009FE5E9FFFFEB010510E3DB +:10807000FBFFFF1AF0FFFFEA040020201C00202075 +:0880800004300020280020203C +:040000030000800079 +:00000001FF diff --git a/blinker02/blinker02.o b/blinker02/blinker02.o new file mode 100644 index 0000000000000000000000000000000000000000..2c4dfd79e84bdbe0e4cf154b178fdbbf8e0988cd GIT binary patch literal 1008 zcmah`L2DCH5T2Lav}r`BwI#6zT_Iw`_OXej8u8E?YgZt^P{WA1--b zh28bZt1;4UtM$aIy&jw;9hIDWtwC2kQ*o!~wIi*(hF`Bszq!8IyzgzuO zAdE=dW18Q7b@1r$`N2NTt=yU*IXv&{AY|0Z6nmB>>O^Yw zR+H=oIv^Piha@|LeqY5LTn0n0Ac8dSG9&5yvfeJPHp@PlZF+H_TFpE z?VU)c?E4_bY#lIXgN$EUj2Q6-aQyG0;j{fdu)wOV*?v}AoQ=Em8)IbVWYbPV&V`9F zze`uMY7jA*y8zS&=j6T@f(%+4cVb;K-DhA n1Kkgzn09v#A2#Ua5x$e1R*FPrK2o_tR5iE; ram .bss : { *(.bss*) } > ram } +/*-----------------------------------------------------------------------*/ +/*-----------------------------------------------------------------------*/ +/*-----------------------------------------------------------------------*/ + +/* Copyright (c) 2012 David Welch dwelch@dwelch.com */ + +/* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: */ + +/* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. */ + +/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ + +/*-----------------------------------------------------------------------*/ diff --git a/blinker02/vectors.o b/blinker02/vectors.o new file mode 100644 index 0000000000000000000000000000000000000000..360bc05ac98654d7db5ac627b694c2e4761040ad GIT binary patch literal 800 zcma)3K}rKb5bVh&F$)S20t$xcAwp0YMSXxdL@x>=@hr1sF@bE9-3gdee1cE#0Y1V< zc=0IWMgQR1wKEeF5wxMVs;8@ax@X6&<3k|?ITO^N?}+HZBntZ(Hpr(U<(}_fKhyMs z{hi9UZ?$y$h3GCr@a7VWRj7g_jT9<6bb-VPYov$9I)A*r8~(n0?K1K;H5dM&I%bJfoZA0QJz7*w<~$>CD;| z9Y71)WQYDQ-Hy>*Gh~K-%a#LNzeVP*7tZ_a2O!p*4w!R?j1>+Z88HiX!5(FH>^j}= ziFF%%=FIhT@o(r&rZZV@rX%|2e<;M{9ZkjTEgltS{y~|mF{?9hyv@8lK)%MjG8NaE zSEpjCE9$DjC0!(1#hM0JI#Rs>ou0S%cIl{vZ)X@qBd)>QRQaKBPlFwI0nrcm1*=m+ ARsaA1 literal 0 HcmV?d00001 diff --git a/blinker02/vectors.s b/blinker02/vectors.s index beb9cf5..4f279b1 100644 --- a/blinker02/vectors.s +++ b/blinker02/vectors.s @@ -1,4 +1,7 @@ +;@ ------------------------------------------------------------------ +;@ ------------------------------------------------------------------ + .globl _start _start: mov sp,#0x8000 @@ -18,3 +21,19 @@ GET32: .globl dummy dummy: bx lr + +;@ ------------------------------------------------------------------ +;@ ------------------------------------------------------------------ + + +;@------------------------------------------------------------------------- +;@ +;@ Copyright (c) 2012 David Welch dwelch@dwelch.com +;@ +;@ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +;@ +;@ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +;@ +;@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +;@ +;@-------------------------------------------------------------------------