when running led_blinky example on N947, I use step over to debug, and came cross this bug:
00002cb0: Failed to execute MI command:
-data-disassemble -s 11440 -e 11488 -- 3
Error message from debugger back end:
Cannot access memory at address 0x2cb0
and the debug session won't go on.
this happens in this part:
while (1)
{
/* Delay 1000 ms */
SysTick_DelayTicks(1000U);
GPIO_PortToggle(BOARD_LED_GPIO, 1u << BOARD_LED_GPIO_PIN);
}
Hi, @xin_ma
I am not repeating the problem you mentioned, I am using the latest version of SDK2.14.0 and MXUXpresso IDE 11.9.0. I see that the latest version of led_blinky is the LED that is triggered in an interrupt, but this error should not occur if placed in while, I suggest re-importing the project and trying again. Here is my code reference:
#include "pin_mux.h"
#include "peripherals.h"
#include "board.h"
/*******************************************************************************
* Definitions
******************************************************************************/
#define BOARD_LED_GPIO BOARD_LED_RED_GPIO
#define BOARD_LED_GPIO_PIN BOARD_LED_RED_GPIO_PIN
/*******************************************************************************
* Prototypes
******************************************************************************/
/*******************************************************************************
* Variables
******************************************************************************/
/*******************************************************************************
* Code
******************************************************************************/
void SysTick_Handler(void)
{
/* Toggle pin connected to LED */
//GPIO_PortToggle(BOARD_LED_GPIO, 1u << BOARD_LED_GPIO_PIN);
}
void SysTick_DelayTicks( __IO uint32_t ms)
{
uint32_t i;
SysTick_Config(12000000/1000);
for(i=0;i<ms;i++)
{
while( !((SysTick->CTRL)&(1<<16)) );
}
SysTick->CTRL &=~ SysTick_CTRL_ENABLE_Msk;
}
/*!
* @brief Main function
*/
int main(void)
{
/* Board pin init */
CLOCK_EnableClock(kCLOCK_Gpio0);
BOARD_InitPins();
BOARD_BootClockFRO12M();
/* Initialize the systick module. */
//SysTick_Config(12000000UL);
LED_RED_INIT(LOGIC_LED_OFF);
while (1)
{
SysTick_DelayTicks(1000);
GPIO_PortToggle(BOARD_LED_GPIO, 1u << BOARD_LED_GPIO_PIN);
}
}
Hope this helps you.
Best regards, Alex