File tree Expand file tree Collapse file tree 4 files changed +14
-7
lines changed Expand file tree Collapse file tree 4 files changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ __attribute__((section(".boot_hdr.ivt")))
15
15
* IVT Data
16
16
*************************************/
17
17
const ivt image_vector_table = {
18
- IVT_HEADER , /* IVT Header */
18
+ 0x432000D1 , /* Teensy bootloader looks for this value */
19
19
IMAGE_ENTRY_ADDRESS , /* Image Entry Function */
20
20
IVT_RSVD , /* Reserved = 0 */
21
21
(uint32_t )DCD_ADDRESS , /* Address where DCD information is stored */
@@ -25,13 +25,15 @@ const ivt image_vector_table = {
25
25
IVT_RSVD /* Reserved = 0 */
26
26
};
27
27
28
+ extern unsigned long _flashimagelen ;
29
+
28
30
__attribute__((section (".boot_hdr.boot_data" )))
29
31
/*************************************
30
32
* Boot Data
31
33
*************************************/
32
34
const BOOT_DATA_T boot_data = {
33
35
FLASH_BASE , /* boot start location */
34
- FLASH_SIZE , /* size */
36
+ ( uint32_t ) & _flashimagelen , /* actual size of image */
35
37
PLUGIN_FLAG , /* Plugin flag*/
36
38
0xFFFFFFFF /* empty - extra data word */
37
39
};
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ __attribute__((section(".boot_hdr.ivt")))
15
15
* IVT Data
16
16
*************************************/
17
17
const ivt image_vector_table = {
18
- IVT_HEADER , /* IVT Header */
18
+ 0x432000D1 , /* Teensy bootloader looks for this value */
19
19
IMAGE_ENTRY_ADDRESS , /* Image Entry Function */
20
20
IVT_RSVD , /* Reserved = 0 */
21
21
(uint32_t )DCD_ADDRESS , /* Address where DCD information is stored */
@@ -25,13 +25,15 @@ const ivt image_vector_table = {
25
25
IVT_RSVD /* Reserved = 0 */
26
26
};
27
27
28
+ extern unsigned long _flashimagelen ;
29
+
28
30
__attribute__((section (".boot_hdr.boot_data" )))
29
31
/*************************************
30
32
* Boot Data
31
33
*************************************/
32
34
const BOOT_DATA_T boot_data = {
33
35
FLASH_BASE , /* boot start location */
34
- FLASH_SIZE , /* size */
36
+ ( uint32_t ) & _flashimagelen , /* actual size of image */
35
37
PLUGIN_FLAG , /* Plugin flag*/
36
38
0xFFFFFFFF /* empty - extra data word */
37
39
};
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ __attribute__((section(".boot_hdr.ivt")))
15
15
* IVT Data
16
16
*************************************/
17
17
const ivt image_vector_table = {
18
- IVT_HEADER , /* IVT Header */
18
+ 0x432000D1 , /* Teensy bootloader looks for this value */
19
19
IMAGE_ENTRY_ADDRESS , /* Image Entry Function */
20
20
IVT_RSVD , /* Reserved = 0 */
21
21
(uint32_t )DCD_ADDRESS , /* Address where DCD information is stored */
@@ -25,13 +25,15 @@ const ivt image_vector_table = {
25
25
IVT_RSVD /* Reserved = 0 */
26
26
};
27
27
28
+ extern unsigned long _flashimagelen ;
29
+
28
30
__attribute__((section (".boot_hdr.boot_data" )))
29
31
/*************************************
30
32
* Boot Data
31
33
*************************************/
32
34
const BOOT_DATA_T boot_data = {
33
35
FLASH_BASE , /* boot start location */
34
- FLASH_SIZE , /* size */
36
+ ( uint32_t ) & _flashimagelen , /* actual size of image */
35
37
PLUGIN_FLAG , /* Plugin flag*/
36
38
0xFFFFFFFF /* empty - extra data word */
37
39
};
Original file line number Diff line number Diff line change @@ -74,7 +74,6 @@ SECTIONS
74
74
_etext = .; /* define a global symbol at end of code */
75
75
__etext = .; /* define a global symbol at end of code */
76
76
} > FLASH_FIRMWARE
77
-
78
77
_ld_filesystem_start = ORIGIN (FLASH_FATFS);
79
78
_ld_filesystem_end = _ld_filesystem_start + LENGTH (FLASH_FATFS);
80
79
@@ -127,6 +126,8 @@ SECTIONS
127
126
_ld_dtcm_data_flash_copy = LOADADDR (.dtcm_data);
128
127
_ld_dtcm_data_size = SIZEOF (.dtcm_data);
129
128
129
+ _flashimagelen = _ld_dtcm_data_flash_copy + _ld_dtcm_data_size - flash_config_location;
130
+
130
131
.dtcm_bss :
131
132
{
132
133
. = ALIGN (4);
You can’t perform that action at this time.
0 commit comments