Skip to content

Added initial support for FRDM-MCXA156 and fixed up a crash with FRDM-MCXN947 #3103

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ehughes
Copy link
Contributor

@ehughes ehughes commented Apr 27, 2025

Note: this PR depends on #3100

I will be porting tinyuf2 to MCXA156 and N947 and need this work in place.

This is the 1st step before bringing in support for other MCX devices.

We had previous patched https://github.com/hathach/mcux-sdk.git' for MCX support as it was not pulically available

I updated get_deps to point to the mcux-sdk version 2.16.10 from NXP. I repointed the entry in the get_deps script to use NXP MCU repo. The existing current code couldn't build as the MCUXpresso SDK was old.

  • For now, I put a copy of fsl_spc.c in the drivers folder for the mcx family. None of the ports could build with the version in the mcux github sdk. The sdk on github has version 2.4.0. The SDK package that can be downloaded with the SDK generator uses 2.4.2. All of the clock_config routines use versions of the datastructure from 2.4.2. For now, keeping an updated copy in hw/bsp/mcx/drivers so we can build against the latest mcuxpresso sdk and enable MCXA156. I'll file an issue on the nxp github.

  • Cleaned up the MCX family.c a little bit. the MCXA/N these chips don't have SCT so I removed the neopixel code.

  • fixed a clock init issue w/ N947 that was causing it to crash when initializing the uart.

  • I tested the cmake and make scripts on the A153,A156 and N947 using the CDC/MSC sample. All worked OK.

  • Patched get_deps so it will do a fetch/check on a new folder. Some of the deps were failing on a fresh clone of tinyusb

  • Fixed lpc51,54 and lpc55 make/cmake files to build with mcuxpresso sdk 2.16.10 The folder structure for flexcomm/uart changed a little bit

  • lpc55s59 libpower_hardabi.a no longer is included in mcuxpressosdk, (fsl_power.c is replacement). remove of libpower_hardabi.a from the linker config. LPC55 still works as expected.

I will be porting tinyuf2 to MCXA156 and N947 and need this work in place.

This is the 1st step before bringing in support for other MCX devices.

We had previous patched https://github.com/hathach/mcux-sdk.git'  for MCX support as it was not pulically available

I updated get_deps to point to the mcux-sdk version 2.16.10 from NXP. I repointed the entry in the get_deps script to use NXP MCU repo.  The existing current code couldn't build as the MCUXpresso SDK was old.

- For now, I put a copy of fsl_spc.c in the drivers folder for the mcx family.  None of the ports could build with the version in the mcux github sdk.  The sdk on github has version 2.4.0.   The SDK package that can be downloaded with the SDK generator uses 2.4.2.  All of the clock_config routines use versions of the datastructure from 2.4.2.  For now, keeping an updated copy in hw/bsp/mcx/drivers so we can build against the latest mcuxpresso sdk and enable MCXA156.  I'll file an issue on the nxp github.

- Cleaned up the MCX family.c a little bit.  the MCXA/N these chips don't have SCT so I removed the neopixel code.

- fixed a clock init issue w/ N947 that was causing it to crash when initializing the uart.

- I tested the cmake and make scripts on the A153,A156 and N947 using the CDC/MSC sample.  All worked OK.

- Patched get_deps so it will do a fetch/check on a new folder.  Some of the deps were failing on a fresh clone of tinyusb

- Fixed  lpc51,54 and lpc55 make/cmake files to build with mcuxpresso sdk 2.16.10  The folder structure for flexcomm/uart changed a little bit

- lpc55s59 libpower_hardabi.a no longer is included in mcuxpressosdk, (fsl_power.c is replacement). remove of libpower_hardabi.a from the linker config.  LPC55 still works as expected.

- Using tinyuf2 get deps
ehughes added 2 commits April 28, 2025 07:09
- added mca156 the list in boards.rst.
-  Fixup to family.cmake for mcxa156 to pass ci
@ehughes
Copy link
Contributor Author

ehughes commented Apr 28, 2025

@hathach

FYI: This is the PR for the NXP MCX work. It points to the upstream repo (and I added another board). It is the 1st step before addin more mcx support

The codespell keeps failing on the github ci. There is a driver in the upstream nxp repo with some spelling mistakes. Since the ci does a clone of that repo I am not sure how to bypass it. The .codespellrc say to ignore the hw/mcu folder but it doesn't look like the ci system is following it.

Lastly, there is a ci hil failure for nrf52. I assume this is something I can't fix (this PR didn't do anything with nrf52)

@hathach
Copy link
Owner

hathach commented Apr 29, 2025

@hathach

FYI: This is the PR for the NXP MCX work. It points to the upstream repo (and I added another board). It is the 1st step before addin more mcx support

The codespell keeps failing on the github ci. There is a driver in the upstream nxp repo with some spelling mistakes. Since the ci does a clone of that repo I am not sure how to bypass it. The .codespellrc say to ignore the hw/mcu folder but it doesn't look like the ci system is following it.

codespell faailed with bsp/mcx/drivers/spc which are added to repo, not the one in the hw/mcu. You can install pre-commit locally and try to run it to fix the issue. I push the fix

Lastly, there is a ci hil failure for nrf52. I assume this is something I can't fix (this PR didn't do anything with nrf52)

hil sometimes is a bit unreliable and server needs reboot. Probably due to usb bus issue

@ehughes
Copy link
Contributor Author

ehughes commented Apr 30, 2025

@hathach Is there anything needed to merge this PR? looks like CI is good

@HiFiPhile
Copy link
Collaborator

@hathach is in vacation, I think he will return in about one week:)

@ehughes
Copy link
Contributor Author

ehughes commented May 14, 2025

@hathach could we get this merged?

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