Registered User mNo edit summary |
Registered User mNo edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<bookshelf src="Book:Getting started" /> | <bookshelf src="Book:Getting started" /> | ||
<noinclude>{{ApplicableFor | |||
|MPUs list=STM32MP15x | |||
|MPUs checklist=STM32MP13x, STM32MP15x | |||
}}</noinclude> | |||
{| class="st-table" style="text-align:center; margin: auto" | {| class="st-table" style="text-align:center; margin: auto" | ||
| colspan="7" style="border-style: hidden;" | [[Image:STM32MP157X-DK2.png | 80px | link=]] | | colspan="7" style="border-style: hidden;" | [[Image:STM32MP157X-DK2.png | 80px | link=]] | ||
Line 29: | Line 33: | ||
__NOTOC__ | __NOTOC__ | ||
[[Category:STM32MP157x-DK2 - develop on A7 | 01]] | [[Category:STM32MP157x-DK2 - develop on A7 | 01]] | ||
{{PublicationRequestId | | {{PublicationRequestId | 19653| 2021-04-19}} | ||
</noinclude> | </noinclude> |
Revision as of 09:50, 13 October 2021
1. Overview[edit | edit source]
This stage explains how to install the SDK.
The SDK for OpenSTLinux distribution provides a stand-alone cross-development toolchain and libraries tailored to the contents of the specific image flashed in the board.
2. Host computer configuration[edit | edit source]
2.1. Install extra package[edit | edit source]
In order to do basic development tasks or basic cross-compilation, some extra Ubuntu packages should be installed:
PC $> sudo apt-get update
PC $> sudo apt-get install sed wget curl cvs subversion git-core coreutils unzip texi2html texinfo docbook-utils gawk python-pysqlite2 diffstat help2man make gcc build-essential g++ desktop-file-utils chrpath libxml2-utils xmlto docbook bsdmainutils iputils-ping cpio python-wand python-pycryptopp python-crypto
PC $> sudo apt-get install libsdl1.2-dev xterm corkscrew nfs-common nfs-kernel-server device-tree-compiler mercurial u-boot-tools libarchive-zip-perl
PC $> sudo apt-get install ncurses-dev bc linux-headers-generic gcc-multilib libncurses5-dev libncursesw5-dev lrzsz dos2unix lib32ncurses5 repo libssl-dev
PC $> sudo apt-get install default-jre
2.2. Additionnal configurations[edit | edit source]
- Allow up to 16 partitions per mmc
By default, on Linux system, a maximum of 8 partitions are allowed on mmc. All Packages (Starter Package, ...) need more than 10 partitons for the storage device. In order to extend the number of partitions per device to 16, the following options must be added to modprobe:
PC $> echo 'options mmc_block perdev_minors=16' > /tmp/mmc_block.conf
PC $> sudo mv /tmp/mmc_block.conf /etc/modprobe.d/mmc_block.conf
3. Download the SDK[edit | edit source]
The software package is provided AS IS, and by downloading it, you agree to be bound to the terms of the software license agreement (SLA). The detailed content licenses can be found here.
3.1. For ecosystem release no more valid revision 1.2.0
[edit | edit source]
- Download the STM32MP15-Ecosystem-v1.2.0 Developer Package SDK into the following directory: $HOME/STM32MPU_workspace/tmp
- Uncompress the tarball file to get the SDK installation script
SDK-x86_64-stm32mp1-openstlinux-20-02-19.tar.xzPC $> cd $HOME/STM32MPU_workspace/tmp PC $> tar xvf en.
3.2. For ecosystem release no more valid revision 1.1.0
[edit | edit source]
3.3. For ecosystem release no more valid revision 1.0.0
[edit | edit source]
4. Run the SDK installation script[edit | edit source]
4.1. For ecosystem release no more valid revision 1.2.0
[edit | edit source]
- Create your STM32MP15 Developer Package SDK directory on your host computer
SDKPC $> mkdir -p $HOME/STM32MPU_workspace/STM32MP15-Ecosystem-v1.2.0/Developer-Package/
- Change the permissions of the SDK installation script so that it is executable
PC $> chmod +x $HOME/STM32MPU_workspace/tmp/stm32mp1-openstlinux-20-02-19/sdk/st-image-weston-openstlinux-weston-stm32mp1-x86_64-toolchain-2.6-openstlinux-20-02-19.sh
- Execute the SDK installation script
SDKPC $> $HOME/STM32MPU_workspace/tmp/stm32mp1-openstlinux-20-02-19/sdk/st-image-weston-openstlinux-weston-stm32mp1-x86_64-toolchain-2.6-openstlinux-20-02-19.sh -d $HOME/STM32MPU_workspace/STM32MP15-Ecosystem-v1.2.0/Developer-Package/
- A successful installation outputs the following log:
Yocto Project Based Distro) SDK installer version 2.6-openstlinux-20-02-19 ===================================================================================================================== You are about to install the SDK to "/local/home/frq08927/STM32MPU_workspace/STM32MP15-Ecosystem-v1.2.0/Developer-Package/SDK". Proceed[Y/n]? Y Extracting SDK..................................................................................................................................................................done Setting it up...done SDK has been successfully set up and is ready to be used. Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g. $ . /<working directory absolute path>/STM32MPU_workspace/STM32MP15-Ecosystem-v1.2.0/Developer-Package/SDK/environment-setup-cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabiST OpenSTLinux - Weston - (A
4.2. For ecosystem release no more valid revision 1.1.0
[edit | edit source]
4.3. For ecosystem release no more valid revision 1.0.0
[edit | edit source]
5. Starting up the SDK[edit | edit source]
![]() |
The SDK environment setup script must be run once in each new working terminal in which you cross-compile |
For ecosystem release no more valid revision 1.2.0
SDK/environment-setup-cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabiPC $> cd $HOME/STM32MPU_workspace/STM32MP15-Ecosystem-v1.2.0/Developer-Package PC $> source
For ecosystem release no more valid revision 1.1.0
For ecosystem release no more valid revision 1.0.0
The following checkings allow to ensure that the environment is correctly setup:
- Check the target architecture
PC $> echo $ARCH
arm
- Check the toolchain binary prefix for the target tools
no more valid revision 1.2.0PC $> echo $CROSS_COMPILE arm-ostl-linux-gnueabi- /* For ecosystem release*/ Expand
- Check the C compiler version
no more valid revision 1.2.0PC $> $CC --version arm-ostl-linux-gnueabi-gcc (GCC) 8.2.0 /* For ecosystem release*/ Expand Copyright (C) 2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- Check that the SDK version is the expected one
SDK_VERSION 2.6-openstlinux-20-02-19 /* For ecosystem release no more valid revision 1.2.0PC $> echo $OECORE_*/ ExpandExpand
If any of these commands fails or does not return the expected result, please try to reinstall the SDK.