X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Fflash%2Fnor%2Fstm32f1x.c;h=d44670768b6045880205e24464c963525514a578;hb=22b4a0f40da200563a32e5bab86aceecf486ddd3;hp=e4fcca07fb1e0a5332bbea88a2e5050d10f97d75;hpb=5b38f862f8be08cb7163bfe7fe101e4086752fbd;p=openocd.git diff --git a/src/flash/nor/stm32f1x.c b/src/flash/nor/stm32f1x.c index e4fcca07fb..d44670768b 100644 --- a/src/flash/nor/stm32f1x.c +++ b/src/flash/nor/stm32f1x.c @@ -19,9 +19,7 @@ * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * + * along with this program. If not, see . * ***************************************************************************/ #ifdef HAVE_CONFIG_H @@ -620,7 +618,7 @@ static int stm32x_write_block(struct flash_bank *bank, const uint8_t *buffer, &write_algorithm) != ERROR_OK) { LOG_WARNING("no working area available, can't do block memory writes"); return ERROR_TARGET_RESOURCE_NOT_AVAILABLE; - }; + } retval = target_write_buffer(target, write_algorithm->address, sizeof(stm32x_flash_write_code), stm32x_flash_write_code); @@ -639,7 +637,7 @@ static int stm32x_write_block(struct flash_bank *bank, const uint8_t *buffer, LOG_WARNING("no large enough working area available, can't do block memory writes"); return ERROR_TARGET_RESOURCE_NOT_AVAILABLE; } - }; + } init_reg_param(®_params[0], "r0", 32, PARAM_IN_OUT); /* flash base (in), status (out) */ init_reg_param(®_params[1], "r1", 32, PARAM_OUT); /* count (halfword-16bit) */ @@ -894,7 +892,7 @@ static int stm32x_probe(struct flash_bank *bank) stm32x_info->ppage_size = 4; max_flash_size_in_kb = 128; break; - case 0x422: /* stm32f302xb/c */ + case 0x422: /* stm32f302/3xb/c */ page_size = 2048; stm32x_info->ppage_size = 2; max_flash_size_in_kb = 256; @@ -902,6 +900,14 @@ static int stm32x_probe(struct flash_bank *bank) stm32x_info->option_offset = 6; stm32x_info->default_rdp = 0x55AA; break; + case 0x446: /* stm32f303xD/E */ + page_size = 2048; + stm32x_info->ppage_size = 2; + max_flash_size_in_kb = 512; + stm32x_info->user_data_offset = 16; + stm32x_info->option_offset = 6; + stm32x_info->default_rdp = 0x55AA; + break; case 0x428: /* value line High density */ page_size = 2048; stm32x_info->ppage_size = 4; @@ -941,13 +947,6 @@ static int stm32x_probe(struct flash_bank *bank) stm32x_info->default_rdp = 0x55AA; break; case 0x448: /* stm32f07x */ - page_size = 2048; - stm32x_info->ppage_size = 4; - max_flash_size_in_kb = 128; - stm32x_info->user_data_offset = 16; - stm32x_info->option_offset = 6; - stm32x_info->default_rdp = 0x55AA; - break; case 0x442: /* stm32f09x */ page_size = 2048; stm32x_info->ppage_size = 4; @@ -1247,6 +1246,15 @@ static int get_stm32x_info(struct flash_bank *bank, char *buf, int buf_size) rev_str = get_stm32f0_revision(rev_id); break; + case 0x446: + device_str = "STM32F303xD/E"; + switch (rev_id) { + case 0x1000: + rev_str = "A"; + break; + } + break; + case 0x448: device_str = "STM32F07x"; rev_str = get_stm32f0_revision(rev_id);