PB是打开着的,但“Confiure Remote Connection”后,“Configure”,之后根本就看不得目标设备,请问是什么原因啊?
看了,一步一步追踪到:
BOOL EbootInitEtherTransport (EDBG_ADDR *pEdbgAddr, LPDWORD pdwSubnetMask,
BOOL *pfJumpImg, // will be set to TRUE if eshell asked us to jump to existing image
DWORD *pdwDHCPLeaseTime, // this parameter is overloaded. pass NULL to indicate static IP
UCHAR VersionMajor, UCHAR VersionMinor,
char *szPlatformString, char *szDeviceName,
UCHAR CPUId, DWORD dwBootFlags)
{
// simple check on arguments
if (!pEdbgAddr || !pdwSubnetMask || !szPlatformString) {
return FALSE;
}
// find out IP address and verify it
if (pdwDHCPLeaseTime) {
if (!EbootGetDHCPAddr (pEdbgAddr, pdwSubnetMask, pdwDHCPLeaseTime)) {
return FALSE;
}
} else {
if (!EbootCheckIP (pEdbgAddr)) {
EdbgOutputDebugString ("Some other station has IP Address: %s !!! Aborting.\r\n", inet_ntoa(pEdbgAddr->dwIP));
return FALSE;
}
// This will tell CheckUDP() to only accept datagrams for our IP address
ClearPromiscuousIP();
}
if (!EbootInitTftpSimple (pEdbgAddr, htons(EDBG_DOWNLOAD_PORT), htons(EDBG_DOWNLOAD_PORT), EDBG_DOWNLOAD_FILENAME)) {
return FALSE;
}
if (!EbootSendBootmeAndWaitForTftp (pEdbgAddr, VersionMajor, VersionMinor, szPlatformString, szDeviceName, CPUId, dwBootFlags))
return FALSE;
*pfJumpImg = (NULL != gpCfgData);
return TRUE;
}
可以确定问题出在这,在该函数中,调用EbootSendBootmeAndWaitForTftp() 将显示:
+EbootSendBootmeAndWaitForTftp //即“Using device name: 'SMDK241021862' ”接下来要显示的
显示了上句,该句未显示,说明该函数违背调用;再看上面的一个函数:EbootInitTftpSimple()
BOOL EbootInitTftpSimple (EDBG_ADDR *pEdbgAddr, UINT16 wOdoWKSP, UINT16 wHostWKSP, char *pszFileName)
{
// Set up TFTP server. Note that internally, we store port numbers in network byte order.
EbootInitTFtp (wOdoWKSP, wHostWKSP);
EbootInitTFtpd ();
if (EbootTFtpdServerRegister (pszFileName, EbootSimpleCallback)) {
EdbgOutputDebugString( "Server Registration Failed\r\n" );
return FALSE;
}
gpEdbgAddr = pEdbgAddr;
return TRUE;
}
很显然,调用这个函数没什么问题,否则的话,会有信息显示;再往上,由于未使用DHCP,if语句未执行,转入else中执行,其中的if处也不会有问题,接下来,调用ClearPromiscuousIP(),
void ClearPromiscuousIP( void ) {
fPromiscuousIP = 0;
}
也不会有问题;再往上,if语句中,前两个变量,由于IP和子网掩码都已设置,不可能为假,后边一个接收的是一个宏,也不为假。最后,得出矛盾,问题不在这。
请高手们指教!!