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