打印
[技术问答]

vscode编译HC32L196的startup_hc32l19x.s问题

[复制链接]
2872|8
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
junzheng|  楼主 | 2024-3-11 16:40 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
在vscode下编译HC32L196的startup_hc32l19x.s,报告下面的错误,查资料说是这个.s是Keil用的,gcc需要不同的.s,从哪里能找到gcc用的.s呢?

[AS]    EWARM/startup_hc32l19x.s
EWARM/startup_hc32l19x.s: Assembler messages:
EWARM/startup_hc32l19x.s:1: Error: junk at end of line, first unrecognized character is `*'
EWARM/startup_hc32l19x.s:2: Error: bad instruction `copyright (C)2019,Huada Semiconductor Co.,Ltd All rights reserved.'
EWARM/startup_hc32l19x.s:4: Error: bad instruction `this software is owned and published by:'
EWARM/startup_hc32l19x.s:5: Error: bad instruction `huada Semiconductor Co.,Ltd("HDSC").'
EWARM/startup_hc32l19x.s:7: Error: bad instruction `by DOWNLOADING,INSTALLING OR USING THIS SOFTWARE,YOU AGREE TO BE BOUND'
EWARM/startup_hc32l19x.s:8: Error: bad instruction `by ALL THE TERMS AND CONDITIONS OF THIS AGREEMENT.'
EWARM/startup_hc32l19x.s:10: Error: bad instruction `this software contains source code for use with HDSC'
EWARM/startup_hc32l19x.s:11: Error: unexpected character ` ' in type specifier
EWARM/startup_hc32l19x.s:11: Error: bad instruction `components. This software is licensed by HDSC to be adapted only'
EWARM/startup_hc32l19x.s:12: Error: bad instruction `for use in systems utilizing HDSC components. HDSC shall not be'
EWARM/startup_hc32l19x.s:13: Error: bad instruction `responsible for misuse or illegal use of this software for devices not'
EWARM/startup_hc32l19x.s:14: Error: bad instruction `supported herein. HDSC is providing this software "AS IS"and will'
EWARM/startup_hc32l19x.s:15: Error: bad instruction `not be responsible for issues arising from incorrect user implementation'
EWARM/startup_hc32l19x.s:16: Error: bad instruction `of the software.'
EWARM/startup_hc32l19x.s:19: Error: bad instruction `hdsc MAKES NO WARRANTY,EXPRESS OR IMPLIED,ARISING BY LAW OR OTHERWISE,'
EWARM/startup_hc32l19x.s:20: Error: bad instruction `regarding THE SOFTWARE(INCLUDING ANY ACOOMPANYING WRITTEN MATERIALS),'  
EWARM/startup_hc32l19x.s:21: Error: bad instruction `its PERFORMANCE OR SUITABILITY FOR YOUR INTENDED USE,INCLUDING,'        
EWARM/startup_hc32l19x.s:22: Error: bad instruction `without LIMITATION,THE IMPLIED WARRANTY OF MERCHANTABILITY,THE IMPLIED'
EWARM/startup_hc32l19x.s:23: Error: bad instruction `warranty OF FITNESS FOR A PARTICULAR PURPOSE OR USE,AND THE IMPLIED'
EWARM/startup_hc32l19x.s:24: Error: bad instruction `warranty OF NONINFRINGEMENT.'
EWARM/startup_hc32l19x.s:25: Error: bad instruction `hdsc SHALL HAVE NO LIABILITY(WHETHER IN CONTRACT,WARRANTY,TORT,'        
EWARM/startup_hc32l19x.s:26: Error: bad instruction `negligence OR OTHERWISE)FOR ANY DAMAGES WHATSOEVER(INCLUDING,WITHOUT'
EWARM/startup_hc32l19x.s:27: Error: bad instruction `limitation, DAMAGES FOR LOSS OF BUSINESS PROFITS,BUSINESS INTERRUPTION,'

EWARM/startup_hc32l19x.s:28: Error: bad instruction `loss OF BUSINESS INFORMATION,OR OTHER PECUNIARY LOSS)ARISING FROM USE OR'
EWARM/startup_hc32l19x.s:29: Error: bad instruction `inability TO USE THE SOFTWARE,INCLUDING,WITHOUT LIMITATION,ANY DIRECT,'
EWARM/startup_hc32l19x.s:30: Error: bad instruction `indirect, INCIDENTAL,SPECIAL OR CONSEQUENTIAL DAMAGES OR LOSS OF DATA,'
EWARM/startup_hc32l19x.s:31: Error: bad instruction `savings OR PROFITS,'
EWARM/startup_hc32l19x.s:32: Error: bad instruction `even IF Disclaimer HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.'

