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"
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
- Naxin Micro and Xinxian jointly launched the NS800RT series of real-time control MCUs
- How to learn embedded systems based on ARM platform
- Summary of jffs2_scan_eraseblock issues
- Application of SPCOMM Control in Serial Communication of Delphi7.0
- Using TComm component to realize serial communication in Delphi environment
- Bar chart code for embedded development practices
- Embedded Development Learning (10)
- Embedded Development Learning (8)
- Embedded Development Learning (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Intel promotes AI with multi-dimensional efforts in technology, application, and ecology
- ChinaJoy Qualcomm Snapdragon Theme Pavilion takes you to experience the new changes in digital entertainment in the 5G era
- Infineon's latest generation IGBT technology platform enables precise control of speed and position
- Two test methods for LED lighting life
- Don't Let Lightning Induced Surges Scare You
- Application of brushless motor controller ML4425/4426
- Easy identification of LED power supply quality
- World's first integrated photovoltaic solar system completed in Israel
- Sliding window mean filter for avr microcontroller AD conversion
- What does call mean in the detailed explanation of ABB robot programming instructions?
- STMicroelectronics discloses its 2027-2028 financial model and path to achieve its 2030 goals
- 2024 China Automotive Charging and Battery Swapping Ecosystem Conference held in Taiyuan
- State-owned enterprises team up to invest in solid-state battery giant
- The evolution of electronic and electrical architecture is accelerating
- The first! National Automotive Chip Quality Inspection Center established
- BYD releases self-developed automotive chip using 4nm process, with a running score of up to 1.15 million
- GEODNET launches GEO-PULSE, a car GPS navigation device
- Should Chinese car companies develop their own high-computing chips?
- Infineon and Siemens combine embedded automotive software platform with microcontrollers to provide the necessary functions for next-generation SDVs
- Continental launches invisible biometric sensor display to monitor passengers' vital signs
- 2021 ST Industrial Summit Tour starts to reserve seats: "Motor Drive, Power Supply, Industrial Automation" + "New Products, Courses, Training"
- IBM chip reaches 500GHz speed, will enable high-speed wireless networks
- [Topmicro Intelligent Display Module Review] 5. Development Board NUCLEO-F746ZG Communication with Intelligent Display Module
- TI MCU has launched a new product! August live broadcast reveals new features video replay summary!
- How to safely measure high voltage with a LOTO oscilloscope?
- Please restore the number of invitees to 8. Thank you. Thank you. I invited 8 people before, but there are already 6 people in the list.
- SensorTile.Box Expert Mode Gyroscope Sensor
- Why is the single-ended impedance on the PCB controlled to 50 ohms?
- Experts talk about IPC7351
- CC1101 Study Notes - Preliminary Understanding