Wince-common debugging errors

Source: Internet
Author: User

1. How to add or delete a module in BSP.

The following uses the display driver as an example.

The BSP root directory contains a $ (platform name). BAT file. It defines a series of switches, such:

Set bsp_nodisplay =

Or

Set bsp_nodisplay = 1

We can see this definition in platform. bib in Workspace:

If bsp_nodisplay!

S3c2440disp. dll $ (_ flatreleasedir) \ s3c2440disp. dll NK sh

Endif bsp_nodisplay!

Therefore, if we define bsp_nodisplay as 1 in. bat, then s3c2440disp. dll will not be added to NK. Otherwise, you need to add s3c2440disp. dll when generating NK.

How to add the display driver to the compilation list. This depends on the dirs file in wince500 \ platform \ $ (platform name) \ SRC \ drivers. The file lists the subfolders to be compiled. The display driver is in the display folder. Therefore, to add the display driver to the compilation, add the display folder to the dirs file, and remove the display folder.

Let's look at the content in the display folder. We can see that there is a sources file, which contains the following section:

Targetname = s3c2440disp

Targettype = dynlink

A dynamic link library named s3c2440disp will be generated.

You can see that if you want to add or delete the driver in BSP, You need to modify the file as follows:

$ (Platform name). BAT: Add or modify the switch

Dirs: determines whether the driver code is used for compilation.

Platform. bib: If you want to add a new driver, you need to modify it and add the new driver to NK.

2. Several possible errors and solutions when building your own OS

I have encountered this error:

Build: [01: 0000000341: errore] powerbutton. OBJ: Error lnk2019: unresolved external symbol setsystempowerstate referenced in function pwr_ist

Build: [01: 0000000342: errore] powerbutton. OBJ: Error lnk2019: unresolved external symbol getsystempowerstate referenced in function pwr_ist

Build: [01: 0000000343: errore] c: \ wince500 \ platform \ smdk2440a \ target \ armv4i \ debug \ powerbutton. dll: Fatal error nkl1120: 2 unresolved externals

According to the information, we can see that two functions are not found when generating the power button in the driver. I checked the document and the two functions are declared in coredll. Lib. Then I went to view the generated coredll. lib and found that these two functions are indeed not found. After checking the OS components, we found that the power management component was not added.

The following error is obvious:

Build: [01: 0000000445: errore] nmake: u1073: Don't Know How To Make 'C: \ wince500 \ pbworkspaces \ tiny_kernel \ wince500 \ smdk2440a_armv4i \ cesysgen \ SDK \ Lib \ armv4i \ debug \ NDIS. lib'

Build: [01: 0000000447: errore] nmake. exe-I-c buildmsg = stop. linkonly = 1 nopass0 = 1 makedll = 1 failed-Rc = 2

This is because NDIS related components are not added, so when the network-related driver in BSP is compiled, the corresponding lib cannot be found and an error is reported.

3. No stepldr. Bin and eboot. Bin are generated.

Check whether it is in debug mode. If yes, switch to release mode.

4. Error-cannot open input file <...> \ postproc \ nlscfg. inf

Run copy files to release directory under build OS

5. blddemo: there were errors building (projectname), but error is 0

Hook the clean before building and run the sysgen command again.

6. When compiling the BSP content, the following occurs:

Nmake: u1073: Don't Know How To Make 'C: \ wince500 \ public \ common \ SDK \ Lib \ armv4i \ retail \ coredll. Lib'

I checked the log and found that before that

Linking \ wince500 \ platform \ smdk2440a \ SRC \ common \ smartmedia \ dll \ directory.

So we can see that there is a problem in the folder smartmedia \ DLL. Open this folder and open the sources file. You can see that coredll. Lib is defined

$ (_ Commonsdkroot) \ Lib \ $ (_ cpuindpath) \ coredll. Lib

The error message is c: \ wince500 \ public \ common \ SDK \ Lib \ armv4i \ retail \ coredll. Lib.

Note: _ commonsdkroot is equal to C: \ wince500 \ public \ common \ SDK. At this time, _ commonsdkroot should be the same as _ sysgensdkroot.

In wince500 \ public \ common \ oak \ MISC \ sources. Default, as defined below

_ Commonsdkroot = $ (_ commonpubroot) \ SDK

_ Commonoakroot = $ (_ commonpubroot) \ oak

_ Commonddkroot = $ (_ commonpubroot) \ DDK

_ Sysgensdkroot = $ (_ projectroot) \ cesysgen \ SDK

