From: OpenOCD-Gerrit <ope...@us...> - 2020-02-24 10:26:28
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 98e9d96239af353bca3bad1bf5f4c809e8cc843b (commit) via 608105dff81c5035886d76d8528412139a56c4a7 (commit) from 22df29eee8033be5dd9bdf2429701fa2252dd80b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 98e9d96239af353bca3bad1bf5f4c809e8cc843b Author: Marc Schink <de...@za...> Date: Mon Feb 10 15:39:19 2020 +0100 flash/nor/stm32h7x: Minor code cleanups Change-Id: Ia212b1877abeda27f507de29a3aee2b171c1b8c6 Signed-off-by: Marc Schink <de...@za...> Reviewed-on: http://openocd.zylin.com/5448 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> Reviewed-by: Christopher Head <ch...@za...> diff --git a/src/flash/nor/stm32h7x.c b/src/flash/nor/stm32h7x.c index bf003684c..d5b5daab2 100644 --- a/src/flash/nor/stm32h7x.c +++ b/src/flash/nor/stm32h7x.c @@ -123,7 +123,7 @@ struct stm32h7x_part_info { }; struct stm32h7x_flash_bank { - int probed; + bool probed; uint32_t idcode; uint32_t user_bank_size; uint32_t flash_regs_base; /* Address of flash reg controller */ @@ -167,7 +167,7 @@ FLASH_BANK_COMMAND_HANDLER(stm32x_flash_bank_command) stm32x_info = malloc(sizeof(struct stm32h7x_flash_bank)); bank->driver_priv = stm32x_info; - stm32x_info->probed = 0; + stm32x_info->probed = false; stm32x_info->user_bank_size = bank->size; bank->write_start_alignment = FLASH_BLOCK_SIZE; @@ -701,13 +701,12 @@ static int stm32x_probe(struct flash_bank *bank) { struct target *target = bank->target; struct stm32h7x_flash_bank *stm32x_info = bank->driver_priv; - int i; uint16_t flash_size_in_kb; uint32_t device_id; uint32_t base_address = FLASH_BANK0_ADDRESS; uint32_t second_bank_base; - stm32x_info->probed = 0; + stm32x_info->probed = false; stm32x_info->part_info = NULL; int retval = stm32x_read_id_code(bank, &stm32x_info->idcode); @@ -803,12 +802,12 @@ static int stm32x_probe(struct flash_bank *bank) /* fixed memory */ setup_sector(bank, 0, num_pages, stm32x_info->part_info->page_size * 1024); - for (i = 0; i < num_pages; i++) { + for (int i = 0; i < num_pages; i++) { bank->sectors[i].is_erased = -1; bank->sectors[i].is_protected = 0; } - stm32x_info->probed = 1; + stm32x_info->probed = true; return ERROR_OK; } @@ -980,8 +979,6 @@ flash_lock: COMMAND_HANDLER(stm32x_handle_mass_erase_command) { - int i; - if (CMD_ARGC < 1) { command_print(CMD, "stm32h7x mass_erase <bank>"); return ERROR_COMMAND_SYNTAX_ERROR; @@ -995,7 +992,7 @@ COMMAND_HANDLER(stm32x_handle_mass_erase_command) retval = stm32x_mass_erase(bank); if (retval == ERROR_OK) { /* set all sectors as erased */ - for (i = 0; i < bank->num_sectors; i++) + for (int i = 0; i < bank->num_sectors; i++) bank->sectors[i].is_erased = 1; command_print(CMD, "stm32h7x mass erase complete"); commit 608105dff81c5035886d76d8528412139a56c4a7 Author: Mara Bos <m-...@m-...> Date: Fri Aug 9 11:59:24 2019 +0200 Support bitbanging on 64-bit ARM CPUs. The configure.ac file restricted this to only 'arm' CPUs, but ${host_cpu} is 'aarch64' (not 'arm') for 64 bit ARM CPUs. Tested on a Raspberry Pi compute module 3. Change-Id: I6cb1d7e7fadc51dbb12419176f1faf0a0cb0b228 Signed-off-by: Mara Bos <m-...@m-...> Reviewed-on: http://openocd.zylin.com/5274 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/configure.ac b/configure.ac index e86d33f88..e87959c04 100644 --- a/configure.ac +++ b/configure.ac @@ -277,6 +277,20 @@ AC_ARG_ENABLE([ioutil], AS_HELP_STRING([--enable-ioutil], [Enable ioutil functions - useful for standalone OpenOCD implementations]), [build_ioutil=$enableval], [build_ioutil=no]) +AS_CASE(["${host_cpu}"], + [arm*|aarch64], [ + AC_ARG_ENABLE([bcm2835gpio], + AS_HELP_STRING([--enable-bcm2835gpio], [Enable building support for bitbanging on BCM2835 (as found in Raspberry Pi)]), + [build_bcm2835gpio=$enableval], [build_bcm2835gpio=no]) + AC_ARG_ENABLE([imx_gpio], + AS_HELP_STRING([--enable-imx_gpio], [Enable building support for bitbanging on NXP IMX processors]), + [build_imx_gpio=$enableval], [build_imx_gpio=no]) + ], + [ + build_bcm2835gpio=no + build_imx_gpio=no +]) + AS_CASE(["${host_cpu}"], [arm*], [ AC_ARG_ENABLE([ep93xx], @@ -286,19 +300,10 @@ AS_CASE(["${host_cpu}"], AC_ARG_ENABLE([at91rm9200], AS_HELP_STRING([--enable-at91rm9200], [Enable building support for AT91RM9200 based SBCs]), [build_at91rm9200=$enableval], [build_at91rm9200=no]) - - AC_ARG_ENABLE([bcm2835gpio], - AS_HELP_STRING([--enable-bcm2835gpio], [Enable building support for bitbanging on BCM2835 (as found in Raspberry Pi)]), - [build_bcm2835gpio=$enableval], [build_bcm2835gpio=no]) - AC_ARG_ENABLE([imx_gpio], - AS_HELP_STRING([--enable-imx_gpio], [Enable building support for bitbanging on NXP IMX processors]), - [build_imx_gpio=$enableval], [build_imx_gpio=no]) ], [ build_ep93xx=no build_at91rm9200=no - build_bcm2835gpio=no - build_imx_gpio=no ]) AC_ARG_ENABLE([gw16012], ----------------------------------------------------------------------- Summary of changes: configure.ac | 23 ++++++++++++++--------- src/flash/nor/stm32h7x.c | 15 ++++++--------- 2 files changed, 20 insertions(+), 18 deletions(-) hooks/post-receive -- Main OpenOCD repository |