Simple Hello World example for STMicroelectronics NUCLEO-H563ZI Discovery kit. This example prints "Hello World" and a counter value via the standard output which is routed to the debug console through Virtual COM port.
- CMSIS-Toolbox v2.0.0 or newer
- Microsoft Visual Studio Code with Keil Studio Pack extension (optional, alternatively CLI can be used)
- Arm Compiler 6 (default toolchain, automatically installed when using Visual Studio Code with vcpkg)
- Arm GNU Toolchain (alternate toolchain, automatically installed when using Visual Studio Code with vcpkg)
The example is configured to use Arm Compiler 6 by default. In order to use Arm GNU Toolchain change the 'compiler' node in hello.csolution.yml. to:
compiler: GCC
Required tools described in file 'vcpkg-configuration.json' should be automatically installed by vcpkg. You can see the status of vcpkg in the status bar.
Required CMSIS packs need to be also installed. In case a required pack is missing, a notification window will pop-up to install the missing pack.
Open the 'CMSIS' view from the side bar, select desired 'Build Type' and press the 'Build' button.
Download required packs (not required when the packs are already available) by executing the following commands:
csolution list packs -s hello.csolution.yml -m >packs.txt
cpackget update-index
cpackget add -f packs.txt
Build the project by execute the following command:
cbuild hello.csolution.yml
- Connect the board's ST-LINK USB to the PC (provides also power).
- Open the 'CMSIS' view from the side bar:
- Press the 'Run' button and wait until the image is programmed and starts running.
- Press the 'Open Serial' button and select the board's serial port with 115200 baud rate.
- Observe the terminal output.
- Connect the board's ST-LINK USB to the PC (provides also power).
- Program the image (.hex) using Drag-and-drop programming or use external programmer.
- Open terminal on the PC and connect to the board's serial port with 115200 baud rate.
- Observe the terminal output.
Open the 'CMSIS' view from the side bar and press the 'Debug' button.