Skip to main content
Visitor II
December 18, 2023
Question

how to install python submodule on stm32mpu

  • December 18, 2023
  • 1 reply
  • 1692 views

Hi 

I used pip3 install python submodule.

The submodule inclued xxx.c files.

The install processing be use 'arm-ostl-linux-gnueabi-gcc' compiler tool, The processing be fail.

I can't find gcc-arm-aarch32-arm-none-linux-gnueabi tool for The STM32MPU157-DK2.

I find out tools are 'gcc-arm-aarch64-arm-none-linux-gnueabi', But it can't use on the STM32MPU157-DK2.

I use STM32-SDK provider comliler tools, it is don't working too. 

 

The other question, 

The other way, How to install python submodule in the linux kernel image?

    This topic has been closed for replies.

    1 reply

    ST Employee
    December 18, 2023

    Hello @NashHsu 

    The image installed on STM32MP boards doesn't contain any toolchain nor *-dev or *-src packages hence the errors you may face when trying to install python modules which need to be built on the board.

    To add the python module which requires a compilation, you need to create the corresponding recipes into your Yocto environment.

    To add a new recipe, please follow this wiki page: https://wiki.st.com/stm32mpu/wiki/How_to_add_a_customer_application

    To build the recipe for your Python module, you can use the pipoe utility (https://pypi.org/project/pipoe/) from your host PC:

    $> pip3 install pipoe
    $> pipoe -p <your python module> --python python3

    And then just copy the generated .bb file to your layer.

    For your next question, I don't have any idea. Please open a new thread for this specific item so the community will help you.

    Best regards,

    --JM

    In order to give better visibility on the answered topics, please click on 'Select as Best' on the reply which solved your issue or answered your question. See also 'Best Answers'

    NashHsuAuthor
    Visitor II
    December 20, 2023

    Okay. 

    Can I install the PYTHON subpackage on an operating system as an image?

    ST Employee
    December 20, 2023

    Hi @NashHsu 

    Yes, you can install a python sub-package into your image. Once you have written the recipe for your python module, please refer to this wiki page to add it to your image: https://wiki.st.com/stm32mpu/wiki/How_to_add_a_customer_application#Quickly_add_the_recipe_to_an_image 

    Best regards,

    --JM

    In order to give better visibility on the answered topics, please click on 'Select as Best' on the reply which solved your issue or answered your question. See also 'Best Answers'