> Understanding how code works is the key to avoid “critical” bugs in code. Bad software can cause bad customer experience , worst case it can kill someone. See here how a simple overflow ended up killing people https://hackaday.com/2015/10/26/killed-by-a-machine-the-therac-25/
>
# C - Programming
### Fundamentals
1. https://www.learn-c.org/
2. https://embeddedartistry.com/blog/2019/04/08/a-general-overview-of-what-happens-before-main/
3. For slow-paced learning, tutorials from Barry Brown can help. ( Boring for advanced programmers but maybe a good refresher ) : https://www.youtube.com/user/profbbrown
### Pointers:
https://pdos.csail.mit.edu/6.828/2014/readings/pointers.pdf
> Fun question. What is the difference between char tmp[] = "hello" and char *tmp = "hello";
### Optimizations (General)
https://hps.vi4io.org/_media/teaching/wintersemester_2013_2014/epc-1314-fasselt-c-keywords-report.pdf
> Fun question . Compare the Time and Space complexity of and inline function vs non-inline function ? Where to and not to use inline ?
### Makefiles
https://www.youtube.com/watch?v=FfG-QqRK4cY&t=889s
> Fun question : Which is the difference between Deferred expansion and Simple expansion ? Why do we need it ?
### Compiler Theory
https://www.tutorialspoint.com/compiler_design/compiler_design_overview.htm
No need to understand the entire process but understanding how the front-end and back-end behaves is important :)
> Fun question : Why is the difference between compile time and run time configurations ?
### Memory Segments :
https://mirzafahad.github.io/2021-05-08-text-data-bss/
https://mcuoneclipse.com/2013/04/14/text-data-and-bss-code-and-data-size-explained/
> Fun question. For a microcontroller , say stm32l4xx, where would these segments be located in the memory map ?
### Peripherals: More aligned towards Microcontrollers than Generic C
#### Interrupts
https://www.youtube.com/watch?v=FYOi9QQn5XY&t=2s
> Fun question. What do we need NVIC peripheral ? Why not allow the CPU to handle the interrupts directly ?
#### DMA
https://www.youtube.com/watch?v=CVgKAxrdoig
> Fun question : Why do we need DMA ? Can’t we use Programmed I/O ?
### SPI
https://www.youtube.com/watch?v=dNcaNYOuZBE
> Fun question : What if I short the MISO and MOSI lines ?
### Additional Learning for debugging the internals
#### Linker Scripts
https://interrupt.memfault.com/blog/how-to-write-linker-scripts-for-firmware
https://www.youtube.com/watch?v=B7oKdUvRhQQ
#### Map files
https://www.youtube.com/watch?v=XRXLUcbJIxY
#### Debugging ( Using VSCode and GDB)
https://www.youtube.com/watch?v=g2Kf6RbdrIs
Books :
[Paperback] [Debugging: The 9 Indispensable Rules for Finding Even the Most Elusive Software and Hardware Problems](https://www.amazon.com/Debugging-Indispensable-Software-Hardware-Problems/dp/0814474578)
# Other important Reads
## Operating Systems
[RTOS Playlist](https://www.youtube.com/playlist?list=PLC8H7gcKF_bSt4vGkUq6mwlPbf2fwnqy6)