Registered User mNo edit summary |
Registered User mNo edit summary Tag: 2017 source edit |
||
(7 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
{{ApplicableFor | |||
|MPUs list=STM32MP13x, STM32MP15x | |MPUs list=STM32MP13x, STM32MP15x, STM32MP21x, STM32MP23x, STM32MP25x | ||
|MPUs checklist=STM32MP13x,STM32MP15x | |MPUs checklist=STM32MP13x, STM32MP15x, STM32MP21x, STM32MP23x, STM32MP25x | ||
}}</noinclude> | }} | ||
<noinclude></noinclude> | |||
2 ways can be used to connect your PC to the board and then to control your board: | 2 ways can be used to connect your PC to the board and then to control your board: | ||
Line 13: | Line 14: | ||
Depending on the board, some additional materials may be needed to physically interconnect the board to the console serial port (extension board or adapter to interconnect the UART from the board to the USB PC input). | Depending on the board, some additional materials may be needed to physically interconnect the board to the console serial port (extension board or adapter to interconnect the UART from the board to the USB PC input). | ||
Pictures describing board connections can be found in [[:Category: | Pictures describing board connections can be found in [[:Category:STM32_MPU_boards]] | ||
===On Linux<sup>®</sup> PC=== | ===On Linux<sup>®</sup> PC=== | ||
On Linux, we recommend to use ''Minicom''. | On Linux<sup>®</sup>, we recommend to use ''Minicom''. | ||
You need first to check that Minicom is installed on your PC. | You need first to check that Minicom is installed on your PC. | ||
*From a Terminal window on your PC: | *From a Terminal window on your PC: | ||
{{PC$}} minicom | {{PC$}}minicom | ||
*If a message indicating Minicom does not exist, then '''install''' it: | *If a message indicating Minicom does not exist, then '''install''' it: | ||
{{PC$}} sudo apt-get install minicom | {{PC$}}sudo apt-get install minicom | ||
*To '''configure''' Minicom: | *To '''configure''' Minicom: | ||
The UART configuration that is set with the below command has to match the one from your board: to be checked within board user manual. | The UART configuration that is set with the below command has to match the one from your board: to be checked within board user manual. | ||
{{PC$}} sudo minicom -s | {{PC$}}sudo minicom -s | ||
Hardware flow control is generally set to off (default value is on) and a baud rate of 115200 is usual. | Hardware flow control is generally set to off (default value is on) and a baud rate of 115200 is usual. | ||
*To '''launch''' Minicom: | *To '''launch''' Minicom: | ||
{{PC$}} minicom -D /dev/tty... | {{PC$}}minicom -D /dev/tty... | ||
See [[How to use TTY with User Terminal]] article to find the appropriate tty instance to be used. | See [[How to use TTY with User Terminal]] article to find the appropriate tty instance to be used. | ||
See below example for a standard UART ( | See below example for a standard UART (ttySTM0) or STLink interface (ttyACM0): | ||
<span id="Remote Terminal"></span> | <span id="Remote Terminal"></span> | ||
{{PC$}} minicom -D /dev/ | {{PC$}}minicom -D /dev/{{HighlightParam|<ttySTM0|ttyACM0>}} | ||
On the terminal, the prompt is changed to: | On the terminal, the prompt is changed to: | ||
Line 44: | Line 44: | ||
More information on Minicom can be found at the following link: https://help.ubuntu.com/community/Minicom. | More information on Minicom can be found at the following link: https://help.ubuntu.com/community/Minicom. | ||
{{InternalInfo | ST-Link interface can take time to be available because /dev/ttyACM0 is seen as modem in Linux<sup>®</sup> (Ubuntu), this problem is solved by removing the package: | |||
{{PC$}}sudo apt-get remove modemmanager | |||
or simply stop the service: | |||
{{PC$}}systemctl stop ModemManager.service | |||
}} | |||
===On Windows<sup>®</sup> PC === | ===On Windows<sup>®</sup> PC === | ||
Any of the Windows terminal emulator applications can be used. "Tera Term" is one of them: http://tera-term.en.lo4d.com/. | Any of the Windows<sup>®</sup> terminal emulator applications can be used. "Tera Term" is one of them: http://tera-term.en.lo4d.com/. | ||
Then, the configuration is quite simple: | Then, the configuration is quite simple: | ||
* Plug the cable and start the board | * Plug the cable and start the board | ||
Line 52: | Line 58: | ||
* More information on the board serial port can generally be found in the hardware user manual '''of the board''' | * More information on the board serial port can generally be found in the hardware user manual '''of the board''' | ||
The setup is correct when you can send Linux commands through the terminal emulator and get feedback. You can for example reboot the board and see the boot sequence. | The setup is correct when you can send Linux<sup>®</sup> commands through the terminal emulator and get feedback. You can for example reboot the board and see the boot sequence. | ||
==Remote terminal over network== | ==Remote terminal over network== | ||
Line 62: | Line 68: | ||
If the network connection is through Ethernet then "InterfaceNetwork" = "Eth0", else if the network connection is using Wifi then "InterfaceNetwork" = "WLAN0" | If the network connection is through Ethernet then "InterfaceNetwork" = "Eth0", else if the network connection is using Wifi then "InterfaceNetwork" = "WLAN0" | ||
{{Board$}} ifconfig InterfaceNetwork | {{Board$}}ifconfig InterfaceNetwork | ||
eth0 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:FB | eth0 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:FB | ||
inet addr:{{highlight|xxx.xxx.xxx.xxx <ip address>}} Bcast:xxx.xxx.xxx.xxx Mask:xxx.xxx.xxx.xxx | inet addr:{{highlight|xxx.xxx.xxx.xxx <ip address>}} Bcast:xxx.xxx.xxx.xxx Mask:xxx.xxx.xxx.xxx |
Latest revision as of 17:13, 5 November 2024
2 ways can be used to connect your PC to the board and then to control your board:
- through serial link (UART / USB)
- through network connection
1. Remote terminal via serial link (UART/USB)[edit | edit source]
First of all, you need to connect your host PC to the board via UART.
Depending on the board, some additional materials may be needed to physically interconnect the board to the console serial port (extension board or adapter to interconnect the UART from the board to the USB PC input).
Pictures describing board connections can be found in Category:STM32_MPU_boards
1.1. On Linux® PC[edit | edit source]
On Linux®, we recommend to use Minicom.
You need first to check that Minicom is installed on your PC.
- From a Terminal window on your PC:
PC $>minicom
- If a message indicating Minicom does not exist, then install it:
PC $>sudo apt-get install minicom
- To configure Minicom:
The UART configuration that is set with the below command has to match the one from your board: to be checked within board user manual.
PC $>sudo minicom -s
Hardware flow control is generally set to off (default value is on) and a baud rate of 115200 is usual.
- To launch Minicom:
PC $>minicom -D /dev/tty...
See How to use TTY with User Terminal article to find the appropriate tty instance to be used.
See below example for a standard UART (ttySTM0) or STLink interface (ttyACM0):
<ttySTM0|ttyACM0>PC $>minicom -D /dev/
On the terminal, the prompt is changed to:
root@stm32mp1:~#
More information on Minicom can be found at the following link: https://help.ubuntu.com/community/Minicom.
1.2. On Windows® PC[edit | edit source]
Any of the Windows® terminal emulator applications can be used. "Tera Term" is one of them: http://tera-term.en.lo4d.com/. Then, the configuration is quite simple:
- Plug the cable and start the board
- Open a terminal emulator application on your PC and configure with the serial setup menu the USB port to be used and the baud rate of the serial link (in general 115200 baud)
- More information on the board serial port can generally be found in the hardware user manual of the board
The setup is correct when you can send Linux® commands through the terminal emulator and get feedback. You can for example reboot the board and see the boot sequence.
2. Remote terminal over network[edit | edit source]
The board can also be accessed via the network through Ethernet connection, using ssh.
To do so, first get the IP address of the board:
- if it exists, using the board user interface (Terminal window or specific application)
- using a console (see chapter Remote terminal via Serial link (UART/USB)
If the network connection is through Ethernet then "InterfaceNetwork" = "Eth0", else if the network connection is using Wifi then "InterfaceNetwork" = "WLAN0"
FB inet addr:xxx.xxx.xxx.xxx <ip address> Bcast:xxx.xxx.xxx.xxx Mask:xxx.xxx.xxx.xxx inet6 addr: fe80::280:e1ff:fe01:14fb/64 Scope:LinkBoard $>ifconfig InterfaceNetwork eth0 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:
Then, from another terminal on a remote PC connected to the same network, use the command described in How to perform ssh connection.