Skip to main content
Senior II
October 7, 2024
Solved

qt programing and stm32mp157d-dk1

  • October 7, 2024
  • 15 replies
  • 6043 views

hi

i am using stm32mp157d-dk1 and i have downloaded qt creator and i have created a simple hello world window now how to display it in the stm32mp157d-dk1?

 

how to set up cross compilation in order to deploy Qt projects directly from a host Linux machine to the embedded target using qtcreator.

Best answer by Sharan

i hope i have got the steps right and for any of the steps bellow does it require internet                                                 1.cd <working directory path>/Distribution-Package

2.repo init -u https://github.com/STMicroelectronics/oe-manifest.git -b refs/tags/openstlinux-6.1-yocto-mickledore-mpu-v24.06.26

3.repo sync

4. DISTRO=openstlinux-weston MACHINE=stm32mp15-disco source layers/meta-st/scripts/envsetup.sh

5.bitbake st-image-weston

6.bitbake st-image-weston -c populate_sdk

7. cd <Distribution Package installation directory>
8.git clone -b v1.0.0 https://github.com/STMicroelectronics/meta-st-x-linux-qt.git layers/meta-st/meta-st-x-linux-qt

9. git clone -b scarthgap https://github.com/meta-qt5/meta-qt5.git layers/meta-qt5

10. source layers/meta-st/scripts/envsetup.sh

11.bitbake-layers add-layer ../layers/meta-qt5 ../layers/meta-st/meta-st-x-linux-qt

12.bitbake st-image-qt

13.bitbake st-image-qt -c populate_sdk

14.execute "xxx.sh" script available in: build-openstlinuxweston-stm32mp15-disco/tmp-glibc/deploy/sdk

15.setup qt

15 replies

PPAGE.13
ST Employee
October 7, 2024
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.
SharanAuthor
Senior II
October 7, 2024

i was downloading distribution package ,while using this  command "repo init -u https://github.com/STMicroelectronics/oe-manifest.git -b refs/tags/openstlinux-6.1-yocto-mickledore-mpu-v24.06.26" i am getting error as bellow

emertxe@ubuntu:~/STM32MPU/Distribution-Package$ repo init -u https://github.com/STMicroelectronics/oe-manifest.git -b refs/tags/openstlinux-6.1-yocto-mickledore-mpu-v24.06.26


File "/home/emertxe/STM32MPU/Distribution-Package/.repo/repo/main.py", line 95
)
^
SyntaxError: invalid syntax

 

PPAGE.13
ST Employee
October 8, 2024

Hello @Sharan ,

I guess this is a repo tool issue, please have a look at : https://wiki.st.com/stm32mpu/wiki/PC_prerequisites.

(note: remove ".repo" directory if you do a new trail)

BR,

Philippe.

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.
SharanAuthor
Senior II
October 8, 2024

yes i was able to solve the repo issue by changing the shebang line but now  bitbake st-image-weston requires  python 3.8.0 what to do

SharanAuthor
Senior II
October 8, 2024

you had mentioned "If you get the SDK with Developper Package and X-LINUX-Qt SDK add-on, the installation automatically configures Qt creator with the MP1 kit." but for X-LINUX-QT is for stm32mp25x lines can u use that add on for stm32mp15x lines?

 

 

PPAGE.13
ST Employee
October 8, 2024

Hello @Sharan

X-LINUX-Qt will officially supports MP1x series in a few weeks.

But with the current delivery you can compile Distribution Package for "stm32mp15-disco" MACHINE.

Then when you run application on target, please use EGLFS configuration. In Wayland configuration you might face display synchronization we have fixed in the next coming delivery.

Philippe.

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.
SharanAuthor
Senior II
October 9, 2024

https://barenakedembedded.com/how-to-set-up-stm32mp1-with-qt/                 

using this can i set up my stm with qt?

PPAGE.13
ST Employee
October 9, 2024

Hello @Sharan ,

no, please use official and updated documentation:

https://wiki.st.com/stm32mpu/wiki/X-LINUX-QT_Expansion_Package

Philippe.

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.
SharanAuthor
Senior II
October 10, 2024

i am getting bitbake error please help me

 

 

 

