Skip to content

Commit

Permalink
cmake: add support for STM32CubeCLT 1.14.0
Browse files Browse the repository at this point in the history
The tested version is STM32CubeCLT v1.14.0 with the GNU tools
for STM32, the GNU C/C++ for Arm toolchain 11.3.rel1.

Minimal supported version is STM32CubeCLT v1.11.1 with the GNU
tools for STM32, the GNU C/C++ for Arm toolchain 10.3.rel1.

Signed-off-by: Stephan Linz <[email protected]>
  • Loading branch information
rexut committed Feb 10, 2024
1 parent e9de742 commit cbad31b
Show file tree
Hide file tree
Showing 8 changed files with 152 additions and 8 deletions.
138 changes: 130 additions & 8 deletions doc/bridle/gs_installing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ and tested version!
For installation and handling of the |armgnutc| with Zephyr, the same steps
apply as for the |gnuarmemb|. From Zephyr's point of view, only the name has
changed. Therefore the same variable prefixes will be used (``GNUARMEMB``).
For more details, see the section :ref:`zephyr:toolchain_gnuarmemb` in the
Zephyr documentation.

To set up the toolchain, complete the following steps:

Expand Down Expand Up @@ -217,37 +219,37 @@ To set up the toolchain, complete the following steps:

Open a terminal window and enter the following commands (assuming that
you have installed the toolchain to ``~/gnuarmemb``; if not, change
the value for GNUARMEMB_TOOLCHAIN_PATH):
the value for ``GNUARMEMB_TOOLCHAIN_PATH``):

.. parsed-literal::
:class: highlight
export ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb
export GNUARMEMB_TOOLCHAIN_PATH=\ "${HOME}/gnuarmemb"
export GNUARMEMB_TOOLCHAIN_PATH="${HOME}/gnuarmemb"
.. group-tab:: macOS

Open a terminal window and enter the following commands (assuming that
you have installed the toolchain to ``~/gnuarmemb``; if not, change
the value for GNUARMEMB_TOOLCHAIN_PATH):
the value for ``GNUARMEMB_TOOLCHAIN_PATH``):

.. parsed-literal::
:class: highlight
export ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb
export GNUARMEMB_TOOLCHAIN_PATH=\ "${HOME}/gnuarmemb"
export GNUARMEMB_TOOLCHAIN_PATH="${HOME}/gnuarmemb"
.. group-tab:: Windows

Open a command prompt and enter the following commands (assuming that
you have installed the toolchain to ``c:\gnuarmemb``; if not, change
the value for GNUARMEMB_TOOLCHAIN_PATH):
the value for ``GNUARMEMB_TOOLCHAIN_PATH``):

.. parsed-literal::
:class: highlight
set ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb
set GNUARMEMB_TOOLCHAIN_PATH=\ c:\\gnuarmemb
set GNUARMEMB_TOOLCHAIN_PATH=c:\\gnuarmemb
#. Set the environment variables persistently.
Depending on your operating system:
Expand Down Expand Up @@ -286,8 +288,9 @@ the :ref:`list of required tools <req_tools_table>` for the correct and tested
version!

For installation and handling of the |gnuarmemb| with Zephyr, the same steps
apply as for the |armgnutc|. The |gnuarmemb| is the discontinued predecessor
of the |armgnutc| and should no longer be used.
apply as for the |armgnutc|. For more details, see the section
:ref:`zephyr:toolchain_gnuarmemb` in the Zephyr documentation. The |gnuarmemb|
is the discontinued predecessor of the |armgnutc| and should no longer be used.

To set up the toolchain, complete the steps above for |armgnutc|.

Expand All @@ -307,6 +310,125 @@ To set up the toolchain, complete the steps above for |armgnutc|.
- |gnuarmemb_min_ver|
- |gnuarmemb_recommended_ver_win10|

.. _gs_toolchain_stm32cubeclt_install:
.. _gs_toolchain_gnu_tools_for_stm32_install:

STM32CubeCLT (GNU tools for STM32)
----------------------------------

.. warning:: Special vendor specific toolchain for STM32 by STMicroelectronics.

To be able to cross-compile your applications for ARM targets or feel better
to use a special vendor toolchain for STM32 based platforms maintained by
STMicroelectronics, you can use at least version |stm32cubeclt_recommended_ver|
of the |stm32cubeclt|_ too.
Refere the :ref:`list of required tools <req_tools_table>` for the correct and
tested version!

