Overlay file can't worked in frdm_mcxw72 board I tried to run the adc_dt code sample in frdm_mcxw72 board, but it can't be build successfully even i already added the overlay file in the device tree folder and modified the board name in Cmakelist file. it always prompt error: #error "No suitable devicetree overlay specified" during building . can you help me find the cause, thanks in advance! Re: Overlay file can't worked in frdm_mcxw72 board Hello RomanVR, i put the the overlay file in the position. but it still can't work. you can find more information about my workbench in below snapshot. i used the zephyr version is V4.4.0. any finding please me know. Best regards! Re: Overlay file can't worked in frdm_mcxw72 board Hello @anliu114036, hope you are doing well.
Would you please share which Zephyr version are you working on? Also, please clarify if you are using MCUXpresso for VS Code extension to build the example.
In the meantime, to ease the process, make sure that your overlay is created inside the "boards" folder that should be inside of your project files; make sure that your overlay file is named as "frdm_mcxw72.overlay", following these two steps will make Zephyr fetch your overlay in build process without the need of setting its path explicitly in CMake.
If you are using our MCUXpresso for VS Code extension, your project view should look as the image below:
Please let me know if this helps. Re: Overlay file can't worked in frdm_mcxw72 board Hi @anliu114036,
You mentioned in your first post that you "modified the board name in Cmakelist file", would you please clarify what did you do in order to "modify the board name"?
Also, would you please share which steps did you follow in order to try to build the example? Re: Overlay file can't worked in frdm_mcxw72 board Hi RomanVR Below snapshot shows the original cmakefile i modified the board name from "eval_cn0391_ardz" to "frdm_mcxw72". Below is my steps 1. Load the adc_dt project 2. build the project, it failed 3. change the board name in the cmakefile, then build again, it still failed Re: Overlay file can't worked in frdm_mcxw72 board Hello @anliu114036,
Please do not change that parameter as it is used externally for a third-party and is not related to the FRDM build process. Additionally, would you please share your full terminal output log? This will allow me to see if your overlay is being fetched by the build process properly.
In the meantime, I'd suggest to re-import the project for the FRDM-MCXW72, once imported create the overlay file with the contents shared below, name the file to "frdm_mcxw72.overlay" and build the project. Re: Overlay file can't worked in frdm_mcxw72 board Hello @anliu114036,
Thank you for sharing your build logs, the build system is not fetching the overlay for the board, which in the newly imported example is not created by default, you need to create it.
In order to create the overlay, I'd recommend opening your project folder in the Explorer tab of Visual Studio Code, and create the file inside the /boards folder and add the following settings which I forgot to attach in my previous response:
#include
#include
/ {
zephyr,user {
io-channels = <&adc0 0>;
};
};
&adc0 {
#address-cells = <1>;
#size-cells = <0>;
status="okay";
channel@0 {
reg = <0>;
zephyr,gain = "ADC_GAIN_1";
zephyr,reference = "ADC_REF_EXTERNAL1";
zephyr,acquisition-time = ;
zephyr,resolution = <12>;
zephyr,vref-mv = <1800>;
/* channel 2 signal 6A */
zephyr,input-positive = ;
};
};
&pinctrl{
pinmux_lpadc0: pinmux_lpadc0 {
group0 {
pinmux = ;
};
};
};
Once created the overlay, please make sure it is visible in your boards folder and that is being fetched by the build system, which should look like the following image:
Please let me know if this procedure works for you. Re: Overlay file can't worked in frdm_mcxw72 board Hi RomanVR, you can find the whole terminal log file in the attachment. i re-imported the project for the FRDM-MCXW72, but can't find the overlay file for the MCXW72 in the project folder if do nothing. but there is the FRDM-MCXW71 overlay file. Best regards! Re: Overlay file can't worked in frdm_mcxw72 board Hi RomanVR, It works, thanks for your help! i found the reason that i need delete the previous build folder after the overlayfile added. then rebuild it, the whole building process is ok now .
查看全文