3 Replies Latest reply on Aug 5, 2015 1:17 PM by PabloM_Intel

    Galileo Gen 2 SPI-Flash Kernel Debugging?

    Radiian

      Does anyone have any experience debugging a SPI-Flash image for a Galileo Gen2? I'm working on a project that's running purely on flash with no SD/USB image and we want to debug the kernel. I can attach with JTAG and at least halt and resume, but I can't find the debug symbols to load into gdb. All the documentation that I can find for kernel debugging seems to only apply to a full SD image. Anyone know where to get or make the debug symbols? Thanks!

        • 1. Re: Galileo Gen 2 SPI-Flash Kernel Debugging?
          PabloM_Intel

          Hi Radiian,

           

          Could you please share the line you’re entering when trying to debug your code? Are you getting this message: “(no debugging symbols found)”?

           

          Regards,

          PabloM_Intel

          • 2. Re: Galileo Gen 2 SPI-Flash Kernel Debugging?
            Radiian

            I think I may have written my problem wrong. I was following the guide for debugging the kernel, but it only seems to apply to a full image. One part of the documentation shows loading the debug symbols for the kernel so the debugger can step through functions, but I can't find the debug symbols for the spi-flash image. I can read registers fine, but when I run "monitor step" from gdb it says "cannot find bounds of current function"

            EDIT:

            Also, every time I run something like x/3i $eax in gdb it gives me the values, but openocd gives errors like this:
            Error: calcaddr_pyhsfromlin page directory entry at 0x001dc000 is not present

            Error: x86_32_common_read_memory failed to calculate physical address from 0x00000006

            • 3. Re: Galileo Gen 2 SPI-Flash Kernel Debugging?
              PabloM_Intel

              Hi Radiian,

               

              Have you enabled the kernel debug info options under the menuconfig when building the kernel? I’m not sure about this but it is possible that the kernel is not being configured with this information so this might be the problem. Other option would be to debug your kernel by using the printk function, but I’m not sure if this enough for your needs. I’m still looking into this so I hope to find some other suggestions.

               

              Regards,

              PabloM_Intel