ARM Cortex G++我正在为Cortex M7&#x2B写一个EDMA串行驱动程序。我正在尝试使用c++,想知道是否可能
我正在编写Cortex M7+ EDMA串行驱动程序。我想在C ++中这样做,从制造商的示例中可以在C中工作。我遇到了一些问题之一。我知道如何从中断中调用静态C ++函数,这不是问题。问题在于他们的驱动程序要求EDMA转移的Ciruclar缓冲区位于不可缓存的内存中。
/* allocate ring buffer section. */
AT_NONCACHEABLE_SECTION_INIT(uint8_t _ringBuffer[RX_RING_BUFFER_SIZE]) = {0};
/* Allocate TCD memory poll with ring buffer used. */
AT_NONCACHEABLE_SECTION_ALIGN(static edma_tcd_t _tcdMemoryPoolPtr[1],
sizeof(edma_tcd_t));
有没有办法使用类变量来执行此操作,或者当我实例化班级时,我需要将整个班级放置在该领域?还是我应该把那些可怕的东西留在c中?
谢谢
I am writing a cortex M7+ edma serial driver. I want to do it in c++ I have it working in c from the examples from the manufacturer. One of the problems I am having a few problems. I know how to call a static C++ function from the interrupt that is not the problem. The problem is that their driver requires that the ciruclar buffer for the edma transfer be located in non cacheable memory.
/* allocate ring buffer section. */
AT_NONCACHEABLE_SECTION_INIT(uint8_t _ringBuffer[RX_RING_BUFFER_SIZE]) = {0};
/* Allocate TCD memory poll with ring buffer used. */
AT_NONCACHEABLE_SECTION_ALIGN(static edma_tcd_t _tcdMemoryPoolPtr[1],
sizeof(edma_tcd_t));
Is there a way to do this with class variables, or when I instantiate my class do I need to place the whole class in this area? Or should I just leave the darn thing in C??
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论