完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我想知道我是否可以将STM32 FOC SDK与IAR EWARM或Keil MDK-ARM之外的编译器一起使用。
我已经查阅了一份名为“STM32 PMSM FOC SDK 4.2的文档(演示幻灯片) - 带有硬件工具的研讨会”,它说''支持两个IDE:IAR EWARM和KEIL?Vision。''但是,基于同一文档中的SDK工作流程图,我得出结论,STM32 PMSM FOC SDK仅生成参数作为头文件。所以,我认为我应该能够获取这些头文件并在任何我想要的地方使用。我对吗?如果没有,我错过了什么? 注意:我试图尝试,但SDK给出了一个错误,我认为是一个完全不同的主题(引脚映射)。 #STM32-永磁同步电机,FOC 以上来自于谷歌翻译 以下为原文 I am wondering if I can use STM32 FOC SDK with a compiler other than IAR EWARM or Keil MDK-ARM. I have looked up to a document (presentation slide) named ''STM32 PMSM FOC SDK 4.2 - Hands on workshop with hardware tools'', and it says that ''Two IDEs are supported: IAR EWARM and KEIL ?Vision.'' on page 25. But based on SDK workflow diagrams in the same document, I concluded that STM32 PMSM FOC SDK only generates parameters as header file. So, I thought I should be able to take those header files and use wherever I want. Am I right? And if not, what am I missing? Note: I attempted to try that, but the SDK gave an error which I think is about a completely different subject (pin mapping). #stm32-pmsm-foc |
|
相关推荐
3个回答
|
|
我已经尝试过,现在设法用gcc编译FOC代码。
了解FOC代码,同时将其移植到不受支持的编译器是很棘手的。最后,在我能够使用gcc之前,我必须“(几乎)与KEIL一起工作”。 一些FOC代码是“仅二进制”。这是作为其中一个受支持的编译器的库提供的。事实证明,gcc支持IAR库格式。 但是,IAR通过消除从未调用过的函数来优化代码。此功能也存在于gnu工具链中,但实现方式不同,因此它不适用于提供的IAR库。 。因此,您需要重新编译库(但是您没有获得源代码),或者是因为它将大约20k的死代码编译到二进制文件中。 此外,gnu链接器还有一个尚未在主流分布式二进制文件中修复的错误:PC对拇指函数的相对引用未正确链接。 https://bugs.launchpad.net/gcc-arm-embedded/+bug/1421389?comments=all 也就是说,我已经成功移植到海湾合作委员会....所以这是可能的。但没有ST的支持,因为他们说“不支持”...... 以上来自于谷歌翻译 以下为原文 I've tried and by now managed to compile the FOC code with gcc. Getting to know the FOC code while at the same time porting it to an unsupported compiler is tricky. In the end I had to ''get it (almost) working with KEIL'' before I was able to get it to work with gcc. Some of the FOC code is ''binary only''. This is provided as a library for one of the supported compilers. It turns out that gcc supports the IAR library format. However, IAR apparenlty optimizes the code by eliminating functions that are never called. This functionality also exists in the gnu toolchain, but is implemented differently so it doesn't work with the supplied IAR library. . Therefore you'd need to recompile the library (but you don't get the source), or live with the fact that it compiles some 20k of dead code into your binary. Also the gnu linker has a bug that isn't yet fixed in the mainstream distributed binaries: The PC relative references to thumb functions are not linked correctly. https://bugs.launchpad.net/gcc-arm-embedded/+bug/1421389?comments=all That said, I've manged to port to GCC.... So it is possible. But there is no support from ST, as they say ''not supported''.... |
|
|
|
你好Wolff.roger,
你能否就如何使用gcc进行编译提供一些指导? 目前我被困在链接预编译的目标文件。即链接STO_SpeednPosFdbkClass.o等,使程序在MCBoot函数上抛出硬故障。 以上来自于谷歌翻译 以下为原文 Hello Wolff.roger, Could you give some pointers on how you were able to compile with gcc? Currently I'm stuck linking pre-compiled object files. i.e. linking STO_SpeednPosFdbkClass.o and such, makes the program throw a Hard Fault on MCBoot function. |
|
|
|
您需要先修复链接器错误。它通过指针调用非拇指函数,然后CPU抛出异常,因为它不支持非拇指。
以上来自于谷歌翻译 以下为原文 You need to fix the linker bug first. It is calling a non-thumb function through a pointer, and the CPU then throws an exception because it doesn't support non-thumb. |
|
|
|
只有小组成员才能发言,加入小组>>
请教:在使用UDE STK时,单片机使用SPC560D30L1,在配置文件怎么设置或选择?里面只有SPC560D40的选项
2715 浏览 1 评论
3235 浏览 1 评论
请问是否有通过UART连接的两个微处理器之间实现双向值交换的方法?
1807 浏览 1 评论
3643 浏览 6 评论
6031 浏览 21 评论
1333浏览 4评论
206浏览 3评论
195浏览 3评论
对H747I-DISCO写程序时将CN2的st-link复用为usart1,再次烧录时无法检测到stlink怎么解决?
348浏览 2评论
STM32G474RE芯片只是串口发个数据就发烫严重是怎么回事?
440浏览 2评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-19 13:12 , Processed in 1.331833 second(s), Total 81, Slave 65 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号