OpenEdv-开源电子网

 找回密码
 立即注册
正点原子全套STM32/Linux/FPGA开发资料,上千讲STM32视频教程免费下载...
查看: 6178|回复: 4

STM32F407移植到IAR Embedded Workbench语法错误

[复制链接]

8

主题

18

帖子

0

精华

初级会员

Rank: 2

积分
134
金钱
134
注册时间
2015-6-1
在线时间
21 小时
发表于 2015-12-7 11:16:07 | 显示全部楼层 |阅读模式
5金钱
Building configuration: STM32F4 - Debug
Updating build tree...
startup_stm32f40_41xxx.s
Error[40]: Bad instruction C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 43
Error[40]: Bad instruction C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 44
Error[40]: Bad instruction C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 54
Error[40]: Bad instruction C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 56
Error[40]: Bad instruction C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 64
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 69
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 70
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 71
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 72
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 73
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 74
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 75
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 76
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 77
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 78
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 79
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 80
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 81
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 82
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 83
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 84
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 87
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 88
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 89
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 90
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 91
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 92
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 93
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 94
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 95
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 96
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 97
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 98
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 99
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 100
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 101
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 102
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 103
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 104
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 105
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 106
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 107
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 108
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 109
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 110
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 111
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 112
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 113
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 114
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 115
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 116
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 117
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 118
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 119
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 120
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 121
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 122
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 123
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 124
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 125
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 126
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 127
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 128
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 129
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 130
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 131
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 132
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 133
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 134
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 135
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 136
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 137
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 138
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 139
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 140
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 141
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 142
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 143
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 144
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 145
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 146
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 147
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 148
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 149
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 150
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 151
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 152
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 153
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 154
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 155
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 156
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 157
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 158
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 159
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 160
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 161
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 162
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 163
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 164
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 165
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 166
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 167
Warning[410]: DC or DS directive while in CODE area. C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 168
Error[40]: Bad instruction C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 174
Error[40]: Bad instruction C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 177
Error[0]: Invalid syntax C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 178
Error[40]: Bad instruction C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 186
Error[40]: Bad instruction C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 190
Error[0]: Invalid syntax C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 191
Error[40]: Bad instruction C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 193
Error[40]: Bad instruction C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 195
Error[0]: Invalid syntax C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 196
Error[40]: Bad instruction C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 198
Error[40]: Bad instruction C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 200
Error[0]: Invalid syntax C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 201
Error[40]: Bad instruction C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 203
Error[40]: Bad instruction C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 205
Error[0]: Invalid syntax C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 206
Error[40]: Bad instruction C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 208
Error[40]: Bad instruction C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 210
Error[0]: Invalid syntax C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 211
Error[40]: Bad instruction C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 213
Error[40]: Bad instruction C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 214
Error[0]: Invalid syntax C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 215
Error[40]: Bad instruction C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 217
Error[40]: Bad instruction C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 219
Error[0]: Invalid syntax C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 220
Error[40]: Bad instruction C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 222
Error[40]: Bad instruction C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 223
Error[0]: Invalid syntax C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 224
Error[40]: Bad instruction C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 226
Error[40]: Bad instruction C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 227
Error[0]: Invalid syntax C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 228 Error[0]: Invalid syntax C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 280
Error[0]: Invalid syntax C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 281
Error[0]: Invalid syntax C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 282
Error[0]: Invalid syntax C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 283
Error[0]: Invalid syntax C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 304
Error[0]: Invalid syntax C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 305
Error[0]: Invalid syntax C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 306
Error[0]: Invalid syntax C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 307
Error[0]: Invalid syntax C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 308
Error[0]: Invalid syntax C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 309
Error[0]: Invalid syntax C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 310
Error[0]: Invalid syntax C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 311
Error[0]: Invalid syntax C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 312
Error[0]: Invalid syntax C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 313
Error[0]: Invalid syntax C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 314
Error[0]: Invalid syntax C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 315
Error[40]: Bad instruction C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 402
Error[413]: 'ALIGN' is illegal. Use directive ALIGNROM or ALIGNRAM (the first parameter is raised to the power of 2, the second is a 32-bit fill value). C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 404
Error[0]: Invalid syntax C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 409
Error[413]: 'ALIGN' is illegal. Use directive ALIGNROM or ALIGNRAM (the first parameter is raised to the power of 2, the second is a 32-bit fill value). C:\Desktop\STM32F4_P\CORE\startup_stm32f40_41xxx.s 428
Error while running Assembler
sys.c 
Error[Pe040]: expected an identifier C:\Desktop\STM32F4_P\SYSTEM\sys\sys.c 22
Error[Pe260]: explicit type is missing ("int" assumed) C:\Desktop\STM32F4_P\SYSTEM\sys\sys.c 22
Error[Pe020]: identifier "WFI" is undefined C:\Desktop\STM32F4_P\SYSTEM\sys\sys.c 24
Error[Pe040]: expected an identifier C:\Desktop\STM32F4_P\SYSTEM\sys\sys.c 27
Error[Pe260]: explicit type is missing ("int" assumed) C:\Desktop\STM32F4_P\SYSTEM\sys\sys.c 27
Error[Pe020]: identifier "CPSID" is undefined C:\Desktop\STM32F4_P\SYSTEM\sys\sys.c 29
Error[Pe065]: expected a ";" C:\Desktop\STM32F4_P\SYSTEM\sys\sys.c 30
Error[Pe040]: expected an identifier C:\Desktop\STM32F4_P\SYSTEM\sys\sys.c 33
Error[Pe260]: explicit type is missing ("int" assumed) C:\Desktop\STM32F4_P\SYSTEM\sys\sys.c 33
Error[Pe020]: identifier "CPSIE" is undefined C:\Desktop\STM32F4_P\SYSTEM\sys\sys.c 35
Error[Pe065]: expected a ";" C:\Desktop\STM32F4_P\SYSTEM\sys\sys.c 36
Error[Pe040]: expected an identifier C:\Desktop\STM32F4_P\SYSTEM\sys\sys.c 40
Error[Pe260]: explicit type is missing ("int" assumed) C:\Desktop\STM32F4_P\SYSTEM\sys\sys.c 40
Error[Pe020]: identifier "MSR" is undefined C:\Desktop\STM32F4_P\SYSTEM\sys\sys.c 42
Error[Pe065]: expected a ";" C:\Desktop\STM32F4_P\SYSTEM\sys\sys.c 43
Error while running C/C++ Compiler
usart.c 
Warning[Pe161]: unrecognized #pragma C:\Desktop\STM32F4_P\SYSTEM\usart\usart.c 38
Error[Pe020]: identifier "FILE" is undefined C:\Desktop\STM32F4_P\SYSTEM\usart\usart.c 45
Error[Pe020]: identifier "FILE" is undefined C:\Desktop\STM32F4_P\SYSTEM\usart\usart.c 52
Error while running C/C++ Compiler
 
