The meaning and function of symbols such as #; @REM! in WINCE6.0

Publisher:SecretWhisperLatest update time:2024-09-30 Source: cnblogsKeywords:symbol  WINCE6 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

In fact, I have already introduced the meaning of some of the symbols in my blog a long time ago. For details, you can refer to my second blog "What do some symbols in .bat configuration files mean?" It's just that I didn't learn it very well at that time. Today, my junior sister asked for advice, so I compiled a blog to facilitate the study of later students.


In fact, these files are all batch files. For specific instructions, please refer to the Windows shell programming instructions.


The symbols in the article title are not the common punctuation marks we often see, and don't think they mean anything in C language. As the saying goes, don't blame the person, the same symbol has different meanings in different environments. The symbols mentioned above are generally found in the following important files: platform.bib, SMDK6410.bat, platform.reg, source, etc. Of course, there are also in .CPP files, but I believe everyone knows the #; in it, so I won't go into details here.


First open platform.reg, here we take SMDK6410.bat as an example:



;------------ I2C Bus Driver ---------------------------------- ---------------

IF BSP_NOI2C !

;; I2C Bus Driver

[HKEY_LOCAL_MACHINEDriversBuiltInIIC]

"Prefix"="IIC"

"Dll"="s3c6410_iic.dll"

"Order"=dword:5

"Index"=dword:0

"Mode"=dword:1 ; Mode: 0 = POLLING, 1 = INTERRUPT

"SlaveAddress"=dword:0 ; Bus Driver's Slave Address

"FriendlyName"="IIC Bus Driver"

"IClass"="{A32942B7-920C-486b-B0E6-92A702A99B35}" ; Power-manageable generic

ENDIF BSP_NOI2C !

;------------------------------------------------- --------------------------


The first line is self-explanatory, and ; indicates a comment. Let's focus on IF BSP_NOI2C ! and ENDIF BSP_NOI2C !. From the literal meaning, it can be understood according to IF ENDIF. I believe it is not difficult. But what is the function of ! here? Let's keep it a secret and continue reading. Let's take I2C as an example. Open platform.bib and you will find the following content:



;------------------ I2C BUS Driver ---------------------------- --------------------------

IF BSP_NOI2C !

s3c6410_iic.dll $(_FLATRELEASEDIR)s3c6410_iic.dll NK SHK

ENDIF BSP_NOI2C !

;------------------------------------------------- -----------------------------------------------

You can see that there are still IF BSP_NOI2C! and ENDIF BSP_NOI2C!, which is consistent with the above. Let's continue reading, still taking I2C as an example, open SMDK641.bat, and you can see the following content:


set BSP_NOI2C=

set BSP_NOSPI=1

@REM wifi can be abled when spi is diabled

set BSP_NOWIFI=1

I believe you have already got some clues here. The BSP_NOI2C! in the IF BSP_NOI2C! mentioned above refers to whether the variable is defined in SMDK6410.bat. Here, set BSP_NOI2C= defines the I2C environment variable. Then the registry and .bib can be judged by IF, ELSE, and then the content between IF and ELSE is executed. If it is equal to 1, such as: set BSP_NOWIFI=1, it means that the WIFI environment variable is not set. Therefore, even if it is defined between IF and ELSE, such as:



IF BSP_NOWIFI !

s3c6410_wifi.dll $(_FLATRELEASEDIR)s3c6410_wifi.dll NK SHK

ENDIF BSP_NOWIFI !

Then the contents between IF and ELSE will not be executed. You can think of the exclamation mark here as a leading set. Of course, you can also add environment variables here under PB6.0, which will not be explained here. Careful people may also find @REM wifi can be abled when spi is diabled. How to read the @ here? It should be combined with @REM to indicate a comment. As for #, let's take the SOURCE file under CAMERA as an example:



!IF "$(BSP_SMDK6410)" == "1"

# $(_TARGETPLATROOT)lib$(_CPUINDPATH)S5K4BA_MODULE.lib

$(_TARGETPLATROOT)lib$(_CPUINDPATH)OV9650_MODULE.lib

# $(_TARGETPLATROOT)lib$(_CPUINDPATH)SAA7113_MODULE.lib

!ENDIF

The Samsung 6410 I use has SAA7113 and OV9650, how do I choose? One is to look at your link library under SOURCE, then comment out the unnecessary ones, the # here is the meaning of the comment.


Finally, let's review the batch file with an example:


for example

set BSP_DEBUGPORT=SERIAL_UART0

set is used to set an environment variable BSP_DEBUGPORT, which represents SERIAL_UART0. In terms of meaning, it seems that the BSP debug port is serial port 0. The specific details depend on the specific implementation code.

@REM is similar to #, which means commenting out a line

$() refers to the environment variables in the brackets

for example:

set _TARGETPLATROOT="c:wince5.0platform"

set --CPUINDPATH=ARMlib

$(_TARGETPLATROOT)lib$(_CPUINDPATH)OV9650_MODULE.lib

In fact, this path is equivalent to

"c:wince5.0platformlibarmlibv9650_module.lib"


Keywords:symbol  WINCE6 Reference address:The meaning and function of symbols such as #; @REM! in WINCE6.0

Previous article:ARM AVI video playback based on 2440 freambuffer drawing
Next article:Design of smart home based on Linux(3)

Recommended ReadingLatest update time:2024-11-23 11:10

Some problems encountered during the construction of WINCE6.0+S3C2451 environment
When I first joined the new company and built the WINCE6.0+S3C2451 development environment, I encountered some weird problems, which delayed me for some time. I wrote them down here, hoping that everyone will take the same detour: 1. When modifying the following content of the s3c2451.bat file, I accidental
[Microcontroller]
Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号