2019-10-15 02:35 AM
Hi All,
I am using the STM32F777T6 board with Attollic studio along with STM32Cube MCU package version 1.9.7 (My set up in Linux base).
I need boot loader example for STM32F777T6 board.
Please share the example.
I have used other reference examples but not working with this board.
If any one worked with this board on boot loader part please share the example/ sample code. It will help me to understand.
Urgent
Thanks and Regards
Utkarash Patil
2019-10-15 05:46 AM
Everything you post is "Urgent", in technical forums this gets interpreted differently, it generally infers an inability to perform one's own job.
http://www.catb.org/~esr/faqs/smart-questions.html#urgent
The STM32F777T6 is a "chip" not a "board", what's on the board around the chip will determine its usability. If you are using a specific board cite a page covering its design, and for custom ones provide schematics, or pin usage details.
You should review ST's assorted "IAP" examples demonstrating In-App Programming using assorted interfaces. Review also FLASH programming examples.
Bootloaders are a classic embedded task, perhaps review them for other platforms, and books covering the topic space, and apply those ideas to the STM32 family of platforms. The STM32 family is wide, you can look outside the F7 for examples.
2019-10-15 06:18 AM
Here is one such example named IAP ("in-app programming")
Adapt it to your board.
IAP_Main is the bootloader, the other project is example of user application loaded by the bootloader.
-- pa
2019-10-16 01:35 AM
The internet is literally full of bootloader examples, especially for ARM Cortex-M!
2019-10-18 08:11 AM
Hello All,
Thank you For Your Response
Sorry For the late Reply
As i was working as per your suggestions
Everything you post is "Urgent", in technical forums this gets interpreted differently, it generally infers an inability to perform one's own job.
http://www.catb.org/~esr/faqs/smart-questions.html#urgent
The STM32F777T6 is a "chip" not a "board", what's on the board around the chip will determine its usability. If you are using a specific board cite a page covering its design, and for custom ones provide schematics, or pin usage details.
Sorry i was not able to explain you in detail my issue the last time, I should have elaborated in detail and by mistake i posted as "STM32F777T6 board" instead of "STM32F777IITx MCU chip".
Please accept my sincere apologizes
We have designed a custom board with STM32F777Tx MCU chip and we want to implement a USB based boot loader. Where we will update the firmware throug USB Flash Drive.
Before contacting forum i had found out an example from STM Cube MCU package v1.9.0 which is named as "Flash_JumpBootloader" and "MSC_standalone". Which i was refereeing to implement my bootloader code.
However I was not able to perform the bootloader Jump to application functionality.
Refereing to the Example "IAP_main" i made the required changes in my code. I have followed the example code algorithm yet sharing mycode algorithm below, If any case you can help if i am missing out on something.
My boot loader code size is below 50KB
Address on which application is Stored => 0x08020000.
Now Here after step 10 i am not able to Jump to application my application doesn't executes. It seems like code is stuck.
For reference I have also added the Jump to application function below
void JumpToApplication(void)
{
/* Jump to user application */
JumpAddress = *(__IO uint32_t*) (APPLICATION_ADDRESS + 4);
Jump = (pFunction) JumpAddress;
/* Initialize user application's Stack Pointer */
__set_MSP(*(__IO uint32_t*) APPLICATION_ADDRESS);
Jump();
}
The internet is literally full of bootloader examples, especially for ARM Cortex-M!
After referring few more post as per suggestions by "Piranha" Just before Jumping to the Application i De-initialized HAL, RCC and all peripherals which where initialized
Also I added vector table address handling statement before Jumping to application,
After this it looked like my Board is getting reset but unable to jump to application, added the code snippet below.
void JumpToApplication(void)
{
MX_FATFS_DeInit();
MX_USB_HOST_DeInit();
MX_UART3_UART_DeInit();
MX_GPIO_DeInit();
/* Jump to user application */
JumpAddress = *(__IO uint32_t*) (APPLICATION_ADDRESS + 4);
Jump = (pFunction) JumpAddress;
/*STM32L4 based Boot loader example code instructions*/
HAL_RCC_DeInit();
HAL_DeInit();
SysTick->CTRL = 0;
SysTick->LOAD = 0;
SysTick->VAL = 0;
SCB->VTOR = APPLICATION_ADDRESS;
/* Initialize user application's Stack Pointer */
__set_MSP(*(__IO uint32_t*) APPLICATION_ADDRESS);
Jump();
}
Also As per a refrence document from True Studio named as " Working with bootloaders on Cortex-M devices" I also made changes in my application file and then rebuilt it and extracted binary image.
I changed the Flash memory address in stm32F7xx_flash.id file as mentioned below.
/* Highest address of the user mode stack */
_estack = 0x20080000; /* end of RAM */
/* Generate a link error if heap and stack don't fit into RAM */
_Min_Heap_Size = 0x200; /* required amount of heap */
_Min_Stack_Size = 0x400; /* required amount of stack */
/* Specify the memory areas */
MEMORY
{
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 512K
FLASH (rx) : ORIGIN = 0x8020000, LENGTH = 2048K
}
After This also my issue remains the same.
I had one more doubt that does Dual mode mode of the Mcu has any effect on boot loader system if yes what should it be configured as.
Please help me at the earliest as i am stuck withthis point
Thanks and regards
Utkarsh