ARM Cortex G++我正在为Cortex M7&#x2B写一个EDMA串行驱动程序。我正在尝试使用c++,想知道是否可能

发布于 2025-01-28 11:48:51 字数 505 浏览 2 评论 0原文

我正在编写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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文