Hi every one,
I have a STM32F103 Board with an SD card . My project has a simple idea.( Im not sue, I could be simple for begginers like me) New firmware has to be copied Sdcard like “Firmware.bin”
When MCU starts ,
If the file is exist Start firmwareupdate else Jump user App
I’m using FLASH-FS to read firmware file from SD CARD, and write is mcu flash. I inspired AN2557 IAP from USART application and , MCBSTM32 RTX_Blinky projects. Is that possible to IAP using RTX ?
I can read firmware file and write is flash, but I can’t handle jump application. Im stuck now.
This is code what I try,
if(checkfile("firmware.bin")==1){ os_dly_wait(50); firmware_update("firmware.bin ",0,2048); }else{ JumpAddress = *(__IO uint32_t*) (ApplicationAddress + 4); Jump_To_Application = (pFunction) JumpAddress; /* Initialize user application's Stack Pointer */ __set_MSP(*(__IO uint32_t*) ApplicationAddress); Jump_To_Application(); }
I got error message ;
Blinky.c(114): error: #20: identifier "__IO" is undefined Blinky.c(117): warning: #223-D: function "__set_MSP" declared implicitly
Do you have any suggestion to set mainStackPointer and __IO for RTX blinky project. And please some details about what I must do with jump part
Thanks your help