summaryrefslogtreecommitdiff
path: root/documentation/3.kernel/timer
diff options
context:
space:
mode:
authorChen Wang <[email protected]>2025-04-18 12:02:59 +0800
committerRbb666 <[email protected]>2025-04-22 09:48:53 +0800
commite7d870bb7112fa7feee5927debee9ef2cdd2026b (patch)
treee4616990580e068aee2d927ae9c6bfe9eb4e56f3 /documentation/3.kernel/timer
parent7371a007affad2ebcdbdd6a964d51ffcccbf05aa (diff)
bsp: cvitek: riscv: use marco for linker script
Regarding link script, some memory offsets and sizes are different between the standard version and the smart version (such as "__STACKSIZE__", kernel start address, kernel memory size, etc.). Original solution is replacing link scripts and use INCLUDE, which is relatively complicated. This improvement uses macros to replace constants in the link script. The preprocessing mechanism provided by gcc is used to dynamically replace constant values during the build process. In addition, the kernel load address (the corresponding KERNEL_VADDR_START for smart) was originally configured as 0xFFFFFFC000200000, which is default value of riscv with kernelmap enabled (0xffffffc000000000) plus offset to skip over bootloader (0x200000). This caused a trouble: due to default bsp configuration is for smart, if we switched to the standard version and build, and then switched back to the smart version, the value of KERNEL_VADDR_START will be default back to 0xffffffc000000000, which is different from the original configuration value, resulting in the need to manually reconfigure it, which is easy to forget and cause problems. The current solution is to use the default value 0xffffffc000000000 in the configuration. Add offset to the code and link script when using it. This patch update the default .config and rtconfig.h for cv18xx_riscv. Signed-off-by: Chen Wang <[email protected]>
Diffstat (limited to 'documentation/3.kernel/timer')
0 files changed, 0 insertions, 0 deletions