diff --git a/src/Makefile b/src/Makefile index 7e5c748..61b5f90 100644 --- a/src/Makefile +++ b/src/Makefile @@ -75,7 +75,7 @@ ASRC = startup.S crc.S # (Note: 3 is not always the best optimization level. See avr-libc FAQ.) # Use s -mcall-prologues when you really need size... #OPT = 2 -OPT = 2 +OPT = s # Debugging format. DEBUG = dwarf-2 diff --git a/src/cli.c b/src/cli.c index d5d6852..7e8d78c 100644 --- a/src/cli.c +++ b/src/cli.c @@ -138,7 +138,7 @@ static int8_t parse_wordlist(char *wordlist) { return -1; } - if (tolower(c) != tolower(*cur)) { + if (tolower((int)c) != tolower((int)*cur)) { // Check for end-of-word if (cur != curchar && (*cur == ' ' || *cur == 0)) { // Partial match found, return that diff --git a/src/filetypes.c b/src/filetypes.c index c691427..6df3d5a 100644 --- a/src/filetypes.c +++ b/src/filetypes.c @@ -65,7 +65,7 @@ uint32_t scan_dir(char* path, FILINFO* fno_param, char mkdb, uint32_t this_dir_t static uint32_t next_subdir_tgt; static uint32_t parent_tgt; static uint32_t dir_end = 0; - static uint8_t was_empty = 0; +/* static uint8_t was_empty = 0;*/ static uint16_t num_files_total = 0; static uint16_t num_dirs_total = 0; uint32_t dir_tgt; @@ -147,7 +147,7 @@ uint32_t scan_dir(char* path, FILINFO* fno_param, char mkdb, uint32_t this_dir_t res = f_readdir(&dir, &fno); if (res != FR_OK || fno.fname[0] == 0) { if(pass) { - if(!numentries) was_empty=1; +/* if(!numentries) was_empty=1;*/ } break; } @@ -194,7 +194,7 @@ uint32_t scan_dir(char* path, FILINFO* fno_param, char mkdb, uint32_t this_dir_t sram_writeblock("/\0", old_db_tgt + sizeof(next_subdir_tgt) + sizeof(len) + pathlen, 2); } dir_tgt += 4; - was_empty = 0; +/* was_empty = 0;*/ } else if(!mkdb) { path[len]='/'; strncpy(path+len+1, (char*)fn, sizeof(fs_path)-len); diff --git a/src/memory.c b/src/memory.c index 8dd2049..5530b3f 100644 --- a/src/memory.c +++ b/src/memory.c @@ -473,7 +473,6 @@ uint32_t load_bootrle(uint32_t base_addr) { void save_sram(uint8_t* filename, uint32_t sram_size, uint32_t base_addr) { uint32_t count = 0; - uint32_t num = 0; FPGA_DESELECT(); file_open(filename, FA_CREATE_ALWAYS | FA_WRITE); @@ -490,7 +489,7 @@ void save_sram(uint8_t* filename, uint32_t sram_size, uint32_t base_addr) { count++; } FPGA_DESELECT(); - num = file_write(); + file_write(); if(file_res) { uart_putc(0x30+file_res); } @@ -594,7 +593,6 @@ uint64_t sram_gettime(uint32_t base_addr) { void load_dspx(const uint8_t *filename, uint8_t coretype) { UINT bytes_read; - DWORD filesize; uint16_t word_cnt; uint8_t wordsize_cnt = 0; uint16_t sector_remaining = 0; @@ -618,7 +616,6 @@ void load_dspx(const uint8_t *filename, uint8_t coretype) { } file_open((uint8_t*)filename, FA_READ); - filesize = file_handle.fsize; if(file_res) { printf("Could not read %s: error %d\n", filename, file_res); return; diff --git a/src/msu1.c b/src/msu1.c index 3207b62..5e663a3 100644 --- a/src/msu1.c +++ b/src/msu1.c @@ -204,15 +204,12 @@ int msu1_loop() { /* Data buffer refill */ if((fpga_status_now & 0x2000) != (fpga_status_prev & 0x2000)) { DBG_MSU1 printf("data\n"); - uint8_t pageno = 0; if(fpga_status_now & 0x2000) { msu_addr = 0x0; msu_page1_start = msu_page2_start + msu_page_size; - pageno = 1; } else { msu_addr = 0x2000; msu_page2_start = msu_page1_start + msu_page_size; - pageno = 2; } set_msu_addr(msu_addr); sd_offload_tgt=2; diff --git a/src/xmodem.c b/src/xmodem.c index 979f8d4..83f2398 100644 --- a/src/xmodem.c +++ b/src/xmodem.c @@ -6,8 +6,8 @@ #include "xmodem.h" void xmodem_rxfile(FIL* fil) { - uint8_t rxbuf[XMODEM_BLKSIZE], sum=0, sender_sum; - uint8_t blknum, blknum2; + uint8_t rxbuf[XMODEM_BLKSIZE], sum=0/*, sender_sum*/; +/* uint8_t blknum, blknum2;*/ uint8_t count; uint32_t totalbytes = 0; uint32_t totalwritten = 0; @@ -19,13 +19,13 @@ void xmodem_rxfile(FIL* fil) { uart_putc(ASC_NAK); } while (uart_getc() != ASC_SOH); do { - blknum=uart_getc(); - blknum2=uart_getc(); + /*blknum=*/uart_getc(); + /*blknum2=*/uart_getc(); for(count=0; count