kFROM12M_to_LPUART0 does not exist in _clock_attach_id enum - MCXA176VLH

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

kFROM12M_to_LPUART0 does not exist in _clock_attach_id enum - MCXA176VLH

565 Views
LamK
Contributor III

Hello NXP team,

I'm currently evaluating the SDK (ver 26.03.00) for the MCXA176VLH microcontroller, and upon creating a project and building it, I ran into an error where it complained that it couldn't #define BOARD_DEBUG_UART_CLK_ATTACH because kFROM12_to_LPUART0 does not in the _clock_attach_id enum. Therefore, the BOARD_InitDebugConsole() function that used the #define failed to compile.
LamK_0-1778014651645.png

I've looked at the structure of the enum, and there are only 2 similar enum members that exist: kFRO12M_to_MAIN_CLK and kFRO12M_to_CLKOUT. Is there any other enum variable I can use instead, and can I comment out the function and not run into any issues down the line? I don't intend to use printf to determine the values of my variables, I'll just look at them during debugging instead.

Best Regards,

Lam

Labels (1)
0 Kudos
Reply
4 Replies

485 Views
Harry_Zhang
NXP Employee
NXP Employee

Hi @LamK 

I have tested it on my end.

It is a bug.

If you want to use the UART.

You can replace the kFROM12_to_LPUART0 to kFRO_LF_DIV_to_LPUART0.

Thanks for your information.

Hope this will help you.

BR

Harry

466 Views
LamK
Contributor III

Hi @Harry_Zhang,

I haven't made a PCB for it yet, I was just checking out the SDK. It does build when I use kFRO_LF_DIV_to_LPUART0 instead so I'll be sure to try it when I have the hardware on hand.

And I should bring up that it builds only if you directly define the BOARD_InitDebugConsole function directly in the board.h header instead of declaring it, because the linker for some reason couldn't link the function in the board.cpp file. I did check and see that the board.o did get compiled, but the linker somehow couldn't find it so that's probably another bug right there.

LamK_0-1778189571897.png

and I as said, the fix is just directly copy and paste the definition into the header along with other #include's found in the board.cpp. Hope this helps with the future versions of the SDK.

Best Regards,
Lam

0 Kudos
Reply

386 Views
Harry_Zhang
NXP Employee
NXP Employee

Hi @LamK 

Thanks for your information.

" if you directly define the BOARD_InitDebugConsole function directly in the board.h header instead of declaring it, because the linker for some reason couldn't link the function in the board.cpp file. I did check and see that the board.o did get compiled, but the linker somehow couldn't find it so that's probably another bug right there."

Can you share your project so that i can reproduce this issue?

BR

Harry

0 Kudos
Reply

286 Views
LamK
Contributor III

Hi @Harry_Zhang,

Every time I create a new project and hit build immediately just to test, I encounter the #define problem as I mentioned. Replacing kFROM12_to_LPUART0 with kFRO_LF_DIV_to_LPUART0 fixes that, but building it again yields another error that says "undefined reference to `BOARD_InitDebugConsole()"

LamK_0-1778653027070.png

The SDK I'm using is MCXA176 version 26.03 from SDK builder. I downloaded and then installed it in the IDE, and I then just created the projects with it.

And another thing is that upon creating a new project, I can't use the config tools to configure my pins and clocks because the .mex file is missing. I followed this post: https://community.nxp.com/t5/MCUXpresso-Config-Tools/Pins-tool-quot-Processor-is-not-supported-or-da..., and was able to produce a .mex file to configure my pins and clocks. Pretty sure it's not the cause of the problem but I'm just throwing this out there just in case.

There's nothing else to share about my project besides that. I'm just testing out the SDK before committing to the microcontroller.

Best Regards,

