2015-08-03 07:25 AM
i am using stm32cube and arm mdk 5 for my code development for stm32f030cc. i developed one free rtos based application which is running fine.i want to develop boot loader to download my rtos based application for remote update using usart.i can not use built in boot loader. so i decide my own bootloader application without free rtos.
i planned that first my boot loader application and then my user application resides in flash.to move my rtos based application to different memory location other than 0x08000000i update start address and length field in (option->target field).but when i download code its not working.so is there is any example or document which help to full fill my need??2015-08-03 09:39 AM
There are IAP examples, and the topic of relocating the Cortex-M0 vector table has been addressed here several times before.
You will need your boot loader to transfer control. Changing the base of the application and loading it directly isn't going to permit it to execute. You will also need to add code to the application to copy your new vector table into RAM, and then map the RAM at address zero. Ideally you'll bump up the base of RAM in order to carve a space for the vector table that other code will not use.See the code at the END of [DEAD LINK /public/STe2ecommunities/mcu/Lists/STM32Discovery/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/STM32Discovery/Cortex%20M0%20Vector%20relocation%20issue&FolderCTID=0x01200200770978C69A1141439FE559EB459D75800084C20D8867EAD444A5987D47BE638E0F¤tviews=1242]this thread.2015-08-04 12:41 AM
uint32_t *VectorTable = (uint32_t *)0x20000000; // Carve space here via linker script, or attributes
// Copy the vector table from the Flash (mapped at the base of the application
// load address 0x08003000) to the base address of the SRAM at 0x20000000.
for(i = 0; i < 48; i++) // Check Vector count on your part
VectorTable[i] = *(__IO uint32_t*)(0x08003000 + (i<<2));
// Enable the SYSCFG peripheral clock
RCC_APB2PeriphClockCmd(RCC_APB2Periph_SYSCFG, ENABLE);
// Remap SRAM at 0x00000000
SYSCFG_MemoryRemapConfig(SYSCFG_MemoryRemap_SRAM);
means in which files??
2015-08-04 03:56 AM
i had one free rtos based application working. i made following changes. in target dilog box
IROM1=0x08003000 len 0x3D000 IRAM1=0x200000c0 len0x7F40 and in main.c uint32_t *VectorTable = (uint32_t *)0x20000000; HAL_Init(); /* Configure the system clock */ SystemClock_Config(); for(i = 0; i < 48; i++) VectorTable[i] = *(__IO uint32_t*)(0x08003000 + (i<<2)); // Enable the SYSCFG peripheral clock RCC->APB2ENR |=0x00000001; // Remap SRAM at 0x00000000 SYSCFG->CFGR1|=0x00000003; but when download code through debugger not working. here i attach map file ________________ Attachments : final_getway_Configuration.map : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0p2&d=%2Fa%2F0X0000000bfJ%2FQY_yFDm5_tAsFmvnvvVdqITElirFnuicldi_hW6sDhU&asPdf=false2015-08-04 06:16 AM
0x08003000 is the application basis in the example. This is the ''source'' of the vectors as this is where the linker forms them.
I think HAL_Init() enables a ticker interrupt, so it would be *important* to have a working vector for the application prior to calling that.You could review the IAP example(s), and failing all that, use the debugger and step through and look at what's going on with the processor and the memory.2015-08-18 08:24 AM
2015-08-18 09:18 AM
USART1 and USART6 are on APB2, make sure you've enabled the right clocks.