forked from mfulz_github/qmk_firmware
		
	Reduce bootloader magic key to 16 bits to save FLASH space.
This commit is contained in:
		
							parent
							
								
									10944d9ddf
								
							
						
					
					
						commit
						56d368f2de
					
				@ -61,7 +61,7 @@ static bool RunBootloader = true;
 | 
				
			|||||||
 *  low when the application attempts to start via a watchdog reset, the bootloader will re-start. If set to the value
 | 
					 *  low when the application attempts to start via a watchdog reset, the bootloader will re-start. If set to the value
 | 
				
			||||||
 *  \ref MAGIC_BOOT_KEY the special init function \ref Application_Jump_Check() will force the application to start.
 | 
					 *  \ref MAGIC_BOOT_KEY the special init function \ref Application_Jump_Check() will force the application to start.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
uint32_t MagicBootKey ATTR_NO_INIT;
 | 
					uint16_t MagicBootKey ATTR_NO_INIT;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** Special startup routine to check if the bootloader was started via a watchdog reset, and if the magic application
 | 
					/** Special startup routine to check if the bootloader was started via a watchdog reset, and if the magic application
 | 
				
			||||||
 | 
				
			|||||||
@ -69,7 +69,7 @@
 | 
				
			|||||||
		#define SOFTWARE_IDENTIFIER          "LUFACDC"
 | 
							#define SOFTWARE_IDENTIFIER          "LUFACDC"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		/** Magic bootloader key to unlock forced application start mode. */
 | 
							/** Magic bootloader key to unlock forced application start mode. */
 | 
				
			||||||
		#define MAGIC_BOOT_KEY            0xDC42CACA
 | 
							#define MAGIC_BOOT_KEY               0xDC42
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
	/* Type Defines: */
 | 
						/* Type Defines: */
 | 
				
			||||||
		/** Type define for a non-returning pointer to the start of the loaded application in flash memory. */
 | 
							/** Type define for a non-returning pointer to the start of the loaded application in flash memory. */
 | 
				
			||||||
 | 
				
			|||||||
@ -97,7 +97,7 @@ static uint16_t EndAddr = 0x0000;
 | 
				
			|||||||
 *  low when the application attempts to start via a watchdog reset, the bootloader will re-start. If set to the value
 | 
					 *  low when the application attempts to start via a watchdog reset, the bootloader will re-start. If set to the value
 | 
				
			||||||
 *  \ref MAGIC_BOOT_KEY the special init function \ref Application_Jump_Check() will force the application to start.
 | 
					 *  \ref MAGIC_BOOT_KEY the special init function \ref Application_Jump_Check() will force the application to start.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
uint32_t MagicBootKey ATTR_NO_INIT;
 | 
					uint16_t MagicBootKey ATTR_NO_INIT;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** Special startup routine to check if the bootloader was started via a watchdog reset, and if the magic application
 | 
					/** Special startup routine to check if the bootloader was started via a watchdog reset, and if the magic application
 | 
				
			||||||
 | 
				
			|||||||
@ -62,7 +62,7 @@
 | 
				
			|||||||
		#define BOOTLOADER_VERSION_REV   0
 | 
							#define BOOTLOADER_VERSION_REV   0
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
		/** Magic bootloader key to unlock forced application start mode. */
 | 
							/** Magic bootloader key to unlock forced application start mode. */
 | 
				
			||||||
		#define MAGIC_BOOT_KEY            0xDC42CACA
 | 
							#define MAGIC_BOOT_KEY            0xDC42
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		/** Complete bootloader version number expressed as a packed byte, constructed from the
 | 
							/** Complete bootloader version number expressed as a packed byte, constructed from the
 | 
				
			||||||
		 *  two individual bootloader version macros.
 | 
							 *  two individual bootloader version macros.
 | 
				
			||||||
 | 
				
			|||||||
@ -46,7 +46,7 @@ static bool RunBootloader = true;
 | 
				
			|||||||
 *  low when the application attempts to start via a watchdog reset, the bootloader will re-start. If set to the value
 | 
					 *  low when the application attempts to start via a watchdog reset, the bootloader will re-start. If set to the value
 | 
				
			||||||
 *  \ref MAGIC_BOOT_KEY the special init function \ref Application_Jump_Check() will force the application to start.
 | 
					 *  \ref MAGIC_BOOT_KEY the special init function \ref Application_Jump_Check() will force the application to start.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
uint32_t MagicBootKey ATTR_NO_INIT;
 | 
					uint16_t MagicBootKey ATTR_NO_INIT;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** Special startup routine to check if the bootloader was started via a watchdog reset, and if the magic application
 | 
					/** Special startup routine to check if the bootloader was started via a watchdog reset, and if the magic application
 | 
				
			||||||
 | 
				
			|||||||
@ -53,7 +53,7 @@
 | 
				
			|||||||
		#define COMMAND_STARTAPPLICATION   0xFFFF
 | 
							#define COMMAND_STARTAPPLICATION   0xFFFF
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		/** Magic bootloader key to unlock forced application start mode. */
 | 
							/** Magic bootloader key to unlock forced application start mode. */
 | 
				
			||||||
		#define MAGIC_BOOT_KEY            0xDC42CACA
 | 
							#define MAGIC_BOOT_KEY             0xDC42
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
	/* Function Prototypes: */
 | 
						/* Function Prototypes: */
 | 
				
			||||||
		static void SetupHardware(void);
 | 
							static void SetupHardware(void);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user