michi-jung commented on issue #9316:
URL: https://github.com/apache/nuttx/issues/9316#issuecomment-1560636062

   > Thanks for your help, I pulled your updated NUTTX code and updated TF-M to 
version 1.5.0 according to the new README.txt, and it finally works.
   
   Do you mean that your board boots successfully to the NSH prompt now?  I.e. 
is the fix good to go into a pull request?
   
   > But I don't know if I'm using GDB to debug the steps correctly
   
   Did you set OB_RDP_LEVEL_**_0_** in 
[Projects/STM32L562E-DK/Applications/TFM/TFM_SBSFU_Boot/Inc/boot_hal_cfg.h](https://github.com/STMicroelectronics/STM32CubeL5/blob/7c246fa2db069d306dd660bb00ca55b3d8b8198e/Projects/STM32L562E-DK/Applications/TFM/TFM_SBSFU_Boot/Inc/boot_hal_cfg.h#L41)?
   
   You have to apply the `regression.sh` script, before you flash the new 
firmware to the device (This will reset all Option Byte settings, disable 
TrustZone and erase flash).
   
   I am not running with openocd.  I am using the `ST-LINK_gdbserver` from 
[STM32CubeCLT](https://www.st.com/en/development-tools/stm32cubeclt.html) like 
this:
   
   ```
   $ ST-LINK_gdbserver -d -cp /opt/secore.ly/compute-secore.ly-sdk/bin
   
   
   STMicroelectronics ST-LINK GDB server. Version 6.1.0
   Copyright (c) 2022, STMicroelectronics. All rights reserved.
   
   Starting server with the following options:
           Persistent Mode            : Disabled
           Logging Level              : 31
           Listen Port Number         : 61234
           Status Refresh Delay       : 15s
           Verbose Mode               : Disabled
           SWD Debug                  : Enabled
   
   COM frequency = 24000 kHz
   Target connection mode: Default
   Reading ROM table for AP 0 @0xe00fefd0
   Hardware watchpoint supported by the target 
   ST-LINK Firmware version : V3J10M3B5S1
   Device ID: 0x481
   PC: 0xc0154c0
   ST-LINK device status: HALT_MODE
   ST-LINK detects target voltage = 3.30 V
   TrustZone: Active
   ST-LINK device status: HALT_MODE
   ST-LINK device initialization OK
   Stm32Device, pollAndNotify running...
   SwvSrv state change: 0 -> 1
   Waiting for connection on port 61235...
   Waiting for debugger connection...
   Waiting for connection on port 61234...
   ```
   
   ```
   $ arm-nuttx-eabi-gdb
   GNU gdb (GDB) 10.2
   Copyright (C) 2021 Free Software Foundation, Inc.
   License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
   This is free software: you are free to change and redistribute it.
   There is NO WARRANTY, to the extent permitted by law.
   Type "show copying" and "show warranty" for details.
   This GDB was configured as "--host=x86_64-pc-linux-gnu 
--target=arm-nuttx-eabi".
   Type "show configuration" for configuration details.
   For bug reporting instructions, please see:
   <https://www.gnu.org/software/gdb/bugs/>.
   Find the GDB manual and other documentation resources online at:
       <http://www.gnu.org/software/gdb/documentation/>.
   
   For help, type "help".
   Type "apropos word" to search for commands related to "word".
   (gdb) target remote :61234
   Remote debugging using :61234
   warning: No executable has been specified and target does not support
   determining executable automatically.  Try using the "file" command.
   0x0c0154c0 in ?? ()
   (gdb) symbol-file nuttx_user.elf 
   Reading symbols from nuttx_user.elf...
   (gdb) break nsh_main
   Breakpoint 1 at 0x818073c: file nsh_main.c, line 57.
   (gdb) monitor reset
   STM32 Successfully completed reset operation (System reset)
   (gdb) continue
   Continuing.
   
   Breakpoint 1, nsh_main (argc=1, argv=0x200d0c18) at nsh_main.c:57
   57        sched_getparam(0, &param);
   (gdb)
   ```
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to