Remove debug code from the incomplete Mass Storage class bootloader, rename main source files.

pull/1469/head
Dean Camera 12 years ago
parent 0f0f9638a3
commit d5d9ff73e5

@ -34,7 +34,7 @@
* the demo and is responsible for the initial application hardware configuration. * the demo and is responsible for the initial application hardware configuration.
*/ */
#include "MassStorage.h" #include "BootloaderMassStorage.h"
/** LUFA Mass Storage Class driver interface configuration and state information. This structure is /** LUFA Mass Storage Class driver interface configuration and state information. This structure is
* passed to all Mass Storage Class driver functions, so that multiple instances of the same class * passed to all Mass Storage Class driver functions, so that multiple instances of the same class
@ -95,8 +95,6 @@ void SetupHardware(void)
/* Hardware Initialization */ /* Hardware Initialization */
LEDs_Init(); LEDs_Init();
Serial_Init(9600, false);
Serial_CreateStream(NULL);
USB_Init(); USB_Init();
} }

@ -48,7 +48,6 @@
#include "Lib/SCSI.h" #include "Lib/SCSI.h"
#include <LUFA/Drivers/Board/LEDs.h> #include <LUFA/Drivers/Board/LEDs.h>
#include <LUFA/Drivers/Peripheral/Serial.h>
#include <LUFA/Drivers/USB/USB.h> #include <LUFA/Drivers/USB/USB.h>
/* Macros: */ /* Macros: */

@ -42,7 +42,7 @@
#include <LUFA/Drivers/USB/USB.h> #include <LUFA/Drivers/USB/USB.h>
#include "../MassStorage.h" #include "../BootloaderMassStorage.h"
#include "../Descriptors.h" #include "../Descriptors.h"
#include "VirtualFAT.h" #include "VirtualFAT.h"

@ -101,7 +101,6 @@ static void WriteBlock(const uint16_t BlockNumber)
Endpoint_Read_Stream_LE(BlockBuffer, sizeof(BlockBuffer), NULL); Endpoint_Read_Stream_LE(BlockBuffer, sizeof(BlockBuffer), NULL);
Endpoint_ClearOUT(); Endpoint_ClearOUT();
printf("WRITE %d\r\n", BlockNumber);
// TODO: Write to FLASH // TODO: Write to FLASH
} }
@ -139,15 +138,9 @@ static void ReadBlock(const uint16_t BlockNumber)
default: default:
if ((BlockNumber >= 4) && (BlockNumber < (4 + (FIRMWARE_FILE_SIZE / SECTOR_SIZE_BYTES)))) if ((BlockNumber >= 4) && (BlockNumber < (4 + (FIRMWARE_FILE_SIZE / SECTOR_SIZE_BYTES))))
{ {
// printf("<D>\r\n");
for (uint16_t i = 0; i < 512; i++) for (uint16_t i = 0; i < 512; i++)
BlockBuffer[i] = 'A' + (i % 26); BlockBuffer[i] = 'A' + (i % 26);
} }
else
{
printf("INVALID %d\r\n", BlockNumber);
}
break; break;
} }

@ -17,8 +17,8 @@ BOARD = USBKEY
F_CPU = 16000000 F_CPU = 16000000
F_USB = $(F_CPU) F_USB = $(F_CPU)
OPTIMIZATION = s OPTIMIZATION = s
TARGET = MassStorage TARGET = BootloaderMassStorage
SRC = $(TARGET).c Descriptors.c Lib/SCSI.c Lib/VirtualFAT.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS) $(LUFA_SRC_SERIAL) SRC = $(TARGET).c Descriptors.c Lib/SCSI.c Lib/VirtualFAT.c $(LUFA_SRC_USB) $(LUFA_SRC_USBCLASS)
LUFA_PATH = ../../../LUFA LUFA_PATH = ../../../LUFA
CC_FLAGS = -DUSE_LUFA_CONFIG_HEADER -IConfig/ -DBOOT_START_ADDR=$(BOOT_START_OFFSET) CC_FLAGS = -DUSE_LUFA_CONFIG_HEADER -IConfig/ -DBOOT_START_ADDR=$(BOOT_START_OFFSET)
LD_FLAGS = -Wl,--section-start=.text=$(BOOT_START_OFFSET) $(BOOT_API_LD_FLAGS) LD_FLAGS = -Wl,--section-start=.text=$(BOOT_START_OFFSET) $(BOOT_API_LD_FLAGS)

Loading…
Cancel
Save