User Tools

Site Tools


manual:ports:armcm0_stm32g0

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revision Both sides next revision
manual:ports:armcm0_stm32g0 [2019/08/09 12:03]
voorburg created
manual:ports:armcm0_stm32g0 [2019/09/24 22:12]
127.0.0.1 external edit
Line 7: Line 7:
 The vector table relocation can be achieved by changing the ROM start address in the linker descriptor file. Refer to the demo program for an example. The vector table relocation can be achieved by changing the ROM start address in the linker descriptor file. Refer to the demo program for an example.
  
-{{:​manual:​ports:​stm32l34_linker_script_prog.png?|}}+{{:​manual:​ports:​stm32g0_linker_script_prog.png?|}}
  
 Note that the space needed by the bootloader could be different than 0x2000 (8 kbyte), depending on the selected communication interface and compiler. The demo programs are working examples that you can refer to, to determine the exact vector table relocation. ​ Note that the space needed by the bootloader could be different than 0x2000 (8 kbyte), depending on the selected communication interface and compiler. The demo programs are working examples that you can refer to, to determine the exact vector table relocation. ​
Line 28: Line 28:
 The user program must reserve space for this 32-bit checksum value. To reserve this space, simply enter one extra dummy entry into the interrupt vector table. This reserves space for the checksum at memory address: flash base address + flash reserved for bootloader ​ + FLASH_VECTOR_TABLE_CS_OFFSET. Refer to the demo program for an example. The user program must reserve space for this 32-bit checksum value. To reserve this space, simply enter one extra dummy entry into the interrupt vector table. This reserves space for the checksum at memory address: flash base address + flash reserved for bootloader ​ + FLASH_VECTOR_TABLE_CS_OFFSET. Refer to the demo program for an example.
  
-{{:​manual:​ports:​stm32l4_checksum_reservation.png?|}}+{{:​manual:​ports:​stm32g0_checksum_reservation.png?|}}
  
 ===== Stackpointer initialization ===== ===== Stackpointer initialization =====
Line 36: Line 36:
 After reset, the bootloader gets started first and, if a valid user program is present, it is the bootloader'​s responsibility to start the user program. This unfortunately means that the automatic initialization of the CPU's stackpointer register does not work for the user program. The user program therefore needs to explicitly set the initial value of the CPU's stackpointer register in the reset interrupt service routine. Refer to the demo program for an example. After reset, the bootloader gets started first and, if a valid user program is present, it is the bootloader'​s responsibility to start the user program. This unfortunately means that the automatic initialization of the CPU's stackpointer register does not work for the user program. The user program therefore needs to explicitly set the initial value of the CPU's stackpointer register in the reset interrupt service routine. Refer to the demo program for an example.
  
-{{:​manual:​ports:​stm32l4_stackpointer_init.png?|}} +{{:​manual:​ports:​stm32g0_stackpointer_init.png?|}}
  
manual/ports/armcm0_stm32g0.txt · Last modified: 2022/11/07 11:29 by voorburg