Skip to content

Commit

Permalink
fix(CMSIS): Fix linker files and header files for SLA
Browse files Browse the repository at this point in the history
  • Loading branch information
sihyung-maxim committed Jan 26, 2024
1 parent b785a80 commit c46253b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ MEMORY {
SRAM_RV (rwx) : ORIGIN = 0x20060000, LENGTH = 0x0000C000
}

/* Added Oct 9, 2018 to go to correct reset vector. */
ENTRY(Reset_Handler)
PROVIDE( _start_SWAP = (((Reset_Handler) >> 24) | (((Reset_Handler) & 0x00FF0000) >> 8) | (((Reset_Handler) & 0x0000FF00) << 8) | ((Reset_Handler) << 24)));
PROVIDE_HIDDEN( _SLA_Size = __end_image - __end_header );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ SECTIONS {
__exidx_start = .;
*(.ARM.exidx*)
__exidx_end = .;
} > ROM
} > SPIX

/* This section will keep the SPIX data until loaded into the external device */
/* Upon initialization of SPIX (user code needs to do this) */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ extern unsigned int _start_SWAP;
extern unsigned int _SLA_Size_SWAP;

typedef enum {
MagicH = 0x44495357,
// MSB should be 0x48 to indicate ECDSA.
MagicH = 0x48495357,
MagicL = 0x45444744,
} enum_magic_t;

Expand Down Expand Up @@ -63,7 +64,7 @@ const flash_app_header_t sb_header = {
},

.RomVersion = SWAP(ROM_A1_VERSION),
.LoadAddr = SWAP(0x10000000),
.LoadAddr = SWAP(0x08000000),
.SLA_CodeSize = (unsigned int)&_SLA_Size_SWAP, // Trick to get constant defined at link time
.JumpAddr = &_start_SWAP,
.ArgSize = 0,
Expand Down

0 comments on commit c46253b

Please sign in to comment.