Author Topic: using KDS with custom K22FX512 board, GDB seems to keep crashing  (Read 182 times)

Offline Brynn

  • Newbie
  • *
  • Posts: 1
    • View Profile
Just starting with uTasker,  after some problems with the open source version not compiling because it didn't exclude the STM directorys, I will be licensing the full version  and Mark gave access to it.   

After 'Git'ing the latest version and importing into KDS 3.2,  and making the indexer fix, and adjusting the linker file,  this code compiles fine (it already had the FRDM_K22K defined in config.h).
However, with or without me defining the CRYSTAL_FREQUENCY as 16000000 and CLOCK_DIV as 4,  the code does not run - actually I think it may run fine but GDB breaks with the following error message in the console:  when I try to single step into the code (that appears to be sitting on location 0x0, the reset vector).

 
112,781 (gdb)
118,031 53-exec-step --thread 1 1
118,037 ~"/home/build/work/GCC-4-8-build/src/gdb/gdb/thread.c:615: internal-error: is_thread_state: \
Assertion `tp' failed.\nA problem internal to GDB has been detected,\nfurther debugging may prove un\
reliable.\nQuit this debugging session? "
118,037 ~"(y or n) [answered Y; input not from terminal]\n"
118,037 ~"/home/build/work/GCC-4-8-build/src/gdb/gdb/thread.c:615: internal-error: is_thread_state: \
Assertion `tp' failed.\nA problem internal to GDB has been detected,\nfurther debugging may prove un\
reliable.\nCreate a core file of GDB? "
118,037 ~"(y or n) [answered Y; input not from terminal]\n"

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3000
    • View Profile
    • uTasker
Re: using KDS with custom K22FX512 board, GDB seems to keep crashing
« Reply #1 on: July 26, 2019, 03:35:22 AM »
Hi Brynn$

I have fixed the open source version for KDS so that its serial loader target excludes the STM32 hardware directories.

Unfortunately the debug errors don't mean anything to me - are you sure that you have set up a debug target correctly?

For work with the serial loader I would recommend that you install IAR Kickstart and use that since its is much easier to work with the debugger (it just works). IAR will give you tighter code too (although not hugely better than GCC nowadays). The Kick Start version is OK up to 32k, which is why the serial loader can be used with it.

If you can find a fix for the GDB crashing you can then build in both environments and choose your favorite.

Regards

Mark