summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/debug_menu.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index 63630b2ba9..18b081df76 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -238,7 +238,6 @@ unsigned short crc_16(const unsigned char* buf, unsigned len)
238 238
239 239
240#if CONFIG_CPU == TCC730 240#if CONFIG_CPU == TCC730
241extern int idatastart __attribute__ ((section(".idata")));
242static unsigned flash_word_temp __attribute__ ((section (".idata"))); 241static unsigned flash_word_temp __attribute__ ((section (".idata")));
243 242
244static void flash_write_word(unsigned addr, unsigned value) __attribute__ ((section(".icode"))); 243static void flash_write_word(unsigned addr, unsigned value) __attribute__ ((section(".icode")));
@@ -246,13 +245,13 @@ static void flash_write_word(unsigned addr, unsigned value) {
246 flash_word_temp = value; 245 flash_word_temp = value;
247 246
248 long extAddr = (long)addr << 1; 247 long extAddr = (long)addr << 1;
249 ddma_transfer(1, 1, (char*)&flash_word_temp - (char*)&idatastart, extAddr, 2); 248 ddma_transfer(1, 1, &flash_word_temp, extAddr, 2);
250} 249}
251 250
252static unsigned flash_read_word(unsigned addr) __attribute__ ((section(".icode"))); 251static unsigned flash_read_word(unsigned addr) __attribute__ ((section(".icode")));
253static unsigned flash_read_word(unsigned addr) { 252static unsigned flash_read_word(unsigned addr) {
254 long extAddr = (long)addr << 1; 253 long extAddr = (long)addr << 1;
255 ddma_transfer(1, 1, (char*)&flash_word_temp - (char*)&idatastart, extAddr, 2); 254 ddma_transfer(1, 1, &flash_word_temp, extAddr, 2);
256 return flash_word_temp; 255 return flash_word_temp;
257} 256}
258 257