完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
扫一扫,分享给好友
你好,
下面的信息请参考: root@user-desktop:/media/work/DVR_RDK/4.01/DVRRDK_04.01.00.02/dvr_rdk/build/dvr_rdk/bin/ti814x-evm# ls dvr_rdk_c6xdsp_debug_512M_128M.xe674 dvr_rdk_c6xdsp_debug_512M_128M.xe674.map dvr_rdk_m3video_release_512M_128M.xem3 dvr_rdk_m3video_release_512M_128M.xem3.map dvr_rdk_m3vpss_release_512M_128M.xem3 dvr_rdk_m3vpss_release_512M_128M.xem3.map |
|
|
|
物是人非aaa 发表于 2018-6-21 03:10 谢谢 再请教一下,如何同时使用 两个#pragma 如: 我想分配buf到IRAM,同时要求buf 一定link不被优化掉 #pragma RETAIN(buf) #pragma DATA_SECTION(buf,“iram”) int buf [] 应该怎么写呀 |
|
|
|
物是人非aaa 发表于 2018-6-21 03:10 谢谢 再请教一下,如何同时使用 两个#pragma 如: 我想分配buf到IRAM,同时要求buf 一定link不被优化掉 #pragma RETAIN(buf) #pragma DATA_SECTION(buf,“iram”) int buf [] 应该怎么写呀 |
|
|
|
15651620715seu 发表于 2018-6-21 03:27 是不是 #pragma SET_DATA_SECTION(“iram”) #pragma RETAIN(buf) int buf [] #pragma SET_DATA_SECTION() |
|
|
|
15651620715seu 发表于 2018-6-21 03:27 你是不是再找下面的信息? http://www.ti.com/lit/ug/spru187u/spru187u.pdf 6.5.6 The volatile Keyword The compiler eliminates redundant memory accesses whenever possible, using data flow analysis to figure out when it is legal. However, some memory accesses may be special in some way that the compiler cannot see, and in such cases you must use the volatile keyword to prevent the compiler from optimizing away something important. The compiler does not optimize out any accesses to variables declared volatile. The number and order of accesses of a volatile variable are exactly as they appear in the C/C++ code, no more and no less. There are different ways to understand how volatile works, but fundamentally it is a hint to the the compiler that something it cannot understand is going on, and so the compiler should not try to be overclever. Any variable which might be modified by something external to the obvious control flow of the program (such as an interrupt service routine) must be declared volatile. This tells the compiler that an interrupt function might modify the value at any time, so the compiler should not perform optimizations which will change the number or order of accesses of that variable. This is the primary purpose of the volatile keyword. In the following example, the loop intends to wait for a location to be read as 0xFF: unsigned int *ctrl; while (*ctrl !=0xFF); However, in this example, *ctrl is a loop-invariant expression, so the loop is optimized down to a singlememory read. To get the desired result, define ctrl as: volatile unsigned int *ctrl; Here the *ctrl pointer is intended to reference a hardware location, such as an interrupt flag. Volatile must also be used when accessing memory locations that represent memory-mapped peripheral devices. Such memory locations might change value in ways that the compiler cannot predict. These locations might change if accessed, or when some other memory location is accessed, or when some signal occurs. Volatile must also be used for local variables in a function which calls setjmp, if the value of the local variables needs to remain valid if a longjmp occurs. |
|
|
|
物是人非aaa 发表于 2018-6-21 04:04 谢谢 并不是这样的,使用volatile还是会将不用的符号去掉,您看还有别的方法吗? 使一个未使用的数组 同时分配到我需要的空间并且不被优化掉 |
|
|
|
物是人非aaa 发表于 2018-6-21 04:04 换个方法,如何使某段代码不被优化呢?? |
|
|
|
物是人非aaa 发表于 2018-6-21 04:04 你好, 你能否尝试http://processors.wiki.ti.com/index.php/Placing_Variables_in_Specific_Memory_Location_-_MSP430? #pragma RETAIN(jtag_lock) #pragma location=0x17FC const unsigned long int jtag_lock = 0xAAAAAAAA; |
|
|
|
你可以把相关代码摘出来作为一个API,另起一个文件,这个新文件可以选择不优化。 对了,你现在的问题和标题无关,如果还有问题,请另起一个新的讨论主题。谢谢! |
|
|
|
物是人非aaa 发表于 2018-6-21 04:56 谢谢您 我再发个帖子讨论这个问题。 |
|
|
|
只有小组成员才能发言,加入小组>>
348 浏览 1 评论
542 浏览 2 评论
NA555DR VCC最低电压需要在5V供电,为什么用3.3V供电搭了个单稳态触发器也使用正常?
786 浏览 3 评论
MSP430F249TPMR出现高温存储后失效了的情况,怎么解决?
658 浏览 1 评论
对于多级放大电路板,在PCB布局中,电源摆放的位置应该注意什么?
1140 浏览 1 评论
AT32F407在USART2 DMA发送数据时,接包接到了要发送的数据,程序还是处于等待传输完成的标识判断中,为什么?
74浏览 29评论
245浏览 23评论
请问下tpa3220实际测试引脚功能和官方资料不符,哪位大佬可以帮忙解答下
261浏览 20评论
请教下关于TAS5825PEVM评估模块原理图中不太明白的地方,寻求答疑
209浏览 14评论
两个TMP117传感器一个可以正常读取温度值,一个读取的值一直是0,为什么?
67浏览 13评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-26 09:50 , Processed in 1.414436 second(s), Total 96, Slave 80 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号