diff --git a/docs/psoc6/installation.rst b/docs/psoc6/installation.rst index c773dcb9c3735..8d2b3c381b5e5 100644 --- a/docs/psoc6/installation.rst +++ b/docs/psoc6/installation.rst @@ -17,6 +17,21 @@ You can easily download them terminal with the following command: .. tabs:: + .. group-tab:: Python + + Download the mpy-psoc6 utility script: + + .. code-block:: bash + + curl.exe -s -L https://raw.githubusercontent.com/infineon/micropython/ports-psoc6-main/tools/psoc6/mpy-psoc6.py > mpy-psoc6.py + + Make sure you have a recent version on `Python3.x `_ installed and the `pip `_ package installer. + Then install the following packages: + + .. code-block:: bash + + pip install requests + .. group-tab:: Linux Download the mpy-psoc6 utility script: @@ -39,26 +54,17 @@ You can easily download them terminal with the following command: curl.exe -s -L https://raw.githubusercontent.com/infineon/micropython/ports-psoc6-main/tools/psoc6/mpy-psoc6.cmd > mpy-psoc6.cmd - .. group-tab:: Python - - Download the mpy-psoc6 utility script: - - .. code-block:: bash - - curl.exe -s -L https://raw.githubusercontent.com/infineon/micropython/ports-psoc6-main/tools/psoc6/mpy-psoc6.py > mpy-psoc6.py - - Make sure you have a recent version on `Python3.x `_ installed and the `pip `_ package installer. - Then install the following packages: - - .. code-block:: bash - - pip install requests - Find all the available commands and options by running the script with the command help: .. tabs:: + .. group-tab:: Python + + .. code-block:: bash + + python mpy-psoc6.py --help + .. group-tab:: Linux .. code-block:: bash @@ -71,12 +77,6 @@ Find all the available commands and options by running the script with the comma .\mpy-psoc6.cmd help - .. group-tab:: Python - - .. code-block:: bash - - python mpy-psoc6.py --help - .. _psoc6_quick_start: Quick Start @@ -87,6 +87,12 @@ micropython is to run the ``quick-start`` command of the script: .. tabs:: + .. group-tab:: Python + + .. code-block:: bash + + python mpy-psoc6.py quick-start + .. group-tab:: Linux .. code-block:: bash @@ -99,12 +105,6 @@ micropython is to run the ``quick-start`` command of the script: .\mpy-psoc6.cmd quick-start - .. group-tab:: Python - - .. code-block:: bash - - python mpy-psoc6.py quick-start - The command will take care of the following: * Install all required software to work with MicroPython @@ -124,6 +124,12 @@ MicropPython firmware version: .. tabs:: + .. group-tab:: Python + + .. code-block:: bash + + python mpy-psoc6.py device-setup + .. group-tab:: Linux .. code-block:: bash @@ -136,12 +142,6 @@ MicropPython firmware version: .\mpy-psoc6.cmd device-setup - .. group-tab:: Python - - .. code-block:: bash - - python mpy-psoc6.py device-setup - You can run any command any time you want to upgrade to the latest MicroPython firmware version. This command will take care of the following steps: @@ -161,6 +161,12 @@ version need to be passed as arguments. .. tabs:: + .. group-tab:: Python + + .. code-block:: bash + + python mpy-psoc6.py device-setup -b CY8CPROTO-062-4343W -v v0.1.1 + .. group-tab:: Linux .. code-block:: bash @@ -173,12 +179,6 @@ version need to be passed as arguments. .\mpy-psoc6.cmd device-setup CY8CPROTO-062-4343W v0.1.1 - .. group-tab:: Python - - .. code-block:: bash - - python mpy-psoc6.py device-setup -b CY8CPROTO-062-4343W -v v0.1.1 - .. warning:: Be sure to provide the board name as shown in the ``device-setup`` command when run in interactive mode. @@ -215,6 +215,12 @@ The board needs to be specified, and the path and name of the ``.hex`` file: .. tabs:: + .. group-tab:: Python + + .. code-block:: bash + + python mpy-psoc6.py firmware-deploy -b CY8CPROTO-062-4343W -f pathtodir/mpy-psoc6_CY8CPROTO-062-4343W.hex + .. group-tab:: Linux .. code-block:: bash @@ -227,11 +233,6 @@ The board needs to be specified, and the path and name of the ``.hex`` file: .\mpy-psoc6.cmd firmware-deploy CY8CPROTO-062-4343W pathtodir/mpy-psoc6_CY8CPROTO-062-4343W.hex - .. group-tab:: Python - - .. code-block:: bash - - python mpy-psoc6.py firmware-deploy -b CY8CPROTO-062-4343W -f pathtodir/mpy-psoc6_CY8CPROTO-062-4343W.hex Erasing the device (external) file system ----------------------------------------- @@ -242,6 +243,12 @@ Use the ``device-erase`` command to erase of the external memory of your PSoC6 .. tabs:: + .. group-tab:: Python + + .. code-block:: bash + + python mpy-psoc6.py device-erase + .. group-tab:: Linux .. code-block:: bash @@ -254,12 +261,6 @@ Use the ``device-erase`` command to erase of the external memory of your PSoC6 .\mpy-psoc6.cmd device-erase - .. group-tab:: Python - - .. code-block:: bash - - python mpy-psoc6.py device-erase - .. warning:: This command flashes the PSoC6™ controller with a custom program to delete the external memory. Thus, MicroPython will be removed from the