本帖最后由 lqs0905 于 2019-5-20 11:36 编辑 下面是Keil 生成的Hex 文件 在地址0x5000 的FLISH 数据 :1050000000224FF4B4611046FFF7B1FF04435C4B3C :10501000263305220A210020FFF79CFF0443584B4A :10502000273305220A210020FFF794FF0443544B45 :105030002A3305220A210020FFF78CFF0443504B3E :10504000283305220A210020FFF784FF04434C4B3C :10505000293305220A210020FFF77CFF0443484B37 :105060002B3305220A210020FFF774FF0443444B31 :105070002C3300220A211046FFF76CFF0443404BFB :105080002D3305220A210020FFF764FF04433C4B27 :105090002E3305220A210020FFF75CFF0443384B22 :1050A0002F3305220A210020FFF754FF0443344B1D :1050B00001220A210020FFF74DFF0443304B5B1C07 :1050C00000220A211046FFF745FF0443204610BD89 :1050D00010B52C4800882C49088008460088802894 :1050E00004DD4FF400601849088003E04FF480604D :1050F000154908802448008813490988C1EB80209D :1051000000F10060214908602148006821490860D9 :105110001E4800680C490988401A0E4908600A4870 :1051200000881A490968A1EB4000084908604E222E :1051300008460168124801F059FCFFF725FF0128D5 :1051400001D1FFF7EEFE10BDDC000020D8000020EA :105150008405002024000020454550524F4D206515 :1051600072617365206973206572726F720A000044 :10517000454550524F4D206973204F4B0A000000A7 :1051800008010020E0F7FF1FDE000020E000002003 :10519000E4000020EC000020F0B503460C4600259A :1051A000601E86B2002716E0781C87B2A81900EBB3 :1051B000D07CCCF34F0133F81100904202DD481E41 :1051C00086B208E033F81100904202DA481C85B23A :1051D00001E00120F0BDB542E6DD0020FAE770B540 :1051E0000C4601211FE030F811604D1E30F81550BB :1051F000AE4216DA4D1EAAB230F8113030F8155012 :1052000020F8115006E030F81260551C20F81560A7 :10521000551EAAB230F812509D42F4DC551C20F8FD :1052200015304D1CA9B2A142DDDB70BD10B5F64CA6 :10523000032020616061F5A0A061F749E1614FF4AE :10524000806121620021A1626162E162EFA02066BB :10525000F24961661021A16600212167E16661675C :10526000EFA1E01D01F0EDFBEEA1204601F0E9FB0E :105270002020A07110BD2DE9F0470446894617464D :105280004FF0000AE56800BFD4F81080A84503D9A4 :10529000A8EB0500461E04E0A5EB0800401CA16831 :1052A0000E1AA068401BB04201D9304601E0A06848 :1052B000401B0646BE4201D2304600E03846064654 :1052C000616848193246494601F090FBB244B14446 :1052D000BF1B3544A068A84200D10025E560002F1F :1052E000D2D15046BDE8F0872DE9F0470446894603 :1052F0001546E668A068871BAF4208D9616888191F :105300002A46494601F072FB7019E06010E0B84689 :10531000616888194246494601F068FBA5EB070819 :1053200009EB07014246606801F060FBC4F80C809D :10533000BDE8F08738B505460C46FF208DF8000023 :10534000BA48005D8DF80100022269462846FFF741 :1053500092FF38BD10B501460A69CB689A4204D85D :105360008C68641EE41AA01801E0D41A601E10BDF7 :105370002DE9F74F8346174600BFA348007808B9C8 :10538000FFF754FF00BF0BEB4B019F48603000EB71 :10539000C106DDF804903569D6F80CA04FF000087E :1053A000554515D9B068441BBC4201D2204600E0E7 :1053B00038460446706841192246484601F016FBFB :1053C000A044A1443F1B2544B068A84200D1002559 :1053D000AAEB0504BC4201D2204600E03846044650 :1053E0004CB1706841192246484601F0FFFAA044CA :1053F000A1443F1B2544B8F1000F00D03561404661 :10540000BDE8FE8F2DE9F04104460D461646EFF348 :1054100011808046202080F3118800BF00BF3246F3 :1054200029462046FFF7A4FF074608F0FF0080F357 :10543000118800BF00BF3846BDE8F0812DE9F04774 :10544000074688461646C14607EB47016E481830A6 :1054500000EBC104D4E90301884202D1A068451ED3 :105460000EE0D4E90301884204D22069E168401AC1 :10547000451E05E02069E168401A401EA1684518F4 :10548000AE420CD92069711B0844206103E02069F9 :10549000A168401A20612069A1688842F7D2D4E946 :1054A0000201451A00BFB5420AD9E268616888184E |
这是Keil 生成的ASM
0x08004fec: 2000 . MOVS r0,#0
0x08004fee: f000f867 ..g. BL data_init ; 0x80050c0
0x08004ff2: 4304 .C ORRS r4,r4,r0
0x08004ff4: 4b08 .K LDR r3,[pc,#32] ; [0x8005018] = 0x2000010c
0x08004ff6: 3334 43 ADDS r3,r3,#0x34
0x08004ff8: 2205 ." MOVS r2,#5
0x08004ffa: 210a .! MOVS r1,#0xa
0x08004ffc: 2000 . MOVS r0,#0
0x08004ffe: f000f85f .._. BL data_init ; 0x80050c0
0x08005002: 4304 .C ORRS r4,r4,r0
0x08005004: 4b04 .K LDR r3,[pc,#16] ; [0x8005018] = 0x2000010c
0x08005006: 3336 63 ADDS r3,r3,#0x36
0x08005008: 2205 ." MOVS r2,#5
0x0800500a: 210a .! MOVS r1,#0xa
0x0800500c: 2000 . MOVS r0,#0
0x0800500e: f000f857 ..W. BL data_init ; 0x80050c0
0x08005012: 4304 .C ORRS r4,r4,r0
0x08005014: 4620 F MOV r0,r4
0x08005016: bd10 .. POP {r4,pc}
$d
0x08005018: 2000010c ... DCD 536871180
$t
i.confing_beep
confing_beep
0x0800501c: b500 .. PUSH {lr}
0x0800501e: b087 .. SUB sp,sp,#0x1c
0x08005020: 2114 .! MOVS r1,#0x14
0x08005022: a802 .. ADD r0,sp,#8
0x08005024: f7fbf897 .... BL __aeabi_memclr ; 0x8000156
0x08005028: 2010 . MOVS r0,#0x10
0x0800502a: 4911 .I LDR r1,[pc,#68] ; [0x8005070] = 0x40021000
0x0800502c: 6989 .i LDR r1,[r1,#0x18]
0x0800502e: 4301 .C ORRS r1,r1,r0
0x08005030: 4a0f .J LDR r2,[pc,#60] ; [0x8005070] = 0x40021000
0x08005032: 6191 .a STR r1,[r2,#0x18]
0x08005034: 4611 .F MOV r1,r2
0x08005036: 6989 .i LDR r1,[r1,#0x18]
0x08005038: 4001 .@ ANDS r1,r1,r0
0x0800503a: 9101 .. STR r1,[sp,#4]
0x0800503c: bf00 .. NOP
0x0800503e: bf00 .. NOP
0x08005040: f2402002 @.. MOV r0,#0x202
0x08005044: 9002 .. STR r0,[sp,#8]
0x08005046: 2001 . MOVS r0,#1
0x08005048: 9003 .. STR r0,[sp,#0xc]
0x0800504a: 2003 . MOVS r0,#3
0x0800504c: 9004 .. STR r0,[sp,#0x10]
0x0800504e: 2000 . MOVS r0,#0
0x08005050: 9005 .. STR r0,[sp,#0x14]
0x08005052: 2001 . MOVS r0,#1
0x08005054: 9006 .. STR r0,[sp,#0x18]
0x08005056: a902 .. ADD r1,sp,#8
0x08005058: 4806 .H LDR r0,[pc,#24] ; [0x8005074] = 0x40011000
0x0800505a: f7fcfa47 ..G. BL LL_GPIO_Init ; 0x80014ec
0x0800505e: f2402002 @.. MOV r0,#0x202
0x08005062: 0a01 .. LSRS r1,r0,#8
0x08005064: 4a04 .J LDR r2,[pc,#16] ; [0x8005078] = 0x40010c00
0x08005066: 6111 .a STR r1,[r2,#0x10]
0x08005068: bf00 .. NOP
0x0800506a: b007 .. ADD sp,sp,#0x1c
0x0800506c: bd00 .. POP {pc}
$d
0x0800506e: 0000 .. DCW 0
下载时勾上校验项,校验没问题就可以了;如果校验有问题,那么把数据速度降低,不行接着换仿真器。
评分
查看全部评分
是对的,下载进去用Jlink 读出来也没错 但是一仿真就出错 不仿真也不能正常运行
现在又正常了,可能是我Keil没有设置好。但现在也不知道是那里设置有问题。这个应该和Keil 有关。 准备换成IAR ,IAR省心
clean target
试试
评分
查看全部评分
评分
查看全部评分