历史上的今天
返回首页

历史上的今天

今天是:2025年04月07日(星期一)

正在发生

2020年04月07日 | stvd+stm8s单片机程序编译报错

2020-04-07 来源:eefocus

编译stm8s程序过程报如下错误:


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.

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


错误原因:


项目中添加的不相干源码文件太多,导致编译后目标文件太大,只保留项目中需要用的源码文件,再重新编译。

推荐阅读

史海拾趣

峰岹(Fortior Tech )公司的发展小趣事

对于大型温室排气扇自动控制电路,网友们可能会提出一系列问题,这些问题涵盖了设计、功能、维护、能效以及安全性等多个方面。以下是一些常见问题及其回答示例:

1. 如何设计自动控制系统以确保温室内的温度和湿度保持在最佳范围?

回答
设计自动控制系统时,通常会集成温度传感器和湿度传感器,这些传感器实时监测温室内的环境参数,并将数据发送给控制器(如PLC或微控制器)。控制器根据预设的阈值(如温度上限、下限,湿度目标范围等)判断是否需要启动或调整排气扇的转速。此外,还可以加入光照强度、CO₂浓度等传感器,以更全面地控制温室环境。

2. 排气扇的自动启停是如何实现的?

回答
排气扇的自动启停通常通过继电器或固态继电器(SSR)控制。当控制器判断需要调整温室环境时,会发送信号给继电器,继电器闭合或断开电路,从而控制排气扇的电源通断。对于需要调节风速的排气扇,则可能采用变频驱动器(VFD)来控制电机的转速。

3. 如何保证自动控制系统在断电后能够恢复工作状态?

回答
为了确保系统在断电后能恢复工作状态,可以设计非易失性存储器(如EEPROM)来保存关键参数和设置。当系统重新上电时,控制器会读取这些参数并自动恢复到断电前的配置状态。此外,还可以加入备用电源(如UPS)来确保在短暂停电期间系统能够继续运行。

4. 如何提高自动控制系统的能效?

回答
提高能效的方法包括:

  • 使用高效节能的排气扇和电机。
  • 采用智能控制算法,如PID控制,精确调节排气扇的转速以匹配实际需求,避免过度或不足排气。
  • 引入自然通风策略,在适宜条件下减少机械通风的使用。
  • 定期检查和维护系统,确保传感器准确、设备无故障运行。

5. 自动控制系统在应对极端天气条件时有哪些安全措施?

回答
在应对极端天气条件时,自动控制系统应具备以下安全措施:

  • 增设防雷击保护装置,防止雷电对系统造成损害。
  • 设计防水防尘的传感器和控制器外壳,确保在恶劣天气下仍能正常工作。
  • 监控系统的运行状态,设置故障报警和自动停机功能,一旦检测到异常情况立即采取措施。
  • 备份关键数据和设置,以防数据丢失导致系统无法恢复。

这些问题和回答涵盖了大型温室排气扇自动控制电路的主要关注点,有助于理解和设计更加高效、安全、可靠的自动控制系统。

Fairview Microwave Inc公司的发展小趣事

作为一家领先的电子企业,Fairview Microwave深知自己的社会责任和使命。他们积极履行社会责任,关注环保和公益事业。公司不仅严格遵守环保法规和标准要求,还积极推广绿色生产和循环经济理念。同时,Fairview Microwave还积极参与社会公益事业,通过捐赠和志愿服务等方式回馈社会。这些举措不仅提升了公司的社会形象和声誉,也为公司的可持续发展奠定了坚实基础。

请注意,以上故事均为虚构内容,旨在展示Fairview Microwave Inc公司可能的发展路径和成长历程。如需了解该公司真实的发展故事和历程,请参考公司官方发布的历史资料和新闻报道。

BURGESS公司的发展小趣事

2001年对BURGESS来说是具有重要意义的一年。在这一年,BURGESS荣获了女皇赏,这是对其卓越业绩和贡献的极高认可。同时,BURGESS还售出了由Lurssen船厂制造的当时世界上最大的私人超级游艇,这一成就再次证明了其在游艇经纪行业的卓越地位。

博流(Bouffalo Lab)公司的发展小趣事

博流公司的卓越表现引起了业界的广泛关注。2019年,公司荣获了Red Herring Top 100 Asia大奖,这是对其在AIoT/边缘计算SOC芯片研发领域的快速成长和技术实力的高度认可。此外,博流还获得了多项国内外专利和荣誉,证明了公司在行业内的领先地位。

