cancel
Showing results for 
Search instead for 
Did you mean: 

view bootloader and update bootloader

JH1
Associate II

if stm32cudeide can view the bootloader and update the bootloader of MCU that is already writed by the vendor, like external oscillator or some other options ?

i have already installing the STM32CubeIDE, STM32CubeMX and STM32CubeProgrammer.

is there other softwares to help to develop?

1 ACCEPTED SOLUTION

Accepted Solutions

ST doesn't provide a means to erase/replace the system boot loader.

You can inspect the memory the loader resides in, and the option bytes with tools like the ST-LINK Utilities or STM32 Cube Programmer.​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

View solution in original post

8 REPLIES 8
Piranha
Chief II

The only thing one can do to the system bootloader, is to view/read and execute it's binary code. For anything else you have to write your own bootloader.

JH1
Associate II

is there ​a software to view/read/write the bootloader? or view the option have been writing in the chip?

ST doesn't provide a means to erase/replace the system boot loader.

You can inspect the memory the loader resides in, and the option bytes with tools like the ST-LINK Utilities or STM32 Cube Programmer.​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

the board has the external oscillator or SRAM to the PIN. Do i need to config the right setting in the STM32CubeIDE or not?

If i doesn't set, will it be something wrong?

JH1
Associate II

STM32 ST-LINK Utility has more information than STM32CubeProgrammer and has printf via SWO(v3 set).

or STM32CubeIDE 1.1.0 has the full function that STM32 ST-LINK Utility and STM32CubeProgrammer have?

The system bootloader starts before the code programmed in STM32CubeIDE, so you can't get it wrong (unless you overwrite its start address in the user option area on some models where it's possible). If an external crystal is present, the bootloader detects its frequency automatically. No external memory is required or used by the bootloader.

Read mode in AN2606 STM32 microcontroller system memory boot mode

I'm not a user of CubeIDE or CubeMX, I'd assume CubeIDE can output SWV to a console via OpenOCD, in a similar way that tools like Keil and IAR can.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

so , the clocks configed in STM32CubeIDE is to create codes that is similar in below?

void SystemClock_Config(void)

{

 RCC_OscInitTypeDef RCC_OscInitStruct = {0};

 RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};

 /** Initializes the CPU, AHB and APB busses clocks 

 */

 RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;

 RCC_OscInitStruct.HSEState = RCC_HSE_ON;

 RCC_OscInitStruct.HSEPredivValue = RCC_HSE_PREDIV_DIV1;

 RCC_OscInitStruct.HSIState = RCC_HSI_ON;

 RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;

 RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;

 RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL9;

 if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)

 {

  Error_Handler();

 }

 /** Initializes the CPU, AHB and APB busses clocks 

 */

 RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK

               |RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;

 RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;

 RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;

 RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV2;

 RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;

 if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK)

 {

  Error_Handler();

 }

}