1. Purpose[edit source]
This article explains and describes the hardware configuration required to be able to activate and run the STM32 MPU platforms.
2. Recommended PC configurations[edit source]
The PC requirements depend on the Package you want to use.
The table below guides through the selection and configuration of the host PC environment according the targeted Package:
Host Environment | Starter Package | Developer Package | Distribution Package |
---|---|---|---|
Windows (64 bits) Tested with Windows7 and Windows10 Preferred version Windows 10 |
native | Virtual Machine | Virtual Machine |
Linux (64 bits) Tested with Ubuntu 18.04 and 16.04 |
native | native + additional packages (see Linux PC chapter ) | native + additional packages (see Linux PC chapter ) |
There are no absolute minimal requirements regarding the PC hardware configuration, however ST recommends to meet or exceed the following hardware configurations when using Developer Package or Distribution Package.
The table below correspond to the minimal validated configuration:
Hardware item | Minimal validated configuration | Comments / Recommendations |
---|---|---|
CPU | core i5-2540M @ 2.6GHz 2 cores (4 threads) 3MB cache |
64 bits instruction set is mandatory 8 cores/threads or more is a good config moreover for Developer Package and Distribution Package. |
RAM | 8GB | 16GB or more is recommended especially for Virtual Machine setup , Developer Package and Distribution Package. |
Hard Drive | 320GB | 1TB is probably a better config when using Distribution Package |
3. Linux PC[edit source]
A Linux PC with Ubuntu 18.04 is the recommended setup. Other Ubuntu revisions should also be supported, please refer to Yocto Manual[1] .
3.1. Check Internet access[edit source]
- An Internet access through http and https protocols must be provided.
Required for Developer Package and Distribution Package at least.
The command below allows to check for Internet access through http/https protocols:
wget -q www.google.com && echo "Internet access over HTTP/HTTPS is OK !" || echo "No internet access over HTTP/HTTPS ! You may need to set up a proxy."
If a 'OK' message is returned, the network is well configured. In such case, skip the rest of this section and jump to next one (Install extra packages).
Any other situation likely indicates the need for a proxy for http/https protocols.
The best solution to set a proxy for http/https protocols is via the shell variables http_proxy and https_proxy:
export http_proxy=http://<MyProxyLogin>:<MyProxyPassword>@<MyProxyServerUrl>:<MyProxyPort> export https_proxy=http://<MyProxyLogin>:<MyProxyPassword>@<MyProxyServerUrl>:<MyProxyPort>
Because your password may contains "special characters" you need to translate your password into ASCII hexacode. By this way you can translate <MyProxyPassword> into hexacode by using this command :
- echo -n " <MyProxyPassword>" | od -A n -t x1 -w128 | head -1 | tr " " "%"
Check again the Internet access with command:
wget -q www.google.com && echo "Internet access over HTTP/HTTPS is OK !" || echo "No internet access over HTTP/HTTPS ! You may need to set up a proxy."
- Internet access for sudo commands
Required for Distribution Package.
sudo commands are executed in the root user environment; by default, no Internet proxy settings are applied for root user.
Root user should be able to browse Internet, after creation of an alias passing the proxy settings on sudo command:
alias sudo='sudo http_proxy=$http_proxy'
Check that the sudo commands is successful (requires Internet access):
sudo apt-get update
- Internet over git://, ssh:// and others specifics protocols
Required for Distribution Package.
In addition to http/https protocols (used in 90% of the Internet traffic), some other protocols like git:// or ssh:// may be required.
For example in the context of the Distribution Package, some "git fetch" commands could require "git:// protocols".
In order to support these protocols through a proxy, the best way is to directly setup the proxy in the $HOME/.gitconfig file (core.gitproxy) and use a tool like cockscrew[2] in order to tunnel the git:// flow into the http flow:
sudo apt-get update sudo apt-get install corkscrew git config --replace-all --global core.gitproxy "$HOME/bin/git-proxy.sh" git config --add --global core.gitproxy "none for <MyPrivateNetworkDomain>" (optionnal and for example .st.com, localhost, ...) echo 'exec corkscrew <MyProxyServerUrl> <MyProxyPort> $* $HOME/.git-proxy.auth' > $HOME/bin/git-proxy.sh chmod 700 $HOME/bin/git-proxy.sh echo '<MyProxyLogin>:<MyProxyPassword>' > $HOME/.git-proxy.auth chmod 600 $HOME/.git-proxy.auth
Here is a command to test this proxy settings:
git ls-remote git://git.openembedded.org/openembedded-core > /dev/null && echo OK || echo KO
The command should return 'OK', else proxy settings are wrong.
3.2. Install extra packages[edit source]
Required for Developer Package and Distribution Package.
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):
sudo apt-get update sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential chrpath socat cpio python python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping sudo apt-get install libsdl1.2-dev xterm sudo apt-get install make xsltproc docbook-utils fop dblatex xmlto sudo apt-get install python-git
- Packages needed for some "Developer Package" use cases:
sudo apt-get install ncurses-dev libncurses5-dev libncursesw5-dev lib32ncurses5 libssl-dev linux-headers-generic u-boot-tools device-tree-compiler bison flex g++
- Package for repo (used to download the "Distribution Package" source code):
sudo apt-get install repo
For Ubuntu 16.04 you should use the legacy repo, procedure to install here
- Some useful tools:
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
sudo apt-get install default-jre
3.2.1. Install extra packages for Android[edit source]
Below information is related to the Android™ distribution Before downloading and building the STM32MPU distribution for Android™, make sure your system meets the following requirements:
For more details, refer to the requirements page of the AOSP website.
sudo apt-get update sudo apt-get install chrpath curl libxml2-utils gdisk pv python-pycryptopp python-crypto autotools-dev automake libusb-1.0-0-dev
At this stage: Your environment is ready for Android build, debug and test.
|
3.3. Additional configurations[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:
echo 'options mmc_block perdev_minors=16' > /tmp/mmc_block.conf sudo mv /tmp/mmc_block.conf /etc/modprobe.d/mmc_block.conf
- Check for locale setup
Required for Distribution Package.
The locale setting is used by some applications/commands (including by Distribution Package applications/commands).
Verify that the locale settings are as follows:
locale LANG=en-US.UTF-8
In case the locale command returns a different configuration than the one shown above, it must be reconfigured as follows:
sudo update-locale LANG=en_US.UTF-8
- Add user in basics groups
The user login should belong to the basic Linux groups such as disk, tty, dialout or plugdev
Use the command groups to list groups for the current user:
groups
If needed add user to the missing <groups>:
sudo adduser $USER <group>
Then reboot the PC.
3.4. Setup Git user information[edit source]
Required for Developer Package and Distribution Package.
The User Information is needed by git[3] in case commit and/or push commands are being used :
git config --global user.name "Your Name" git config --global user.email "you@example.com"
4. Windows PC[edit source]
Starter Package may run on Windows.
Developer Package and Distribution Package require a Linux environment.
There are several ways to run Linux system on top of a Windows host PC, ST recommends to use a Virtual Machine System:
- Install a virtual machine such as VMWare [4]
- Setup a 64 bits Ubuntu image compatible with your virtual machine
ST, in an experimental way, has also run Developer Package and Distribution Package on a WSL2 (Windows Subsystem for Linux 2); see WSL2 chapter.
4.1. Virtual Machine System[edit source]
4.1.1. Virtual Machine installation[edit source]
ST has selected VMWare as Linux virtual machine solution.
VMWare is a commercial company specialized in virtualization solutions. The available solutions to support a virtual Linux machine on a Windows PC are:
- VMWare Workstation Player (paid solution) for commercial use (download here [5])
- VMWare Workstation Player (free solution) for home use (download here [6])
Please proceed with the installation of the virtual machine.
Before running the virtual machine, make sure the virtualization is activated in the BIOS (it should be activated by default for any retail PC).
4.1.2. Download the Ubuntu image for the virtual machine[edit source]
The "osboxes.org" [7] website provides virtual machine images compatible with VMWare(*.vmdk).
Setup have been validated and tested on Ubuntu 18.04 (64bit) and Ubuntu 16.04 (64bit).
Download the 64 bits Ubuntu image available at [8] and:
- Unzip the downloaded file
- In VMware create a virtual machine using the Ubuntu virtual disk downloaded from osboxes.org.
The recommended usage is to dedicate, at least, half of the host machine to the virtual machine:
- CPU: 2 cores at least, - RAM: 6 Gbytes or more is a good choice (the more RAM allocated to Virtual Machine the better - the RAM allocated to Virtual Machine must be 2GB minimum), - Network: NAT is good and an easy way to benefit form a network connection within the virtual machine.
Virutal size of virtual disk downloaded from osboxes.org is about 500GB. Even if the real size of the file of the virtual disk is less at beginning, the size could growth up to 500GB over compiling distribution package or development package.
4.1.3. Launch of Ubuntu image[edit source]
Default Credentials of the Ubuntu are set to "osboxes.org" for both login and password.
For a better experience with the VMware virtual machine, install "vmware-tools" in order to be able to use the clipboard to drag-and-drop and copy/paste files between VMware and Windows. A step-by-step installation procedure of vmware-tools is available in the document: PreRequisite-Vmware-tools.pdf
The virtual machine is up and running!
The Ubuntu setup must be finalized according recommendations provided in Linux PC chapter
4.2. WSL2 (experimental)[edit source]
Even if STMicroelectronics strongly recommends to use a Linux® environment, the Developer Package and Distribution Package works in WSL2 (Windows Sub-system Linux 2) environment. WSL is a feature provided by Windows 10®.
ST has run unsuccessfully Developer Package and Distribution Package on WSL but successfully on WSL2.
WSL2 is available on Windows 10® since build 18917.
WSL 2 is a new version of the architecture that powers the Windows Subsystem for Linux to run ELF64 Linux binaries on Windows (more details on aka.ms/wsl2).
- WSL2 - Installation :
- To install WSL2 please read this webpage: https://docs.microsoft.com/fr-fr/windows/wsl/wsl2-install
- Once WSL2 installed, jump to chapter #Linux_PC to make your WSL2 ready to run Developer Package and/or Distribution Package.
- WSL2 - Limitations :
- WSL2 up to now (09/2019) does not support hardware such as USB devices, serial, ... (more details).
- This means, STM32CubeProgrammer should be used through native Windows
- WSL2 files are not browsable from Windows native file explorer.
- To share files between WSL2 and Windows, the prefered way is to use the mount point /mnt/c from WSL2 and do copies.
- WSL2 up to now (09/2019) does not support hardware such as USB devices, serial, ... (more details).
- WSL2 - Tips :
- Launch graphical application : On wiki.ubuntu.com the page on WSL contains a chapter Running Graphical Applications.
4.3. References[edit source]
- ↑ https://www.yoctoproject.org/docs/2.4.3/ref-manual/ref-manual.html#detailed-supported-distros
- ↑ https://en.wikipedia.org/wiki/Corkscrew_(program)
- ↑ Git
- ↑ http://vmware.com
- ↑ https://my.vmware.com/en/web/vmware/free#desktop_end_user_computing/vmware_workstation_player/15_0
- ↑ https://www.vmware.com/products/workstation-player/workstation-player-evaluation.html
- ↑ http://osboxes.org
- ↑ https://www.osboxes.org/ubuntu/#ubuntu-1804-vmware