Cart New Account Login

HomeAbout usProductsSupportForumsBlogCustomer Service

search inside this forum
No source available for "0xfffffffe" KDS 3.0 & PE Micro latest GDB server
Robert N. Dec 8, 2015 at 05:38 PM (17:38 hours)
Staff: Gerardo R.

  • Target Board = K60FN1M0M12. PEMicro Interface Settings

    Connection from "127.0.0.1" via 127.0.0.1
    Copyright 2012 P&E Microcomputer Systems,Inc.
    Command Line :C:\Freescale\KDS_3.0.0\eclipse\plugins\com.pemicro.debug.gdbjtag.pne_2.2.5.201511061812\win32\pegdbserver_console -device=Freescale_K6x_K60FN1M0M12 -startserver -singlesession -serverport=7224 -interface=USBMULTILINK -speed=5000 -port=USB1 

    CMD>RE

    Initializing.
    Target has been RESET and is active.
    CMD>CM C:\Freescale\KDS_3.0.0\eclipse\plugins\com.pemicro.debug.gdbjtag.pne_2.2.5.201511061812\win32\gdi\P&E\supportFiles_ARM\Freescale\K6x\freescale_k60fn1m0m12_1x32x256k_pflash.arp

    Initializing.
    Initialized.

    ;version 1.08, 06/02/2014, Copyright 2014 P&E Microcomputer Systems, Inc. All rights reserved. www.pemicro.com [mk_1024k_n_pflash0_pflash1]

    ;device freescale, k60fn1m0m12, 1x32x256k, desc=pflash

    ;begin_cs device=$00000000, length=$00100000, ram=$20000000

    Loading programming algorithm ...
    Done.
    CMD>EM

    Erasing.
    Module has been erased.

    Initializing.
    Initialized.

    ;version 1.08, 06/02/2014, Copyright 2014 P&E Microcomputer Systems, Inc. All rights reserved. www.pemicro.com [mk_1024k_n_pflash0_pflash1]

    ;device freescale, k60fn1m0m12, 1x32x256k, desc=pflash

    ;begin_cs device=$00000000, length=$00100000, ram=$20000000

    Loading programming algorithm ...
    Done.
    CMD>PM

    Programming.
    Processing Object File Data ...
    .
    Programmed.
    CMD>VC
    Verifying object file CRC-16 to device ranges ...
    block 00000400-0000040F ...
    Ok.

    block 00000420-00001A9F ...
    Ok.

    Checksum Verification Successful. (Cumulative CRC-16=$3B66)

    CMD>RE

    Initializing.
    Target has been RESET and is active.

    GNU gdb (GNU Tools for ARM Embedded Processors) 7.6.0.20140731-cvs
    Copyright (C) 2013 Free Software Foundation, Inc.
    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-none-eabi".
    For bug reporting instructions, please see:
    <http://www.gnu.org/software/gdb/bugs/>;.
    monitor selectcore 0
    Warning: the current language does not match this frame.
    No source file named C:\\Freescale\\Freescale_MQX_4_2\\mqx\\examples\\hello\\hello.c.
    continue
    Continuing.
    Note: automatically using hardware breakpoints for read-only addresses.

    Program received signal SIGTRAP, Trace/breakpoint trap.
    0xfffffffe in ?? ()

    What needs to be done in debug configuration to fix the problem?




    Comments

    • KDS provides the following linker configuration below.Is there anything wrong with it? 

      ENTRY(__boot)

      /*
      _cfm - to keep vectors.c variables
      __init_hardware - must be used from bsp.a, not from librt.a
      */
      EXTERN(_cfm __init_hardware)

      MEMORY
      {
      vectorrom (RX): ORIGIN = 0x00000000, LENGTH = 0x00000400
      cfmprotrom (R): ORIGIN = 0x00000400, LENGTH = 0x00000020
      rom (RX): ORIGIN = 0x00000420, LENGTH = 0x0007FBE0 /* Code + Const data */
      ram (RW): ORIGIN = 0x1FFF0000, LENGTH = 0x00020000 /* SRAM - RW data */

      /* kernel space starts after RAM variables (Location of MQX Kernel data + MQX heap) */
      end_of_kd (RW): ORIGIN = 0x2000FFF0, LENGTH = 0x00000000

      /* Boot stack reused by MQX Kernel data */
      bstack (RW): ORIGIN = 0x2000FA00, LENGTH = 0x00000200 /* Boot stack */
      end_bstack (RW): ORIGIN = 0x2000FC00, LENGTH = 0x00000000 /* Boot stack end address requires 4B alignment */
      }

      SECTIONS
      {
      __INTERNAL_SRAM_BASE = 0x1FFF0000;
      __INTERNAL_SRAM_SIZE = 0x00020000;
      __SRAM_POOL = 0x2000FFF0;

      __INTERNAL_FLASH_BASE = 0x00000000;
      __INTERNAL_FLASH_SIZE = 0x00100000;

      __INTERNAL_FLEXNVM_BASE = 0;
      __INTERNAL_FLEXNVM_SIZE = 0;

      __UNCACHED_DATA_START = 0x1FFF0000;
      __UNCACHED_DATA_SIZE = 0x00020000;
      __UNCACHED_DATA_END = 0x2000FFF0;

      __EXTERNAL_MRAM_BASE = 0xA0000000;
      __EXTERNAL_MRAM_SIZE = 0x00080000;
      __EXTERNAL_MRAM_ROM_BASE = 0xA0000000;
      __EXTERNAL_MRAM_ROM_SIZE = 0x00000000;
      __EXTERNAL_MRAM_RAM_BASE = 0xA0000000;
      __EXTERNAL_MRAM_RAM_SIZE = 0x00080000;

      __EXTERNAL_LCD_BASE = 0xA0000000;
      __EXTERNAL_LCD_SIZE = 0x1FFFF;
      __EXTERNAL_LCD_DC_BASE = 0xA0010000;

      /* MQX link time configurations */
      __DEFAULT_PROCESSOR_NUMBER = 1;
      __DEFAULT_INTERRUPT_STACK_SIZE = 1024;
      __KERNEL_DATA_VERIFY_ENABLE = 0; /* Test SDRAM read/write */

      /* Flashx configurations */
      __FLASHX_SECT_SIZE = 0x1000;

      /* Non-Initialized buffer space. */
      __COLDRAM_SIZE = 0x3000;

      .vectors :
      {
      __vector_table = .;
      __VECTOR_TABLE_ROM_START = __vector_table;
      KEEP(*(.vectors_rom))
      . = ALIGN (0x4);
      } > vectorrom

      /* Flash protection bits */
      .cfmprotect :
      {
      KEEP(*(.cfmconfig))
      . = ALIGN (0x4);
      } > cfmprotrom

      .text :
      {
      *(KERNEL)
      *(.text*)
      *(.rodata*)

      /* unwind exception frame */
      KEEP(*(.eh_frame))
      KEEP(*(.eh_frame_hdr))
      /* constructors */
      . = ALIGN(0x8);
      KEEP (*crtbegin.o(.ctors))
      KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
      KEEP (*(SORT(.ctors.*)))
      KEEP (*crtend.o(.ctors))
      /* destructors */
      KEEP (*crtbegin.o(.dtors))
      KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
      KEEP (*(SORT(.dtors.*)))
      KEEP (*crtend.o(.dtors))
      /* preinit_array */
      __preinit_array_start = .;
      KEEP (*(.preinit_array*))
      __preinit_array_end = .;
      /* init_array */
      __init_array_start = .;
      KEEP (*(SORT(.init_array.*)))
      KEEP (*(.init_array*))
      __init_array_end = .;
      /* fini_array */
      __fini_array_start = .;
      KEEP (*(SORT(.fini_array.*)))
      KEEP (*(.fini_array*))
      __fini_array_end = .;
      /* gnu arm zero table */
      . = ALIGN(4);
      __zero_table_start__ = .;
      LONG (_bss_start)
      LONG (_bss_end - _bss_start)
      __zero_table_end__ = .;

      /* gnu arm copy table */
      . = ALIGN(4);
      __copy_table_start__ = .;
      LONG (LOADADDR(.data))
      LONG (_data_start)
      LONG (_data_end - _data_start)
      __copy_table_end__ = .;
      } > rom

      ........

  • It looks like you have not properly programmed a reset vector. Is your application's address space offset from 0x0000_0000? You will need to modify your linker configuration to include a vector table starting at the base address. Please refer to your tool chain user guides for more information.

    • More gdb info:
      ource .gdbinit
      set mem inaccessible-by-default off
      cmd-param-changed,param=mem inaccessible-by-default,value=off
      gdb-set auto-solib-add on
      set tcp auto-retry on
      set tcp connect-timeout 240
      source .gdbinit
      .gdbinit: No such file or directory.
      error,msg=.gdbinit: No such file or directory.
      target-select remote localhost:7224
      thread-group-started,id=i1,pid=42000
      thread-created,id=1,group-id=i1
      ad-groups
      stopped,frame={addr=0xfffffffe,func=??,args=[]},thread-id=1,stopped-threads=all
      connected
      error,msg=Can not fetch data now.
      done,groups=[{id=i1,type=process,pid=42000}]
      monitor semihosting 0,51794
      monitor preserve0 0
      monitor preserve1 0
      monitor preserve2 0
      monitor trim 0
      monitor partition 0
      monitor preservepartition 0
      &monitor semihosting 0,51794
      @Command Executed successfully: semihosting 0,51794
      symbol-file C:\\Freescale\\Freescale_MQX_4_2\\mqx\\examples\\hello\\build\\kds\\hello_twr\
      k60f120m\\int flash release\\hello.elf
      load C:\\Freescale\\Freescale_MQX_4_2\\mqx\\examples\\hello\\build\\kds\\hello_twrk60f120\
      m\\int flash release\\hello.elf
      symbol-file \C:\\\\Freescale\\\\Freescale_MQX_4_2\\\\mqx\\\\examples\\\\hello\\\\build\\\\
      \kds\\\\hello_twrk60f120m\\\\int flash release\\\\hello.elf\
      Reading symbols from C:\\Freescale\\Freescale_MQX_4_2\\mqx\\examples\\hello\\build\\kds\\h\
      ello_twrk60f120m\\int flash release\\hello.elf...
      load \C:\\\\Freescale\\\\Freescale_MQX_4_2\\\\mqx\\\\examples\\\\hello\\\\build\\\\kds\\\\
      \hello_twrk60f120m\\\\int flash release\\\\hello.elf\
      -gdb-show --thread-group i1 language
      Loading section .cfmprotect, size 0x10 lma 0x400
      download,{section=.cfmprotect,section-size=16,total-size=9227342}
      Loading section .text, size 0x1248 lma 0x420
      download,{section=.text,section-size=4680,total-size=9227342}
      Loading section .ARM, size 0x8 lma 0x1668
      download,{section=.ARM,section-size=8,total-size=9227342}
      Loading section .data, size 0x430 lma 0x1670
      download,{section=.data,section-size=1072,total-size=9227342}
      Start address 0xba8, load size 5776
      Transfer rate: 2 KB/sec, 722 bytes/write.
      done,threads=[{id=1,target-id=Thread <main>,frame={level=0,addr=0x00000ba8,func=\
      __boot,args=[],file=..\\..\\..\\..\\source\\psp\\cortex_m\\core\\M4/boot.S,fullname=C:\\Freescal\
      e\\Freescale_MQX_4_2\\mqx\\source\\psp\\cortex_m\\core\\M4\\boot.S,line=66},state=stopped}]
      done,value=auto
      -gdb-set --thread-group i1 language c
      -stack-info-depth --thread 1 11
      Warning: the current language does not match this frame.
      done,depth=1
      -interpreter-exec --thread-group i1 console p/x (char)-1
      1 = 0xff
      -data-evaluate-expression --thread-group i1 sizeof (void*)
      done,value=4
      -gdb-set --thread-group i1 language auto
      -interpreter-exec --thread-group i1 console show endian
      The target endianness is set automatically (currently little endian)
      -break-insert --thread-group i1 -f C:\\Freescale\\Freescale_MQX_4_2\\mqx\\examples\\hello\\hello.c:68
      -break-insert --thread-group i1 -t -f C:\\Freescale\\Freescale_MQX_4_2\\mqx\\build\\kds\\b\
      sp_twrk60f120m\\Sources\\main.c:main
      No source file named C:\\\\Freescale\\\\Freescale_MQX_4_2\\\\mqx\\\\examples\\\\hello\\\\hello.c.
      done,bkpt={number=1,type=breakpoint,disp=keep,enabled=y,addr=<PENDING>,pending=\
      C:\\\\Freescale\\\\Freescale_MQX_4_2\\\\mqx\\\\examples\\\\hello\\\\hello.c:68,times=0,original-\
      location=C:\\\\Freescale\\\\Freescale_MQX_4_2\\\\mqx\\\\examples\\\\hello\\\\hello.c:68},bkpt={number=2,type=breakpoint,disp=del,enabled=y,addr=0x0000163e,func=ma\
      in,file=..\\Sources\\main.c,fullname=C:\\Freescale\\Freescale_MQX_4_2\\mqx\\build\\kds\\bsp_twrk\
      60f120m\\Sources\\main.c,line=50,thread-groups=[i1],times=0,original-location=C:\\\\Freescal\
      e\\\\Freescale_MQX_4_2\\\\mqx\\\\build\\\\kds\\\\bsp_twrk60f120m\\\\Sources\\\\main.c:main}
      Note: automatically using hardware breakpoints for read-only addresses.
      running
      running,thread-id=all
      Program received signal
      SIGTRAP, Trace/breakpoint trap.
      0xfffffffe in ?? ()
      *stopped,frame={addr=0xfffffffe,func=??,args=[]},thread-id=1,stopped-threads=all
      -stack-info-depth --thread 1 2
      done,depth=2
      thread-info 1
      -list-thread-groups
      -stack-list-locals --thread 1 --frame 0 1
      done,threads=[{id=1,target-id=Thread <main>,frame={level=0,addr=0xfffffffe,func=\
      ??,args=[]},state=stopped}]
      done,groups=[{id=i1,type=process,pid=42000}]
      done,locals=[]
      -stack-info-depth --thread 1 11
      done,depth=3
      -stack-list-frames --thread 1 0 50
      done,stack=[frame={level=0,addr=0xfffffffe,func=??},frame={level=1,addr=0xffffff\
      ff,func=??},frame={level=2,addr=0xffffffff,func=??}]
      stack-list-frames --thread 1 0 2
      done,stack=[frame={level=0,addr=0xfffffffe,func=??},frame={level=1,addr=0xffffff\
      ff,func=??},frame={level=2,addr=0xffffffff,func=??}]

  • I rebuild the whole development tool chain and the gdb problem went away. I think, my previous bsp setup was somehow messed up or corrupted.

Add comment


   Want to comment? Please login or create a new PEMicro account.







© 2017 P&E Microcomputer Systems Inc.
Website Terms of Use and Sales Agreement