_ Sysgenoakroot = $ (_ projectroot) \ cesysgen \ oak

_ Sysgenddkroot = $ (_ projectroot) \ cesysgen \ DDK

I have also referred to the definition of _ commonpubroot in makefile. Def:

Long, divided into four situations

(1) OS projects during sysgen

(2) OS projects during compile

(3) winceproj Projects

(4) other projects.

When building BSP, it should be the fourth type.

For ease of understanding, I removed logs and comments.

! If "$ (_ in_cesysgen )"! = ""

_ Commonpubroot = $ (_ publicroot) \ common

_ Projroot = $ (_ projectroot) \ cesysgen

! Else if ("$ (wincetree)" = "winceos") | exist ($ (_ publicroot) \ $ (wincetree) \ cesysgen \ makefile)

_ Commonpubroot = $ (_ publicroot) \ common

_ Projroot = $ (_ publicroot) \ $ (winceproj)

! Else if "$ (winceproj )"! = ""

_ Commonpubroot = $ (_ projectroot) \ cesysgen

_ Projroot = $ (_ publicroot) \ $ (winceproj)

! Else

_ Commonpubroot = $ (_ projectroot) \ cesysgen

_ Projroot = $ (_ projectroot)

! Endif

To find out what is going on, I modified makefile. Def and added the message statement to see which branch I ran during build.

After modification, go to the console, go to the smartmedia \ DLL folder, and enter build. After running, open the build. log under the folder and find that it is in the second situation.

It turns out that the exist ($ (_ publicroot) \ $ (wincetree) \ cesysgen \ makefile condition is met.

Among them, _ publicroot is wince500 \ public, while wincetree is in makefile. def is defined as wincetree =$ (_ curslmtree). From the SET command, we can find that _ curslmtree is the project name and my project name is VoIP. Then the entire path becomes

Wince500 \ public \ VoIP \ cesysgen \ makefile. As a result, this path exists and expires.

It seems that it will be complicated to name the project in the future to avoid this conflict. Otherwise, it would be a dead man.

7. Warning: Image exceeds specified memory size by 4012 bytes and may not run.

More kernel components are added, which exceeds the original definition of config. bib. Therefore, modify config. bib to increase the ramimage size. Note that config. bib In workspace is modified instead of that in platform. Previously, I directly modified it in the parameter view of platform builder. the config. bib modified in the result will not be accessed by the project at all.

In addition, it is best to change the romsize to the same size as ramimage, so that NK. nb0 can be loaded with the entire NK, otherwise it will generate NK. nb1 or even more.

However, an error may occur when you download NK. bin because two Macros in eboot must be consistent with config. bib. Rom_ramimage_start and rom_ramimage_size. The two macros must be consistent with the ramimage definition in config. bib.

After this change, it will be able to run normally.

8. directly use dnw to download. nb0 to ram.

Check the download address in the configuration of dnw. corresponding to nb0. in bib, the starting address of ramimage is the same, but ramimage specifies the virtual address, while the download address of dnw is the physical address. You need to find the MMU ing table and convert it to the physical address. The ing table on ce5.0 is in the oemaddrtab_cfg.inc file.

9. Which other components are required to use ActiveSync in addition to sysgen_as_base?

Sysgen_usbfn_serial and sysgen_ppp. Of course, if you want to use the remote debugging tool on EVC, you also need to add the platform manager component.

10. Modify the compilation switch in oal

In log. C, the following definitions are defined:

Uint32 g_oallogmask = oal_log_error | oal_log_warn | oal_log_info;

In oal_log.h

# Define oal_log_error (0)

# Define oal_log_warn (1)

# Define oal_log_func (2)

# Define oal_log_info (3)

Then # define oalzone (N) (g_oallogmask & (1 <n ))

That's strange to me. Why does it not shift or even when g_oallogmask is defined?

I tried to change the definition to uint32 g_oallogmask = oal_log_error | oal_log_warn | oal_log_info | oal_log_io | oal_log_func;

However, trace has not changed. It seems that the modification to g_oallogmask is invalid, so the best way is to call oallogsetzones in the beginning of oeminit to set the zone to be opened.

11. Modified how Microsoft's code is compiled.

Step 1: Enter the command line mode

Step 2: Enter the directory of the file to be compiled, build

Step 3: sysgen Module name

Step 4: makeimg

12. press the reset key of the Development Board and the memory will not lose power. Therefore, if there is a strange situation, it is best to power on again.

 

Note: conversion from

Http://blog.chinaunix.net/u3/104334/showart_2199861.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.