Total number of errors: 140
Total number of warnings: 99

移植原子哥的STM32F4工程模板到IAR,出现如上错误,请大家指教,谢谢!

 

最佳答案

查看完整内容[请看2#楼]

MDK和IAR两个编译器在汇编方面是不兼容的,你应该找到库函数添加IAR环境的startup_stm32f40_41xxx.s文件
正点原子逻辑分析仪DL16劲爆上市
回复

使用道具 举报

33

主题

481

帖子

2

精华

论坛元老

Rank: 8Rank: 8

积分
5075
金钱
5075
注册时间
2013-10-4
在线时间
654 小时
发表于 2015-12-7 11:16:08 | 显示全部楼层
MDK和IAR两个编译器在汇编方面是不兼容的,你应该找到库函数添加IAR环境的startup_stm32f40_41xxx.s文件
回复

使用道具 举报

0

主题

1

帖子

0

精华

新手入门

积分
11
金钱
11
注册时间
2016-8-27
在线时间
0 小时
发表于 2016-8-27 10:47:56 | 显示全部楼层
@lewuyou 先用IAR安装目录中IAR Systems\Embedded Workbench 7.0\arm\RTOS\SEGGER\ST\STM32F4\embOS_STM32F4_Discovery\DeviceSupport目录下的startup_stm32f40x.s替换startup_stm32f40_41xxx.s 文件,然后将sys.c文件中的嵌入式汇编按照如下方式进行修改:
void WFI_SET(void)
{
  __asm("WFI");          
}
void INTX_DISABLE(void)
{
        __asm("CPSID   I");
        __asm("BX      LR");          
}
void INTX_ENABLE(void)
{
        __asm("CPSIE   I");
        __asm("BX      LR");  
}
void MSR_MSP(u32 addr)
{
        __asm("MSR MSP, r0");                         //set Main Stack value
        __asm("BX r14");
}
然后就能编译通过了。祝顺利,不明白的可以邮件联系whtiea@sina.cn. ^_^
回复

使用道具 举报

8

主题

18

帖子

0

精华

初级会员

Rank: 2

积分
134
金钱
134
注册时间
2015-6-1
在线时间
21 小时
 楼主| 发表于 2016-12-22 08:31:06 | 显示全部楼层
whtiea 发表于 2016-8-27 10:47
@lewuyou 先用IAR安装目录中IAR Systems\Embedded Workbench 7.0\arm\RTOS\SEGGER\ST\STM32F4\embOS_STM32F ...

谢谢!已解决了!
回复

使用道具 举报

2

主题

394

帖子

0

精华

金牌会员

Rank: 6Rank: 6

积分
2115
金钱
2115
注册时间
2012-5-8
在线时间
314 小时
发表于 2019-4-2 09:03:17 | 显示全部楼层
多谢楼主分享
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则



关闭

原子哥极力推荐上一条 /2 下一条

正点原子公众号

QQ|手机版|OpenEdv-开源电子网 ( 粤ICP备12000418号-1 )

GMT+8, 2025-6-10 04:03

Powered by OpenEdv-开源电子网

© 2001-2030 OpenEdv-开源电子网

快速回复 返回顶部 返回列表