summaryrefslogtreecommitdiffstats
path: root/setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'setup.c')
-rw-r--r--setup.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/setup.c b/setup.c
index ad29e40..9cb0312 100644
--- a/setup.c
+++ b/setup.c
@@ -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)