Monday, December 11th 2017, 11:43pm UTC+1

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to SEGGER Forum. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

trilogi

Beginner

Date of registration: Apr 11th 2014

Posts: 4

1

Saturday, April 12th 2014, 3:10am

J-Link Internal Error: CPU_REG_GetNum(): No handler found for CPU_CMD_GET_NUM_REGS.

I am setting up a new ST chip that has a Cortex M4 processor to work with the CooCox CoIDE (with GNU toolchain). As the chip is not listed on any of the chip list in the CoIDE, I have to setup the project by using the
generic M4 configuration and I have modified the M4.XML to fit the address and size of the embedded flash and RAM on this processor:

IROM: starting address 0x00000000 size = 0x100000
IRAM: starting address 0x20000000 size = 0x20000

I am able to build and upload the program into the processor
via J-Link interface that the evaluation board provides.

The attachment are the screen shot of the CoIDE debugger as well as the J-Link popup window.

However, when I try to debug the debugger is unable to display the source code. It just say "<Symbol is not available>" and stop there.

I am able to view the memory content of the flash and RAM (I verified it with J-Mem and they are correct) so I know the M4.xml setup is correct and J-Link is working correctly. But debugging is not possible. In addition, there is a J-link message window popup with title "J-Link V4.84a Internal Error" and the message says:

CPU_REG_GetNum(): No handler found for CPU_CMD_GET_NUM_REGS.

I am so close to getting the CoIDE to work with the chip except for this issue of not being able to view the source code in the debugger. Any help will be most appreciated.

Attached are the screen shot of the CoIDE debugger as well as the J-Link error window.
trilogi has attached the following images:
  • CoIDE Debugger screen shot.png
  • J-link CPU_REG_GetNum() not found error.jpg

SEGGER - Alex

Super Moderator

Date of registration: Dec 18th 2007

Posts: 1,514

2

Wednesday, April 16th 2014, 9:55am

Hi,

I checked the source and it is impossible that this error message comes up in case a Cortex-M4 has been properly identified.
You are using CoIDE + J-Link GDBServer + J-Link to connect to the device, correct?

Can you please send us a logfile of the GDBServer when the session is started and this error appears?
A GDBServer logfile can be created by checking the "Generate logfile" checkbox in J-Link GDBServer. The logfile is placed in the same directory where the executable of the GDBServer is placed.


- Alex

trilogi

Beginner

Date of registration: Apr 11th 2014

Posts: 4

3

Saturday, April 19th 2014, 10:33am

J-Link Internal Error: CPU_REG_GetNum(): No handler found for CPU_CMD_GET_NUM_REGS.

Sorry for replying late. I was busy with another project in the last few days.

Yes I am using CoIDE that interface to the built-in J-Link interface on the evaluation board that ST Micro produces.

However because the new STM device is not listed in any of the devices listed in the CoIDE, I have followed the advise by CooCox as shown in the following forum thread.

http://www.coocox.org/forum/topic.php?id=3475

Instead of M3 I have modified the M4.XML so that it matches the memory map of the new STM device.

After that I have selected "ARM CORTEXT-M4" from the CoIDE device list and that is when I managed to download the flash and able to read the content of the flash and RAM and they appear to be all OK. Except I am unable to debug. The Logfile.txt is attached.

Could that be the cause of the problem? Is it because it is not a device manufactured by ARM? When I tried to download I got a prompt windows as follow:

I then selected NO and after that I got the error windows as per the original post.
trilogi has attached the following files:
  • M4.zip (440 Byte - 243 times downloaded - Last download: Dec 6th 2017, 3:07pm)
  • LOGFILE.TXT (12.01 kB - 354 times downloaded - Last download: Today, 10:24pm)

This post has been edited 1 times, last edit by "trilogi" (Apr 19th 2014, 7:45pm)


trilogi

Beginner

Date of registration: Apr 11th 2014

Posts: 4

4

Saturday, April 19th 2014, 7:59pm

Following my last post I restarted CoIDE, deleted the old log file and and started the debugging session again. This time when the prompt for device selection appears I selected the "Unspecified Cortex M4" as the device and J-Link no longer report the error. But I am still unable to view any source code when the execution stop at the first line.

I have attached the Logfile again for this session. Is the inability to debug a problem with CoIDE and not J-Link anymore?

Thanks for looking into this log file.
trilogi has attached the following file:
  • LOGFILE2.TXT (92.09 kB - 344 times downloaded - Last download: Today, 10:24pm)

SEGGER - Alex

Super Moderator

Date of registration: Dec 18th 2007

Posts: 1,514

5

Friday, April 25th 2014, 9:27pm

Hi,

The internal error has been corrected in V4.84d: http://www.segger.com/jlink-software.html

Quoted

I have attached the Logfile again for this session. Is the inability to debug a problem with CoIDE and not J-Link anymore?

From the J-Link side, everything is fine.

Quoted

I am still unable to view any source code when the execution stop at the first line.

Definitely *not* a problem on the J-Link side. More something for the CoIDE support team...


Best regards
Alex