mirror of
https://github.com/andreili/klipper.git
synced 2025-08-23 19:34:06 +02:00
spi_flash: FATFS fix missing long filenames support needed by flash-sdcard.sh (#6981)
enable long file support, needed for boards using swspi and long filenames for firmware like mks robin 1.1/1.2 added MKS robin nano 1.2 board with description what and why Signed-off-by: Leszek Zajac <zajc3w@gmail.com>
This commit is contained in:
parent
60879fd298
commit
4a567c8d10
@ -97,7 +97,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#define FF_USE_LFN 0
|
#define FF_USE_LFN 1
|
||||||
#define FF_MAX_LFN 255
|
#define FF_MAX_LFN 255
|
||||||
/* The FF_USE_LFN switches the support for LFN (long file name).
|
/* The FF_USE_LFN switches the support for LFN (long file name).
|
||||||
/
|
/
|
||||||
|
@ -50,6 +50,17 @@ BOARD_DEFS = {
|
|||||||
"firmware_path": "Robin_e3.bin",
|
"firmware_path": "Robin_e3.bin",
|
||||||
"current_firmware_path": "Robin_e3.cur"
|
"current_firmware_path": "Robin_e3.cur"
|
||||||
},
|
},
|
||||||
|
# twotrees sapphire 5 v1.1 using mks robin nano 1.2 board
|
||||||
|
'mks-robin-v12': {
|
||||||
|
'mcu': "stm32f103xe",
|
||||||
|
'spi_bus': "swspi",
|
||||||
|
'spi_pins': "PC8,PD2,PC12",
|
||||||
|
'cs_pin': "PC11",
|
||||||
|
'skip_verify': True,
|
||||||
|
"conversion_script": "scripts/update_mks_robin.py",
|
||||||
|
"firmware_path": "ROBIN_NANO35.BIN",
|
||||||
|
"current_firmware_path": "ROBIN_NANO35.BIN"
|
||||||
|
},
|
||||||
'btt-octopus-f407-v1': {
|
'btt-octopus-f407-v1': {
|
||||||
'mcu': "stm32f407xx",
|
'mcu': "stm32f407xx",
|
||||||
'spi_bus': "swspi",
|
'spi_bus': "swspi",
|
||||||
|
@ -26,7 +26,8 @@ struct ff_file_info {
|
|||||||
uint16_t modified_date;
|
uint16_t modified_date;
|
||||||
uint16_t modified_time;
|
uint16_t modified_time;
|
||||||
uint8_t attrs;
|
uint8_t attrs;
|
||||||
char name[13];
|
char name_sfn[13]; // unused, just for compatibility with fatfs lib
|
||||||
|
char name[256];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ff_disk_info {
|
struct ff_disk_info {
|
||||||
|
@ -32,7 +32,8 @@ FATFS_CDEFS = """
|
|||||||
uint16_t modified_date;
|
uint16_t modified_date;
|
||||||
uint16_t modified_time;
|
uint16_t modified_time;
|
||||||
uint8_t attrs;
|
uint8_t attrs;
|
||||||
char name[13];
|
char name_sfn[13];
|
||||||
|
char name[256];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ff_disk_info {
|
struct ff_disk_info {
|
||||||
|
@ -380,7 +380,7 @@ class FatFS:
|
|||||||
(fdate >> 5) & 0xF, fdate & 0x1F, ((fdate >> 9) & 0x7F) + 1980,
|
(fdate >> 5) & 0xF, fdate & 0x1F, ((fdate >> 9) & 0x7F) + 1980,
|
||||||
(ftime >> 11) & 0x1F, (ftime >> 5) & 0x3F, ftime & 0x1F)
|
(ftime >> 11) & 0x1F, (ftime >> 5) & 0x3F, ftime & 0x1F)
|
||||||
return {
|
return {
|
||||||
'name': self.ffi_main.string(finfo.name, 13),
|
'name': self.ffi_main.string(finfo.name, 256),
|
||||||
'size': finfo.size,
|
'size': finfo.size,
|
||||||
'modified': dstr,
|
'modified': dstr,
|
||||||
'is_dir': bool(finfo.attrs & 0x10),
|
'is_dir': bool(finfo.attrs & 0x10),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user