Unable to run debug - monitor command not supported by this target

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

Unable to run debug - monitor command not supported by this target

2,858 Views
dsilva
Contributor III
Hello,
 
I need help to make the debug work again.
 
I am unable to run the processor in debug mode. Even the examples doesn't work.
 

We have a functional version of the firmware that is programmed in the factory with a script. This code works.

However, after programming the modules, it is not possible to update the software and run in debug mode again.

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

JTAG_MOD is set to zero.
 
MCUXpresso IDE v11.1.1 [Build 3241] [2020-03-02]
 
I'm using PE Micro Multilink Universal with firmware updated.
 
Image attachment with efuse configuration.
 
Script used:
 
"
os.system(absolute_path + '/NXP-MCUBootUtility-master/tools/sdphost/win/sdphost -t 50000 -u 0x1FC9,0x0130 -j -- error-status')
os.system(absolute_path + '/NXP-MCUBootUtility-master/tools//sdphost/win/sdphost -t 50000 -u 0x1FC9,0x0130 -j -- read-register 1075790864 32 4 ' + absolute_path + '/NXP-MCUBootUtility-master/tools/sdphost/win/vectors/readReg.dat')
os.system(absolute_path + '/NXP-MCUBootUtility-master/tools/sdphost/win/sdphost -t 50000 -u 0x1FC9,0x0130 -j -- read-register 1075790880 32 4 ' + absolute_path + '/NXP-MCUBootUtility-master/tools/sdphost/win/vectors/readReg.dat')
os.system(absolute_path + '/NXP-MCUBootUtility-master/tools/sdphost/win/sdphost -t 50000 -u 0x1FC9,0x0130 -j -- read-register 1074757636 32 4 ' + absolute_path + '/NXP-MCUBootUtility-master/tools/sdphost/win/vectors/readReg.dat')
os.system(absolute_path + '/NXP-MCUBootUtility-master/tools/sdphost/win/sdphost -t 50000 -u 0x1FC9,0x0130 -j -- read-register 1074757660 32 4 ' + absolute_path + '/NXP-MCUBootUtility-master/tools/sdphost/win/vectors/readReg.dat')
os.system(absolute_path + '/NXP-MCUBootUtility-master/tools/sdphost/win/sdphost -t 50000 -u 0x1FC9,0x0130 -j -- read-register 1074757660 32 4 ' + absolute_path + '/NXP-MCUBootUtility-master/tools/sdphost/win/vectors/readReg.dat')
os.system(absolute_path + '/NXP-MCUBootUtility-master/tools/sdphost/win/sdphost -t 50000 -u 0x1FC9,0x0130 -j -- write-file 539001344 ' + absolute_path + '/NXP-MCUBootUtility-master/src/targets/MIMXRT1052/ivt_flashloader.bin')
os.system(absolute_path + '/NXP-MCUBootUtility-master/tools/sdphost/win/sdphost -t 50000 -u 0x1FC9,0x0130 -j -- jump-address 539001344')
 
os.system(absolute_path + '/NXP-MCUBootUtility-master/tools/blhost2_3/win/blhost -t 50000 -u 0x15A2,0x0073 -j -- get-property 1 0')
os.system(absolute_path + '/NXP-MCUBootUtility-master/tools/blhost2_3/win/blhost -t 50000 -u 0x15A2,0x0073 -j -- efuse-read-once 5')
os.system(absolute_path + '/NXP-MCUBootUtility-master/tools/blhost2_3/win/blhost -t 50000 -u 0x15A2,0x0073 -j -- efuse-read-once 6')
os.system(absolute_path + '/NXP-MCUBootUtility-master/tools/blhost2_3/win/blhost -t 50000 -u 0x15A2,0x0073 -j -- efuse-read-once 7')
os.system(absolute_path + '/NXP-MCUBootUtility-master/tools/blhost2_3/win/blhost -t 50000 -u 0x15A2,0x0073 -j -- efuse-read-once 6')
os.system(absolute_path + '/NXP-MCUBootUtility-master/tools/blhost2_3/win/blhost -t 5242000 -u 0x15A2,0x0073 -j -- read-memory 1074446400 4 ' + absolute_path + '/NXP-MCUBootUtility-master/tools/blhost2_3/win/vectors/readReg.dat 0')
os.system(absolute_path + '/NXP-MCUBootUtility-master/tools/blhost2_3/win/blhost -t 5242000 -u 0x15A2,0x0073 -j -- read-memory 1075791568 4 ' + absolute_path + '/NXP-MCUBootUtility-master/tools/blhost2_3/win/vectors/readReg.dat 0')
os.system(absolute_path + '/NXP-MCUBootUtility-master/tools/blhost2_3/win/blhost -t 5242000 -u 0x15A2,0x0073 -j -- fill-memory 538976256 4 3221225735 word')
os.system(absolute_path + '/NXP-MCUBootUtility-master/tools/blhost2_3/win/blhost -t 5242000 -u 0x15A2,0x0073 -j -- fill-memory 538976260 4 0 word')
os.system(absolute_path + '/NXP-MCUBootUtility-master/tools/blhost2_3/win/blhost -t 50000 -u 0x15A2,0x0073 -j -- configure-memory 9 538976256')
os.system(absolute_path + '/NXP-MCUBootUtility-master/tools/blhost2_3/win/blhost -t 5242000 -u 0x15A2,0x0073 -j -- read-memory 1610612736 1024 ' + absolute_path + '/NXP-MCUBootUtility-master/tools/blhost2_3/win/vectors/flexspiNorCfg.dat 9')
os.system(absolute_path + '/NXP-MCUBootUtility-master/tools/blhost2_3/win/blhost -t 2048000 -u 0x15A2,0x0073 -j -- flash-erase-region 1610612736 1024 9')
os.system(absolute_path + '/NXP-MCUBootUtility-master/tools/blhost2_3/win/blhost -t 5242000 -u 0x15A2,0x0073 -j -- fill-memory 538980352 4 4026531855 word')
os.system(absolute_path + '/NXP-MCUBootUtility-master/tools/blhost2_3/win/blhost -t 50000 -u 0x15A2,0x0073 -j -- configure-memory 9 538980352')
os.system(absolute_path + '/NXP-MCUBootUtility-master/tools/blhost2_3/win/blhost -t 5242000 -u 0x15A2,0x0073 -j -- read-memory 1610612736 1024 ' + absolute_path + '/NXP-MCUBootUtility-master/tools/blhost2_3/win/vectors/flexspiNorCfg.dat 9')
os.system(absolute_path + '/NXP-MCUBootUtility-master/tools/blhost2_3/win/blhost -t 50000 -u 0x15A2,0x0073 -j -- efuse-program-once 6 00000010')
os.system(absolute_path + '/NXP-MCUBootUtility-master/tools/blhost2_3/win/blhost -t 50000 -u 0x15A2,0x0073 -j -- efuse-read-once 6')
 
