Moved FireTOS and EmuTOS symbols to the linker script.
This commit is contained in:
@@ -14,6 +14,11 @@ SECTIONS {
|
|||||||
___SDRAM = ABSOLUTE(0x00000000);
|
___SDRAM = ABSOLUTE(0x00000000);
|
||||||
___SDRAM_SIZE = ABSOLUTE(0x20000000);
|
___SDRAM_SIZE = ABSOLUTE(0x20000000);
|
||||||
|
|
||||||
|
/* Flash components */
|
||||||
|
__FIRETOS = ABSOLUTE(0xe0400000);
|
||||||
|
__EMUTOS = ABSOLUTE(0xe0600000);
|
||||||
|
__EMUTOS_SIZE = ABSOLUTE(0x00100000);
|
||||||
|
|
||||||
/* VIDEO RAM BASIS */
|
/* VIDEO RAM BASIS */
|
||||||
__VRAM = ABSOLUTE(0x60000000);
|
__VRAM = ABSOLUTE(0x60000000);
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,12 @@ extern int sd_card_init();
|
|||||||
extern void wait_10ms();
|
extern void wait_10ms();
|
||||||
extern void wait_1ms();
|
extern void wait_1ms();
|
||||||
|
|
||||||
|
/* Symbols from the linker script */
|
||||||
|
extern uint8_t _EMUTOS[];
|
||||||
|
#define EMUTOS ((uint32_t)_EMUTOS) /* where EmuTOS is stored in flash */
|
||||||
|
extern uint8_t _EMUTOS_SIZE[];
|
||||||
|
#define EMUTOS_SIZE ((uint32_t)_EMUTOS_SIZE) /* size of EmuTOS, in bytes */
|
||||||
|
|
||||||
/********************************************************************/
|
/********************************************************************/
|
||||||
void BaS(void)
|
void BaS(void)
|
||||||
{
|
{
|
||||||
@@ -61,8 +67,8 @@ void BaS(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* copy EMUTOS */
|
/* copy EMUTOS */
|
||||||
src = (uint8_t *) 0xe0600000L;
|
src = (uint8_t *)EMUTOS;
|
||||||
while (src < (uint8_t *) 0xe0700000L)
|
while (src < (uint8_t *)(EMUTOS + EMUTOS_SIZE))
|
||||||
{
|
{
|
||||||
*dst++ = *src++;
|
*dst++ = *src++;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -667,6 +667,9 @@ livo:
|
|||||||
|
|
||||||
/* Symbols from the linker script */
|
/* Symbols from the linker script */
|
||||||
|
|
||||||
|
extern uint8_t _FIRETOS[];
|
||||||
|
#define FIRETOS ((uint32_t)_FIRETOS) /* where FireTOS is stored in flash */
|
||||||
|
|
||||||
extern uint8_t _BAS_LMA[];
|
extern uint8_t _BAS_LMA[];
|
||||||
#define BAS_LMA ((uint32_t)_BAS_LMA) /* where the BaS is stored in flash */
|
#define BAS_LMA ((uint32_t)_BAS_LMA) /* where the BaS is stored in flash */
|
||||||
|
|
||||||
@@ -700,7 +703,7 @@ void initialize_hardware(void) {
|
|||||||
|
|
||||||
/* Jump into FireTOS */
|
/* Jump into FireTOS */
|
||||||
typedef void void_func(void);
|
typedef void void_func(void);
|
||||||
void_func* FireTOS = (void_func*)0xe0400000;
|
void_func* FireTOS = (void_func*)FIRETOS;
|
||||||
FireTOS(); // Should never return
|
FireTOS(); // Should never return
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user