Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Panel | ||||
---|---|---|---|---|
| ||||
How to debug netX 90 application side with J-Link debug probe from SEGGER? |
Panel | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||
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. PrerequisitesPlease use J-Link Software and Documentation Pack v7.60 or later. The v7.60 release includes the following fixes for netX 90:
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:
J-Link support in netX Studio CDTCurrently, netX Studio CDT supports debugging with J-Link in one of the following two ways:
Using J-Link with OpenOCDIn general, it is possible to use J-Link with OpenOCD, but it's not recommended due to the following main reason:
Please see further limitations and support from SEGGE: https://wiki.segger.com/OpenOCD Using J-Link with GDB ServernetX 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:
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.Ozone is tightly coupled with SEGGER's set of J-Link debug probes to ensure optimal performance and use experience. Please take the Ozone_example as a reference. There are two Ozone project files with .jdebug extension: pns_simpleconfig_sdram.jdebug and pns_simpleconfig_iflash.jdebug, which have different predefined functions on specific evenets: on loading the project, before and after target download/reset etc. Debugging project: pns_simpleconfig_sdram.jdebugTo debug ELF file "pns_simple_nx90_app_usecase_a_sdram.elf", which is generated by netX Studio CDT, SDRAM must be configued in HWC file correctly, and the application CPU must be enabled. Note: If NXHX 90-JTAG board is used as the hardware to debug netX90 application, as SDRAM is not available on board, the extension board NXHX-SDRSPM (AN: 7703.080) must be connected! To debug netX 90 application on external SDRAM, the netX90 is working as a stand alone chip, a valid loadable firmware must run normally on the communication side. To achive that, the netX90 device has to be flashed properly with a set of binary images that match together. Usually the device has to have the following images flashed: HWC, FDL, NXI, NAI. Hilscher flahser tool, as well as J-Flash can be used for that. Please refer to "Boot process" of netX 90 Production guide manual for forther information. If all the the images are properly flashed, open the pns_simpleconfig_sdram.jdebug project, and you can debug it with Ozone directly. The source codes as well as the original netX Studio CDT project are also included in the Ozone_example. Image Added Debugging project pns_simpleconfig_iflash.jdebugFor the project pns_simpleconfig_iflash.jdebug, the application internal flash is used instead of external SDRAM, so SDRAM is not necessary for this case. However, the following restrictions must be observed! Also in this case, the netX90 device has to be properly flashed with a set of matching binary images. Since the ELF file "pns_simple_nx90_app_usecase_a_iflash.elf", which is also generated by netX Studio CDT, does not contain hboot information. If a target download is made, it would overwrite the NAI file without the correct hboot information in the application internal flash, then the communcation firmware could not start application CPU as expected due to validation failure. So in this case, the targeted download is specifically deactivated! By start debug session with pns_simpleconfig_iflash.jdebug, "Attach to Running Program" or "attach & Halt Program" can be used. If "Download & Reset Program" is chosen to start debug session, the following Error diaglog will pop up, you can choose "No" to continue the debug session, if *.NAI file is already flashed manually. Image Added You can open the interested source codes manually, and set breakpoints, by calling "Reset & Run", you can debug the program in Ozone normally. The only limitation is you should not download the elf file to internal flash! This is a temperatly workaround, and Hilscher is planning to develop an ELF update tool in the furture. Image Added References |
Panel | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||
|
Panel | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
|
...