Yocto-Linux

Sysprogs forums Forums VisualGDB Yocto-Linux

Tagged: ,

Viewing 15 posts - 16 through 30 (of 43 total)
  • Author
    Posts
  • #8207
    peter_cz
    Participant

    I have rebuilt the my Yocto/Linux and now I do have “crt1.o”, “crti.o”, and “crtbegin.o”.

    They are located within

    /opt/fsl-imx-x11-4.1.15/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/lib/

    but tool says “Toolchain Test Failed”

    Tool arguments: -Wl,–start-group “/tmp/VisualGDB_ToolchainTestProgram.o” -o “/tmp/VisualGDB_ToolchainTestProgram” -Wl,-gc-sections -Wl,–end-group
    /opt/fsl-imx-x11-4.1.15/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/5.2.0/real-ld: cannot find crt1.o: No such file or directory
    /opt/fsl-imx-x11-4.1.15/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/5.2.0/real-ld: cannot find crti.o: No such file or directory
    /opt/fsl-imx-x11-4.1.15/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/5.2.0/real-ld: cannot find crtbegin.o: No such file or directory
    collect2: error: ld returned 1 exit status

    #8209
    support
    Keymaster

    Hi,

    Please specify the “–sysroot=<SDKTARGETSYSROOT>” argument in COMMONFLAGS in VisualGDB Project Properties.

    You can find more details in our Edison tutorial showing how to configure a similar Windows toolchain. The only difference is that in the Edison tutorial the toolchain runs on Windows and in your case it runs on a remote Linux machine.

    #8210
    peter_cz
    Participant

    I’d like to have running toolchain on windows as well, but I need to know how. I have toolchain on Linux host.

     

     

     

    #8211
    support
    Keymaster

    Hi,

    Building a Windows toolchain is not straight-forward. We provide basic build instructions here, however it usually never builds out-of-the-box and requires some patching dependent on the compiler version and platform.

    We also offer a toolchain building service: you can send us your Linux toolchain and we could build a Windows equivalent. Simply contact our sales with more details to get a quote on that.

    #8213
    peter_cz
    Participant

    is there a way somehow to copy it from what is already built on my server host instead of Building a Windows toolchain?

    #8214
    peter_cz
    Participant

    did as suggested and  got

    Toolchain Test Failed

    Tool arguments: -Wl,–start-group “/tmp/VisualGDB_ToolchainTestProgram.o” -o “/tmp/VisualGDB_ToolchainTestProgram” -Wl,-gc-sections –sysroot=/opt/fsl-imx-x11-4.1.15/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi -Wl,–end-group
    /opt/fsl-imx-x11-4.1.15/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/5.2.0/real-ld: error: /tmp/VisualGDB_ToolchainTestProgram uses VFP register arguments, /tmp/VisualGDB_ToolchainTestProgram.o does not
    /opt/fsl-imx-x11-4.1.15/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/5.2.0/real-ld: failed to merge target specific data of file /tmp/VisualGDB_ToolchainTestProgram.o
    collect2: error: ld returned 1 exit status

    • This reply was modified 8 years, 6 months ago by peter_cz.
    #8216
    peter_cz
    Participant

    Hello,

    I’d like to move forward with this issue, can you help me?

    Tool arguments: -Wl,–start-group “/tmp/VisualGDB_ToolchainTestProgram.o” -o “/tmp/VisualGDB_ToolchainTestProgram” -Wl,-gc-sections –sysroot=/opt/fsl-imx-x11-4.1.15/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi -Wl,–end-group
    /opt/fsl-imx-x11-4.1.15/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/5.2.0/real-ld: error: /tmp/VisualGDB_ToolchainTestProgram uses VFP register arguments, /tmp/VisualGDB_ToolchainTestProgram.o does not
    /opt/fsl-imx-x11-4.1.15/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/5.2.0/real-ld: failed to merge target specific data of file /tmp/VisualGDB_ToolchainTestProgram.o
    collect2: error: ld returned 1 exit status

    Thanks.

    #8218
    support
    Keymaster

    Hi,

    Sorry for the late reply. The error you are observing happens because some parts of the code are built with the “hard float” ABI and others with “soft float”.

    You can resolve this by adding the following flags to COMMONFLAGS:

    -march=armv7-a -mfloat-abi=hard -mfpu=neon -mtune=cortex-a9
    #8220
    peter_cz
    Participant

    Thanks for your help. Now it seems can compile and my test program resides on host. and I can’t debug it:

    gdbserver is missing on “192.168.0.100” (target).

     

    So now I am looking for a way how to get gbserver running on target.

    Second question is about configuration and since compiled program resides at host

    VisualGDB: Run “make CONFIG=Debug” in directory “/tmp/VisualGDB/c/Data/Projects/Vision_iMX/vc_projects/LinuxProject1/LinuxProject1” on “userbanme”@10.171.88.187 (SSH) but I’d like to have on my target machine. Is it possible have that “automatically” donwloaded to my target machine?

    Thanks for your help.

     

    #8221
    peter_cz
    Participant

    I did installed gdbserver on my target, I got “Failed to start GDB server session” error message

    (gdb begin)
    Your VisualGDB trial expires in 28 days!
    /opt/fsl-image-4.1.15-debug/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gdb –interpreter mi –args “/tmp/VisualGDB/c/Data/Projects/Vision_iMX/vc_projects/LinuxProject1/LinuxProject1/Debug/LinuxProject1″
    =thread-group-added,id=”i1″
    ~”GNU gdb (GDB) 7.9.1\n”
    ~”Copyright (C) 2015 Free Software Foundation, Inc.\n”
    ~”License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html&gt;\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”
    -gdb-version
    ~”This GDB was configured as \”–host=x86_64-pokysdk-linux –target=arm-poky-linux-gnueabi\”.\nType \”show configuration\” for configuration details.”
    ~”\nFor bug reporting instructions, please see:\n”
    ~”<http://www.gnu.org/software/gdb/bugs/&gt;.\n”
    ~”Find the GDB manual and other documentation resources online at:\n<http://www.gnu.org/software/gdb/documentation/&gt;.\n”
    ~”For help, type \”help\”.\n”
    ~”Type \”apropos word\” to search for commands related to \”word\”…\n”
    ~”Reading symbols from /tmp/VisualGDB/c/Data/Projects/Vision_iMX/vc_projects/LinuxProject1/LinuxProject1/Debug/LinuxProject1…”
    ~”done.\n”
    ~”GNU gdb (GDB) 7.9.1\n”
    ~”Copyright (C) 2015 Free Software Foundation, Inc.\n”
    ~”License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html&gt;\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”
    ~”This GDB was configured as \”–host=x86_64-pokysdk-linux –target=arm-poky-linux-gnueabi\”.\nType \”show configuration\” for configuration details.”
    ~”\nFor bug reporting instructions, please see:\n”
    ~”<http://www.gnu.org/software/gdb/bugs/&gt;.\n”
    ~”Find the GDB manual and other documentation resources online at:\n<http://www.gnu.org/software/gdb/documentation/&gt;.\n”
    ~”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”,”python”]
    -gdb-set stop-on-solib-events 1
    ^done
    -gdb-set disassembly-flavor intel
    ^error,msg=”No symbol \”disassembly\” in current context.”
    -gdb-set print demangle off
    ^done
    -break-insert -f main
    ^done,bkpt={number=”1″,type=”breakpoint”,disp=”keep”,enabled=”y”,addr=”0x00010734″,func=”main(int, char**)”,file=”LinuxProject1.cpp”,fullname=”/tmp/VisualGDB/c/Data/Projects/Vision_iMX/vc_projects/LinuxProject1/LinuxProject1/LinuxProject1.cpp”,line=”7″,thread-groups=[“i1″],times=”0″,original-location=”main”}
    -gdb-set solib-search-path /tmp/VisualGDB/c/Data/Projects/Vision_iMX/vc_projects/LinuxProject1/LinuxProject1/Debug
    ^done
    -gdb-show sysroot
    ^done
    -gdb-show debug-file-directory
    ^done,value=”/opt/fsl-imx-x11/4.1.15-1.1.1/sysroots/x86_64-pokysdk-linux/usr/lib/arm-poky-linux-gnueabi/debug”
    -target-select remote 192.168.0.100:2000
    ^error,msg=”192.168.0.100:2000: Connection timed out.”
    info target
    &”info target\n”
    ~”Symbols from \”/tmp/VisualGDB/c/Data/Projects/Vision_iMX/vc_projects/LinuxProject1/LinuxProject1/Debug/LinuxProject1\”.\n”
    ~”Local exec file:\n”
    ~”\t`/tmp/VisualGDB/c/Data/Projects/Vision_iMX/vc_projects/LinuxProject1/LinuxProject1/Debug/LinuxProject1′, file type elf32-littlearm.\n”
    ~”\tEntry point: 0x105fc\n”
    ~”\t0x00010134 – 0x0001014d is .interp\n”
    ~”\t0x00010150 – 0x00010170 is .note.ABI-tag\n”
    ~”\t0x00010170 – 0x00010194 is .note.gnu.build-id\n”
    ~”\t0x00010194 – 0x000101dc is .gnu.hash\n”
    ~”\t0x000101dc – 0x000102cc is .dynsym\n”
    ~”\t0x000102cc – 0x0001048a is .dynstr\n”
    ~”\t0x0001048a – 0x000104a8 is .gnu.version\n”
    ~”\t0x000104a8 – 0x00010518 is .gnu.version_r\n”
    ~”\t0x00010518 – 0x00010528 is .rel.dyn\n”
    ~”\t0x00010528 – 0x00010570 is .rel.plt\n”
    ~”\t0x00010570 – 0x0001057c is .init\n”
    ~”\t0x0001057c – 0x000105fc is .plt\n”
    ~”\t0x000105fc – 0x00010864 is .text\n”
    ~”\t0x00010864 – 0x0001086c is .fini\n”
    ~”\t0x0001086c – 0x0001087c is .rodata\n”
    ~”\t0x0001087c – 0x00010888 is .ARM.extab\n”
    ~”\t0x00010888 – 0x000108a0 is .ARM.exidx\n”
    ~”\t0x000108a0 – 0x000108a4 is .eh_frame\n”
    ~”\t0x000208a4 – 0x000208ac is .init_array\n”
    ~”\t0x000208ac – 0x000208b0 is .fini_array\n”
    ~”\t0x000208b0 – 0x000208b4 is .jcr\n”
    ~”\t0x000208b4 – 0x000209bc is .dynamic\n”
    ~”\t0x000209bc – 0x000209f0 is .got\n”
    ~”\t0x000209f0 – 0x000209f4 is .data\n”
    ~”\t0x000209f4 – 0x00020a88 is .bss\n”
    ^done
    -exec-continue
    ^error,msg=”The program is not being run.”
    — GDBServer output —
    Process /home/root/LinuxProject1 created; pid = 559

    Listening on port 2000

    #8222
    peter_cz
    Participant

    reading your tutorial I can’t get behavior

    http://visualgdb.com/tutorials/linux/edison/

    @ step 13. I can’t get output to “gdbserver” window is not started and code does not enter debug mode.

    #8224
    support
    Keymaster

    Hi,

    Normally VisualGDB will automatically deploy everything when you start debugging.

    If GDB reports the “Connection timed out.” error, most likely either the gdbserver failed to initialize properly, or your firewall is blocking the connection. Does the gdbserver window in Visual Studio show any errors, or is it reporting a successfully opened socket on port 2000?

    #8225
    peter_cz
    Participant

    After I do right click and from context menu choose Debug -> Start New Instance then I got dialog “Select Process to attach debugger to” then Debugging failed whatever process I choose.

    Otherwise not selecting a process i have almost nothing happening but within VisualGDB Program Output it’s displayed

    Process /home/root/LinuxProject1 created; pid = 559
    Listening on port 2000

    And really nothing is happening, no debug, debugger is not started and no stepping thru the code etc…

     

    #8229
    support
    Keymaster

    If VisualGDB asks for a process to attach, it means that your debug settings have “Attach to a process” selected. Please open VisualGDB Project Properties and change gdb launch mode to “Debug a new instance”. This should resolve the problem.

    #8231
    peter_cz
    Participant

    (gdb begin)
    Your VisualGDB trial expires in 28 days!
    /opt/fsl-image-4.1.15-debug/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gdb –interpreter mi –args “/tmp/VisualGDB/c/Data/Projects/Vision_iMX/vc_projects/LinuxProject1/LinuxProject1/Debug/LinuxProject1″
    =thread-group-added,id=”i1″
    -gdb-version
    ~”GNU gdb (GDB) 7.9.1\n”
    ~”Copyright (C) 2015 Free Software Foundation, Inc.\n”
    ~”License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html&gt;\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”
    ~”This GDB was configured as \”–host=x86_64-pokysdk-linux –target=arm-poky-linux-gnueabi\”.\nType \”show configuration\” for configuration details.”
    ~”\nFor bug reporting instructions, please see:\n”
    ~”<http://www.gnu.org/software/gdb/bugs/&gt;.\n”
    ~”Find the GDB manual and other documentation resources online at:\n<http://www.gnu.org/software/gdb/documentation/&gt;.\n”
    ~”For help, type \”help\”.\n”
    ~”Type \”apropos word\” to search for commands related to \”word\”…\n”
    ~”Reading symbols from /tmp/VisualGDB/c/Data/Projects/Vision_iMX/vc_projects/LinuxProject1/LinuxProject1/Debug/LinuxProject1…”
    ~”done.\n”
    ~”GNU gdb (GDB) 7.9.1\n”
    ~”Copyright (C) 2015 Free Software Foundation, Inc.\n”
    ~”License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html&gt;\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”
    ~”This GDB was configured as \”–host=x86_64-pokysdk-linux –target=arm-poky-linux-gnueabi\”.\nType \”show configuration\” for configuration details.”
    ~”\nFor bug reporting instructions, please see:\n”
    ~”<http://www.gnu.org/software/gdb/bugs/&gt;.\n”
    ~”Find the GDB manual and other documentation resources online at:\n<http://www.gnu.org/software/gdb/documentation/&gt;.\n”
    ~”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”,”python”]
    -gdb-set stop-on-solib-events 1
    ^done
    -gdb-set disassembly-flavor intel
    -gdb-set print demangle off
    ^error,msg=”No symbol \”disassembly\” in current context.”
    ^done
    -break-insert -f main
    ^done,bkpt={number=”1″,type=”breakpoint”,disp=”keep”,enabled=”y”,addr=”0x00010794″,func=”main(int, char**)”,file=”LinuxProject1.cpp”,fullname=”/tmp/VisualGDB/c/Data/Projects/Vision_iMX/vc_projects/LinuxProject1/LinuxProject1/LinuxProject1.cpp”,line=”8″,thread-groups=[“i1″],times=”0″,original-location=”main”}
    -gdb-set solib-search-path /tmp/VisualGDB/c/Data/Projects/Vision_iMX/vc_projects/LinuxProject1/LinuxProject1/Debug
    ^done
    -gdb-show sysroot
    ^done
    -gdb-show debug-file-directory
    ^done,value=”/opt/fsl-imx-x11/4.1.15-1.1.1/sysroots/x86_64-pokysdk-linux/usr/lib/arm-poky-linux-gnueabi/debug”
    -target-select remote 192.168.0.100:2000
    000-data-evaluate-expression 0
    ^error,msg=”192.168.0.100:2000: Connection timed out.”
    000^done,value=”0″
    info target
    &”info target\n”
    ~”Symbols from \”/tmp/VisualGDB/c/Data/Projects/Vision_iMX/vc_projects/LinuxProject1/LinuxProject1/Debug/LinuxProject1\”.\n”
    ~”Local exec file:\n”
    ~”\t`/tmp/VisualGDB/c/Data/Projects/Vision_iMX/vc_projects/LinuxProject1/LinuxProject1/Debug/LinuxProject1′, file type elf32-littlearm.\n”
    ~”\tEntry point: 0x1065c\n”
    ~”\t0x00010134 – 0x0001014d is .interp\n”
    ~”\t0x00010150 – 0x00010170 is .note.ABI-tag\n”
    ~”\t0x00010170 – 0x00010194 is .note.gnu.build-id\n”
    ~”\t0x00010194 – 0x000101e4 is .gnu.hash\n”
    ~”\t0x000101e4 – 0x000102f4 is .dynsym\n”
    ~”\t0x000102f4 – 0x000104be is .dynstr\n”
    ~”\t0x000104be – 0x000104e0 is .gnu.version\n”
    ~”\t0x000104e0 – 0x00010550 is .gnu.version_r\n”
    ~”\t0x00010550 – 0x00010560 is .rel.dyn\n”
    ~”\t0x00010560 – 0x000105b8 is .rel.plt\n”
    ~”\t0x000105b8 – 0x000105c4 is .init\n”
    ~”\t0x000105c4 – 0x0001065c is .plt\n”
    ~”\t0x0001065c – 0x0001098c is .text\n”
    ~”\t0x0001098c – 0x00010994 is .fini\n”
    ~”\t0x00010994 – 0x000109ec is .rodata\n”
    ~”\t0x000109ec – 0x000109f8 is .ARM.extab\n”
    ~”\t0x000109f8 – 0x00010a10 is .ARM.exidx\n”
    ~”\t0x00010a10 – 0x00010a14 is .eh_frame\n”
    ~”\t0x00020a14 – 0x00020a1c is .init_array\n”
    ~”\t0x00020a1c – 0x00020a20 is .fini_array\n”
    ~”\t0x00020a20 – 0x00020a24 is .jcr\n”
    ~”\t0x00020a24 – 0x00020b2c is .dynamic\n”
    ~”\t0x00020b2c – 0x00020b68 is .got\n”
    ~”\t0x00020b68 – 0x00020b6c is .data\n”
    ~”\t0x00020b6c – 0x00020c00 is .bss\n”
    ^done
    -exec-continue
    ^error,msg=”The program is not being run.”
    — GDBServer output —
    Process /home/root/LinuxProject1 created; pid = 602

    Listening on port 2000

Viewing 15 posts - 16 through 30 (of 43 total)
  • You must be logged in to reply to this topic.