mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
libbase/crt0-picorv32: Add support for .data sections.
This commit is contained in:
parent
80bdae0e55
commit
89c702187a
1 changed files with 14 additions and 0 deletions
|
@ -194,6 +194,20 @@ _crt0:
|
|||
la t1, _irq_mask
|
||||
sw t0, 0(t1)
|
||||
|
||||
#ifdef EXECUTE_IN_PLACE
|
||||
/* Load DATA */
|
||||
la t0, _erodata
|
||||
la t1, _fdata
|
||||
la t2, _edata
|
||||
3:
|
||||
lw t3, 0(t0)
|
||||
sw t3, 0(t1)
|
||||
/* _edata is aligned to 16 bytes. Use word-xfers. */
|
||||
addi t0, t0, 4
|
||||
addi t1, t1, 4
|
||||
bltu t1, t2, 3b
|
||||
#endif
|
||||
|
||||
/* Clear BSS */
|
||||
la t0, _fbss
|
||||
la t1, _ebss
|
||||
|
|
Loading…
Reference in a new issue