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

rp cyw43 firmware flashing and from_raw_parts len parameter #3470

Open
kolbma opened this issue Oct 28, 2024 · 1 comment · May be fixed by #3575
Open

rp cyw43 firmware flashing and from_raw_parts len parameter #3470

kolbma opened this issue Oct 28, 2024 · 1 comment · May be fixed by #3575

Comments

@kolbma
Copy link

kolbma commented Oct 28, 2024

I'm wondering how you calculate 230_321 and 4_752 for the len parameter?

// cyw43 firmware needs to be flashed manually:
// probe-rs download 43439A0.bin --binary-format bin --chip RP2040 --base-address 0x101b0000
// probe-rs download 43439A0_clm.bin --binary-format bin --chip RP2040 --base-address 0x101f8000
let fw = unsafe { core::slice::from_raw_parts(0x101b0000 as *const u8, 230321) };
let clm = unsafe { core::slice::from_raw_parts(0x101f8000 as *const u8, 4752) };

  File: cyw43-firmware/43439A0.bin
  Size: 231077    	Blocks: 456        IO Block: 4096   regular file

  File: cyw43-firmware/43439A0_clm.bin
  Size: 984       	Blocks: 8          IO Block: 4096   regular file

And maybe would you be so kind and explain the address usage?

Wouldn't it makes more sense to use 0x101c_0000 and 0x101f_b000 depending on the original len values?
And moving it up more if clm len doesn't need 4752 but based on the size something like 1024?!

@9names
Copy link
Contributor

9names commented Nov 25, 2024

It should just be whatever the file length is. And I suspect it was correct at some point in time and has diverged.
the firmware readme says these values should be updated whenever the firmware is updated, I assume that someone was busy and forgot to do that.

@9names 9names linked a pull request Nov 26, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants