fix linker script for the simulation target

no need to include fonts in the verilator target environment
This commit is contained in:
bunnie 2025-07-23 01:23:22 +08:00
parent 80e367c519
commit 45e1fa306e
3 changed files with 10 additions and 11 deletions

View file

@ -101,7 +101,7 @@ board-baosec = [
]
board-baosor = ["cramium-hal/loader-baosor"]
board-dabao = ["cramium-hal/loader-dabao"]
cramium-fpga = ["utralib/cramium-fpga", "debug-print"]
cramium-fpga = ["utralib/cramium-fpga", "debug-print", "linked_list_allocator"]
atsama5d27 = ["utralib/atsama5d27", "armv7", "dep:atsama5d27"]
# precursor flags

View file

@ -13,7 +13,7 @@ fn main() {
#[cfg(feature = "cramium-soc")]
let p = PathBuf::from("src/platform/cramium/link-soc.x");
#[cfg(feature = "cramium-fpga")]
let p = PathBuf::from("src/platform/cramium/link-soc.x"); // note deviation -- this is because we are still simulating the FPGA model and offsets are not yet settled for that
let p = PathBuf::from("src/platform/cramium/link-fpga.x");
#[cfg(not(any(feature = "cramium-soc", feature = "cramium-fpga")))]
let p = PathBuf::from("src/platform/precursor/link.x");

View file

@ -1,12 +1,11 @@
MEMORY
{
/* we are using an unsigned loader, so the offset is not 1k offset */
FLASH : ORIGIN = 0x60500000, LENGTH = 32k
RAM : ORIGIN = 0x61000000, LENGTH = 16M
/* if the font location is adjusted, this needs to be updated in libs/blitstr2 codegen templates.go FONT_BASE value */
FONTS : ORIGIN = 0x60040000, LENGTH = 128k
FLASH : ORIGIN = 0x60001000, LENGTH = 252k
RAM : ORIGIN = 0x61000000, LENGTH = 2M
}
/*
Fonts go from 0x2053_0000 to 0x2097_0000
*/
REGION_ALIAS("REGION_TEXT", FLASH);
REGION_ALIAS("REGION_RODATA", FLASH);
@ -88,12 +87,12 @@ SECTIONS
. = ALIGN(4);
_edata = .;
} > REGION_DATA AT > REGION_RODATA
/* .fonts : ALIGN(65536)
/*
.fonts : ALIGN(65536)
{
KEEP(*(.fontdata));
} > FONTS */
} > FONTS
*/
.bss (NOLOAD) :
{
_sbss = .;