The |stm32cubeclt| is an all-in-one multi-OS command-line toolset, which is
part of the STM32Cube ecosystem. It is a toolset for third-party integrated
development environment (IDE) providers, allowing the use of STMicroelectronics
proprietary tools within their own IDE frameworks.

For installation the |stm32cubeclt|, see the accompanying original documentation
by STMicroelectronics. For handling the |stm32cubeclt| with Zephyr you have to
choose the same way as for other common cross-compilers. For more details, see
the section :ref:`zephyr:other_x_compilers` in the Zephyr documentation.

To set up the toolchain, complete the following steps:

#. Download the `STM32CubeCLT (GNU tools for STM32)`_ for your operating system.

.. list-table::
:header-rows: 1

* - Operating System
- Minimum version
- Tested version
* - Linux
- |stm32cubeclt_min_ver|
- |stm32cubeclt_recommended_ver_linux|
* - macOS
- |stm32cubeclt_min_ver|
- |stm32cubeclt_recommended_ver_macos|
* - Windows
- |stm32cubeclt_min_ver|
- |stm32cubeclt_recommended_ver_win10|

#. Extract the toolchain into a folder of your choice. We recommend to use the
default as specified by STMicroelectronics, folder ``/opt/st/stm32cubeclt``
on Linux, ``/Applications/STM32CubeCLT`` on macOS and ``C:\ST\STM32CubeCLT``
on Windows.

Make sure that the folder name does not contain any spaces or special
characters.

#. If you want to build and program applications from the command line, define
the environment variables for the *GNU tools for STM32*. Depending on your
operating system:

.. tabs::

.. group-tab:: Linux

Open a terminal window and enter the following commands (assuming that
you have installed the toolchain to ``/opt/st/stm32cubeclt``; if not,
change the value for ``CROSS_COMPILE``):

.. parsed-literal::
:class: highlight
export ZEPHYR_TOOLCHAIN_VARIANT=cross-compile
export CROSS_COMPILE="/opt/st/stm32cubeclt/GNU-tools-for-STM32/bin/arm-none-eabi-"
.. group-tab:: macOS

Open a terminal window and enter the following commands (assuming that
you have installed the toolchain to ``/Applications/STM32CubeCLT``; if
not, change the value for ``CROSS_COMPILE``):

.. parsed-literal::
:class: highlight
export ZEPHYR_TOOLCHAIN_VARIANT=cross-compile
export CROSS_COMPILE="/Applications/STM32CubeCLT/GNU-tools-for-STM32/bin/arm-none-eabi-"
.. group-tab:: Windows

Open a command prompt and enter the following commands (assuming that
you have installed the toolchain to ``C:\ST\STM32CubeCLT``; if not,
change the value for ``CROSS_COMPILE``):

.. parsed-literal::
:class: highlight
set ZEPHYR_TOOLCHAIN_VARIANT=cross-compile
set CROSS_COMPILE="C:\\ST\\STM32CubeCLT\\GNU-tools-for-STM32\\bin\\arm-none-eabi-"
#. Set the environment variables persistently.
Depending on your operating system:

.. tabs::

.. group-tab:: Linux

Define the environment variables in the ``~/.zephyrrc`` file as
described in :ref:`build_environment`. This will allow you to avoid
setting them every time you open a terminal window.

.. group-tab:: macOS

Define the environment variables in the ``~/.zephyrrc`` file as
described in :ref:`build_environment`. This will allow you to avoid
setting them every time you open a terminal window.

.. group-tab:: Windows

Add the environment variables as system environment variables or
define them in the ``%userprofile%\zephyrrc.cmd`` file as described
in :ref:`build_environment`. This will allow you to avoid setting
them every time you open a command prompt.

.. _cloning_the_repositories_win:
.. _cloning_the_repositories:

