2012年4月18日

摘要: __iar_data_init2在bootloader的main之前被调用#if __VER__ < 5020000 ;Pre-5.20 table format, fully replaced bl segment_init ; intialize the C environment - in bsp.c#else ;5.20+ table format, can only be reasonbly replaced on table function's level ;See ARM\crc\lib\init\data... 阅读全文
posted @ 2012-04-18 17:56 Feilian 阅读(726) 评论(0) 推荐(0) 编辑

2012年1月30日

摘要: 构造Free Queue List时pq2指向未知内存OSQ OSQTbl[OS_MAX_QS];void OS_QInit(void){ ...... OSQ *pq1; OSQ *pq2; pq1 = &OSQTbl[0]; pq2 = &OSQTbl[1]; for (i = 0; i < (OS_MAX_QS - 1); i++) { pq1->OSQPtr = pq2; pq1++; pq2++; // pq2 will point to unknown memory }}Comments ... 阅读全文
posted @ 2012-01-30 12:06 Feilian 阅读(159) 评论(0) 推荐(0) 编辑

2011年12月26日

摘要: 不常见的C数组初始化方法。1 static int collection[] =2 {3 [5] = 100,4 [1] = 505 };C99新特性之一Designated initializer. 允许不按照下标顺序初始化数组。数组大小值可选写法 1- 不指定数组大小,数组大小为最大下标+1static int collection[] =写法 2- 指定数组大小,不少于最大下标+11 static int collection[6] =2 {3 [5] = 1004 };编译器支持gcc 支持。C89模式的gcc通过GNU extension支持g++ 不支持VC... 阅读全文
posted @ 2011-12-26 15:09 Feilian 阅读(120) 评论(0) 推荐(0) 编辑

导航