EWARM/startup_hc32l19x.s:33: Error: bad instruction `you ASSUME ALL RESPONSIBILITIES FOR SELECTION OF THE SOFTWARE TO ACHIEVE YOUR'
EWARM/startup_hc32l19x.s:34: Error: bad instruction `intended RESULTS,AND FOR THE INSTALLATION OF,USE OF,AND RESULTS OBTAINED'
EWARM/startup_hc32l19x.s:35: Error: bad instruction `from, THE SOFTWARE.'
EWARM/startup_hc32l19x.s:37: Error: bad instruction `this software may be replicated in part or whole for the licensed use,'
EWARM/startup_hc32l19x.s:38: Error: bad instruction `with the restriction that this Disclaimer and Copyright notice must be'
EWARM/startup_hc32l19x.s:39: Error: bad instruction `included with each copy of this software,whether used in part or whole,'

EWARM/startup_hc32l19x.s:40: Error: bad instruction `at all times.'
EWARM/startup_hc32l19x.s:41: Error: junk at end of line, first unrecognized character is `/'
EWARM/startup_hc32l19x.s:50: Error: bad instruction `module ?cstartup'
EWARM/startup_hc32l19x.s:52: Error: bad instruction `forward declaration of sections.'
EWARM/startup_hc32l19x.s:53: Error: bad instruction `section CSTACK:DATA:NOROOT(3)'
EWARM/startup_hc32l19x.s:55: Error: bad instruction `extern __iar_program_start'
EWARM/startup_hc32l19x.s:56: Error: bad instruction `extern SystemInit'
EWARM/startup_hc32l19x.s:57: Error: bad instruction `public __vector_table'
EWARM/startup_hc32l19x.s:59: Error: bad instruction `section .intvec:CODE:ROOT(8)'
EWARM/startup_hc32l19x.s:60: Error: bad instruction `data'
EWARM/startup_hc32l19x.s:61: Error: bad instruction `__vector_table'
EWARM/startup_hc32l19x.s:62: Error: bad instruction `dcd sfe(CSTACK)'
EWARM/startup_hc32l19x.s:62: Error: bad instruction `top of Stack'
EWARM/startup_hc32l19x.s:63: Error: bad instruction `dcd Reset_Handler'
EWARM/startup_hc32l19x.s:63: Error: bad instruction `reset'
EWARM/startup_hc32l19x.s:64: Error: bad instruction `dcd NMI_Handler'
EWARM/startup_hc32l19x.s:64: Error: bad instruction `nmi'
EWARM/startup_hc32l19x.s:65: Error: bad instruction `dcd HardFault_Handler'
EWARM/startup_hc32l19x.s:65: Error: bad instruction `hard Fault'
EWARM/startup_hc32l19x.s:66: Error: bad instruction `dcd 0'
EWARM/startup_hc32l19x.s:66: Error: bad instruction `reserved'
EWARM/startup_hc32l19x.s:67: Error: bad instruction `dcd 0'
EWARM/startup_hc32l19x.s:67: Error: bad instruction `reserved'
EWARM/startup_hc32l19x.s:68: Error: bad instruction `dcd 0'
EWARM/startup_hc32l19x.s:68: Error: bad instruction `reserved'
EWARM/startup_hc32l19x.s:69: Error: bad instruction `dcd 0'
EWARM/startup_hc32l19x.s:69: Error: bad instruction `reserved'
EWARM/startup_hc32l19x.s:70: Error: bad instruction `dcd 0'
EWARM/startup_hc32l19x.s:70: Error: bad instruction `reserved'
EWARM/startup_hc32l19x.s:71: Error: bad instruction `dcd 0'
EWARM/startup_hc32l19x.s:71: Error: bad instruction `reserved'
EWARM/startup_hc32l19x.s:72: Error: bad instruction `dcd 0'
EWARM/startup_hc32l19x.s:72: Error: bad instruction `reserved'
EWARM/startup_hc32l19x.s:73: Error: bad instruction `dcd SVC_Handler'
EWARM/startup_hc32l19x.s:73: Error: bad instruction `svcall'
EWARM/startup_hc32l19x.s:74: Error: bad instruction `dcd 0'
EWARM/startup_hc32l19x.s:74: Error: bad instruction `reserved'
EWARM/startup_hc32l19x.s:75: Error: bad instruction `dcd 0'
EWARM/startup_hc32l19x.s:75: Error: bad instruction `reserved'
EWARM/startup_hc32l19x.s:76: Error: bad instruction `dcd PendSV_Handler'
EWARM/startup_hc32l19x.s:76: Error: bad instruction `pendsv'
EWARM/startup_hc32l19x.s:77: Error: bad instruction `dcd SysTick_Handler'
EWARM/startup_hc32l19x.s:77: Error: bad instruction `systick'
EWARM/startup_hc32l19x.s:79: Error: bad instruction `numbered IRQ handler vectors'
EWARM/startup_hc32l19x.s:81: Error: bad instruction `renaming to device dependent ISR function names are done in'
EWARM/startup_hc32l19x.s:83: Error: bad instruction `dcd PORTA_IRQHandler'
EWARM/startup_hc32l19x.s:84: Error: bad instruction `dcd PORTB_IRQHandler'
EWARM/startup_hc32l19x.s:85: Error: bad instruction `dcd PORTC_E_IRQHandler'
EWARM/startup_hc32l19x.s:86: Error: bad instruction `dcd PORTD_F_IRQHandler'
EWARM/startup_hc32l19x.s:87: Error: bad instruction `dcd DMAC_IRQHandler'
EWARM/startup_hc32l19x.s:88: Error: bad instruction `dcd TIM3_IRQHandler'
EWARM/startup_hc32l19x.s:89: Error: bad instruction `dcd UART0_2_IRQHandler'
EWARM/startup_hc32l19x.s:90: Error: bad instruction `dcd UART1_3_IRQHandler'
EWARM/startup_hc32l19x.s:91: Error: bad instruction `dcd LPUART0_IRQHandler'
EWARM/startup_hc32l19x.s:92: Error: bad instruction `dcd LPUART1_IRQHandler'
EWARM/startup_hc32l19x.s:93: Error: bad instruction `dcd SPI0_IRQHandler'
EWARM/startup_hc32l19x.s:94: Error: bad instruction `dcd SPI1_IRQHandler'
EWARM/startup_hc32l19x.s:95: Error: bad instruction `dcd I2C0_IRQHandler'
EWARM/startup_hc32l19x.s:96: Error: bad instruction `dcd I2C1_IRQHandler'
EWARM/startup_hc32l19x.s:97: Error: bad instruction `dcd TIM0_IRQHandler'
EWARM/startup_hc32l19x.s:98: Error: bad instruction `dcd TIM1_IRQHandler'
EWARM/startup_hc32l19x.s:99: Error: bad instruction `dcd TIM2_IRQHandler'
EWARM/startup_hc32l19x.s:100: Error: bad instruction `dcd LPTIM0_1_IRQHandler'
EWARM/startup_hc32l19x.s:101: Error: bad instruction `dcd TIM4_IRQHandler'
EWARM/startup_hc32l19x.s:102: Error: bad instruction `dcd TIM5_IRQHandler'
EWARM/startup_hc32l19x.s:103: Error: bad instruction `dcd TIM6_IRQHandler'
EWARM/startup_hc32l19x.s:104: Error: bad instruction `dcd PCA_IRQHandler'
EWARM/startup_hc32l19x.s:105: Error: bad instruction `dcd WDT_IRQHandler'
EWARM/startup_hc32l19x.s:106: Error: bad instruction `dcd RTC_IRQHandler'
EWARM/startup_hc32l19x.s:107: Error: bad instruction `dcd ADC_DAC_IRQHandler'
EWARM/startup_hc32l19x.s:108: Error: bad instruction `dcd PCNT_IRQHandler'
EWARM/startup_hc32l19x.s:109: Error: bad instruction `dcd VC0_IRQHandler'
EWARM/startup_hc32l19x.s:110: Error: bad instruction `dcd VC1_2_IRQHandler'
....

使用特权

评论回复
沙发
wubangmi| | 2024-3-11 17:43 | 只看该作者
给你gcc的.s文件也没用啊,gcc编译器还需要.ld文件,还是安心用kei或者IAR吧

使用特权

评论回复
板凳
junzheng|  楼主 | 2024-3-11 21:07 | 只看该作者
wubangmi 发表于 2024-3-11 17:43
给你gcc的.s文件也没用啊,gcc编译器还需要.ld文件,还是安心用kei或者IAR吧

是的,还需要.ld文件。挺麻烦的,不过还是想玩儿玩儿。

使用特权

评论回复
地板
小夏天的大西瓜| | 2024-3-26 16:06 | 只看该作者
wubangmi 发表于 2024-3-11 17:43
给你gcc的.s文件也没用啊,gcc编译器还需要.ld文件,还是安心用kei或者IAR吧

gcc开发是不是有点不太容易?

使用特权

评论回复
5
wubangmi| | 2024-3-29 12:08 | 只看该作者
小夏天的大西瓜 发表于 2024-3-26 16:06
gcc开发是不是有点不太容易?

老祖宗很早就说了一句话:难者不会,会者不难。
自己那种专研之后学会了,你就会来一句:不过如此

使用特权

评论回复
6
610u| | 2024-4-30 09:52 | 只看该作者
IAR还是比较好用的,先精通其中一个吧。

使用特权

评论回复
7
AProgrammer| | 2024-10-10 11:16 | 只看该作者
LZ问题解决了吗?我用vscode创建了一个GD32的工程,编译也遇到了类似问题,用vscode的还是比较少

使用特权

评论回复
8
classroom| | 2024-10-22 12:14 | 只看该作者
确实,startup_hc32l19x.s 文件通常是针对 Keil IDE 编写的启动代码,而 GCC 编译器可能需要一个与之兼容但格式或语法略有不同的启动文件。

使用特权

评论回复
9
laocuo1142| | 2024-10-22 19:00 | 只看该作者
联系 HC32L196 的技术支持

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

20

主题

71

帖子

2

粉丝