Click here to start

Table of contents

Small Embedded Systems Programming   in C For Electrical Engineers  (and Computer Scientists) Agenda Overview What do we mean by small? C  Details Slide 6 Your Friend the C Preprocessor Preprocessor Vs Functions Preprocessor: Conditional Compilation Preprocessor Ex: Header Files Preprocessor: Useful Macros Preprocessor Ex: PRINT_INT() C  Pointers C Pointers: Definition C Pointers: Dereferencing C Pointers: Referencing C Pointers: Arrays C Pointers: -> operator C Pointers: Pass By Reference C Pointers: Indexing vs Pointers C Pointers: Heavy Indexing C  Keywords C Keywords: static C Keywords: extern C Keywords: const C Keywords: volatile C Keywords: sizeof C Keywords: typedef C Keywords: enum C Interrupts C Bit Masks: Definitions C Bit Masks: The Math C Bit Masks: Defining Ports Architectures: HW & SW Architectures Architectures: Processors Slide 37 Architectures: Banks Architectures: Compilers Slide 40 Architectures: Software Architectures: Interrupts Gotcha! Gotchas Gotchas: Completion Estimates Gotchas: Resources Gotchas: Shifting: << , >> Gotchas: memory Gotchas: Magic Numbers Gotchas: Portability Gotchas: Assign v Compare Gotchas: Macro “side effects: Gotchas: Debugger Gotchas: int Gotchas: Unnecessary Libraries Gotchas: Time Formats Tips and Tricks Tips Tips: Indenting Tips: Divides Tips: Interrupts Tips: Fixed Point Math Tips: Floating Point Tips: Truncation and Overflow Tips: Loops Tips: Moving Average Tips: Debugging Tips: Circular Buffers Tips: Lint Tips: Stack Overflow Debug Slide 71 Tips: Avoid Race Conditions Things You Might See Slide 74 Things you might see Slide 76 Slide 77 Slide 78 Things you might see: Filters Slide 80 Slide 81 Software Libraries Slide 83 Slide 84 Coding Standards Slide 86 Coding Standards: General Coding Standards: Change Log Coding Standards: Comments Coding Standards: Example Coding Standards: Backups Coding Standards: Parsing Coding Standards: Tab v Space Coding Standards: Namespaces Coding Standards: Top Down Slide 96 Coding Standards: Notes on C++ Why (not) C++ C++: Philosophical Changes C++: Other Language Changes OO Organization In plain C C++: Embedded C++ More Information Where to Get More Information Slide 106 Slide 107 Slide 108 Summary Slide 110 Slide 111 Things for other courses