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

Fix: imxrt: Cortex-M4 core detection for RT1176 #1913

Merged
merged 2 commits into from
Jan 16, 2025

Conversation

litui
Copy link
Contributor

@litui litui commented Aug 27, 2024

Detailed description

  • The i.MX RT1176 includes both an M7 and M4 core but only the M7 was being detected by BMP / BMDA. This fix enables detection of the M4 core (a separate AP entry) under the same target part_id as the M7.
  • The generic RAM mapping provided in imxrt.c for all i.MXRT devices was inaccurate for the RT117x and did not distinguish between the memory available to the M7 core vs. the M4 core. This fix maps the RAM based on the target->part_id and core and includes a fairly comprehensive mapping for the RT117x.
  • Flash detection logic did not require changing (both cores map the FlexSPI controller at the same location).
  • The i.MX RT117x supports register-configurable SDRAM and SRAM but the addresses for this are not fixed and the same controller can be used for flash memory as well. These ranges have been excluded from this fix.
  • The i.MX RT1170 Processor Reference Manual rev 2 (sign-in required) was used as reference.

Your checklist for this pull request

Closing issues

@litui
Copy link
Contributor Author

litui commented Aug 27, 2024

Tested using a Google Coral Micro dev board running its multi_core_hello example (the M4 core has to be switched on for it to be detected).

@litui litui changed the title imxrt: Cortex-M4 core detection for RT1176 Fix: imxrt: Cortex-M4 core detection for RT1176 Aug 27, 2024
@litui litui force-pushed the fix/imxrt-1176-m4-core-and-ram branch from 489d9c8 to 67eb56e Compare August 28, 2024 18:13
Copy link
Member

@dragonmux dragonmux left a comment

Choose a reason for hiding this comment

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

This is looking very good. We have a couple of queries, but once they've been addressed we'll be happy to get this merged.

src/target/imxrt.c Outdated Show resolved Hide resolved
src/target/imxrt.c Outdated Show resolved Hide resolved
@dragonmux dragonmux added this to the v2.0 release milestone Sep 10, 2024
@dragonmux dragonmux added the Bug Confirmed bug label Sep 10, 2024
@litui litui force-pushed the fix/imxrt-1176-m4-core-and-ram branch from 67eb56e to 20ab24b Compare January 16, 2025 20:12
litui added a commit to litui/blackmagic that referenced this pull request Jan 16, 2025
- Removed TCM blocks.
- Consolidated M4 and M7 logic that produced identical values.
dragonmux
dragonmux previously approved these changes Jan 16, 2025
Copy link
Member

@dragonmux dragonmux left a comment

Choose a reason for hiding this comment

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

LGTM, merging once the build failing item is fixed. Thank you for the contribution!

litui added a commit to litui/blackmagic that referenced this pull request Jan 16, 2025
- Removed TCM blocks.
- Consolidated M4 and M7 logic that produced identical values.
@litui litui force-pushed the fix/imxrt-1176-m4-core-and-ram branch from 3b624b9 to 8c513c3 Compare January 16, 2025 20:23
litui added 2 commits January 16, 2025 13:29
- More accurate/precise RAM mapping for M7 and M4 cores added as well.
- Removed TCM blocks.
- Consolidated M4 and M7 logic that produced identical values.
@litui litui force-pushed the fix/imxrt-1176-m4-core-and-ram branch from 8c513c3 to 87cd7e2 Compare January 16, 2025 20:29
@dragonmux dragonmux merged commit 87cd7e2 into blackmagic-debug:main Jan 16, 2025
36 checks passed
@litui litui deleted the fix/imxrt-1176-m4-core-and-ram branch January 16, 2025 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Confirmed bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants