http://blog.chinaunix.net/uid-24343357-id-3605556.html
分类: 嵌入式
1:Warning[w2]: Symbol ?PBANK is redefined in command-line
2:Warning[Pe069]: integer conversion resulted in truncation
解决方法,添加下面 红色掩码
#define HAL_DMA_SET_ADDR_DESC0( a ) \
st( \
DMA0CFGH = (uint8)( ((uint16)(a)) >> 8 ); \
DMA0CFGL = (uint8)( ((uint16)(a)) &0x00ff ); \
)
这个警告产生原因一般是数据在进行类型转换或者取反 ,产生了位数差,进而改变了位数。
2:Warning[Pe069]: integer conversion resulted in truncation
解决方法,添加下面 红色掩码
#define HAL_DMA_SET_ADDR_DESC0( a ) \
st( \
DMA0CFGH = (uint8)( ((uint16)(a)) >> 8 ); \
DMA0CFGL = (uint8)( ((uint16)(a)) &0x00ff ); \
)
这个警告产生原因一般是数据在进行类型转换或者取反 ,产生了位数差,进而改变了位数。
http://e2e.ti.com/support/low_power_rf/f/159/t/146154.aspx,是TI论坛的一个帖子,上面有人提供这样的解决方法。
patch文件内容为
--- C:\Texas Instruments\RemoTI-CC253xDK-1.2.1\Components\hal\target\CC2530EB_NPI\hal_dma.h 2010-06-28 15:14:38.000000000 +0100
+++ C:\Texas Instruments\RemoTI-CC253xDK-1.2.1\Components\hal\target\CC2530EB_NPI\hal_dma - Copy.h 2011-11-11 09:11:02.000000000 +0100
@@ -1,10 +1,10 @@
/**************************************************************************************************
Filename: hal_dma.h
- Revised: $Date: 2010-05-10 09:54:39 -0700 (Mon, 10 May 2010) $
- Revision: $Revision: 22431 $
+ Revised: $Date: 2010-06-28 15:14:36 -0700 (Mon, 28 Jun 2010) $
+ Revision: $Revision: 22832 $
Description: This file contains the interface to the DMA Service.
Copyright 2007-2010 Texas Instruments Incorporated. All rights reserved.
@@ -58,19 +58,19 @@
* MACROS
*/
#define HAL_DMA_SET_ADDR_DESC0( a ) \
st( \
DMA0CFGH = (uint8)( (uint16)(a) >> 8 ); \
- DMA0CFGL = (uint8)( (uint16)(a) ); \
+ DMA0CFGL = (uint8)( (uint16)(a) & 0xFF ); \
)
#define HAL_DMA_SET_ADDR_DESC1234( a ) \
st( \
DMA1CFGH = (uint8)( (uint16)(a) >> 8 ); \
- DMA1CFGL = (uint8)( (uint16)(a) ); \
+ DMA1CFGL = (uint8)( (uint16)(a) & 0xFF ); \
)
#define HAL_DMA_GET_DESC0() &dmaCh0
#define HAL_DMA_GET_DESC1234( a ) (dmaCh1234+((a)-1))
@@ -87,20 +87,20 @@
#define HAL_DMA_CHECK_IRQ( ch ) (DMAIRQ & ( 1 << (ch) ))
// Macro for quickly setting the source address of a DMA structure.
#define HAL_DMA_SET_SOURCE( pDesc, src ) \
st( \
pDesc->srcAddrH = (uint8)((uint16)(src) >> 8); \
- pDesc->srcAddrL = (uint8)(uint16)(src); \
+ pDesc->srcAddrL = (uint8)((uint16)(src) & 0xFF); \
)
// Macro for quickly setting the destination address of a DMA structure.
#define HAL_DMA_SET_DEST( pDesc, dst ) \
st( \
pDesc->dstAddrH = (uint8)((uint16)(dst) >> 8); \
- pDesc->dstAddrL = (uint8)(uint16)(dst); \
+ pDesc->dstAddrL = (uint8)((uint16)(dst) & 0xFF); \
)
// Macro for quickly setting the number of bytes to be transferred by the DMA,
// max length is 0x1FFF.
#define HAL_DMA_SET_LEN( pDesc, len ) \
st( \