doc update

partial-rewrite
Ben Blazak 2013-06-05 21:21:07 -07:00
parent e5c3490dd6
commit 3959e83f38
3 changed files with 44 additions and 1 deletions

View File

@ -174,6 +174,29 @@
(http://gcc.gnu.org/onlinedocs/gcc/Variable-Attributes.html)
How to byte align variables in GCC (among other things...)
* Be careful with bitfields in C!
Apparently, they don't always do what you'd expect. So if you're dealing
with interrupts, or care how bits are layed out in hardware - or really if
you care about anything besides telling the compiler that it's okay with you
if it spends a little more time bitshifting in order to save some space -
then you should be very careful about using them.
* [GCC docs : Implementation : Structures, unions, enumerations, and
bit-fields]
(http://gcc.gnu.org/onlinedocs/gcc/Structures-unions-enumerations-and-bit_002dfields-implementation.html#Structures-unions-enumerations-and-bit_002dfields-implementation)
Lots of things are "Determined by ABI" (the Application Binary
Interface).
* [GCC wiki : ABI for the AVR]
(http://gcc.gnu.org/wiki/avr-gcc)
Bitfields aren't mentioned :/ .
* [Betrayed by a bitfield]
(http://lwn.net/Articles/478657/)
Bitfields don't always do what you'd expect... even if you're an awesome
kernel developer.
### C++ Stuff
* [Google C++ Style Guide]
@ -254,6 +277,11 @@
Apparently, treating `char` as signed is more common than treating it as
unsigned. It can be changed to unsigned, by default, with a compiler option.
* [EmbeddedGurus: Experts on Embedded Software]
(http://embeddedgurus.com)
Seems like a good resource, with lots of general tips on embedded
programming.
## Protocol Stuff

View File

@ -6,6 +6,9 @@
/** description
* `main()`: tying it all together
*
* If you're just trying to get a feel for the source, I'd glance over this
* file, then move on to ".../firmware/keyboard.h"
*/

View File

@ -1,5 +1,17 @@
## [TODO] Dependencies
<!-- TODO: everything ... -->
## TODO
- include versions for all build environment programs
- generate documentation
- include a collection of all "namespace" prefixes, and where they belong
- write a note in "main.c" about where that file is (and about other
documentation that would help in understanding the code)
- write a note about where options are described, how they're included, how
i have makefiles set up, etc.
- write a mediumly thorough note about my workflow (vim, ...)
## Dependencies
- the gnu avr toolchain
- python 3
- markdown `sudo pip install markdown`