[arm/lm3s6965_qemu] Debugging hello.exe, datasheet differences

Hello! I’m trying to run rtems apps on a TI board. Started with arm/lm3s6965_qemu, but it looks like there are some differences during operation compared to the datasheet.

Host is ubuntu24.04, qemu is the distro default, v8.2.2
qemu-system-arm -s -S -d guest_errors -nographic -serial mon:stdio -M lm3s6965evb -kernel hello.exe

a. Invalid guest reads/writes with default RAM/ROM sizes.
MMIO writes and reads at addresses that are outside the the QEMU lm3s6965evb machine memory map.

  • Fixed by modifying rtems _qemu linker script to match physical mcu sizes, disabling test builds, allowing 2 larger sample builds to fail.

b. printf()s in hello/init.c not showing up on host terminal.
I found that write_polled writes chars to an incorrect uart port 0 base address (0x0). Datasheet (and qemu device model) assign uart 0 the address 0x4000C00

I have a possible fix for (b). Should I create a new issue for this? Are my fixes even valid if I need to disable tests?

A merge request would be welcome for the fixes. Regarding (a) you might need to look at how to set BSP configuration options that are used to generate the linkcmds file.

1 Like