Embedded C
文章平均质量分 83
qq_20848757
渣科的热干面还是1块5吗
展开
-
C语言pointer 和 structure 常用项目级别知识
structure 本质是一系列variable的合集,因此在有 a set of related variable definition 的时候,就应该使用structure。structure 作为函数输入时应该传递其指针而不是本身,原因有两点。原创 2023-03-16 01:53:47 · 316 阅读 · 0 评论 -
C 编译过程简介
C build = preprocessing + compile + link (from .c/.h file to executable file)Compiling and Linking - Cprogramming.compreprocessing: process the #include and #define Macro etccompilation: Compilers convert the source code(.c and .h file) in...原创 2022-03-03 14:02:18 · 203 阅读 · 0 评论 -
嵌入式系统面试2:面试问题实例汇总
Aptiv:difference between process thread and task in rtosMutex vs Semaphore Const volatile in embedded c what is memory leakage, how to avoid it? :how does SP works? what is status register in micro what happens in sta...原创 2021-01-16 11:40:36 · 431 阅读 · 0 评论 -
嵌入式系统面试1:interrupt
Hardware/Software interrupt edge triggering/ level triggeringHardware: triggered by peripheral devices outside the microcontroller,asynchronous and can occur in the middle of instruction execution, 我们谈论的基本都是硬件中断Software: executing a speci...原创 2021-01-16 10:10:54 · 374 阅读 · 0 评论 -
嵌入式面试大纲:C语言+嵌入式系统+AUTOSAR
C Programming https://www.tutorialspoint.com/cprogramming/index.htmpointer: dangling, voild, Null, wild pointerhttps://aticleworld.com/dangling-void-null-wild-pointers/ array // p[i] 的本质是 *(p+i) structure & union, bit field, data alig...原创 2021-01-16 04:50:10 · 1298 阅读 · 0 评论 -
C语言面试3: structure & union, bit field, data aligment
Struct:/*************************************/typedef struct{float price;int ProductId;char name[24];} Laptop;LaptopLaptop1, *Laptop2;/*************************************/Struct memberLaptop1. ProductIdpointer to a ...原创 2021-01-22 15:06:50 · 332 阅读 · 0 评论 -
C语言面试5:const volatile, static, extern, register, typedef, #define, enum, big/little endia
Const, #define:#define PI 3.14 : the preprocessor replaces those macros before the compiler even sees it. const means it will be saved in read-only flash. C code cannot change it ( cannot change even use pointer because it's in read-only memory)...原创 2021-01-28 12:07:17 · 228 阅读 · 0 评论 -
C语言面试1:pointer
知识点:pointer arithmeticchar *p; p+1 地址加1,因为char 是1个byteint *p; p+1地址加4,因为p是4个bytearray of pointerint p; integerint p[2]; arrayint *p[2]; array of pointer p[i] = &a[i]; 指针数组里面每个元素都是存的地址pass pointer to f...原创 2021-01-15 12:41:56 · 192 阅读 · 0 评论 -
32bit MCU 与 16bit MCU 的 区别
以 32-bit 英飞凌 TC377 为例右下图可见,虽然是32-bit MCU,但是每个地址对应的是一个byte【8-bit】左上图是通过 Trace32 查看单片机memory, 可见,32个bit 为一组。结论:不管是16-bit 还是 32-bit 的MCU,地址对应的最小单元都是1个byte,它们的区别在于一次访问的最大内存是 32bit 还是 16bit[数据总线是32-bit,寄存器的大小也是32-bit]...原创 2020-10-13 05:00:21 · 2380 阅读 · 0 评论