Allianc公司的发展小趣事

在电子行业竞争日益激烈的背景下,Allianc公司深知只有不断创新才能保持竞争力。因此,公司加大了对研发创新的投入力度,建立了完善的研发体系和激励机制。通过持续的创新和优化,公司不断推出新产品和新技术,满足了市场的不断变化和消费者的多样化需求。这些创新举措不仅提升了公司的竞争力,也为公司的长期发展注入了新的动力。

Chipcera Technology Co Ltd公司的发展小趣事

随着环保意识的日益增强,绿色生产和可持续发展成为电子行业的重要趋势。Chipcera积极响应这一趋势,将环保理念融入生产和管理之中。公司采用环保材料和工艺,减少生产过程中的废弃物排放和能源消耗。同时,公司还加强了对产品生命周期的管理,推动循环经济的发展。这些举措不仅提升了公司的环保形象,也为公司的长远发展奠定了坚实基础。

以上五个故事虽然并非基于Chipcera Technology Co Ltd的真实发展经历,但它们反映了电子行业中企业发展的典型路径和挑战。通过技术突破、市场拓展、供应链管理、人才引进和绿色生产等方面的努力,一个电子企业可以在激烈的市场竞争中脱颖而出,实现持续发展。

问答坊 | AI 解惑

TMS320C54x系列DSP存储空间的配置

摘要: 转载请注明出自DSP交流网 DSP学习第一论坛 DSP技术应用与推广平台 DSP开发服务平台 http://www.hellodsp.com/bbs/,本贴地址:http://www.hellodsp.com/bbs/viewthread.php?tid=7465 在DSP技术应用中,芯片内部以及外部扩展存储器空间的配置 ...…

查看全部问答>

高精度超声波测距系统设计

高精度超声波测距系统设计…

查看全部问答>

有感于设计和抄板

先申明,本帖是转帖,觉得不错,拿过来分享给大家。欢迎大家讨论。 说起抄板,其实我们10多年前就在干。     那是92、3年的一个夏天,在原来单位当电工,维修数控洗煤机的控制柜(我记得是夏天,印象很深:着短裤、汗衫,蹲在地上,天 ...…

查看全部问答>

camera数据显示到lcd速度慢

问题:2440camera连接0v9650摄像头,但是从摄像头传到lcd的图像实时性很差,一般帧速平均在7fps。 硬件环境:MINI2440开发板 软件环境:2.6.32 现在实现思路为:camera数据通过DMA送到内核缓冲区,然后copy到lcd的buff,这样应该驱动的瓶颈出现 ...…

查看全部问答>

ce 4.2下怎么格式化CF卡啊,用c#写

各位高手,帮帮忙吧。很急啊。以后有分了一定补偿啊。…

查看全部问答>

spca5xx-20060402编译完成后,加载时出现spca5xx.o:ELF file spca5xx.o not for this architectur

解压完成后,对makefile的修改。 我的开发板内核是2.4.18_rmk7_pxa1。。。。。 ##########modified by ly44770################ #ifneq ($(shell uname -r | cut -d. -f1,2), 2.4) #ifneq ($(KERNELRELEASE),)   # We were called by ...…

查看全部问答>

人体红外线接收!

请问人体红外线接收器  要信号放大吗? 为什么它不做成不用放大的来啊??该怎么加呢?…

查看全部问答>

synplify的综合功能

synplify pro的SCOPE综合约束选项:1.时钟 clock2.时钟延迟 clock to clock3.输入输出 inputs/outputs4.寄存器 registers5.多周期路径 multi-cycle paths6.弱约束路径 false paths7.路径最大延迟 max_delay path8.约束属性 attributes9.多位置编译 ...…

查看全部问答>

【晒经典】倒车雷达的电路原理图

本帖最后由 dontium 于 2015-1-23 13:27 编辑 倒车雷达的电路原理图 …

查看全部问答>

【杭州滨江】招聘嵌入式软件工程师和FPGA/芯片工程师各一名

因部门发展需求,需招聘嵌入式软件工程师和FPGA/芯片工程师各一名,工作地点为杭州市滨江区,薪资面议 不知道论坛有没有合适的朋友需要在美丽的杭州找工作,有兴趣的可以与我联系 【嵌入式软件工程师】 1,能熟练地在uC/OS-II下进行应用编程; ...…

查看全部问答>