EWSTM8 Series Tutorial 07_Project Node Option Configuration (Part 2)

Publisher:星辰小鹿Latest update time:2021-03-02 Source: eefocus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1Written in front

The previous article " EWSTM8 Series Tutorial 06_Project Node Option Configuration (I) " describes the contents of the first five items in the node options (Target, Static Analysis, C/C++ Compiler, Assembler, Output Converter).


This article describes the remaining items: Custom build, Build Actions, Linker, Debugger, and ST-LINK tool.


In order to make it convenient for everyone to view the tutorial anytime and anywhere on their mobile phones while taking the bus, subway, or going out to do business, this article is included in the [EWSTM8 Series Tutorial]. You can view it by replying [EWSTM8 Series Tutorial] on the WeChat public account.


2

Custom build

2.1 Custom Tool Configuration

picture

1. Filename extensions: file extensions

Such as: extension.lex


2. Command line: command line

The command format is: flex $FILE_PATH$ -o$FILE_BNAME$.c


3.Output file: Output file

Format:

$FILE_BPATH$.c

$FILE_BPATH$.h


4. Additional input files: Additional input files

For example: $TOOLKIT_DIR$incstdio.h


5. Run this tool before all other tools: Run this tool before running other tools


The above five options actually work together to complete a function, for example: using a tool (command) to convert and output an input file.


3

Build Actions

3.1 Build Actions Configuration

1.Pre-build command line: Execute the command line before "Build"

For example: copying a file before compiling, or modifying the contents of a file, etc.


2.Post-build command line: Execute the command line after "Build"

For example: after compiling, copy the hex or bin file, or add a checksum at the end of the bin file.


4

Linker

4.1 Config

picture

1.Linker configuration file: Linker configuration file

Automatically select the default linker configuration file based on the project settings. If you want to overwrite the default file, check "Override default".


2.Configuration file symbol definitions: Configuration file symbol definitions

Defines a constant configuration symbol to be used in the configuration file. The effect of such a symbol is the same as a symbol defined using the define symbol directive in the linker configuration file.


4.2 Library

picture

1.Automatic runtime library selection: Automatic runtime library selection

Make the linker automatically select the appropriate library based on your project settings.


2. Include C-SPY debugging support: Include C-SPY debugging support

Contains the debug libraries used for communication between debug applications and the debugger itself.


3.Buffered write: write buffer

Buffers terminal output during program execution, rather than printing each new character immediately to the C-SPY terminal I/O window. This option is useful when you are using a debugger system with slow communications.


4. Additional libraries:

Specifies additional libraries that you want the linker to include in the linking process. Only one library can be specified per line, and the full path to the library must be specified.

You can add it through the "Browse button" (similar to adding a path to a new project).


5.Override default program entry: Override the default program entry

By default, the program entry is __iar_program_start. The linker ensures that the module containing the program entry label is included and does not discard the section containing the label.

Entry symbol: Input symbol

Defined by application: Defined by application


4.3 Input

1.Keep symbols: Keep symbols


2.Raw binary image: Raw binary image

Link image pure binary file, specify parameters:

File:

Symbol:

Section: Part of the area

Align


4.4 Optimizations

I won't post the image here, there is only one checkbox for linker optimization:


1.Merge duplicate sections: Merge duplicate sections

Causes the linker to keep only one copy of equivalent read-only sections. Note that this may result in different functions or constants having the same address, so applications that rely on different addresses may not work correctly with the selected option.


4.5 Output

picture

1.Output filename: Output file name

Sets the name of the linker output file. By default, the linker will use the project name with the filename extension appended.


2. Include debug information in output: The output includes debug information

Causes the linker to generate an ELF output file including DWARF for debugging information.


4.6 List

picture

1.Generate linker map file: Generate linker map file


2.Generate log file: Generate log file

Automatic library selection: Automatic library selection

Initialization decisions: Initialization decisions

Module selections: Module selection

Redirected symbols: Redirected symbols

Section selections:

Unused section fragments: Unused section fragments


4.7 #define predefined

No images are posted here, just some predefined symbols.


For example: TESTVER=1

Note: One line per line, no spaces on either side of the "=" sign.


4.8 Diagnostics

For details, please refer to "5.7 Diagnostics" in "EWSTM8 Series Tutorial 06".


4.9 Checksum

1.Fill unused code memory: Fill unused code memory

Fill pattern: Filling pattern

Start address: starting address

End address: End address


2.Generate checksum: Generate checksum

Checksum size: Checksum size (data type), can be 1, 2, or 4 bytes.

Alignment: Checksum alignment.

Algorithm: Select the algorithm type.

Result in full size: The result is full size

Complement: supplement

Bit order: bit order

Reverse byte order within word: byte order reversed

Checksum unit size: Checksum unit size (8, 16, 32 bits)


4.10 Extra Options

I won't post pictures here, the main point is to use the command line to configure the linker related options. The specific commands will be organized into a separate article later.


5

Debugger

This chapter mainly describes some option configurations related to debugging downloads.


5.1 Setup

picture

1. Driver: Driver

Select Debug Simulation Driver (Tool)


2. Run to: Run to

Run to the specified position after reset


3. Setup macros: Setting macros

Use macro file: Use macro file


4.Device description file: device description file

A default device description file is automatically selected based on the project settings. To override the default file, check "Override default" and specify an alternative file.


5.2 Images

picture

Three groups can be used

Download extra Images: Download external image files

Path:

Offset: offset address

Debug info only: Whether to debug only


5.3 Extra Options

I won’t go into details here, but will write a command line article later.


5.4 Plugins

picture

1.Select plugins to load: Select the plugins to load

2. Description: plugin description

3.Location: Plugin location

4.Originator: plugin source

5.Version: plugin version


6

ST-LINK Tools

I will not talk about the other two tools, simulator and STice, but will talk about the commonly used ST-LINK.


6.1 setup

picture

1.Download: Download

By default, when entering debug, the application is downloaded to RAM or flash. The download options allow you to modify the download behavior.


Suppress: Suppress

Disables downloading of code while preserving the current contents of flash. This command is useful if you want to debug an application that has already been downloaded into the target's memory.


Erase: Erase

Erase memory (FLASH, EEPROM and option bytes) before downloading code.


EraseVerify: Erase Verification

Verify that the address where the code was downloaded is erased.


Use option bytes configuration file: Use option bytes configuration file

Write the option byte settings defined in the option byte configuration file (obc) to the device before downloading.


2.Communication options: Communication options configuration

Use SWIM interface: Use SWIM interface

Communication log: Communication log


Reference address:EWSTM8 Series Tutorial 07_Project Node Option Configuration (Part 2)

Previous article:EWSTM8 Series Tutorial 06_Project Node Option Configuration (I)
Next article:EWSTM8 Series Tutorial 08_IDE Option Configuration (I)

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号