adding MIT License. providing all output files in uart02 to help folks having issues getting this running on their boards.

This commit is contained in:
David Welch
2012-06-29 17:47:53 -04:00
parent 055808084e
commit 1521436e4f
17 changed files with 880 additions and 0 deletions

View File

@@ -72,3 +72,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.
//
//-------------------------------------------------------------------------

View File

@@ -18,3 +18,17 @@ GET32:
.globl dummy .globl dummy
dummy: dummy:
bx lr 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.
;@
;@-------------------------------------------------------------------------

View File

@@ -115,3 +115,16 @@ int notmain ( unsigned int earlypc )
} }
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
//-------------------------------------------------------------------------
//
// 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.
//
//-------------------------------------------------------------------------

BIN
uart02/uart02.clang.bc Normal file

Binary file not shown.

BIN
uart02/uart02.clang.bin Executable file

Binary file not shown.

68
uart02/uart02.clang.hex Normal file
View File

@@ -0,0 +1,68 @@
:1080000002D9A0E30F00A0E1900000EBFEFFFFEA21
:10801000001080E51EFF2FE1000090E51EFF2FE11C
:108020001EFF2FE110402DE90040A0E118009FE560
:10803000F8FFFFEB200010E3FBFFFF0A0C009FE5B9
:108040000410A0E1F1FFFFEB1080BDE854502120A7
:108050004050212070402DE90040A0E13700A0E30E
:10806000245E80E0246EA0E188019FE5E9FFFFEB3C
:10807000200010E3FBFFFF0A7C019FE5301086E340
:108080000A0254E30510A021E0FFFFEB0F00A0E37C
:10809000246C00E0375086E258019FE5DDFFFFEBDE
:1080A000200010E3FBFFFF0A4C019FE5301086E340
:1080B000090056E30510A081D4FFFFEB0F00A0E3F9
:1080C000246A00E0375086E228019FE5D1FFFFEBEC
:1080D000200010E3FBFFFF0A1C019FE5301086E340
:1080E000090056E30510A081C8FFFFEB0F00A0E3D5
:1080F000246800E0375086E2F8009FE5C5FFFFEBFB
:10810000200010E3FBFFFF0AEC009FE5301086E340
:10811000090056E30510A081BCFFFFEB0F00A0E3B0
:10812000246600E0375086E2C8009FE5B9FFFFEB08
:10813000200010E3FBFFFF0ABC009FE5301086E340
:10814000090056E30510A081B0FFFFEB0F00A0E38C
:10815000246400E0375086E298009FE5ADFFFFEB16
:10816000200010E3FBFFFF0A8C009FE5301086E340
:10817000090056E30510A081A4FFFFEB0F00A0E368
:10818000246200E0375086E268009FE5A1FFFFEB24
:10819000200010E3FBFFFF0A5C009FE5301086E340
:1081A000090056E30510A08198FFFFEB0F5004E291
:1081B000374085E23C009FE596FFFFEB200010E38F
:1081C000FBFFFF0A30009FE5301085E3090055E30F
:1081D0000410A0818DFFFFEB18009FE58DFFFFEBE2
:1081E000200010E3FBFFFF0A0C009FE52010A0E336
:1081F00086FFFFEB7080BDE85450212040502120C5
:1082000004E02DE592FFFFEB38009FE581FFFFEBD7
:10821000200010E3FBFFFF0A2C009FE50D10A0E3F8
:108220007AFFFFEB1C009FE57AFFFFEB200010E3D5
:10823000FBFFFF0A10009FE50A10A0E373FFFFEBAE
:1082400004E09DE41EFF2FE15450212040502120E6
:1082500070402DE90040A0E188019FE50110A0E3F6
:108260006AFFFFEB80619FE50010A0E30050A0E3F0
:108270000600A0E165FFFFEB70019FE50010A0E3A1
:1082800062FFFFEB68019FE50310A0E35FFFFFEBD8
:1082900060019FE50010A0E35CFFFFEB0600A0E19A
:1082A0000010A0E359FFFFEB4C019FE5C610A0E3CF
:1082B00056FFFFEB44019FE50E10A0E3011C81E394
:1082C00052FFFFEB38619FE50600A0E151FFFFEB95
:1082D0003F0AC0E3121A80E30600A0E14BFFFFEB68
:1082E00020019FE50010A0E348FFFFEB0500A0E19F
:1082F0004AFFFFEB015085E2960055E3FAFFFF1AB3
:1083000004019FE50319A0E340FFFFEB0050A0E349
:108310000500A0E141FFFFEB015085E2960055E327
:10832000FAFFFF1AE0009FE50010A0E337FFFFEB24
:10833000B8009FE50310A0E334FFFFEBCC009FE5FE
:1083400043FFFFEBC8009FE532FFFFEB200010E387
:10835000FBFFFF0ABC009FE50D10A0E32BFFFFEB26
:10836000AC009FE52BFFFFEB200010E3FBFFFF0AB3
:10837000A0009FE50A10A0E324FFFFEB0400A0E1AA
:1083800033FFFFEB88009FE522FFFFEB200010E3A7
:10839000FBFFFF0A7C009FE50D10A0E31BFFFFEB36
:1083A0006C009FE51BFFFFEB200010E3FBFFFF0AC3
:1083B00060009FE50A10A0E3040000EA54409FE536
:1083C0000400A0E113FFFFEB0010A0E10400A0E116
:1083D0000EFFFFEB38009FE50EFFFFEB010010E3FF
:1083E000FBFFFF0AF4FFFFEA045021204450212044
:1083F000605021204C5021205050212048502120F5
:108400006850212004002020940020209800202083
:0C84100078563412545021204050212096
:040000030000800079
:00000001FF

