KITL over Serial support

Dec 30, 2008 at 6:10 PM
I have been able to download images over the STUART from platform builder to the Gumstix board by setting the download devices to STUART.  However, I can't seem to get a KITL connection started once the image is launched.  It comes up and stops here.

######################################################                         
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!                         
Windows CE Kernel for ARM (Thumb Enabled) Built on Jul 16 2008 at 12:33:56     
DeviceId................. GUM0                                                 
pArgs->flags............. 0xD                                                  
pArgs->devLoc.IfcType.... 0                                                    
pArgs->devLoc.LogicalLoc. 0x4000300                                            
pArgs->devLoc.PhysicalLoc 0xBAA00300                                           
pArgs->devLoc.Pin........ 0                                                    
pArgs->ip4address........ 0                                                    
pDevice->Name............  s                                                   
pDevice->ifcType......... 0                                                    
pDevice->id.............. 0x4000300                                            
pDevice->resource........ 0                                                    
pDevice->type............ 2                                                    
pDevice->pDriver......... 0x81179050                                            
                                                                                
                                                  
Properties of OSDesign has "Enable KITL" checked.

Does the STUART setting in eboot support KITL and if so are there any settings besides the typical I need to make to get it to work?

-Mike

Coordinator
Dec 31, 2008 at 11:43 AM
While it is possible to uses serial Kitl it is no fun. It takes forever to download all but the smallest of images.
I have used both Serial and USB download and Kitl but I am not sure just how much support I left in the binary version of the BSP.
I do remember using the BTUART for this as it supports the handshake signals. USB/Kitl is also possible but tough to setup and get working.
It is FAR eaiser to just get an Ethernet board do your debugging with that, then remove it when you are done.


DV
Coordinator
Dec 31, 2008 at 12:02 PM
On closer examination it looks like it is trying to use the ethernet for the kitl connection when the kernel is starting up.
Your dump shows the id/logicalLoc of the kitl device as 04000300 which is the ethernet address in the memory map.
It should show 40700000 for STUART.
See PXA270 manual for info on peripheral register locations.

DV


Dec 31, 2008 at 10:41 PM
I am wanting to use the USB as host so I am running out of ports.  I tried to find where someone had a breakout board for the 24-pin flex ribbon for another host so I could still use the USB on the breakout as a client but have not come across one.  I am running Vista and am having problems getting USB RNDIS going so I have not had a kitl connection yet.  Best I can do is USB SERIAL for download of images and connectivity for activesync tools.  I have connected one of the FTDI serial to USB to the STUART as another method to at least get a command prompt while the USB is in use as a host.

Guess I will break down and get the ethernet board.

Thanks.

-Mike

Jan 12, 2009 at 1:54 AM
Okay, got the netmicroSD and have had connections to the device from the applications using the ethernet but I still cannot get kitl going.  This is what I get when the device boots after I enable kitl in the osdesign properties.  Several NIC and kitl errors.

######################################################                         
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!                         
Windows CE Kernel for ARM (Thumb Enabled) Built on Jul 16 2008 at 12:33:56     
DeviceId................. GUM0                                                 
pArgs->flags............. 0xD                                                  
pArgs->devLoc.IfcType.... 0                                                    
pArgs->devLoc.LogicalLoc. 0x4000300                                            
pArgs->devLoc.PhysicalLoc 0xBAA00300                                           
pArgs->devLoc.Pin........ 0                                                    
pArgs->ip4address........ 0                                                    
pDevice->Name............  s                                                   
pDevice->ifcType......... 0                                                    
pDevice->id.............. 0x4000300                                            
pDevice->resource........ 0                                                    
pDevice->type............ 2                                                    
pDevice->pDriver......... 0x81049050                                           
ERROR: LAN91CInit: Network Chip not found at 0xbaa00300                        
ERROR: KITL call to pfnInit failed                                             
ERROR: OALKitlInit: KitlInit failed                                            
INFO:XL6 extension RAM added.                                                  
INFO: Using persistent registry                                                
INFO: ETH1 being used for KITL - disabling driver instance...                  
+USBFN_Init                                                                    
+COM_BT_Init                                                                   
+COM_ST_Init                                                                   
+SPI_Init 2 128Kbs                                                             
+I2C_Init 1                                                                    
+USBH_Init P1                                                                  
+ETH2_Init                                                                     
+SDHC_Init                                                                     
INFO:Remote display 640x480x8 Refresh=50                                       
Waiting for ActiveSync connection...                                           
Virtual Display startup!                                                        
                                                                               

