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

Improve flash configs for i.MX RT targets #492

Closed

Conversation

MulattoKid
Copy link

This PR does two things:

  1. Enable RAM_CODE=1 in all i.MX RT target example configs. When running XIP this is needed to ensure memcpy (which is used during hal_flash_write) is in RAM, and not flash as that could result in reading from flash while writing to flash.
  2. Change both CPU_MIMXRT1061CVJ5B and CPU_MIMXRT1042XJM5B to define the USE_GET_CONFIG macro. This makes the flash configuration's LUT a lot smaller, and the MCU will instead query the various settings from the flash chip. Note that the CPU_MIMXRT1052DVJ6B target (RT1050 family) doesn't support this option.

Ref: #489

@dgarske
Copy link
Contributor

dgarske commented Aug 22, 2024

Okay to test. Contributor agreement on file.

@bigbrett
Copy link
Contributor

bigbrett commented Aug 22, 2024

This looks good, but I'm troubled that you are still experiencing hangs. I'd like to hold off on merging this until I can test on more targets as well as figure out the root cause of the ROM API hanging

@MulattoKid
Copy link
Author

My first test was to add RAMFUNCTION to the definition of hal_flash_init, and with that things seem to work. I'm not able to hit the hang. As mentioned in #493 I do believe adding a DSB barrier would still be an additional safety measure that could be added - it makes sense in my head that it's needed.

If it's OK I'll combine the these two PRs into one, as they're quite connected, and adding DSB would be needed in both.

@MulattoKid
Copy link
Author

Moved to new PR: #495

@MulattoKid MulattoKid closed this Aug 23, 2024
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.

3 participants