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

Use Upload Offset in DFU Upload #42

Open
maxgerhardt opened this issue Sep 17, 2021 · 0 comments
Open

Use Upload Offset in DFU Upload #42

maxgerhardt opened this issue Sep 17, 2021 · 0 comments
Assignees
Labels
Arduino IDE Regarding things specific to the Arduino IDE needs testing Additional testing required uploader

Comments

@maxgerhardt
Copy link
Member

maxgerhardt commented Sep 17, 2021

The Keyboardio board added in #39 defines one possible upload method for the board as DFU, with an flash_offset of 0x2000.

This is however not respected in the platform.txt DFU upload method. It is respected when building the firmware through relocating the vector table etc. See #39 (comment).

compiler.c.elf.flags=-mcpu={build.mcu} {build.flags.fp} -mthumb {build.flags.optimize} {build.flags.ldspecs} -Wl,--defsym=LD_FLASH_OFFSET={build.flash_offset} -Wl,--defsym=LD_MAX_SIZE={upload.maximum_size} -Wl,--defsym=LD_MAX_DATA_SIZE={upload.maximum_data_size} -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--entry=Reset_Handler -Wl,--unresolved-symbols=report-all -Wl,--warn-common

tools.serial_upload.upload.params.verbose=-d
tools.serial_upload.upload.params.quiet=n
tools.serial_upload.upload.pattern="{path}/{cmd}" {serial.port.file} {upload.altID} {upload.usbID} "{build.path}/{build.project_name}.bin"

We need to very / fix the workings of the DFU upload methods in regards to the upload offset.

Linked to PlatformIO board definition (PR CommunityGD32Cores/platform-gd32#15) too, since DFU upload is also done there but without an upload offset (since the board definition file doesn't have one).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arduino IDE Regarding things specific to the Arduino IDE needs testing Additional testing required uploader
Projects
None yet
Development

No branches or pull requests

2 participants