2013-11-13 09:40 PM
There is a vector-table defined in the ''startup_stm32f10x_cl.s''(the gcc version):
.section .isr_vector,''a'',%progbits
.type g_pfnVectors, %object .size g_pfnVectors, .-g_pfnVectors g_pfnVectors: .word _estack .word Reset_Handler .word NMI_Handler .word HardFault_HandlerMy question is: what's the result of the .size directive sentence? I think maybe it's 0, because the '.' symbol and the 'g_pfnVectors' label may represent the same address:
.size g_pfnVectors, .-g_pfnVectors
Then what's the function of this sentence, if its result is 0?
Another question is about the last item of this table:
.word BootRAM /* @0x1E0. This is for boot in RAM mode for STM32F10x Connectivity line Devices. */
What's the purpose of this?
2013-11-14 05:22 AM
With regard to your second question, when booting from RAM the processor appears to ignore the PC vector, and jumps to a specific address at the end of the vector table. The fix is to code an instruction to do a PC load with the word at +4
When booting from FLASH there isn't such an issue.