NOTE: Fetching uninative binary shim http://downloads.yoctoproject.org/releases/uninative/4.3/x86_64-nativesdk-libc-4.3.tar.xz;sha256sum=1c35f09a75c4096749bbe1e009df4e3968cde151424062cf4aa3ed89db22b030 (will check PREMIRRORS first)
WARNING: Your host glibc version (2.39) is newer than that in uninative (2.38). Disabling uninative so that sstate is not corrupted.
Initialising tasks: 100% |###############################################################################################################################################| Time: 0:00:11
Sstate summary: Wanted 3246 Local 0 Mirrors 0 Missed 3246 Current 0 (0% match, 0% complete)
NOTE: Executing Tasks
ERROR: PermissionError: [Errno 1] Operation not permitted

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
 File "/home/sharan/STM32MPU_workspace/STM32MPU-Ecosystem-v5.1.0/Distribution-Package/layers/openembedded-core/bitbake/bin/bitbake-worker", line 275, in child
 bb.utils.disable_network(uid, gid)
 File "/home/sharan/STM32MPU_workspace/STM32MPU-Ecosystem-v5.1.0/Distribution-Package/layers/openembedded-core/bitbake/lib/bb/utils.py", line 1693, in disable_network
 with open("/proc/self/uid_map", "w") as f:
PermissionError: [Errno 1] Operation not permitted

ERROR: Task (/home/sharan/STM32MPU_workspace/STM32MPU-Ecosystem-v5.1.0/Distribution-Package/layers/openembedded-core/meta/recipes-devtools/gcc/gcc-source_12.3.bb:do_rm_work) failed with exit code '1'
ERROR: PermissionError: [Errno 1] Operation not permitted

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
 File "/home/sharan/STM32MPU_workspace/STM32MPU-Ecosystem-v5.1.0/Distribution-Package/layers/openembedded-core/bitbake/bin/bitbake-worker", line 275, in child
 bb.utils.disable_network(uid, gid)
 File "/home/sharan/STM32MPU_workspace/STM32MPU-Ecosystem-v5.1.0/Distribution-Package/layers/openembedded-core/bitbake/lib/bb/utils.py", line 1693, in disable_network
 with open("/proc/self/uid_map", "w") as f:
PermissionError: [Errno 1] Operation not permitted

ERROR: Task (/home/sharan/STM32MPU_workspace/STM32MPU-Ecosystem-v5.1.0/Distribution-Package/layers/meta-st/meta-st-stm32mp/recipes-kernel/linux/linux-stm32mp_6.1.bb:do_rm_work) failed with exit code '1'
NOTE: Tasks Summary: Attempted 6 tasks of which 0 didn't need to be rerun and 2 failed.
NOTE: Writing buildhistory
NOTE: Writing buildhistory took: 3 seconds

Summary: 2 tasks failed:
 /home/sharan/STM32MPU_workspace/STM32MPU-Ecosystem-v5.1.0/Distribution-Package/layers/openembedded-core/meta/recipes-devtools/gcc/gcc-source_12.3.bb:do_rm_work
 /home/sharan/STM32MPU_workspace/STM32MPU-Ecosystem-v5.1.0/Distribution-Package/layers/meta-st/meta-st-stm32mp/recipes-kernel/linux/linux-stm32mp_6.1.bb:do_rm_work
Summary: There was 1 WARNING message.
Summary: There were 2 ERROR messages, returning a non-zero exit code.
PPAGE.13
ST Employee
October 10, 2024

Hello @Sharan ,

sorry I have never seen such error. My first guess would be an issue with your PC installation setup.

Please double check it: https://wiki.st.com/stm32mpu/wiki/PC_prerequisites

Philippe.

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.
SharanAuthor
Senior II
October 10, 2024

i am using virtual box and latest Ubuntu 24 LTS

PPAGE.13
ST Employee
October 10, 2024

Noboby on our side has tried with an Ubuntu 24, we use 20.04 or 22.04.

I cannot guarantee the support.

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.
SharanAuthor
Senior II
October 10, 2024

ok i will download 22.04 and I hope X-linux-qt expansion Package can be used to set up my qt creator for stm32mp157d-dk1.

 

SharanAuthor
Senior II
October 11, 2024

DISTRO=openstlinux-weston MACHINE=<machine> source layers/meta-st/scripts/envsetup.sh

in the place of machine do i have to mention the exact name of the board i am using (stm32mp157d-dk1)

PPAGE.13
ST Employee
October 11, 2024

For stm32mp157d-dk1, please use: MACHINE=stm32mp15-disco

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.
SharanAuthor
Senior II
October 11, 2024

i used MACHINE=stm32mp1 instead of MACHINE=stm32mp15-disco is it fine

SharanAuthor
Senior II
October 13, 2024

i have installed the distribution package and followed the bellow steps

and what do do now to set up qt creator?

6.1.3.2. Install X-LINUX-QT Distribution Package

To install the X-LINUX-QT Distribution Package

  • Clone the meta-st-x-linux-qt git repository
 cd <Distribution Package installation directory>
 git clone -b v1.0.0 https://github.com/STMicroelectronics/meta-st-x-linux-qt.git layers/meta-st/meta-st-x-linux-qt
  • Clone the meta-qt5 git repository
 git clone -b scarthgap https://github.com/meta-qt5/meta-qt5.git layers/meta-qt5
  • For a new environment