BIN
uart02/uart02.clang.opt.bc Normal file

Binary file not shown.

BIN
uart02/uart02.clang.opt.elf Executable file

Binary file not shown.

View File

@@ -0,0 +1,300 @@
uart02.clang.opt.elf: file format elf32-littlearm
Disassembly of section .text:
00008000 <_start>:
8000: e3a0d902 mov sp, #32768 ; 0x8000
8004: e1a0000f mov r0, pc
8008: eb000090 bl 8250 <notmain>
0000800c <hang>:
800c: eafffffe b 800c <hang>
00008010 <PUT32>:
8010: e5801000 str r1, [r0]
8014: e12fff1e bx lr
00008018 <GET32>:
8018: e5900000 ldr r0, [r0]
801c: e12fff1e bx lr
00008020 <dummy>:
8020: e12fff1e bx lr
00008024 <uart_putc>:
8024: e92d4010 push {r4, lr}
8028: e1a04000 mov r4, r0
802c: e59f0018 ldr r0, [pc, #24] ; 804c <uart_putc+0x28>
8030: ebfffff8 bl 8018 <GET32>
8034: e3100020 tst r0, #32
8038: 0afffffb beq 802c <uart_putc+0x8>
803c: e59f000c ldr r0, [pc, #12] ; 8050 <uart_putc+0x2c>
8040: e1a01004 mov r1, r4
8044: ebfffff1 bl 8010 <PUT32>
8048: e8bd8010 pop {r4, pc}
804c: 20215054 eorcs r5, r1, r4, asr r0
8050: 20215040 eorcs r5, r1, r0, asr #32
00008054 <hexstrings>:
8054: e92d4070 push {r4, r5, r6, lr}
8058: e1a04000 mov r4, r0
805c: e3a00037 mov r0, #55 ; 0x37
8060: e0805e24 add r5, r0, r4, lsr #28
8064: e1a06e24 lsr r6, r4, #28
8068: e59f0188 ldr r0, [pc, #392] ; 81f8 <hexstrings+0x1a4>
806c: ebffffe9 bl 8018 <GET32>
8070: e3100020 tst r0, #32
8074: 0afffffb beq 8068 <hexstrings+0x14>
8078: e59f017c ldr r0, [pc, #380] ; 81fc <hexstrings+0x1a8>
807c: e3861030 orr r1, r6, #48 ; 0x30
8080: e354020a cmp r4, #-1610612736 ; 0xa0000000
8084: 21a01005 movcs r1, r5
8088: ebffffe0 bl 8010 <PUT32>
808c: e3a0000f mov r0, #15
8090: e0006c24 and r6, r0, r4, lsr #24
8094: e2865037 add r5, r6, #55 ; 0x37
8098: e59f0158 ldr r0, [pc, #344] ; 81f8 <hexstrings+0x1a4>
809c: ebffffdd bl 8018 <GET32>
80a0: e3100020 tst r0, #32
80a4: 0afffffb beq 8098 <hexstrings+0x44>
80a8: e59f014c ldr r0, [pc, #332] ; 81fc <hexstrings+0x1a8>
80ac: e3861030 orr r1, r6, #48 ; 0x30
80b0: e3560009 cmp r6, #9
80b4: 81a01005 movhi r1, r5
80b8: ebffffd4 bl 8010 <PUT32>
80bc: e3a0000f mov r0, #15
80c0: e0006a24 and r6, r0, r4, lsr #20
80c4: e2865037 add r5, r6, #55 ; 0x37
80c8: e59f0128 ldr r0, [pc, #296] ; 81f8 <hexstrings+0x1a4>
80cc: ebffffd1 bl 8018 <GET32>
80d0: e3100020 tst r0, #32
80d4: 0afffffb beq 80c8 <hexstrings+0x74>
80d8: e59f011c ldr r0, [pc, #284] ; 81fc <hexstrings+0x1a8>
80dc: e3861030 orr r1, r6, #48 ; 0x30
80e0: e3560009 cmp r6, #9
80e4: 81a01005 movhi r1, r5
80e8: ebffffc8 bl 8010 <PUT32>
80ec: e3a0000f mov r0, #15
80f0: e0006824 and r6, r0, r4, lsr #16
80f4: e2865037 add r5, r6, #55 ; 0x37
80f8: e59f00f8 ldr r0, [pc, #248] ; 81f8 <hexstrings+0x1a4>
80fc: ebffffc5 bl 8018 <GET32>
8100: e3100020 tst r0, #32
8104: 0afffffb beq 80f8 <hexstrings+0xa4>
8108: e59f00ec ldr r0, [pc, #236] ; 81fc <hexstrings+0x1a8>
810c: e3861030 orr r1, r6, #48 ; 0x30
8110: e3560009 cmp r6, #9
8114: 81a01005 movhi r1, r5
8118: ebffffbc bl 8010 <PUT32>
811c: e3a0000f mov r0, #15
8120: e0006624 and r6, r0, r4, lsr #12
8124: e2865037 add r5, r6, #55 ; 0x37
8128: e59f00c8 ldr r0, [pc, #200] ; 81f8 <hexstrings+0x1a4>
812c: ebffffb9 bl 8018 <GET32>
8130: e3100020 tst r0, #32
8134: 0afffffb beq 8128 <hexstrings+0xd4>
8138: e59f00bc ldr r0, [pc, #188] ; 81fc <hexstrings+0x1a8>
813c: e3861030 orr r1, r6, #48 ; 0x30
8140: e3560009 cmp r6, #9
8144: 81a01005 movhi r1, r5
8148: ebffffb0 bl 8010 <PUT32>
814c: e3a0000f mov r0, #15
8150: e0006424 and r6, r0, r4, lsr #8
8154: e2865037 add r5, r6, #55 ; 0x37
8158: e59f0098 ldr r0, [pc, #152] ; 81f8 <hexstrings+0x1a4>
815c: ebffffad bl 8018 <GET32>
8160: e3100020 tst r0, #32
8164: 0afffffb beq 8158 <hexstrings+0x104>
8168: e59f008c ldr r0, [pc, #140] ; 81fc <hexstrings+0x1a8>
816c: e3861030 orr r1, r6, #48 ; 0x30
8170: e3560009 cmp r6, #9
8174: 81a01005 movhi r1, r5
8178: ebffffa4 bl 8010 <PUT32>
817c: e3a0000f mov r0, #15
8180: e0006224 and r6, r0, r4, lsr #4
8184: e2865037 add r5, r6, #55 ; 0x37
8188: e59f0068 ldr r0, [pc, #104] ; 81f8 <hexstrings+0x1a4>
818c: ebffffa1 bl 8018 <GET32>
8190: e3100020 tst r0, #32
8194: 0afffffb beq 8188 <hexstrings+0x134>
8198: e59f005c ldr r0, [pc, #92] ; 81fc <hexstrings+0x1a8>
819c: e3861030 orr r1, r6, #48 ; 0x30
81a0: e3560009 cmp r6, #9
81a4: 81a01005 movhi r1, r5
81a8: ebffff98 bl 8010 <PUT32>
81ac: e204500f and r5, r4, #15
81b0: e2854037 add r4, r5, #55 ; 0x37
81b4: e59f003c ldr r0, [pc, #60] ; 81f8 <hexstrings+0x1a4>
81b8: ebffff96 bl 8018 <GET32>
81bc: e3100020 tst r0, #32
81c0: 0afffffb beq 81b4 <hexstrings+0x160>
81c4: e59f0030 ldr r0, [pc, #48] ; 81fc <hexstrings+0x1a8>
81c8: e3851030 orr r1, r5, #48 ; 0x30
81cc: e3550009 cmp r5, #9
81d0: 81a01004 movhi r1, r4
81d4: ebffff8d bl 8010 <PUT32>
81d8: e59f0018 ldr r0, [pc, #24] ; 81f8 <hexstrings+0x1a4>
81dc: ebffff8d bl 8018 <GET32>
81e0: e3100020 tst r0, #32
81e4: 0afffffb beq 81d8 <hexstrings+0x184>
81e8: e59f000c ldr r0, [pc, #12] ; 81fc <hexstrings+0x1a8>
81ec: e3a01020 mov r1, #32
81f0: ebffff86 bl 8010 <PUT32>
81f4: e8bd8070 pop {r4, r5, r6, pc}
81f8: 20215054 eorcs r5, r1, r4, asr r0
81fc: 20215040 eorcs r5, r1, r0, asr #32
00008200 <hexstring>:
8200: e52de004 push {lr} ; (str lr, [sp, #-4]!)
8204: ebffff92 bl 8054 <hexstrings>
8208: e59f0038 ldr r0, [pc, #56] ; 8248 <hexstring+0x48>
820c: ebffff81 bl 8018 <GET32>
8210: e3100020 tst r0, #32
8214: 0afffffb beq 8208 <hexstring+0x8>
8218: e59f002c ldr r0, [pc, #44] ; 824c <hexstring+0x4c>
821c: e3a0100d mov r1, #13
8220: ebffff7a bl 8010 <PUT32>
8224: e59f001c ldr r0, [pc, #28] ; 8248 <hexstring+0x48>
8228: ebffff7a bl 8018 <GET32>
822c: e3100020 tst r0, #32
8230: 0afffffb beq 8224 <hexstring+0x24>
8234: e59f0010 ldr r0, [pc, #16] ; 824c <hexstring+0x4c>
8238: e3a0100a mov r1, #10
823c: ebffff73 bl 8010 <PUT32>
8240: e49de004 pop {lr} ; (ldr lr, [sp], #4)
8244: e12fff1e bx lr
8248: 20215054 eorcs r5, r1, r4, asr r0
824c: 20215040 eorcs r5, r1, r0, asr #32
00008250 <notmain>:
8250: e92d4070 push {r4, r5, r6, lr}
8254: e1a04000 mov r4, r0
8258: e59f0188 ldr r0, [pc, #392] ; 83e8 <notmain+0x198>
825c: e3a01001 mov r1, #1
8260: ebffff6a bl 8010 <PUT32>
8264: e59f6180 ldr r6, [pc, #384] ; 83ec <notmain+0x19c>
8268: e3a01000 mov r1, #0
826c: e3a05000 mov r5, #0
8270: e1a00006 mov r0, r6
8274: ebffff65 bl 8010 <PUT32>
8278: e59f0170 ldr r0, [pc, #368] ; 83f0 <notmain+0x1a0>
827c: e3a01000 mov r1, #0
8280: ebffff62 bl 8010 <PUT32>
8284: e59f0168 ldr r0, [pc, #360] ; 83f4 <notmain+0x1a4>
8288: e3a01003 mov r1, #3
828c: ebffff5f bl 8010 <PUT32>
8290: e59f0160 ldr r0, [pc, #352] ; 83f8 <notmain+0x1a8>
8294: e3a01000 mov r1, #0
8298: ebffff5c bl 8010 <PUT32>
829c: e1a00006 mov r0, r6
82a0: e3a01000 mov r1, #0
82a4: ebffff59 bl 8010 <PUT32>
82a8: e59f014c ldr r0, [pc, #332] ; 83fc <notmain+0x1ac>
82ac: e3a010c6 mov r1, #198 ; 0xc6
82b0: ebffff56 bl 8010 <PUT32>
82b4: e59f0144 ldr r0, [pc, #324] ; 8400 <notmain+0x1b0>
82b8: e3a0100e mov r1, #14
82bc: e3811c01 orr r1, r1, #256 ; 0x100
82c0: ebffff52 bl 8010 <PUT32>
82c4: e59f6138 ldr r6, [pc, #312] ; 8404 <notmain+0x1b4>
82c8: e1a00006 mov r0, r6
82cc: ebffff51 bl 8018 <GET32>
82d0: e3c00a3f bic r0, r0, #258048 ; 0x3f000
82d4: e3801a12 orr r1, r0, #73728 ; 0x12000
82d8: e1a00006 mov r0, r6
82dc: ebffff4b bl 8010 <PUT32>
82e0: e59f0120 ldr r0, [pc, #288] ; 8408 <notmain+0x1b8>
82e4: e3a01000 mov r1, #0
82e8: ebffff48 bl 8010 <PUT32>
82ec: e1a00005 mov r0, r5
82f0: ebffff4a bl 8020 <dummy>
82f4: e2855001 add r5, r5, #1
82f8: e3550096 cmp r5, #150 ; 0x96
82fc: 1afffffa bne 82ec <notmain+0x9c>
8300: e59f0104 ldr r0, [pc, #260] ; 840c <notmain+0x1bc>
8304: e3a01903 mov r1, #49152 ; 0xc000
8308: ebffff40 bl 8010 <PUT32>
830c: e3a05000 mov r5, #0
8310: e1a00005 mov r0, r5
8314: ebffff41 bl 8020 <dummy>
8318: e2855001 add r5, r5, #1
831c: e3550096 cmp r5, #150 ; 0x96
8320: 1afffffa bne 8310 <notmain+0xc0>
8324: e59f00e0 ldr r0, [pc, #224] ; 840c <notmain+0x1bc>
8328: e3a01000 mov r1, #0
832c: ebffff37 bl 8010 <PUT32>
8330: e59f00b8 ldr r0, [pc, #184] ; 83f0 <notmain+0x1a0>
8334: e3a01003 mov r1, #3
8338: ebffff34 bl 8010 <PUT32>
833c: e59f00cc ldr r0, [pc, #204] ; 8410 <notmain+0x1c0>
8340: ebffff43 bl 8054 <hexstrings>
8344: e59f00c8 ldr r0, [pc, #200] ; 8414 <notmain+0x1c4>
8348: ebffff32 bl 8018 <GET32>
834c: e3100020 tst r0, #32
8350: 0afffffb beq 8344 <notmain+0xf4>
8354: e59f00bc ldr r0, [pc, #188] ; 8418 <notmain+0x1c8>
8358: e3a0100d mov r1, #13
835c: ebffff2b bl 8010 <PUT32>
8360: e59f00ac ldr r0, [pc, #172] ; 8414 <notmain+0x1c4>
8364: ebffff2b bl 8018 <GET32>
8368: e3100020 tst r0, #32
836c: 0afffffb beq 8360 <notmain+0x110>
8370: e59f00a0 ldr r0, [pc, #160] ; 8418 <notmain+0x1c8>
8374: e3a0100a mov r1, #10
8378: ebffff24 bl 8010 <PUT32>
837c: e1a00004 mov r0, r4
8380: ebffff33 bl 8054 <hexstrings>
8384: e59f0088 ldr r0, [pc, #136] ; 8414 <notmain+0x1c4>
8388: ebffff22 bl 8018 <GET32>
838c: e3100020 tst r0, #32
8390: 0afffffb beq 8384 <notmain+0x134>
8394: e59f007c ldr r0, [pc, #124] ; 8418 <notmain+0x1c8>
8398: e3a0100d mov r1, #13
839c: ebffff1b bl 8010 <PUT32>
83a0: e59f006c ldr r0, [pc, #108] ; 8414 <notmain+0x1c4>
83a4: ebffff1b bl 8018 <GET32>
83a8: e3100020 tst r0, #32
83ac: 0afffffb beq 83a0 <notmain+0x150>
83b0: e59f0060 ldr r0, [pc, #96] ; 8418 <notmain+0x1c8>
83b4: e3a0100a mov r1, #10
83b8: ea000004 b 83d0 <notmain+0x180>
83bc: e59f4054 ldr r4, [pc, #84] ; 8418 <notmain+0x1c8>
83c0: e1a00004 mov r0, r4
83c4: ebffff13 bl 8018 <GET32>
83c8: e1a01000 mov r1, r0
83cc: e1a00004 mov r0, r4
83d0: ebffff0e bl 8010 <PUT32>
83d4: e59f0038 ldr r0, [pc, #56] ; 8414 <notmain+0x1c4>
83d8: ebffff0e bl 8018 <GET32>
83dc: e3100001 tst r0, #1
83e0: 0afffffb beq 83d4 <notmain+0x184>
83e4: eafffff4 b 83bc <notmain+0x16c>
83e8: 20215004 eorcs r5, r1, r4
83ec: 20215044 eorcs r5, r1, r4, asr #32
83f0: 20215060 eorcs r5, r1, r0, rrx
83f4: 2021504c eorcs r5, r1, ip, asr #32
83f8: 20215050 eorcs r5, r1, r0, asr r0
83fc: 20215048 eorcs r5, r1, r8, asr #32
8400: 20215068 eorcs r5, r1, r8, rrx
8404: 20200004 eorcs r0, r0, r4
8408: 20200094 mlacs r0, r4, r0, r0
840c: 20200098 mlacs r0, r8, r0, r0
8410: 12345678 eorsne r5, r4, #120, 12 ; 0x7800000
8414: 20215054 eorcs r5, r1, r4, asr r0
8418: 20215040 eorcs r5, r1, r0, asr #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.

BIN
uart02/uart02.clang.opt.o Normal file

Binary file not shown.

386
uart02/uart02.clang.opt.s Normal file
View File

@@ -0,0 +1,386 @@
.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 "uart02.clang.opt.bc"
.text
.globl uart_putc
.align 2
.type uart_putc,%function
uart_putc: @ @uart_putc
@ BB#0: @ %entry
push {r4, lr}
mov r4, r0
.LBB0_1: @ %while.body
@ =>This Inner Loop Header: Depth=1
ldr r0, .LCPI0_0
bl GET32
tst r0, #32
beq .LBB0_1
@ BB#2: @ %while.end
ldr r0, .LCPI0_1
mov r1, r4
bl PUT32
pop {r4, pc}
.align 2
@ BB#3:
.LCPI0_0:
.long 539054164 @ 0x20215054
.LCPI0_1:
.long 539054144 @ 0x20215040
.Ltmp0:
.size uart_putc, .Ltmp0-uart_putc
.globl hexstrings
.align 2
.type hexstrings,%function
hexstrings: @ @hexstrings
@ BB#0: @ %entry
push {r4, r5, r6, lr}
mov r4, r0
mov r0, #55
add r5, r0, r4, lsr #28
lsr r6, r4, #28
.LBB1_1: @ %while.body.i
@ =>This Inner Loop Header: Depth=1
ldr r0, .LCPI1_0
bl GET32
tst r0, #32
beq .LBB1_1
@ BB#2: @ %uart_putc.exit
ldr r0, .LCPI1_1
orr r1, r6, #48
cmp r4, #-1610612736
movhs r1, r5
bl PUT32
mov r0, #15
and r6, r0, r4, lsr #24
add r5, r6, #55
.LBB1_3: @ %while.body.i.1
@ =>This Inner Loop Header: Depth=1
ldr r0, .LCPI1_0
bl GET32
tst r0, #32
beq .LBB1_3
@ BB#4: @ %uart_putc.exit.1
ldr r0, .LCPI1_1
orr r1, r6, #48
cmp r6, #9
movhi r1, r5
bl PUT32
mov r0, #15
and r6, r0, r4, lsr #20
add r5, r6, #55
.LBB1_5: @ %while.body.i.2
@ =>This Inner Loop Header: Depth=1
ldr r0, .LCPI1_0
bl GET32
tst r0, #32
beq .LBB1_5
@ BB#6: @ %uart_putc.exit.2
ldr r0, .LCPI1_1
orr r1, r6, #48
cmp r6, #9
movhi r1, r5
bl PUT32
mov r0, #15
and r6, r0, r4, lsr #16
add r5, r6, #55
.LBB1_7: @ %while.body.i.3
@ =>This Inner Loop Header: Depth=1
ldr r0, .LCPI1_0
bl GET32
tst r0, #32
beq .LBB1_7
@ BB#8: @ %uart_putc.exit.3
ldr r0, .LCPI1_1
orr r1, r6, #48
cmp r6, #9
movhi r1, r5
bl PUT32
mov r0, #15
and r6, r0, r4, lsr #12
add r5, r6, #55
.LBB1_9: @ %while.body.i.4
@ =>This Inner Loop Header: Depth=1
ldr r0, .LCPI1_0
bl GET32
tst r0, #32
beq .LBB1_9
@ BB#10: @ %uart_putc.exit.4
ldr r0, .LCPI1_1
orr r1, r6, #48
cmp r6, #9
movhi r1, r5
bl PUT32
mov r0, #15
and r6, r0, r4, lsr #8
add r5, r6, #55
.LBB1_11: @ %while.body.i.5
@ =>This Inner Loop Header: Depth=1
ldr r0, .LCPI1_0
bl GET32
tst r0, #32
beq .LBB1_11
@ BB#12: @ %uart_putc.exit.5
ldr r0, .LCPI1_1
orr r1, r6, #48
cmp r6, #9
movhi r1, r5
bl PUT32
mov r0, #15
and r6, r0, r4, lsr #4
add r5, r6, #55
.LBB1_13: @ %while.body.i.6
@ =>This Inner Loop Header: Depth=1
ldr r0, .LCPI1_0
bl GET32
tst r0, #32
beq .LBB1_13
@ BB#14: @ %uart_putc.exit.6
ldr r0, .LCPI1_1
orr r1, r6, #48
cmp r6, #9
movhi r1, r5
bl PUT32
and r5, r4, #15
add r4, r5, #55
.LBB1_15: @ %while.body.i.7
@ =>This Inner Loop Header: Depth=1
ldr r0, .LCPI1_0
bl GET32
tst r0, #32
beq .LBB1_15
@ BB#16: @ %uart_putc.exit.7
ldr r0, .LCPI1_1
orr r1, r5, #48
cmp r5, #9
movhi r1, r4
bl PUT32
.LBB1_17: @ %while.body.i4
@ =>This Inner Loop Header: Depth=1
ldr r0, .LCPI1_0
bl GET32
tst r0, #32
beq .LBB1_17
@ BB#18: @ %uart_putc.exit5
ldr r0, .LCPI1_1
mov r1, #32
bl PUT32
pop {r4, r5, r6, pc}
.align 2
@ BB#19:
.LCPI1_0:
.long 539054164 @ 0x20215054
.LCPI1_1:
.long 539054144 @ 0x20215040
.Ltmp1:
.size hexstrings, .Ltmp1-hexstrings
.globl hexstring
.align 2
.type hexstring,%function
hexstring: @ @hexstring
@ BB#0: @ %entry
push {lr}
bl hexstrings
.LBB2_1: @ %while.body.i
@ =>This Inner Loop Header: Depth=1
ldr r0, .LCPI2_0
bl GET32
tst r0, #32
beq .LBB2_1
@ BB#2: @ %uart_putc.exit
ldr r0, .LCPI2_1
mov r1, #13
bl PUT32
.LBB2_3: @ %while.body.i4
@ =>This Inner Loop Header: Depth=1
ldr r0, .LCPI2_0
bl GET32
tst r0, #32
beq .LBB2_3
@ BB#4: @ %uart_putc.exit5
ldr r0, .LCPI2_1
mov r1, #10
bl PUT32
pop {lr}
bx lr
.align 2
@ BB#5:
.LCPI2_0:
.long 539054164 @ 0x20215054
.LCPI2_1:
.long 539054144 @ 0x20215040
.Ltmp2:
.size hexstring, .Ltmp2-hexstring
.globl notmain
.align 2
.type notmain,%function
notmain: @ @notmain
@ BB#0: @ %entry
push {r4, r5, r6, lr}
mov r4, r0
ldr r0, .LCPI3_0
mov r1, #1
bl PUT32
ldr r6, .LCPI3_1
mov r1, #0
mov r5, #0
mov r0, r6
bl PUT32
ldr r0, .LCPI3_2
mov r1, #0
bl PUT32
ldr r0, .LCPI3_3
mov r1, #3
bl PUT32
ldr r0, .LCPI3_4
mov r1, #0
bl PUT32
mov r0, r6
mov r1, #0
bl PUT32
ldr r0, .LCPI3_5
mov r1, #198
bl PUT32
ldr r0, .LCPI3_6
mov r1, #14
orr r1, r1, #256
bl PUT32
ldr r6, .LCPI3_7
mov r0, r6
bl GET32
bic r0, r0, #258048
orr r1, r0, #73728
mov r0, r6
bl PUT32
ldr r0, .LCPI3_8
mov r1, #0
bl PUT32
.LBB3_1: @ %for.body
@ =>This Inner Loop Header: Depth=1
mov r0, r5
bl dummy
add r5, r5, #1
cmp r5, #150
bne .LBB3_1
@ BB#2: @ %for.end
ldr r0, .LCPI3_9
mov r1, #49152
bl PUT32
mov r5, #0
.LBB3_3: @ %for.body5
@ =>This Inner Loop Header: Depth=1
mov r0, r5
bl dummy
add r5, r5, #1
cmp r5, #150
bne .LBB3_3
@ BB#4: @ %for.end8
ldr r0, .LCPI3_9
mov r1, #0
bl PUT32
ldr r0, .LCPI3_2
mov r1, #3
bl PUT32
ldr r0, .LCPI3_10
bl hexstrings
.LBB3_5: @ %while.body.i.i
@ =>This Inner Loop Header: Depth=1
ldr r0, .LCPI3_11
bl GET32
tst r0, #32
beq .LBB3_5
@ BB#6: @ %uart_putc.exit.i
ldr r0, .LCPI3_12
mov r1, #13
bl PUT32
.LBB3_7: @ %while.body.i4.i
@ =>This Inner Loop Header: Depth=1
ldr r0, .LCPI3_11
bl GET32
tst r0, #32
beq .LBB3_7
@ BB#8: @ %hexstring.exit
ldr r0, .LCPI3_12
mov r1, #10
bl PUT32
mov r0, r4
bl hexstrings
.LBB3_9: @ %while.body.i.i5
@ =>This Inner Loop Header: Depth=1
ldr r0, .LCPI3_11
bl GET32
tst r0, #32
beq .LBB3_9
@ BB#10: @ %uart_putc.exit.i6
ldr r0, .LCPI3_12
mov r1, #13
bl PUT32
.LBB3_11: @ %while.body.i4.i10
@ =>This Inner Loop Header: Depth=1
ldr r0, .LCPI3_11
bl GET32
tst r0, #32
beq .LBB3_11
@ BB#12: @ %hexstring.exit11
ldr r0, .LCPI3_12
mov r1, #10
b .LBB3_14
.LBB3_13: @ %while.end
@ in Loop: Header=BB3_14 Depth=1
ldr r4, .LCPI3_12
mov r0, r4
bl GET32
mov r1, r0
mov r0, r4
.LBB3_14: @ %hexstring.exit11
@ =>This Loop Header: Depth=1
@ Child Loop BB3_15 Depth 2
bl PUT32
.LBB3_15: @ %while.body10
@ Parent Loop BB3_14 Depth=1
@ => This Inner Loop Header: Depth=2
ldr r0, .LCPI3_11
bl GET32
tst r0, #1
beq .LBB3_15
b .LBB3_13
.align 2
@ BB#16:
.LCPI3_0:
.long 539054084 @ 0x20215004
.LCPI3_1:
.long 539054148 @ 0x20215044
.LCPI3_2:
.long 539054176 @ 0x20215060
.LCPI3_3:
.long 539054156 @ 0x2021504c
.LCPI3_4:
.long 539054160 @ 0x20215050
.LCPI3_5:
.long 539054152 @ 0x20215048
.LCPI3_6:
.long 539054184 @ 0x20215068
.LCPI3_7:
.long 538968068 @ 0x20200004
.LCPI3_8:
.long 538968212 @ 0x20200094
.LCPI3_9:
.long 538968216 @ 0x20200098
.LCPI3_10:
.long 305419896 @ 0x12345678
.LCPI3_11:
.long 539054164 @ 0x20215054
.LCPI3_12:
.long 539054144 @ 0x20215040
.Ltmp3:
.size notmain, .Ltmp3-notmain

45
uart02/uart02.hex Normal file
View File

@@ -0,0 +1,45 @@
:1080000002D9A0E30F00A0E14C0000EBFEFFFFEA65
:10801000001080E51EFF2FE1000090E51EFF2FE11C
:108020001EFF2FE110402DE90040A0E11C009FE55C
:10803000F8FFFFEB200010E3FBFFFF0A10009FE5B5
:108040000410A0E1F1FFFFEB1040BDE81EFF2FE19F
:10805000545021204050212010402DE90040A0E143
:10806000200EA0E1090050E33000809237008082AA
:10807000EBFFFFEB240CA0E10F0000E2090050E34E
:108080003000809237008082E5FFFFEB24CAA0E138
:108090000F000CE2090050E330008092370080822C
:1080A000DFFFFFEB2438A0E10F0003E2090050E3FB
:1080B0003000809237008082D9FFFFEB2426A0E1B8
:1080C0000F0002E2090050E3300080923700808206
:1080D000D3FFFFEB2414A0E10F0001E2090050E3FD
:1080E0003000809237008082CDFFFFEB2402A0E1B8
:1080F0000F0000E2090050E33000809237008082D8
:108100000F4004E2C6FFFFEB090054E3370084820E
:1081100030008492C2FFFFEB2000A0E31040BDE8D6
:10812000BFFFFFEA08402DE9CAFFFFEB0D00A0E307
:10813000BBFFFFEB0A00A0E30840BDE8B8FFFFEA81
:1081400070402DE90110A0E30040A0E11C019FE573
:10815000AEFFFFEB18019FE50010A0E3ABFFFFEBC4
:1081600010019FE50010A0E3A8FFFFEB08019FE5C9
:108170000310A0E3A5FFFFEB00019FE50010A0E3C3
:10818000A2FFFFEBE8009FE50010A0E39FFFFFEBDD
:10819000EC009FE5C610A0E39CFFFFEBE4109FE519
:1081A000E4009FE599FFFFEBE0009FE599FFFFEBFF
:1081B0003F1AC0E3121A81E3D0009FE593FFFFEB63
:1081C000CC009FE50010A0E390FFFFEB0050A0E380
:1081D0000500A0E1016085E290FFFFEB025085E21F
:1081E0000600A0E18DFFFFEB960055E3F7FFFF1AB5
:1081F000A0009FE50319A0E384FFFFEB0050A0E37C
:108200000500A0E1016085E284FFFFEB025085E2FA
:108210000600A0E181FFFFEB960055E3F7FFFF1A90
:1082200070009FE50010A0E378FFFFEB44009FE59E
:108230000310A0E375FFFFEB5C009FE5B8FFFFEBC9
:108240000400A0E1B6FFFFEB50009FE571FFFFEBDC
:10825000010010E3FBFFFF0A44009FE56DFFFFEB09
:108260000010A0E138009FE568FFFFEBF5FFFFEA93
:108270000450212044502120605021204C502120C6
:1082800050502120485021200E010000685021202C
:1082900004002020940020209800202078563412DA
:0882A000545021204050212020
:040000030000800079
:00000001FF

BIN
uart02/uart02.o Normal file

Binary file not shown.

BIN
uart02/vectors.o Normal file

Binary file not shown.

View File

@@ -19,3 +19,16 @@ GET32:
.globl dummy .globl dummy
dummy: dummy:
bx lr 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.
;@
;@-------------------------------------------------------------------------

View File

@@ -32,3 +32,18 @@ GET32:
.globl dummy .globl dummy
dummy: dummy:
bx lr 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.
;@
;@-------------------------------------------------------------------------

View File

@@ -114,3 +114,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.
//
//-------------------------------------------------------------------------