Skip to content

Arm-Examples/Blinky_NUCLEO-G0B1RE

Repository files navigation

Blinky project

The Blinky project is a simple example that can be used to verify the basic tool setup:

  • At start the vioLED0 blinks in 1 sec interval.
  • The vioBUTTON0 changes the blink frequency and start/stops vioLED1.

Keil Studio Cloud - Import Project CMSIS Compliance

Prerequisites

Tools:

Build Solution/Project

Using Visual Studio Code with extensions

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.

Using Command Line Interface (CLI)

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 executing the following command:

cbuild hello.csolution.yml

Run the application

Using Visual Studio Code with extensions

  • Connect the board's DAPLink 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.

Using Drag-and-drop programming or external programmer and terminal

  • Connect the board's DAPLink 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.

Debug the application

Using Visual Studio Code with extensions

Open the 'CMSIS' view from the side bar and press the 'Debug' button.

CMSIS-Driver Virtual I/O mapping

CMSIS-Driver VIO Physical resource
vioBUTTON0 Button USER (PC13)
vioLED0 LED GREEN (PA5)