Skip to content

Commit

Permalink
adding MIT License. Including all built files, makes it easier on me …
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
dwelch67 committed Jun 29, 2012
1 parent cab790e commit 17d25f0
Show file tree
Hide file tree
Showing 14 changed files with 200 additions and 1 deletion.
13 changes: 13 additions & 0 deletions blinker02/blinker02.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,16 @@ int notmain ( void )
}
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------


//-------------------------------------------------------------------------
//
// Copyright (c) 2012 David Welch [email protected]
//
// 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.
//
//-------------------------------------------------------------------------
Binary file added blinker02/blinker02.clang.bc
Binary file not shown.
Binary file added blinker02/blinker02.clang.bin
Binary file not shown.
11 changes: 11 additions & 0 deletions blinker02/blinker02.clang.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
:1080000002D9A0E3050000EBFEFFFFEA001080E5C7
:108010001EFF2FE1000090E51EFF2FE11EFF2FE164
:1080200010402DE950409FE50400A0E1F8FFFFEB70
:108030000707C0E3011780E30400A0E1F2FFFFEBB4
:1080400038009FE50118A0E3EFFFFFEB30009FE54C
:10805000EFFFFFEB010510E3FBFFFF0A24009FE5A4
:108060000118A0E3E8FFFFEB14009FE5E8FFFFEB3A
:10807000010510E3FBFFFF1AF0FFFFEA04002020D8
:0C8080001C0020200430002028002020DC
:040000030000800079
:00000001FF
Binary file added blinker02/blinker02.clang.opt.bc
Binary file not shown.
Binary file added blinker02/blinker02.clang.opt.elf
Binary file not shown.
66 changes: 66 additions & 0 deletions blinker02/blinker02.clang.opt.list
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@

blinker02.clang.opt.elf: file format elf32-littlearm


Disassembly of section .text:

00008000 <_start>:
8000: e3a0d902 mov sp, #32768 ; 0x8000
8004: eb000005 bl 8020 <notmain>

00008008 <hang>:
8008: eafffffe b 8008 <hang>

0000800c <PUT32>:
800c: e5801000 str r1, [r0]
8010: e12fff1e bx lr

00008014 <GET32>:
8014: e5900000 ldr r0, [r0]
8018: e12fff1e bx lr

0000801c <dummy>:
801c: e12fff1e bx lr

00008020 <notmain>:
8020: e92d4010 push {r4, lr}
8024: e59f4050 ldr r4, [pc, #80] ; 807c <notmain+0x5c>
8028: e1a00004 mov r0, r4
802c: ebfffff8 bl 8014 <GET32>
8030: e3c00707 bic r0, r0, #1835008 ; 0x1c0000
8034: e3801701 orr r1, r0, #262144 ; 0x40000
8038: e1a00004 mov r0, r4
803c: ebfffff2 bl 800c <PUT32>
8040: e59f0038 ldr r0, [pc, #56] ; 8080 <notmain+0x60>
8044: e3a01801 mov r1, #65536 ; 0x10000
8048: ebffffef bl 800c <PUT32>
804c: e59f0030 ldr r0, [pc, #48] ; 8084 <notmain+0x64>
8050: ebffffef bl 8014 <GET32>
8054: e3100501 tst r0, #4194304 ; 0x400000
8058: 0afffffb beq 804c <notmain+0x2c>
805c: e59f0024 ldr r0, [pc, #36] ; 8088 <notmain+0x68>
8060: e3a01801 mov r1, #65536 ; 0x10000
8064: ebffffe8 bl 800c <PUT32>
8068: e59f0014 ldr r0, [pc, #20] ; 8084 <notmain+0x64>
806c: ebffffe8 bl 8014 <GET32>
8070: e3100501 tst r0, #4194304 ; 0x400000
8074: 1afffffb bne 8068 <notmain+0x48>
8078: eafffff0 b 8040 <notmain+0x20>
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.

Binary file added blinker02/blinker02.clang.opt.o
Binary file not shown.
64 changes: 64 additions & 0 deletions blinker02/blinker02.clang.opt.s
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
.syntax unified
.eabi_attribute 10, 2
.fpu vfpv2
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.file "blinker02.clang.opt.bc"
.text
.globl notmain
.align 2
.type notmain,%function
notmain: @ @notmain
@ BB#0: @ %entry
push {r4, lr}
ldr r4, .LCPI0_0
mov r0, r4
bl GET32
bic r0, r0, #1835008
orr r1, r0, #262144
mov r0, r4
bl PUT32
.LBB0_1: @ %while.body
@ =>This 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


11 changes: 11 additions & 0 deletions blinker02/blinker02.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
:1080000002D9A0E3050000EBFEFFFFEA001080E5C7
:108010001EFF2FE1000090E51EFF2FE11EFF2FE164
:1080200008402DE94C009FE5F9FFFFEB0717C0E37F
:10803000011781E33C009FE5F3FFFFEB38009FE56C
:108040000118A0E3F0FFFFEB30009FE5F0FFFFEB2E
:10805000010510E3FBFFFF0A24009FE50118A0E3E0
:10806000E9FFFFEB14009FE5E9FFFFEB010510E3DB
:10807000FBFFFF1AF0FFFFEA040020201C00202075
:0880800004300020280020203C
:040000030000800079
:00000001FF
Binary file added blinker02/blinker02.o
Binary file not shown.
17 changes: 16 additions & 1 deletion blinker02/memmap
Original file line number Diff line number Diff line change
@@ -1,12 +1,27 @@

/*-----------------------------------------------------------------------*/
/*-----------------------------------------------------------------------*/
MEMORY
{
ram : ORIGIN = 0x8000, LENGTH = 0x1000
}

/*-----------------------------------------------------------------------*/
SECTIONS
{
.text : { *(.text*) } > ram
.bss : { *(.bss*) } > ram
}
/*-----------------------------------------------------------------------*/
/*-----------------------------------------------------------------------*/

/*-----------------------------------------------------------------------*/

/* Copyright (c) 2012 David Welch [email protected] */

/* 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. */

/*-----------------------------------------------------------------------*/
Binary file added blinker02/vectors.o
Binary file not shown.
19 changes: 19 additions & 0 deletions blinker02/vectors.s
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

;@ ------------------------------------------------------------------
;@ ------------------------------------------------------------------

.globl _start
_start:
mov sp,#0x8000
Expand All @@ -18,3 +21,19 @@ GET32:
.globl dummy
dummy:
bx lr

;@ ------------------------------------------------------------------
;@ ------------------------------------------------------------------


;@-------------------------------------------------------------------------
;@
;@ Copyright (c) 2012 David Welch [email protected]
;@
;@ 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.
;@
;@-------------------------------------------------------------------------

0 comments on commit 17d25f0

Please sign in to comment.