cancel
Showing results for 
Search instead for 
Did you mean: 

Dump code to STM32MP157D-DK1 using Eclipse IDE.

dishas
Associate

I am trying to dump LED blink program in STM32MP157D-DK1. I don't want to use any other software like STMCubeMX, meaning that, create project in Eclipse and write program to blink LED. I created project and build it successfully, but when run the code, it generates an error " 'Launching Debug' has encountered a problem."

 

 

 

int main(void) {

// Enable GPIO clock for GPIOC

 RCC_MC_AHB4ENSETR |= (1U << 2); // Set bit 2 for GPIOCEN


// Set PC0 as output

 GPIOC_MODER &= ~(3U << (GPIOC_PIN_0 * 2)); // Clear bits

 GPIOC_MODER |= (1U << (GPIOC_PIN_0 * 2)); // Set as output


while (1) {

// Toggle the LED state

 GPIOC_ODR ^= (1U << GPIOC_PIN_0); // Toggle PC0

 delay(1000000); // Delay

 }


return 0;

}

 

 

1 REPLY 1
PatrickF
ST Employee

Hi @dishas ,

Maybe give more details on your setup. Eclipse is not part of ST recommended development environment and you will miss many required settings and plug-ins.

We recommend to use CubeIDE (which is based on Eclipse).

If you are trying to create a code on Cortex-M4 please have a look on this getting started:

https://wiki.st.com/stm32mpu/wiki/Getting_started/STM32MP1_boards/STM32MP157x-DK2/Develop_on_Arm%C2%AE_Cortex%C2%AE-M4

This assume Linux is running on Cortex-A7, this mode is named "production mode" (Code is loaded via Linux via SSH Ethernet or EthernetOverUSB).

If you are using 'Engineering mode" (Code is loaded via JTAG), please have a look to https://wiki.st.com/stm32mpu/wiki/STM32CubeIDE#Engineering_mode. This mode is used during early phase of development of Cortex-M4 FW, but cannot be used on final product as Cortex-M4 FW is loaded by Linux where many initialization are already ensure by Linux Device Tree settings (e.g. root clocks).

Regards.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.