File tree Expand file tree Collapse file tree 2 files changed +3
-10
lines changed Expand file tree Collapse file tree 2 files changed +3
-10
lines changed Original file line number Diff line number Diff line change 34
34
#define APP2_ADDRESS_OFFSET 0x22000
35
35
#define APP2_ADDRESS (FLASH_BASE + APP2_ADDRESS_OFFSET)
36
36
37
+ #define BOOT_DATA_ADDRESS 0x08003800
38
+
37
39
typedef void (* app_func_t )(void );
38
40
typedef struct __attribute__((__packed__ ))
39
41
{
40
42
uint8_t active_image ;
41
43
} config_t ;
42
44
43
- __attribute__((__section__ (".user_data" ))) const char data [1 ];
44
-
45
45
int main ()
46
46
{
47
47
app_func_t app ;
48
48
uint32_t jump_addr , vt_offset , sp_addr ;
49
- config_t * config = (config_t * )data ;
49
+ volatile config_t * config = (config_t * )BOOT_DATA_ADDRESS ;
50
50
51
51
uart_init ();
52
52
print (VERSION );
Original file line number Diff line number Diff line change @@ -90,13 +90,6 @@ SECTIONS
90
90
PROVIDE_HIDDEN (__fini_array_end = .);
91
91
} > FLASH
92
92
93
- .user_data :
94
- {
95
- . = ALIGN (4);
96
- KEEP(*(.user_data))
97
- . = ALIGN (4);
98
- } > DATA
99
-
100
93
/* Used by startup code to initialize data */
101
94
_sidata = .;
102
95
You can’t perform that action at this time.
0 commit comments