Expand Down
9 changes: 9 additions & 0 deletions doc/bridle/gs_recommended_versions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,9 @@ that is installed when using the :ref:`gs_app_sim` as described in
* - |gnuarmemb|_
- |gnuarmemb_min_ver|
- |gnuarmemb_recommended_ver_linux|
* - |stm32cubeclt|_
- |stm32cubeclt_min_ver|
- |stm32cubeclt_recommended_ver_linux|
* - |doxygen|_
- |doxygen_min_ver|
- |doxygen_recommended_ver_linux|
Expand Down Expand Up @@ -223,6 +226,9 @@ that is installed when using the :ref:`gs_app_sim` as described in
* - |gnuarmemb|_
- |gnuarmemb_min_ver|
- |gnuarmemb_recommended_ver_macos|
* - |stm32cubeclt|_
- |stm32cubeclt_min_ver|
- |stm32cubeclt_recommended_ver_macos|
* - |doxygen|_
- |doxygen_min_ver|
-
Expand Down Expand Up @@ -274,6 +280,9 @@ that is installed when using the :ref:`gs_app_sim` as described in
* - |gnuarmemb|_
- |gnuarmemb_min_ver|
- |gnuarmemb_recommended_ver_win10|
* - |stm32cubeclt|_
- |stm32cubeclt_min_ver|
- |stm32cubeclt_recommended_ver_win10|
* - |doxygen|_
- |doxygen_min_ver|
-
Expand Down
2 changes: 2 additions & 0 deletions doc/bridle/links.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@
.. _`armgnutc`: https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads
.. _`GNU Arm Embedded Toolchain`: https://developer.arm.com/downloads/-/gnu-rm
.. _`gnuarmemb`: https://developer.arm.com/downloads/-/gnu-rm
.. _`STM32CubeCLT (GNU tools for STM32)`: https://www.st.com/STM32CubeCLT
.. _`stm32cubeclt`: https://www.st.com/STM32CubeCLT
.. _`GCC compiler`: https://gcc.gnu.org/
.. _`Graphviz`: https://graphviz.org/
.. _`Doxygen`: https://www.doxygen.org/
Expand Down
7 changes: 7 additions & 0 deletions doc/bridle/versions.txt.in
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@
.. |gnuarmemb_recommended_ver_macos| replace:: @GNUARMEMB_VERSION_MACOS@
.. |gnuarmemb_recommended_ver_linux| replace:: @GNUARMEMB_VERSION_LINUX@

.. |stm32cubeclt| replace:: :strong:`STM32CubeCLT (GNU tools for STM32)`
.. |stm32cubeclt_min_ver| replace:: @STM32CUBECLT_VERSION_MINIMUM@
.. |stm32cubeclt_recommended_ver| replace:: :strong:`@STM32CUBECLT_VERSION_MINIMUM@`
.. |stm32cubeclt_recommended_ver_win10| replace:: @STM32CUBECLT_VERSION_WIN10@
.. |stm32cubeclt_recommended_ver_macos| replace:: @STM32CUBECLT_VERSION_MACOS@
.. |stm32cubeclt_recommended_ver_linux| replace:: @STM32CUBECLT_VERSION_LINUX@

.. |doxygen| replace:: :strong:`Doxygen`
.. |doxygen_min_ver| replace:: @DOXYGEN_VERSION_MINIMUM@
.. |doxygen_recommended_ver_linux| replace:: @DOXYGEN_VERSION_LINUX@
Expand Down
1 change: 1 addition & 0 deletions scripts/tools-versions-linux.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ west=0.14.0
zephyr-sdk=0.16.5
armgnutc=13.2.rel1
gnuarmemb=10.3-2021.10
stm32cubeclt=1.14.0 (11.3.rel1)
doxygen=1.9.8-1+ppa~tsn1~focal
graphviz=2.42.2-3build2
mscgen=0.20-12
1 change: 1 addition & 0 deletions scripts/tools-versions-macos.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ west=0.14.0
zephyr-sdk=0.16.5
armgnutc=13.2.rel1
gnuarmemb=10.3-2021.10
stm32cubeclt=1.14.0 (11.3.rel1)
1 change: 1 addition & 0 deletions scripts/tools-versions-minimum.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ west=0.12
zephyr-sdk=0.16.4
armgnutc=11.2-2022.02
gnuarmemb=10-2020-q4-major
stm32cubeclt=1.11.1 (10.3.rel1)
doxygen=1.9.2
graphviz=2.42
mscgen=0.20
1 change: 1 addition & 0 deletions scripts/tools-versions-win10.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ west=0.14.0
zephyr-sdk=0.16.5
armgnutc=13.2.rel1
gnuarmemb=10.3-2021.10
stm32cubeclt=1.14.0 (11.3.rel1)

0 comments on commit cbad31b

Please sign in to comment.