Skip to content

Commit

Permalink
bl_update:Add F7 Support
Browse files Browse the repository at this point in the history
  • Loading branch information
David Sidrane committed Feb 13, 2019
1 parent f2ae687 commit 823212a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/systemcmds/bl_update/bl_update.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
/**
* @file bl_update.c
*
* STM32F4 bootloader update tool.
* STM32F4 & STM32F7 bootloader update tool.
*/

#include <px4_config.h>
Expand All @@ -58,7 +58,7 @@

__EXPORT int bl_update_main(int argc, char *argv[]);

#if defined (CONFIG_STM32_STM32F4XXX)
#if defined (CONFIG_STM32_STM32F4XXX) || defined (CONFIG_ARCH_CHIP_STM32F7)
static int setopt(void);

static void print_usage(const char *reason)
Expand All @@ -75,12 +75,13 @@ static void print_usage(const char *reason)
PRINT_MODULE_USAGE_COMMAND_DESCR("<file>", "Bootloader bin file");
}

#endif
#endif // defined (CONFIG_STM32_STM32F4XXX) || defined (CONFIG_ARCH_CHIP_STM32F7)


int
bl_update_main(int argc, char *argv[])
{
#if !defined (CONFIG_STM32_STM32F4XXX)
#if !(defined (CONFIG_STM32_STM32F4XXX) || defined (CONFIG_ARCH_CHIP_STM32F7))
PX4_ERR("Not supported on this HW");
return 1;
}
Expand Down Expand Up @@ -242,4 +243,4 @@ setopt(void)
PX4_ERR("option bits setting failed; readback 0x%04" PRIx32, *optcr);
return 1;
}
#endif // CONFIG_STM32_STM32F4XXX
#endif // defined (CONFIG_STM32_STM32F4XXX) || defined (CONFIG_ARCH_CHIP_STM32F7)

0 comments on commit 823212a

Please sign in to comment.