0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

概要

物置で、stm32F4-discoveryが3台、見つかったので、最新、開発環境、入れてみた。
自分はアセンブラーなので、アセンブラでLチカ、やってみた。
objdumpを見つけたので、やってみた。

HexDump



>arm-none-eabi-objdump -s -b binary -m arm firmware.bin

firmware.bin:     file format binary

Contents of section .data:
 0000 00000220 09000008 0a48016b 41f00801  ... .....H.kA...
 0010 01630948 01684ff0 407221ea 020141f0  .c.H.hO.@r!...A.
 0020 80710160 416981f4 80514161 034b013b  .q.`Ai...QAa.K.;
 0030 fdd1f7e7 00380240 000c0240 80841e00  .....8.@...@....

逆アセンブラ

>arm-none-eabi-objdump -D -b binary -m arm -M force-thumb firmware.bin

firmware.bin:     file format binary


Disassembly of section .data:

00000000 <.data>:
   0:   0000            movs    r0, r0
   2:   2002            movs    r0, #2
   4:   0009            movs    r1, r1
   6:   0800            lsrs    r0, r0, #32
   8:   480a            ldr     r0, [pc, #40]   @ (0x34)
   a:   6b01            ldr     r1, [r0, #48]   @ 0x30
   c:   f041 0108       orr.w   r1, r1, #8
  10:   6301            str     r1, [r0, #48]   @ 0x30
  12:   4809            ldr     r0, [pc, #36]   @ (0x38)
  14:   6801            ldr     r1, [r0, #0]
  16:   f04f 7240       mov.w   r2, #50331648   @ 0x3000000
  1a:   ea21 0102       bic.w   r1, r1, r2
  1e:   f041 7180       orr.w   r1, r1, #16777216       @ 0x1000000
  22:   6001            str     r1, [r0, #0]
  24:   6941            ldr     r1, [r0, #20]
  26:   f481 5180       eor.w   r1, r1, #4096   @ 0x1000
  2a:   6141            str     r1, [r0, #20]
  2c:   4b03            ldr     r3, [pc, #12]   @ (0x3c)
  2e:   3b01            subs    r3, #1
  30:   d1fd            bne.n   0x2e
  32:   e7f7            b.n     0x24
  34:   3800            subs    r0, #0
  36:   4002            ands    r2, r0
  38:   0c00            lsrs    r0, r0, #16
  3a:   4002            ands    r2, r0
  3c:   8480            strh    r0, [r0, #36]   @ 0x24
  3e:   001e            movs    r6, r3


以上。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?