Remove old DFU code.

This commit is contained in:
iabdalkader 2016-04-25 20:35:36 +02:00
parent 54be7503e6
commit 232461295d
5 changed files with 18 additions and 56 deletions

View File

@ -78,29 +78,15 @@ defined in linker script */
.type Reset_Handler, %function
Reset_Handler:
ldr r0,=0x20002000 /* load magic number location */
ldr r2,[r0, #0]
str r0,[r0, #0] /* invalidate */
ldr r1,=0xDEADBEEF /* if magic number found */
cmp r2,r1
bne EnableCCM /* run the bootloader, else... */
Reboot_Loader:
ldr r0,=0x1FFF0000
ldr sp,[r0, #0]
ldr r0,[r0, #4]
bx r0
EnableCCM:
/* enable ccm clock */
/* Enable ccm clock */
ldr r0,=0x40023830
ldr r3,[r0]
orr r3, r3, #1048576 /* 0x100000 */
str r3,[r0]
ldr sp, =_estack /* set stack pointer */
ldr sp, =_estack /* set stack pointer */
/* Copy the data segment initializers from flash to SRAM */
/* Copy the data segment initializers from flash to SRAM */
movs r1, #0
b LoopCopyDataInit
@ -118,6 +104,7 @@ LoopCopyDataInit:
bcc CopyDataInit
ldr r2, =_sbss
b LoopFillZerobss
/* Zero fill the bss segment. */
FillZerobss:
movs r3, #0
@ -128,11 +115,11 @@ LoopFillZerobss:
cmp r2, r3
bcc FillZerobss
/* Call the clock system intitialization function.*/
/* Call the clock system intitialization function.*/
bl SystemInit
/* Call static constructors */
/* bl __libc_init_array */
/* Call the application's entry point.*/
/* Call static constructors */
/* bl __libc_init_array */
/* Call the application's entry point.*/
bl main
bx lr

View File

@ -78,35 +78,15 @@ defined in linker script */
.type Reset_Handler, %function
Reset_Handler:
ldr r0,=0x20002000 /* load magic number location */
ldr r2,[r0, #0]
str r0,[r0, #0] /* invalidate */
ldr r1,=0xDEADBEEF /* if magic number found */
cmp r2,r1
bne EnableCCM /* run the bootloader, else... */
Reboot_Loader:
ldr r0, =0x40023844 /* RCC_APB2ENR */
ldr r1, =0x00004000 /* enable SYSCFG clock */
str r1, [r0, #0]
ldr r0, =0x40013800 /* SYSCFG_MEMRMP */
ldr r1, =0x00000001 /* remap ROM at zero */
str r1, [r0, #0]
ldr r0,=0x1FFF0000
ldr sp,[r0, #0] /* 0x20002d40 */
ldr r0,[r0, #4]
bx r0
EnableCCM:
/* enable ccm clock */
/* Enable ccm clock */
ldr r0,=0x40023830
ldr r3,[r0]
orr r3, r3, #1048576 /* 0x100000 */
str r3,[r0]
ldr sp, =_estack /* set stack pointer */
ldr sp, =_estack /* set stack pointer */
/* Copy the data segment initializers from flash to SRAM */
/* Copy the data segment initializers from flash to SRAM */
movs r1, #0
b LoopCopyDataInit
@ -124,6 +104,7 @@ LoopCopyDataInit:
bcc CopyDataInit
ldr r2, =_sbss
b LoopFillZerobss
/* Zero fill the bss segment. */
FillZerobss:
movs r3, #0
@ -134,11 +115,11 @@ LoopFillZerobss:
cmp r2, r3
bcc FillZerobss
/* Call the clock system intitialization function.*/
/* Call the clock system intitialization function.*/
bl SystemInit
/* Call static constructors */
/* bl __libc_init_array */
/* Call the application's entry point.*/
/* Call static constructors */
/* bl __libc_init_array */
/* Call the application's entry point.*/
bl main
bx lr
.size Reset_Handler, .-Reset_Handler

View File

@ -293,11 +293,6 @@ void usbdbg_control(void *buffer, uint8_t request, uint32_t length)
NVIC_SystemReset();
break;
case USBDBG_SYS_BOOT:
*((uint32_t *)0x20002000) = 0xDEADBEEF;
NVIC_SystemReset();
break;
case USBDBG_JPEG_ENABLE: {
int16_t enable= *((int16_t*)buffer);
sensor_enable_jpeg(enable);

View File

@ -18,7 +18,7 @@
* the IDE will Not connect if the major version number is different.
*/
#define FIRMWARE_VERSION_MAJOR (1)
#define FIRMWARE_VERSION_MINOR (4)
#define FIRMWARE_VERSION_MINOR (5)
#define FIRMWARE_VERSION_PATCH (0)
/**
@ -44,7 +44,6 @@ enum usbdbg_cmd {
USBDBG_ATTR_READ =0x8A,
USBDBG_ATTR_WRITE =0x0B,
USBDBG_SYS_RESET =0x0C,
USBDBG_SYS_BOOT =0x0D,
USBDBG_JPEG_ENABLE =0x0E,
USBDBG_TX_BUF_LEN =0x8E,
USBDBG_TX_BUF =0x8F

View File

@ -28,7 +28,7 @@ else:
BUNDLE_DIR = IDE_DIR
FIRMWARE_VERSION_MAJOR = 1
FIRMWARE_VERSION_MINOR = 4
FIRMWARE_VERSION_MINOR = 5
FIRMWARE_VERSION_PATCH = 0
DATA_DIR = os.path.join(os.path.expanduser("~"), "openmv") #use home dir