-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix incomplete string in BIOS and missing sections in linker scripts
- Loading branch information
Daniel Cliche
committed
Jun 8, 2024
1 parent
bb99553
commit dd6e4b4
Showing
17 changed files
with
100 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,33 @@ | ||
/* Ref.: https://github.com/YosysHQ/picorv32/blob/main/picosoc/sections.lds */ | ||
|
||
MEMORY | ||
{ | ||
ram (rwx) : ORIGIN = 0xF0000000, LENGTH = 512*4 | ||
ROM (rx) : ORIGIN = 0xF0000000, LENGTH = 2048 | ||
} | ||
|
||
SECTIONS { | ||
.memory : { | ||
. = 0x000000; | ||
*(.init); | ||
*(.text); | ||
*(.sbss); | ||
. = ALIGN(4); | ||
end = .; | ||
} >ram | ||
|
||
.heap : { | ||
. = ALIGN(4); | ||
_heap_start = .; | ||
_end = .; | ||
} >ram | ||
} | ||
/* | ||
* This is the initialized data | ||
*/ | ||
.data : { | ||
. = ALIGN(4); | ||
|
||
*(.text) /* .text sections (code) */ | ||
*(.text*) /* .text* sections (code) */ | ||
. = ALIGN(4); | ||
|
||
/* Initialized data */ | ||
*(.data) | ||
*(.data*) | ||
*(.sdata) | ||
*(.sdata*) | ||
. = ALIGN(4); | ||
*(.rodata) /* .rodata sections (constants, strings, etc.) */ | ||
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */ | ||
*(.srodata) /* .rodata sections (constants, strings, etc.) */ | ||
*(.srodata*) /* .rodata* sections (constants, strings, etc.) */ | ||
|
||
. = ALIGN(4); | ||
} > ROM | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/* Ref.: https://github.com/YosysHQ/picorv32/blob/main/picosoc/sections.lds */ | ||
|
||
MEMORY | ||
{ | ||
RAM (rwx) : ORIGIN = 0x00000000, LENGTH = 16*1024*1024 | ||
} | ||
|
||
__stacktop = ORIGIN(RAM) + LENGTH(RAM); | ||
|
||
SECTIONS { | ||
|
||
|
||
/* | ||
* This is the initialized data | ||
*/ | ||
.data : { | ||
. = ALIGN(4); | ||
_sdata = .; /* create a global symbol at data start; used by startup code in order to initialise the .data section in RAM */ | ||
_ram_start = .; /* create a global symbol at ram start (e.g., for garbage collector) */ | ||
|
||
|
||
*(.text) /* .text sections (code) */ | ||
*(.text*) /* .text* sections (code) */ | ||
. = ALIGN(4); | ||
|
||
/* Initialized data */ | ||
*(.data) | ||
*(.data*) | ||
*(.sdata) | ||
*(.sdata*) | ||
. = ALIGN(4); | ||
*(.rodata) /* .rodata sections (constants, strings, etc.) */ | ||
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */ | ||
*(.srodata) /* .rodata sections (constants, strings, etc.) */ | ||
*(.srodata*) /* .rodata* sections (constants, strings, etc.) */ | ||
|
||
. = ALIGN(4); | ||
_edata = .; /* define a global symbol at data end; used by startup code in order to initialise the .data section in RAM */ | ||
} > RAM | ||
|
||
/* Uninitialized data section */ | ||
.bss : { | ||
. = ALIGN(4); | ||
_sbss = .; /* define a global symbol at bss start; used by startup code */ | ||
*(.bss) | ||
*(.bss*) | ||
*(.sbss) | ||
*(.sbss*) | ||
*(COMMON) | ||
. = ALIGN(4); | ||
_ebss = .; /* define a global symbol at bss end; used by startup code */ | ||
} >RAM | ||
|
||
/* this is to define the start of the heap, and make sure we have a minimum size */ | ||
.heap : { | ||
. = ALIGN(4); | ||
_heap_start = .; /* define a global symbol at heap start */ | ||
_end = .; /* as expected by syscalls.c */ | ||
} >RAM | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.