vscode uses IAR_STM8 tool chain to compile and debug STM8 projects

Publisher:VelvetWhisperLatest update time:2021-10-27 Source: eefocusKeywords:vscode  IAR  STM8 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

This article describes how to use the IAR_STM8 tool chain on EIDE to complete project compilation and use STM8-Debug to complete debugging

This article takes STM8S105K4T6 as an example


1. Create an 8/16 Bit MCU project using EIDE

insert image description here


2. Create a folder in the project directory and copy the STM8S standard peripheral library to this directory

insert image description here


3. Add macros, in this case: STM8S105

insert image description here


4. Add the STM8S_StdPeriph_Driver directory to the project and exclude unused and unsupported peripherals

insert image description here
Exclude peripherals that are not supported by the chip and peripherals that are not needed
insert image description here


5. Switch to the IAR_STM8 tool chain, open the configuration, and fill in the link script name to be used

All available linker scripts are located in: stm8config
insert image description here


6. Write the code and compile it

insert image description here


7. Fill in launch.json, connect STLink, and press F5 to start debugging

EIDE will generate a default configuration that can be used as a reference
insert image description here


This template has been uploaded and can be created directly from the template via EIDE


Keywords:vscode  IAR  STM8 Reference address:vscode uses IAR_STM8 tool chain to compile and debug STM8 projects

Previous article:出现“Unable to create configuration 'Debug' using tool chain ‘STM8’
Next article:STM8 STM8S208MB registers

Recommended ReadingLatest update time:2024-11-22 20:33

STM8 study notes three ---- button experiment
I did a button experiment today. The pin definition of the button in Qingfeng's source code seems to be wrong, and it is inconsistent with the development board schematic. The correct pin definition should be: #define KEY3_PIN        GPIO_PIN_3  #define KEY2_PIN        GPIO_PIN_4 #define KEY1_PIN        GPIO_PIN_0
[Microcontroller]
STM8 study notes (I): GPIO
I soldered a STM8 minimum system board last night, it can run and download  I worked on it all night... but got nothing. Maybe influenced by STM32, I always wanted to use its own library, but I was depressed for a long time. No, without its own library I went online to look up a routine for operating an LED. I
[Microcontroller]
Develop STM8 in STVD environment
After STVD compiled the project, I didn't know where to check the FLASH, EEPROM, and RAM occupied by the firmware, which was very inconvenient. After consulting relevant information, I finally found a simple and efficient method, which I tested and found useful! 1. First, you need to download a third-party tool, see
[Microcontroller]
STM8 online simulation ---- advanced application
First, the simulation interface and menu bar are introduced. Menu bar View options There is no limit on the number of STM8 software breakpoints, but the interrupt cannot be set in the interrupt vector table. STM8S supports RD/WR on-fly function during debugging, so users can directly observe the changes of var
[Microcontroller]
STM8 online simulation ---- advanced application
Directly view the compiled code size in IAR software
  When using IAR software to compile code, you often cannot see the size of the compiled code after compilation. This is quite troublesome when debugging the program. The following summarizes the two simplest methods to view the code size in IAR compiler.   View the output compilation information   IAR's default c
[Microcontroller]
Directly view the compiled code size in IAR software
IAR EW for STM8 3.11.1 Chinese package Chinese tutorial
Download address of Chinese localization package: https://me.csdn.net/download/u010210711 Chinese localization tutorial Directly unzip the Chinese localization package and copy it to the bin folder of the installation directory, such as: C:Program Files (x86)IAR SystemsEmbedded Workbench 8.3commonbin After Chinese tr
[Microcontroller]
IAR EW for STM8 3.11.1 Chinese package Chinese tutorial
STM8 interrupt masking and processing flow
STM8 interrupt masking and processing flow Interrupt masking is managed through bits I1 and I0 of the CC register and ITC_SPRx which sets the software priority of each interrupt vector (Table 13). The process flow is shown in Figure 17: (Table 13: Software Priority) (Figure 17: Interrupt processing flow chart) When
[Microcontroller]
STM8 interrupt masking and processing flow
PCF8563 electronic clock experiment based on STM8
Experimental purpose: Use the two pins of the STM8 chip to simulate the I2C bus timing to read and write the time of the PCF8563 electronic clock 2. Register structure 3. I2C bus protocol The microcontroller source program is as follows: /***********************************************************************
[Microcontroller]
PCF8563 electronic clock experiment based on STM8
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号