Skip to content

Commit a5f8358

Browse files
committed
Fix boot process so the board boots by default. Remove unused linker script configs
1 parent d1ca95b commit a5f8358

3 files changed

Lines changed: 4 additions & 48 deletions

File tree

fiveforths.ld

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -15,54 +15,7 @@ SECTIONS {
1515
{
1616
. = ALIGN(4);
1717
*(.text) /* .text sections (code) */
18-
*(.text*) /* .text* sections (code) */
1918
*(.rodata) /* .rodata sections (constants, strings, etc.) */
20-
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
21-
*(.srodata) /* .rodata sections (constants, strings, etc.) */
22-
*(.srodata*) /* .rodata* sections (constants, strings, etc.) */
23-
_etext = .; /* define a global symbol at end of code */
24-
_sidata = _etext; /* This is used by the startup in order to initialize the .data secion */
2519
} >FLASH
2620

27-
/* This is the initialized data section
28-
The program executes knowing that the data is in the RAM
29-
but the loader puts the initial values in the FLASH (inidata).
30-
It is one task of the startup to copy the initial values from FLASH to RAM. */
31-
.data : AT ( _sidata )
32-
{
33-
. = ALIGN(4);
34-
_sdata = .; /* create a global symbol at data start; used by startup code in order to initialise the .d
35-
ata section in RAM */
36-
_ram_start = .; /* create a global symbol at ram start for garbage collector */
37-
. = ALIGN(4);
38-
*(.data) /* .data sections */
39-
*(.data*) /* .data* sections */
40-
*(.sdata) /* .sdata sections */
41-
*(.sdata*) /* .sdata* sections */
42-
. = ALIGN(4);
43-
_edata = .; /* define a global symbol at data end; used by startup code in order to initialise the .dat
44-
a section in RAM */
45-
} >RAM
46-
47-
/* Uninitialized data section */
48-
.bss :
49-
{
50-
. = ALIGN(4);
51-
_sbss = .; /* define a global symbol at bss start; used by startup code */
52-
*(.bss)
53-
*(.bss*)
54-
*(.sbss)
55-
*(.sbss*)
56-
*(COMMON)
57-
58-
. = ALIGN(4);
59-
_ebss = .; /* define a global symbol at bss end; used by startup code */
60-
} >RAM
61-
62-
/* this is to define the start of the heap, and make sure we have a minimum size */
63-
.heap :
64-
{
65-
. = ALIGN(4);
66-
_heap_start = .; /* define a global symbol at heap start */
67-
} >RAM
6821
}

src/03-interrupts.s

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
##
44

55
.text
6+
.global _start
7+
_start:
8+
j boot
69

710
.balign CELL
811
.global interrupt_handler

src/06-initialization.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
.global _start
77

88
# board boot initializations
9-
_start:
9+
boot:
1010
call interrupt_init # RISC-V interrupt CSR initialization
1111
call uart_init # board specific UART initialization
1212
call gpio_init # board specific GPIO initialization

0 commit comments

Comments
 (0)