User manual
UM0036 Project creation and build
Doc ID 7705 Rev 11 93/385
4.7 Customizing build settings for Cosmic C toolsets
The Project Settings window for building your application with the Cosmic C toolset
contains five tabs that are common to all the toolsets (General, MCU selection, Debug, Pre-
link and Post-Build) and three tabs that contain options and settings that are specific to the
Cosmic C compiler toolsets.
This section provides details about configuring options that are specific to the Cosmic C
toolset. These options include:
● Cosmic C compiler tab
● Cosmic C Assembler tab
● Cosmic C linker tab
Configuring projects settings in the five common tabs is described in Section 4.5:
Configuring project settings on page 84.
Note: For complete details regarding options for this toolset, refer to the C Cross Compiler User’s
Guide provided by Cosmic.
Provided microcontroller-specific C header files for Cosmic
Depending on your MCU you can include a header file provided with STVD, which defines
the device's peripheral registers. This will save you the time of creating this header file
yourself.
Caution: The C header files provided with STVD for ST7 and STM8 microcontrollers are not the same
as those provided for the ST7 Library and STM8 Library. ST7 and STM8 library users should
use the C header and/or ASM include files specific to that library.
Depending on your installation, the C header files provided with STVD are typically located
at:
C:\Program Files\STMicroelectronics\st_toolset\include\
To build your project using the provided header file for your device, specify its inclusion in
your application code. The name of the file to use is device_name.h.
Header files are provided for virtually all the supported devices. If you do not find your
device's name in the header files, this may be because the full name is not used. To
determine if your device has a header file, you can check the Peripheral Registers window
(View > Peripheral Registers) in the debug context. If peripheral register information is
provided in this window, then a header file has been generated for your device. The correct
file for your device, is the one with the device name you found in the Peripheral Registers
window.
Using the Project Settings interface
The tabs (C Compiler, Assembler and Linker) have a common interface that allows you to
choose from standard configurations, customize options and view changes to the command
line as you apply different options.
When the Category List box is set to General, the tab provides check boxes and list boxes
for easy access to commonly used options and configurations (see Figure 62).