Fix for x86_64 build fail
[platform/upstream/connectedhomeip.git] / third_party / pigweed / repo / targets / lm3s6965evb-qemu / target_docs.rst
1 .. _target-lm3s6965evb-qemu:
2
3 ----------------
4 lm3s6965evb-qemu
5 ----------------
6 This target is specifically for emulation of the Texas Instruments Stellaris
7 LM3S lm3s6965evb using QEMU. This may be useful for testing ARMv7-M code without
8 physical hardware.
9
10 This target configuration has **not** been tested on the physical Stellaris
11 development board.
12
13 Building
14 ========
15 To build for this Pigweed target, simply build the top-level "qemu_gcc" Ninja
16 target.
17
18 .. code:: sh
19
20   $ ninja -C out qemu_gcc
21
22 Testing
23 =======
24 This target does not yet support automatic test running (though it would be
25 relatively easy to do so). To run a QEMU binary, see the instructions below.
26
27 Executing Binaries
28 ==================
29 When running a QEMU binary, you may chose to run it interactively with GDB, or
30 allow the binary to run in a hands-off manner.
31
32 Running Without GDB
33 -------------------
34 When running without GDB, the firmware will execute normally without requiring
35 further interaction.
36
37 .. code:: sh
38
39   $ qemu-system-arm -cpu cortex-m3 -machine lm3s6965evb \
40     -nographic -no-reboot \
41     -kernel path/to/firmware.elf
42
43 Run With GDB
44 ------------------
45 When running with GDB, execution of the binary will begin in a halted state. To
46 begin running the code, you must connect using GDB, set any breakpoints you
47 wish, and then continue execution.
48
49 .. code:: sh
50
51   # Start the VM and GDB server.
52   $ qemu-system-arm -cpu cortex-m3 -machine lm3s6965evb \
53     -gdb tcp::3333 -S
54     -nographic -no-reboot \
55     -kernel path/to/firmware.elf
56
57 In another window
58
59 .. code:: sh
60
61   $ arm-none-eabi-gdb path/to/firmare.elf
62   (gdb) target remote :3333
63   (gdb) break SomeFunction()
64   (gdb) continue