Registered User mNo edit summary |
Registered User |
||
(30 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
==Overview== | ==Overview== | ||
This stage explains how to install the SDK.<br> | This stage explains how to install the SDK.<br> | ||
The SDK for OpenSTLinux distribution provides a | The SDK for OpenSTLinux distribution provides a standalone cross-development toolchain and libraries tailored to the contents of the specific image flashed onto the board. | ||
==Host computer configuration== | ==Host computer configuration== | ||
===Install extra | ===Install extra packages=== | ||
{{#lst:PC prerequisites|InstallExtraPackages}} | {{#lst:PC prerequisites|InstallExtraPackages}} | ||
=== | ===Additional configurations=== | ||
Additional configurations have to be installed to support up to 16 partitions per MMC. | |||
By default, on Linux | By default, on Linux<sup>®</sup> systems, a maximum of 8 partitions are allowed on MMC. | ||
All Packages (Starter Package, ...) need more than 10 | All Packages (Starter Package, ...) need more than 10 partitions 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$}} echo 'options mmc_block perdev_minors=16' > /tmp/mmc_block.conf | ||
{{PC$}} sudo mv /tmp/mmc_block.conf /etc/modprobe.d/mmc_block.conf | {{PC$}} sudo mv /tmp/mmc_block.conf /etc/modprobe.d/mmc_block.conf | ||
Line 20: | Line 19: | ||
{{SoftwareLicenseAgreement | distribution=OpenSTLinux}} | {{SoftwareLicenseAgreement | distribution=OpenSTLinux}} | ||
'''For {{EcosystemRelease | revision= | '''For {{EcosystemRelease | revision=3.1.0}}''': | ||
* Download the [{{EcosystemRelease/Package | revision=3.1.0 | package=SDK package | request=url}}/{{EcosystemRelease/Package | revision=3.1.0 | package=SDK package | request=name}} Developer Package SDK] into the following directory: '''$HOME/STM32MPU_workspace/tmp''' | |||
* Download the [{{EcosystemRelease/Package | revision= | |||
* Uncompress the tarball file to get the SDK installation script | * Uncompress the tarball file to get the SDK installation script | ||
{{PC$}} cd $HOME/STM32MPU_workspace/tmp | {{PC$}} cd $HOME/STM32MPU_workspace/tmp | ||
{{PC$}} tar xvf {{EcosystemRelease/Package | revision= | {{PC$}} tar xvf {{EcosystemRelease/Package | revision=3.1.0 | package=SDK package | request=name}} | ||
'''For {{EcosystemRelease | revision=3.0.0}}''': <div class="mw-collapsible mw-collapsed"> | |||
'''For {{EcosystemRelease | revision= | |||
<div class="mw-collapsible- | |||
* Download the [{{EcosystemRelease/Package | revision= | * Download the [{{EcosystemRelease/Package | revision=3.0.0 | package=SDK package | request=url}}/{{EcosystemRelease/Package | revision=3.0.0 | package=SDK package | request=name}} Developer Package SDK] into the following directory: '''$HOME/STM32MPU_workspace/tmp''' | ||
* Uncompress the tarball file to get the SDK installation script | * Uncompress the tarball file to get the SDK installation script | ||
{{PC$}} cd $HOME/STM32MPU_workspace/tmp | {{PC$}} cd $HOME/STM32MPU_workspace/tmp | ||
{{PC$}} tar xvf {{EcosystemRelease/Package | revision= | {{PC$}} tar xvf {{EcosystemRelease/Package | revision=3.0.0 | package=SDK package | request=name}} | ||
</div> | </div> | ||
Line 40: | Line 36: | ||
==Run the SDK installation script== | ==Run the SDK installation script== | ||
'''For {{EcosystemRelease | revision=3.1.0}}''': | |||
* Create your STM32MP15 Developer Package SDK directory on your host computer | * Create your STM32MP15 Developer Package SDK directory on your host computer | ||
{{PC$}} mkdir -p $HOME/STM32MPU_workspace/STM32MP15-Ecosystem- | {{PC$}} mkdir -p $HOME/STM32MPU_workspace/STM32MP15-Ecosystem-v3.1.0/Developer-Package/SDK | ||
* Change the permissions of the SDK installation script so that it is executable | * Change the permissions of the SDK installation script so that it is executable | ||
{{PC$}} chmod +x {{EcosystemRelease/Package | revision= | {{PC$}} chmod +x {{EcosystemRelease/Package | revision=3.1.0 | package=SDK installation script | request=path}}/{{EcosystemRelease/Package | revision=3.1.0 | package=SDK installation script | request=name}} | ||
* Execute the SDK installation script | * Execute the SDK installation script | ||
{{PC$}} ./{{EcosystemRelease/Package | revision= | {{PC$}} ./{{EcosystemRelease/Package | revision=3.1.0 | package=SDK installation script | request=path}}/{{EcosystemRelease/Package | revision=3.1.0 | package=SDK installation script | request=name}} -d <working directory absolute path>/Developer-Package/SDK | ||
* | * The following log is output when the installation is successful: | ||
<pre> | <pre> | ||
ST OpenSTLinux - Weston - (A Yocto Project Based Distro) SDK installer version 3.1-openstlinux-5. | ST OpenSTLinux - Weston - (A Yocto Project Based Distro) SDK installer version 3.1.11-openstlinux-5.10-dunfell-mp1-21-11-17 | ||
======================================================================================================================= | =========================================================================================================================== | ||
You are about to install the SDK to "/home/osboxes/ | You are about to install the SDK to "/home/osboxes/STM32MPU_workspace/STM32MP15-Ecosystem-v3.1.0/Developer-Package/SDK". Proceed [Y/n]? y | ||
Extracting SDK................................................................................................................................................................................................................done | Extracting SDK.........................................................................................................................................................................................................................done | ||
Setting it up...done | Setting it up...done | ||
SDK has been successfully set up and is ready to be used. | 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. | Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g. | ||
$ . / | $ . /home/osboxes/STM32MPU_workspace/STM32MP15-Ecosystem-v3.1.0/Developer-Package/SDK/environment-setup-cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi | ||
</pre> | </pre> | ||
'''For {{EcosystemRelease | revision=3.0.0}}''': <div class="mw-collapsible mw-collapsed"> | |||
<div class="mw-collapsible- | |||
* Create your STM32MP15 Developer Package SDK directory on your host computer | * Create your STM32MP15 Developer Package SDK directory on your host computer | ||
{{PC$}} mkdir -p $HOME/STM32MPU_workspace/STM32MP15-Ecosystem- | {{PC$}} mkdir -p $HOME/STM32MPU_workspace/STM32MP15-Ecosystem-v3.0.0/Developer-Package/SDK | ||
* Change the permissions of the SDK installation script so that it is executable | * Change the permissions of the SDK installation script so that it is executable | ||
{{PC$}} chmod +x {{EcosystemRelease/Package | revision= | {{PC$}} chmod +x {{EcosystemRelease/Package | revision=3.0.0 | package=SDK installation script | request=path}}/{{EcosystemRelease/Package | revision=3.0.0 | package=SDK installation script | request=name}} | ||
* Execute the SDK installation script | * Execute the SDK installation script | ||
{{PC$}} ./{{EcosystemRelease/Package | revision= | {{PC$}} ./{{EcosystemRelease/Package | revision=3.0.0 | package=SDK installation script | request=path}}/{{EcosystemRelease/Package | revision=3.0.0 | package=SDK installation script | request=name}} -d <working directory absolute path>/Developer-Package/SDK | ||
* | * The following log is output when the installation is successful: | ||
<pre> | <pre> | ||
ST OpenSTLinux - Weston - (A Yocto Project Based Distro) SDK installer version 3.1-openstlinux-5. | ST OpenSTLinux - Weston - (A Yocto Project Based Distro) SDK installer version 3.1-openstlinux-5.10-dunfell-mp1-21-03-31 | ||
======================================================================================================================= | ======================================================================================================================== | ||
You are about to install the SDK to "/ | Enter the target directory for SDK (default: $HOME/STM32MPU_workspace/STM32MP15-Ecosystem-v3.0.0/Developer-Package/SDK): | ||
Extracting SDK................................................................................................................................................................................................................done | You are about to install the SDK to "$HOME/STM32MPU_workspace/STM32MP15-Ecosystem-v3.0.0/Developer-Package/SDK". Proceed [Y/n]? Y | ||
Extracting SDK......................................................................................................................................................................................................................done | |||
Setting it up...done | Setting it up...done | ||
SDK has been successfully set up and is ready to be used. | 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 | Each time you wish to use the SDK in a new shell session, you need to source the environment setup script for example | ||
$ . / | $ . /home/osboxes/MCD/DV3.0/Dev/SDK/environment-setup-cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi | ||
</pre> | </pre> | ||
</div> | </div> | ||
== | ==Start the SDK up== | ||
{{info|The SDK environment setup script must be run once | {{info|The SDK environment setup script must be run once on each new working terminal on which you cross-compile}} | ||
'''For {{EcosystemRelease | revision=3.1.0}}''': | |||
{{PC$}} source SDK/{{EcosystemRelease/Package | revision= | {{PC$}} cd $HOME/STM32MPU_workspace/STM32MP15-Ecosystem-v3.1.0/Developer-Package | ||
{{PC$}} source SDK/{{EcosystemRelease/Package | revision=3.1.0 | package=SDK setup script | request=name}} | |||
The following checks ensure that the environment is correctly set up: | |||
* Check the target architecture | |||
{{PC$}} echo $ARCH | |||
arm | |||
* Check the toolchain binary prefix for the target tools | |||
{{PC$}} echo $CROSS_COMPILE | |||
arm-ostl-linux-gnueabi- | |||
The following | * Check the C compiler version | ||
{{PC$}} $CC --version | |||
arm-ostl-linux-gnueabi-gcc (GCC) 9.3.0 | |||
Copyright (C) 2019 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 | |||
{{PC$}} echo $OECORE_SDK_VERSION | |||
3.1.11-{{EcosystemRelease/Package | revision=3.1.0 | package=OpenSTLinux distribution | request=name}} | |||
If any of these commands fails or does not return the expected result, try to reinstall the SDK. | |||
'''For {{EcosystemRelease | revision=3.0.0}}''': <div class="mw-collapsible mw-collapsed"> | |||
{{PC$}} cd $HOME/STM32MPU_workspace/STM32MP15-Ecosystem-v3.0.0/Developer-Package | |||
{{PC$}} source SDK/{{EcosystemRelease/Package | revision=3.0.0 | package=SDK setup script | request=name}} | |||
The following checks ensure that the environment is correctly set up: | |||
* Check the target architecture | * Check the target architecture | ||
{{PC$}} echo $ARCH | {{PC$}} echo $ARCH | ||
Line 106: | Line 125: | ||
* Check that the SDK version is the expected one | * Check that the SDK version is the expected one | ||
{{PC$}} echo $OECORE_SDK_VERSION | {{PC$}} echo $OECORE_SDK_VERSION | ||
3.1-{{EcosystemRelease/Package | revision= | 3.1-{{EcosystemRelease/Package | revision=3.0.0 | package=OpenSTLinux distribution | request=name}} | ||
If any of these commands fails or does not return the expected result, | If any of these commands fails or does not return the expected result, try to reinstall the SDK. | ||
</div> | |||
<noinclude> | <noinclude> | ||
Line 115: | Line 134: | ||
__NOTOC__ | __NOTOC__ | ||
[[Category:Sub-articles]] | [[Category:Sub-articles]] | ||
{{PublicationRequestId | | {{PublicationRequestId | 19653| 2021-04-19}} | ||
</noinclude> | </noinclude> |
Latest revision as of 18:36, 16 November 2021
1. Overview
This stage explains how to install the SDK.
The SDK for OpenSTLinux distribution provides a standalone cross-development toolchain and libraries tailored to the contents of the specific image flashed onto the board.
2. Host computer configuration
2.1. Install extra packages
In order to do basic development tasks, basic cross-compilation (via Developer Package) or more complex cross-compilation as OpenEmbedded does (via Distribution Package), some extra Ubuntu packages should be installed:
- Packages required by OpenEmbedded/Yocto (details here):
PC $> sudo apt-get update
PC $> sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential chrpath socat cpio python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev pylint3 pylint xterm
PC $> sudo apt-get install make xsltproc docbook-utils fop dblatex xmlto
- Packages needed for some "Developer Package" use cases:
PC $> sudo apt-get install libncurses5-dev libncursesw5-dev libssl-dev linux-headers-generic u-boot-tools device-tree-compiler bison flex g++ libyaml-dev
- Package for repo (used to download the "Distribution Package" source code):
repo For Ubuntu 16.04 you should use the legacy repo old-repo-python2 chapterPlease follow official instructions to install
- Some useful tools:
PC $> sudo apt-get install coreutils bsdmainutils sed curl bc lrzsz corkscrew cvs subversion mercurial nfs-common nfs-kernel-server libarchive-zip-perl dos2unix texi2html diffstat libxml2-utils
You can also install a Java Runtime Engine, this is required for STM32CubeMX and STM32CubeProgrammer
PC $> sudo apt-get install default-jre
2.2. Additional configurations
Additional configurations have to be installed to support up to 16 partitions per MMC. By default, on Linux® systems, a maximum of 8 partitions are allowed on MMC. All Packages (Starter Package, ...) need more than 10 partitions 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
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.
![]() |
To download a package, it is recommended to be logged in to your "myst" account [1]. If, trying to download, you encounter a “403 error”, you could try to empty your browser cache to workaround the problem. We are working on the resolution of this problem. We apologize for this inconvenience |
For ecosystem release unknown revision 3.1.0 :
- Download the [unknown revision/unknown revision Developer Package SDK] into the following directory: $HOME/STM32MPU_workspace/tmp
- Uncompress the tarball file to get the SDK installation script
unknown revisionPC $> cd $HOME/STM32MPU_workspace/tmp PC $> tar xvf
For ecosystem release unknown revision 3.0.0 :
4. Run the SDK installation script
For ecosystem release unknown revision 3.1.0 :
- Create your STM32MP15 Developer Package SDK directory on your host computer
PC $> mkdir -p $HOME/STM32MPU_workspace/STM32MP15-Ecosystem-v3.1.0/Developer-Package/SDK
- Change the permissions of the SDK installation script so that it is executable
unknown revision/unknown revisionPC $> chmod +x
- Execute the SDK installation script
unknown revision/unknown revision -d <working directory absolute path>/Developer-Package/SDKPC $> ./
- The following log is output when the installation is successful:
ST OpenSTLinux - Weston - (A Yocto Project Based Distro) SDK installer version 3.1.11-openstlinux-5.10-dunfell-mp1-21-11-17
===========================================================================================================================
You are about to install the SDK to "/home/osboxes/STM32MPU_workspace/STM32MP15-Ecosystem-v3.1.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.
$ . /home/osboxes/STM32MPU_workspace/STM32MP15-Ecosystem-v3.1.0/Developer-Package/SDK/environment-setup-cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi
For ecosystem release unknown revision 3.0.0 :
5. Start the SDK up
![]() |
The SDK environment setup script must be run once on each new working terminal on which you cross-compile |
For ecosystem release unknown revision 3.1.0 :
unknown revisionPC $> cd $HOME/STM32MPU_workspace/STM32MP15-Ecosystem-v3.1.0/Developer-Package PC $> source SDK/
The following checks ensure that the environment is correctly set up:
- Check the target architecture
PC $> echo $ARCH
arm
- Check the toolchain binary prefix for the target tools
PC $> echo $CROSS_COMPILE
arm-ostl-linux-gnueabi-
- Check the C compiler version
PC $> $CC --version
arm-ostl-linux-gnueabi-gcc (GCC) 9.3.0
Copyright (C) 2019 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
unknown revisionPC $> echo $OECORE_SDK_VERSION 3.1.11-
If any of these commands fails or does not return the expected result, try to reinstall the SDK.
For ecosystem release unknown revision 3.0.0 :