diff options
Diffstat (limited to 'apps/debug_menu.c')
| -rw-r--r-- | apps/debug_menu.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c index 63630b2..18b081d 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) #if CONFIG_CPU == TCC730 -extern int idatastart __attribute__ ((section(".idata"))); static unsigned flash_word_temp __attribute__ ((section (".idata"))); static void flash_write_word(unsigned addr, unsigned value) __attribute__ ((section(".icode"))); @@ -246,13 +245,13 @@ static void flash_write_word(unsigned addr, unsigned value) { flash_word_temp = value; long extAddr = (long)addr << 1; - ddma_transfer(1, 1, (char*)&flash_word_temp - (char*)&idatastart, extAddr, 2); + ddma_transfer(1, 1, &flash_word_temp, extAddr, 2); } static unsigned flash_read_word(unsigned addr) __attribute__ ((section(".icode"))); static unsigned flash_read_word(unsigned addr) { long extAddr = (long)addr << 1; - ddma_transfer(1, 1, (char*)&flash_word_temp - (char*)&idatastart, extAddr, 2); + ddma_transfer(1, 1, &flash_word_temp, extAddr, 2); return flash_word_temp; } |