Skip to content

Commit

Permalink
risc-v/rv-virt: use RAM_START in ld.script
Browse files Browse the repository at this point in the history
This revises FLAT build ld.script so that to use CONFIG_RAM_START
instead of hard coded address to increase flexibility.

Signed-off-by: Yanfeng Liu <[email protected]>
  • Loading branch information
yf13 authored and jerpelea committed Jul 26, 2024
1 parent f502102 commit c2132bb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion boards/risc-v/qemu-rv/rv-virt/configs/flats/defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ CONFIG_NSH_FILEIOSIZE=512
CONFIG_NSH_READLINE=y
CONFIG_PATH_INITIAL="/system/bin"
CONFIG_RAM_SIZE=33554432
CONFIG_RAM_START=0x80000000
CONFIG_RAM_START=0x80200000
CONFIG_READLINE_CMD_HISTORY=y
CONFIG_RISCV_SEMIHOSTING_HOSTFS=y
CONFIG_RR_INTERVAL=200
Expand Down
2 changes: 1 addition & 1 deletion boards/risc-v/qemu-rv/rv-virt/configs/flats64/defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ CONFIG_NSH_FILEIOSIZE=512
CONFIG_NSH_READLINE=y
CONFIG_PATH_INITIAL="/system/bin"
CONFIG_RAM_SIZE=33554432
CONFIG_RAM_START=0x80000000
CONFIG_RAM_START=0x80200000
CONFIG_READLINE_CMD_HISTORY=y
CONFIG_RISCV_SEMIHOSTING_HOSTFS=y
CONFIG_RR_INTERVAL=200
Expand Down
6 changes: 1 addition & 5 deletions boards/risc-v/qemu-rv/rv-virt/scripts/ld.script
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,7 @@

#include <nuttx/config.h>

#ifdef CONFIG_ARCH_USE_S_MODE
#define TEXT_ADDR 0x80200000
#else
#define TEXT_ADDR 0x80000000
#endif
#define TEXT_ADDR CONFIG_RAM_START

SECTIONS
{
Expand Down

0 comments on commit c2132bb

Please sign in to comment.