Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two small patches for build system and fatfs (IDFGH-10849) #12052

Merged
merged 2 commits into from
Aug 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 9 additions & 3 deletions components/fatfs/diskio/diskio_rawflash.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ static const esp_partition_t* s_ff_raw_handles[FF_VOLUMES];
// Determine the sector size and sector count by parsing the boot sector
static size_t s_sector_size[FF_VOLUMES];
static size_t s_sectors_count[FF_VOLUMES];
static uint8_t s_initialized[FF_VOLUMES];

#define BPB_BytsPerSec 11
#define BPB_TotSec16 19
Expand Down Expand Up @@ -56,12 +57,17 @@ DSTATUS ff_raw_initialize (BYTE pdrv)
s_sectors_count[pdrv] = sectors_count_tmp_32;
}

return 0;
s_initialized[pdrv] = true;
return STA_PROTECT;
}

DSTATUS ff_raw_status (BYTE pdrv)
{
return 0;
DSTATUS status = STA_PROTECT;
if (!s_initialized[pdrv]) {
status |= STA_NOINIT | STA_NODISK;
}
return status;
}

DRESULT ff_raw_read (BYTE pdrv, BYTE *buff, DWORD sector, UINT count)
Expand All @@ -80,7 +86,7 @@ DRESULT ff_raw_read (BYTE pdrv, BYTE *buff, DWORD sector, UINT count)

DRESULT ff_raw_write (BYTE pdrv, const BYTE *buff, DWORD sector, UINT count)
{
return RES_ERROR;
return RES_WRPRT;
}

DRESULT ff_raw_ioctl (BYTE pdrv, BYTE cmd, void *buff)
Expand Down
2 changes: 1 addition & 1 deletion tools/idf_py_actions/debug_ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ def generate_gdbinit_rom_add_symbols(target: str) -> str:
r.append('set confirm on')
r.append('end')
r.append('')
return os.linesep.join(r)
return '\n'.join(r)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did os.linesep cause any issue when you used it? According to the docs it should be the correct line ending depending on the host OS.

raise FatalError(f'{ESP_ROM_INFO_FILE} file not found. Please check IDF integrity.')

def generate_gdbinit_files(gdb: str, gdbinit: Optional[str], project_desc: Dict[str, Any]) -> None:
Expand Down