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
2.1 Custom Tool Configuration
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
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
4.1 Config
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
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
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
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
This chapter mainly describes some option configurations related to debugging downloads.
5.1 Setup
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
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
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
I will not talk about the other two tools, simulator and STice, but will talk about the commonly used ST-LINK.
6.1 setup
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
Previous article:EWSTM8 Series Tutorial 06_Project Node Option Configuration (I)
Next article:EWSTM8 Series Tutorial 08_IDE Option Configuration (I)
- Popular Resources
- Popular amplifiers
- Learn ARM development(15)
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Learn ARM development(15)
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- In the LLC circuit, when the operating frequency fs is less than the resonant frequency fr, there is a problem with the secondary rectifier diode voltage waveform.
- bq40z50 series thermistor resistance coefficient calculator
- How should a fast charging decoy be evaluated?
- "Python Programming: From Beginners to Practice"
- The hierarchical wordline structure can improve the SRAM read and write speed and reduce the circuit dynamic power consumption
- What is your career plan for electronic engineering?
- The Differences and Working Principles of Digital Oscilloscopes and Analog Oscilloscopes
- TMS320F28335 ADC Learning Notes
- RGB Hexagonal Keyboard
- 3D Printer Project - Introduction to the Main Modules of STM32F750 (Part 4)