Skip to content

Commit

Permalink
Add OS_Main attribute to main. Makes bootloader without serial take l…
Browse files Browse the repository at this point in the history
…ess than 2kb
  • Loading branch information
loathingKernel committed Jun 3, 2016
1 parent ab3083e commit d669998
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions hardware/ariadne/bootloaders/ariadne/main.c
Expand Up @@ -26,7 +26,7 @@
#endif


//int main(void) __attribute__((naked)) __attribute__((section(".init9")));
int main(void) __attribute__ ((OS_main)) __attribute__ ((section (".init9")));
//void (*appStart)(void) __attribute__((naked)) = 0x0000;
//void (*appStart)(void) = 0x0000;

Expand Down Expand Up @@ -102,14 +102,12 @@ int main(void)
// If there is no serial flashing under way, poll tftp
if(!serialFlashing)
// If tftp recieved a FINAL_ACK, break
if(tftpPoll() == 0)
break;
if(tftpPoll() == 0) break;

// If there is no tftp flashing, poll serial
if(!tftpFlashing)
// If flashing is done exit
if(serialPoll() == 0)
break;
if(serialPoll() == 0) break;

/* As explained above this goes out */
#if defined(ANNOUNCE)
Expand Down

0 comments on commit d669998

Please sign in to comment.