User manual
UM0036 STM8 C tutorial
Doc ID 7705 Rev 11 339/385
12.2 Build
In this lesson you will learn how to configure project settings and build the application for
debugging. Here, you will:
● Specify the target STM8
● Customize the C compiler options
● Change build settings for a specific file
● Build the application
12.2.1 Specify the target STM8
The choice of the target microcontroller affects the building, debugging and programming
phases of development, including:
● The assignment of application code to specific addresses in the MCU's memory
● The choice of debug instrument
● The choice of programming hardware and protocol
We have already associated the project with a target MCU. In this step change the target
MCU selection in the Project Settings window, to an MCU that is supported by your debug
instrument. Keep in mind that, whenever you change the target device in the Project
Settings window, you must build/rebuild your application for the memory mapping and
peripheral specification of the new target device.
For this tutorial we will specify the STM8S208MB and give an overview of the impact that a
change in MCU family would have on the user application.
To specify the MCU:
1. In the main menu bar, select Project>Settings.
2. In the Project Settings window, click on the MCU Selection tab
3. Place the cursor in the Filter field and type S20. The list of target microcontrollers is
reduced to those that match what you have typed.