chip size

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
ulao
Rank 4
Rank 4
Posts: 481
Joined: Mon Aug 25, 2008 8:45 pm

chip size

Post by ulao » Tue Jun 30, 2009 2:02 pm

Can the usb frimware be cut down to save any flash size? I'm not even sure if it takes much up, but I need to look in to getting more room. I'm on the atmega168 now and may need to go to the mega328. Hate to think that is 1/2 the effort it took to go from the 8 to 168...

Also, has anyone used the mega328 with v-usb ?

christian
Objective Development
Objective Development
Posts: 1443
Joined: Thu Nov 09, 2006 11:46 am

Re: chip size

Post by christian » Fri Jul 10, 2009 6:07 pm

Here are the code sizes of the driver for various options when you use gcc 3:

Code: Select all

                              Variation Flash   RAM    +F  +RAM
                    Minimum_with_16_MHz  1152    45    +0    +0
                    Minimum_with_12_MHz  1202    45   +50    +0
                  Minimum_with_12_8_MHz  1522    45  +370    +0
                    Minimum_with_15_MHz  1258    45  +106    +0
                  Minimum_with_16_5_MHz  1274    45  +122    +0
                Minimum_with_18_MHz+CRC  2268    45 +1116    +0
                    Minimum_with_20_MHz  1134    45   -18    +0
                  With_usbFunctionWrite  1212    45   +60    +0
                   With_usbFunctionRead  1190    45   +38    +0
         With_usbFunctionRead_and_Write  1232    45   +80    +0
               With_usbFunctionWriteOut  1176    45   +24    +0
           With_Interrupt_In_Endpoint_1  1278    57  +126   +12
  With_Interrupt_In_Endpoint_1_and_Halt  1368    57  +216   +12
     With_Interrupt_In_Endpoint_1_and_3  1344    69  +192   +24
                With_Dynamic_Descriptor  1180    45   +28    +0
                    With_Long_Transfers  1198    47   +46    +2


And here are the same sizes for gcc 4:

Code: Select all

                              Variation Flash   RAM    +F  +RAM
                    Minimum_with_16_MHz  1224    45    +0    +0
                    Minimum_with_12_MHz  1274    45   +50    +0
                  Minimum_with_12_8_MHz  1594    45  +370    +0
                    Minimum_with_15_MHz  1330    45  +106    +0
                  Minimum_with_16_5_MHz  1346    45  +122    +0
                Minimum_with_18_MHz+CRC  2298    45 +1074    +0
                    Minimum_with_20_MHz  1206    45   -18    +0
                  With_usbFunctionWrite  1284    45   +60    +0
                   With_usbFunctionRead  1280    45   +56    +0
         With_usbFunctionRead_and_Write  1318    45   +94    +0
               With_usbFunctionWriteOut  1246    45   +22    +0
           With_Interrupt_In_Endpoint_1  1358    57  +134   +12
  With_Interrupt_In_Endpoint_1_and_Halt  1448    57  +224   +12
     With_Interrupt_In_Endpoint_1_and_3  1466    69  +242   +24
                With_Dynamic_Descriptor  1250    45   +26    +0
                    With_Long_Transfers  1302    47   +78    +2


All this is for version 20090415 of v-usb.

This info should be in the "tests" subdirectory of the v-usb package.

Post Reply