-Mike
Coordinator
Jan 12, 2009 at 10:17 AM
Suspect you still don't have something set right in the bootloader. If you are now using Ethernet you need IP/mask address set etc. Download device SMSC9117 (netMicro).
Make sure hardware word has correct bits set for netMicro support.
When you do the Target->Connectivity Options->Settings from VS you should see something like GUM52394 pop in the dialog box. This is the device ID along with a part of the MAC address.
You should also see this text in the DeviceID field when OS starts up. As shown above you only have Gum0 which means it never picked up and IP/MAC from the netMicro.

DV
Jan 13, 2009 at 1:25 AM
Here is my bootloader configuration.
Boot Loader Configuration:                                                     
                                                                               
0) IP configuration:            DHCP                                           
1) SMSC MAC address:            EA-26-CB-DE-73-50                              
2) USB RNDIS MAC address:       EA-26-CB-DE-73-51                              
3) Boot delay:                  3 seconds                                      
4) Hardware configuration:      0x80010042                                     
5) Startup:                     Launch flash resident image                    
6) Download device:             SMSC9117 (netMicro)                            
7)                                                                             
8) Reset default configuration                                                 
9) Edit memory                                                                 
C) Clean registry boot:         NO                                             
U) Unlock boot blocks                                                          
R) Reset                                                                       
S) Store and lock configuration/boot blocks                                    
D) Download image now                                                          
L) Launch flash resident image now                                             
                                                                               
Enter your selection:                                                           

----------
As you can see I have the hardware DWORD set to 0x80010042 which should be XL6 / netMicroSD / Breakout with USB Client / Persistent Registry.

I do see it says GUM 0 but in VS from the connectivity options, I get GUM29520 to pop up and I set that and it will download a new nk.bin image over the ethernet from VS this way just fine.

Here is a complete run captured from the debug port where I download the image and try to start KITL.  You can see that the download and reflash succeeds but once it is done

PLATFORM INFO: XL6 Verdex @624Mhz                                              
RAM INFO:Size 134217728                                                        
FLASH INFO:Size 33423360                                                       
FLASH INFO:Bytes per blocks: 131072 Number of blocks: 255                      
FLASH INFO:Sectors per blocks: 256 Data bytes per sector: 512                  
Serial number: 710C01A147F8c296                                                
Persistent registry support enabled.                                           
Configuring Breakout...Configured w/USB client.                                
Configuring netMicro-SD...LAN9118: Chip Id 117 Revision 2                      
Auto Negotiation done                                                          
LAN9117 Mac = EA-26-CB-DE-73-50                                                
Configured wo/WiFi.                                                            
XL6 platform Configured!                                                       
                                                                               
Press [ENTER] to launch image stored in flash or [SPACE] to cancel.            
                                                                               
Initiating image launch in 2 seconds.                                          
                                                                               
Boot Loader Configuration:                                                     
                                                                               
0) IP configuration:            DHCP                                           
1) SMSC MAC address:            EA-26-CB-DE-73-50                              
2) USB RNDIS MAC address:       EA-26-CB-DE-73-51                              
3) Boot delay:                  3 seconds                                      
4) Hardware configuration:      0x80010042                                     
5) Startup:                     Launch flash resident image                    
6) Download device:             SMSC9117 (netMicro)                            
7)                                                                             
8) Reset default configuration                                                 
9) Edit memory                                                                 
C) Clean registry boot:         NO                                             
U) Unlock boot blocks                                                          
R) Reset                                                                       
S) Store and lock configuration/boot blocks                                    
D) Download image now                                                          
L) Launch flash resident image now                                             
                                                                               
