From d129c95fd2c75a2429e866c684ebb90e7ece72da Mon Sep 17 00:00:00 2001 From: Nathan Hartman <59230071+hartmannathan@users.noreply.github.com> Date: Fri, 23 Sep 2022 10:34:15 -0400 Subject: [PATCH] boards/b-g474e-dpow1: Add note about udev/sudo regarding openocd * boards/arm/stm32/b-g474e-dpow1/README.txt: (Debugging): OpenOCD requires permissions for certain operations. The preferred thing to do is to properly configure udev rules. The expedient thing to do is to run it as root with 'sudo', but we do not want to encourage that, as discussed earlier on this PR [1]. This revised text offers a compromise where we mention both options, but we talk about udev rules first and explicitly say that using 'sudo' is not encouraged. We leave it up to developers to decide what is best in their particular situation. References: [1] https://github.com/apache/incubator-nuttx/pull/7177 --- boards/arm/stm32/b-g474e-dpow1/README.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/boards/arm/stm32/b-g474e-dpow1/README.txt b/boards/arm/stm32/b-g474e-dpow1/README.txt index 7c2ae72c86..bfcafe1a6e 100644 --- a/boards/arm/stm32/b-g474e-dpow1/README.txt +++ b/boards/arm/stm32/b-g474e-dpow1/README.txt @@ -55,6 +55,12 @@ Development Environment $ openocd -f interface/stlink.cfg -f target/stm32g4x.cfg -c init \ -c "reset halt" -c "flash write_image erase nuttx.bin 0x08000000" + NOTE: The above command might fail unless either: udev rules have been + configured on the development system (preferred) or the command is run as + root with 'sudo' (not encouraged). See: + - https://openocd.org/doc/html/Running.html + - https://forgge.github.io/theCore/guides/running-openocd-without-sudo.html + * Start GDB with: $ arm-nuttx-eabi-gdb -tui nuttx