HVPKV58F PEMicro JTAG Debugging Issue

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

HVPKV58F PEMicro JTAG Debugging Issue

1,873 Views
JeffMichalski
Contributor I

Error Messages

semihost ==> Could not connect to semihosting port ...

debugging console ==> monitor command not supported by this target

I bringing up the HVPKV58F board to try out some baremetal code that I developed on the twkv58f220m.

I am using MCUExpresso v10.31.1  (build 2233)

I have the HVPKV58F Expresso SDK install and I just trying to run hello world example.

My debugger is a PE Micro Multilink Universal FX.    

When I launch the debugger it tries to debug but it gets to point (61% and dies)

Semihost console says

<terminated> - hpvkv58f_hellow_world PE Debug [GDB PEMicro Interface Debugging] Semihost Console
Could not connect to semihosting port due to connection timeout. Please check that the correct port number is configured.
Debugger Console says
GNU gdb (GNU Tools for Arm Embedded Processors 7-2018-q2-update) 8.1.0.20180315-git
Copyright (C) 2018 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".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".

monitor selectcore 0
"monitor" command not supported by this target.
continue
The program is not being run.

(few more details)

Powering up HPV through USB 5V only not data lines 

Powering debugger through J10 header

Normally debugging with 20 pin PE Micro Universal cable this target uses 10 pin cable.      

Debugger seems happy both the blue and yellow lights are lit.   

Regards,

Mich

0 Kudos
Reply
3 Replies

1,714 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi Jeff,

Please download HVP-KV58 SDK from Welcome | MCUXpresso SDK Builder  and try again.

Semihost use UART port. In HVP-KV58, openSDA connect to UART1. But in TWR-KV58, openSDA connect to UART0. So, semihost connection can't establish.

Regards,

Jing

0 Kudos
Reply

1,714 Views
JeffMichalski
Contributor I

Jing,   

>>Please download HVP-KV58 SDK from Welcome | MCUXpresso SDK Builder  and try again.

I am importing hello_world application from the HVP-KV58 SDK v2.6 on MCUExpresso 11.0.1

Base on  you suggestions this what I tried.    See screen dumps and code.
 

OK here was what I tried this morning.

   HPV58KV_Hello_World_SDK_2.6_UART Build.PNG

HPV58KV_Hello_World_SDK_2.6_UART Build_Link_Location.PNG

#ifndef _BOARD_H_
#define _BOARD_H_

#include "clock_config.h"
#include "fsl_gpio.h"

/*******************************************************************************
* Definitions
******************************************************************************/
/*! @brief The board name */
#define BOARD_NAME "HVP-KV58F"

/*! @brief The UART to use for debug messages. */
#define BOARD_USE_UART
#define BOARD_DEBUG_UART_TYPE kSerialPort_Uart
#define BOARD_DEBUG_UART_BASEADDR (uint32_t) UART1
#define BOARD_DEBUG_UART_INSTANCE 1U
...

I also tried to comment out the console.   Just see if I could step through main. 

void BOARD_InitDebugConsole(void)
{
uint32_t uartClkSrcFreq = BOARD_DEBUG_UART_CLK_FREQ;

/// \note JCM DbgConsole_Init(BOARD_DEBUG_UART_INSTANCE, BOARD_DEBUG_UART_BAUDRATE, BOARD_DEBUG_UART_TYPE, uartClkSrcFreq);
}

Similar results at the :   

GDB CONSOLE

687,364 &"The program is not being run.\n"
687,364 ^error,msg="The program is not being run."
687,364 (gdb)
687,364 35^error,msg="Invalid thread id: 1"
687,364 (gdb)
687,365 36-stack-info-depth --thread 1
687,372 37-data-disassemble --thread 1 -s 4294967294 -e 4294967338 -- 3
687,372 38-thread-info 1
687,373 39-list-thread-groups
687,375 36^error,msg="Invalid thread id: 1"
687,375 (gdb)
687,375 37^error,msg="Invalid thread id: 1"
687,375 (gdb)
687,375 38^done,threads=[]
687,375 (gdb)
687,375 39^done,groups=[{id="i1",type="process"}]
687,375 40-stack-list-frames --thread 1
687,376 (gdb)
687,384 41-data-disassemble --thread 1 -s 4294967295 -e 4294967347 -- 3
687,386 40^error,msg="Invalid thread id: 1"
687,386 (gdb)
687,386 41^error,msg="Invalid thread id: 1"
687,386 (gdb)
687,398 42-data-disassemble --thread 1 -s 4294967296 -e 4294967348 -- 3
687,408 42^error,msg="Invalid thread id: 1"
687,408 (gdb)
687,789 43-gdb-exit
687,791 43^exit

But this time I got the following error 

pastedImage_10.png

---------------------------------------

However,   I think I may have narrowed in this issue to be a FLASH write error.    

PEGDBSERVER_CONSOLE OUTPUT

Loading programming algorithm ...
Done.
Programming sequency is : erase, blank check, program, and verify {default}
CMD>VC
Command is inactive for this .ARP file.
VC is not implemented, falling back to VM

CMD>VM

Verifying.
Verify error at address $10000002.
Byte in module is $00 and should be $02.
Current content of flash does not match application to be programmed
CMD>EM
Command is inactive for this .ARP file.
Error Erasing flash of device
Error occured during Flash programming.

-------------

The question is why.   Is the algorithm, the location or a issue with the hardware?   

This is where I am at.   

Regards.

Mich 

0 Kudos
Reply

1,714 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi,

HVP has on board openSDA debug port. Can you try to use it to debug? I wonder the openSDA's SWD signal may conflict with your PE.

Regards,

Jing

0 Kudos
Reply