nRf Academy Intermediate - Lesson 2, Exercise 2 - Unable to backtrace correctly

I've faced an issue while performing Exercise 2 from the Lesson 2 of the nRf Intermediate Academy Course.

When I have my dump.bin created and the debug server running, after connecting to it with 'target remote localhost:1234' I am experiencing the following issues:
1) with doing the exercise from scratch, after BT command I am receiving an error:
backtrace stopped: previous frame identical to this frame (corrupt stack?).
the output shows me the main.c entry point, but  then instead of the button_pressed line I have that backtrace stopped line

2) when using the l2_e2_sol_1 solution project and files available there already I have the following error:

(gdb) target remote localhost:1234
Remote debugging using localhost:1234
cbvprintf_package (packaged=0x0 <_vector_table>, len=0, flags=<optimized out>, fmt=0x0 <_vector_table>, ap=...)
at /opt/nordic/ncs/v3.0.0/zephyr/lib/os/cbprintf_packaged.c:701
701 if (buf0 != NULL) {
(gdb) bt
#0 cbvprintf_package (packaged=0x0 <_vector_table>, len=0, flags=<optimized out>, fmt=0x0 <_vector_table>, ap=...)
at /opt/nordic/ncs/v3.0.0/zephyr/lib/os/cbprintf_packaged.c:701
#1 0x00000000 in ?? ()
(gdb)

Was the solution checked for being working? It is strange, that the provided files doesn't work.

Parents
  • Hello,

    When I have my dump.bin created and the debug server running, after connecting to it with 'target remote localhost:1234' I am experiencing the following issues:
    1) with doing the exercise from scratch, after BT command I am receiving an error:
    backtrace stopped: previous frame identical to this frame (corrupt stack?).
    the output shows me the main.c entry point, but  then instead of the button_pressed line I have that backtrace stopped line

    The source code has been changed somewhat since the gdb output examples in the exercise were created. You can still follow the instructions in the text and apply them to the output you are getting.

    2) when using the l2_e2_sol_1 solution project and files available there already I have the following error:

    (gdb) target remote localhost:1234
    Remote debugging using localhost:1234
    cbvprintf_package (packaged=0x0 <_vector_table>, len=0, flags=<optimized out>, fmt=0x0 <_vector_table>, ap=...)
    at /opt/nordic/ncs/v3.0.0/zephyr/lib/os/cbprintf_packaged.c:701
    701 if (buf0 != NULL) {
    (gdb) bt
    #0 cbvprintf_package (packaged=0x0 <_vector_table>, len=0, flags=<optimized out>, fmt=0x0 <_vector_table>, ap=...)
    at /opt/nordic/ncs/v3.0.0/zephyr/lib/os/cbprintf_packaged.c:701
    #1 0x00000000 in ?? ()
    (gdb)

    This it the output because the dump.bin and dump.log are from another build than the one you create. If you build l2_e2_sol and create new dump.log and dump.bin files, you will likely get the same result as in 1).

    Was the solution checked for being working? It is strange, that the provided files doesn't work.

    The solutions are tested when they are created. Smaller changes could still be made and not be reflected in the DevAcademy lesson. I can see that it is a cause for confusion when the example output in the exercise text differ from the output in newer SDK versions, so I'll report this internally.

    Best regards,

    Maria

Reply
  • Hello,

    When I have my dump.bin created and the debug server running, after connecting to it with 'target remote localhost:1234' I am experiencing the following issues:
    1) with doing the exercise from scratch, after BT command I am receiving an error:
    backtrace stopped: previous frame identical to this frame (corrupt stack?).
    the output shows me the main.c entry point, but  then instead of the button_pressed line I have that backtrace stopped line

    The source code has been changed somewhat since the gdb output examples in the exercise were created. You can still follow the instructions in the text and apply them to the output you are getting.

    2) when using the l2_e2_sol_1 solution project and files available there already I have the following error:

    (gdb) target remote localhost:1234
    Remote debugging using localhost:1234
    cbvprintf_package (packaged=0x0 <_vector_table>, len=0, flags=<optimized out>, fmt=0x0 <_vector_table>, ap=...)
    at /opt/nordic/ncs/v3.0.0/zephyr/lib/os/cbprintf_packaged.c:701
    701 if (buf0 != NULL) {
    (gdb) bt
    #0 cbvprintf_package (packaged=0x0 <_vector_table>, len=0, flags=<optimized out>, fmt=0x0 <_vector_table>, ap=...)
    at /opt/nordic/ncs/v3.0.0/zephyr/lib/os/cbprintf_packaged.c:701
    #1 0x00000000 in ?? ()
    (gdb)

    This it the output because the dump.bin and dump.log are from another build than the one you create. If you build l2_e2_sol and create new dump.log and dump.bin files, you will likely get the same result as in 1).

    Was the solution checked for being working? It is strange, that the provided files doesn't work.

    The solutions are tested when they are created. Smaller changes could still be made and not be reflected in the DevAcademy lesson. I can see that it is a cause for confusion when the example output in the exercise text differ from the output in newer SDK versions, so I'll report this internally.

    Best regards,

    Maria

Children
No Data
Related