From ea49af9c537a53d31752ae34e4cda479d821f7c4 Mon Sep 17 00:00:00 2001 From: neo Date: Thu, 2 May 2024 21:41:04 +0200 Subject: [PATCH] dev flash --- .gitignore | 2 ++ boards/ark/fmu-v6x/nuttx-config/include/board.h | 3 ++- build.sh | 4 +++- cmake/px4_add_common_flags.cmake | 1 + gdb_upload.sh | 9 +++++++++ ocd.sh | 2 ++ 6 files changed, 19 insertions(+), 2 deletions(-) create mode 100755 gdb_upload.sh create mode 100755 ocd.sh diff --git a/.gitignore b/.gitignore index 165a8e3..fb7f86d 100644 --- a/.gitignore +++ b/.gitignore @@ -108,3 +108,5 @@ src/systemcmds/topic_listener/listener_generated.cpp # colcon log/ + +venv/ diff --git a/boards/ark/fmu-v6x/nuttx-config/include/board.h b/boards/ark/fmu-v6x/nuttx-config/include/board.h index b29b8fc..70dcd64 100644 --- a/boards/ark/fmu-v6x/nuttx-config/include/board.h +++ b/boards/ark/fmu-v6x/nuttx-config/include/board.h @@ -93,7 +93,8 @@ * CPUCLK <= 480 MHz */ -#define STM32_BOARD_USEHSE +//#define STM32_BOARD_USEHSE +#define STM32_BOARD_USEHSI #define STM32_PLLCFG_PLLSRC RCC_PLLCKSELR_PLLSRC_HSE diff --git a/build.sh b/build.sh index c8c23dd..88cba5a 100755 --- a/build.sh +++ b/build.sh @@ -2,4 +2,6 @@ rm -rf build/ git submodule update --recursive -make px4_fmu-v6x_default \ No newline at end of file +make px4_fmu-v6x_default +#make px4_fmu-v6c_default +#make px4_fmu-v6c_bootloader \ No newline at end of file diff --git a/cmake/px4_add_common_flags.cmake b/cmake/px4_add_common_flags.cmake index 7f0b746..fc6107a 100644 --- a/cmake/px4_add_common_flags.cmake +++ b/cmake/px4_add_common_flags.cmake @@ -91,6 +91,7 @@ function(px4_add_common_flags) -Wno-unused-parameter -Wno-uninitialized -Wno-dangling-pointer + #-Wno-address ) # compiler specific flags diff --git a/gdb_upload.sh b/gdb_upload.sh new file mode 100755 index 0000000..7d17690 --- /dev/null +++ b/gdb_upload.sh @@ -0,0 +1,9 @@ +#!/bin/bash -xe + +#gdb-multiarch --exec build/px4_fmu-v6c_bootloader/px4_fmu-v6c_bootloader.elf \ +gdb-multiarch --exec build/px4_fmu-v6c_default/px4_fmu-v6c_default.elf \ +-ex "set architecture armv7" -ex "target extended-remote :3333" \ +-ex "monitor reset halt" \ +-ex "set mem inaccessible-by-default off" \ +-ex "load" \ +-ex "run" diff --git a/ocd.sh b/ocd.sh new file mode 100755 index 0000000..7fd4c95 --- /dev/null +++ b/ocd.sh @@ -0,0 +1,2 @@ +#!/bin/bash -xe +openocd -f interface/stlink.cfg -f target/stm32h7x.cfg