os.system(absolute_path + '/NXP-MCUBootUtility-master/tools/blhost2_3/win/blhost -t 2048000 -u 0x15A2,0x0073 -j -- flash-erase-region 1610612736 139264 9')
 
os.system(absolute_path + '/NXP-MCUBootUtility-master/tools/blhost2_3/win/blhost -u -- write-memory 0x60000000 Teste.bin')
"
Labels (1)
0 Kudos
Reply
8 Replies

2,843 Views
Alexis_A
NXP TechSupport
NXP TechSupport

Hello @dsilva,

In the fuse map I saw that you're booting from a 1.8V hyperflash, are you booting from the fuses and this configuration is correct? From the fuses, I couldn't see the fuse that disables the JTAG enabled.

Also, did you modified the HW_OCOTP_SCS in your firmware to disable the JTAG? 

Best Regards,

Alexis Andalon

0 Kudos
Reply

2,830 Views
dsilva
Contributor III

Yes, the fuses have been modified. Cfg1 register to 0x00000010 (BT_FUSE_SEL).

There were no changes to disable jtag. And I am unaware of changes to the HW_OCOTP_SCS.

The on-board debugger works in the EVKB (QSPI). But does not work with PEMicro..

 

 

0 Kudos
Reply

2,824 Views
Alexis_A
NXP TechSupport
NXP TechSupport

Hello @dsilva,

Could you try using the serial downloader mode and erase the flash using the debugger? It could be that the firmware block the debug access and the serial downloader will put this in a known state.

Best Regards,

Alexis Andalon

0 Kudos
Reply

2,819 Views
dsilva
Contributor III

Hello,

I erase the flash memory with the command below:

NXP-MCUBootUtility-master/tools/blhost2_3/win/blhost -t 2048000 -u 0x15A2,0x0073 -j -- flash-erase-region 1610612736 139264 9

After that I tried to run the debug using the hello_world example. The same error happend.

Tags (1)
0 Kudos
Reply

2,815 Views
Alexis_A
NXP TechSupport
NXP TechSupport

Hello @dsilva,

Are you unable to erase the flash with the debugger when is in serial downloader?

Best Regards,

Alexis Andalon

0 Kudos
Reply

2,800 Views
dsilva
Contributor III

Hello,

It is not clear to me what procedure you expect.

The only way debugging works is with EVKB on the linkserver. EVKB does not work with PEMicro.

My pcb doesn't have an on-board debug and the debug doesn't work via jtag. Serial or internal boot makes no difference.

If debugging doesn't work, how do you expect me to erase the flash in debug mode?

When running the flash example on the EVKB it returns the error in the attached image.

0 Kudos
Reply

2,784 Views
dsilva
Contributor III

I'm suspecting that a fuse has been set wrong and it is blocking the debug.

So I repeated the whole procedure on a new processor.

1.Connect to the processor using the NXP-MCUBootUtility software.

2.Click "Boot Device COnfiguration".

3.Select "ISSI_IS25LPxxxA_IS25WPxxxA".

4.Select Quad Mode Setting to "Set StatusReg1[16]".

5.Click "Connect to ROM".

6.Menu "eFuse Operation Utility", click "Cfg1" and change "BT_FUSE_SEL = 1".

7.Click "Burn".

8.Run the example "flexspi_nor_polling_transfer".

 

At this point the example stop at:

clock_config.c => "while (DCDC_REG0_STS_DC_OK_MASK != (DCDC_REG0_STS_DC_OK_MASK & DCDC->REG0))"

If I remove this line the example works.

"""""

FLEXSPI example started!
Vendor ID: 0xc2
Erasing whole chip over FlexSPI...
Erase finished !
Erasing Serial NOR over FlexSPI...
Erase data - successfully.
Program data - successfully.

""""

When programming the official firmware of the product in this processor the debug still doesn't work.

 

0 Kudos
Reply

2,776 Views
Alexis_A
NXP TechSupport
NXP TechSupport

Hello @dsilva,

I want to make sure if any of the debug commands was capable to access the debug interface while in the serial downloader mode.

In the last case where the firmware was able to run without issues, there was any other modification apart from the clock_config.c  file?

Best Regards,

Alexis Andalon

0 Kudos
Reply