Merge pull request #52 from erikkaashoek/DiSlord_browser

Di slord browser
pwm
erikkaashoek 3 years ago committed by GitHub
commit 4159b89d07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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.

@ -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;
}

@ -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;

Loading…
Cancel
Save

Powered by TurnKey Linux.