2022-10-11 10:26 AM
Hello,
I have a STM32MP157F-DK2 and I'm planning to develop some python applications to run on the A7 processor. I have some questions related to python development for this platform, as I have not found too much documentations regarding this:
If you have any examples or tutorials for python development for the STM32 they are very welcome. The "hello world" examples that I have found are for C applications cross-compiled with the SDK.
Thanks for your support,
Walter.
Solved! Go to Solution.
2022-10-12 05:57 AM
Hi @WGall.1
In complement of excellent Tesla DeLorean and PatrickF's replies, I add some additive infos. If you want to know if a python module is available, just type:
# apt-get update
# apt-cache policy python3-<mymodule>
Many python modules are already available by default. If not, as mentioned by PatrickF, you can use the pip method if and only if the python module you want to install does not need any compilation steps.
If the python module you want to install is not available by default and required compilation steps, you need to build it and include it into your image or build it as a package and provide it in your own distribution. Feel free to ask for support to the Community to help you in developing recipes for these python modules or publish them here.
Best regards,
--JM
2022-10-11 11:12 AM
Embedded Linux, you should be able to determine what packages get built into file system images, there's no reason you can't build C, C++ or Python code directly on the target, the packages are often skipped as they consume space on the eMMC, NAND or SDCards, and run like they're on a slower PC
2022-10-12 05:34 AM
Hi @WGall.1
you could directly use Starter Package with STM32MP157F-DK2. Python3 is present by default.
Although not really recommended (as it might not work for some packages requiring on-target compilation), you could install pip to allow installing additional python packages.
apt-get update
apt-get install python3 python3-pip
python3 -m pip install -U pip
Regards.
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'
2022-10-12 05:57 AM
Hi @WGall.1
In complement of excellent Tesla DeLorean and PatrickF's replies, I add some additive infos. If you want to know if a python module is available, just type:
# apt-get update
# apt-cache policy python3-<mymodule>
Many python modules are already available by default. If not, as mentioned by PatrickF, you can use the pip method if and only if the python module you want to install does not need any compilation steps.
If the python module you want to install is not available by default and required compilation steps, you need to build it and include it into your image or build it as a package and provide it in your own distribution. Feel free to ask for support to the Community to help you in developing recipes for these python modules or publish them here.
Best regards,
--JM
2022-10-20 03:03 AM
Hello @PatrickF, @Jean-Marc B
Thanks for the feedback.
I will try with the proposed methods for packages installation.
Best Regards
Walter.