You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by bt...@apache.org on 2021/02/13 23:24:39 UTC

[incubator-nuttx] 01/02: litex: nsh working

This is an automated email from the ASF dual-hosted git repository.

btashton pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 11167857c30fac2e53882ce746c94bf25e9b4081
Author: David Jablonski <da...@gmail.com>
AuthorDate: Sat Feb 6 17:11:37 2021 +0100

    litex: nsh working
---
 arch/risc-v/src/litex/hardware/litex_clint.h      | 2 +-
 arch/risc-v/src/litex/hardware/litex_memorymap.h  | 4 ++--
 boards/risc-v/litex/arty_a7/configs/nsh/defconfig | 5 +++--
 boards/risc-v/litex/arty_a7/scripts/ld.script     | 4 ++--
 4 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/arch/risc-v/src/litex/hardware/litex_clint.h b/arch/risc-v/src/litex/hardware/litex_clint.h
index 73ff1a6..79a95c8 100644
--- a/arch/risc-v/src/litex/hardware/litex_clint.h
+++ b/arch/risc-v/src/litex/hardware/litex_clint.h
@@ -27,6 +27,6 @@
 
 #define LITEX_CLINT_LATCH      (LITEX_CPUTIMER_BASE)
 #define LITEX_CLINT_MTIME      (LITEX_CPUTIMER_BASE + 0x04)
-#define LITEX_CLINT_MTIMECMP   (LITEX_CPUTIMER_BASE + 0x24)
+#define LITEX_CLINT_MTIMECMP   (LITEX_CPUTIMER_BASE + 0x0C)
 
 #endif /* __ARCH_RISCV_SRC_LITEX_HARDWARE_LITEX_CLINT_H */
diff --git a/arch/risc-v/src/litex/hardware/litex_memorymap.h b/arch/risc-v/src/litex/hardware/litex_memorymap.h
index f5b208c..d808590 100644
--- a/arch/risc-v/src/litex/hardware/litex_memorymap.h
+++ b/arch/risc-v/src/litex/hardware/litex_memorymap.h
@@ -32,7 +32,7 @@
  */
 
 #define LITEX_CPUTIMER_BASE 0xf0000800  /* riscv clint timer */
-#define LITEX_TIMER0_BASE   0xf0001800
-#define LITEX_UART0_BASE    0xf0001000  /* 0xf0001000 - : UART0 */
+#define LITEX_TIMER0_BASE   0xf0002800
+#define LITEX_UART0_BASE    0xf0002000  /* 0xf0001000 - : UART0 */
 
 #endif /* __ARCH_RISCV_SRC_LITEX_HARDWARE_LITEX_MEMORYMAP_H */
diff --git a/boards/risc-v/litex/arty_a7/configs/nsh/defconfig b/boards/risc-v/litex/arty_a7/configs/nsh/defconfig
index a91be13..46675ed 100644
--- a/boards/risc-v/litex/arty_a7/configs/nsh/defconfig
+++ b/boards/risc-v/litex/arty_a7/configs/nsh/defconfig
@@ -25,6 +25,7 @@ CONFIG_DEBUG_SYMBOLS=y
 CONFIG_DEFAULT_SMALL=y
 CONFIG_DEV_ZERO=y
 CONFIG_DISABLE_MQUEUE=y
+CONFIG_ELF=y
 CONFIG_EXAMPLES_HELLO=y
 CONFIG_EXAMPLES_HELLO_STACKSIZE=8192
 CONFIG_FS_PROCFS=y
@@ -47,8 +48,8 @@ CONFIG_NSH_FILEIOSIZE=64
 CONFIG_NSH_STRERROR=y
 CONFIG_PREALLOC_TIMERS=0
 CONFIG_PTHREAD_STACK_DEFAULT=8192
-CONFIG_RAM_SIZE=134217728
-CONFIG_RAM_START=0xc0800000
+CONFIG_RAM_SIZE=268435456
+CONFIG_RAM_START=0x40000000
 CONFIG_RAW_BINARY=y
 CONFIG_RR_INTERVAL=200
 CONFIG_RV32IM_CUSTOM_IRQ_SUPPORT=y
diff --git a/boards/risc-v/litex/arty_a7/scripts/ld.script b/boards/risc-v/litex/arty_a7/scripts/ld.script
index 83ba995..3ba230a 100644
--- a/boards/risc-v/litex/arty_a7/scripts/ld.script
+++ b/boards/risc-v/litex/arty_a7/scripts/ld.script
@@ -20,8 +20,8 @@
 
 MEMORY
 {
-  progmem (rx) : ORIGIN = 0xc0000000, LENGTH = 8M
-  sram (rwx) : ORIGIN = 0xc0800000, LENGTH = 256M - 8M
+  progmem (rx) : ORIGIN = 0x40000000, LENGTH = 8M
+  sram (rwx) : ORIGIN = 0x40800000, LENGTH = 256M - 8M
 }
 
 OUTPUT_ARCH("riscv")