[Cryptech Tech] uwTick and debugging
Michael Dockter
dockter at dkey.org
Sat Mar 9 00:00:10 UTC 2019
solved. To fully initialize a debug session you must use the gdb command "monitor reset halt". At one point the Eclipse IDE must have been generating this (and other commands) automically and I must have deleted it or configure my project somehow to mess it up...
(gdb) monitor reset halt
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x080010ac msp: 0x2002fffc
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x080010ac msp: 0x2002fffc
(gdb) break main
Breakpoint 1 at 0x802059c: file hsm.c, line 455.
(gdb) continue
Continuing.
Note: automatically using hardware breakpoints for read-only addresses.
Breakpoint 1, main () at hsm.c:455
455 {
(gdb) s
Info : halted: PC: 0x0802059e
Info : halted: PC: 0x080205a0
456 stm_init();
(gdb) s
Info : halted: PC: 0x08020760
stm_init () at /home/michael/alpha/alpha/build/sw/stm32/stm-init.c:71
71 HAL_NVIC_SetPriorityGrouping(NVIC_PRIORITYGROUP_0);
(gdb) n
Info : halted: PC: 0x08020764
Info : halted: PC: 0x080231b8
75 MX_GPIO_Init();
(gdb) n
Info : halted: PC: 0x08020718
78 uart_init();
(gdb) n
Info : halted: PC: 0x08020a6c
81 rtc_init();
(gdb) n
Info : halted: PC: 0x08021038
84 fpgacfg_init();
(gdb) n
Info : halted: PC: 0x0802147c
85 keystore_init();
(gdb) n
Info : halted: PC: 0x08021644
97 fmc_init();
(gdb) n
Info : halted: PC: 0x0802079c
100 sdram_init();
(gdb) n
Info : halted: PC: 0x0802193c
Info : halted: PC: 0x080205a4
main () at hsm.c:457
457 led_on(LED_GREEN);
(gdb)
________________________________
From: Michael Dockter
Sent: Friday, March 8, 2019 11:01:09 AM
To: tech at cryptech.is
Subject: Re: [Cryptech Tech] uwTick and debugging
Update. With yet another alpha/releng install and build from the toplevel Makefile produces a hsm.elf that runs as expected when flashed and run from reset, but hangs at the same point during debug. For now I'm going to take this clean copy and merge in my code using the burn and learn method of debug.
________________________________
From: Tech <tech-bounces at cryptech.is> on behalf of Rob Austein <sra at hactrn.net>
Sent: Thursday, March 7, 2019 10:08:34 AM
To: tech at cryptech.is
Subject: Re: [Cryptech Tech] uwTick and debugging
On Thu, 07 Mar 2019 09:33:48 -0500, Joachim Strömbergson wrote:
> On 2019-03-04 23:08, Michael Dockter wrote:
> > I was testing some new code in a ST-Cube generated project and now after
> > previously being able to debug the hsm and uart-test .elf files I am not
> > incrementing uwTick and the programs hang on the delay functions. I
> > rolled back recent changes and even pulled a clean copy and I'm stuck at
> > the same point. Can anyone offer a suggestion?
>
> Rob, Paul?
Wrong layer for me, you want Paul or Fredrik. :)
_______________________________________________
Tech mailing list
Tech at cryptech.is
https://lists.cryptech.is/listinfo/tech
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cryptech.is/archives/tech/attachments/20190309/2a0a7089/attachment-0001.html>
More information about the Tech
mailing list