apache / apache/nuttx

May i ask the meaning of CONFIG_RAM_START and CONFIG_RAM_SIZE while building rv-virt:knsh64 ?

Open
#8,812 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
4k
Forks
1.7k
Avg merge
1d 17h
Merged PRs (30d)
237

Description

Hi, i built rv-virt:knsh64 and notice that CONFIG_RAM_START and CONFIG_RAM_SIZE are defined here:

https://github.com/apache/nuttx/blob/776e2d774faac35c4583b6186e6c3e659fa4551f/boards/risc-v/qemu-rv/rv-virt/configs/knsh64/defconfig#L79-L80

May i ask why setting `CONFIG_RAM_START=0x8010_0000` and `setting CONFIG_RAM_SIZE=1048576` ? It seems that CONFIG_RAM_END = CONFIG_RAM_START + CONFIG_RAM_SIZE = 0x8020_0000
I\`m confused and don\`t know what effect these vars caused.

Besides, i also read the code in ld-kernel.script:
```
MEMORY
{
kflash (rx) : ORIGIN = 0x80000000, LENGTH = 2048K /* w/ cache */
ksram (rwx) : ORIGIN = 0x80200000, LENGTH = 2048K /* w/ cache */
pgram (rwx) : ORIGIN = 0x80400000, LENGTH = 4096K /* w/ cache */
}
```
And i got the value of `g_idle_topstack = 0x80206c00` and `KRAM = KSRAM_END = __ksram_end = 0x8040_0000` using gdb in function `up_allocate_heap`. So ... CONFIG_RAM_START & CONFIG_RAM_SIZE do not cause any effect here..

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.