Lam Khuu

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2360670%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EkFROM12M_to_LPUART0%20does%20not%20exist%20in%20_clock_attach_id%20enum%20-%20MCXA176VLH%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2360670%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20NXP%20team%2C%3C%2FP%3E%3CP%3EI'm%20currently%20evaluating%20the%20SDK%20(ver%26nbsp%3B26.03.00)%20for%20the%20MCXA176VLH%20microcontroller%2C%20and%20upon%20creating%20a%20project%20and%20building%20it%2C%20I%20ran%20into%20an%20error%20where%20it%20complained%20that%20%3CSPAN%3Eit%20couldn't%20%23define%20BOARD_DEBUG_UART_CLK_ATTACH%20because%20kFROM12_to_LPUART0%20does%20not%20in%20the%20_clock_attach_id%20enum.%20Therefore%2C%20the%26nbsp%3BBOARD_InitDebugConsole()%20function%20that%20used%20the%20%23define%20failed%20to%20compile.%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22LamK_0-1778014651645.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22LamK_0-1778014651645.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22LamK_0-1778014651645.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22LamK_0-1778014651645.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22LamK_0-1778014651645.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22LamK_0-1778014651645.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F384382i80AF2B51D7EC30F3%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22LamK_0-1778014651645.png%22%20alt%3D%22LamK_0-1778014651645.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EI've%20looked%20at%20the%20structure%20of%20the%20enum%2C%20and%20there%20are%20only%202%20similar%20enum%20members%20that%20exist%3A%26nbsp%3B%3CSPAN%3EkFRO12M_to_MAIN_CLK%20and%26nbsp%3BkFRO12M_to_CLKOUT.%26nbsp%3B%3C%2FSPAN%3EIs%20there%20any%20other%20enum%20variable%20I%20can%20use%20instead%2C%20and%20can%20I%20comment%20out%20the%20function%20and%20not%20run%20into%20any%20issues%20down%20the%20line%3F%20I%20don't%20intend%20to%20use%20printf%20to%20determine%20the%20values%20of%20my%20variables%2C%20I'll%20just%20look%20at%20them%20during%20debugging%20instead.%3C%2FP%3E%3CP%3EBest%20Regards%2C%3C%2FP%3E%3CP%3ELam%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2360670%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3EMCXA%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2362112%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20kFROM12M_to_LPUART0%20does%20not%20exist%20in%20_clock_attach_id%20enum%20-%20MCXA176VLH%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2362112%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F229957%22%20target%3D%22_blank%22%3E%40Harry_Zhang%3C%2FA%3E%2C%3CBR%20%2F%3E%3CBR%20%2F%3EI%20haven't%20made%20a%20PCB%20for%20it%20yet%2C%20I%20was%20just%20checking%20out%20the%20SDK.%20It%20does%20build%20when%20I%20use%20kFRO_LF_DIV_to_LPUART0%20instead%20so%20I'll%20be%20sure%20to%20try%20it%20when%20I%20have%20the%20hardware%20on%20hand.%3CBR%20%2F%3E%3CBR%20%2F%3EAnd%20I%20should%20bring%20up%20that%20it%20builds%20only%20if%20you%20directly%20define%20the%26nbsp%3B%3CSPAN%3EBOARD_InitDebugConsole%20function%20directly%20in%20the%20board.h%20header%20instead%20of%20declaring%20it%2C%20because%20the%20linker%20for%20some%20reason%20couldn't%20link%20the%20function%20in%20the%20board.cpp%20file.%20I%20did%20check%20and%20see%20that%20the%20board.o%20did%20get%20compiled%2C%20but%20the%20linker%20somehow%20couldn't%20find%20it%20so%20that's%20probably%20another%20bug%20right%20there.%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22LamK_0-1778189571897.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22LamK_0-1778189571897.png%22%20style%3D%22width%3A%20397px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22LamK_0-1778189571897.png%22%20style%3D%22width%3A%20397px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22LamK_0-1778189571897.png%22%20style%3D%22width%3A%20397px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22LamK_0-1778189571897.png%22%20style%3D%22width%3A%20397px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F384700i2A4DA9445349D92D%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22LamK_0-1778189571897.png%22%20alt%3D%22LamK_0-1778189571897.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3Eand%20I%20as%20said%2C%20the%20fix%20is%20just%20directly%20copy%20and%20paste%20the%20definition%20into%20the%20header%20along%20with%20other%20%23include's%20found%20in%20the%20board.cpp.%20Hope%20this%20helps%20with%20the%20future%20versions%20of%20the%20SDK.%3C%2FP%3E%3CP%3E%3CSPAN%3EBest%20Regards%2C%3CBR%20%2F%3ELam%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2361679%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20kFROM12M_to_LPUART0%20does%20not%20exist%20in%20_clock_attach_id%20enum%20-%20MCXA176VLH%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2361679%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F245689%22%20target%3D%22_blank%22%3E%40LamK%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20have%20tested%20it%20on%20my%20end.%3C%2FP%3E%0A%3CP%3EIt%20is%20a%20bug.%3C%2FP%3E%0A%3CP%3EIf%20you%20want%20to%20use%20the%20UART.%3C%2FP%3E%0A%3CP%3EYou%20can%20replace%20the%26nbsp%3B%3CSPAN%3EkFROM12_to_LPUART0%20to%26nbsp%3BkFRO_LF_DIV_to_LPUART0.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EThanks%20for%20your%20information.%3C%2FP%3E%0A%3CP%3EHope%20this%20will%20help%20you.%3C%2FP%3E%0A%3CP%3EBR%3C%2FP%3E%0A%3CP%3EHarry%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2363322%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20kFROM12M_to_LPUART0%20does%20not%20exist%20in%20_clock_attach_id%20enum%20-%20MCXA176VLH%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2363322%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F245689%22%20target%3D%22_blank%22%3E%40LamK%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThanks%20for%20your%20information.%3C%2FP%3E%0A%3CP%3E%22%3CSPAN%3E%26nbsp%3Bif%20you%20directly%20define%20the%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3EBOARD_InitDebugConsole%20function%20directly%20in%20the%20board.h%20header%20instead%20of%20declaring%20it%2C%20because%20the%20linker%20for%20some%20reason%20couldn't%20link%20the%20function%20in%20the%20board.cpp%20file.%20I%20did%20check%20and%20see%20that%20the%20board.o%20did%20get%20compiled%2C%20but%20the%20linker%20somehow%20couldn't%20find%20it%20so%20that's%20probably%20another%20bug%20right%20there.%3C%2FSPAN%3E%22%3C%2FP%3E%0A%3CP%3ECan%20you%20share%20your%20project%20so%20that%20i%20can%20reproduce%20this%20issue%3F%3C%2FP%3E%0A%3CP%3EBR%3C%2FP%3E%0A%3CP%3EHarry%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2364556%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20kFROM12M_to_LPUART0%20does%20not%20exist%20in%20_clock_attach_id%20enum%20-%20MCXA176VLH%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2364556%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F229957%22%20target%3D%22_blank%22%3E%40Harry_Zhang%3C%2FA%3E%2C%3C%2FP%3E%3CP%3EEvery%20time%20I%20create%20a%20new%20project%20and%20hit%20build%20immediately%20just%20to%20test%2C%20I%20encounter%20the%20%23define%20problem%20as%20I%20mentioned.%26nbsp%3BReplacing%20kFROM12_to_LPUART0%20with%20kFRO_LF_DIV_to_LPUART0%20fixes%20that%2C%20but%20building%20it%20again%20yields%20another%20error%20that%20says%20%22%3CSPAN%3Eundefined%20reference%20to%20%60BOARD_InitDebugConsole()%22%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22LamK_0-1778653027070.png%22%20style%3D%22width%3A%20505px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22LamK_0-1778653027070.png%22%20style%3D%22width%3A%20505px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F385238i8C97176907F7217D%2Fimage-dimensions%2F505x413%3Fv%3Dv2%22%20width%3D%22505%22%20height%3D%22413%22%20role%3D%22button%22%20title%3D%22LamK_0-1778653027070.png%22%20alt%3D%22LamK_0-1778653027070.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EThe%20SDK%20I'm%20using%20is%20MCXA176%20version%2026.03%20from%20SDK%20builder.%20I%20downloaded%20and%20then%20installed%20it%20in%20the%20IDE%2C%20and%20I%20then%20just%20created%20the%20projects%20with%20it.%3C%2FP%3E%3CP%3EAnd%20another%20thing%20is%20that%20upon%20creating%20a%20new%20project%2C%20I%20can't%20use%20the%20config%20tools%20to%20configure%20my%20pins%20and%20clocks%20because%20the%20.mex%20file%20is%20missing.%20I%20followed%20this%20post%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FMCUXpresso-Config-Tools%2FPins-tool-quot-Processor-is-not-supported-or-data-for-the%2Fm-p%2F2359924%23M2036%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fcommunity.nxp.com%2Ft5%2FMCUXpresso-Config-Tools%2FPins-tool-quot-Processor-is-not-supported-or-data-for-the%2Fm-p%2F2359924%23M2036%3C%2FA%3E%2C%20and%20was%20able%20to%20produce%20a%20.mex%20file%20to%20configure%20my%20pins%20and%20clocks.%20Pretty%20sure%20it's%20not%20the%20cause%20of%20the%20problem%20but%20I'm%20just%20throwing%20this%20out%20there%20just%20in%20case.%3C%2FP%3E%3CP%3EThere's%20nothing%20else%20to%20share%20about%20my%20project%20besides%20that.%20I'm%20just%20testing%20out%20the%20SDK%20before%20committing%20to%20the%20microcontroller.%3C%2FP%3E%3CP%3EBest%20Regards%2C%3C%2FP%3E%3CP%3ELam%20Khuu%3C%2FP%3E%3C%2FLINGO-BODY%3E