Author: wogoyixikexie @ gliet
Previously, I heard from my friends about porting drivers under PB to BSP, and even the file system to BSP. -- Haha, It's very advanced. Now I will take the SD card of 2410 as an example.
Previously I did not know that the SD card driver would be in the Pb installation file. Let's take a look at the following three posts-2410 large-capacity SD card research.
Http://topic.csdn.net/u/20080911/16/111a849c-fd1f-4955-840d-6ddfba8ee1fa.html
Http://topic.csdn.net/u/20080916/16/00d9a2be-e4f8-4bea-b892-f25e20ac4c83.html
Http://topic.csdn.net/u/20081021/10/52df6b8b-c69b-4e7b-a278-0816e133f881.html
Http://topic.csdn.net/u/20081104/13/5024b712-07f4-4b33-a015-f2d5baafa027.html
---- To be continued ..................
++, Continue ....................................... .....................
I have read the sources file in C:/wince500/public/common/oak/CSP/ARM/Samsung/S3C2410X/sdhc.
A strange problem was found, that is, it did not appearReleasetype
- ! If 0
- Copyright (c) Microsoft Corporation. All rights reserved.
- ! Endif
- ! If 0
- Use of this source code is subject to the terms of the Microsoft end-user
- License Agreement (EULA) under which you licensed this software product.
- If you did not accept the terms of the EULA, you are not authorized to use
- This source code. For a copy of the EULA, please see the license. rtf on your
- Install media.
- ! Endif
- Synchronize_drain = 1
- Targetdefname = sdhc_sc2410
- Deffile = $ (targetdefname). Def
- Targetname = $ (targetdefname) _ lib
- Targettype = library
- Wincetargetfile0 = $ (_ commonoakroot)/lib/$ (_ cpuindpath)/$ (deffile)
- Preprocessdeffile = 1
- Sourcelibs = $ (_ commonoakroot)/lib/$ (_ cpuindpath)/sc2410_sdhcbase.lib
- Using DES = ../sdhcbase;.../../INC
- Sources = sdiocontroller. CPP/
Releasetype:
Releasetype: This macro sets two environment variables: releasedir and releaselibdir, which are the paths for storing the generated files after compilation. The specific values are as follows:
PlatformThe generated file is in platform/<BSP Name>/<target>
LocalThe generated file is in the current path.
CustomThe generated file is located at the specified location in targetpath.
ManagedThe generated file is in % _ projectroot %/oak/<target>/managed
Oak, SDK, DDKThe generated file is in % _ projectroot %/oak/<target>
------ No, so where is the generated lib stored?
The amazing thing is that I found the Lib generated by C:/wince500/public/common/oak/lib/armv4i/retail.
-- Where exactly is it specified that the generated lib will be placed in the above path?
In addition, Microsoft's code is strange, that is, they all specify to generate Lib in sources, but at last they unknowingly generate DLL. How can this be implemented?
Even the PXA Series
- ! If 0
- Copyright (c) Microsoft Corporation. All rights reserved.
- ! Endif
- ! If 0
- Use of this source code is subject to the terms of the Microsoft end-user
- License Agreement (EULA) under which you licensed this software product.
- If you did not accept the terms of the EULA, you are not authorized to use
- This source code. For a copy of the EULA, please see the license. rtf on your
- Install media.
- ! Endif
- Targetname = pxa27x_sdhc
- Targettype = library
- Using DES = ../INC; ../xllp/INC
- Sources = Main. c/
- Sdcontrol. c
There is no releasetype shown above ?!!!!!!!!!!!!!!!!!!!!
--------------------------------------------
But the strange thing is that some drivers specify
C:/wince500/public/common/oak/CSP/ARM/Samsung/S3C2410X/serial/sources (13): releasetype = oak
------------------------
! If 0
Copyright (c) Microsoft Corporation. All rights reserved.
! Endif
! If 0
Use of this source code is subject to the terms of the Microsoft end-user
License Agreement (EULA) under which you licensed this software product.
If you did not accept the terms of the EULA, you are not authorized to use
This source code. For a copy of the EULA, please see the license. rtf on your
Install media.
! Endif
Targetname = s3c2410x_serial
Releasetype = oak
Targettype = library
Supported des = ../INC
Cdefines = $ (cdefines)-duse_new_serial_model
Sources = pdds3c2410_ser.cpp
++ ++
How can this happen? At what stage does Microsoft Convert this lib into a DLL?
In addition, what is the case if no releasetype exists above? I have to make it happen !!!!!!!!!!!!!
-- Done.
Summary: directly copy the entire driver folder to BSP, modify files such as sources, and set releasetype to platform to indicate that the driver is BSP, And the generated dll will be copied to the specified region, by the way, change the generated lib to the generated DLL file name, and change the generated DLL file name to prevent conflicts with Microsoft (some people say it will overwrite Microsoft, which is not confirmed, maybe we should do an experiment .) Then, modify the reg and bib files according to the preceding settings.
Reprinted please indicate: The author wogoyixikexie @ gliet. Guilin University of Electronic Science and Technology Department 1 Association of Science and Technology, original address: Workshop.