diff options
Diffstat (limited to 'setup.c')
-rw-r--r-- | setup.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -5,8 +5,8 @@ #include "asm.h" #include "usb/usb.h" -extern char _sflashdata[], _sdata[], _edata[]; -extern char _sbss[], _ebss[]; +extern unsigned char _ldata[], _sdata[], _edata[]; +extern unsigned char _sbss[], _ebss[]; #define RANGE0_VAL 2 /* Very High Frequency */ #define HGO0_VAL 0 /* High Gain Mode Disabled */ @@ -31,8 +31,8 @@ void setup(void) UNSET_BIT(WDOG_STCTRLH, STCTRLH_WDOGEN); /* Copy data and clear bss */ - memcpy(_sdata, _sflashdata, _edata - _sdata); - memset(_sbss, 0, _ebss - _sdata); + memcpy(_sdata, _ldata, _edata - _sdata); + memset(_sbss, 0, _ebss - _sbss); /* Enable port clocks */ SIM_SCGC5 |= BV(SCGC5_PORTE) | BV(SCGC5_PORTD) | BV(SCGC5_PORTC) |