cancel
Showing results for 
Search instead for 
Did you mean: 

which gcc version for openstlinux STM32MP1 native compilation?

HAlzo
Senior

I tried to add development tools to my openSTLinux using apt-get install, but couldn't find gcc.
so I tried to create a distribution including gcc, make, cmake and git.
When I search for available recipes for gcc using

find ../layers/ -iname "*gcc*.bb"
I get the following list of gcc tools
../layers/meta-st/meta-st-stm32mp/recipes-devtools/gcc-arm-none-eabi/gcc-arm-none-eabi-native_11.bb
../layers/meta-st/meta-st-stm32mp/recipes-devtools/gcc-arm-none-eabi/nativesdk-gcc-arm-none-eabi_11.bb
../layers/openembedded-core/meta/recipes-devtools/gcc/gcc-cross-canadian_12.2.bb
../layers/openembedded-core/meta/recipes-devtools/gcc/libgcc-initial_12.2.bb
../layers/openembedded-core/meta/recipes-devtools/gcc/gcc-cross_12.2.bb
../layers/openembedded-core/meta/recipes-devtools/gcc/gcc-crosssdk_12.2.bb
../layers/openembedded-core/meta/recipes-devtools/gcc/gcc-sanitizers_12.2.bb
../layers/openembedded-core/meta/recipes-devtools/gcc/gcc_12.2.bb
../layers/openembedded-core/meta/recipes-devtools/gcc/libgcc_12.2.bb
../layers/openembedded-core/meta/recipes-devtools/gcc/gcc-source_12.2.bb
../layers/openembedded-core/meta/recipes-devtools/gcc/gcc-runtime_12.2.bb

which one should I include in my distribution?

when I try to add  "gcc-arm-none-eabi-native" or "nativesdk-gcc-arm-none-eabi"  or "libgcc-initial" to the distribution by adding them to the  recipe st-image-weston.bb
using 
CORE_IMAGE_EXTRA_INSTALL += " gcc-arm-none-eabi-native nativesdk-gcc-arm-none-eabi libgcc-initial"
I get error
ERROR: Task do_populate_sdk in /.../Distribution-Package/layers/meta-st/meta-st-openstlinux/recipes-st/images/st-image-weston.bb rdepends upon non-existent task do_package_write_deb in .../Distribution-Package/layers/openembedded-core/meta/recipes-devtools/gcc/libgcc-initial_12.2.bb
and same error for other two recipes

even though I can find the stm-st-stm32mp layer when I rung bitbake-layers show-layers  as shown below
stm-st-stm32mp /.../Distribution-Package/layers/meta-st/meta-st-stm32mp 6
core /.../Distribution-Package/layers/openembedded-core/meta 5

Why I am getting this error and how to overcome it?

When I add other gcc recipes to the distribution image and flash it to board, I can't find gcc among installed apps on the board

How can I solve this problem?

3 REPLIES 3
Erwan SZYMANSKI
ST Employee

Hello @HAlzo ,
For which kind of use case do you need gcc deployed on board ? 
You already have the SDK provided with the Developer package to cross compile your userspace application, and deploy it on your target.

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.

my 1st scenario was to develop a distribution with all my required SW, but I am facing some problems as explained here Building custum librarz using btbake cause do_pack... - STMicroelectronics Community

so I am trying to build the application on board as a work around.

 

@HAlzo ,
OK let me check this new thread so. I really think that deploying gcc on the board is not a good solution. We avoid at maximum to build on board, for performance and convenience question.

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.