cancel
Showing results for 
Search instead for 
Did you mean: 

How to enable drivers in kernel using STM32CubeIDE

pj_stm
Associate III

Is there any way to enable and disable drivers in the kernel from STM32CubeIDE?

 

For example to enable support for another LCD panel

 

If I use menuconfig to change configuration, make does not work anymore.

+ case "$command" in
+ exec make -j12 all
***
*** The source tree is not clean, please run 'make mrproper'
*** in /home/st-test/STM32CubeIDE/workspace_1.14.0/panel/CA7/linux-6.1.28/linux-6.1.28
***
make: *** [/home/st-test/STM32CubeIDE/workspace_1.14.0/panel/CA7/linux-6.1.28/linux-6.1.28/Makefile:658: outputmakefile] Error 1
"make -j12 all" terminated with exit code 2. Build might be incomplete.

 

        @if [ -f $(srctree)/.config -o \
                 -d $(srctree)/include/config -o \
                 -d $(srctree)/arch/$(SRCARCH)/include/generated ]; then \
                echo >&2 "***"; \
                echo >&2 "*** The source tree is not clean, please run 'make$(if $(findstring command line, $(origin ARCH)), ARCH=$(ARCH)) mrproper'"; \
                echo >&2 "*** in $(abs_srctree)";\
                echo >&2 "***"; \
                false; \
        fi
5 REPLIES 5
Erwan SZYMANSKI
ST Employee

Hello @pj_stm ,
It is highly possible that you tried different compilations with sourcing the SDK and another without sourcing it.
Please source your SDK properly, then clean your Kernel tree as asked by the compiler with make mrproper command. 

Kind regards,
Erwan.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Thank you very much.

make mrproper does not help.

How can I change kernel options from STMcubeIDE?

 

Kind regards

Piotr

Hello @pj_stm ,
You cannot access the menuconfig through CubeIDE like you would like, and I think that this is not a good way to process. If you cannot run your make menuconfig command, it means that you have some troubles somewhere.

CubeMX is supposed to generate you device trees only, it should not produce a such error.

I advice you to restart the different steps from the wiki with the default release first, and adapt with your configuration after.

Wiki Developer Package : https://wiki.st.com/stm32mpu/wiki/STM32MP1_Developer_Package

Kind regards,
Erwan.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Thank you.

Is there any way of changing it and still be able to use built in build options.

 

pj_stm_0-1704904356073.png

I use the the `environment-setup-cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi` script to set the environment to run menuconfig. I was hoping that it will generate the config suitable for STM32CubeIDE to build the kernel.

What I am doing wrong?

 

Kind regards

 

Piotr Jankowski

@pj_stm ,
Please check out the README file of Linux kernel to respect the different steps properly (this README is referenced in the wiki article I mentioned above) : https://github.com/STMicroelectronics/meta-st-stm32mp/blob/mickledore/recipes-kernel/linux/linux-stm32mp/README.HOW_TO.txt

When you have sourced your environment, you then need to apply a defconfig first given by ST for our platforms, then you can modify the default config and compile kernel and so on. 

Kind regards,
Erwan.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.