Fixed flash stub for STM32F2 and STM32F4.
Added JTAG idcodes for these devices.
This commit is contained in:
parent
540573bc18
commit
61cfbf16c6
|
@ -64,6 +64,10 @@ static struct jtag_dev_descr_s {
|
|||
.descr = "ST Microelectronics: STM32, Value Line."},
|
||||
{.idcode = 0x06428041, .idmask = 0x0FFFFFFF,
|
||||
.descr = "ST Microelectronics: STM32, Value Line, High density."},
|
||||
{.idcode = 0x06411041, .idmask = 0xFFFFFFFF,
|
||||
.descr = "ST Microelectronics: STM32F2xx."},
|
||||
{.idcode = 0x06413041 , .idmask = 0xFFFFFFFF,
|
||||
.descr = "ST Microelectronics: STM32F4xx."},
|
||||
/* Just for fun, unsupported */
|
||||
{.idcode = 0x8940303F, .idmask = 0xFFFFFFFF, .descr = "ATMEL: ATMega16."},
|
||||
{.idcode = 0x0792603F, .idmask = 0xFFFFFFFF, .descr = "ATMEL: AT91SAM9261."},
|
||||
|
|
|
@ -123,7 +123,7 @@ uint16_t stm32f4_flash_write_stub[] = {
|
|||
//_cr:
|
||||
0x0201, 0x0000, //.word 0x00000201 (Value to write to FLASH_CR) */
|
||||
// _flashbase:
|
||||
0x2000, 0x4002, // .word 0x40022000 (FPEC_BASE)
|
||||
0x3c00, 0x4002, // .word 0x40023c00 (FPEC_BASE)
|
||||
// _addr:
|
||||
// 0x0000, 0x0000,
|
||||
// _size:
|
||||
|
@ -212,7 +212,7 @@ static int stm32f4_flash_write_words(struct target_s *target, uint32_t dest,
|
|||
memcpy(&data[2], src, len);
|
||||
|
||||
/* Write stub and data to target ram and set PC */
|
||||
target_mem_write_words(target, 0x20000000, (void*)stm32f4_flash_write_stub, 0x2C);
|
||||
target_mem_write_words(target, 0x20000000, (void*)stm32f4_flash_write_stub, 0x30);
|
||||
target_mem_write_words(target, 0x20000030, data, len + 8);
|
||||
target_pc_write(target, 0x20000000);
|
||||
if(target_check_error(target))
|
||||
|
|
Loading…
Reference in New Issue