搜索
bottom↓
回复: 7

关于Wince5.0+at91sam9261ek_soure_bsp的编译问题

[复制链接]

出0入0汤圆

发表于 2009-3-26 16:23:57 | 显示全部楼层 |阅读模式
我用wince5.0+at91sam9261ek_soure_bsp进行sysgen时出现下面的错误。
\PLATFORM\AT91SAM9261EK\SRC\BOOTLOADER\FirstBoot\dbgu.h(38) : error C2001: newline in constant
BUILD: [01:0000000483:PROGC ] Compiling .\SPIDataFlash.c

BUILD: [01:0000000486:ERRORE] d:\WINCE500\PLATFORM\AT91SAM9261EK\SRC\BOOTLOADER\FirstBoot\dbgu.h(38) : error C2001: newline in constant

BUILD: [01:0000000487:PROGC ] Compiling .\dbgu.c

BUILD: [01:0000000490:ERRORE] d:\WINCE500\PLATFORM\AT91SAM9261EK\SRC\BOOTLOADER\FirstBoot\dbgu.h(38) : error C2001: newline in constant

BUILD: [01:0000000491:PROGC ] Compiling .\main.c

BUILD: [01:0000000494:ERRORE] d:\WINCE500\PLATFORM\AT91SAM9261EK\SRC\BOOTLOADER\FirstBoot\dbgu.h(38) : error C2001: newline in constant

然后双击错误处,光标停在了/PLATFORM/AT91SAM9261EK/SRC/BOOTLOADER/FirstBoot/dbgu.h $文件里的"#define TIME_OUT_CHAR        '?”处,此时我把这个语句改成“"#define TIME_OUT_CHAR        '?'”然后重新SYSGEN它就通过了。
请问这样做行不行呢。。。。。。

阿莫论坛20周年了!感谢大家的支持与爱护!!

曾经有一段真挚的爱情摆在我的面前,我没有珍惜,现在想起来,还好我没有珍惜……

出0入0汤圆

 楼主| 发表于 2009-3-26 16:25:57 | 显示全部楼层
请各位大侠帮帮忙,看看这样改后会不会有问题。
以下是dbgu.h文件。
//-----------------------------------------------------------------------------
//! \addtogroup        BOOTLOADER
//! @{
//!
//  All rights reserved ADENEO 2007
//-----------------------------------------------------------------------------
//! \file                dbgu.h
//!
//! \if subversion
///   $URL: http://centaure/svn/interne-ce_bsp_atmel/TAGS/TAGS50/SAM9261EK_v170_rc4/PLATFORM/AT91SAM9261EK/SRC/BOOTLOADER/FirstBoot/dbgu.h $
//!   $Author: pblanchard $
//!   $Revision: 1219 $
//!   $Date: 2007-08-03 16:59:11 +0200 (ven., 03 ao没t 2007) $
//! \endif
//-----------------------------------------------------------------------------
//! \addtogroup        FIRSTBOOT
//! @{
//!  

#ifndef __DBGU_H__
#define __DBGU_H__

#define AT91C_CB_SIZE        40                        // size of the console buffer

// Escape sequences
#define ESC                                \033
#define CLRSCREEN                "ESC[2J"        //\033 = ESC in octal
#define ClEARLINE                 "ESC[K"                // Clear line, from cursor position to the right most position of line

// Cursor Movement
#define MOVEUP(num)         "ESC[numA"                 // Move the cursor up num positions  
#define MOVEDOWN(num)   "ESC[numB"                 // Move the cursor down num positions  
#define MOVERIGHT(num)  "ESC[numC"                 // Move the cursor right num positions  
#define MOVELEFT(num)         "ESC[numD"          // Move the cursor left num positions  
#define MOVETO(row,col) "ESC[row;colH"         // Move the cursor to the (col, row) position. Note that the row comes before column; that is, y comes before x. Either col or row can be omitted. Row and column both start with "1," not zero. (1, 1) corresponds to the top-left corner of the screen.  

// Character Mode
#define TIME_OUT_CHAR        '?
#define CHANGE_CHAR_MODE(attr) "ESC[attrm"         //Change the character mode with attribute attr. The attributes are numbers listed below.  

