Question
Dump code to STM32MP157D-DK1 using Eclipse IDE.
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;
}
