diff --git a/.vscode/launch.json b/.vscode/launch.json index fd317ab..0dd1d4f 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -8,9 +8,9 @@ "type": "gdbtarget", "request": "attach", "name": "Attach-to-gdbserver", - "program": "./fw/hello-world/hello", + "program": "./fw/hello-world/hello.elf", "imageAndSymbols": { - "symbolFileName": "./fw/hello-world/hello" + "symbolFileName": "./fw/hello-world/hello.elf" }, "target": { "port": "10000" @@ -29,7 +29,7 @@ "name": "Launch VP with gdbserver", "cwd": "${workspaceRoot}", "program": "${workspaceFolder}/build/Debug/src/riscv-vp", - "arguments": "-f fw/hello-world/hello -g 10000", + "arguments": "-f fw/hello-world/hello.elf -g 10000", "presentation": { "hidden": true, "group": "FW Debug", @@ -42,7 +42,7 @@ "name": "Launch VP", "cwd": "${workspaceRoot}", "program": "${workspaceFolder}/build/Debug/src/riscv-vp", - "arguments": "-v TRACEALL --isa tgc5c -f fw/hello-world/hello", + "arguments": "-v DEBUG --isa tgc5c -f fw/hello-world/hello.elf", "openGdbConsole": true }, ], diff --git a/fw/hello-world/.gitignore b/fw/hello-world/.gitignore index ebea2da..3c1acc1 100644 --- a/fw/hello-world/.gitignore +++ b/fw/hello-world/.gitignore @@ -1,3 +1,3 @@ -/hello -/hello.dis -/firmware.map +/*.elf +/*.dis +/*.map diff --git a/fw/hello-world/Makefile b/fw/hello-world/Makefile index c7efb06..376bd71 100644 --- a/fw/hello-world/Makefile +++ b/fw/hello-world/Makefile @@ -4,13 +4,13 @@ C_SRCS = $(wildcard *.c) HEADERS = $(wildcard *.h) CFLAGS += -O0 -g -BOARD=tgc_vp -LINK_TARGET=link +BOARD=riscv_vp +LINK_TARGET=flash RISCV_ARCH:=rv32imc RISCV_ABI:=ilp32 LDFLAGS := -march=$(RISCV_ARCH) -mabi=$(RISCV_ABI) -compiler := $(shell which riscv32-unknown-elf-gcc) +compiler := $(shell which riscv64-unknown-elf-gcc) TOOL_DIR=$(dir $(compiler)) BSP_BASE = ../bsp diff --git a/fw/hello-world/hello.elf b/fw/hello-world/hello.elf new file mode 100755 index 0000000..4162422 Binary files /dev/null and b/fw/hello-world/hello.elf differ diff --git a/fw/hello-world/prebuilt/hello.elf b/fw/hello-world/prebuilt/hello.elf index 5f9677b..4162422 100755 Binary files a/fw/hello-world/prebuilt/hello.elf and b/fw/hello-world/prebuilt/hello.elf differ diff --git a/scc b/scc index a6cdc7a..13d2138 160000 --- a/scc +++ b/scc @@ -1 +1 @@ -Subproject commit a6cdc7aeadb5024829042213b331b14bd718abb1 +Subproject commit 13d2138e7e0b390cf9fd503c81d03e790b150b1a diff --git a/src/vp/system.cpp b/src/vp/system.cpp index ab0069b..6229636 100644 --- a/src/vp/system.cpp +++ b/src/vp/system.cpp @@ -23,11 +23,11 @@ system::system(sc_core::sc_module_name nm) core_complex.dbus(ahb_router.target[1]); ahb_router.initiator.at(0)(qspi.xip_sck); - ahb_router.set_target_range(0, 0xE0000000, 16_MB); + ahb_router.set_target_range(0, 0x20000000, 16_MB); ahb_router.initiator.at(1)(mem_ram.target); - ahb_router.set_target_range(1, 0xC0000000, 128_kB); + ahb_router.set_target_range(1, 0x00000000, 128_kB); ahb_router.initiator.at(2)(apbBridge.target[0]); - ahb_router.set_target_range(2, 0xF0000000, 256_MB); + ahb_router.set_target_range(2, 0x10000000, 256_MB); size_t i = 0; for(const auto& e : PipelinedMemoryBusToApbBridge_map) {