commit - 6efd408f5738f59c359283307b8bdb01ce000b8f
commit + 3be3b31b47b383f23185e1f510b77ea2ee265b48
blob - 513b64ee093fc2d7f756aae7ee1d58cdc3def308
blob + 24f15702cdb5ba0ca3a48174cca2ef20f7d0f547
--- Makefile
+++ Makefile
CXXFLAGS = -target ${TARGET} -Wall -Wextra -nostdlib -fno-exceptions
CXXFLAGS +=-ffreestanding -mgeneral-regs-only
-CXXFLAGS +=-Iinclude
+CXXFLAGS +=-Iinclude -std=c++11
CXXFILES = kernel.cc uart_${BOARD}.cc
OBJS = ${ASFILES:.S=.o} ${CXXFILES:.cc=.o}
-.PHONY: clean gdbstub
+.PHONY: clean qemu gdb-remote
all: squat.img
clean:
rm -rf *.o squat.elf squat.img
-gdbstub: squat.img
+qemu: squat.img
+ qemu-system-${ARCH} -M ${BOARD} -cpu cortex-a53 \
+ -kernel squat.img -nographic -monitor none -serial stdio
+gdb-remote: squat.img
qemu-system-${ARCH} -s -S -M ${BOARD} -cpu cortex-a53 \
-kernel squat.img -nographic -monitor none -serial stdio
blob - 33c10ac2df36f6d33dcfa9eb8fe5bc32918541d8
blob + 66a22a047beaacf08b00ea31812c9be3b8d2076a
--- kernel.cc
+++ kernel.cc
uart_send_string(const char *szContent)
{
const char *szCurrent = szContent;
- while (*szCurrent)
+ while (*szCurrent) {
Board::Uart::send(*szCurrent);
+ ++szCurrent;
+ }
}
blob - 78a76dc47a113d54d8f6d7fbbbb62dea9e81744f
blob + 74896d01b6a78d7f2a5bd6bb89926a2e82b31c27
--- uart_virt.cc
+++ uart_virt.cc
namespace {
-constexpr uintptr_t UART_BASE = 0xffffffffc9000000ULL;
+constexpr uintptr_t UART_BASE = 0x9000000;
} // anonymous namespace