cancel
Showing results for 
Search instead for 
Did you mean: 

Code size for USB host Boot-loader

Page.Gavin
Associate
Posted on August 07, 2013 at 12:23

I am about to write a boot-loader for an STM32F205 and I have been looking at the MSC example. When compiled this is 26kbytes in size. Does anyone know if this is typical or if there is any way of reducing this to get a boot-loader in Sector 0 of the device. I have looked for code size information but have not managed to find anything.

I have check the FATFS file system attached and can reduce the code size by reducing it's functionality to read-only and reducing the instruction set.

#usb-code-size
2 REPLIES 2
Posted on August 07, 2013 at 17:23

I'd guess you could start by looking at the relative utilization by assorted components in the .MAP file

I'm not sure what exactly you're building, I took a brief look at :

STM32_USB-Host-Device_Lib_V2.1.0\Project\USB_Host_Examples\MSC\MDK-ARM\STM324xG-EVAL

Which, unmodified has a 35KB foot print. 10KB might be attributable to the LCD support.

I've built other SDIO + FatFs loaders that come under 16KB, not sure this is doable here with USB
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Page.Gavin
Associate
Posted on August 08, 2013 at 09:48

I am building a bootloader using the HS USB port of the STM32F205 device to update the application software. I had hoped to locate it in setor 0 of the device. Has anyone managed to uses the ST libraries to accomplish this and if so whatwas the size of the USB conponent of the software. I had a look at the map file after I had stripped the excess example code and found that it was already nearly 14KB in size.

 Code (inc. data)   RO Data    RW Data    ZI Data      Debug   Object Name

      2468         30        128         12          0          0   ff.o

        64         12          0          0       2840          0   main.o

       176         16          0          0          0          0   misc.o

       944         84          0          4          0          0   pcb101_bsp.o

        64         26        388          0       1536          0   startup_stm32f2xx.o

       348         38          0         20          0          0   system_stm32f2xx.o

      3248         24          0          0          0          0   usb_core.o

       138          0          0          0          0          0   usb_hcd.o

      1448         44          0          2          0          0   usbh_core.o

       236          0          0          0          0          0   usbh_hcs.o

       454          0          0          0          0          0   usbh_ioreq.o

       720         40          0         20         64          0   usbh_msc_bot.o

       608         24          0         18        522          0   usbh_msc_core.o

       288         16          0          1          0          0   usbh_msc_fatfs.o

       924         20          0          1        528          0   usbh_msc_scsi.o

       800         10          0          4        512          0   usbh_stdreq.o

       780        164        239         78       1604          0   usbh_usr.o

    ----------------------------------------------------------------------

     13712        548        788        164       7608          0   Object Totals