cancel
Showing results for 
Search instead for 
Did you mean: 

Cross compiling a python program

softcity002
Associate

Hello everyone,

I'm new to the STM32 and Linux environment and have a question.

I am using the STM32MP157d-dk1 and have been following the getting started guide

(see : https://wiki.st.com/stm32mpu/wiki/Getting_started/STM32MP1_boards/STM32MP157x-DK2/Develop_on_Arm%C2%AE_Cortex%C2%AE-A7/Create_a_simple_hello-world_application ) and how to cross-compile with Developer-Package ( see : https://wiki.st.com/stm32mpu/wiki/How_to_cross-compile_with_the_Developer_Package#Adding_a_.22hello_world.22_user_space_example  ) and it all works fine. But I'd like to know how to do the same thing but using a .py file instead of .c file from my host machine as i want to mainly use python for my development. 

Thanks for your assistance.

Regards.

1 ACCEPTED SOLUTION

Accepted Solutions

@Ozone wrote:

Not sure if something like 'pip' exists for the MP1s.


Looks like it should:

Solved: Control STM32MP157D-DK1 GPIO with python - STMicroelectronics Community

 

Some "getting started" tips for STM32MP157A-DK1 here:

Solved: Re: STM32MP157A-DK1 can run LINUX and Python code? - STMicroelectronics Community

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

View solution in original post

4 REPLIES 4

Python is an interpreted language - you don't need to compile .py files.

 

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
Ozone
Principal

As Andrew said, Python is an interpreted langauge.

So, you question morphs into - what Python libraries do you need, and if they are available / supported in ST's Yocto package.
Not sure if something like 'pip' exists for the MP1s.


@Ozone wrote:

Not sure if something like 'pip' exists for the MP1s.


Looks like it should:

Solved: Control STM32MP157D-DK1 GPIO with python - STMicroelectronics Community

 

Some "getting started" tips for STM32MP157A-DK1 here:

Solved: Re: STM32MP157A-DK1 can run LINUX and Python code? - STMicroelectronics Community

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

thanks i will check it out