Skip to end of banner
Go to start of banner

How to debug netX 90 application side with J-Link debug probe from SEGGER?

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Q

How to debug netX 90 application side with J-Link debug probe from SEGGER?

A

Hilscher provides netX Studio CDT IDE (Integrated Development Environment) for customers for developing application software for the netX 90 SoC. The main goal is to provide an out-of-the-box working solution for building and debugging applications for the netX SoC. netX Studio CDT is provided to customers free of charge and aims to make it easy for them to evaluate netX as a platform for their custom designs. The software (https://kb.hilscher.com/display/NDT) and Documentation are available on Hilscher Knowledgebase(https://kb.hilscher.com/).

SEGGER's J-Link supports a wide range of CPUs and is very popular with some netX customers. Since SEGGER added support for netX 90, which allows customers to use the tools from the J-Link Software and Documentation Pack and the Ozone J-Link Debugger, we provide here a step-by-step guide for debugging the netX 90 application side with J-Link.

Prerequisites

Please use J-Link Software and Documentation Pack v7.60 or later.

The v7.60 release includes the following fixes for netX 90:

  • Hilscher NetX90 Com Core RAM base address for RAMCode was wrong. Fixed.
  • Hilscher NetX90 Com core reset and halt after bootloader handling, fixed.
  • Hilscher NetX90 Com core used software reset instead of reset pin toggling within reset routine. Fixed.

For use case B and use case C with an external SQI flash, please use J-Link Software and Documentation Pack v7.86c or later.

The v7.86c release includes the following new feature for netX 90:

  • Hilscher NetX90: Added SQI(QSPI) flash programming support.

J-Link support in netX Studio CDT

Currently, netX Studio CDT supports debugging with J-Link in one of the following two ways:

  • J-Link with OpenOCD (not recommended)
  • J-Link with GDB Server (not recommended)

Using J-Link with OpenOCD

In general, it is possible to use J-Link with OpenOCD, but it's not recommended due to the following main reason:

  • To use the J-Link debug probe with OpenOCD, you have to replace the original J-Link USB driver with WinUSB using a tool like Zadig.
  • It does not make use of any high level logic etc. and therefore is much slower than the proprietary SEGGER J-Link DLL / GDBServer / ... implementation.
  • Once the J-Link USB driver has been replaced, no SEGGER software from the J-Link software package will be able to communicate with J-Link anymore. To use SEGGER J-Link software again, the USB driver needs to be switched back to its default.

Please see further limitations and support from SEGGE: https://wiki.segger.com/OpenOCD

Using J-Link with GDB Server

netX Studio CDT supports debugging with a different GDB server backend than OpenOCD, e.g. SEGGER J-Link GDB Server. (Please refer to the attached example project, which has ready-to-use batch scripts for programming the flash and starting the gdb server etc by calling the batch file in the Terminal of netX Studio CDT.)

It's not recommended as well, since to use the full feature of J-Link Debugger, Ozone is supposed to be used. If you still want to use netX Studio CDT as a frontend, please note the following:

  • Start J-Link GDB Server (Run jlinkgdbserver_run.bat) before starting debugging in netX Studio CDT
  • Disable "Start OpenOCD automatically" in Debug Settings →Target Settings
  • Don't choose "Load image (gdb load)" if the application is running directly in internal flash (The NAI firmware must be flashed manually before debugging.)
  • Remote Target's "Host name or IP address" should be localhost and the Port number should be 3333.
  • To debug application on SDRAM, the SDRAM muss be available and configured correctly. (NXHX-SDRSPM extension board must be connected if NXHX 90-JTAG board is in use.)

Remote target port

By default J-Link GDB Server starts at port 2331. In the example scripts the port is set to 3333 which is the default port for OpenOCD. The "Remote Target" settings were introduced in netX Studio CDT V1.1000 where you can configure the port and set it to 2331. For older netX Studio versions, the remote target port is hard-coded to 3333 so JLinkGDBServer.exe has to be started with the option "-port 3333".

Hardware reset

By default J-Link performs a reset via the SYSRESETREQ of the Cortex-M CPU. The setup_target.jlinkscript included with the example configures J-Link to use a hardware reset via the RST_IN_N pin. See https://wiki.segger.com/J-Link_Reset_Strategies for more info.

Using J-Link with J-Link Debugger (Ozone)

Generally, debug elf file: 1. sdram

2. flash

download manual.

Before debugging, the netX 90 internal flash needs to be programmed with the required files. See Using J-Flash to set up the netX 90 internal flash above.

Please refer to the project files "pns_simpleconfig_iflash.jdebug" and "pns_simpleconfig_sdram.jdebug" in the attached Ozone_example.


References


  • No labels