STM32 ARM built in GDB simulator

Sysprogs forums Forums VisualGDB STM32 ARM built in GDB simulator

Tagged: , ,

This topic contains 1 reply, has 2 voices, and was last updated by  support 3 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #25000

    edwin
    Participant

    I am having trouble running built in GDB simulator with STM32 ARM .

    What could be the problem? Can VisualGDB simulate STM32 target?

    Your VisualGDB trial expires in 15 days!
    -gdb-version
    =thread-group-added,id="i1"
    ~"GNU gdb (GDB) 8.0.1\n"
    ~"Copyright (C) 2017 Free Software Foundation, Inc.\n"
    ~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law. Type \"show copying\"\nand \"show warranty\" for details.\n"
    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=i686-w64-mingw32 --target=arm-eabi\".\nType \"show configuration\" for configuration details."
    This GDB was configured as "--host=i686-w64-mingw32 --target=arm-eabi".
    Type "show configuration" for configuration details.
    ~"\nFor bug reporting instructions, please see:\n"
    ~"<http://www.gnu.org/software/gdb/bugs/>.\n"
    ~"Find the GDB manual and other documentation resources online at:\n<http://www.gnu.org/software/gdb/documentation/>.\n"
    Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.
    ~"For help, type \"help\".\n"
    ~"Type \"apropos word\" to search for commands related to \"word\"...\n"
    ~"Reading symbols from D:\\STM32_dev\\EmbeddedProject3\\VisualGDB\\Debug\\EmbeddedProject3..."
    ~"done.\n"
    ~"GNU gdb (GDB) 8.0.1\n"
    ~"Copyright (C) 2017 Free Software Foundation, Inc.\n"
    ~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law. Type \"show copying\"\nand \"show warranty\" for details.\n"
    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=i686-w64-mingw32 --target=arm-eabi\".\nType \"show configuration\" for configuration details."
    This GDB was configured as "--host=i686-w64-mingw32 --target=arm-eabi".
    Type "show configuration" for configuration details.
    ~"\nFor bug reporting instructions, please see:\n"
    ~"<http://www.gnu.org/software/gdb/bugs/>.\n"
    ~"Find the GDB manual and other documentation resources online at:\n<http://www.gnu.org/software/gdb/documentation/>.\n"
    Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.
    ~"For help, type \"help\".\n"
    ~"Type \"apropos word\" to search for commands related to \"word\".\n"
    ^done
    -list-features
    ^done,features=["frozen-varobjs","pending-breakpoints","thread-info","data-read-memory-bytes","breakpoint-notifications","ada-task-info","language-option","info-gdb-mi-command","undefined-command-error-code","exec-run-start-option"]
    -gdb-set disassembly-flavor intel
    ^error,msg="No symbol \"disassembly\" in current context."
    -gdb-set print demangle off
    ^done
    target sim
    &"target sim\n"
    ~"Connected to the simulator.\n"
    ^done
    load
    &"load\n"
    ~"Loading section .isr_vector, size 0x10c lma 0x8000000\n"
    ~"Loading section .text, size 0x800 lma 0x800010c\n"
    ~"Loading section .init_array, size 0x4 lma 0x800090c\n"
    ~"Loading section .fini_array, size 0x4 lma 0x8000910\n"
    ~"Loading section .data, size 0xc lma 0x8000914\n"
    ~"Start address 0x80002c9\n"
    ~"Transfer rate: 18688 bits in <1 sec.\n"
    ^done
    -data-evaluate-expression "sizeof(void *)"
    ^done,value="4"
    -data-evaluate-expression "sizeof(int)"
    ^done,value="4"
    -data-evaluate-expression "sizeof(short)"
    ^done,value="2"
    -data-evaluate-expression "sizeof(long)"
    ^done,value="4"
    -data-evaluate-expression "sizeof(long long)"
    ^done,value="8"
    -data-evaluate-expression "sizeof(char)"
    ^done,value="1"
    -data-evaluate-expression "sizeof(wchar_t)"
    ^error,msg="No symbol \"wchar_t\" in current context."
    -data-evaluate-expression "sizeof(float)"
    ^done,value="4"
    -data-evaluate-expression "sizeof(double)"
    ^done,value="8"
    -data-evaluate-expression "sizeof(long double)"
    ^done,value="8"
    -data-list-register-names
    ^done,register-names=["r0","r1","r2","r3","r4","r5","r6","r7","r8","r9","r10","r11","r12","sp","lr","pc","f0","f1","f2","f3","f4","f5","f6","f7","fps","cpsr","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""]
    -data-list-register-values r-10
    ^error,msg="No registers."
    info target
    &"info target\n"
    ~"Symbols from \"D:\\STM32_dev\\EmbeddedProject3\\VisualGDB\\Debug\\EmbeddedProject3\".\n"
    ~"simulator:\n"
    &"\tAttached to sim running program D:\\STM32_dev\\EmbeddedProject3\\VisualGDB\\Debug\\EmbeddedProject3\n"
    ~"\tWhile running this, GDB does not access memory from...\n"
    ~"Local exec file:\n"
    ~"\t`D:\\STM32_dev\\EmbeddedProject3\\VisualGDB\\Debug\\EmbeddedProject3', file type elf32-littlearm.\n"
    ~"\tEntry point: 0x80002c8\n"
    ~"\t0x08000000 - 0x0800010c is .isr_vector\n"
    ~"\t0x0800010c - 0x0800090c is .text\n"
    ~"\t0x0800090c - 0x08000910 is .init_array\n"
    ~"\t0x08000910 - 0x08000914 is .fini_array\n"
    ~"\t0x20000000 - 0x2000000c is .data\n"
    ~"\t0x2000000c - 0x2000002c is .bss\n"
    ^done
    -data-evaluate-expression "&_estack"
    ^done,value="0x20005000 \"\""
    -var-create - * "*((void **)0x20004ffc)"
    ^done,name="var1",numchild="0",value="0x0",type="void *",has_more="0"
    -var-assign "var1" 0x3ca90709
    ^done,value="0x3ca90709"
    -data-evaluate-expression "\*\(\(void\ \*\*\)0x20004ffc\)"
    ^done,value="0x3ca90709"
    -break-insert -f main
    ^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0x080001f2",func="main",file="LEDBlink.c",fullname="D:\\STM32_dev\\EmbeddedProject3\\LEDBlink.c",line="15",thread-groups=["i1"],times="0",original-location="main"}
    -exec-run
    =thread-group-started,id="i1",pid="42000"
    =thread-created,id="1",group-id="i1"
    ^running
    *running,thread-id="all"
    ~"sim: unknown SWI encountered - be - ignoring\n"
    ~"[Inferior 1 (process 42000) exited with code 014]\n"
    =thread-exited,id="1",group-id="i1"
    =thread-group-exited,id="i1",exit-code="014"
    *stopped,reason="exited",exit-code="014"
    info shared
    &"info shared\n"
    ~"No shared libraries loaded at this time.\n"
    ^done
    -data-list-register-values r-10
    ^error,msg="No registers."
    -gdb-exit
    ^exit

     

    #25001

    support
    Keymaster

    The ARM simulator built into gdb is indeed very basic and does not simulate most of the modern devices like STM32. VisualGDB shows it in the debug method list for backward compatibility with older devices where CPU-only simulation would make sense. For STM32 devices we recommend using one of the ST’s development boards with ST-Link.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.