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

Add support for the NXP FRDM-K32L2A4S eval board. #1858

Merged
merged 6 commits into from
Mar 18, 2023

Conversation

bpaddock
Copy link

Add support NXP FRDM-K32L2A4S evaluation board.

The K32L2A4S uses a different core, and in some cases different I/O configuration registers, than the existing FRDM-K32L2B3 evaluation board port.

Copy link
Owner

@hathach hathach 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 for your PR. The K32L2AXX is similar to K32L2BXX, that we could merge them together as K32L2 family. If you are not familiar, just simply use the K32L2BXX for this new board. I will make a rename later on.

PS: BSP need to use the git submodule nxp mcux as mentioned in the review of #1854

@bpaddock
Copy link
Author

bpaddock commented Jan 17, 2023

I will copy frdm_k32l2b to frdm_k32l2a and start from there using the submodules. For you to rename later.

I know in board.mk I can use $(BOARD) and I could CFG_TUSB_MCU in the C code to tell which MCU is being used by adding 1202 for the K32L2A. That would require changing the various CFG_TUSB_MCU == K32Lxxxs everyplace as I did in this current pull request. I'm not feeling that is the direction you want to go.

What I'm unclear on is how to use this to build either target from a single directory. Can you point me to a device family example please? I did not see such an example in the porting docs.

Copy link
Owner

@hathach hathach 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 for your PR, I spotted a couple of issue. Though I have pulled and make more changes, so no worries

#if CFG_TUH_ENABLED && ( \
( CFG_TUSB_MCU == OPT_MCU_MKL25ZXX ) || ( CFG_TUSB_MCU == OPT_MCU_K32L2BXX ) \
)
#if CFG_TUD_ENABLED && \
Copy link
Owner

Choose a reason for hiding this comment

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

typo, must be CFG_TUH_ENABLED

@@ -47,7 +47,7 @@

#elif CFG_TUSB_MCU == OPT_MCU_LPC51UXX || CFG_TUSB_MCU == OPT_MCU_LPC54XXX || \
CFG_TUSB_MCU == OPT_MCU_LPC55XX || CFG_TUSB_MCU == OPT_MCU_MKL25ZXX || \
CFG_TUSB_MCU == OPT_MCU_K32L2BXX
CFG_TUSB_MCU == OPT_MCU_K32L2AXX || OPT_MCU_K32L2BXX
Copy link
Owner

Choose a reason for hiding this comment

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

incorrect check

endif

SDK_DIR = hw/mcu/nxp/mcux-sdk
MCU_DIR = $(SDK_DIR)/devices/K32L2A4S
Copy link
Owner

Choose a reason for hiding this comment

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

the mcu on this board should be K32L2A41A though

Copy link
Owner

@hathach hathach left a comment

Choose a reason for hiding this comment

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

perfect now, thank you

@hathach hathach merged commit 779149e into hathach:master Mar 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants