Add lss file for cpp_obj program
[avr_serial_lcd.git] / README
1 AVR SERIAL_LCD C/C++ PROJECT\r
2 Kevin M. Rosenberg <kevin@rosenberg.net>\r
3 AVRFreaks.net member kmr\r
4 =====================================================================\r
5 \r
6 The home for this project is http://www.avrcode/serial_lcd/\r
7 \r
8 This is my version of AVR code to drive the Serial Backpack\r
9 Project created by Carl W. Livingston. I've rewritten the original\r
10 firmware to add a number of features, add compatibility for IAR and\r
11 GCC, and well as create two different C++ version.\r
12 \r
13 This project is also used to demonstrate how C code can be turned\r
14 into C++ classes and to view the resulting differences in assembly\r
15 output.\r
16 \r
17 There are two versions of the C++ code: serial_lcd.cpp (which\r
18 generates output files with the prefix serial_lcd_cpp) and\r
19 serial_lcd_obj.cpp (generates output files with the prefix\r
20 serial_lcd_obj).\r
21 \r
22 The first C++ variant is designed to be "equivalent" to the C code in\r
23 that the same inlining of functions were used. Also, the C++ classes\r
24 were only to segment functions. No C++ class object contents member\r
25 variables. The global variables in the C code remain global in the C++\r
26 code. Primarily, because these variables are stored in CPU and IO\r
27 registers for greater efficiency. Other variables, like the UART\r
28 circular buffer, remain in global memory space so its address is known\r
29 at compile time and spare the address computation required if the\r
30 variable was a member of a C++ object.\r
31 \r
32 The second C++ variant uses classes that contain member variables and\r
33 to which initialization parameters are sent. In this way, multiple\r
34 objects of that class can be created. As an example, for connecting 2\r
35 LCD panels or multiple LED PWM outputs.\r
36 \r
37 The code can be modified and redistributed as governed by the terms of\r
38 the accompaning LICENSE file.\r
39 \r
40 \r
41 Code/Data Sizes (for 20080320 release)\r
42 ======================================\r
43 \r
44 Compiler               Code  Data  Notes\r
45 ---------              ----  ----  -----\r
46 IAR 5.10A C             626    48  Size optimization high (+ 64 bytes stack)\r
47 AVR-GCC 4.2.2 C         720    48  -Os\r
48 IAR 5.10A C++           762    49  Size optimization high (+ 64 bytes stack)\r
49 Codevision 2.02.6       796    48  Maximum size optimization\r
50 AVR-GCC 4.2.2 C++       806    50  -Os\r
51 ImageCraft 7.16 Pro C   806    48  Full optimizations (-O24)\r
52 AVR-GCC 4.2.2 C++ Obj  1574    72  -Os\r
53 IAR 5.10A C++ Obj      1112    65  Size optimization high (+ 63 bytes stack)\r
54 \r
55 I would appreciate submissions of suggestions, improvements, or bug\r
56 fixes.\r