完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我对这一点有点困惑。
PSoC Creator设计范围资源编辑器具有堆大小和堆栈大小的系统参数。存储在这个堆中的是什么?如果我理解正确,默认情况下根本没有任何动态分配,对吗?还是在那里? 我需要设置它以使我的FrReStoHeSp大小& pSoCoClor堆大小吗?我想没有,因为我认为免费预订只是完全保留了另一个区域。 就堆栈参数而言,这与FrRetos堆栈如何相互作用?同样,如果我正确理解,在创建任务时,Frror将任务堆栈的空间从自己的堆中定位。(我很确定这一点,因为堆栈大小是动态地提供给任务创建函数的)。这是否意味着我可以避开一个非常小的PSoC Creator堆栈大小,因为这个堆栈只用于初始化的东西和调度器本身,并且与AC不相交。实际任务堆栈? 有人能对此有所启发吗?我想确保我不会大量使用内存,但同时溢出这些类型的限制可能是调试的真正痛苦。 以上来自于百度翻译 以下为原文 I'm a bit confused on this one. The PSoC Creator design-wide resources editor has system parameters for heap size and stack size. What exactly is stored in this heap? If I understand properly there isn't any dynamic allocation at all by default, right? Or is there? Do I need to set it up so that my FreeRTOS heap size < the PSoC Creator heap size? I'm thinking no, because I think the FreeRTOS heap reservation just reserves another area entirely? As far as the stack parameter is concerned, how does this interact with the FreeRTOS stack? Again, if I understand correctly, FreeRTOS allocates space for task stacks from its own heap when the task is created. (I'm pretty sure about this, because the stack size is dynamically supplied to the task creation function.) Does this mean that I can get away with a very small PSoC Creator stack size, because that stack is only used for initialization stuff and for the scheduler itself, and is disjoint from the actual task stacks? Can anyone shed some light on this? I want to make sure I am not using lots of memory for nothing, but at the same time overflowing these types of limits can be a real pain to debug. |
|
相关推荐
2个回答
|
|
PSOC创建者设计宽资源编辑器具有系统参数
堆栈大小和堆栈大小。存储在这个堆中的是什么? 据推测,按照正常情况,任何调用MalCube()返回的内存将来自堆。 如果我明白 默认情况下,没有任何动态分配,对吗?还是在那里? ? 我需要设置它以使我的自由堆大小& pSoCoClor堆大小吗? 请查看Frrutto.Org网站的内存管理部分。 在这种情况下,FreeRTOS不使用由CyPress工具设置的堆,除非HeAPH3.3.C包含在项目中,并且它使用由CyPress工具设置的堆栈作为中断堆栈。 我想没有,因为我认为免费预订只是另一个预订。 整个区域?就堆栈参数而言,这是如何相互作用的。 这是FrRetos堆栈?同样,如果我正确理解,自由定位空间 在创建任务时,任务堆栈从自己的堆开始。(对此我相当肯定, 因为堆栈大小是动态地提供给任务创建函数的。 是的-按照上面的链接。 这是否意味着我能摆脱一个非常小的PSoC Creator堆栈大小,因为 gt;该堆栈仅用于初始化素材和调度器本身,并且与 实际任务堆栈? 它至少需要大到足以运行到VTaskStistApple()调用的位置,并且至少大到足以容纳一个完整的中断堆栈帧,这可能会根据应用程序正在做的事情而嵌套几个中断。 当做, 李察。 弗雷罗托斯 专为微控制器设计,每月下载量超过7000次 以上来自于百度翻译 以下为原文 > The PSoC Creator design-wide resources editor has system parameters > for heap size and stack size. What exactly is stored in this heap? Presumably, as per normal, memory returned by any call to malloc() will come from the heap. >If I understand > properly there isn't any dynamic allocation at all by default, right? Or is there? ? > Do I need to set it up so that my FreeRTOS heap size < the PSoC Creator heap size? Please see the memory management section of the FreeRTOS.org web site. In this case, FreeRTOS does not use the heap set up by the Cypress tools unless heap_3.c is included in your project, and it uses the stack set up by the Cypress tools as the interrupt stack. > I'm thinking no, because I think the FreeRTOS heap reservation just reserves another >area entirely?As far as the stack parameter is concerned, how does this interact with >the FreeRTOS stack? Again, if I understand correctly, FreeRTOS allocates space for > task stacks from its own heap when the task is created. (I'm pretty sure about this, > because the stack size is dynamically supplied to the task creation function.) Yes - as per the link above. > Does this mean that I can get away with a very small PSoC Creator stack size, because > that stack is only used for initialization stuff and for the scheduler itself, and is disjoint from > the actual task stacks? It needs to be at least big enough for main to run to the point where vTaskStartScheduler() is called, and at least big enough to hold a complete interrupt stack frame, which may be nested several interrupts deep, depending on what your application is doing. Regards, Richard. FreeRTOS Designed for Microcontrollers, more than 7000 downloads per month |
|
|
|
谢谢李察,这正是我要找的信息。
WhatI的意思是:“如果我理解正确,默认情况下根本没有任何动态分配,对吧?还是在那里?”是因为我找不到MaloC(…)在自动生成的CyPress库中的任何定义,或者对它的任何调用,所以我不确定是否有一种方法可以从PSoC Creator控制的堆中分配东西。 我认为你的答案意味着定义在某处,所以它可以从用户编写的代码中使用? 再次,非常感谢。 以上来自于百度翻译 以下为原文 Thanks Richard, that's exactly the information I was looking for. What I had meant by "If I understand properly there isn't any dynamic allocation at all by default, right? Or is there?" is that I couldn't find any definition for malloc(..) in the autogenerated Cypress libraries or any calls to it, so I wasn't sure if there even was a way to allocate things from the heap whose size is controlled by PSoC Creator. I take your answer to mean that the definition is around somewhere, and so it can be used from user-written code? Again, thanks very much. |
|
|
|
只有小组成员才能发言,加入小组>>
752个成员聚集在这个小组
加入小组2069 浏览 1 评论
1824 浏览 1 评论
3633 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
1760 浏览 6 评论
1509 浏览 1 评论
CY8C4025LQI在程序中调用函数,通过示波器观察SCL引脚波形,无法将pin0.4(SCL)下拉是什么原因导致?
507浏览 2评论
CYUSB3065焊接到USB3.0 TYPE-B口的焊接触点就无法使用是什么原因导致的?
357浏览 2评论
CX3连接Camera修改分辨率之后,播放器无法播出camera的画面怎么解决?
410浏览 2评论
357浏览 2评论
使用stm32+cyw43438 wifi驱动whd,WHD驱动固件加载失败的原因?
854浏览 2评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-22 05:54 , Processed in 0.896642 second(s), Total 78, Slave 61 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号