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

is_address_rom only returns true for the first 8191 bytes #10

Open
iosabi opened this issue Sep 4, 2021 · 1 comment
Open

is_address_rom only returns true for the first 8191 bytes #10

iosabi opened this issue Sep 4, 2021 · 1 comment

Comments

@iosabi
Copy link

iosabi commented Sep 4, 2021

is_address_rom only returns true for addresses between 0 and 8191 inclusive, however we ROM area is 16 KiB. This causes reads to the bootrom area (with READ commands from the PICOBOOT interface) to fail if we try to read anything in the 8191 to 16384 range. Note that it is not possible to read address 8191 since the READ command checks for is_address_rom(address + size).

The function should check <= 16384 instead of < 8192.

A possible workaround is to use EXEC commands to copy the ROM area to RAM and then READ from RAM.

Just FYI if somebody runs into this problem.

@kilograham
Copy link
Contributor

Yup - picotool works around this problem using the EXEC method if you try to download the bootrom.

@kilograham kilograham changed the title is_address_rom only returns true for the first 8191 bytes is_address_rom only returns true for the first 8192 bytes Oct 5, 2021
@kilograham kilograham changed the title is_address_rom only returns true for the first 8192 bytes is_address_rom only returns true for the first 8191 bytes Oct 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants