Skip to content

Update Spresense SDK and fix USB CDC #4064

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

Merged
merged 2 commits into from
Jan 25, 2021
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/tinyusb
Submodule tinyusb updated 307 files
2 changes: 1 addition & 1 deletion ports/cxd56/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Bootloader information:

* You have to accept the End User License Agreement to be able to download and use the Spresense bootloader binary.

Download the spresense binaries zip archive from: [Spresense firmware v2-0-000](https://developer.sony.com/file/download/download-spresense-firmware-v2-0-000)
Download the spresense binaries zip archive from: [Spresense firmware v2-0-002](https://developer.sony.com/file/download/download-spresense-firmware-v2-0-002)

Extract spresense binaries in your PC to ports/spresense/spresense-exported-sdk/firmware/

Expand Down
1 change: 1 addition & 0 deletions ports/cxd56/configs/circuitpython/defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ CONFIG_USBDEV=y
CONFIG_USBDEV_DMA=y
CONFIG_USBDEV_DUALSPEED=y
CONFIG_USEC_PER_TICK=1000
CONFIG_USERMAIN_STACKSIZE=8192
CONFIG_USER_ENTRYPOINT="spresense_main"
CONFIG_VIDEO_ISX012=y
CONFIG_VIDEO_STREAM=y
16 changes: 8 additions & 8 deletions ports/cxd56/supervisor/internal_flash.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@

/* Prototypes for Remote API */

int FM_RawWrite(uint32_t offset, const void *buf, uint32_t size);
int FM_RawVerifyWrite(uint32_t offset, const void *buf, uint32_t size);
int FM_RawRead(uint32_t offset, void *buf, uint32_t size);
int FM_RawEraseSector(uint32_t sector);
int fw_fm_rawwrite(uint32_t offset, const void *buf, uint32_t size);
int fw_fm_rawverifywrite(uint32_t offset, const void *buf, uint32_t size);
int fw_fm_rawread(uint32_t offset, void *buf, uint32_t size);
int fw_fm_rawerasesector(uint32_t sector);

#define CXD56_SPIFLASHSIZE (16 * 1024 * 1024)

Expand Down Expand Up @@ -64,16 +64,16 @@ void port_internal_flash_flush(void) {
return;
}

FM_RawEraseSector(flash_sector);
FM_RawWrite(flash_sector << SECTOR_SHIFT, flash_cache, SECTOR_SIZE);
fw_fm_rawerasesector(flash_sector);
fw_fm_rawwrite(flash_sector << SECTOR_SHIFT, flash_cache, SECTOR_SIZE);

flash_sector = NO_SECTOR;
}

mp_uint_t supervisor_flash_read_blocks(uint8_t *dest, uint32_t block, uint32_t num_blocks) {
supervisor_flash_flush();

if (FM_RawRead(block << PAGE_SHIFT, dest, num_blocks << PAGE_SHIFT) < 0) {
if (fw_fm_rawread(block << PAGE_SHIFT, dest, num_blocks << PAGE_SHIFT) < 0) {
return 1;
}

Expand All @@ -92,7 +92,7 @@ mp_uint_t supervisor_flash_write_blocks(const uint8_t *src, uint32_t lba, uint32
if (sector != flash_sector) {
supervisor_flash_flush();

if (FM_RawRead(sector << SECTOR_SHIFT, flash_cache, SECTOR_SIZE) < 0) {
if (fw_fm_rawread(sector << SECTOR_SHIFT, flash_cache, SECTOR_SIZE) < 0) {
return 1;
}

Expand Down