#define ALL_ATTRIB_OFF                 0                // All attributes turned off. (Except for foreground and background color).  
#define HIGH_INTENSITY                1                 // Bold.  
#define LOW_INTENSITY                2                // Normal.  
#define UNDERLINE                        4                // Underline font.  
#define BLINK                                5                // Blinking font.  
#define RAPID_BLINK                        6                 // Works only on some systems.  
#define REVERSE_VIDEO                7                // Swapping the foreground color and the background color.  
#define FOREGROUND_BLACK         30                // Black.  
#define FOREGROUND_RED                31                // Red.  
#define FOREGROUND_GREEN        32                 // Green.  
#define FOREGROUND_YELLOW        33                 // Yellow.  
#define FOREGROUND_BLUE                34                 // Blue.  
#define FOREGROUND_MAGENTA        35                 // Magenta.  
#define FOREGROUND_CYAN                36                 // Cyan.  
#define FOREGROUND_WHITE         37                 // White.  
#define BACKGROUND_BLACK         40                 // Black.  
#define BACKGROUND_RED                41                 // Red.  
#define BACKGROUND_GREEN         42                 // Green.  
#define BACKGROUND_YELLOW         43                 // Yellow.  
#define BACKGROUND_BLUE         44                 // Blue.  
#define BACKGROUND_MAGENTA         45                 // Magenta.  
#define BACKGROUND_CYAN         46                 // Cyan.  
#define BACKGROUND_WHITE        47                 // White.  

int     DbgPrint(char *str);

#endif //__DBGU_H__

//! @}

//! @}

出0入0汤圆

发表于 2009-11-9 14:55:02 | 显示全部楼层
你好我也遇到这个问题了,不知道你解决了没有

出0入0汤圆

发表于 2009-11-10 12:37:51 | 显示全部楼层
#define TIME_OUT_CHAR '?
这里明显将'?'定义成超时字符的,你应该拷贝写漏了',导致PB报出字符定义为结束的错误

出0入0汤圆

发表于 2009-11-10 12:42:58 | 显示全部楼层
这是BSP包的BUG. 改'?'是正确的!

出0入0汤圆

发表于 2010-11-29 11:54:12 | 显示全部楼层
6.0里还有个错误
WINCE600\PLATFORM\COMMON\SRC\SOC\ATMEL\COMMON\BOOTLOADER\GernericEBOOT\utils.c文件报error C2220: warning treated as error - no 'object' file generated错误
解决办法:将该文件另存为unicode编译格式

出0入0汤圆

发表于 2010-11-29 16:11:09 | 显示全部楼层
回复【4楼】cicnx
这是bsp包的bug. 改'?'是正确的!
-----------------------------------------------------------------------

正解!

出0入0汤圆

发表于 2010-11-29 16:11:29 | 显示全部楼层
回复【5楼】ioro55555
6.0里还有个错误
wince600\platform\common\src\soc\atmel\common\bootloader\gernericeboot\utils.c文件报error c2220: warning treated as error - no 'object' file generated错误
解决办法:将该文件另存为unicode编译格式

-----------------------------------------------------------------------

正解!
回帖提示: 反政府言论将被立即封锁ID 在按“提交”前,请自问一下:我这样表达会给举报吗,会给自己惹麻烦吗? 另外:尽量不要使用Mark、顶等没有意义的回复。不得大量使用大字体和彩色字。【本论坛不允许直接上传手机拍摄图片,浪费大家下载带宽和论坛服务器空间,请压缩后(图片小于1兆)才上传。压缩方法可以在微信里面发给自己(不要勾选“原图),然后下载,就能得到压缩后的图片。注意:要连续压缩2次才能满足要求!!】。另外,手机版只能上传图片,要上传附件需要切换到电脑版(不需要使用电脑,手机上切换到电脑版就行,页面底部)。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|Archiver|amobbs.com 阿莫电子技术论坛 ( 粤ICP备2022115958号, 版权所有:东莞阿莫电子贸易商行 创办于2004年 (公安交互式论坛备案:44190002001997 ) )

GMT+8, 2024-8-25 19:19

© Since 2004 www.amobbs.com, 原www.ourdev.cn, 原www.ouravr.com

快速回复 返回顶部 返回列表