-
Notifications
You must be signed in to change notification settings - Fork 151
Improve loading speed by 50% #66
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| .cpu cortex-m0 | ||
| .thumb | ||
| push {r4, lr} | ||
| mov r4, #20 | ||
| ldrh r0, [r4] // r0 = function_table | ||
| ldrh r1, args | ||
| ldrh r4, [r4, #4] // r4 = table_lookup | ||
| blx r4 | ||
| mov r4, r0 | ||
| ldr r0, args + 4 | ||
| ldr r1, args + 8 | ||
| ldr r2, args + 12 | ||
| ldrb r3, args + 16 | ||
| blx r4 | ||
| pop {r4, pc} | ||
| .balign 4, 0 | ||
| args: |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39,6 +39,7 @@ int picoboot_enter_cmd_xip(libusb_device_handle *usb_device); | |
| int picoboot_exit_xip(libusb_device_handle *usb_device); | ||
| int picoboot_reboot(libusb_device_handle *usb_device, uint32_t pc, uint32_t sp, uint32_t delay_ms); | ||
| int picoboot_exec(libusb_device_handle *usb_device, uint32_t addr); | ||
| int picoboot_flash_range_erase(libusb_device_handle *, uint32_t, uint32_t, uint32_t, uint8_t); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why the missing parameter-names here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I just wanted to keep the lines to a reasonable length so you can have a text editor and terminal on the same screen. It would have been OK to have the names and insert a line break instead. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Isn't the header-file often used as a quick-reference list of the functions and their parameters? That's why I'd argue for including the parameter-names, but ultimately that's Graham's decision. |
||
| int picoboot_flash_erase(libusb_device_handle *usb_device, uint32_t addr, uint32_t len); | ||
| int picoboot_vector(libusb_device_handle *usb_device, uint32_t addr); | ||
| int picoboot_write(libusb_device_handle *usb_device, uint32_t addr, uint8_t *buffer, uint32_t len); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably makes sense to add
#definevalues for these different erase cmds? 🤷♂️(but like you, I dunno how widely supported these commands are amongst other flash chips, and that'll be the kicker here!)