stm8s MCU program compilation error

Publisher:TranquilDreamsLatest update time:2020-04-05 Source: eefocusKeywords:stm8s Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

The following error is reported during the compilation of the stm8s program:


Compiling stm8s_stdperiph_driversrcstm8s_adc2.c...

cxstm8 +mods0 +debug -pxp -no -pp -l -istm8s_stdperiph_driverinc -i"C:Program Files (x86)COSMICCXSTM8Hstm8" -i"C:Program Files (x86)STMicroelectronicsst_toolsetinclude"  -clDebug -coDebug stm8s_stdperiph_driversrcstm8s_adc2.c

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:50(10+3) bad struct/union operand

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:51(10+3) bad struct/union operand

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:52(10+3) bad struct/union operand

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:53(10+4) bad struct/union operand

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:54(10+4) bad struct/union operand

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:50(4+4) ADC2 undefined

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:54(17+21) ADC2_TDRL_RESET_VALUE undefined

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:53(17+21) ADC2_TDRH_RESET_VALUE undefined

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:52(17+20) ADC2_CR2_RESET_VALUE undefined

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:51(17+20) ADC2_CR1_RESET_VALUE undefined

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:50(17+20) ADC2_CSR_RESET_VALUE undefined

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:108(10+3) bad struct/union operand

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:108(17+13) ADC2_CR1_ADON undefined

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:108(4+4) ADC2 undefined

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:126(14+3) bad struct/union operand

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:130(14+3) bad struct/union operand

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:126(21+13) ADC2_CR1_ADON undefined

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:126(8+4) ADC2 undefined

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:130(32+13) ADC2_CR1_ADON undefined

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:130(8+4) ADC2 undefined

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:149(14+3) bad struct/union operand

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:154(14+3) bad struct/union operand

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:154(46) const assignment

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:149(30+14) ADC2_CSR_EOCIE undefined

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:149(8+4) ADC2 undefined

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:154(32+14) ADC2_CSR_EOCIE undefined

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:154(8+4) ADC2 undefined

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:172(10+3) bad struct/union operand

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:174(10+3) bad struct/union operand

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:172(4+4) ADC2 undefined

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:172(28+14) ADC2_CR1_SPSEL undefined

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:198(18+4) bad struct/union operand

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:199(18+4) bad struct/union operand

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:199(35+3) const assignment

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:203(18+4) bad struct/union operand

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:204(18+4) bad struct/union operand

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:211(18+4) bad struct/union operand

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:215(18+4) bad struct/union operand

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:215(88) const assignment

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:222(18+4) bad struct/union operand

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:226(18+4) bad struct/union operand

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:198(12+4) ADC2 undefined

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:203(12+4) ADC2 undefined

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:211(12+4) ADC2 undefined

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:215(12+4) ADC2 undefined

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:222(12+4) ADC2 undefined

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:226(12+4) ADC2 undefined

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:251(10+3) bad struct/union operand

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:253(10+3) bad struct/union operand

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:258(14+3) bad struct/union operand

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:263(14+3) bad struct/union operand

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:263(45) const assignment

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:267(10+3) bad struct/union operand

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:269(10+3) bad struct/union operand

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:251(4+4) ADC2 undefined

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:267(28+11) ADC2_CSR_CH undefined

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:251(28+14) ADC2_CR2_ALIGN undefined

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:258(21+13) ADC2_CR1_CONT undefined

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:263(32+13) ADC2_CR1_CONT undefined

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:292(10+3) bad struct/union operand

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:297(14+3) bad struct/union operand

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:297(47) const assignment

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:302(14+3) bad struct/union operand

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:306(10+3) bad struct/union operand

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:292(4+4) ADC2 undefined

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:292(28+15) ADC2_CR2_EXTSEL undefined

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:297(31+16) ADC2_CR2_EXTTRIG undefined

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:302(32+16) ADC2_CR2_EXTTRIG undefined

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:322(10+3) bad struct/union operand

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:322(17+13) ADC2_CR1_ADON undefined

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:322(4+4) ADC2 undefined

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:338(15+3) bad struct/union operand

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:341(22+3) bad struct/union operand

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:343(22+3) bad struct/union operand

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:350(22+3) bad struct/union operand

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:352(22+3) bad struct/union operand

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:338(9+4) ADC2 undefined

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:338(21+14) ADC2_CR2_ALIGN undefined

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:369(30+3) bad struct/union operand

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:369(36+12) ADC2_CSR_EOC undefined

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:369(24+4) ADC2 undefined

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:380(10+3) bad struct/union operand

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:380(40) const assignment

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:380(28+12) ADC2_CSR_EOC undefined

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:380(4+4) ADC2 undefined

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:391(28+3) bad struct/union operand

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:391(34+12) ADC2_CSR_EOC undefined

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:391(22+4) ADC2 undefined

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:401(10+3) bad struct/union operand

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:401(40) const assignment

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:401(28+12) ADC2_CSR_EOC undefined

