diff options
Diffstat (limited to '1_hello_world/startup.c')
-rw-r--r-- | 1_hello_world/startup.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/1_hello_world/startup.c b/1_hello_world/startup.c index 06ca39e..e743214 100644 --- a/1_hello_world/startup.c +++ b/1_hello_world/startup.c @@ -29,6 +29,8 @@ static __attribute__((interrupt)) void VSYNC_handler(void); static __attribute__((interrupt)) void CPUException_handler(void); extern unsigned __stacktop; +extern unsigned __rom_start; +extern unsigned __rom_end; __attribute__((section(".stack"), used)) unsigned *__stack_init = &__stacktop; @@ -106,8 +108,8 @@ __attribute__((section(".smd_header"), used)) struct smd_header __smd_header = { .version = "GM XXXXXXXX-XX", .checksum = 0x0000, .io_support = "J ", - .rom_start = 0, - .rom_end = 0xfffff, + .rom_start = (unsigned long)&__rom_start, + .rom_end = (unsigned long)&__rom_end-1, .ram_start = 0xff0000, .ram_end = 0xffffff, .sram_enabled = 0x00000000, @@ -124,8 +126,11 @@ static void __start(void) { main(); } + static void HSYNC_handler(void) {} + static void VSYNC_handler(void) {} + static void CPUException_handler(void) { asm inline volatile (" stop #2700"); |