Enter your selection: d                                                        
INFO: Trying to initialize the built-in SMSC NIC...                            
LAN9118: Chip Id 117 Revision 2                                                
Auto Negotiation done                                                          
INFO: SMSC LAN9117 Ethernet controller initialized.                            
INFO: MAC address: EA-26-CB-DE-73-50                                           
System ready!                                                                  
Preparing for download...                                                      
INFO: Using device name: 'GUM29520'                                            
InitDHCP():: Calling ProcessDHCP()                                             
ProcessDHCP()::DHCP_INIT                                                       
Got Response from DHCP server, IP address: 192.168.2.5                         
                                                                               
ProcessDHCP()::DHCP IP Address Resolved as 192.168.2.5, netmask: 255.255.255.0 
Lease time: 86400 seconds                                                      
Got Response from DHCP server, IP address: 192.168.2.5                         
No ARP response in 2 seconds, assuming ownership of 192.168.2.5                
+EbootSendBootmeAndWaitForTftp                                                 
Sent BOOTME to 255.255.255.255                                                 
TFTP link[0]: State:0, DestAddr.wPort: 0, SrcAddr.wPort: 0                     
TFTP link[1]: State:0, DestAddr.wPort: 0, SrcAddr.wPort: 0                     
TftpReceiver, port: 0x00008900, wkp: 0x0000D403                                
                                                                               
Sent BOOTME to 255.255.255.255                                                 
TFTP link[0]: State:0, DestAddr.wPort: 0, SrcAddr.wPort: 0                     
TFTP link[1]: State:0, DestAddr.wPort: 0, SrcAddr.wPort: 0                     
TftpReceiver, port: 0x00008900, wkp: 0x0000D403                                
                                                                               
TFTP link[0]: State:0, DestAddr.wPort: 0, SrcAddr.wPort: 0                     
TFTP link[1]: State:0, DestAddr.wPort: 0, SrcAddr.wPort: 0                     
TftpReceiver, port: 0x00008900, wkp: 0x0000D403                                
                                                                               
Sent BOOTME to 255.255.255.255                                                 
TFTP link[0]: State:0, DestAddr.wPort: 0, SrcAddr.wPort: 0                     
TFTP link[1]: State:0, DestAddr.wPort: 0, SrcAddr.wPort: 0                     
TftpReceiver, port: 0x00008900, wkp: 0x0000D403                                
                                                                               
Sent BOOTME to 255.255.255.255                                                 
TFTP link[0]: State:0, DestAddr.wPort: 0, SrcAddr.wPort: 0                     
TFTP link[1]: State:0, DestAddr.wPort: 0, SrcAddr.wPort: 0                     
TftpReceiver, port: 0x00008900, wkp: 0x0000D403                                
                                                                               
TFTP link[0]: State:0, DestAddr.wPort: 0, SrcAddr.wPort: 0                     
TFTP link[1]: State:0, DestAddr.wPort: 0, SrcAddr.wPort: 0                     
TftpReceiver, port: 0x00008900, wkp: 0x0000D403                                
                                                                               
Sent BOOTME to 255.255.255.255                                                 
!CheckUDP: Not UDP (proto = 0x00000006)                                        
Sent BOOTME to 255.255.255.255                                                 
!CheckUDP: Not UDP (proto = 0x00000006)                                        
Sent BOOTME to 255.255.255.255                                                 
Sent BOOTME to 255.255.255.255                                                 
!CheckUDP: Not UDP (proto = 0x00000006)                                        
Sent BOOTME to 255.255.255.255                                                 
Sent BOOTME to 255.255.255.255                                                 
Sent BOOTME to 255.255.255.255                                                 
Sent BOOTME to 255.255.255.255                                                 
Packet has the following data:                                                 
  boot.bin[NULL]octet[NULL]                                                    