#error cpstm8 stm8s_stdperiph_driversrcstm8s_adc2.c:401(4+4) ADC2 undefined

stm8s_stdperiph_driversrcstm8s_adc2.c:

 The command: "cxstm8 +mods0 +debug -pxp -no -pp -l -istm8s_stdperiph_driverinc -i"C:Program Files (x86)COSMICCXSTM8Hstm8" -i"C:Program Files (x86)STMicroelectronicsst_toolsetinclude"  -clDebug -coDebug stm8s_stdperiph_driversrcstm8s_adc2.c" has failed, the returned value is: 1

exit code=1.


wrong reason:

Too many irrelevant source code files are added to the project, resulting in a large target file after compilation. Only the source code files needed in the project are retained and recompiled.


Keywords:stm8s Reference address:stm8s MCU program compilation error

Previous article:stm8 programming tips (stvd)
Next article:Integrated Circuits - STM8 Microcontroller Notes

Recommended ReadingLatest update time:2024-11-16 13:01

stvd+stm8s: ERROR:before starting debug session, please, select a target
STVD reports the following error when simulating and debugging stm8s: Cause: STVD has no debug simulator set Solution: Click the STVD menu bar and select "Debug instrument"- "Target Settings...", select "Swim ST-Link" to make the above settings, but still reports the following error: Cause: When installing ST TOOLS
[Microcontroller]
stvd+stm8s: ERROR:before starting debug session, please, select a target
STM8S Development Summary
1. STM8S003 pin remapping function As shown in the figure, I want to use this correspondence:  PC5- TIM2_CH1;  PC6- TIM1_CH1;  PC7- TIM1_CH2;   The default functions of these three pins are:  PC5- SPI_SCK  PC6- SPI_MOSI  PC7- SPI_MISO  stm8s is not like stm32, which can just configure GPIO; stm8s needs to modify Opt
[Microcontroller]
STM8S Development Summary
Getting started with STM8S development: Using EWSTM8 (IAR STM8S) to create a new project and light up an LED
1. Pre-install the EWSTM8 (IAR STM8) software, which is called IAR Embedded Workbench for STMicroelectronics STM8 IDE 2. Download the STM8S standard library. The standard library used here is STM8S_StdPeriph_Lib V2.3.1 3. Create a new folder (name it as you like) as the folder where the project is located, and cre
[Microcontroller]
Getting started with STM8S development: Using EWSTM8 (IAR STM8S) to create a new project and light up an LED
STM8S TIM1 library function application
I personally think that ST's library functions are quite good to use. Before, I used to use functions I wrote myself, which were prone to errors. The following is a verified one, where the TIM1 timing interrupts once every 100 microseconds. void TIM1_TimeBaseInit(u16 TIM1_Prescaler,                        TIM1_Count
[Microcontroller]
STM8s serial communication uart
I am using stm8s103k3, a 32-pin microcontroller. The user manual says UART1, UART2, and UART3. But the pin function diagram only shows UART1, and when you open the stm8s103k.h header file, there is only the definition of the UART1 register. So I think there is only UART1. Since there is this function, I will use it. I
[Microcontroller]
STM8s serial communication uart
STM8S_002_TIM precise delay (blocking)
Ⅰ. Write in front In some specific situations, precise delay (us level) is required, especially for the underlying driver. If software delay is used, the delay will change with the change of system clock and various factors. Therefore, TIM precise delay is required. Blocking delay: From the start to the end of the d
[Microcontroller]
STM8S_002_TIM precise delay (blocking)
Solution to the problem that the UART of STM8S type microcontroller keeps entering the receiving interruption
Problem Description: In a project, the lower computer uses STM8S003F3 as the main chip. When using RS485 to communicate with the upper computer, it will always enter the receiving interrupt and will not receive the correct data from the upper computer at all. Solution process: At first, I thought that the proble
[Microcontroller]
STM8S timer operation
Overview STM8S provides three types of TIM timers: advanced control type (TIM1), general type (TIM2/TIM3/TIM5) and basic timer (TIM4/TIM6). Although they have different functions, they are all based on a common architecture . This common architecture makes it very easy and convenient to design applications using vario
[Microcontroller]
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
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号