Replicate the wormhole in the bootloader and make it jump to the application if it's open and the enumeration mode is anything but EnumerationMode_Bootloader.

This commit is contained in:
László Monda
2017-10-13 21:39:17 +02:00
parent cbc16f4c24
commit b754ecbe68
5 changed files with 60 additions and 2 deletions

View File

@@ -215,6 +215,11 @@
<type>2</type>
<locationURI>virtual:/virtual</locationURI>
</link>
<link>
<name>src/bootloader/wormhole.h</name>
<type>1</type>
<locationURI>PARENT-4-PROJECT_LOC/src/bootloader/wormhole.h</locationURI>
</link>
<link>
<name>src/crc/crc16.h</name>
<type>1</type>
@@ -445,6 +450,11 @@
<type>1</type>
<locationURI>PARENT-4-PROJECT_LOC/src/bootloader/src/usb_hid_msc_peripheral_interface.c</locationURI>
</link>
<link>
<name>src/bootloader/src/wormhole.c</name>
<type>1</type>
<locationURI>PARENT-4-PROJECT_LOC/src/bootloader/src/wormhole.c</locationURI>
</link>
<link>
<name>src/crc/src/crc16.c</name>
<type>1</type>

View File

@@ -61,7 +61,8 @@ MEMORY
m_interrupts (RX) : ORIGIN = 0x00000000, LENGTH = 0x00000400
m_flash_config (RX) : ORIGIN = 0x00000400, LENGTH = 0x00000010
m_text (RX) : ORIGIN = 0x00000410, LENGTH = 0x0007FBF0
m_data (RW) : ORIGIN = 0x1FFF0000, LENGTH = 0x00020000
m_data (RW) : ORIGIN = 0x1FFF0000, LENGTH = 0x0001FF00
m_noinit (RW) : ORIGIN = 0x2000FF00, LENGTH = 0x00000100
}
/* Define output sections */
@@ -255,5 +256,16 @@ SECTIONS
.ARM.attributes 0 : { *(.ARM.attributes) }
ASSERT(__StackLimit >= __HeapLimit, "region m_data_2 overflowed with stack and heap")
.noinit (NOLOAD):
{
. = ALIGN(4);
_noinit = .;
*(.noinit .noinit.*)
. = ALIGN(4) ;
_end_noinit = .;
} > m_noinit
}