TFTP packet could have 1 name/value pairs                                      
Locked Down Link 1                                                             
Src IP 192.168.2.5 Port 03D4   Dest IP 192.168.2.3 Port D2B5                   
Default TFTP block size set to: 512 bytes                                      
There were no options detected in the TFTP                                     
EthDown::TFTPD_OPEN::boot.bin                                                  
-EbootSendBootmeAndWaitForTftp                                                 
                                                                               
BL_IMAGE_TYPE_BIN                                                              
                                                                               
                                                                               
Download file information:                                                     
-------------------------------------------------------------------------------
[0]: Address=0xBCB20000  Length=0xF38A14  Name=                                
                                                                               
****** OEMVerifyMemory checking physical range [ 0x00120000 ==> 0x01058A13 ]...
****** FLASH address ******                                                    
TFTP link[0]: State:0, DestAddr.wPort: 0, SrcAddr.wPort: 0                     
TFTP link[1]: State:3, DestAddr.wPort: 53941, SrcAddr.wPort: 980               
TftpReceiver, port: 0x0000A100, wkp: 0x0000D403                                
                                                                               
TFTP link[0]: State:0, DestAddr.wPort: 0, SrcAddr.wPort: 0                     
TFTP link[1]: State:3, DestAddr.wPort: 53941, SrcAddr.wPort: 980               
TftpReceiver, port: 0x0000A100, wkp: 0x0000D403                                
                                                                               
!CheckUDP: Not UDP (proto = 0x00000006)                                        
rom_offset=0x3CA20000.                                                         
ImageStart = 0xBCB20000, ImageLength = 0xF38A14, LaunchAddr = 0xBCB25668       
                                                                               
Completed file(s):                                                             
-------------------------------------------------------------------------------
[0]: Address=0xBCB20000  Length=0xF38A14  Name="" Target=FLASH                 
INFO: Write flash start 0xBCB20000  length 15960596.                           
INFO: Writing 31174 sectors for length 15960596.                               
INFO: Erasing 122 blocks at 0x00000009.                                        
\                                                                              
INFO: image stored successfully.                                               
Rebooting in 0                                                                 
                                                                               
Microsoft Windows CE Bootloader Common Library Version 1.4 Built Oct  1 2008 11:
04:27                                                                          
Watchdog Reset                                                                 
For GumstixIII Verdex Platform  1.4 Built Oct  1 2008 11:28:38                 
PLATFORM INFO: XL6 Verdex @624Mhz                                              
RAM INFO:Size 134217728                                                        
FLASH INFO:Size 33423360                                                       
FLASH INFO:Bytes per blocks: 131072 Number of blocks: 255                      
FLASH INFO:Sectors per blocks: 256 Data bytes per sector: 512                  
Serial number: 710C01A147F8c296                                                
Persistent registry support enabled.                                           
Configuring Breakout...Configured w/USB client.                                
Configuring netMicro-SD...LAN9118: Chip Id 117 Revision 2                      
Auto Negotiation done                                                          
LAN9117 Mac = EA-26-CB-DE-73-50                                                
Configured wo/WiFi.                                                            
XL6 platform Configured!                                                       
                                                                               
Press [ENTER] to launch image stored in flash or [SPACE] to cancel.            
                                                                               
Initiating image launch in 0 seconds.                                          
Launching flash resident image  ...                                            
Launching flash resident image                                                 
System ready!                                                                  
Preparing for download...                                                      
INFO: Using device name: 'GUM0'                                                
Copying OS Image from FLASH(0xBCB20000) to RAM(0x80100000) (15960596 bytes)... 
Jumping to image at physical 0xA0100000...                                     
                                                                               
                                                                               
                                                                               
