diff --git a/README.md b/README.md index 54cf2e6..6d14c70 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,12 @@ enthusiast. This repository contains source of tinySA firmware. +# Support + +General tinySA support questions should be posted here: https://groups.io/g/tinysa/messages + +Use github issue list only for firmware bugs and preferrably cross post to: https://groups.io/g/tinysa/messages + ## Prepare ARM Cross Tools **UPDATE**: Recent gcc version works to build tinySA, no need old version. @@ -54,6 +60,10 @@ Just make in the directory. $ make +For tinySA Ultra use this command + + $ make TARGET="F303" + ### Build firmware using docker Using [this docker image](https://hub.docker.com/r/edy555/arm-embedded) and without installing arm toolchain, you can build the firmware. diff --git a/main.c b/main.c index c9c6118..e5873df 100644 --- a/main.c +++ b/main.c @@ -857,7 +857,7 @@ VNA_SHELL_FUNCTION(cmd_capture) static FRESULT cmd_sd_card_mount(void){ const FRESULT res = f_mount(fs_volume, "", 1); if (res != FR_OK) - shell_printf("err %d: no card\r\n",res); + shell_printf("err: (%d) no card\r\n",res); return res; } @@ -885,49 +885,43 @@ VNA_SHELL_FUNCTION(cmd_sd_list) res = f_findnext(&dj, &fno); } if (res != FR_OK) - shell_printf("err %d\r\n",res); + shell_printf("err: (%d)\r\n",res); f_closedir(&dj); } VNA_SHELL_FUNCTION(cmd_sd_read) { - DIR dj; - FILINFO fno; +// DIR dj; +// FILINFO fno; FRESULT res; char *buf = (char *)spi_buffer; if (argc != 1 || argv[0][0] == '?') { - usage_printf("sd_read {filename}\r\n"); + usage_printf("usage: sd_read {filename}\r\n"); return; } const char *filename = argv[0]; if (cmd_sd_card_mount() != FR_OK) return; - res = f_findfirst(&dj, &fno, "", filename); - if (res != FR_OK || fno.fname[0] == 0) - goto error; + // res = f_findfirst(&dj, &fno, "", filename); + // if (res != FR_OK || fno.fname[0] == 0) + // goto error; - - if (f_open(fs_file, fno.fname, FA_OPEN_EXISTING | FA_READ) != FR_OK){ -error: - shell_printf("err %d: no file\r\n",res); + if ((res = f_open(fs_file, filename, FA_OPEN_EXISTING | FA_READ)) != FR_OK){ +//error: + shell_printf("err: (%d) no file\r\n", res); return; } - // shell_printf("sd_read: %s\r\n", filename); // number of bytes to follow (file size) uint32_t filesize = f_size(fs_file); -#if 1 - shell_printf("%u\r\n", filesize); -#else streamWrite(shell_stream, (void *)&filesize, 4); -#endif UINT size = 0; // file data (send all data from file) while ((res=f_read(fs_file, buf, 512, &size)) == FR_OK && size > 0) streamWrite(shell_stream, (void *)buf, size); - if (res != FR_OK) - goto error; +// if (res != FR_OK) +// goto error; f_close(fs_file); return; } diff --git a/nanovna.h b/nanovna.h index d50b145..c603e78 100644 --- a/nanovna.h +++ b/nanovna.h @@ -1384,7 +1384,7 @@ typedef struct properties { //sizeof(properties_t) == 0x1200 -#define CONFIG_MAGIC 0x434f4e5D /* 'CONF' */ +#define CONFIG_MAGIC 0x434f4e5F /* 'CONF' */ extern int16_t lastsaveid; //extern properties_t *active_props;