fixed issue with bootloader not correctly reading application version word from program flash memory
This commit is contained in:
@@ -69,8 +69,6 @@
|
||||
#define REQUEST_DATA_BLOCK_SIZE 0x3A //Number of data bytes in a standard request to the PC. Must be an even number from 2-58 (0x02-0x3A). Larger numbers make better use of USB bandwidth and
|
||||
//yeild shorter program/verify times, but require more micrcontroller RAM for buffer space.
|
||||
|
||||
|
||||
|
||||
/** USB Packet Request/Response Formatting Structure **********************************************************/
|
||||
typedef union
|
||||
{
|
||||
@@ -397,7 +395,7 @@ void ProcessIO(void)
|
||||
//in this firmware and is available for requesting by the host software.
|
||||
PacketToPC.Command = QUERY_EXTENDED_INFO; //Echo the command byte
|
||||
PacketToPC.BootloaderVersion = ((unsigned int)BOOTLOADER_VERSION_MAJOR << 8)| BOOTLOADER_VERSION_MINOR;
|
||||
PacketToPC.ApplicationVersion = *(const unsigned int*)APP_FW_VERSION_ADDRESS;
|
||||
memcpy(&PacketToPC.ApplicationVersion, (void*)APP_FW_VERSION_ADDRESS, 2);
|
||||
PacketToPC.SignatureAddress = APP_SIGNATURE_ADDRESS;
|
||||
PacketToPC.SignatureValue = APP_SIGNATURE_VALUE;
|
||||
PacketToPC.ErasePageSize = ERASE_PAGE_SIZE;
|
||||
|
||||
@@ -17,7 +17,10 @@
|
||||
* IF YOU FLASH BROKEN APPLICATION FIRMWARE YOU WILL HAVE A BRICK!!
|
||||
* At that point the device can only be reprogrammed by a dedicated programmer such as the ICD or Pickit 3.
|
||||
*/
|
||||
#define ENABLE_HARDWARE_MODE_OVERRIDE
|
||||
// Yep, I'm disabling it anyway. the boards aren't designed to accomodate another pull-up resistor
|
||||
// or pushbutton. a jump from application code is sufficient since you shouldn't be flashing modified or
|
||||
// untested firmware without a pickit anyway.
|
||||
//#define ENABLE_HARDWARE_MODE_OVERRIDE
|
||||
|
||||
/* Private prototypes */
|
||||
void main(void);
|
||||
|
||||
Reference in New Issue
Block a user