######################################################                         
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!                         
Windows CE Kernel for ARM (Thumb Enabled) Built on Jul 16 2008 at 12:33:56     
DeviceId................. GUM0                                                 
pArgs->flags............. 0xD                                                  
pArgs->devLoc.IfcType.... 0                                                    
pArgs->devLoc.LogicalLoc. 0x4000300                                            
pArgs->devLoc.PhysicalLoc 0xBAA00300                                           
pArgs->devLoc.Pin........ 0                                                    
pArgs->ip4address........ 0                                                    
pDevice->Name............  s                                                   
pDevice->ifcType......... 0                                                    
pDevice->id.............. 0x4000300                                            
pDevice->resource........ 0                                                    
pDevice->type............ 2                                                    
pDevice->pDriver......... 0x81049050                                           
ERROR: LAN91CInit: Network Chip not found at 0xbaa00300                        
ERROR: KITL call to pfnInit failed                                             
ERROR: OALKitlInit: KitlInit failed                                            
INFO:XL6 extension RAM added.                                                  
INFO: Using persistent registry                                                
INFO: ETH1 being used for KITL - disabling driver instance...                  
+USBFN_Init                                                                    
+COM_BT_Init                                                                   
+COM_ST_Init                                                                   
+SPI_Init 2 128Kbs                                                             
+I2C_Init 1                                                                    
+USBH_Init P1                                                                  
+ETH2_Init                                                                     
+SDHC_Init                                                                     
INFO:Remote display 640x480x8 Refresh=50                                       
Waiting for ActiveSync connection...                                           
Virtual Display startup!                                                        
                           
Coordinator
Jan 13, 2009 at 1:32 AM
You need to set your "Startup" to "Download image"

DV
Jan 22, 2009 at 7:44 PM
Actually I have a similar problem with Verdex+netMicro: The boot loader works fine (reports use of "LAN9118"), I'm able to download nk.bin from the Platform Builder, Windows CE boots fine, but I can't get KITL to work. I'm getting the same 3 errors:
....
ERROR: LAN91CInit: Network Chip not found at 0xbaa00300
ERROR: KITL call to pfnInit failed
ERROR: OALKitlInit: KitlInit failed

Hopefully I know what I'm doing :-) as I had no problems with using KITL over the Ethernet with my older Connex system (with "Gumstix II" BSP). By chance does KITL support only netCF-type expansion boards?
Jan 23, 2009 at 3:33 AM
Setting the "Startup" to "Download image" as dvescovi suggests got me futher but I am still having issues.  Have you tried that?

My ethernet board is not the netCF board but the netmicroSD-vx on a verdex xl6.

I have done KITL on other platforms but have not been successful yet on this one.  The "Download image" at least gives me a valid name for the kitl connection ('GUMxxxx' instead of 'GUM0') and debug output "sometimes" goes to the debug window in VS 2005 but the target shell still will not work.  As well I can sometimes use the reset device from the target menu in VS 2005 but not always.

I am wondering if there is a version mismatch somewhere as I initially had problems starting corecon manually with the provided DebugWithVS which seems to start conmanclient2 and cmaccept for you when using ethernet only connection to device to support apps debugging.  This would not work until I replaced the files in the provided GumstixIII download image used in DebugWithVS with the ones in my VS 2005 installed corecon files which were actually older.  Once I did this, all seems to work but this did not help KITL obviously.  So this leads me to believe that maybe the KITL problems I am having may also be a version mismatch.  Other than this the ethernet connections works just fine for all my other app usage.

Coordinator
Jan 23, 2009 at 12:54 PM
Unfortuately this is not an uncommon problem, and not just for this platform. There are many issues with the CoreCon component. There seems to be at least three different versions (maybe more) floating around.
One that comes with Visual Studio, one with Platform builder 6 and even a different one with PB 5.
I got in big trouble with having a side by side install of PB 5 on my machine. Dispite what they say don't install PB 5 and PB 6 on the same machine!
There seems to be a very specific order you must install the packages to get a working Corecon. This on top of the QFEs, which also mucked with the versions make for a very confusing setup and lower the chances of it ever working reliability.
You are not alone, I and many other people have struggled with this.
The default VS debugger does not seem to be harrmonized with the PB debugger and this causes a lot of issues.

Make sure you have the "Target Control Support" component included if you are planning on using the shell.exe.

DV