lm3s6965evb-qemu#

Pigweed AI summary: The lm3s6965evb-qemu target is designed for emulating the Texas Instruments Stellaris LM3S lm3s6965evb using QEMU, which is useful for testing ARMv7-M code without physical hardware. However, this target configuration has not been tested on the physical Stellaris development board. To build for this Pigweed target, simply build the top-level “qemu_gcc” Ninja target. This target does not yet support automatic test running, but it

This target is specifically for emulation of the Texas Instruments Stellaris LM3S lm3s6965evb using QEMU. This may be useful for testing ARMv7-M code without physical hardware.

This target configuration has not been tested on the physical Stellaris development board.

Building#

Pigweed AI summary: To build for the Pigweed target, run the "qemu_gcc" Ninja target using the command "ninja -C out qemu_gcc".

To build for this Pigweed target, simply build the top-level “qemu_gcc” Ninja target.

$ ninja -C out qemu_gcc

Testing#

Pigweed AI summary: The target being referred to does not have automatic test running capabilities, but it is possible to run a QEMU binary by following the instructions provided.

This target does not yet support automatic test running (though it would be relatively easy to do so). To run a QEMU binary, see the instructions below.

Executing Binaries#

Pigweed AI summary: This section explains how to execute QEMU binaries either interactively with GDB or in a hands-off manner. When running without GDB, the firmware will execute normally, while running with GDB requires connecting to GDB, setting breakpoints, and continuing execution. The code examples show how to start the VM and GDB server, and how to connect to GDB and set breakpoints.

When running a QEMU binary, you may chose to run it interactively with GDB, or allow the binary to run in a hands-off manner.

Running Without GDB#

Pigweed AI summary: This section explains that when running without GDB, the firmware will execute normally without any further interaction. It also provides a command line example for running the firmware using qemu-system-arm.

When running without GDB, the firmware will execute normally without requiring further interaction.

$ qemu-system-arm -cpu cortex-m3 -machine lm3s6965evb \
  -nographic -no-reboot \
  -kernel path/to/firmware.elf

Run With GDB#

Pigweed AI summary: This section provides instructions on how to run a binary with GDB. The binary will start in a halted state and the user must connect using GDB, set breakpoints, and then continue execution. The section includes a code block with commands to start the VM and GDB server, as well as commands to connect to the server, set breakpoints, and continue execution.

When running with GDB, execution of the binary will begin in a halted state. To begin running the code, you must connect using GDB, set any breakpoints you wish, and then continue execution.

# Start the VM and GDB server.
$ qemu-system-arm -cpu cortex-m3 -machine lm3s6965evb \
  -gdb tcp::3333 -S
  -nographic -no-reboot \
  -kernel path/to/firmware.elf

In another window

$ arm-none-eabi-gdb path/to/firmare.elf
(gdb) target remote :3333
(gdb) break SomeFunction()
(gdb) continue