Skip to content

Conversation

@multiplemonomials
Copy link
Collaborator

Summary of changes

On the MIMXRT1050/1060 chips, the DTCM memory is significantly faster than the OCRAM memory. Sometimes the CPU cache can help with this, but the DTCM memory bypasses the cache entirely so its full size can be accessed at full speed.

Therefore, it makes sense to move as much stuff into DTCM as possible, especially on devices without an external RAM chip such as the Teensy boards. This PR does that, and also makes a refactor to the linker script and the target labels for MIMXRT105x to make this possible.

In particular, this PR adds a new target label, MIMXRT105x, to indicate code for BOTH the 1050-series and the 1060-series chips. Code specific to the 1050 can now be guarded with MBED_TARGET_MIMXRT1050, and code specific to the 1060 can be guarded with MBED_TARGET_MIMXRT1060.

Impact of changes

  • Execution speed should be moderately increased for Teensy boards.
  • TARGET_MIMXRT1050 label changed from referring to both the 1050 and 1060 to the 1050 only

Migration actions required

  • If user code was using the TARGET_MIMXRT1050 label anywhere, it should change to TARGET_MIMXRT105x for the same behavior. I don't think this is likely to be used anywhere though.

Documentation

None


Pull request type

[X] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[] Covered by existing mbed-os tests (Greentea or Unittest)
[X] Tests / results supplied as part of this PR

Reviewers


…ata in DTCM memory instead of OCRAM for improved performance
@@ -34,7 +34,6 @@ target_include_directories(mbed-mimxrt1060-evk

target_sources(mbed-mimxrt1060-evk
INTERFACE
fsl_phy.c
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixes compile error for MIMXRT1060_EVK, whoops

${JLINK_SELECT_ARG}
${JLINK_NOGUI_ARG}
-Device ${JLINK_CPU_NAME}
-Device \"${JLINK_CPU_NAME}\"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixes a bug where the loader selection arg to J-Link was missing quotes so it didn't work

# Escape quotes and ampersands
string(REPLACE "\"" """ ELEMENT "${ELEMENT}")
string(REPLACE "&" "&" ELEMENT "${ELEMENT}")
string(REPLACE "\"" """ ELEMENT "${ELEMENT}")
Copy link
Collaborator Author

@multiplemonomials multiplemonomials May 8, 2023

Choose a reason for hiding this comment

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

Moved this to fix a bug where quote characters would get turned into """, because it replaced the ampersand after escaping the quote X_X

@multiplemonomials
Copy link
Collaborator Author

@wwatson4506 this look OK?

@multiplemonomials
Copy link
Collaborator Author

MIMXRT1060_EVK can never pass the pin validation checks due to how the dev board is physically wired. So, merging despite CI failure.

@multiplemonomials multiplemonomials merged commit 04a76b3 into master May 11, 2023
@multiplemonomials multiplemonomials deleted the dev/mimxrt105x-data-in-dtcm branch May 11, 2023 20:04
@wwatson4506
Copy link

That is what I was seeing was the pin check failure.

@multiplemonomials
Copy link
Collaborator Author

yeah unfortunately, they wired the same physical pin to multiple pins on the Arduino header, which fails the CI job which validates all the Arduino pins are in compliance with a standard mapping

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.

4 participants