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 3434#define APP2_ADDRESS_OFFSET 0x22000
3535#define APP2_ADDRESS (FLASH_BASE + APP2_ADDRESS_OFFSET)
3636
37+ #define BOOT_DATA_ADDRESS 0x08003800
38+
3739typedef void (* app_func_t )(void );
3840typedef struct __attribute__((__packed__ ))
3941{
4042 uint8_t active_image ;
4143} config_t ;
4244
43- __attribute__((__section__ (".user_data" ))) const char data [1 ];
44-
4545int main ()
4646{
4747 app_func_t app ;
4848 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 ;
5050
5151 uart_init ();
5252 print (VERSION );
Original file line number Diff line number Diff line change @@ -90,13 +90,6 @@ SECTIONS
9090 PROVIDE_HIDDEN (__fini_array_end = .);
9191 } > FLASH
9292
93- .user_data :
94- {
95- . = ALIGN (4 );
96- KEEP (*(.user_data ))
97- . = ALIGN (4 );
98- } > DATA
99-
10093 /* Used by startup code to initialize data */
10194 _sidata = .;
10295
You can’t perform that action at this time.
0 commit comments