GDB action 'Finished download', has failed with error report, failed to download

Hello,

So, I have been working on making a simple project to know how to configure GPIO and UART. So I did this code in a Flat Project (without RTOS). I am just starting to learn how to code so please forgive me if my code is not that well written. 

void user_uart_callback(uart_callback_args_t *p_args)
{
  (void)p_args;
}

void hal_entry(void)
{
    bsp_io_level_t button_status;
    uint8_t buf[] = "For Testing Only.\r\n";

    R_SCI_UART_Open(&g_uart6_ctrl, &g_uart6_cfg);

    while(1)
       {
           if(FSP_SUCCESS == R_IOPORT_PinRead(&g_ioport_ctrl, BUTTON, &button_status))
           {
               if(button_status == BSP_IO_LEVEL_LOW)
               {   R_IOPORT_PinWrite(&g_ioport_ctrl, LED1, BSP_IO_LEVEL_HIGH);
                   R_SCI_UART_Write(&g_uart6_ctrl, buf, sizeof(buf));
                   R_BSP_SoftwareDelay(100, BSP_DELAY_UNITS_MILLISECONDS);
               }

               else
               {
                   R_IOPORT_PinWrite(&g_ioport_ctrl, LED1, BSP_IO_LEVEL_LOW);

               }
           }

          R_BSP_SoftwareDelay(100, BSP_DELAY_UNITS_MILLISECONDS);

        }

So this code is working. But when I copied this to a new Flat Project (with FreeRTOS) the code failed to download and shows this error. 

How to solve this?

Please take note that I didn't touch the FreeRTOS stack but it is automatically added since this is a project with RTOS. But I configured the UART the same as the first project with no RTOS.

Thank you!

Parents Reply
  • Dear Jonie,

    Can you please check if all jumpers are set to the default configurations?


    Then, if the error persists, please try a new blinky project with the following configurations:

    Additionally, when you connect the EK board to your PC, you should see the J-link driver on the device manager



    Please let us know if this suggestion was successful, otherwise we might need a full description of your actions from the start till the time you try to debug the MCU.

    Thank you,
    Panos

Children