AnsweredAssumed Answered

Does anyone have a MSC bootloader working on MKL25Z128?

Question asked by Frank Van Hooft on Mar 23, 2014
Latest reply on Mar 27, 2014 by CarlosCasillas

I'm wondering if anyone has a USB mass storage class bootloader running on the MKL25Z128 processor?  If so, can you share some pointers on how to get it working?

 

I'm running CW 10.4 (on Windows 7) and Freescale's USB stack 4.1.1.  When I follow the instructions to build the sample MSC project (located at: C:\Freescale\Freescale USB Stack v4.1.1\Source\Device\app\msd\cw10\kinetis_l2k\.project) it doesn't even build cleanly - I get a long list of pretty serious warnings (pasted at the end of this post). Warnings like "missing braces" simply should not happen; something's broken; my guess is it's probably due to the plethora of #if's that are scattered throughout this USB stack code.

 

My original plan had been to start with the USB stack, get the MSC example running, then modify it based on (a) the DFU example code (which does flash writing) and (b) the much older Freescale AppNote which talks about a MSC bootloader. I had figured that starting from the most recent USB stack would be a safe bet. But I'm questioning that now.

 

If anyone has any suggestions I'd appreciate it.

 

Thanks,

 

Frank.

 

========================================

 

In file included from C:/Freescale/Freescale USB Stack v4.1.1/Source/Device/source/driver/usb_devapi.h:43:0,

                 from C:/Freescale/Freescale USB Stack v4.1.1/Source/Device/source/common/usb_class.h:46,

                 from C:/Freescale/Freescale USB Stack v4.1.1/Source/Device/source/common/usb_framework.c:39:

C:/Freescale/Freescale USB Stack v4.1.1/Source/Device/app/msd/cw10/kinetis_l2k/derivative.h:10:0: warning: "LITTLE_ENDIAN" redefined [enabled by default]

C:/Freescale/Freescale USB Stack v4.1.1/Source/Device/source/class/usb_msc_scsi.c:68:7: warning: missing braces around initializer [-Wmissing-braces]

C:/Freescale/Freescale USB Stack v4.1.1/Source/Device/source/class/usb_msc_scsi.c: In function 'msc_read_format_capacity_command':

C:/Freescale/Freescale USB Stack v4.1.1/Source/Device/source/class/usb_msc_scsi.c:1037:5: warning: missing braces around initializer [-Wmissing-braces]

C:/Freescale/Freescale USB Stack v4.1.1/Source/Device/app/msd/cw10/kinetis_l2k/derivative.h:10:0: warning: "LITTLE_ENDIAN" redefined [enabled by default]

C:/Freescale/Freescale USB Stack v4.1.1/Source/Device/app/msd/kinetis_spi/SPI_kinetis.c: In function 'SPI_Receive_byte':

C:/Freescale/Freescale USB Stack v4.1.1/Source/Device/app/msd/kinetis_spi/SPI_kinetis.c:355:10: warning: unused variable 'u8Data' [-Wunused-variable]

C:/Freescale/Freescale USB Stack v4.1.1/Source/Device/app/msd/kinetis_spi/SPI_kinetis.c:59:16: warning: 'gSPI_BaudRate' defined but not used [-Wunused-variable]

C:/Freescale/Freescale USB Stack v4.1.1/Source/Device/app/msd/kinetis_spi/SPI_kinetis.c:60:16: warning: 'gSPI_BeforeTransfDelay' defined but not used [-Wunused-variable]

C:/Freescale/Freescale USB Stack v4.1.1/Source/Device/app/msd/cw10/kinetis_l2k/derivative.h:10:0: warning: "LITTLE_ENDIAN" redefined [enabled by default]

C:/Freescale/Freescale USB Stack v4.1.1/Source/Device/app/msd/kinetis_spi/SD_kinetis.c: In function 'SD_Init':

C:/Freescale/Freescale USB Stack v4.1.1/Source/Device/app/msd/kinetis_spi/SD_kinetis.c:95:6: warning: implicit declaration of function 'Watchdog_Reset' [-Wimplicit-function-declaration]

C:/Freescale/Freescale USB Stack v4.1.1/Source/Device/app/msd/kinetis_spi/SD_kinetis.c: In function 'SD_Card_Info':

C:/Freescale/Freescale USB Stack v4.1.1/Source/Device/app/msd/kinetis_spi/SD_kinetis.c:434:4: warning: implicit declaration of function 'memcpy' [-Wimplicit-function-declaration]

C:/Freescale/Freescale USB Stack v4.1.1/Source/Device/app/msd/cw10/kinetis_l2k/derivative.h:10:0: warning: "LITTLE_ENDIAN" redefined [enabled by default]

C:/Freescale/Freescale USB Stack v4.1.1/Source/Device/app/msd/disk.c: In function 'MSD_Event_Callback':

C:/Freescale/Freescale USB Stack v4.1.1/Source/Device/app/msd/disk.c:169:34: warning: variable 'load_eject_start_ptr' set but not used [-Wunused-but-set-variable]

C:/Freescale/Freescale USB Stack v4.1.1/Source/Device/app/msd/disk.c: In function 'TestApp_Init':

C:/Freescale/Freescale USB Stack v4.1.1/Source/Device/app/msd/disk.c:256:11: warning: variable 'error' set but not used [-Wunused-but-set-variable]

C:/Freescale/Freescale USB Stack v4.1.1/Source/Device/app/msd/cw10/kinetis_l2k/derivative.h:10:0: warning: "LITTLE_ENDIAN" redefined [enabled by default]

C:/Freescale/Freescale USB Stack v4.1.1/Source/Device/app/msd/usb_descriptor.c:424:9: warning: missing braces around initializer [-Wmissing-braces]

C:/Freescale/Freescale USB Stack v4.1.1/Source/Device/app/msd/cw10/kinetis_l2k/derivative.h:10:0: warning: "LITTLE_ENDIAN" redefined [enabled by default]

Outcomes