Debugging problem with M2S010-MKR-KIT using Softconsole

#1

I am trying to make a basic application using the M2S010-MKR-KIT.

Application: LED Blink.
Using: Libero v12, Softconsole v5.3

I followed the steps in the tutorial provided from Microsemi under the title: TU0546 Tutorial , SoftConsole v4.0 and Libero SoC v11.7 .

And followed the insights form the tutorial provided by Digi-Key in the GIPO configuration (but I didn’t activate the MM_UART0 , MM_UART1 , MSS_I2C0 in the design from the beginning cause I will not be using them). And to follow the debugging configuration.

As for the main.c I copied the one provided for the Tutorial mentioned above TU0546.

  • The project was successfully built.

  • The debugging failed (Stuck)

and here what I have got:

image

and what is printed in the console:

fpServer v17 waiting for incoming connections on the port 3334 with API v5

Info : 1 1554993267686 microsemi_flashpro_server.c:1739 microsemi_flashpro_initialize() FlashPro ports available: E2001A0QVD

Info : 2 1554993267686 microsemi_flashpro_server.c:1740 microsemi_flashpro_initialize() FlashPro port selected: E2001A0QVD

GNU MCU Eclipse (Microsemi SoftConsole build) 64-bits Open On-Chip Debugger 0.10.0+dev-00084-gae68d7da-dirty (2018-06-28-11:40)

Licensed under GNU GPL v2

For bug reports, read

http://openocd.org/doc/doxygen/bugs.html

M2S010

Info : only one transport option; autoselect 'jtag'

adapter speed: 6000 kHz

cortex_m reset_config sysresetreq

trst_only separate trst_push_pull

do_board_reset_init

Info : Listening on port 6666 for tcl connections

Info : Listening on port 4444 for telnet connections

Info : clock speed 6000 kHz

Info : JTAG tap: M2S010.tap tap/device found: 0x3f8031cf (mfg: 0x0e7 (GateField), part: 0xf803, ver: 0x3)

Info : JTAG tap: M2S010.tap disabled

Info : JTAG tap: M2S010.cpu enabled

Info : Cortex-M3 IDCODE = 0x4ba00477

Info : M2S010.cpu: hardware has 6 breakpoints, 4 watchpoints

Info : Listening on port 3333 for gdb connections

Started by GNU MCU Eclipse

Info : accepting 'gdb' connection on tcp/3333

target halted due to debug-request, current mode: Thread

xPSR: 0x61000000 pc: 0x00000dc0 msp: 0x2000ffc0

target halted due to debug-request, current mode: Thread

xPSR: 0x01000000 pc: 0x00000190 msp: 0x20010000

lr (/32): 0x00000000

xPSR (/32): 0x01000000

cortex_m auto_bp_type off

===== arm v7m registers

(0) r0 (/32): 0x20000078

(1) r1 (/32): 0x00000000

(2) r2 (/32): 0x00000000

(3) r3 (/32): 0x00000001

(4) r4 (/32): 0x00000000

(5) r5 (/32): 0x00000000

(6) r6 (/32): 0x00000017

(7) r7 (/32): 0x2000FFC0

(8) r8 (/32): 0x00000000

(9) r9 (/32): 0x00000000

(10) r10 (/32): 0x00000000

(11) r11 (/32): 0x00000000

(12) r12 (/32): 0xA3893ADF

(13) sp (/32): 0x00000000 (dirty)

(14) lr (/32): 0x00000000 (dirty)

(15) pc (/32): 0x00000E30 (dirty)

(16) xPSR (/32): 0x01000000 (dirty)

(17) msp (/32): 0x20010000

(18) psp (/32): 0x3AAB6138

(19) primask (/1): 0x00

(20) basepri (/8): 0x00

(21) faultmask (/1): 0x00

(22) control (/2): 0x00

===== Cortex-M DWT registers 

Any idea? insight about what may that mean?

as for the main.c code:

/*******************************************************************************
 *
 *
 * Simple SmartFusion2 Microcontroller subsystem (MSS) GPIO example program.
 *
 *
 */
#include "drivers/mss_gpio/mss_gpio.h"
#include "CMSIS/system_m2sxxx.h"

/*==============================================================================
  Private functions.
 */
static void delay(void);

/*==============================================================================
 * main() function.
 */
int main()
{
    /*
     * Initialize MSS GPIOs.
     */
    MSS_GPIO_init();

    /*
     * Configure MSS GPIOs.
     */
    MSS_GPIO_config( MSS_GPIO_0 , MSS_GPIO_OUTPUT_MODE );
    MSS_GPIO_config( MSS_GPIO_1 , MSS_GPIO_OUTPUT_MODE );
    MSS_GPIO_config( MSS_GPIO_2 , MSS_GPIO_OUTPUT_MODE );
    MSS_GPIO_config( MSS_GPIO_3 , MSS_GPIO_OUTPUT_MODE );
    MSS_GPIO_config( MSS_GPIO_4 , MSS_GPIO_OUTPUT_MODE );
    MSS_GPIO_config( MSS_GPIO_5 , MSS_GPIO_OUTPUT_MODE );
    MSS_GPIO_config( MSS_GPIO_6 , MSS_GPIO_OUTPUT_MODE );
    MSS_GPIO_config( MSS_GPIO_7 , MSS_GPIO_OUTPUT_MODE );

    /*
     * Infinite loop.
     */
    for(;;)
    {
        uint32_t gpio_pattern;
        /*
         * Decrement delay counter.
         */
        delay();

        /*
         * Toggle GPIO output pattern by doing an exclusive OR of all
         * pattern bits with ones.
         */
        gpio_pattern = MSS_GPIO_get_outputs();
        gpio_pattern ^= 0xFFFFFFFF;
        MSS_GPIO_set_outputs( gpio_pattern );
    }

    return 0;
}

/*==============================================================================
  Delay between displays of the watchdog counter value.
 */
static void delay(void)
{
    volatile uint32_t delay_count = SystemCoreClock / 128u;

    while(delay_count > 0u)
    {
        --delay_count;
    }
}
#2

Hi Rand,

This is generally a problem with SoftConsole settings. Could you provide a screenshot of your debug configuration? The “Main” and “Debugger” tabs should hopefully be enough.

#3

Hi Taylor,

Those are the screen shots:

also I got this when I tried to debug again:

hope it helps

#4

I tried this out myself and ran into the same issue. I believe I’ve found the problem. Check to make sure you have “Pre-run/Restart reset” un-checked in the Startup tab of Debug settings. I don’t think this was enabled in the older versions of SoftConsole and fixed the problem for me.

1 Like
#5

Well, still the same issue. So I used the Softconsole v4.0 and it worked.