How to Create a Super Simple Bootloader, Part 3: Developing the Boot Code

preview_player
Показать описание

Learn how to create your STM32-based application using STM32CubeIDE and use its Linker Script to create segments of memories, place variables in RAM and FLASH, allocate functions in the desired memory region, and even how to share code between your application and custom bootloader.

The STM32CubeIDE is be used to create a super simple bootloader, after covering the basics of the linker script and evolves into creating an application that runs after the bootloader starts in a different portion of the memory. This video series also shows how to debug Bootloader and Application simultaneously and how to create a static library shared between both projects.

Benefits you will take away:

• Understand the basics of the linker script
• Understand how to place variables in RAM and FLASH
• Understand how to create functions in RAM and FLASH
• Learn how to create a super simple bootloader
• Learn how to offset the interrupt vector and create an application to run in a different memory region
• Learn how to debug bootloader and application
• Learn how to share an API between bootloader and application


In this video: we’ll cover how to create the super simple bootloader, covering the basic requirements to check if there is an application installed in a different memory region, reduce the amount of memory available for the bootloader, and make the jump to the application code.

Hardware requirements: NUCLEO-G071RB is preferred, but any STM32 with Cortex-M0+ or higher can be used for the hands-on session with some minor changes. Note: STM32 with Cortex-M0 needs a different strategy when it comes to video 3 and onward, as the M0 core does not allow changing the NVIC address position due to lack of the VTOR register.
Рекомендации по теме
Комментарии
Автор

ST is stepping their game up, these are one of the most important reasons why people choose your products...

bobby
Автор

It would have been better to explain that the USART port used can also communicate over the STLINK_PINS as well. Otherwise it leaves the user clueless as to what is going on. Fortunately the user can just use the LED from the last project to turn on the LED while in the App and shut off the LED when in the boot.

JayDee-bu
Автор

Can you explain the disable interrupts in the end of the video?
When to do it and when to restore them and where?

dimalukas
Автор

why there not showed where to set conditional defines (eg. IAP_DEMO) ?

grigorianoby
Автор

i also had to reset vector table offset for Application to work properly...

SCB->VTOR = APPLICATION_ADDRESS

dominggussalampessy
Автор

What is the logic in the 'if statement' condition for checking whether there is an App installed or not in go2App? Could someone please explain this further?

mohammedeqbalabdulkhaleqes
Автор

I encountered problem in our bootloader implementation using an STM32 microcontroller. I have followed the guidance provided in your videos, specifically on bootloader development, and have reached a point where the jump instruction to the bootloader address (0x20060000 in RAM and 0x08008000 in Flash) is causing a HardFault exception.

Chinmaybulakh
Автор

What does 0x2FFE0000 in the bitwise operation of the if statement signify?

DanRalley
Автор

__set_MSP(uint32_t) sets the stack register before jumping to application which is actually reset_handler of the app we want to jump. But, reset_handler will set the stack register already. So is __set_MSP necessary.? A note for anyone curious, I commented the __set_MSP function and bootloader is still working.

h_enes_simsek
Автор

If we have linker files for _FLASH.ld and _RAM.ld do we modify both so that they match?

Kefford
Автор

Why so fast!? 🤣

As soon as the video got to the Code chapter it's like it's playing in fast forward! Is there some kind of rush to make the video as short as possible?

Kefford
join shbcf.ru