完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
嗨,
我最近遇到了FOC SDK 4.2基本电机控制项目的问题。 在为Eclipse AC6组装项目(来自Web版本的API源+ EWARM库)之后,我在库中执行初始化函数时遇到了使用错误。 我进一步研究了这一点,发现函数''PWMC_Init''的一个分支(BLX R1)到''R3_4_F30X_Init''清除了EPSR的T-Bit。分支前R1的内容为0x8001f88。所以行为很明确:地址是偶数而不是奇怪,因为它应该保留拇指模式。因此,CPU进入ARM模式并在下一条指令上失败,因为它只支持拇指模式。 (这是STM32F303VCT6) 为了解决这个问题,我刚刚申请了FOC SDK源代码的许可协议。希望我很快就能收到表格。 但是,我也想在这里讨论这个问题。我错了,IAR编译器(EWARM库)的行为应该与GCC相同,并在编译时向分支目标地址添加0x1吗?如果这是真的,那么SDK版本4.2的STM32F303_single_drive库可能是用错误的选项构建的吗? 最好的祝福, 马丁克雷尔曼 编辑:或者我的代码对齐错误了吗?这是偶数地址,正如我所期望的那样。 #FOC-SDK-stm32f303-GCC-AC6 以上来自于谷歌翻译 以下为原文 Hi, i recently ran into a problem with a FOC SDK 4.2 base motor control project. After assembling a project for Eclipse AC6 (API sources + EWARM library from web edition) I got usage faults during the execution of a initialization function in the library. I investigated this further and found out that a branch (BLX R1) to ''R3_4_F30X_Init'' from the function ''PWMC_Init'' cleared the T-Bit of the EPSR. The content of R1 was 0x8001f88 before the branch. So the behaviour is clear: The address is even and not odd as it should for preserving thumb mode. Thus, the CPU enters ARM mode and fails on the next instruction since it only supports thumb mode. (It is a STM32F303VCT6) To resolve the problem for me I just requested a license agreement for the source code of the FOC SDK. Hopefully I will receive the forms soon. But, I wanted to discuss this here as well. Am I wrong that the IAR compiler (EWARM library) should behave the same way as GCC and add a 0x1 to the branch target address at compile time? If this is true, then maybe the STM32F303_single_drive library of SDK version 4.2 was build with wrong options? Best regards, Martin Krellmann. Edit: Or did I make a mistake with my code alignment? Which is on even addresses as I would expect it to be. #foc-sdk-stm32f303-gcc-ac6 |
|
相关推荐
4个回答
|
|
这听起来非常像链接器中的错误。我必须为此修好我的。
https://bugs.launchpad.net/gcc-arm-embedded/+bug/1421389 以上来自于谷歌翻译 以下为原文 That sounds very much like a bug in your linker. I've had to fix mine for exactly that. https://bugs.launchpad.net/gcc-arm-embedded/+bug/1421389 |
|
|
|
Intersting,我在那里提到了那个版本的ld。
我刚刚下载了一个更新版本的gcc,并将在今晚晚些时候尝试使用我的Ac6插件。然后我会在这里发布一个更新。 以上来自于谷歌翻译 以下为原文 Intersting, I have exactly that version of ld mentioned there. I just downloaded a more recent version of gcc and will try to use that with my Ac6 Plugin later this evening. Then I will place an update here. |
|
|
|
你好。
我花了一段时间才能回到这个问题上。 我确实安装了最新版本的arm-gcc并再次检查它。不幸的是我还有问题。 你知道那个补丁是否合并到binutils? 谢谢。 马丁。 以上来自于谷歌翻译 以下为原文 Hi. It took me a while before I could get back on this issue. I did install the most recent version of arm-gcc an checked it again. Unfortunately I still have the issue. Do you know if that patch got merged into binutils? Thanks. Martin. |
|
|
|
嗨马丁,
我也在使用FOC SDK v4.2和AC6来编程STM32F303。就像你一样,遇到了同样的问题。你能找到解决方案吗? 在bug报告中,他们为链接器脚本提供了一个补丁,但我在我的系统中找不到elf23-arm.c。你试过打补丁吗? 最好的祝福, 弗朗西斯科 以上来自于谷歌翻译 以下为原文 Hi Martin, I am also using FOC SDK v4.2 with AC6 to program a STM32F303. And just as you, ran into the same problem. Could you find a solution? In the bug report they provide a patch for the linker script but I cannot find elf23-arm.c in my system. Did you try patching? Best regards, Francisco |
|
|
|
只有小组成员才能发言,加入小组>>
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
2586 浏览 1 评论
3194 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
1765 浏览 1 评论
3589 浏览 6 评论
5970 浏览 21 评论
924浏览 4评论
1300浏览 4评论
在Linux上安装Atollic TRUEStudio的步骤有哪些呢?
563浏览 3评论
使用DMA激活某些外设会以导致外设无法工作的方式生成代码是怎么回事
1287浏览 3评论
1338浏览 3评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-9 00:31 , Processed in 1.395238 second(s), Total 85, Slave 68 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号