introduction to embedded software development frequently asked question school of software...

15
Introduction to Introduction to Embedded Software Embedded Software Development Development Frequently Asked Frequently Asked Question Question School of Software School of Software Engineering Engineering

Upload: agnes-craig

Post on 02-Jan-2016

224 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Introduction to Embedded Software Development Frequently Asked Question School of Software Engineering

Introduction to Embedded Introduction to Embedded Software DevelopmentSoftware Development

Frequently Asked QuestionFrequently Asked Question

School of Software EngineeringSchool of Software Engineering

Page 2: Introduction to Embedded Software Development Frequently Asked Question School of Software Engineering

IndexIndex

Windows CE MenuWindows CE Menu Connect to Emulator without EthernetConnect to Emulator without Ethernet EVC can NOT display Chinese CharsEVC can NOT display Chinese Chars CVTRes ErrorCVTRes Error

Page 3: Introduction to Embedded Software Development Frequently Asked Question School of Software Engineering

1. How to create and use 1. How to create and use menu in Windows CE Appsmenu in Windows CE Apps

Page 4: Introduction to Embedded Software Development Frequently Asked Question School of Software Engineering

Problem descriptionProblem description

The menu resource can be inserted The menu resource can be inserted and edited into .rc fileand edited into .rc file

Desktop Windows API does NOT workDesktop Windows API does NOT work CreateMenuCreateMenu SetMenuSetMenu

Page 5: Introduction to Embedded Software Development Frequently Asked Question School of Software Engineering

Problem Root CauseProblem Root Cause

The GUI Shell of Windows CE system The GUI Shell of Windows CE system is somewhat different with desktop is somewhat different with desktop window, the UI elements of Pocket PC window, the UI elements of Pocket PC and Smartphone are different.and Smartphone are different.

Windows CE implements the menu API Windows CE implements the menu API as Common control, named as Common control, named Command Command BarBar..

Page 6: Introduction to Embedded Software Development Frequently Asked Question School of Software Engineering

SolutionSolution

#include <commctrl.h>#pragma comment(lib, “Commctrl.lib”) // link the static library……

case WM_CREATE:hwndCB = CommandBar_Create(hInst, hWnd, 1);CommandBar_InsertMenubar(hwndCB, hInst, IDM_MENU,

0);CommandBar_AddAdornments(hwndCB, 0, 0);

case WM_DESTROY:CommandBar_Destroy(hwndCB);

Page 7: Introduction to Embedded Software Development Frequently Asked Question School of Software Engineering

Related resourcesRelated resourcesProgramming element Description

CommandBar_AddBitmapThis function adds one or more images to the list

of button images available for use in the command bar.

CommandBar_AddAdornmentsThis function adds the Close button (X) to the

command bar.

CommandBar_InsertComboBoxThis function inserts a combo box into the

command bar.

CommandBar_InsertMenubarThis function inserts a menu bar into the

command bar. CommandBar_InsertMenubarEx This function inserts a menu into a command bar. CommandBar_Create This function instantiates a new command bar.

CommandBar_DrawMenuBarThis function repositions and redraws the

command bar after a menu in the command bar has been modified.

CommandBar_GetMenuThis function retrieves the handle to a menu on

the command bar.

CommandBar_HeightThis function retrieves the height of the command

bar in pixels. CommandBar_Show This function shows or hides the command bar.

Page 8: Introduction to Embedded Software Development Frequently Asked Question School of Software Engineering

2. How to use EVC to 2. How to use EVC to connect to emulator if my connect to emulator if my PC has no Ethernet cardPC has no Ethernet card

Page 9: Introduction to Embedded Software Development Frequently Asked Question School of Software Engineering

Problem description & causeProblem description & cause

EVC need to use TCP/IP to connect to EVC need to use TCP/IP to connect to connect to emulatorconnect to emulator

Your PC must have an available Your PC must have an available Ethernet connectionEthernet connection

Platform manager can NOT connect to Platform manager can NOT connect to device without Ethernet connectiondevice without Ethernet connection

Page 10: Introduction to Embedded Software Development Frequently Asked Question School of Software Engineering

Solution : Install Microsoft Solution : Install Microsoft Loopback AdapterLoopback Adapter

控制面板 控制面板 -> -> 添加硬件 添加硬件 -> -> 手动选择 手动选择 -> -> 网网络适配器络适配器 -> Microsoft -> Microsoft -> Microsoft -> Microsoft Loopback AdapterLoopback Adapter

Page 11: Introduction to Embedded Software Development Frequently Asked Question School of Software Engineering

3. EVC can not display 3. EVC can not display Chinese CharactersChinese Characters

Page 12: Introduction to Embedded Software Development Frequently Asked Question School of Software Engineering

Problem description & causeProblem description & cause

The default Standard SDK is built with The default Standard SDK is built with the English language.the English language.

There are no Chinese font installed at There are no Chinese font installed at all.all.

Page 13: Introduction to Embedded Software Development Frequently Asked Question School of Software Engineering

Solution : Build your own Solution : Build your own Platform with Chinese and Platform with Chinese and export your own SDKexport your own SDK

From PB, Platform -> Setting -> LocaleFrom PB, Platform -> Setting -> Locale Be sure that the default language is Be sure that the default language is

Simplified ChineseSimplified Chinese Export SDK and install it.Export SDK and install it.

Page 14: Introduction to Embedded Software Development Frequently Asked Question School of Software Engineering

Correct ResultCorrect Result

Page 15: Introduction to Embedded Software Development Frequently Asked Question School of Software Engineering

Cvtres out of memoryCvtres out of memory

When compile, the compiler complains When compile, the compiler complains cvtres error.cvtres error.

Solution : Solution : http://bbs.tongji.net/index.php?http://bbs.tongji.net/index.php?prog=topic::flat&tid=198858prog=topic::flat&tid=198858