Source the build environment with the correct board and layers:

 DISTRO=openstlinux-weston MACHINE=stm32mp2 BSP_DEPENDENCY="layers/meta-qt5 layers/meta-st/meta-st-x-linux-qt" source layers/meta-st/scripts/envsetup.sh
  • For an already installed environment

Add the layers to the Yocto environment:

 cd <Distribution Package installation directory>
 source layers/meta-st/scripts/envsetup.sh
 bitbake-layers add-layer ../layers/meta-qt5 ../layers/meta-st/meta-st-x-linux-qt

and 

SharanAuthor
Senior II
October 14, 2024

I went with developer package as i was not able to do the distribution package

so the steps i followed for developer package was

i downloaded the MP1-DEV-x86 from st website

For x86_64 host architecture i Uncompressed the tarball file to get the SDK installation script. and Ran the SDK installation script. 

for x-linux-qt developer package i downloded the below file(but my board is stm32mp157d-dk1)

Sharan_0-1728889673344.png

i followed these steps

Sharan_1-1728889819073.png

 

 

in the terminal i download qt creator using sudo apt install qtcreator and it installed  (qt 5.15.13) and u had said Qt Creator will be configured automatically and you will get your MPU kit all set in Qt creator. but i cant find anything other than Qt 5.15.13(system)

 

Screenshot from 2024-10-14 12-42-44.png

 

 


Screenshot from 2024-10-14 11-43-45.png

PPAGE.13
ST Employee
October 14, 2024

The full MP1 X-LINUX-Qt support will be available in the coming weeks.

Distribution Package allows anyway user to compile with Qt libraries and run Qt application on MP1.

But for Qt creator MP1 kit configuration, you have to do it manually.  Please refer to that post:

https://community.st.com/t5/stm32-mpus-embedded-software-and/qt-creater-setup-for-stm32mp1/m-p/706440

 

For MP2, the SDK-add on configures Qt creator kit automatically, but for MP1, the SDK-Addon is not yet delivered. Sorry of the inconvinience. It will be release soon.

Philippe.

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.
SharanAuthor
Senior II
October 15, 2024

can someone please verify these steps please check the steps  and correct me if i am wrong                                                                    

steps to download distribution package

1.cd <working directory path>/Distribution-Package

2.repo init -u https://github.com/STMicroelectronics/oe-manifest.git -b refs/tags/openstlinux-6.1-yocto-mickledore-mpu-v24.06.26

3.repo sync

4. DISTRO=openstlinux-weston MACHINE=<machine> source layers/meta-st/scripts/envsetup.s

5.bitbake st-image-weston

Install X-LINUX-QT Distribution Package

6. cd <Distribution Package installation directory>
7.git clone -b v1.0.0 https://github.com/STMicroelectronics/meta-st-x-linux-qt.git layers/meta-st/meta-st-x-linux-qt

8. git clone -b scarthgap https://github.com/meta-qt5/meta-qt5.git layers/meta-qt5

9. DISTRO=openstlinux-weston MACHINE=stm32mp2 BSP_DEPENDENCY="layers/meta-qt5 layers/meta-st/meta-st-x-linux-qt" source layers/meta-st/scripts/envsetup.sh

10.bitbake st-image-qt

11.bitbake st-image-qt -c populate_sdk

12.sdk generation refering to this doc https://wiki.st.com/stm32mpu/wiki/How_to_create_an_SDK_for_OpenSTLinux_distribution and using this command

bitbake -c populate_sdk st-image-weston

PPAGE.13
ST Employee
October 15, 2024

Hi Sharan,

  • "For an already installed environment", you have to add new layers by a "bitbale-layer add-layer" command
  • For mp15 DK board, use MACHINE=stm32mp15-disco. This will be simpler.

So you should get these command sequence

4. DISTRO=openstlinux-weston MACHINE=stm32mp15-disco source layers/meta-st/scripts/envsetup.sh

7. git clone -b v1.0.0 https://github.com/STMicroelectronics/meta-st-x-linux-qt.git layers/meta-st/meta-st-x-linux-qt

8. git clone -b scarthgap https://github.com/meta-qt5/meta-qt5.git layers/meta-qt5

9.

bitbake-layers add-layer ../layers/meta-qt5 ../layers/meta-st/meta-st-x-linux-qt

9. DISTRO=openstlinux-weston MACHINE=stm32mp2 BSP_DEPENDENCY="layers/meta-qt5 layers/meta-st/meta-st-x-linux-qt" source layers/meta-st/scripts/envsetup.sh

10.bitbake st-image-qt

11.bitbake st-image-qt -c populate_sdk

 

 

 

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.