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

Regenerated the STM32U5 targets. #1744

Merged
merged 1 commit into from
Sep 10, 2023

Conversation

esden
Copy link
Contributor

@esden esden commented Sep 5, 2023

This adds the newer U59 and U5A parts.

Copy link
Contributor

@noppej noppej left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much for doing this!

The pack file introduced new parts, which changes the sequence of chips generated by target-gen, resulting in an 'un-reviewable' number of diffs. At some point in the future, we should consider modifying target-gen, so that it doesn't trash currently supported parts.

Also, I will investigate the error you reported and get back to you.

@esden
Copy link
Contributor Author

esden commented Sep 5, 2023

I have tested this with the NUCLEO-U5A5ZJ-Q board containing a STM32U5A5ZJT6QJ. With the following command:

probe-rs run --chip STM32U5A5ZJTxQ target/thumbv8m.main-none-eabihf/debug/test-blinky

I get the following result:

ERROR probe_rs::flashing::flasher: Failed to verify flash algorithm. Data mismatch at address 0x24000000
ERROR probe_rs::flashing::flasher: Original instruction: 0xe00abe00
ERROR probe_rs::flashing::flasher: Readback instruction: 0x000000
ERROR probe_rs::flashing::flasher: Original: [e00abe00, 62d780d, 24084068, d3000040, 1e644058, 1c49d1fa, 2a001e52, 4770d1f, 41f0e92d, b6724607, 6c204c80, 49804d82, fc04a80, d00a444d, 302c487c, 487b60a8, 60e83024, 60e260e1, 8f4ff3bf, 4877e010, 60a83028, 30204875, 60a160e8, f3bf60a2, e0008f4f, 6a20bf00, d4fb03c0, bf00e016, 3c06a60, f04fd4fb, f8c436ff, f8c46080, f8c46084, f8c46088, f000608c, 2801f8ca, f844d104, 60666fa0, 60e660a6, 680168e8, d50103c9, e7fabf00, 602f4864, 4006800, 60680980, e8bd2000, 485f81f0, 4100f04f, 68824448, f3bf6011, 68c08f4f, bf00e000, 3c96801, 2000d4fb, 20014770, 49564770, 2faf242, 68c84449, 68896002, 204f248, 680a600a, 3280f442, f3bf600a, e0008f4f, 6801bf00, d4fb03c9, 47702000, 4606b570, f887f000, 28014d48, d107444d, 100e9d5, 151eb00, d80142b1, e0002401, f0002400, 2801f878, d0046868, 40061e40, 68e80b72, f04fe007, eb0131ff, 40300050, e7f60b42, 6801bf00, d4fb03c9, 3faf242, 21026003, 1c2eb01, 22c4ea41, 600a68a9, f442680a, 600a3280, 8f4ff3bf, bf00e000, 3c96801, 6801d4fb, d0024219, 20016003, 2000bd70, b5f0bd70, 310f4e28, f021444e, 68f1030f, bf00e000, 3e4680c, f242d4fb, 600d05fa, 240168b6, e02f6034, 88147897, 441ff367, ea4478d7, 60046407, 88947997, 441ff367, ea4479d7, 60446407, 89147a97, 441ff367, ea447ad7, 60846407, 89947b97, 441ff367, ea447bd7, 60c46407, 8f4ff3bf, bf00e000, 3e4680c, 680cd4fb, d002422c, 2001600d, 3010bdf0, 3b103210, d1cd2b00, 60302000, 4802bdf0, f3c06c00, 47705040, 40022000, 45670123, cdef89ab, 4, bfa07a0, 0, 0, 0, 0, 0]
ERROR probe_rs::flashing::flasher: Readback: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,     Erasing sectors ⠁ [00:00:00] [#############################################################################################################################################################################################################]      0 B/     0 B @      0 B/s (eta 0s )Error: The flashing procedure failed for 'target/thumbv8m.main-none-eabihf/debug/test-blinky'.

Caused by:
    The RAM contents did not match the expected contents after loading the flash algorithm.

@noppej
Copy link
Contributor

noppej commented Sep 6, 2023

@esden As an experiment, can you manually change the order of appearance of the SRAM1235 and SRAMGFXMM entries for your chip/part in the yaml, and see if that makes a difference?

@esden
Copy link
Contributor Author

esden commented Sep 6, 2023

@noppej Hey, yes, changing the order of RAM regions in the yaml file fixes the issue and upload works fine.

@noppej
Copy link
Contributor

noppej commented Sep 6, 2023

Cool, and thank you for testing. I know how to fix this in target-gen now. Are you open to waiting a few days for a drop of that, and then re-generating this target yaml and re-testing?

@esden
Copy link
Contributor Author

esden commented Sep 7, 2023

Yes, no problem, I can use my own build in the mean time until it is fixed up stream. :) Let me know if you need me to test anything and/or regenerate the yaml file.

@Yatekii
Copy link
Member

Yatekii commented Sep 7, 2023

Btw, you dont need your own build for extra targets, you should be able to give probe-rs target files via CLI args and they override names that already exist in the registry :)

@noppej
Copy link
Contributor

noppej commented Sep 8, 2023

@esden Thank you for your patience. #1745 has now been merged. I'd appreciate if you can:

  • Update your PR from master branch to get the new changes.
  • Re-run the new target-gen for STM32U5.
    • FYI. There is a launch.json entry in the repo, called target-gen Download and Update supported ARM target definitions, that will prompt you for the chip family filter, and generate the target yaml.
  • Please re-test with the newly generated target yaml.

@esden
Copy link
Contributor Author

esden commented Sep 10, 2023

Thanks @noppej. I have rebased, updated and tested the target file. I am able to flash using the correct device for the target without any manual changes.

Copy link
Member

@Yatekii Yatekii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot!

This adds the newer U59 and U5A parts.
auto-merge was automatically disabled September 10, 2023 18:57

Head branch was pushed to by a user without write access

@esden esden requested a review from noppej September 10, 2023 19:02
@noppej noppej added this pull request to the merge queue Sep 10, 2023
Merged via the queue into probe-rs:master with commit bfe8d75 Sep 10, 2023
10 checks passed
@esden esden deleted the change/add-new-stm32u5 branch September 10, 2023 21:30
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 this pull request may close these issues.

None yet

3 participants