Firmware/Embedded面试复习

This training course schedule can be used a reference for interview review!

http://www.ac6-training.com/cours.php/cat_FSCA/ref_RT3/print_true.xphp

 

https://docs.google.com/document/pub?id=1a9WmPuE3F_WfnJAPHceVIoihJSK1t5_wtxM0QjSomwc

 

1. write C to generate segmentation fault and Stack overflow.

Ans: http://web.mit.edu/10.001/Web/Tips/tips_on_segmentation.html, http://embeddedgurus.com/stack-overflow/2007/06/understanding-stack-overflow/,  http://www.devx.com/tips/Tip/14276

2. give example to use function pointer

Ans: K&R-qsort; or in <a modern approach>: function pointer mostly used as an argument for a method, or it can be an element in a struct, say in uCos to realize OOP in C.

or, In concurrency in OS three easy pieces: http://pages.cs.wisc.edu/~remzi/OSTEP/threads-api.pdf

3. which to use in simple embedded systems: arrays or dynamic memory using malloc and why?

Ans: http://thesynchronousblog.wordpress.com/2013/05/20/dynamic-memory-management-in-embedded-systems  , http://en.wikibooks.org/wiki/C_Programming/Memory_management, http://stackoverflow.com/questions/1725923/how-bad-is-it-to-use-dynamic-datastuctures-on-an-embedded-system 

4. when to use volatile

Ans: http://www.barrgroup.com/Embedded-Systems/How-To/C-Volatile-Keyword, or CMPE 244 preet notes

5. How to use Static/Exten, where do they locate, what's problem of a static large array?

Ans: CMPE 244 note, http://stackoverflow.com/questions/13415321/difference-between-static-auto-global-and-local-variable-in-the-context-of-c-a

6. What is different of preemptive and cooperative RTOS?

Ans: http://electronics.stackexchange.com/questions/78439/what-are-the-benefits-of-a-non-preemptive-os-and-the-price-for-these-benefits

7. Why not use RTOS?

Ans: http://www.barrgroup.com/Embedded-Systems/How-To/Preemption-Perils, Get by without RTOS

As mentioned in the 2nd paper, it mentioned: for Time-critical aspect, RTOS is negatively affect due to ISR latency, context switch...

8. Compare macro and function.  

Ans: http://stackoverflow.com/questions/9104568/macro-vs-function-in-c

9. When to use inline function?

Ans: http://www.gotw.ca/gotw/033.htm, http://stackoverflow.com/questions/132738/why-should-i-ever-use-inline-code

10.  difference between malloc and calloc

Ans: http://stackoverflow.com/questions/1538420/difference-between-malloc-and-calloc

11. difference between malloc and new

Ans: http://stackoverflow.com/questions/184537/in-what-cases-do-i-use-malloc-vs-new, http://www.geeksforgeeks.org/malloc-vs-new/

12. How do you pass variable number of arguments in “C” and why this is a generally bad idea?

Ans: http://www.cprogramming.com/tutorial/lesson17.html

13. Diff between struct and union

Ans: http://stackoverflow.com/questions/346536/difference-between-a-structure-and-a-union-in-c

14. Diff between func(void) and func()

Ans: http://stackoverflow.com/questions/1163879/in-c-funcvoid-vs-func

15. Memory errors: memory leak, OutofMemory, ...

Ans: http://www.cprogramming.com/tutorial/memory_debugging_parallel_inspector.html

16. try/catch in C++

Ans: http://www.cplusplus.com/doc/tutorial/exceptions/

17. Data structures, focus on linked lists, dynamic arrays, trees and graphs. 

Ans: CC150. Hawstein.

18. Remove spaces in a string in C

Ans: http://stackoverflow.com/questions/13084236/function-to-remove-spaces-from-string-char-array-in-c

19. Why cannot use malloc in RTOS?   malloc = BAD! (ARM M3 or MSP430 or 18F4550 have NO MMU, so don't support Virtual Memory)

Ans: http://www.rockbox.org/wiki/WhyNoMalloc, http://www.freertos.org/a00111.html, http://www.embedded.com/design/programming-languages-and-tools/4416457/EMB-tm-6-15-13-Dynamic-memory-and-heap-contiguity

20. Write a C program to find big or little endian:

Ans: http://www.geeksforgeeks.org/little-and-big-endian-mystery/

21. When to use virtual deconstructor?

Ans: when use polymorphism, such as factory DP: http://www.programmerinterview.com/index.php/c-cplusplus/virtual-destructors/

 

============//===========================

From Qualcomm interview:

1. How to find the size of one var type without using sizeof()?

Ans: use offsetof() which: size_t size = (size_t)(1 + ((X*)0));

2. Design Circular buffer without STL.

http://www.embedded.com/electronics-blogs/embedded-round-table/4419407/3/The-ring-buffer, http://kamyarns.wordpress.com/2013/05/02/implement-circular-queue-in-cpp/

3. Write C code for convolution. In Baidu, use cuda.

 

4. what is priority inversion and how it is solved?

http://www.drdobbs.com/jvm/what-is-priority-inversion-and-how-do-yo/230600008, or http://www.embedded.com/electronics-blogs/beginner-s-corner/4023947/Introduction-to-Priority-Inversion

5. phone interview operating systems- priority inversion, ISR & interrupt vector table, order of complexity of sorting algorithms

 

6. "Difference between const char * and char const *"

http://www.glassdoor.com/Interview/Difference-between-const-char-and-char-const-QTN_233063.htm

转载于:https://www.cnblogs.com/gpuasic/p/3811305.html

  • 0
    点赞
  • 0
    评论
  • 0
    收藏
  • 一键三连
    一键三连
  • 扫一扫,分享海报

Embedded Firmware Solutions: Development Best Practices for the Internet of Things is the perfect introduction and daily-use field guide--for the thousands of firmware designers, hardware engineers, architects, managers, and developers--to Intel’s new firmware direction (including Quark coverage), showing how to integrate Intel&reg; Architecture designs into their plans. Featuring hands-on examples and exercises using Open Source codebases, like Coreboot and EFI Development Kit (tianocore) and Chromebook, this is the first book that combines a timely and thorough overview of firmware solutions for the rapidly evolving embedded ecosystem with in-depth coverage of requirements and optimization. What you’ll learn Understand the key differences between PC and embedded ecosystems in terms of firmware needs. Thorough underpinning of Intel’s firmware solutions. How to build a firmware stack for Quark. How to integrate FSP with a bootloader, by studying the hands-on example of Coreboot and UEFI. How to make a smart "build-it or buy-it" decision when starting a new embedded project. Who this book is for Firmware designers and engineers, hardware engineers, software architects, and product development managers. Table of Contents Chapter 1: Introduction Chapter 2: Firmware Stacks for Embedded Chapter 3: Intel&reg; Firmware Support Package (Intel FSP) Chapter 4: Building Coreboot with Intel FSP Chapter 5: Chromebook Firmware Internals Chapter 6: Intel FSP and UEFI Integration Chapter 7: Building Firmware for Quark Processors Chapter 8: Putting it all together Appendix A: Sample of Boot Setting File (BSF)
表情包
插入表情
评论将由博主筛选后显示,对所有人可见 | 还能输入1000个字符
©️2021 CSDN 皮肤主题: 编程工作室 设计师:CSDN官方博客 返回首页
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值