[问题]
[解答]
[问题] __IS_LOW512 如何理解呢?
typedef u32 phys_addr_t;
#define __IS_LOW512(addr) (! ( (phys_addr_t)(addr) & (phys_addr_t) ~0x1fffffffULL) )
[解答] low 512M space, check if addr is in th range of [0, 0x20000000)
[问题] error: 'static' is not at beginning of declaration [-Werror=old-style-declaration]
[问题] warning: multi-line comment In file
[解答] http://blog.sina.com.cn/s/blog_637deacd0106dfns.html
[问题] Fix for dereferencing type-punned pointer will break strict-aliasing
[解答] 参考: http://stackoverflow.com/questions/8824622/fix-for-dereferencing-type-punned-pointer-will-break-strict-aliasing
1 宏变量MONITOR51在哪里定义的?
2 char code reserve [3] _at_ 0x23;该语句中关键词code和_at_分别是什么意思?
3 P1 ^= 0x01; 语句的含义?
^是位运算,异或, 反复执行此语句的目的实现P1端口的第1引脚的不断反转.
加入P1 == 0xFF;
P1 ^= 0x01; 此时P1为0xFE
P1 ^= 0x01;此时P1为0xFF
4 sfr P0 = 0x80;关键词sfr的意思?
在keil中,sfr与sfr16用于定义8051的特殊功能寄存器,其中sfr用来定义8为特殊功能寄存器,sfr16用来定义16位特殊功能寄存器。
sfr P0=0x80; //定义P0的I/O端口,其地址为80H。
5 sbit TF1 = 0x8F;是不是位带操作?关键词sbit的意思?
6 reg51.h和reg52.h的差别是啥子?
均有BYTE的寄存器定义, reg52.h文件中添加了8052 Extensions的寄存器或者比特位的定义
7 #include<reg52.h>和 #include <reg52.h>之间, 一个有空格, 一个没空格, 都没区别啊, 这是怎么回事?
8 二极管串联个电阻分压降流, 电阻的位置放在二极管哪侧更好呢?
9 __CC_ARM __ICCARM__ __TASKING__差别
compiler symbol | Compiler Name | __ASM | __INLINE |
__CC_ARM | ARM Compiler | __asm | __inline |
__ICCARM__ | IAR Compiler | __asm | inline |
__GNUC__ | GNU Compiler | __asm | inline |
__TASKING__ | TASKING Compiler | __asm | inline |
注意:TASKING对应Altium Designer里边带的编译器
10 KEIL、uVision、RealView、MDK、KEIL C51,它们到底有什么区别,又有什么联系?
KEIL是公司的名称
uVision是KEIL公司开发的一个集成开发环境(IDE)
RealView是一系列开发工具集合的称呼,简称RV,包括有RVD(RealView Debugger),RVI(RealView ICE),RVT(RealView Trace),RVDS(RealView Development Suite),RV MDK(RealView Microcontroller Development Kit)这些产品。
MDK(Microcontroller Development Kit),即KEIL MDK、RealView MDK或者KEIL For ARM,ARM公司现在统一使用MDK-ARM的称呼