flash/bluenrg-x: fix programming for devices with 512k flash
flash ADDRESS register is encoded in 17 bits (was 16), so fix the cast to uint32_t Change-Id: I13384ee8967e65890577b12a42a0eb4f1e2a7467 Signed-off-by: HAOUES Ahmed <ahmed.haoues@st.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8882 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
committed by
Antonio Borneo
parent
0644a88a1b
commit
37a0f013f8
@@ -315,10 +315,10 @@ static int bluenrgx_write(struct flash_bank *bank, const uint8_t *buffer,
|
||||
init_reg_param(®_params[4], "sp", 32, PARAM_OUT);
|
||||
/* Put the 4th parameter at the location in the stack frame of target write() function.
|
||||
* See contrib/loaders/flash/bluenrg-x/bluenrg-x_write.lst
|
||||
* 34 ldr r6, [sp, #80]
|
||||
* 34 ldr r6, [sp, #88]
|
||||
* ^^^ offset
|
||||
*/
|
||||
init_mem_param(&mem_params[0], write_algorithm_stack->address + 80, 32, PARAM_OUT);
|
||||
init_mem_param(&mem_params[0], write_algorithm_stack->address + 88, 32, PARAM_OUT);
|
||||
/* Stack for target write algorithm - target write() function has
|
||||
* __attribute__((naked)) so it does not setup the new stack frame.
|
||||
* Therefore the stack frame uses the area from SP upwards!
|
||||
|
||||
Reference in New Issue
Block a user