2024-07-24 06:05 AM - edited 2024-07-24 06:18 AM
Hi All,
I have created two projects. One is for the bootloader and another one is for the Application and will place the bootloader in the starting position of the flash, which is 0x08000000. And application into 0x08040000.
Below is the code for bootloader and application i.e., green led will be turned on when the bootloader starts and when entering into application green led will be turned off and red led will be toggling for 1ms:
Bootloader Code:
in main()
/* USER CODE BEGIN 2 */
HAL_GPIO_WritePin(GPIOK, GPIO_PIN_3, GPIO_PIN_RESET); // Green Led On
HAL_Delay(2000);
goto_application();
/* USER CODE END 2 */
MEMORY
{
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 512K
FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 64K /* Allocating 64K for Bootloader */
}
Application Code:
MEMORY
{
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 512K
FLASH (rx) : ORIGIN = 0x8040000, LENGTH = 512K /* Allocating 512K for Application */
}
How to write a code for the bootloader firmware upgrade of just a 10ms toggling LED using UART for data transfer.
I hope I have been able to describe the problem clearly.
Regards,
Nithin
2024-07-24 06:35 AM
> How to write a code for the bootloader firmware upgrade of just a 10ms toggling LED using UART for data transfer.
I hope I have been able to describe the problem clearly.
Not sure I follow. Are you looking for someone to write the entire bootloader code for you? Or is there something bad happening with the code you've already written that you're looking to get help on?
Why does toggling an LED for 10ms matter here?
If you're using UART, consider using the system bootloader instead to avoid writing your own bootloader.