Home

User Manual Windows CE 5.00 BSP for the TQMa31 - TQ

image

Contents

1. Name Values Description launchXX Name of the XX represents a number in decimal from 00 to 99 application to start Only launch numbers from 80 to 89 are valid All others are reserved dependXX hex xx yy Describes a dependency of the launched application If BSPa31 WinCE UM 101 Page 70 of 95 Hquio sjueuoduio2 D Aq 60020 LOL WN SOUIM LEedSa To components Name Values Description some other application must be started before the application defined by the lauch key can be successfully launched then this entry should be used to identify that other application XX YY represents the launch number in hexadecimal of the application that must be loaded first YY is the most significant byte and therefore always 00 One or more dependent applications can be specified per dependXX value The depenaXX entry is optional if there is no dependency you don t need to use it Table 8 1 Application auto start registry settings The following code example shows a typical Init registry entry using dependencies HKEY LOCAL MACHINEWnit Launch10 shell exe Launch20 device exe Launch30 gwes exe Depend30 hex 14 00 Launch50 taskman exe Depend50 hex 14 00 1e 00 Note The application that must be started first must call the function SignalStarted to inform Windows CE when it is ready The dependent application cannot run until after the function on whi
2. 82359 STRING pm Time Format String h Hours 12 Hour Clock with No Leading Zero hh Hours 12 Hour Clock with Leading Zero H Hours 24 Hour Clock with No Leading Zero HH Hours 24 Hour Clock with Leading Zero m Minutes with No Leading Zero mm Minutes with Leading Zero S Seconds with No Leading Zero SS Seconds with Leading Zero t am pm indicator First Letter Only tt am pm indicator First Two Letters ttt am pm indicator First Three Letters 79 It components 10 Appendix 10 1 User interface libraries 10 1 1 CAN TQ CanCe dll 10 1 1 1 Introduction TQ_CAN is a Windows CE DLL which provides support functions for the CAN interface of the TQMa31 CPU module It provides support for the following functions 1 Functions to open and close the interface TQcan_OpenBoard TQcan_CloseBoard 2 Baudrate configuration functions TQcan_SetBaud 3 Functions to start and stop bus activities TQCan_Start TQcan_Stop 4 Functions for reception of bus events and messages TQcan_EventCount TQcan_ReadEvent 5 Functions to transmit messages TAcan TransmitMsg TAcan ReguestMsg 10 1 1 2 Function description 10 1 1 2 1 Return values All functions return one of the following values for a detailed description see description of function TOG OK 0 ok TOc PARAMETER illegal parameter passed TOc LOADDRIVER 3 Hardware driver can
3. talian KPPLayout KbdIt dll HKEY CURRENT USERNKeyboard Layout Preload 3 00000410 7 20 5 Setting the default keyboard layout To define a default keyboard layout set an additional preload key without trailed preload value and associate it with the language ID desired to be default The following example shows the settings for Italian as default language HKEY CURRENT USERNKeyboard Layout Preload 00000410 Furthermore the selected language must have the preload key with the trailed preload value of 1 N D e nua It campunents HKEY CURRENT USERNKeyboard Layout Preload 1 00000410 7 24 Matrix keypad driver The TQMa31 module offers a 8x8 matrix keypad Since the column and row lines are routed through the FPGA of the TQMa31 module ghost keys could not be avoided by external hardware components e g diodes So you could only use the elements on the diagonal Intended for a connection to a tactile switch emulates scan code for Functional Kev 1 Intended for a connection to a tactile switch emulates scan code for Functional Kev 2 Intended for a connection to a tactile switch emulates scan code for Functional Key 3 Intended for a connection to an incremental encode jog dial wheel emulates scan code for Functional Kev 6 Intended for a connection to an incremental encode jog dial wheel emulates scan code for Functional Kev 7 Intended for a connection to an incremen
4. BSPa31 WinCE UM 101 Page 12 of 95 Hquuo sjueuoduio2 D Aq 60020 LOL WA SOUIM LEedSa To components Now you can delete the directory _WINCEROOT PLATFORM TQMa31 and all its subdirectories Delete the TQMa31 cec CE Components file from _WINCEROOT PUBLIC COMMOM OAK CATALOG CEC 44 Installation of the demo workspaces The demo workspaces for the TOMa31 BSP are included on the CD The workspaces are a good starting point for a new OS design They are based on the Industrial Controller design template and have the most common OS design specific drivers and OS components already included The workspaces are located in the directory SampleWorkspaces PBWorkspaces Copy the appropriate directory for your hardware platform to the PBWorkspaces folder in your Platform Builder installation e g to 8 WINCEROOT PBWorkspaces Now you can open it from within the Platform Builder From Platform Builder File menu select Open Workspace Browse to the WINCEROOT PBWorkspaces TQMa31_SampleWorkspace folder and open the TAM a31 SampleWorkspace pbxml file 45 Contents of the demo workspaces The demo workspaces TAM a31 SampleWorkspace is based on the Industrial Controller design template 4 5 1 Contents of the TAM a31 SampleWorkspace The demo workspace TAM a31 SampleWorkspace includes the following basic components in addition to the Industrial Controller design For detailed information about the included compon
5. LOL WA SOUIM LEedSa TQ components Reboot the device manually SpinForever 10 To boot the written run time image automatically follow the Instructions given in Chapter Running an OS Image from NOR Flash using EBOOT The run time image will be relocated from NOR to SDRAM before to start 5 5 5 Running a run time image from NOR Flash using EBOOT To execute an OS image from NOR flash that has been previously programmed using the procedure described in Downloading an OS Image into NOR Flash using EBOOT follow these steps Reset the TAMa31 module to launch EBOOT on the target Quickly switch over to your terminal emulation application and wait for the debug message Press ENTER to download now or SPACE to cancel to appear Hit the space bar to bring up the EBOOT configuration menu Continue selecting the Autoboot option of the EBOOT menu until NK from NOR is selected Specify the desired boot delay using the Boot Delay menu option Save the configuration using the EBOOT menu Reset the TAMa31 module to launch EBOOT again EBOOT will automatically jump to the run time image in NOR flash after the specified boot delay N oS 5 5 6 Debugging the download connection If you have problems with connecting your device through Platform Builder you can observe through a serial connection if the initiation of the network card by the bootloader works well In order to do so connect the UART1 port of your TQMa31 modul
6. The TQMa31 BSP was created with all updates installed including the December 2007 Update Please assure that your Platform Builder installation has all these updates installed 3 Contents of the CD WINCE5OO BSP N TOMa31 SampleWorkspace N 256MB_SDRAM N TOMa31 WINCE500 101 msi Doc BSPa31 WinCE UM 101 pdf EBOOT ADMATEC_800x480 128MB_SDRAM EBOOT nb0 256MB_ SDRAM EBOOT nb0 POWERTIP 320x240 128MB SDRAM EBOOT nbO 256MB_SDRAM E BOOT nbO PlatformBuilderUpdates WinCEPB50 051231 Product Update Rollup Armv4I msi WinCEPB50 061231 Product Update Rollup Armv4I msi WinCEPB50 071231 Product Update Rollup Armv4I msi Windows CE 5 0 Help Update EXE SampleRunTimelmages t TOMa31 SampleWorkspace 256_SDRAM NK bin SampleWorkspaces PBWorkspaces N TOMa31 SampleWorkspace SDKs TQMa31_SampleWorkspace TQMa31_SampleWorkspace_SDK_v1 0 1 msi BSPa31 WinCE UM 101 Page 10 of 95 Hauwo sjueuoduio2 D Aq 60020 LOL WN SOUIM LEedSa TQ components 4 installation The following chapters will guide you through the installation of the TQMa31 BSP for Windows CE 5 00 We assume that you have already installed the Microsoft Platform
7. rrer need ran Mresdre etas System t 9 conti entes L n om to bow Figure 45 Signaling an active breakpoint BSPa31 WinCE UM 101 Page 68 of 95 Hquio sjueuoduio2 D Aq 60020 LOL WN SOUIM LEedSa To components 8 4 2 2 Startup and Transport over Ethernet debugging without Active Sync For all systems that do not have a separate USB client connection there are 2 possibilities to get the debug connection working without a Active Sync connection In this case startup and transport runs over the TCP IP connection 1 OpenNETCF Consulting offers an executable file The tool is called CEDbgSetup exe and can be downloaded from http community opennetcf com articles cf archive 2007 08 31 debugging without activesync aspx The tool must be executed on the target device before the Connect to Device button from the Visual Studio 2005 toolbar is pressed Once the tool is running you can continue with the Connect to Device see chapter Startup over Active Sync Transport over Ethernet 2 Microsoft CMAccept also offers a solution which makes Active Sync needless You only have to copy the following files to from lt Visual Studio 2005 Install Dir gt smartdevices debugger target wce500 lt CPU type gt to your target dGlientshutdown exe CMAccept exe ConmanClient2 exe DeviceDMA dll eDbgTL dll TcpConnectionA dll First run ConmanClient2 exe afterwards CMAccept exe It doe
8. 3 Fake Batter e Tes LT A o ee ee 44 7 1341 Adding this Fake Battery Charger iens au nauzea dada a aaa ab ah dali ted sa e 44 7 13 2 bake Battery Charger configuration sss oscas ip eese race ee 44 TAA GPT ATIV T ec 44 Tla 7 gt Adaing le Cut E T UT UEM 44 7 142 0GPT Anvertoniguraliomse ee cT a aaa 44 el Maman ad Te Te le a ee ee 45 7 151 Adding the IPU Backlight Ananas ee AE EEEE 45 7 192 IPU Backlightdrver GOT OU PED D 45 7 146 PC Card Universe re aa ea nenn TAAT AARSE R 45 BSPa31 WinCE UM 101 Page 3 of 95 la components TAS TT Adding the Pe Cardidriver E ee rede 45 716 2 PC Card driver OONTIOUTE OT a cenena a ee A E VOS 45 I NI NV em 45 TEE Adding the P VVIMCBTIVB Co o o ee 45 1 112 PWM i driver configuration outer e nas zone obale ae E RETE VAE 45 T18 RIC eee E E E 46 OAA Ie REG e l a E A 46 Pelee RTC driver contiguas maoismen Qn EN ed A ETEA A EEEE 46 vM IP 1 LT NT 46 17 193 7 Adding e Wee diverser naar 46 1 192 gt Buzzer driver config ratiON aeos eee s dek eau o basti trap Shoe Eso een 46 1 19 32 C SIA diiverusage ohne nie dr tuuc ER EIE M E Me 46 T1937 Buzzear TSS CNOA s ee cates inciso tien T e RN ee 47 7 20 International keyboard lt le UT eT 47 7 20 12 Languages included Sasse nn see 47 7 20 2 Adding the international keyboard drivers 24444440on44nnn nn nnnnnnnnnnnnnnnnnnnnnnnnnnnnnn 47 7 20 3 Configuration of the international keyboard drivers nenn nennen 48 7 20 4 PE Tee Fe E T
9. Examples l e Processing a script Reference Cross reference to another section figure or table 12 Acronyms and Definitions The following terminology and abbreviations are used Acronym Full Form To components Acronym Full Form BSP Board Support Package IDE Integrated Development Environment OS Operating System SDB Software Development Board H W Hardware OAL OEM Adaptation Layer OEM Original Eguipment Manufacturer SDK Software Development Kit COM Communication Ports IRO Interrupt Reguest BSPa31 WinCE UM 101 Page 8 of 95 Hauwo sjueuoduio2 D Aq 60020 LOL WN SOUIM LEedSa To components 13 Liability Disclaimer The TQ Components GmbH does not accept guarantee of any kind about the topics accuracy completeness or quality of information made available in this manual a as well as its further use Claims lodged against TQ Components GmbH related to damages of material or intellectual nature arising out of the use or non use of information contained in this manual or out of the use of incorrect or incomplete information would not be entertained so long as there is no evidence of intentional or negligent fault on the part of TA Components GmbH The TQ Components GmbH reserves the right to change or supplement the contents of this manual or parts thereof without prior intimation to this effect 14 Copyright and Licensing Costs T
10. ck Abbrechen H e Figure 29 Selection of the development languages and behavior of the appropriate check boxes Note If you did not add the Standard SDK for Windows CE component to the OS design you are not able to select the check box in this case the check box is grayed out Next you have to configure the SDK by selecting Configure SDK from the Platform menu First select the SDK target directory path the OS design name and die MSI file name SDK Settings Startup Servers Development Languages Additional Files Help Emulation Install Product Properties EULA Readme SplashScreen CPU Transports SDK target directory path C WINCES00 PBWorkspaces TOMa31_Devel SDK OS design name Mini IPC MSI file name Mini IPC_SDK msi Compress files into the MSI database file more compact Leave files uncompressed in installation subfolder faster A Launch MSI installation file after successful build C la components Figure 30 Modifying SDK properties Then select the available startup servers and transports for debugging Set up the appropriate default startup server and default transport and accept the new SDK settings SOK Settings SDK Settings Progettes EULA fiesdine Splash Screen cru Development Languages Additional Files Hep Startup Servers Development Languages Additonal Fiet Heb instat Product Piopertes KULA fleadme Splash Screen PU Temrmpents Select all ta
11. 0 ARMVAI specific SDK for NET Compact Framework o ee 8 4 2 Establish a connection between VS 2005 and the CE device 8 4 2 1 Startup over Active Sync Transport over Ethernet Note Before you start with the following steps be sure that the Run Time Image on the target device has build in the active sync support see chapter Establish a ActiveSync connection over USB Click on Device Options button on toolbar 29 CanTestBT42 Microsoft Visual Studio File Edit View Refactor Project Build Debug Data Tools Window Community Help a e Bb B xac E E Debug Any CPU 8 TQMa31 Devel ARMY4I Release A EJ 2 bes LE Re A gt EEE QMa31 1 Ea Bla dg ox a R Program cs CanTest cs Start Page Sf CanTestBT42 CanTest WStartCANTest else oO a Tn Wi xoqioo DE Console WriteLine R ckgabewert ConfigEvents 0 configEventResult Konfiguration und Starten des Empfangs Threads Thread canThread new Thread new ThreadStart CanTest ReceiveThread canThread Start CANDLLWrapper TQcan_SetBaudrate boardHandle Default Baudrate TODO Check Baudrate CANDLLWrapper TQcan Start boardHandle Console WriteLine Wait 60 seconds for incoming messages while transmit for int i 0 i lt 60 i P ICANDLLWrapper TQOcan TransmitHsg boardHandle 0 8 TestData CANDLLWrapper TQcan_TransmitMsg boardHandle 2047 8 TestData CANDLLWrapper TOcan TransmitMsg boardHandle UInt32 0 C
12. 1 Order dword 5 load after I2C1 LM75AddressCpuModule dword 48 1 LM75 LM75AddressBaseBoard dword 49 2 LM75 7 7 3 How to use the temperature sensor driver The LM75 temperature sensor driver supports the Windows CE standard stream driver interface A demo program tempdemo exe is included in the BSP To execute the demo please open a command window and type tempdemo exe The program will display the temperature values read from the LM75 temperature sensors The Sourcecode of this demo program can be found under _WINCEROOT PLATFORM TQMa31 DRIVERS TEMP TMPDEMO 7 8 Serial ports UARTs Serial ports are used e g for ActiveSync or for connecting Touch Screens to your system 7 8 4 Adding serial drivers to your OS design You can add up to three serial ports through the Platform Builder IDE To add support for COM1 right click on the UART1 serial port component in the Catalog Catalog gt Third Party gt BSPs gt TQMa31 gt Device Drivers gt Serial and choose Add to OS Design COM2 and 3 can be added to your OS design by selecting the UART2 serial port and UART3 serial port component 7 8 2 Serial driver configuration There is nothing to configure for this driver BSPa31 WinCE UM 101 Page 42 of 95 Hauwo sjueuoduio2 D Aq 60020 LOL WA SOUIM LEedSa To components 7 9 Touch panel support The BSP includes a driver for the i MX31 integrated 4 wire resistive touch con
13. CE should start up on your target device For subsequent downloads just select again Attach from the Target menu you don t need to configure the remote connection again unless you change targets 5 5 2 Downloading a run time image into SDRAM using EBOOT To download a run time image into the SDRAM of the target follow these steps ae cx D 5 5 3 Open the desired workspace within Platform Builder Deselect Platform Settings Build Options Write Run time Image to Flash Memory Build the run time image following the steps provided in Building the OS Design Reset the TQMa31 module to launch EBOOT on the target If a target device connection has not been created within Platform Builder follow the steps in Configuring Ethernet Connection to establish a connection From the Platform Builder Target menu select Attach Device to begin the download Downloading a run time image into NOR Flash using EBOOT To download a run time image into the NOR Flash of the target follow these steps a m Open the desired workspace within Platform Builder Select Platform Settings Build Options Write Run time Image to Flash Memory Build the run time image following the steps provided in Chapter Building the OS Design Reset the TAMa31 module to launch EBOOT on the target If a target device connection has not been created within Platform Builder follow the steps in Configuring Ethernet Connection for Downloading a
14. Connectivity Options T guration New target device name Add Device Associated OS Design SDK Optional Service Configuration none rnel Service Maj Core Service Settings Figure 14 Add a new target device name After you clicked Add the Kernel Service Map tab will be opened automatically Target Device Connectivity Options Device Configuration Ad Device Target Device TRS Delete Device Download Service Configuration Ethernet Settings Kernel Service Map Core Service Settings Transport Service Status Ethernet lt l Settings D Debugger Kdstub ting ges me Target Device has been added Figure 15 Target download settings Make sure that Ethernet is selected for both Download and Transport Click the Settings button of the Download option A new dialog will appear where you can choose the device to connect to At the moment the Active Devices list will be empty Now start your TQMa31 module When the Startup menu appears just press Enter to choose the download option x la components EBOOT sends a broadcast message to the Platform Builder and your device will show up in the Active Devices list as MX31XXXXX where XXXXX is a number depending on your network card s MAC address If your device does not show up in the list of active devices proceed to chapter Debugging the download connection and Configuration options of the EBOOT bootloader It is possib
15. Establish a Active Sync connection over serial port On the target device open the start menu select Settings and then Network and Dial up Connections IF programs gt Se Favorites Documents gt e d Control Panel C Run 3 Network and Dial up Connections R Suspend k Taskbar and Start Menu Figure 48 Network and Dial up Connections A new window opens with an icon named Make New Connection Make a double click on this icon in the new dialog type a name for the connection select type Direct Connection and hit Next gt File Edit View Advanced gt x un BM 9 Make New VMINIL Connection Make New Connection Type a name for the connection 71 m Connection Select the connection type Dial Up Connection j virtual Private Network PPTP Virtual Private Network L2TP PPP over Ethernet PPPoE 9 Start Je network Connections LEN 8 26 am B Figure 49 Make a new connection The next dialog prompts for selecting a device After you hit Finish a new connection symbol with the name you chose appears in the Network Connection window Open the control panel and double click on PC connection Click on the change button and select the connection you have just created BSPa31 WinCE UM 101 Page 74 of 95 Hquuo sjuauodwog OL Aq 60020 LOL WN SOUM LEEeASE To components By double clicking this symbol the system t
16. INI ML EL MEL ee ELE IE 72 8 6 1 REGUIFEC COMPOMEMMIS ste ie IESU 72 8 6 2 Establish a Active Sync connection over serial port 74 8 6 3 Establish a ActiveSync connection over USB eee eee 75 9 Additional customizations unseren de exea dr Rr E nas Ee CX YT Ye HERE gra k 75 9 1 Windows CE Component nennen Pe LY RT A TERR Ran TIR Kn ee VA eV AKA 75 9 1 1 ARE ASIE AVS oo ooo E e C I a 75 9 1 2 PINE A T sU MU e m EM E M 76 9 1 3 Hive Saeed REgIStiy uad nee 77 9 2 Changing des appearance of Windows CE sees 78 9 2 1 Changing the desktop wallpaper eee eee eee 78 9 2 2 Aiding the TASK DAN sees nassen ana ana aan nn ae Lernen daher 78 9 2 3 Changing the folder name of storage devices ummunnnnnnanannnnnnnnnnnnnnnnnnnannnnnnnnnnn 79 9 2 4 Setting Uo the time zoneto C 79 10 IT PIG 80 1050s Userinterrace liDEaries ster ERO crn er E IPSI DEIN M 80 10 11 CANTO Cane dce oa T 80 10 1 1 1 Introduction es orem er n E T 80 10 1 1 2 Eunctiondescriptionos estote RE DEI E 80 nS E a 9 Ret rm values moo era 80 10 1 1 2 2 Interface access f nclions errore reri prier E diets POSSE ERE PESE tako nas 81 1051 1 2 2 d Ar GicansODernBOSr de 0909280 E SPR KO Oo ee 81 10 1 1 2 2 2 TQcan CloseBoard oe e ru eere rk Pe FERE SER XR RES 81 10112 BUS Coniguralian TUDICHDITS S an dt cessat A fein anna 82 VO P I S GeanssetBaldrates steer SEIT ME 82 10 1 1 2 4 1 TOcancGetBaudrate tette rere genen 82 10 11 25 Message acce
17. OS design 8 1 1 Creating an SDK from your OS design Note Before building the SDK please do a Sysgen of a Release Run Time Image of your OS Design Start the Platform Builder IDE open your workspace and select New SDK from the Platform menu samplePlatform Platform Builder Welcome to Platform Builder EB Eile Edit View Project Platform Target BuildProject Build OS Tools Window Help Bug CEPC x86 Release Refresh Catalog Items Review Special Notifications BB samplePlatform Catal Insert o CEPC x86 Device Drivers Settings Emulator x86 MEN Z Applications 2 Applications BSP Wizard er 1 Communicati Export Wizard A Core DS Ser Figure 24 Create a new SDK for eVC Choose a unigue name for the SDK enter the name of your company and hit Next gt SDK Wizard Product Properties Provide information 16 uniquely identity your SDF The mti file tor the SDK requires tfo following intormation Product nama that is displayed whan msi te runs sampleflattorm SO Monutacturer nama TOComporents GmbH Locale language us English Product version format 00 00 0000 Mejor 5 Minor 8 lt Zur ck rier gt Abbrechen Hito Figure 25 Setting up the SDK properties BSPa31 WinCE UM 101 Page 56 of 95 P Hauwo sjueuoduio2 D Aq 60020 LOL NN SOUM LEEeASE To components After you click Next gt you can select the dev
18. RNGA BSP RAM 256 BSP MCP2515 BSP FSL VFP BSP TOUCH MC13783 BSP TOMA31 WDG BSPa31 WinCE UM 101 Backlight Driver Audio Driver PMIC Driver Battery Driver Fake Battery Charger PWM Driver Buzzer Driver Powertip Display Driver DVFC Driver I2C Driver International Keybord Driver LM75 Temperature Driver SMSC9215 Ethernet Driver PCMCIA Driver RTC Driver SDHC Driver SDCard General Purpose Timer Random Number Generator 256MB RAM CAN Driver VFP Support Touch Driver Watchdog Driver Page 14 of 95 Hquuo sjuauodwog OL Aq 60020 LOL NN SOUM LEEeASE TQ components BSP_TQMA31_GPIO GPIO Driver BSP_USB_HSOTG_HOST USB OTG Host Support BSP TQ BuzTest Buzzer Test BSP TQ CanTest CAN Test BSP TQ GpioTest GPIO Test BSP TQ WdgTest Watchdog Test 46 Removal of a demo workspaces Close the Platform Builder IDE Delete the appropriate demo workspace directory from the PBWorkspaces directory of your Platform Builder installation e g _WINCEROOT PBWorkspaces TQM_a31_SampleWorkspace 15 It components 5 Creating a new OS Design based on the TQMa31 BSP The following steps will guide you through the whole process of creating compiling and test of a new Windows CE workspace for the TQMa31 hardware module based on the industrial controller design template 5 1 Creating a new workspace Open Platform Builder and select New Platform from the File menu Choose a name for the Workspace In the next di
19. SDK Wizard Product Properties Provide information to uniquely identify your SDK The msi file for the SDK requires the following information Product name that is displayed when msi file runs _ Mini IPC Manufacturer name TQ Components L Locale language U S English Product version format 00 00 0000 Major Minor 0 Build 0 lt Zur ck Weiter gt Abbrechen Hilfe BSPa31 WinCE UM 101 Page 58 of 95 P Hquio sjueuoduio2 D Aq 60020 LOL WN SOUIM LEedSa To components Figure 28 Setting up the SDK properties After you click Next gt you can select the development languages you want to support Here you must select the check box NET Compact Framework and Hit Next gt and then Finish SDK Wizard X sok Wizard An SDK can support multiple development languages and multiple frameworks for An SDK can support multiple deweloomert language and multiple frameworks for Development Languages E Development Languages AK alL developer apicalnn developer Select the development languages that you want your SDK bo support Select the development languages that you want your SDK to support 7 Miete Vana Ceo 4 0 cuppos F Meada Vena Ceo 4 0 support v ATL fee Windows CE applications MFC tor Windows CE applicationt MFC for Window CE application O MFC for Windows CE ActiveX control I MFC for Windows CE ActiveX controls et lt Zur ck Abbiechen H e lt Zur
20. SOUIM LEedSa To components 7 4 8 USB Mouse and Keyboard support To have support for USB keyboards and mice add the USB HID Keyboard and Mouse component to your OS design Catalog gt Core OS gt Windows CE devices gt Core OS Services gt USB Host Support gt USB Human Input Device HID Class Driver gt USB HID Keyboard and Mouse 7 4 4 USB printer support To have support for USB printers add the components USB Printer Class Driver Catalog gt Core OS gt Windows CE devices gt Core OS Services gt USB Host Support and PCL Printer Driver Catalog gt Device Drivers gt Printer Devices to your OS design Furthermore TQ offers a SDK for NET Compact Framework 2 0 from a third party which offers you easily to implement printer functions within your application Please see chapter PrinterCE NETCF SDK for Visual Studio 2005 for more details 75 SD Host Controller The SD Host Controller Driver adds support for SD Card functions of the i MX31 CPU to your OS design 7 5 1 Adding the SD Host Controller driver to your OS design Right click on the SD Host Controller component in the Catalog Catalog gt Third party gt BSPs gt TQMa31 gt Device Drivers gt SD Host Controller and choose Add to OS Design 7 5 2 SD Host Controller driver configuration There is nothing to configure for this driver 7 6 Audio The Audio Driver adds support for the audio functions of the i MX31 CPU t
21. by right clicking on the component in the Platform Builders Catalog view and selecting Add to OS Design In the following Example the SMSC9215 NDIS network driver is added to our workspace PE EI Catalog BSPs Coe 05 aG Device Drivers C3 Platform Manager Third Party BSPs Ag TOMa31 ARMVA4I lt 79 Device Drivers Audio Driver B Battery Driver Buzzer xf CSPI Bus C Display Dvrc Fake Battery Charger GPT 8 Hantro CODECS 12C Bus 3 Input Devices 8 IPU Backlight LM75 Temperature Sensor 3 4 Networking SMSC3215 NDIS S S Add to OS Design SME nrc a B SD Host Conti x fij Serial Refresh Catalog 8 Touch Diver Find 3 USB Devices A RANGA v Docking View Hide Help Properties Figure 8 Adding drivers and OS components The selected component will now be shown in your OS Design View on the left side of the Platform Builder window To remove a driver or component from your OS Design right click on the component in the Platform Builder s OS Design view and choose Delete The component will be removed from the OS Design Catalog configuration It components 5 3 OS Design configuration After we have added all desired components and drivers we have to do some configuration settings before we can build our OS design 5 3 1 Memory configuration Depending on your TQMa31 module choose the right memory SDRAM and NOR Flash configuration f
22. eles ari 13 2 9 vo DADI DW Sete EE TE ES TER ET AT Lampes oh rea Canh dn t dexiia ie D CRETMINT to Platforms the Minima GIES Contigureticn feature GTAGEN_MINGYES to the plat zrs Added the Minimal CDI Contigeration maturm STSCEW WINGDI to the platform Ad ed the Minimal input Configuration feature STSCEM RININPCT to the platfora Added the Minimal Window Manager Ccmiiguraticm mature STOSCEN XINVNCR to the platiors the ATGShell API Get feature STOCEN ATCUESTLO to the plattorw Added the Common Dialog Support mature SUUCEM Conti to the platiore Added the Comtrol Panel deplete feature STO EN CTLPNL to a piat tam added the Softvare tesed input Pane Driver festure STOOD to the pint Lern the CIF tor Small Screens feature SYREN HSIN to the platfora c NOGEN COMECTEI te the platform 1 2 driver to tbe platfora ddided the IFS Dechiight driver to the plattora Jeted the testure and driver list update successfully Ch alah fue MEZ k ate E Prous FY a Figure 7 Appearance of platform builder after generating an new platform Now you have a basic OS design configuration which is ready for building and creating a run time image but still lacks the OS design specific hardware drivers BSPa31 WinCE UM 101 Page 20 of 95 Hquuo sjueuoduio2 D Aq 60020 LOL WN SOUIM LEedSa 4 TQ components 5 2 How to add drivers and OS components Drivers can be added to your OS design
23. fieldsoftware com PrinterCE NetCF Docs htm 10 2 4 Supported Printers Please see http www fieldsoftware com PrintersSupported htm
24. have the option to install Microsoft eMbedded Visual C 4 0 and SP4 for new installations Jor Microsoft eMbedded Visual C 4 0 SP4 only for existing eVC4 installations Select Next to proceed with Setup Select Exit to cancel installation and return to Windows Products Microsoft eMbedded Visual C 4 0 with SP4 Microsoft eMbedded Visual C 4 0 SP4 only Figure 34 Installing eVC with SP4 If you already have eVC installed without Service Pack 4 you must download it from the Windows Embedded Developer Center in the Microsoft msdn web page During the installation of MS embedded Visual C eVC one reboot is needed Leave the CD in the drive while Windows is rebooting because the installation continues after reboot 8 3 2 Establish a connection between eVC and the CE device Open embedded Visual C and select New from the File menu Files Projects Workspaces CR WCE Application Project name amp WCE ATL COM Appwizard Helloworld WCE Dynamic Link Library S WCE MFC ActiveX Controlwizard Location 2 WCE MFC App Wizard dll C Programme Microsoft eMbed C a WCE MFC App wizard exe amp WCE Static Library Create rew workspace Figure 35 Create a new project for the ARMV4I CPU BSPa31 WinCE UM 101 Page 62 of 95 f Hawo sjueuoduio2 O L Aq 60020 LOL WN SOUIM LEedSa To components In this example you may create a typical Hello World applic
25. serial or RNDIS function Note The USB OTG port can only be configured in one of the 3 possible device roles Mass storage Serial or RNDIS The role is set with DefaultClientDriver value under the HKEY LOCAL MACHINEDriversUSBYFunctionDrivers key The Full Function OTG transceiver driver automatically selects between the host or client driver The host or client can also be configured as the only mode for the OTG port using the Pure Host or Pure Client catalog item All the OTG catalog items are exclusive 7 4 1 1 Adding the USB OTG drivers Depending on the desired functionality right click on the Full OTG Function Pure Client Function or Pure Host Function component in the Catalog Catalog gt Third party gt BSPs gt TQMa31 gt Device Drivers gt USB Devices gt USB High Speed OTG Device gt Desired Function and choose Add to OS Design 7 4 1 2 USB OTG drivers configuration There is nothing to configure for this driver 7 4 2 USB high speed driver 7 4 2 1 Adding the USB high speed driver Right click on the USB High Speed Host component in the Catalog Catalog Catalog gt Third party gt BSPs gt TGMa31 gt Device Drivers gt USB Devices gt USB High Speed Host and choose Add to OS Design 7 4 2 2 USB high speed driver configuration There is nothing to configure for this driver BSPa31 WinCE UM 101 Page 40 of 95 Hauwo sjueuoduio2 D Aq 60020 LOL WN
26. to your catalog Now restart the Platform Builder IDE In the catalog view you will see the TQM BSP and its device driver components included under Catalog gt Third party gt BSPs gt TQMa31 43 Removal of the TOMa31 BSP Open the Platform Builder IDE and select Manage Catalog Items from the File menu Now search the TAMa31 cec catalog item and click Remove Manage Catalog Items Imported cec files File Version Vendor Description dbaul500 cec 5 00 Microsoft DBAu1500 BSP Catalog Items emulator cec 5 00 Microsoft Emulator BSP Catalog Items Remove geode cec 5 00 Microsoft Geode BSP Catalog Items mainstonei cec 5 00 Microsoft Intel Mainstonell BSP Catalog Items sg2 vr4131 cec 5 00 Microsoft 5G2 VR4131 BSP Catalog Items sg2 vrb5 00 cec 5 00 Microsoft 582 VR5500 BSP Catalog Items smdk2410 cec 5 00 Microsoft Samsung SMDK2410 Development platman cec 5 00 Microsoft Platform Manager Features coreos cec 5 00 Microsoft Windows CE Core OS components wcetk cec 5 00 Microsoft Windows CE Test Kit Client sourcetags cec 5 00 Microsoft Source code information for the sou clonemodules 5 00 Microsoft Catalog items that can be cloned netc v2 cec 5 00 Microsoft NET Compact Framework 2 0 salmobile cec 5 00 Microsoft SQL Mobile support na3l cec T Systems BSP for the TU a31 CPU module Figure 2 Manage Catalog Items After closing the dialog box by clicking OK the TQMa31 BSP will disappear from the catalog
27. 6 bytes free N gt exit erbindung zu Host verloren gt Figure 50 Target connection via Telnet 9 1 2 FTP Server FTP allows you to transfer files to and from your target system via the File Transfer Protocol without the need of using ActiveSync To add the FTP server to your image right click on the FTPServer component in the Catalog Catalog gt Core OS gt Windows CE devices gt Communication Services and Networking gt Servers and choose Add to OS Design To enable the FTP server you have to add additional registry keys e g In your project reg file as shown below HKEY LOCAL MACHINENCOMMNFTPD IsEnabled dword 1 UseAuthentication dword 1 AllowAnonymous dword 1 AllowAnonymousUpload dword 1 DefaultDir Note The registry settings shown above allow anonymous access to your target system This should be disabled before you deploy your OS design You should set the A lowAnonymous registry key to O and add a list of allowed users to the registry Search the Platform Builder Help System for FTP server UserList for more information BSPa31 WinCE UM 101 Page 76 of 95 Hauwo sjueuoduio2 D Aq 60020 LOL WA SOUIM LEedSa To components To connect via FTP simply open a Command Prompt in Windows XP and do an ftp command to the IP address of your target system e g fto 192 168 100 25 You can close the connection by simply typing bye at the
28. ANID EXT CANDLLWrepper TQcan TransmitMsg boardHandle UInt32 Ox1FFFFFF C Figure 39 Device Options Select the SDK OS design from Show devices for platform X 65 la components Options Environment Show devices for platform Projects and Solutions Mini IP c Source Control L Text Editor Devices Database Tools TOMa31_Devel ARMV4I Release sweas AS Debugging General Devices Delete Form Factors Windows Forms Designer 2 Default device W1QMa31_ Devel ARMV4I Release Figure 40 Selection platform device Configure the IP address of the target Properties gt Configure TOMa31_Devel ARMV41_Release Properties Default output location on device S rogram Files Folder SP Configure TCP IP Transport Bootstrapper n ActiveSync Startup Provider Configure Device IP address C use fixed port number 5655 Obtain an IP address automatically using ActiveSync Detect when device is disconnected M Use specific IP address 172 20 11 233 Cancel Conca Figure 41 Configure the IP address of the target Then attach to the device with the button Connect to Device on the toolbar BSPa31 WinCE UM 101 Page 66 of 95 Hawo sjueuoduio2 O L Aq 60020 LOL WN SOUIM LEedSa TQ components Sc Cantestf 4 Microsot Visual Studio Fin Edt View Refactor Project fad
29. Baa kok TEE ERE Ya EROS 41 7 5 SD o OB o gm sss saet aza Saa errang 41 7 5 1 Adding the SD Host Controller driver to your OS design 41 1 92 SD Host Controller driver configuration 2222 2 umsur444nn44aR nn nnHn nn nnnnnnananannnnnnnnnn 41 7 6 oom E E A A E E 41 7 6 1 Adding the Audio driver to your OS design sss sees 41 7 6 2 Audio driver configuration scenic kesexe a Rue eese Ea EA RS MD KY SAM ERN E ES 41 7 7 LM75 Temperature eT 41 7 1 1 Adding the temperature sensor driver to your OS design 42 Ta Temperature sensor driver configuration sese eee ee eee eee eee 42 7 7 3 How to use the temperature sensor driver eee nenene 42 7 8 Senat Boris VARTS P o du Mud EE 42 7 8 1 Adding serial drivers to your OS design esee 42 7 8 2 DONA cornmgubati Dr aeos uci os een ee ai m 42 7 9 TROUGH panel supponte ee EEUU cme E Ss 43 7 9 1 Adding the touch panel VST orerar E o ode nesena 43 1 92 Touch Dane anwar configuration ea c een 43 7 10 Dynamic Voltage and Frequncy Control DVEG ze nee 43 T101 Adding the DY PC driver nannten inneren 43 7 10 22 BBC Driver GOO URAN ee ee leachate peedieeeaseanernds 43 TE 22 BUS Verne ee R ee 44 PA MEE FXG Ie Ae AG ao P 44 fice IC BUS CVercornmgdrelbEE wise o debutto eee Ae LC S 44 k 12 dale UNIS cuc tuu qu LL ME E UE 44 7 121 PAGING the Battery drivers sees oreet een n acts 44 22 1 Bale dover or gurctlDTInssa ciam aeqne ieu ne ae aaa rende 44 7
30. Builder 5 00 from original Microsoft DVD or CDs If not please install it before proceeding to the next paragraph 4 1 Installation of the Platform Builder Updates Microsoft delivers updates to the Platform Builder monthly The TQM BSP was created with all updates installed including the December 2007 Update Please assure that your Platform Builder installation has all these Updates installed 4 1 1 Which Updates are already installed You can check for instaled updates by looking in the Platform Builder update folder C WINCE500 Updates For each installed Update there should be file in HTML and RichText format with detailed information about the update fi C WINCE500Wpdates EEK Datei Bearbeiten Ansicht Favoriten Extras aw Q Zur ck d K Suchen IE Ordner Fr Adresse CHWINCESOO Updates v Eg wechseln zu Ordner X Name C3 WINCESOD Backup crc Windows CE 5 0 Product Update Rollup 2005 htm 7 OTHERS Windows CE 5 0 Product Update Rollup 2006 htm PBWorkspaces Windows CE 5 0 Product Update Rollup 2007 htm PLATFORM sl WinCEPBSO 051231 2005 Product Update License rtf C PRIVATE E WinCEPBSO 061231 2006 Product Update License rtF C PUBLIC amp C3 SDK 3 SUPPORT ON C Backup B 051231 2005 B C3 061231 2006 C 071231 2007 ll EN 7 Objekte e Freier Speicherplatz 60 7 GB 505 KB d Eigener Computer Figure 1 Rollup Updates 4 1 2 How to install m
31. CNTGMa31 SampleWorkspace bat WINCECALLED 1 WINCEDRIVE C WINCEOSUER 588 WINCEROOT C WINCES WWINCES PBWorks paces TQMa31_SampleWorks pace Re 1Dir TQMa31_ARMU4I_Re lease gt Figure 12 Viewing environment variables BSPa31 WinCE UM 101 Page 24 of 95 Hquio sjueuoduio2 D Aq 60020 LOL IWN Y3OUIN LEEdSH Example If you want to set the environment variable BSP HIVE CFCARD please type Set BSP HIVE CFCARD 1 To delete the variable just type Set BSP HIVE CFCARD Alternatively you can add the environment variable in the Environment tab of the Platform Settings dialog la components 5 4 Building the OS Design To build your OS design first choose the desired build configuration Debug or Release from the pull down menu in the Platform Builder IDE You can also select the build configuration by selecting Set active configuration from the Build OS menu in Platform Builder IDE TQMa31 SampleWorkspace Platform Builder File Edit View Project Platform Target Build Project Build OS Tools Window CE Device v Ba TOMa31 ARMV4I Release TOMa31 ARMV4I_ Release TQMa31 ARMY4I Debug o TQMa31_Sampleworkspace Catalog items 29 Device Drivers Figure 13 Selecting the active configuration Second start the system generation Click the Sysgen button or choose Sysgen from the Build OS menu The build process can take up to 20 minutes to build the run time image depending on the num
32. CPU frequency of 532MHz The driver will not be loaded if CPU frequency is set to 399MHz 7 10 2 DVFC driver configuration There is nothing to configure for this driver 43 la components 7 11 12C bus driver The Inter Integrated Circuit I2C module provides the functionality of a standard I2C slave and master The I2C module is designed to be compatible with the standard Phillips I2C bus protocol 7 11 1 Adding the I2C bus driver To add the I2C driver right click on the I2C bus component in the Catalog gt Third Party gt BSPs gt TQMa31 gt Device Drivers gt I2C Bus and choose Add to OS Design 7 11 2 I2C Bus driver configuration There is nothing to configure for this driver 7 42 Battery driver The battery driver module is used to provide information about the battery level to the OS 7 12 1 Adding the Battery driver To add the Battery driver right click on the Battery Driver component in the Catalog gt Third Party gt BSPs gt TQMa31 gt Device Drivers gt Battery and choose Add to OS Design 7 12 2 Battery driver confiquration There is nothing to configure for this driver 7 13 Fake Battery Charger This catalog item forces the battery driver to report a charger is connected and avoids the lowbattery condition You should add this component if you don t have a battery powered device 7 13 1 Adding the Fake Battery Charger To add the Fake Battery Charger right click on th
33. DCard are already prepared To select CFCard as hive target device please set the BSP HIVE CFCARD variable in the TQMa31 BAT File C WINCE500 PLATFORM TQMa31 TQMa31 bat To select SDCard as hive target device please set the BSP HIVE SDCARD variable in the TQMa31 BAT File C WINCE500 PLATFORM TQMa31 TQMa31 bat Alternatively you can add the environment variable in the Environment tab of the Platform Settings dialog Note Only one of the BSP_HIVE_XXX variables must be set at a time 77 To components Note Always perform a clean Build after you have added the Hive based Registry feature Choose the Clean Before Building option in the Build OS menu of the Platform Builder IDE and perform a Sysgen Build OS gt Sysgen Build OS Tools Window Help BY Sysgen Build and Sysgen Build and Sysgen Current BSP Clean Before Building v Copy Files to Release Directory After Build w Make Run Time Image After Build Copy Files to Release Directory Make Run Time Image Figure 52 Hive based Registry Clean before Building 9 2 Changing des appearance of Windows CE 9 2 1 Changing the desktop wallpaper 1 Add the following key to project reg x kk Wallpaper kk HKEY CURRENT USERNControlPanelNMDesktop wallpaper Windows X customer bmp 2 Add the file name and path for the new wallpaper bitmap to project bib windowsce qvgap bmp FLATRELEASEDIR customer bmp NK S 2 Co
34. For technology in Quality K User Manual Windows CE 5 00 BSP for the TOMa31 module BSPa31 WinCE UM 101 23 03 2009 Date Name Designation Prepared 05 05 2008 Ch Reichherzer Project BSPa31 WinCE Checked 05 05 2009 Ch Reichherzer Document no BSPa31 WinCE UM 101 De Ir Customer us rac Page 1 of 95 File BSPa31 WinCE UM 101 doc C TA Components GmbH All information contained in these documents is to be treated confidentially Distribution of presentation and information to third party reguires written consent of TA Components GmbH 1 2 3 4 la components Table of Contents Za oo MUERE T 7 1 1 Terms Ee lt i nie 7 1 2 Acronyms nnde ili DIS anan eer a ee ee 7 1 3 eD o gerne TU 9 1 4 Copyright and Licensing Costs sss sese eee 9 1 5 Regislered Trademarks ccr a een 9 pigs IE UIQ Pe ee 10 Gortten TA Le Di E Hc nee 10 Installationen eee Mia asia M eL QI MU ee See OLI 11 4 1 Installation of the Platform Builder Updates 11 4 1 1 Which Updates are already installed i ette tree eite 11 4 1 2 How to installimissing updates mee R T ee res pack 11 4 2 Installauon er tie P Orts octet renders lutei Dec costs eie A 12 4 3 Removalot tie rQMa3 ESP S uem ote cec een 12 4 4 Installation of the demo workspaces eee eee 13 4 5 Contents of the demo workspaces eee eee eee eee nnne nnn nnn nnne 13 4 5 1 Contents of the TAM a31 SampleWorkKSpaCe eee eee eee eee eee 13 4 5 1 1 Ad
35. Hauwo sjueuoduio2 D Aq 60020 LOL WN SOUIM LEedSa To components In Release Builds the KITL should always be turned off as it will slow down your platform performance 5 3 3 Language settings To set the default language of your OS design open the Settings dialog from the Platform menu in Platform Builder and go to the Locale tab Here you can set the locales that your OS design will support The locales include information about currency formats date and time formats etc specific to each country Platform Settings Configuraton TOMa31 ARMV4I Release l maan eal u General Locale Guid Options Environment Custom Build Actions Imane Locoles Al kaans Albanisch Arabisch Aqgypten Clear All v Arabisch Aluer en Default language Englisch USA Codepages 437 OEM United States 708 Arabic ASMO 708 720 Arabic Transparent ASMO s Clear All 737 OEM Greek 437G 775 OEM Balto Localize the build U Syria locelizeson checking im the build Cancel Figure 10 Locale settings The default language specifies the language of the Windows CE user interface buttons menus windows etc To set the default keyboard layout which is independent from the default language please refer to Chapter Setting the default keyboard layout 23 To components 5 3 4 Environment variables The build process of a OS design is controlled by environment vari
36. IR E eee ee eee ae ss 49 7 20 5 Setting the default keyboard Iavout sss ssssssssses sees se ssssse eee ees seesee seene nne 49 721 Matix keypad Re KOK o 50 7 21 4 Adding the matrix keypad driver to your OS design essere eee 50 7 21 2 Matrix keypad drive configuratiQris ose eta ttes eee ee 50 122 MCP2515 CAN Anver ld tec s k dane REAPER HERR NS dea ER RENE 51 7 22 1 Adding the MCP2515 CAN driver to your OS design eee 51 7 22 2 MCP2515 CAN driver configuration and usage sse sees eee eee 51 523 V eCanGe Test Applicadons secet rere RE en 51 7 23 14 Adding the TA CanCe Test Application to your OS design 51 7 23 2 TQ CanCe Test Application Configuration see eee ee 51 Lo Wc loli M OPP P UTE E 51 7 24 1 Adding the GPIO driver to your OS design nannten 51 1 242 GPIO driver configuration and usage eene nacre etnia tx tee best x ra Eun te has 51 1329 IG ODIOestADpliCallorims en merece a eens ere done NNUS RM IS 52 7 25 1 Adding the TA Gpio Test Application to your OS design uuuss 52 7 25 2 TO Opio Test Application configuration eene 52 Feo c WANG Lele ANS er EI TC 53 7 26 1 Adding the Watchdog driver to your OS design eee 53 7 26 2 Watchdog driver configuration and usage eeue eese 53 fe ee LOE WVGGEVESL ADDIICALIOR ss teeter o A vo MN te M AT Tee de Tube 54 7 27 1 Adding the TA Wdqg Test Application to your OS design eee 54 7 27 2 TQ _Wdg Test Applicat
37. NT32 acc code Set the acceptance code register board hdl in Interface handle s TQcan OpenBoard acc code in Value of the acceptance code register to set MSB 0x80000000 is set for extended message IDs TQc ReturnCodes TQc PARAMETER if interface is not opened 10 1 1 2 5 3 TQcan GetAccMask Function Description Parameter Return value int TAcan GetAccMask UINT16 board hdl UINT32 acc mask Query the acceptance mask register board hdl in Interface handle s TAcan OpenBoard acc mask out Current value of the acceptance mask register MSB 0x80000000 is set for extended message IDs TQc ReturnCodes TQc PARAMETER if interface is not opened 10 1 1 2 5 4 TQcan GetAccCode Function Description Parameter Return value BSPa31 WinCE UM 101 int TAcan GetAccCode UINT16 board hdl UINT32 acc code Query the acceptance code register board hdl in Interface handle s TAcan OpenBoard ace code out Current value of the acceptance code register MSB 0x80000000 is set for extended message IDs TQc ReturnCodes TQc PARAMETER if interface is not opened Page 84 of 95 Hquuo sjueuoduio2 D Aq 60020 LOL WN SOUIM LEedSa To components 10 1 1 2 6 Control of bus activity The functions TQcan_Start TQcan_Stop start respectively stop the bus activity The function TQcan_CanStatus queries the current bus state 10 1 1 2 6 1 TQcan Start Function int TQcan Start UINT16 b
38. RNGA component adds the random number generator of the i MX31 CPU to your OS design 7 28 1 Adding the RNGA driver To add the RNGA component right click on the RNGA component in the Catalog gt Third Party gt BSPs gt TQMa31 gt RNGA and choose Add to OS Design 7 28 2 RNGA configuration There is nothing to configure for this component 7 29 NLED The NLED driver adds support for the notification LED function to your OS design 7 29 1 Adding the NLED driver To add the RNGA component right click on the NLED component in the Catalog gt Third Party gt BSPs gt TOMa31 gt Device Drivers gt NLED and choose Add to OS Design 7 29 2 NLED configuration The NLED driver uses a configurable memory address to control the notification LED via memory mapped IO This memory address has to be set in the nleddrv reg file in the _WINCEROOT PLATFORM TQMa31 SRC DRIVERS NLEDDRWV directory Note Please consult with TQ Components before using this driver 8 Developing Applications The following steps guide you through the creation of an SDK for your OS design and shows you how to use eVC and Visual Studio 2005 to develop debug and download applications 55 la components 8 1 SDK for eVC An SDK Software Development Kit for eVC enables you to develop applications for your OS design with the embedded VisualC 4 0 IDE The SDK includes all the library and associated header files specific to your
39. Sa 6 1 2 To components Updating the EBOOT bootloader A WARNING Updating the EBOOT is dangerous If the updated process does not finish successful the EBOOT will not start anymore and you will have to reprogram it again via JTAG debugger Please contact TQ for more information Follow these steps to update the EBOOT image on the TQMa31 module do 2 DOR 10 Use the File menu of Platform Builder and choose Open Workspace Select the appropriate EBOOT NBO file you received from TQ Note The selection of the EBOOT nb0 file see folder EBOOT on the CD depends on the display see Direct Draw display driver and RAM configuration see Memory configuration Follow the steps in Configuring Ethernet Connection for Downloading and Debugging to establish an Ethernet connection between the target and Platform Builder From the Target menu select Attach Device After the download is complete from the Target menu select Detach Device Switch over your terminal emulation application At this point EBOOT has downloaded the image temporarily into SDRAM and is ready to begin the flash programming procedure In the terminal emulation application hit the y key to begin programming the flash EBOOT will program the image into flash and provide status using serial debug messages Once the programming is complete you will see the following messages INFO Flashing sequence complete Reboot the device manually S
40. T8 len UINTS8 data Description Send a CAN message with ID id and length len Parameter board hdl in Interface handle s TAcan OpenBoard id in CAN Id of the requested message set MSB for extended IDs len in Number of data bytes 0 8 data in pointer to data to send Return value TQc ReturnCodes TAc OVERRUN if transmit buffer is full 10 1 1 2 7 2 TQcan ReguestMsg Function int TAcan ReguestMsg UINT16 board hdl UINT32 id UINT8 len Description Send a remote reguest for the CAN message with ID id and length len Parameter board hdl in Interface handle s TAcan OpenBoard id in CAN Id of the requested message set MSB for extended IDs len in Number of data bytes 0 8 Return value TQc ReturnCodes TQc OVERRUN if transmit buffer is full 10 1 1 2 7 3 TAcan Pending Function int TQcan Pending UINT16 board hal Description Queries number of messages waiting for transmission in the send buffer Parameter board hdl in Interface handle s TAcan OpenBoard Return value 2 0 Number of queued messages 0 TQc ReturnCodes BSPa31 WinCE UM 101 Page 86 of 95 Hquuo sjueuoduio2 D Aq 60020 LOL WN SOUIM LEedSa 10 1 1 2 8 Message reception TQ components All received CAN messages and bus errors are stored in TAc CAN EVT structures The receive event queue is configured via TQcan_ConfigEvent function TQcan_ReadEvent reads the received events from the receive qu
41. TXBO MCP EFLG RX0OVR MCP EFLG RX10OVR EFLG EFLG EFLG EFLG EFLG EFLG EFLG JI OG BUN The elements evt INTF und evt EFLG occurred the MCP2515 EFLG register contents EWARN Error Warning Linit reached gt 96 errors TX or RXWAR Receive Error Warning gt 96 erros RX TXWAR Transmit Error Warning gt 96 erros TX RXEP Receive Error Passive gt 128 erros RX TXEP Transmit Error Passive gt 128 erros TX TXBO Bus Off Error gt 255 erros TX RX0OVR Receive Buffer 0 Overflow RX10VR Receive Buffer 1 Overflow reflect the MCP2515 hardware at the time the event 87 It components 10 1 1 2 8 2 TQcan_ConfigEvents Function Description Parameter Return value int TAcan ConfigEvents UINT16 board_hdl UINT16 que size UINT8 evt_mask HANDLE hNotify UINT16 nLimit initialize the receive event queue board_hdl in Interface handle que_size in size of event queue max messages count evt_mask in mask of events to buffer in queue s MPC_IR_xx defines hNotify in opt WIN32 event handle to call if more than nLimit event are queued nLimit in opt notofication threshold TQc ReturnCodes 10 1 1 2 8 3 TQcan EventCount Function Description Parameter Return value int TAcan EventCount UINT16 board hdl query number of event in receive buffer board hdl in Interface handle s TAcan OpenBoard gt 0 numb
42. a the file system This is recommended especially for DLLs All files loaded by applications should be placed in the FILES section Those files are compressed and available via the file system The major difference between the FILES section and the MODULES section is this If a dynamic link library dll file is placed in the FILES section as opposed to the MODULES section it is loaded into every slot location instead of process slot 1 only which decreases the virtual address space available to the process You can also rename files via the BIB file entries As you can see in the example above the bitmap file called PIC1 BMP will show up as SPLASH BMP in the Windows CE file system If you want to learn more about how the Windows CE image is built up and about the different settings for memory types please refer to the Platform Builder help system for MODULES Section respectively FILES Section 8 5 2 Auto Start up of Windows CE applications After the Windows CE boot process has finished your application must be started To accomplish this you have to insert appropriate entries into the HKEY LOCAL MACHINEYWinit registry key This can be done using the project reg file of your workspace To create a registry entry for starting an application under the Windows CE add the following statements to the HKEY LOCAL MACHINElinit section of your project reg file HKEY LOCAL MACHINENinit launchXX exe name dependXX hex YY 00
43. ables In the tab Build OS gt Open Release Directory you can set additional environment variables for your workspace To check which environment variables are set open the release directory Build OS gt Open Release Directory Platform Builder run C FILES config bib Target Build Project Build OS Debug Tools Window Help m ja Sysgen Build and Sysgen Build and Sysgen Current BSP Clean Before Building v Copy Files to Release Directory After Build v Make Run Time Image After Build Copy Files to Release Directory Make Run Time Image Batch Build S Open Release Directory Figure 11 Open Release Directory Use the ser command to get a list of currently set environment variables for your OS design o TQMa31 SampleWorkspace TOMa31 ARMV4 Release Inf xi RMU4INoak PROJECT ROOT C NWTNGESAGGNPBWorkspacesTGMa31 SampleWorkspaceSWINCESGGNTGMa31 ARM 4I RPROJECTSDKROOT C NUINGESHENPBHorkspacesNTOMa31 SampleWorkspaceNUINCESBENTOMa31 ARMU4INsdk PROJPUBLICROOT C WINGESBB PBWORKSPAGES TQMa31_SampleWorks pace WINGESBBNPUBLIC PUBLICDRIVE C PUBLICRO C WINCES public SDKDRIVE SDKROOT C WINCES sdk TARGET PLAT ROOT C WINCESG plat form TQMa31 TGTCPU ARMU4I TGTCPUFAMILY ARM TGTCPUISA U4I TGTOS CE TGTPLAT TQMa31 TGTPROJ TGMa31 SampleWorkspace USER SYSGEN BAT FILES C NVWINCESAGNPBWorkspacesTGMa31 SampleWorkspaceSWINCESAGGX TGMa31 ARMU4INOAENMIS
44. adds support for the VFP coprocessor within the ARM11 processor to support floating point arithmetic 7 2 1 Adding VFP support to your OS design Right click on the VFP component in the Catalog Catalog gt Third party gt BSPs gt TQMa31 gt Device Drivers gt VFP and choose Add to OS Design 7 2 2 VFP configuration There is nothing to configure for this component 37 To components 73 Network 7 3 1 SMSC9215 Fast Ethernet driver The SMSC9215 Fast Ethernet Driver adds support for the onboard network of your TAMa31 module 7 3 1 1 Adding the SMSC9215 Network Driver to your OS design Right click on the SMSC9215 NDIS component in the Catalog Catalog gt Third party gt BSPs gt TAM gt Device Drivers gt Networking gt Local Area Networking LAN devices and choose Add to OS Design 7 3 1 2 Network Configuration for the SMSC9215 Fast Ethernet Driver The network driver configuration is done via registry settings These settings are located in the platform reg file Default setting for the network configuration is DHCP If you have no DHCP server in your network or if you want to assign a static IP address for your network controller add the following environment variable in the Environment tab of the Platform Settings dialog STATIC_IP 1 Platform Settings Configuration TOMa31 ARMVAI Release Mn General Locale Build Options Environment Custom Build Actions In 4 E
45. alog you can specify one or more BSPs on which your OS design should be based on New Platform Wizard Step 3 Board Support Packages BSPs A BSP contains a set of device drivers that are added to your OS design Available BSPs DINTEL FXA27X DEV PLATFORM ARMV4I Select one or more BSPs for your OS design 5AMSUNG SMDK2410 ARMYAI IS T0M 31 ARMVAI BSPforthe TO a31 CPU module Note Only BSPs supported by installed CPUs are displayed in the list Figure 3 Creating a new platform Step 3 gt Please choose the TQMa31 BSP as base for your new OS design The next step is to choose a predefined design template of the OS design being created You should select the configuration which has the best conformity to the OS design you need BSPa31 WinCE UM 101 Page 16 of 95 Hqw9g sjuauodwog OL Aq 60020 LOL WN SOUIM LEedSa It components New Platform Wizard Step 4 Design Template A design template is a pre defined selection of Catalog items Available design templates Choose the design template that is most closely aligned with the purpose of your target Custom Device A device Digital Media Receiver Enterprise Terminal Provides the starting point for an industrial Enterprise Web Pad automation device such as a human machine Gatewa interface HMI panel or a programmable logic industrial Controller controller PLC Internet Appliance IP Phone Mobile Handheld Set Top Box Tiny Ke
46. ample sets the selected outputs GPO 5 GPO 8 to a logic high and GPO 1 GPO_4 to low 7 25 1 Adding the TQ Gpio Test Application to your OS design Right click on the TA Gpio Test Application component in the Catalog Catalog gt Third party gt BSPs gt TQMa31 gt Demo Applications gt TQ Gpio Test Application and choose Add to OS Design 7 25 2 TQ Gpio Test Application configuration There is nothing to configure for this components To start the application open a console window on your device and type GpioTest exe The Application is delivered with full source code to give an idea of how to use the TQ_Gpio interface library The source is located in WINCEROOT PLATFORM TQMa31 SRC TEST GpioTest BSPa31 WinCE UM 101 Page 52 of 95 Hquuo sjueuoduio2 D Aq 60020 LOL WA SOUIM LEedSa To components 7 26 Watchdog driver The TQMa31Watchdog driver adds support for the i MX31 watchdog to your OS design 7 26 1 Adding the Watchdog driver to your OS design Right click on the TQMa31 Watchdog Driver component in the Catalog Catalog gt Third party gt BSPs gt TQMa31 gt Device Drivers gt TQMa31 Watchdog Driver and choose Add to OS Design 7 26 2 Watchdog driver configuration and usage The Watchdog driver is configured by registry settings located in the platform reg file HKEY LOCAL MACHINEXDriversWBuiltInNTOMA31 WDG D11 TOMA31 WDG D11 Prefix WDG Order dwor
47. ation for ARMAVI If your OS design SDK was successfully installed you can select the OS design and the appropriate device as shown in the following example samplePlatform B HelloWorld Microsoft eMbedded Visual C Eile Edit Yiew Insert Project Build Tools Window Help lai hg is xs a c mme W m ers LE At ER Pen TQMa31_Sampleworl E win32 WCE amp RMV4I Release v TOMa31 Sampleworkspace Device v Figure 36 Selecting the appropriate device depends on installed SDKs Now you have to configure your OS design Go to the Tools menu and select Configure Platform Manager A dialog opens where you should select the SDK and the appropriate device Windows CE Platform Manager Configuration Select a platform or device to configure T k ETO Device P Windows CE Default Platform Delete Properties About Figure 37 Configure Platform Manager Go to Properties to make connection settings S J To components Device Properties Device Name samplePlatform Device Select a transport and a startup server Choose Test to verify that you can establish a connection to your target device with the selected transport and startup server Transport KITL Transport for Windows CE r Configure Startup Server CESH Server for Windows CE Configure Cancel Test Figure 38 Configure Transport and Startup Server If you have set up an Active Sync connection you can
48. ber of included components After a successful build the Windows CE run time image a file called NK BIN respectively NK nbO can be found in the Release Directory E g for the sample workspace TQMa31_SampleWorkspace and the release configuration this would be _WINCEROOT PBWorkspaces TQMa31_SampleWorkspace RelDir TQMa31_Release NK BIN 5 5 Downloading the run time image via Ethernet The Ethernet boot loader EBOOT is used to download and execute OS images EBOOT is typically written into NOR flash memory on the TQMa31 module and executes immediately out of reset Initially the target hardware will have EBOOT resident in the NOR flash memory In addition the target hardware has non volatile storage for the EBOOT network configuration DHCP static MAC address etc that must be initialized before using the boot loader with Platform Builder This section will describe the procedure for updating and configuring EBOOT on the target hardware 5 5 1 Configuring Ethernet Connection for Downloading and Debugging To configure an Ethernet connection that can be used for downloading and debugging images follow these steps 1 From the Platform Builder Target menu select Connectivity Options Then select Add Device and choose a name for your target device In our example we choose TQM as target device name BSPa31 WinCE UM 101 Page 26 of 95 Hquio sjueuoduio2 D Aq 60020 LOL WN SOUIM LEedSa To components Target Device
49. ce library for the MCP2515 CAN controller to the OS design 7 23 1 Adding the TQ CanCe Test Application to your OS design Right click on the TQ CanCe Test Application component in the Catalog Catalog gt Third party gt BSPs gt TQMa31 gt Demo Applications and choose Add to OS Design 7 23 2 TQ CanCe Test Application configuration There is nothing to configure for this components To start the application open a console window on your device and type CanTest exe The Application is delivered with full source code to give an idea of how to use the TQ CanCe interface library The source is located in WINCEROOT PLATFORM TQMa31 SRC TEST CanTest 7 24 GPIO driver The TQMa31GPIO driver adds support for 6 digital inputs and 8 outputs located on the TAMa31 CPU module to your OS design This will also add the TQ Gpio user interface DLL to your OS design 7 24 1 Adding the GPIO driver to your OS design Right click on the TQMa31 GPIO Driver component in the Catalog Catalog gt Third party gt BSPs gt TQMa31 gt Device Drivers and choose Add to OS Design 7 24 2 GPIO driver configuration and usage There is nothing to configure for this driver All functions concerning the GPIOs are controlled via the TQ Gpio interface dynamic link library TQ Gpio dll For a detailed description of the user interface library please see chapter General Purpose Input Output TQ gpio dll 51 It component
50. ces TOMa31_Devel SDK EEK Datei Bearbeiten Ansicht Favoriten Extras aw Q Zur ck v I B 2 Suchen Ordner Adresse C WINCESOO PBWorkspaces TQMa31_SampleWorkspace SDK v Wechseln zu Ordner Gr e Typ e Desktop M i 34 537 KB Wind 0 3 Eigene Dateien 140KB Date Arbeitsplatz HMB 314 Diskette A See WinXP C O 2delete batch Config Msi Dokumente und Einstellungen download 42 DRIVERS 3 Intel pdfo95 X 7 Programme Projekte IE RECYCLER System Volume Information virtual Machines 10 WCE D WINCESO0 G CRC OTHERS PBWorkspaces Figure 33 SDK target directory 83 Developing with embedded Visual C To develop and debug programs written in C C to run with Windows CE you can use Microsoft embedded Visual C or Microsoft Visual Studio 2005 In this carpet will be described the use of MS embedded Visual C If you are familiar with Microsoft Visual Studio and Visual C you may find that the graphical user interface for the embedded development environment has a nearly identical ook and feel 8 3 1 Installation If your installation CD includes Service Pack 4 SP4 assure that it will be installed as well You will be prompted to select the installation including the SP4 it at the beginning of the installation k 61 TQ components y Installation Wizard for eMbedded Visual C 4 0 and Service Pack 4 eMbedded Visual C 4 0 From the list below you
51. ch it depends on has issued the SignalStarted function Note If your application is located on a external media CFCard USB stick you have to add the path to this media to the system path variable Example HKEY LOCAL MACHINE init Launch80 test exe Depend80 hex 14 00 1e 00 32 00 HKEY LOCAL MACHINENLoader SystemPath multi_sz Release cfcard test 71 la components 8 6 ActiveSync 8 6 1 Required Components The following components of the Catalog must be added to your OS design 1 Core OS Windows CE devices Applications End User File Sync E xl Catalog FH BSPs d Core OS Erf Windows CE devices Applications and Services Development 5 43 Applications End User B ActiveSync 33 Inbox Sync a Pocket Outlook Database Sync 0 CAB File Installer Uninstaller File Viewers FLASH Update Sample Application Games B Help Bi Inbox 4 Remote Desktop Connection B Terminal Emulator 8 Windows Messenger B WordPad C Communication Services and Networking 3 Core OS Services Device Management 3 File Systems and Data Store Fonts 3 Graphics and Multimedia Technologies E Intemational 2 Intemet Client Services I Security Shell and User Interface Voice over IP Phone Services 3 Windows CE Error Reporting HF Device Drivers H Platform Manager HH HH Figure 46 Adding File Sync t
52. command prompt ex C WINDOWS system32 cmd exe gt ftp 192 168 100 25 erbindung mit 192 168 100 25 wurde hergestellt 220 Service ready for new user Benutzer 192 168 189 25 none gt gt anonymous 331 Anonymous access allowed send identity e mail name gt as password Kennwort 238 User logged in proceed tp gt d 288 Command okay 158 File status okay about to open data connection 4 88 lt DIR gt Network lt DIR gt SRAMDisk lt DIR gt Hard Disk lt DIR gt Application Data Control Panel Ink lt DIR gt My Documents lt DIR gt Program Files lt DIR gt Temp lt DIR gt Windows 226 Closing data connection FTP 64d Bytes empfangen in 36Sekunden 1 24KB s tp hye 21 Service closing control connection gt Figure 51 Target connection via FTP 9 1 3 Hive Based Registry If you want to use the registry as a persistent store for your application settings right click on the Hive based Registry component in the Catalog Catalog gt Core OS gt Windows CE devices gt File Systems and Data Store gt Registry Storage and choose Add to OS Design Also add the RAM and ROM File System Catalog gt Core OS gt Windows CE devices gt File Systems and Data Store gt File System Internal You will need to set some additional registry keys These registry settings will tell Windows CE where to place the registry in the File System The appropriate registry Keys for a Hive on CFCard or S
53. ct Draw display Giver ccce caste oS ea 36 7 1 1 1 Adding the display driver to your OS design eee 36 7 1 1 2 Configuration of the direct draw display driver 36 7 1 2 NIG GST EG T ee E r T 37 7 1 2 1 Adding the display driver to your OS design eee 37 7 1 22 Configuration of the mobile 3D display driver eere tete 37 7 2 VEP Vector Floating Point SUDDOIT ee een nee na 37 BSPa31 WinCE UM 101 Page 2 of 95 Hquio sjueuoduio2 D Aq 60020 LOL WA SOUIM LEedSa BSPa31 WinCE UM 101 2009 by TA Components GmbH To components 7 2 1 Adding S Supporto your B oo P ae ee 37 7 2 2 Moe a a eer omer nr sere Rene er POTE LEM PAT ere POP PE rer 37 73 liio me Me 38 7 3 1 SM SC9215 FastEthernet driver nase ee 38 7 3 1 1 Adding the SMSC9215 Network Driver to your OS design z 38 7 3 1 2 Network Configuration for the SMSC9215 Fast Ethernet Driver 38 7 3 2 IR network Drlltet seh UT oto Pan S VO E oo on So So UU 39 74 Be eee 40 7 4 1 USE dINBIS n o RA MU AM ERE I EE LE UE 40 TATI SAGGING ihe USB TIS drivers ren ee 40 L4 2 USB OTG drivers configuration ssiri trees cena 18 en beau eres obese EE rana Este NI MEE 40 7 4 2 DS Bhign speed Bre ae O MU UN d UI 40 7421 Adding the USB high speed UIrIVer edite anne enki tete n tenen na turc 40 7 4 2 2 USB high speed driver configuration nennen 40 7 4 3 USB Mouse and Keyboard SUPPO eee eee eee TT 41 7 4 4 USB printer SUPPOM bss read rene nee Ao n ek A AK SARA
54. d 0 FriendlyName TOMa31 Watchdog Driver StartupDelay dword BB8 in ms 3000ms Interval dword BB8 in ms will be rounded to 500ms steps Type dword 1 0 A driver thread triggers the watchdog Automatic startup i 1 Application triggers the watchdog StartType dword 1 0 Automatic startup 1 First application trigger will start the watchdog Name Values Description Type 0 or 1 0 The driver itself will start a thread which retriggers the watchdog every Interval 4 milliseconds 1 A user application has to retrigger the watchdog default StartType 0 or 1 0 Automatic startup The watch dog is started automatically when the driver is loaded This is also set when Type is set to 0 1 The first trigger call WriteFile will start the watchdog StartupDelay Delay in ms Sets the initial delay before the Watchdog is initialized Interval Interval in ms Sets the watchdog timeout interval If the watchdog is not retriggered before the timeout expires the watchdog will reset the system The value is rounded to full 500ms steps Minimum Value 500ms maximum is 128000ms Table 7 2 Watchdog driver registry settings By defaut the watchdog is configured for a 3 second timeout and usage by a application All functions of the Watchdog interface are controlled via the TQ Wdg interface dynamic link library The usage of the Watchdog driver is very straightforward and c
55. d 3E8 1000ms PulseWidth sets the pulse width of the signal in percent Allowed values are from 1 to 100 Frequency sets the frequency of the signal in Hz Allowed values are from 1Hz to 16kHz Duration sets the duration of the signal in milliseconds 7 19 3 Buzzer driver usage The following example code shows how to use the Buzzer driver Each time you execute the WriteFile command on the buzzer driver the driver will play the sound described by the registry parameters open Buzzer driver HANDLE hBuzzer CreateFile L BUZP1 BSPa31 WinCE UM 101 Page 46 of 95 Hquio sjueuoduio2 D Aq 60020 LOL WN SOUIM LEedSa To components GENERIC READ GENERIC_WRITE 0 NULL OPEN_EXISTING 0 NULL if hBuzzer INVALID HANDLE VALUE printf ERROR Cannot open buzzer driver n return i play sound WriteFile hBuzzer NULL 0 NULL NULL wait 1 second Sleep 1000 play sound again WriteFile hBuzzer NULL 0 NULL NULL close the Buzzer driver CloseHandle hBuzzer 7 19 4 Buzzer test program There is a test program for the buzzer included in the BSP To add the program right click on the Buzzer Test Appliaction component in the Catalog Catalog gt Third party gt BSPs gt TQMa31 gt Demo Applications and choose Add to OS Design To execute t
56. d Debug Dota Tools Window Community Help LEE TT y W CaiTeABT42 CariTest Start CANTestO i eise Console VriteLine Ru ckgabewert ConfigEvents 101 configEventResult Konfigurarion und Starten des Empfangs Threads Thread canThread new Thrend neu Thrend rnrt CanTesr ReceiveThrend canThr ead Start CANDLLGrapper TQcan SerBaudratre boardHandie Defaulr Baudrare TODO Check Baudrate MIULLVrappec TQcan Start boardHandle nn ole Writeline WVair 60 seconds for incoming mezsngem while rrnnam rr for int 1 0 1 lt 60 i t CMIDLLVragpper TOcan TransmitMsg boardHandle 2047 8 TestData Figure 42 Connect to Device The Connecting message box appears and reports the connection status Connecting To TOMa31 Devel ARMV4I Release Connection succeeded Figure 43 Connection succeeded Afterwards you can start with debugging by clicking on the button Start debugging green arrow 773 To components Contesiblaz Visual Studio k a HE ESRA Kicrusull T else Console VriteLine Puckgabevwert ConfigEvents 0 configfventResult Konfiguration und Starten des Emptangs Threads Thread canThread nev Threadinew Thrend rare CnnTenr PRecetveThread eanThrend Searc CANDLLVrappez TOcan SetBaudrate boardHandle Default Baudrate TODO Check Baudrate CANDLLWrepper TQOcan Start boardifandle Console W
57. d by the VMINI driver Therefore TCP IP has to be configured in the VMINI section of platform reg 7 3 2 IP network printer To have support for IP printers first add the component PCL Printer Driver Catalog Device Drivers gt Printer Devices to your OS design Furthermore TQ offers a SDK for NET Compact Framework 2 0 from a third party which offers you easily to implement printer functions within your application Please see chapter PrinterCE NETCF SDK for Visual Studio 2005 for more details Note The component TCP IP Catalog gt Core OS gt Windows CE Devices gt Communication Services and Networking gt Networking Features should already be added to your OS design 39 la components 7 4 SB 7 4 4 USB OTG drivers The USB OTG driver provides High Speed USB 2 0 host and device support for the USB On The Go OTG port of the TAMa31 module The OTG driver will automatically select either Host master or Device slave functionality for high speed at any given time depending on the USB cable mini plug configuration This is achieved by the set of three drivers USB OTG host controller driver USB client driver and or USB transceiver controller Full Function driver which performs the host function client switching The USB host driver can be configured for class support for mass storage HID printer and RNDIS peripherals The device client portion can be configured to provide one of mass storage
58. ditional Windows CE components of the TAM a31 SampleWorkspace 13 4 5 1 2 Additional Drivers of the TAM a31 SampleWorkspace 244 14 4 6 Removal of a demo workspaces eee 15 Creating a new OS Design based on the TQMa31 BSD 16 5 1 Creating a new WOrkSPpace sss ssssssse rees das ss eree eggs ea Kanoe rn ao Ran Tanke ee nern 16 5 2 How to add drivers and OS components eese ene 21 5 3 OS SSG lak s ONT icc Ee P ee eg 22 5 3 1 Memory contiguratlom ee o LO o E et 22 5 3 2 Buildioptons gets IUE UE 22 5 3 3 Language Sellingss assessment namen rear EEEE ae AEE TANEK oa dea 23 5 3 4 Environmel valdblgs era ee engen an 24 5 4 Building ine OS Dies jene rss T TH 26 5 5 Downloading the run time image via Ethernet eee eee eee een 26 5 5 1 Configuring Ethernet Connection for Downloading and Debugging 26 5 5 2 Downloading a run time image into SDRAM using EBOOT sese eee eee eee 29 5 5 3 Downloading a run time image into NOR Flash using EBOOT 29 5 5 4 Downloading a run time image running from SDRAM into NOR Flash using EBOOT Meloe dma ee a ee reer ee re 30 5 5 5 Running a run time image from NOR Flash using EBOOT sees 31 5 5 6 Debugging the download CoD Boll obo ee 31 EBOOMBOotloader nsa o ee 33 6 1 1 Configuration options of the EBOOT bootloader eee 33 6 1 2 Updatingithe EBOO T DOOUOUBUBFI 1 50 een P P OL tiis 35 Bo 36 71 PIS Ply ler ee DIOS 36 7 1 1 Dire
59. dow the Standard SDK for Windows CE and the Pocket Internet Explorer Console Window Gives us a command line interface very similar to the cmd exe in Windows XP Standard SDK Adds the APIs for the Windows CE standard SDK So applications compiled with the Standard SDK will run on our OS design Pocket Internet Explorer A simple Web Browser On the next tab we add the FTP and Telnet server components BSPa31 WinCE UM 101 Page 18 of 95 A Hauwo sjueuoduio2 D Aq 60020 LOL WN SOUIM LEedSa New Platform Wizard Step 6 Networking Communications Select items for networking and communications to include in your OS design Items L1 Message Queuing MSMO A technol As enables applications o OBEX Server running at rent times to communicate I Simple Network Management Pratoce ee sen E Local Area Network LAN v Wired Local Area Network 3 C Wireless Local Area Network 80 3 Remote Desktop Connection Servers V FTP Server v Telnet Server Web Server HTTPD Parental Control l ul 2 gt Estimated size of these items 3548 KB Figure 6 Creating a new platform Step 6 When you click Next a security warning about the FTP and Telnet servers will appear as these components allow network access to our device FTP and Telnet security settings are discussed later on Click Next and then Finish D L gem Pot B Tag KAI MZ Du gie tpi 077 ao 9 77 3 nn Wm m
60. e Fake Battery Charger component in the Catalog gt Third Party gt BSPs gt TQMa31 gt Device Drivers gt Charger and choose Add to OS Design 7 13 2 Fake Battery Charger configuration There is nothing to configure for this driver 7 14 GPT driver The General purpose timer is a multipurpose module used to measure intervals or generate periodic output 7 14 1 Adding the GPT driver To add the GPT driver right click on the GPT component in the Catalog gt Third Party gt BSPs gt TQMa31 gt Device Drivers gt Timers and choose Add to OS Design 7 14 2 GPT driver confiquration There is nothing to configure for this driver BSPa31 WinCE UM 101 Page 44 of 95 Hquio sjueuoduio2 D Aq 60020 LOL WN SOUIM LEedSa To components 7 15 IPU Backlight The backlight driver interfaces with the Windows CE Power Manager to provide timed control over the display backlight A timeout interval controls the length of time that the backlight stays on 7 15 1 Adding the IPU Backlight driver To add the IPU Backlight driver right click on the appropriate driver component in the Catalog gt Third Party gt BSPs gt TQMa31 gt Device Drivers gt IPU Backlight and choose Add to OS Design 7 15 2 IPU Backlight driver configuration The following registry keys are required to properly load backlight driver HKEY CURRENT USERNControlPanelMBacklight BattBacklightLevel dword 7F Backligh
61. e with a serial port of your host computer by means of a nullmodem cable Use the program CAWINCES500 PUBLICICOMMON OAKIBIN W386 ceterm exe Tera Term Pro or Hyperterminal to open a connection at 115200 8 N 1 31 INFO Bootloader launched from NOR INFO Reading boot configuaration in NOR flash addr 0xA0020000 size 0x60 System ready Preparing for download Press ENTER to download now or SPACE to cancel Initiating image download in 3 seconds Initiating image download in 2 seconds Initiating image download in 1 seconds Initiating image download in 0 seconds Starting auto download Initialize Ethernet controller Initialize Ethernet controller ETH_DEVICE_SMSC9118 LAN9118 Chip Id 115a Revision 0 Auto Negotiation done INFO SMSC9118 Ethernet controller initialized INFO MAC address 0 12 33 55 CC AA INFO Using device name MX3152394 InitDHCP Calling ProcessDHCP ProcessDHCP DHCP INIT Got Response from DHCP server IP address 192 168 100 65 ProcessDHCP DHCP IP Address Resolved as 192 168 100 65 netmask 255 255 255 0 Lease time 3600 seconds Got Response from DHCP server IP address 192 168 100 65 No ARP response in 2 seconds assuming ownership of 192 168 100 65 EbootSendBootmeAndWaitForTftp BSPa31 WinCE UM 101 Page 32 of 95 Hquuo sjuauodwog OL Aq 60020 LOL NN SOUM LEEeASE It components 6 EBOOT Bootloader 6 1 1 Configuration options of the EBOOT bo
62. elopment languages you want to support Hit Next gt and then Finish SDK Wizard Development Languages An SDK can support multiple development languages and multiple frameworks for application development Select the development languages that you want your SDK to support eMbedded Visual C 4 0 support ATL for Windows CE applications v MFC for Windows CE applications MFC for Windows CE ActiveX controls Figure 26 Selection of the development languages To finally build the SDK select Build SDK from the Platform menu Your SDK will be created as an MSI file located at PBWORKSPACEROOT SDK It is self installable by double clicking it and it is removable using Add Remove Programs from the Windows XP Control Panel 82 SDKfor NET Compact Framework With the SDK for NET compact framework you are able to develop applications in C or Visual Basic with the Visual Studio 2005 development environment from Microsoft The SDK includes all the libraries and associated header files specific of your OS design Note Before you create the SDK you must add the support for the appropriate components for NET compact framework Platform builder gives you the choice between components for NET Compact Framework 1 0 or 2 0 Therefore right click on the component NET Compact Framework 1 0 2 0 in the Catalog Catalog gt Core OS gt Windows CE devices gt Applications and Services Development gt NET Com
63. ents please have a look into the workspace file in the folder SampleWorkspaces PBWorkspaces TQMa31_SampleWorkspace 4 5 1 1 Additional Windows CE components of the TAM a31 SampleWorkspace SYSGEN DOTNETV2 Net Compact Framework 2 0 SYSGEN DOTNETV2 SUPPORT Net Compact Framework 2 0 SYSGEN MSXML DOM XML Core Services and Document Object Model DOM SYSGEN CONSOLE Console Windows SYSGEN CONNMC Network User Interface SYSGEN USDK Standard SDK for Windows CE SYSGEN AUDIO Waveform Audio SYSGEN PIE Pocket Internet Explorer SYSGEN IE JSCRIPT JScript SYSGEN FTPD FTP Server SYSGEN TELNETD Telnet Server SYSGEN HTTPD Web Server SYSGEN DDRAW Direct Draw 13 It components SYSGEN_USB_HID_CLIENTS SYSGEN_USB_STORAGE SYSGEN_FATFS SYSGEN_TFAT SYSGEN SD MEMORY SYSGEN FSRAMROM SYSGEN FSREGRAM SYSGEN USBFN SERIAL SYSGEN STOREMGR CPL SYSGEN PLATMAN USB Hid Keyboard and Mouse USB Storage Class Driver FAT File System TFAT File System SD Memory SDCard support RAM and ROM Filesystem RAM based registry USB Function Client Serial Storage Manger Control Panel Applet Platform Manager Support 4 5 1 2 Additional Drivers of the TOM a31 SampleWorkspace BSP BACKLIGHT BSP AUDIO MC13783 BSP PMIC MC13783 BSP BATTERY BSP PMIC FAKE CHARGER BSP PWM BSP BUZ BSP DISPLAY ADMATEC 800 480 BSP DVFC MC13783 BSP I2CBUS BSP KBDMOUSE EVBKPD BSP TEMP LM75 BSP ETHER SMSC9215 BSP PCMCIA BSP RTC MC13783 BSP SDHC1 BSP GPT BSP
64. er of received events 0 TQc ReturnCodes 10 1 1 2 8 4 TQcan ReadEvent Function Description Parameter BSPa31 WinCE UM 101 int TAcan ReadEvent UINT16 board hdl UINT16 count TAc CAN EVT p evt read one ore more events from receive buffer board hdl in Interface handle s TAcan OpenBoard count in Count of events to read size of array p evt p evt out Pointer to an array of count event structures Page 88 of 95 Hquuo sjueuoduio2 D Aq 60020 LOL IW Y3OUINCLEEdSH It components Return value gt 0 Number of received messages 0 TQc ReturnCodes 10 1 1 2 8 5 TQcan HesetTimestamp Function int TQcan ResetTimestamp UINT16 board hdl Description Resets the time for received messages to O Parameter board hdl in Interface handle s TAcan OpenBoard Return value TAc ReturnCodes TAc PARAMETER if interface is not opened X 89 It components 10 1 2 General Purpose Input Output TQ io dll 10 1 2 1 Introduction TA gpio is a Windows CE DLL which provides support functions for the GPIO features of the TAMa31 CPU module There are fundamentally next functions groups Open and close the driver TAgpio Open TAgpio Close Set and get GPIO I O TAgpio SetPortValue TAgpio GetPortValue Configure GPIO Inputs as Interrupt TAgpio ConfigurePortInterrupt TQgpio Acknowledgelnterrupt 10 1 2 2 Functions description 10 1 2 2 1 Return value All functions retu
65. eue The TQc CAN EVT struct All bus events are returned in a TAc CAN EVT struct MCP INTF register contents MCP EFLG register contents 10 1 1 2 8 1 Structure of a CAN event typedef struct BYTE evt_INTF BYTE evt_EFLG int64 evt time b ULONG Id A BYTE Dic BYTE CanNum VA BYTE Data 8 TOc_CAN_EVT DEFINITION of define define define define define define define define define DEFINITION of TimeStamp the CanID Data Length code of the CanBus The Data in us plus CANID_EXTENDED CANID_REMOTE currently always zero the MCP2515 CANINTF register contents see TQc CAN EVT evt INTF and TQcan_ConfigEvents evt mask MCP INTF RXOIF MCP_INTF_RX1IF MCP INTF TXOIF MCP INTE TX1IP MCP INTF TX2IF MCP INTF ERRIF MCP INTF WAKIF MCP INTF MERRF MCP INTF ALL 0x01 0x02 0x04 0x08 0x10 0x20 0x40 0x80 OxFF INT INT INT INT INT INT INT INT RX0IF Receive Buffer 0 Full Interrupt RX1IF Receive Buffer 1 Full Interrupt TXOIF Transmit Buffer 0 Empty Interrupt TX1IF Transmit Buffer 1 Empty Interrupt TX2IF Transmit Buffer 2 Empty Interrupt ERRIF Error Interrupt Flag bit WAKIF Wakeup Interrupt MERRF Message Error Interrupt see TQc CAN EVT evt EFLG define RX define define define define define define define MCP EFLG EWARN MCP EFLG RXWAR MCP EFLG TXWAR MCP EFLG RXEP MCP EFLG TXEP MCP EFLG
66. hapter Building the OS Design Use the File menu of Platform Builder and choose Open Workspace Select NK NBO found in the workspace release directory WINCES00WPBWorkspaces TQMa31 Workspace RelDiTQMa31 ARMVAI Release NK nbO Follow the steps in Configuring Ethernet Connection for Downloading and Debugging to establish an Ethernet connection between the target and Platform Builder From the Platform Builder Target menu select Attach Device to begin the download Switch over to your terminal emulation application You will be asked for the destination of the image You will see the following message Specify image destination 0 RAM 1 NOR 2 RAM image in NOR In the terminal emulation application hit the 2 key At this point EBOOT has downloaded the image temporarily into SDRAM and is ready to start the flash programming procedure You will see the following message Storing RAM image into NOR INFO Downloading NK NOR image WARNING Flash update requested Do you want to continue y n Warning A DO NOT SWITCH OFF THE POWER SUPPLY DURING FLASH UPDATE In the terminal emulation application hit the y key to begin programming the flash EBOOT will write the run time image into flash and provide status using serial debug messages Once the programming is complete you will see the following messages INFO Flashing sequence complete BSPa31 WinCE UM 101 Page 30 of 95 Hquio sjueuoduio2 D Aq 60020
67. he drivers and utilities that are used for the components as well as the bootloader are subject to the copyright of the respective manufacturer Licensing conditions of the respective manufacturer should be observed Licensing costs for the operating system and applications are not included and must be calculated and stated separately There are no further licensing costs for general drivers or similar items Remarks Since we are dealing with an embedded system no operating system licenses from OEM or office consumer sphere need to be installed 1 5 Registered Trademarks TQ strives to respect the copyrights of graphics used in other publications and texts by using graphics created by themselves or accessing license free graphics and text All brand names and trademarks used in this publication and under circumstance protected by third parties are without restriction subject to conditions of the respective valid trademark law and ownership law of the respective owner or proprietor Conclusion cannot be drawn on the basis of their mere mention that brand names and trademarks are not protected by third party rights To components 2 Introduction The TQM Board Support Package for Windows CE 5 00 contains all necessary software components to allow a simple and fast startup of application development with Windows CE 5 00 on your TQMa31 hardware platform A PC with Windows XP Professional and Microsoft Platform Builder 5 00 is required
68. he test open a command window and enter buztest exe The test will play a sound with the parameters given in the registry 7 20 International keyboard driver As Windows CE natively only supports US Japanese and Korean keyboards there are additional keyboard drivers for the most common European languages included in this BSP 7 20 1 Languages included German French Italian Spanish Dutch Swedish Portuguese 7 20 2 Adding the international keyboard drivers Right click on the International Keyboard Drivers component in the Catalog Catalog gt Third party gt BSPs gt TQM gt Device Drivers gt Input Devices gt International Keyboard Drivers and choose Add to OS Design 47 la components BAJ Third Party z amp y BSPs TOMA31 ARMVAI Sy Device Drivers 0 Audio Driver Battery Driver 0 Buzzer x f CSPI Bus J Display DYFC Fake Battery Charger GPT Hantro CODECS 12C Bus Sy Input Devices International Keybos 8 IPU Backlight dd to OS Design ca im gt m Figure 21 Adding the international keyboard drivers 7 20 3 Configuration of the international keyboard drivers The keyboard driver configuration is done via registry settings These settings are located in the kbd reg file which is located in the WINCEROOT TQMa31 FILES directory of your BSP installation Each keyboard layout needs one folder located at HKEY_LOCAL_MACHINE SYSTEM CurrentCon
69. io SetPortValue int TQgpio SetPortValue UINT32 handle UINT32 output UINT8 data Set a output to the value given as parameter handle in Identifcation handle output in the output GPO1 GPO8 data in value to set Oor 1 TQcan return codes TQc PARAMETER if invalid params passed 10 1 2 2 3 2 TQgpio GetPortValue Function Description Parameters Return value BSPa31 WinCE UM 101 int TQgpio_GetPortValue UINT32 handle UINT32 output UINT8 p data Read value from a port input or output handle in Identifcation handle output in the output GPO1 GPO8 or GPI1 GPI6 p data out value read from port 0 or 1 TQcan return codes TQc PARAMETER if invalid params passed Page 92 of 95 Hquio sjueuoduio2 D Aq 60020 LOL WN SOUIM LEedSa To components 10 1 2 2 4 Configure GPIO Inputs as Interrupt Before these actions can be taken a handle to the TQgpio must already be opened 10 1 2 2 4 1 TQgpio_ConfigurePortinterrupt Function int TQgpio_ConfigurePortinterrupt UINT32 handle UINT32 input UINT32 type HANDLE hEvent Description Configure port for interrupt generation Parameters handle in Identifcation handle input in the input to configure GPI1 GPI6 type in interrupt type level edge low active high active value 0 4 see the table below hEvent in event handle this event will be signalled when the interrupt occurs Return value TQcan re
70. ion Release a interface which was opened by a call to TAcan OpenBoard Parameter board hdl in Interface handle s TAcan OpenBoard Return value TQc ReturnCodes TQc PARAMETER if interface was not opened 81 It components 10 1 1 2 3 Bus configuration functions TQcan_SetBaudrate configures the bus timing 10 1 1 2 4TQcan SetBaudrate Function int TQ can_SetBaudrate UINT16 board hdl UINT32 Baud Description Set the bus baudrate in bps Bits per second Parameter board hdl in Interface handle s TAcan OpenBoard Baud in Wert f r die Baudrate Return value TAc ReturnCodes TAc PARAMETER if interface is not opened 10 1 1 2 4 1 TQcan GetBaudrate Function int TQcan GetBaudrate UINT16 board hdl UINT32 Baud Description Abfrage der aktuellen Werte der Baudrate in bps Bits per second Parameter board hdl in Interface handle s TAcan OpenBoard Baud out Zeiger auf die aktuelle Baudrate Return value TAc ReturnCodes TAc PARAMETER if interface is not opened BSPa31 WinCE UM 101 Page 82 of 95 Hquuo sjuauodwog OL Aq 60020 LOL NN SOUM LEEeASE To components 10 1 1 2 5 Message acceptance filter The functions TQcan_SetAccMask and TQcan_SetAccCode allow programming of the message acceptance filter to lower CPU load through unrequested messages Formula for message acceptance Accept If id code amp mask The acceptance mask is used to select the bits which are evaluated by
71. ion conniguration see eee 55 Ta ee co mucus E uM eT rere ee 55 Gee WAG GATS PROV Meee ee 55 ee ic wes peu 55 T 2 N NEED ee cuc c uL IMP M E M AE 55 1291 Adding the NEED driver eei te nette tpe edente cun uicta devenue dn Ake E Ren Gao 55 1 292 VOINIEEBECODUGUCOUDEDS cedent a canos E ee 55 oa nbeveloping ADPIICatiOns se erre et MEE RUM 55 8 1 SER ro 10 2 E cr 56 8 1 1 Creating an SDK from your OS design zanese zes engeren see kreis 56 8 2 SDK for NET Compact Framework aseene raea a E een een een een een nn 57 8 2 1 Creating a SDK from your OS design ana aaa ker 58 BSPa31 WinCE UM 101 Page 4 of 95 Hquio sjueuoduio2 D Aq 60020 LOL WA SOUIM LEedSa BSPa31 WinCE UM 101 2009 by TA Components GmbH To components 8 3 Developing wilmembeddedaVisualCF 2 2 ae etes nenen na nene 61 8 3 1 AE EO E bo ha o opt re 61 9 3 2 Establish a connection between eVC and the CE device ee 62 8 4 Developing wi Visual Studio 2005 ee ee ee 64 8 4 1 dccem ETT 64 8 4 2 Establish a connection between VS 2005 and the CE device 65 8 4 2 1 Startup over Active Sync Transport over Ethernet ee 65 8 4 2 2 Startup and Transport over Ethernet debugging without Active Syno 69 8 5 Application deployment eret ue amete iret eeteree i 69 8 5 1 Adding applications and files to your OS design eee eee 69 8 5 2 Auto Start up of Windows CE applicationS re 70 8 6 Z P D OR PRE P O m m xL A
72. issing updates All Updates released by Microsoft until December 2007 are included on the TAMa31 BSP CD in the Folder PlatformBuilderUpdates Please install them according to there release date Start with the Windows WinCEPB50 051231 Product Update Rollup Armv4I msi update which contains all Updates till December 2005 Next install the WinCEPB50 061231 Product Update Rollup Armv4I msi andthe WinCEPB50 071231 Product Update Rollup Armv4I msi update Additionally the Platform Builder Help Update is included on the CD Although this update is not needed to use the TQMa31 BSP it will improve the content of the Platform Builder help system 11 la components 4 2 Installation of the BSP The BSP is delivered as an MSI file which can be easily installed by double clicking The TQMa31 BSP can be found on the CD in the BSP directory Note If you had already installed a older version of this BSP please first remove the old installation see chapter Removal of the TQMa31 BSP First close the Platform Builder IDE if open Then browse to the BSP folder on the CD and double click the TAMa31 WINCE500 100 msi file You will be guided through the installation of the BSP The setup program will add the BSP to the WINCEROOT PLATFORM directory of your Platform Builder installation Additionally it will copy the TAMa31 cec catalog file to the _WINCEROOT PUBLIC COMMON OAK CATALOGI CEC directory and add the TQMa31 BSP
73. iver To add the driver right click on the PWM component in the Catalog gt Third Party gt BSPs gt TQMa31 gt Device Drivers gt Pulse width Modulator and choose Add to OS Design 7 17 2 PWM driver configuration There is nothing to configure for this driver 45 It campunents 7 18 RTC The RTC driver adds the real time clock support to your OS design 7 18 1 Adding the RTC driver To add the RTC driver right click on the RTC component in the Catalog gt Third Party gt BSPs gt TQMa31 gt Device Drivers gt RTC and choose Add to OS Design 7 18 2 RTC driver configuration There is nothing to configure for this driver 7 19 Buzzer The Buzzer driver drives the Buzzer pin of the TQMa31 module 7 19 1 Adding the Buzzer driver To add the Buzzer driver right click on the appropriate driver component in the Catalog gt Third Party gt BSPs gt TQMa31 gt Device Drivers gt Buzzer and choose Add to OS Design 7 19 2 Buzzer driver configuration The Buzzer driver uses a standard Windows CE stream driver interface The driver is configured via registry The Buzzer driver settings can be adjusted in the platform reg file HKEY LOCAL MACHINE Drivers BuiltIn BUZ Prefix BUZ prl bu uzzer dll Index dword 1 Order dword 2 load after PWM driver PulseWidth dword 32 50 Frequency dword 3E8 1KHZ Duration dwor
74. l in driver handle k k Er Returnvalue POE OK LE OK er TOc PARAMETER if invalid params passed k k FEAR AA 2 2 2 2 2 2 k 2 2 2 k 2 KA 2 KA 2 2 KA 2 2 22 2 2 KA 2 2 2 2 2 KA 2 2 22 2 2 22 2 2 22 2 2 2 2 2 2 2 2 2 2 2 kx x TOCAPI TOwdg Trigger UINT32 board_hdl The TA Wdg Test application shows the usage of the API 7 27 TQ Wdg Test Application The TA Wdg Test application gives an example of how to use the Watchdog driver 7 27 1 Adding the TO Wdg Test Application to your OS design Right click on the TA Wdg Test Application component in the Catalog Catalog gt Third party gt BSPs gt TQMa31 gt Demo Applications gt TQ Wdg Test Application and choose Add to OS Design BSPa31 WinCE UM 101 Page 54 of 95 Hquuo sjueuoduio2 D Aq 60020 LOL IW Y3OUINCLEEdSH To components 7 27 2 TQ Wdg Test Application configuration There is nothing to configure for this components To start the application open a console window on your device and type WdgTest exe The application will start the watchdog an retrigger it every second When you end the application by hitting a key the watchdog will expire after the Inverval set in the watchdog driver registry settings is expired The system will then reboot The Application is delivered with full source code to give an idea of how to use the watchdog driver The source is located in _WINCEROOT PLATFORM TQMa31 SRC TEST WdgTest 7 28 RNGA The
75. le that the option Autoboot is not set to Disabled Select the device and click OK Now your device is selected for both Downloading and Debugging Target Device Connectivity Options Device Configuration 45 Ethernet Download Settings dd Device Target Device s TOM Delete Device Device Boot Name MX3152394 x ee l Download ervice Configuration Ethemet z see IP Address 192 168 100 65 9 apo ri Settings Kernel Service Map Bootloader 1 0 MX3152384 Core Service Settings Active Devices Transport Sorica siats crema z sens MX3152394 Debugger KdStub v Setra Apply Close Help Target Device has been added Figure 16 Selecting a active target device Click Apply and then close the dialog Now you can select Attach from the Target menu in the Platform Builder IDE A new dialog will appear and the download of the run time image will start If it is not then reboot the TQMa31 module and wait for the download to begin BSPa31 WinCE UM 101 Page 28 of 95 Hquid sjueuoduio2 D Aq 60020 LOL WA SOUIM LEedSa To components Downloading CX nk bin emm mmm Estimated time left 9 sec 2 3 MB of 13 7 MB copied Download through Ethernet Transfer rate 1 3 MB sec Close this dialog box when download completes Close Cancel Figure 17 Downloading the Runtime Image After the download is finished Windows
76. nd Debugging to establish a connection From the Platform Builder Target menu select Attach Device to begin the download After the download is complete switch over to your terminal emulation application At this point EBOOT has downloaded the image temporarily into SDRAM and is ready to begin the flash programming procedure 29 To components 10 5 5 4 In the terminal emulation application hit the y key to begin programming the flash INFO Downloading NK NOR image WARNING Flash update requested Do you want to continue y n Warning A DO NOT SWITCH OFF THE POWER SUPPLY DURING FLASH UPDATE EBOOT will program the image into flash and provide status using serial debug messages Once the programming is complete you will see the following messages INFO Flashing sequence complete Reboot the device manually SpinForever To boot the programmed image automatically follow the Instructions given in Chapter Running an OS Image from NOR Flash using EBOOT Downloading a run time image running from SDRAM into NOR Flash using EBOOT relocated Image If you want that the run time image will be stored in NOR flash but that it will run out of RAM follow these steps a ele C ing eS Open the desired workspace within Platform Builder Deselect Platform Settings Build Options Write Run time Image to Flash Memory Build the run time image following the steps provided in C
77. not be loaded TOc OVERRUN A Transmit Oueue full TOc LOADDRIVER 3 Hardware driver cannot be loaded TOc DRIVERERROR 4 Error in driver function TOc BUSY 5 Interface is in use Table 10 1 BSPa31 WinCE UM 101 Page 80 of 95 Hquio sjueuoduio2 D Aq 60020 LOL WN SOUIM LEedSa To components 10 1 1 2 2 Interface access functions The functions TQcan_OpenBoard and TQcan_CloseBoard open respectively close the CAN interface of the TQMa31 module 10 1 1 2 2 1 TQcan OpenBoard Function int TAcan OpenBoard UINT16 unit no UINT16 mode Description Initializes the interface with number unit no normally O ant sets the access mode Parameter unit no in Number of interface 0 n At the moment there is only the interface with number 0 available mode in Access mode 0 normal TOC CONSUMER or TOC LOM Return value 2 0 Interface handle lt 0 TQc ReturnCodes TQc BUSY if interface is in use Applications can open the interface for reading only by using thr mode TOC CONSUMER This mode does not allow setting of baudrate or message transmision Usefull for bus activity logging In TQC LOM mode the CAN interface is switched to listen only mode s MCP2515 documentation This prevents bus disruption even if baudrate is set wrong The return value has to be provided as parameter board hdl for all other function calls 10 1 1 2 2 2 TQcan CloseBoard Function int TAcan CloseBoard UINT16 board hdl Descript
78. nvironment variables Variable Value Figure 19 Create a environment variable for setting up a static ip BSPa31 WinCE UM 101 Page 38 of 95 Hquio sjueuoduio2 D Aq 60020 LOL WN SOUIM LEedSa To components You can set the static IP address DNS Gateway in the registry file of the driver _WINCEROOT TQMa31 FILES platform reg The table 7 1 shows the possible values Figure 27 shows an example configuration with static IP address Name Values Description EnableDHCP 0 or 1 Disable value 0 or enable value 1 DHCP If enabled Windows CE tries to get its IP address from a DHCP server connected to your network DefaultGateway TOF The IP address of the default gateway aaa bbb ccc ddd IpAddress or If DHCP is used the IP address should be set to 0 0 0 0 aaa bbb ccc ddd Otherwise you can assign a fixed IP address to your network adapter card here Subnetmask or The IP subnet mask aaa bbb ccc ddd DNS or The IP address of a DNS server aaa bbb ccc ddd Table 7 1 TCP IP configuration Registry Keys HKEY LOCAL MACHINENCOMMNSMSC91181NMParmsNTocpIp EnableDHCP dword 0 DefaultGateway 192 168 100 1 IpAddress 192 168 100 25 Subnetimasgk 255 255 255 0 DNS S UTI92 168 1007 1 Figure 20 Example for a static IP configuration Note If KITL support is active the SMSC9215 driver will be replace
79. o CAO D PEP OP en idR x REBATE UR UE 92 101 22 3 17 POG DIO Set ort AE en ee rinnen 92 10 12 2325 R ele Ja eM Gel OFDV allie uocis O FOR ugue RRT cU ER ERE 92 10 1 2 2 4 Configure GPIO Inputs as INterrupt eee eee eee nen 93 10 1 2 2 4 1 TQgpio_ConfigurePortlnterrupt eee ee 93 10 1 2 2 4 22 TAgpio Acknowledgelnterrupt 2 2202 eeeeeeeeee eee eee eee eee nen 93 1022 Ihre Pany oO WW AN eoe oh PP ROE ee 94 10 2 4 PrinterCE NETCF SDK for Visual Studio 2005 en 94 102 2 ZU egralone o uote quien eee eer E me Me d e dU 94 1023 Functional range e a M anne da n SN 95 10 2 4 Supported Printers rre rere rrr e PR NUEVA KOA a e EX REX rennen Rene 95 BSPa31 WinCE UM 101 Page 6 of 95 Hquio sjueuoduio2 D Aq 60020 LOL WN SOUIM LEedSa To components Revision History Rev Date Name Pos Modification 015 19 02 2009 Ch Reichherzer Initial draft 100 23 03 2009 Ch Reichherzer BSP release 101 05 05 2009 Ch Reichherzer Changed structure of tree Contents of the CD 1 About This Manual 1 1 Terms and Conventions Symbol Tag Description This symbol represents important details or aspects for working with the BSP Warning Note Helpful information for working with the BSP This specification is used to state the complete file name with its Filename ext corresponding extension Examples of application e g Instructions e Specifying memory partitions
80. o an OS design BSPa31 WinCE UM 101 Page 72 of 95 Hquuo sjuauodwog OL Aq 60020 LOL NN SOUM LEEeASE To components 2 Core OS Windows CE devices Shell and User Interface Network User Interface z Catalog E BSPs Core OS fl Windows CE devices A Applications and Services Development A Applications End User Communication Services and Networking A Core OS Services 9 Device Management zy File Systems and Data Store Fonts A Graphics and Multimedia Technologies A Intemational A Internet Client Services a Security Shell and User Interface Y Graphics Windowing and E vents tC Shell User Interface B Accessibility Common Controls Common Dialog Support Control Panel Applets Controls Option B g g g C Customizable UI g g g g U EEE E RT RET RT RT a 8 Menu Tool Tip Mouse Network User Interface verlapping Menus Quarter VGA Resources Portrait Mode I Software Input Panel 0 Touch Screen Stylus Voice over IP Phone Services A Windows CE Error Reporting Device Drivers zy Platform Manager HE Figure 47 Adding Network User Interface to an OS design After adding the missing components build the OS design create a run time image and download it to your device peg la components 8 6 2
81. o your OS design 7 6 1 Adding the Audio driver to your OS design Right click on the Audio Driver component in the Catalog Catalog gt Third party gt BSPs gt TQMa31 gt Device Drivers gt Audio and choose Add to OS Design 7 6 2 Audio driver configuration There is nothing to configure for this driver If you want to use the Windows CE system sounds or play wave wav files add the Waveform Audio component to your OS design 7 7 LM75 Temperature Sensor The temperature sensor driver adds support for reading the temperature from 2 temperature sensors The Sensor 1 is located on the rear side of the TAMa31 CPU module and the Sensor 2 is located on the base board Temperatures are given as 8bit signed values in units of 1 C 41 It campunents Note Adding the temperature sensor driver also adds the I2C driver to your OS design 7 7 1 Adding the temperature sensor driver to your OS design Right click on the LM75 Temperature Sensor component in the Catalog Catalog gt Third party gt BSPs gt TQMa31 gt Device Drivers and choose Add to OS Design 7 7 2 Temperature sensor driver configuration Normally there is nothing to configure for this driver If necessary the I2C bus addresses of the sensors can be adjusted in the platform reg file HKEY LOCAL MACHINEMDriversNBuiltInNTMP Prefix TMP DI ITSNBemp dl e Index dword
82. oard hdl Description Starts bus communication with current settings baudrate Message transmission reception is possible after call of this function Parameter board hdl in Interface handle s TAcan OpenBoard Return value TAc ReturnCodes TAc PARAMETER if interface is not opened 10 1 1 2 6 2 TQcan Stop Function int TAcan Stop UINT16 board hdl Description Stops bus communication Current setttings persist Message transmission reception is stopped Parameter board hdl in Interface handle s TAcan OpenBoard Return value TAc ReturnCodes TAc PARAMETER if interface is not opened 10 1 1 2 6 3 TAcan CanStatus Function int TOcan CanStatus UINT16 board hdl Description Returns the current bus state encoded s STS xx constants below Parameter board hdl in Interface handle s TAcan OpenBoard Return value gt 0 bus state bitmask 0 TQc ReturnCodes TQc PARAMETER if interface is not opened STS RUNNING 0x01 STS TX PENDING 0x08 STS CAN INIT 0x10 STS_ERRLVL 0x20 STS_ERRLVL 0x40 STS_BUSOFF 0x80 Table 10 2 85 It campunents 10 1 1 2 7 Message transmission The functions TQcan TransmitMsg and TQcan RequestMsg allow the transmission of CAN messages respectively remote request messages TQcan Pending queries the number of messages still waiting for transmission 10 1 1 2 7 1 TQcan TransmitMsg Function int TQcan TranmitMsg UINT16 board hdl UINT32 id UIN
83. on Services and Networking gt Servers and choose Add to OS Design To enable the Telnet server you have to add additional registry keys e g In your project reg file as shown below HKEY LOCAL MACHINENCOMMNTELNETD IsEnabled dword 1 set to 0 to disable the telnet server UseAuthentication dword 0 anonymous access allowed Note The settings above will allow anonymous access to your system There is no password required as long as the UseAuthentication Key is set to 0 If you wish to protect the integrity of your system by adding a degree of security however you may enable the password feature in Telnet To do this set the UseAuthentication key to one The Telnet server will then ask for a login and password before establishing a connection 75 To campunents To connect via Telnet simply open a Command Prompt in Windows XP and do a Telnet to the IP address of your target system e g telnet 192 168 100 25 You can close the connection by simply typing exit at the command prompt ex C WINDOWS system32 cmd exe Welcome to the Windows CE Telnet Service on WindowsCE 88a lt DIR gt Network A0a lt DIR gt SRAMDisk gt DDA lt DIR gt Hard Disk tila lt DIR gt Application Data 11p Control Panel lnk 11p lt DIR gt My Documents 11p lt DIR gt Program Files 18p lt DIR gt Temp 18p lt DIR gt Windows Found 9 files Total size 23 bytes 1 Dir s 12215173
84. ontrolled by only 3 API calls BRK KK KA KA KA 2 2 2 2 2 2 2 2 2 2 2 2 22 KA KA 2 2 2 2 2 2 2 2 22 2 2 22 2 2 2 22 2 22 k k 2 2 2 2 2 2 2 2 2 2 2 2 2 eek 53 TQ components wk Function TOwdg Open mandatory k k A Description Request access to the watchdog EK Returnvalu gt 0 Driver handle ER TOc BUSY if another program has init access ER TOc_LOADDRIVER if hardware driver not installed k k FAA AAA 2 2 2 2 2 22 2 KA 2 2 22 2 KA 2 KA 2 KA 2 2 22 2 KA 2 2 22 2 KA 2 2 22 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 207 TOCAPI TOwdg Open void KKK K KA KA KA KA KA KA 2 2 2 2 2 2 KA 22 2 2 2 2 2 k 2 2 22 k k k k k k k k kk I KG kk ke ke ke ke e e ek k k FR Function TOwdg Close k k ER Description Close the driver EK Parameters board hdl in driver handle k k ER Returnvalue POE OK TE OK TOc PARAMETER if invalid params passed k k FER A 22 2 22 2 2 2 2 2 2 22 2 2 2 2 2 KA 2 2 2 2 2 2 2 22 2 2 2 22 2 2 22 2 22 2 2 2 2 2 2 2 22 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 k TOCAPI TOwdg Close UINT32 board hdl KKK Kk Ck 2 KA 2 K 2 2 KA 2 2 KA 2 2 2 2 2 2 22 2 KA 2 2 2 2 2 22 2 2 2 22 2 2 22 2 2 2 2 2 2 2 2 2 2 2 2 2 2 22 20 k k EN Function TOwdg Trigger k k EK Description Retrigger the watchdog timer ER The first call to TOwdg Trigger will start the watchdog if StartupType 1 is set k k AR Parameters board hd
85. otloader First you have to configure one COM port of your development computer with following paramenters 115200 8 N 1 as shown Tera Term Serial port setup Port Baud rate 115200 gt Data 8 bit Cancel Parity none v Stop 1 bit Help Flow control none v Transmit delay 0 msecjchar 0 msecjline Figure 18 COM port configuration for EBOOT bootloader After that when the device is powered up and you have connected UART1 of port of your TQMa31 module with a serial port of your development computer by means of a nullmodem cable you can enter the configuration menu by hitting the SPACE key in your terminal program when you see the following message Press ENTER to download now or SPACE to cancel Hitting SPACE will bring up the bootloader configuration menu Boot Loader Configuration 0 IP address 0 0 0 0 Subnet Mask 0 0 0 0 Boot delay 1 seconds DHCP Enabled Reset to factory default configuration Autoboot NK from NOR MAC address 0 12 33 55 CC AA CPU speed 532MHz AHB Bus 133MHz L2 cache on KITL passive Save configuration Download image now Launch existing flash resident image now CO C L 0 9 J du Ln LU KM LA Enter your selection Here you can modify settings described in Table 2 33 la components Option Description IP address Select IP address for the bootloader Not used if DHCP is enabled Subnet Mask Select subnet mask for the bootloader Not u
86. pact Framework 1 0 2 0 gt NET Compact Framework 1 0 2 0 OS Dependencies for NET Compact Framework 1 0 2 0 in the Catalog Catalog gt Core OS gt 57 To components Windows CE devices gt Applications and Services Development gt NET Compact Framework 1 0 2 0 gt OS Dependencies for NET Compact Framework 1 0 2 0 and choose Add to OS Design Additionally add the Standard SDK for Windows CE component in the catalog Catalog gt Core OS gt Windows CE devices gt A Applications and Services Development to the OS design Afterwards you have to build the OS design see Building the OS Design After that you can proceed with following chapter creating a SDK 8 2 1 Creating a SDK from your OS design Start the Platform Builder IDE open your workspace and select New SDK from the Platform menu samplePlatform Platform Builder Welcome to Platform Builder 13 File Edit View Project Platform Target Build Project Build OS Tools Window Help m a g Hg CE PC x85 Release Refresh Catalog Items A M Review Special Notifications BA samplePlatform Catal Insert gt Sy CEPC 86 2 Device Drivers By Emulator x86 zn Applications 2 Applications BSP Wizard 2 Communicati Export Wizard Z Core DS Ser Figure 27 Create a new NET CF SDK Choose a unique name for the SDK enter the name of your company and hit Next
87. pinForever Warning A DO NOT SWITCH OFF THE POWER SUPPLY DURING FLASH UPDATE Close the Platform Builder workspace for EBOOT nb0 It is not necessary to save any workspace changes Reset the target hardware If you see new EBOOT messages appear on the terminal EBOOT has been properly programmed into NOR flash 35 It campunents 7 Device drivers This chapter describes the individual settings for the included device drivers of the BSP Note If you want to create more than one workspace with different driver settings e g one with DHCP and another one with static IP Address you will have to relocate the driver registry settings from the BSP platform reg to your workspace project reg 7 1 Display driver 7 1 1 Direct Draw display driver At the moment the following displays are supported ADMATEC 800x480 NLC800T70D480CTMK POWERTIP 320x240 PH320240T 009 IC1 Q 7 1 1 1 Adding the display driver to your OS design Right click on the ADMATEC NLC800T70D480CTMK 800x480 or POWERTIP 320x240 component in the Catalog Catalog gt Third party gt BSPs gt TQMa31 gt Device Drivers gt Display and choose Add to OS Design Note Be sure that the component Direct Draw Catalog Core OS Windows CE devices Graphics and Multimedia Technologies gt Graphics is included in your workspace 7 1 1 2 Configuration of the direct draw display driver Generally there is nothing to config
88. ptance Iller ar ee ern 83 10d 2s EE ele TT Hee E aS ee ee re 83 1911252 TOcan SetAccCode ae ash esa ocas NUM ce ET d Ex UNE 84 103131 2 9 34 DG cans GEIACCIWaSKeccesecs career E IS 84 11254 TOcan Gt cron Pr 84 10 11 20 OTTO OT DUS COR VILUS i ner nee 85 10 1812 M MEER na 1 ee ESTEE 85 10 1 1 2 6 2 TOca SIUOD constatar anerkennen ua EE 85 AO 12226 Sia ele EE E eee 85 10112 IMOSSAgeanSmSSON 33 essen Ae ee ee n ae 86 10 212 217 Acan EDS SE ster cis tac Akzo OS 86 10 1 1 2 H TOGANAREGUGSIMSG ada KA ACS IEEE rera Ra ae nennen 86 HR T PDU oe AMD o 1a Sne a Le oot oeste t E 86 10 12128 Message TeCODIOI se eps xta inca voee es Ress AAR KN SSK AEC 87 BSPa31 WinCE UM 101 Page 5 of 95 To components D2 oo he POC CAN IE YT SI CT ea anne 87 10 21 1282 7 Tocan Connie Ve ce pr mE 88 10 1 1 2 0 3 Arcan EventGOUnt eicere rti eec erret eer sert eere he Zadne ee 88 191 284 7 TQcan Ses VS Maa oddan eret cobra ae na na ata uh b Rod 88 10 1 1 2 8 5 TQcan ResetTimestamp uenennnnenenennenennn nennen 89 10 1 2 General Purpose Input Output TQ gpio dll een 90 10 1 2 1 Tanasica ione nA P T UE 90 10 1 2 2 Eunctons descriptiODs cese T Un mI WU 90 10 12 21 we Ret rnivalue c eee wo ee TD S tUe DR NO Ed SR L ND 90 10 1 2 2 2 Open and close the driver erret reri reoete e E Vereen 91 1021 22 2 17 TAJPI OPEN rectc Eun a c don ida Fein sl ex o wae ee a xS 91 10212 222 OI 0 T e een 91 1122 3s cop an d
89. py the bitmap file to the directory _WINCEROOT PBWorkspaces _TGTPROJ WINCE500 TQMa31_ARMV4I OAK files 9 2 2 Hiding the taskbar Add the following keys to project reg Takbar amp desktop setting HKEY LOCAL MACHINENSoftwareMMicrosoftNShellNAutoHide Taskbar auto hide 1 HKEY_LOCAL_MACHINE Software Microsoft Shell OnTop 1 taskbar always visible on top taskbar can be covered by other windows a BSPa31 WinCE UM 101 Page 78 of 95 Hquuo sjueuoduio2 D Aq 60020 LOL IW Y3OUINCLEEdSH TQ components 9 2 3 Changing the folder name of storage devices Example for modifying project reg USB stick folder name HKEY LOCAL MACHINENSystemNStorageManagerNProfilesNUSBHDProfile Folder USB Stick CFCard folder name HKEY_LOCAL_MACHINE System StorageManager Profiles PCMCIA Folder CFCard SDCard folder name HKEY_LOCAL_MACHINE System StorageManager Profiles SDMemory Folder SDCard 9 2 4 Setting up the time zone to GMT Add the following registry entries to project reg x Date Time Settings Time zone default settings HKEY LOCAL MACHINENTime Zones Default GMT Standard Time Clock Format HKEY LOCAL MACHINE NnlsNoverrides STi met STFmt H mm STime STRING Time Separator STFmt STRING h mm ss tt Time Format String 1159 STRING am
90. r you Auto word wrap and page feed text printing options Drawing objects lines ellipses rectangles rounded rectangles Select size location line width color fill Images BMP 8 JPG support plus GIF 8 PNG on Pocket PCs Select size aspect ratio rotation Full color printing Print using Infrared Bluetooth serial and network connections Note Licensing costs for the PrinterCE NETCF SDK must be paid separately 10 2 2 Integration 1 Add the file names and appropriate paths to project bib FILES Name Path Memory Type PrCEDemo NetCF exe _WINCEROOT PBWorkspaces _TGTPROJ WINCE500 TQMa31_ARMV41I OAK files PrCEDemo_NetCF exe NK U PrCE NetCF dll _WINCEROOT PBWorkspaces _TGTPROJ WINCE500 TOMa31_ARMV41 OAK files PrCE_NetCF dll NK SH PrinterCE NetCF dll WINCEROOT PBWorkspaces _TGTPROJ WINCE500 TOQMa31_ARMV4I OAK files PrinterCE NetCF dllNK SH 2 Copy the driver files PrCE_NetCF dll PrinterCE NetCF dl and the demo application PrCEDemo NetCF exe to the directory _WINCEROOT PBWorkspaces _TGTPROJ WINCE500 TQMa31_ARMVAI OAKTfiles Note BSPa31 WinCE UM 101 Page 94 of 95 Hauwo sjueuoduio2 D Aq 60020 LOL WN SOUIM LEedSa TQ components For additional information about integration of printer support please see IP network printer and USB printer support for additional catalog components 10 2 3 Functional range Please see the PrinterCE NetCF Developer s Guide http www
91. ries to establish a connection to the host PC If no host PC running ActiveSync is available the device tries to connect a few times then it waits for incoming connection requests You can check this by running a terminal program e g Hyperterminal which is included in Windows XP instead of ActiveSync and set the baud rate to 19200 After clicking the connection symbol on the target device the terminal program should show some CLIENT messages it received Closing the terminal program and running Active Sync will then lead to an established connection 8 6 3 Establish a ActiveSync connection over USB Include either OTG Pure Client Function or OTG Full OTG Function in your OS Design Include also the Serial USB Function Driver in your OSDesign Catalog gt Device Drivers gt USB Function gt USB Function Clientsl When you plug in a Type B Plug in your device and connect the cable with your host computer running ActiveSync the device will be recognized automatically 9 Additional customizations The following chapters will give you hints for the usage of some Windows CE components and other useful settings regarding the appearance of Windows CE 91 Windows CE Components 9 1 1 Telnet Server Telnet allows easy access to your Windows CE device over the network To add the Telnet server to your image right click on the Telnet Server component in the Catalog Catalog gt Core OS gt Windows CE devices gt Communicati
92. riteLine Wait 60 seconds for incoming messages while transmittin for int 1 0 4 60 4 U CANDLLVrapper TOcan TransmitNsy boardHandle 2047 8 TestData CANDLL U appes TOcan TransmitMeg boardHandle UI5t32 0 CANID EXTEND Figure 44 Start Debugging If you set a breakpoint and the debugger is running the code execution will be broken This condition is signaled with a diia arrow inside the red breakpoint symbol So gm Leeds decem Contest M Miel l eise C nsols MriteLine Puckgabrewrt Configbernts 0 tonfigfventhesult fWontigurarion und Starten des Imptangs Threads Three onnThrend new Tiresd mew There UR RecetveThread 7 sanThtemd Start 0 7 MIDLLU appar Ocan Setfaudrate boardMand e Default Baudrmte heck Sautyare pper Tecan Start bosrdBandie Weitebine Wait 40 seconds for intoming serseyges while transmitting R mertages for int 1 0 1 40 1001 L diandie 2047 8 TestDate T can TramamitESQ bosrdNandle UTnt77 0 CANID KXTENOXP Tewtbata noper T cam TratsmitiBsg boardManile LR ls Ox1FFFYFF CAMID_EETENDED TestData Thi eed Sleep 1000 1 U endReceiveThrend true eanThread Join 9000 JMDLLUrepper T can CioseBsard bcardilandie 7 boardMandie 1j oe CantestiT G Carew O Cartes 2 eni CanTett 2 Co T est Start CAN Ure 109 M U L CarTest37 42 aei CanTeetti147 Program Mander args
93. rn the next value detailed information can be find in each function TOC OK 0 ok TOc PARAMETER illegal parameter passed TOc LOADDRIVER 3 Hardware driver cannot be loaded TOc DRIVERERROR 4 Error in driver function Table 10 3 BSPa31 WinCE UM 101 Page 90 of 95 Hauwo sjueuoduio2 D Aq 60020 LOL WN SOUIM LEedSa To components 10 1 2 2 2 Open and close the driver With the functions TAgpio Open and TAgpio Close the application reserves and releases the GPIO driver 10 1 2 2 2 1 TQgpio Open Function UINT32 TQgpio_Open Description Request access to GPIOs Return value 2 0 handle 1 invalid board handle The returned handle should be used as parameter for calling the next functions 10 1 2 2 2 2 TQgpio Close Function UINT32 TQgpio Close UINT32 handle Description A board registered with TQgpio Open can be deregistered with TOgpio Close This includes the reset of the hardware and deinstallation of the possibly used interrupt Parameters handle in Identifcation handle Return value TQcan return codes TQc PARAMETER if invalid params passed 91 It components 10 1 2 2 3Set and get GPIO I O Before these actions can be taken a handle to the TQgpio must already be opened The set and get functions manage the values in the GPIO Inputs and Outputs 10 1 2 2 3 1 Function Description Parameters Return value TQgp
94. rnel Windows Thin Client a Figure 4 Creating a new platform Step 4 We chose the Industrial Controller as a base configuration for our OS design as this configuration includes already TCP IP networking GUI support and most of the programming APIs Note If you want to know exactly what components are included in each design template please study the xml files in the WINCEROOT PUBLIC COMMON OAK CATALOG NEWPLATFORMWIZARDS folder of your Platform Builder installation With the following two steps various components such as applications can be added to the OS design You will be able to modify this configuration later on however it will be more detailed and you will have to deal with dependencies of the modules The figures below show a configuration example N 17 To campunents New Platform Wizard Step 5 Applications amp Media E Select items for applications and media to include in your OS design NET Compact Framework device driver that displays the window for CENAE Window the console shell DCOM Network User Interface Standard SDK for Windows CE Waveform Audio Windows Internet Services Internet Browser Internet Explorer 6 0 Pocket Internet Explorer _ Windows CE Error Reporting JE m v Estimated size of these items 3532 KB Figure 5 Creating a new platform Step 5 We deselect the NET Compact Framework component and include the Console Win
95. rom the catalog amp TOMa31 ARMVAI 1 Demo Applications 1 Device Drivers G Ethernet Bootloader eboot Required Memory RAM A 123 MB RAM A 256 MB RAM ff NOR Flash B 16 MB NOR Flash A 32 MB NOR Flash 64MB NOR Flash Figure 9 Memory configuration 5 3 2 Build options To set the build options for your OS design open the Settings dialog from the Platform menu in Platform Builder and go to the Build Options tab The most important options are described in Table 1 There is also a recommendation given for setting the build options for the Debug and Release configuration of your OS design Option Description Build configuration Debug Release Enable CE Target Conirol Select to enable target control support X X Support CE Shell during the boot process Enable eBoot Space in Memory Should be checked if you use the eBoot bootloader normally used for X X downloading the Image from the Platform Builder Enable Full Kernel Mode Select to run threads in kernel mode Increases system performance but X X makes the system more vulnerable Enable Kernel Debugger Allows to connect the kernel debugger of X platform builder with the target Enable KITL Enables the Kernel Independent Transport Layer KITL Needed for X X communication between the development workstation and the target device Table 5 1 Build options BSPa31 WinCE UM 101 Page 22 of 95
96. rtan servers Gt apply to your DS doagn You con abn add conhiguae S elect al coneraacahons protocols that apply to yous platform ord remeree Arr sloty servers hom you SOK Pv male clortugy savers Avadable banepests Startup Servers Defoe Marssi Server E CESH ICE Shall A Activesync Figure 31 Setting up the startup servers and transports Note After you have build a SDK with NET Compact Framework successfully you can remove the Standard SDK for Windows CE component from your OS design Afterwards you will find the checkbox for NET Compact Framework grayed out but selected SDK settings gt tab Development Languages SDK Settings Install I Product Properties EULA Readme 4 Splash Screen CPU Transports Startup Servers Development Languages Additional Files Help Emulation E Select the development languages that you want your SDK to support v eMbedded Visual C 4 0 support ATL for Windows CE applications MEC for Windows CE applications MFC for Windows CE ActiveX controls Figure 32 Selecting NET CF support without Standard SDK support BSPa31 WinCE UM 101 Page 60 of 95 P Hquio sjueuoduio2 D Aq 60020 LOL IW Y3OUINC LEEdSH To components To finally build the SDK select Build SDK from the Platform menu After the SDK is build successful you will find the installable SDK file file extension msi in your workspace directory fr C WINCE500 PBWorkspa
97. s 7 25 TQ Gpio Test Application The Test application gives an example of how to use the GPIO API of the TQ Gpio dll Gpiotest is a command line application that shows how to use the TA Gpio dll and call the functions of the GPIO driver It allows to test the GPIO inputs and outputs When the application is started without parameters it shows the help of the command line gt gpiotest TQ GPIO Net Test Application TQ Systems C Nov 2008 usage gpiotest gpo output frequency gpi input mode t seconds where gpo output frequency set to high the bitwise selected gpo output is a 2 digits hexadecimal value where MSB GPO 8 LSB GPO 1 frequency is a 4 digits value to set the frequency will be generated on the selected otputs gpi input mode counts the generated interrupts in the bitwise selected gpi input is a 2 digits hexadecimal value where MSB GPI 5 LSB GPI 1 mode is the form in wich the selected interrupts will be activate 0 Level Low Ative 1 Level High Active 2 Rising Edge default 3 Falling Edge t seconds seconds that the appication waits for the inputs 30 waits 30 seconds default NS Example gt gpiotest gpi 0f 3 This sample starts one task for each selected interrupt input GPI_1 GPI_4 gt 00001111b 0x0f These tasks show the state of the appropriate input data after the interrupt event will be started according of the selected interrupt mode gt gpiotest gpo f0 This s
98. s not matter if you launch the applications from command line or by double clicking on the icons After the tools are running you can continue with the Connect to Device For further information about the Microsoft solution please see http msdn microsoft com de de library ms228708 aspx http blogs msdn com vsdteam archive 2005 01 05 347332 aspx 85 Application deployment This chapter shows how to include applications and associated files e g DLLs in your image Further you will learn how to start your applications automatically when Windows CE has booted 8 5 1 Adding applications and files to your OS design You can include your applications and additional files e g DLLs in your Windows CE image by adding an entry in the MODULES FILES section of your project bib file E g Include an application named myapp exe with an additional DLL named myapp dll and a bitmap file In this example all files are located in a directory called 3_WINCEROOT MYAPP Add the following lines to your project bib file 69 It campunents MODULES Name Path emory Type i MYAPP EXE Winceroot MYAPP MYAPP EXE NK SH MYAPP DLL Winceroot MYAPP MYAPP DLL NK SH FILES Name Path Memory Type H PLASH BMP Winceroot MYAPPNPICI BMP NK SH MODULES is reserved for executables and DLLs Any file in the MODULES area will be fixed up to execute in place XIP Those files won t be available vi
99. sed if DHCP is enabled Boot delay Delay in seconds that the bootloader waits for the SPACE key to enter in the configuration menu before the option selected in Autoboot is executed DHCP Enable disable DHCP for the bootloader Reset to factory default configuration Reset all setting to the factory defaults Autoboot Select the boot option for normal startup if not entered boot configuration You can choose NK from NOR Load run time image from NOR flash NK from CFCard Load run time image named NK bin from CFCard Disabled Bootloader will try to download image MAC address Select the MAC address for the onboard SMSC9215 network interface CPU speed Select CPU speed You can select either 532MHz or 399MHz The AHB bus frequency will always be 133MHz L2 cache Enable Disable L2 cache KITL Switch between active and passive KITL Active KITL will try to connect a Platform Builder to establish a debug connection via Ethernet Passive KITL will just print out the debug messages to UART1 Save configuration Saves the current configuration to NOR flash Download image now Immediately start a download connection to load a run time image from Platform Builder Launch existing flash resident image now Launch the run time image stored already in NOR flash Table 6 1 Bootloader options BSPa31 WinCE UM 101 Page 34 of 95 Hquio sjueuoduio2 D Aq 60020 LOL WN SOUIM LEed
100. set Active Sync for Transport For KITL Transport a connection between Platform Builder and the target must be established After successfully testing the connection you should be able to compile your project and automatically download it to the device 8 4 Developing with Visual Studio 2005 To develop and debug programs written in C C and Visual Basic to run with Windows CE you can use Microsoft Visual Studio 2005 8 4 1 Installation Additionally to the installation DVD of Microsoft Visual Studio 2005 the following software components must be on hand or installed Microsoft NET Framework 1 1 Microsoft NET Framework 2 0 Service Pack 1 for Microsoft Visual Studio 2005 Microsoft NET Compact Framework 2 0 Service Pack 1 for Microsoft NET Compact Framework 2 0 Service Pack 2 for Microsoft NET Compact Framework 2 0 ARMV4I specific SDK for NET Compact Framework BSPa31 WinCE UM 101 Page 64 of 95 Hauwo sjueuoduio2 D Aq 60020 LOL WN SOUIM LEedSa To cornpanents Steps for installation Note If one or more of the following software components are already installed please skip the appropriate installation 1 Microsoft NET Framework 1 1 Microsoft NET Framework 2 0 Microsoft Visual Studio 2005 Service Pack 1 for Microsoft Visual Studio 2005 Microsoft NET Compact Framework 2 0 Service Pack 1 for Microsoft NET Compact Framework 2 0 Service Pack 2 for Microsoft NET Compact Framework 2
101. t level settings OxFF Full On ACBacklightLevel dword AA Backlight level settings OxFF Full On BatteryTimeout dword 1E ACTimeout dword 78 UseExt dword 1 Enable timeout when on external power UseBattery dword 0 Enable timeout when on battery AdvancedCPL AdvBacklight Enable Advanced Backlight control panel dialog The timeouts are given in seconds 7 16 PC Card driver The PC Card driver adds support for PCMCIA cards to your OS design 7 16 1 Adding the PC Card driver To add the driver right click on the MX31 PCMCIA PC Card component in the Catalog gt Third Party gt BSPs gt TAMa31 gt Device Drivers gt PC Card gt PC Card Host and choose Add to OS Design 7 16 2 PC Card driver configuration There is nothing to configure for this driver If you want to use CompactFlash memory cards in your PC Card socket add the ATADISK component to your OS design the Catalog gt Device Drivers gt Storage Devices gt Storage Devices gt Compact Flash PC Card Storage ATADISK If you insert a card into the socket the device will show up as Hard Disk in explorer 7 47 PWM driver The Pulse Width Modulator PWM module is used to generate 16 bit resolution sound from sample audio images and can also be used to generate tones It is used by the Buzzer component and therefore included automatically if you add the Buzzer component 7 17 1 Adding the PWM dr
102. tal encode jog dial wheel emulates scan code for Functional Key 5 Figure 23 Matrix Keypad Layout 7 21 1 Adding the matrix keypad driver to your OS design The matrix keypad driver will be automatically added to your OS design when you add the international keyboard drivers to your OS design see chapter Adding the international keyboard drivers 7 21 2 Matrix keypad drive configuration There is nothing to configure for this driver BSPa31 WinCE UM 101 Page 50 of 95 Hauwo sjueuoduio2 D Aq 60020 LOL IW Y3OUIN LEEdSH To components 7 22 MCP2515 CAN driver The MCP2515 CAN driver adds support to your OS design for the Microchip MCP2515 CAN controller located on the TQMa31 CPU module This will also add the TA CanCe DLL to your OS design The TQ_CanCe DLL acts as a user interface library for the MCP2515 CAN controller 7 22 1 Adding the MCP2515 CAN driver to your OS design Right click on the MCP1525 CAN driver component in the Catalog Catalog gt Third party gt BSPs gt TQMa31 gt Device Drivers r and choose Add to OS Design 7 22 2 MCP2515 CAN driver configuration and usage There is nothing to configure for this driver All functions of the CAN interface are controlled via the TQ_CanCe interface dynamic link library For a detailed description of the user interface library TQ CanCe dll please see chapter CAN TQ_CanCe dll 723 TQ CanCe Test Application The TQ CanCe DLL adds the interfa
103. the filter O don t care The acceptance code defines the bits of the id which have to be set to be accepted The MSB CANID EXTENDED 0x80000000 decides if the filter is used for extended IDs Some examples Standard Extended Open acc mask 0x000 acc mask 0x80000000 acc code 0x000 acc code 0x80000000 Close acc mask Ox7FF acc mask Ox9FFFFFFF acc code 0x000 acc code 0x800000000 One acc mask 0x7FF acc mask Ox9FFFFFFF acc code 0x001 acc code 0x800000001 Odd acc mask 0x001 acc mask 0x80000001 acc code 0x001 acc code 0x80000001 Even acc mask 0x001 acc mask 0x80000001 acc code 0x000 acc code 0x80000000 The filter Open accepts all messages as acc mask 0 the filter Close accepts no message but Id 0 As all bits are used for filtering The filter One accepts only mesages with ID 1 The filter Odd accepts only odd IDs the filter Even only even IDs 10 1 1 2 5 1 TQcan SetAccMask Function int TAcan SetAccMask UINT16 board hdl UINT32 acc mask Description Set the acceptance mask register Parameter board hdl in Interface handle s TAcan OpenBoard ace mask in Value of the acceptance mask register to set MSB 0x80000000 is set for extended message IDs Return value TQc ReturnCodes TQc PARAMETER if interface is not opened 83 It components 10 1 1 2 5 2 TQcan SetAccCode Function Description Parameter Return value int TQcan SetAccCode UINT16 board hdl UI
104. trolSet Control Layouts within the target s registry This folder is named like the keyboard s language ID e g 00000410 for Italian and contains three keys e Layout File Name of the keyboard driver DLL e g Kbalt dll e Layout Text Text to be displayed inside the language selection menu e g Italian which is accessible via left click on the language tray icon in the task bar of the device see figure below You can set a user defined text regardless of the operating system s default language BSPa31 WinCE UM 101 Page 48 of 95 Hauwo sjueuoduio2 D Aq 60020 LOL WN SOUIM LEedSa TQ components UU Build O or ee v English United States Spanish French Italian Dutch Swedish Portuguese S 3 30 AM Figure 22 Setting the Layout Text key manually The order of languages listed in the menu depends on the hexadecimal language ID thus unchangeable e KPPLayout Name of the keyboard driver DLL the same as Layout File Additionally each keyboard layout requires a unique preload value located at HKEY CURRENT USERWKeyboard Layout VPreload The preload value is a consecutive number starting with 1 which is associated with every keyboard language ID used 7 20 4 Example The following example shows all registry settings required for the Italian keyboard layout HKEY LOCAL MACHINENSYSTEMNCurrentControlSetNControlNLayouts V 00000410 Layout File KbdIt dll Layout Text I
105. troller 7 9 1 Adding the touch panel driver To add the touch panel driver right click on the Touch Driver component in the Catalog gt Third Party gt BSPs gt TGMa31 gt Device Drivers gt Touch and choose Add to OS Design 7 9 2 Touch panel driver configuration There is nothing to configure for this driver Note The default touch calibration data is set for displays with a resolution of 800x480 pixels in platform reg file Look for the HKEY LOCAL MACHINEHARDWAREWNDEVICEMAPYTOUCH section For a individual calibration execute tochc exe and persist the HKEY LOCAL MACHINEHARDWAREWDEVICEMAPYTOUCH key 7 10 Dynamic Voltage and Frequncy Control DVFC The BSP includes a component called the Dynamic Voltage and Frequency Control DVFC driver that provides combined support for DVFS Dynamic Voltage Frequency Scaling and DPTC Dynamic Process Temperature Compensation The DVFC driver plays an important role in the reduction of active power consumption by dynamically adjusting the voltage and frequency settings of the system The DVFC driver can respond to DVFC and DPTC hardware logic that is monitoring CPU loading and process temperature performance of the silicon 7 10 1 Adding the DVFC driver To add the DVFC driver right click on the DVFC component in the Catalog gt Third Party gt BSPs gt TQMa31 gt Device Drivers gt DVFC and choose Add to OS Design Note The DVFC driver works only with a
106. turn codes TQc PARAMETER if invalid params passed TQc DRIVERERROR if interrupt is already configured use INTERRUPT NONE fo free it first INTERRUPT LEVEL LOW ACTIVE 0 INTERRUPT LEVEL HIGH ACTIVE 1 INTERRUPT_RISING_EDGE 2 INTERRUPT_FALLING_EDGE 3 INTERRUPT_NONE 4 Table 10 4 Interrupt types Before the interrupt is configured a task should be waiting for the event 10 1 2 2 4 2 TQgpio Acknowledgelnterrupt Function int TQgpio Acknowledgelnterrupt UINT32 handle UINT32 input Description Acknowldege interrupt Parameters handle in Identifcation handle input in the input to acknowledge GPI1 GPI6 93 It components Return value TQcan return codes TQc_PARAMETER if invalid params passed 10 2 Third Party Software 10 2 1 PrinterCE NETCF SDK for Visual Studio 2005 The PrinterCE NETCF SDK for Visual Studio 2005 add powerful printing functionality to your apps developed with Microsoft s Visual Studio 2005 Net CF 2 0 Compact Framework 2 0 development environment Features Works with CF VB Net and other NetCF languages Easy to use forget device contexts bit blitting amp other complexities Supports VS2008 VS2005 VS2003 Compact Framework 3 x 2 x 1 x Text Select font size style color rotation page position or let PrinterCE automatically position multiple rows of text fo
107. ure for the driver If it is necessary to hide the mouse cursor the user can set the following registry key in the project reg HKEY LOCAL MACHINEN SystemNGDI Drivers Q0 Cursor Off Er Cursor On CursorOn dword l Note The cursor off functionality only works when the hive based registry is also added to your OS design see Hive Based Registry Turning the cursor on or off could be achieved by a small program which flushes the appropriate value for the above mentioned registry sub key Cursoron BSPa31 WinCE UM 101 Page 36 of 95 Hauwo sjueuoduio2 D Aq 60020 LOL NN SOUM LEEeASE To components 7 1 2 Mobile 3D display driver At the moment the following displays are supported POWERTIP 320x240 PH320240T 009 IC1 Q Note The Mobile 3D MBX display driver is in a pre release stage 7 1 2 1 Adding the display driver to your OS design Right click on each of the components MBX MX31 Base Driver MBX MX31 D3DM and MBX MX31 Ogles Core in the Catalog Catalog gt Third party gt BSPs gt TAMa31 gt Device Drivers gt MBx and choose Add to OS Design Additionally you must add the component Direct3D Mobile Catalog gt Core OS gt Windows CE devices gt Graphics and Multimedia Technologies gt Graphics to your design 7 1 2 2 Configuration of the mobile 3D display driver There is nothing to configure for the driver 7 2 VFP Vector Floating Point support The VFP component

Download Pdf Manuals

image

Related Search

Related Contents

G16ハウジング 取扱説明書    PC CHIPS A15G (V1.0)  Caractéristiques techniques  Instructions  New User Orientation  LIMITED WARRANTY  

Copyright © All rights reserved.
Failed to retrieve file