一、把STM32F103大容量移植到STM32F103C8T6上的步驟: 1、換啟動文件 startup_stm32f10x_cl.s ——互聯型的器件 包括:STM32F105xx,STM32F107xx startup_stm32f10x_hd.s ——大容量器件 包括:STM32F101xx, ...
一、把STM32F103大容量移植到STM32F103C8T6上的步驟:
1、換啟動文件
startup_stm32f10x_cl.s ——互聯型的器件
包括:STM32F105xx,STM32F107xx
startup_stm32f10x_hd.s ——大容量器件
包括:STM32F101xx,STM32F102xx,STM32F103xx
startup_stm32f10x_hd_vl.s ——大容量器件
包括:STM32F100xx
startup_stm32f10x_ld.s ——小容量器件
包括:STM32F101xx,STM32F102xx,STM32F103xx
startup_stm32f10x_ld_vl.s ——小容量器件
包括:STM32F100xx
startup_stm32f10x_md.s ——中容量器件
包括:STM32F101xx,STM32F102xx,STM32F103xx
startup_stm32f10x_md_vl.s ——中容量器件
- startup_stm32f10x_ld_vl.s: for STM32 Low density Value line devices
- startup_stm32f10x_ld.s: for STM32 Low density devices
- startup_stm32f10x_md_vl.s: for STM32 Medium density Value line devices
- startup_stm32f10x_md.s: for STM32 Medium density devices
- startup_stm32f10x_hd.s: for STM32 High density devices
- startup_stm32f10x_xl.s: for STM32 XL density devices
- startup_stm32f10x_cl.s: for STM32 Connectivity line devices
cl:互聯型產品,stm32f105/107系列
vl:超值型產品,stm32f100系列
xl:超高密度產品,stm32f101/103系列
ld:低密度產品,FLASH小於64K
md:中等密度產品,FLASH=64 or 128
hd:高密度產品,FLASH大於128
2、修改Device 為 STM32F103C8T6
3、更換全局巨集定義
在C/C++選項卡內 修改為STM32F10X_MD,USE_STDPERIPH_DRIVER
二、移植uCOS III內核到C8T6過程中會遇到
linking...
.\Objects\ucos-led.axf: Error: L6406E: No space in execution regions with .ANY selector matching lib_mem.o(.bss).
.\Objects\ucos-led.axf: Error: L6406E: No space in execution regions with .ANY selector matching os_cfg_app.o(.bss).
.\Objects\ucos-led.axf: Error: L6406E: No space in execution regions with .ANY selector matching os_var.o(.bss).
.\Objects\ucos-led.axf: Error: L6406E: No space in execution regions with .ANY selector matching startup_stm32f10x_hd.o(STACK).
.\Objects\ucos-led.axf: Error: L6406E: No space in execution regions with .ANY selector matching app.o(.bss).
.\Objects\ucos-led.axf: Error: L6406E: No space in execution regions with .ANY selector matching os_var.o(.data).
.\Objects\ucos-led.axf: Error: L6406E: No space in execution regions with .ANY selector matching cpu_core.o(.data).
.\Objects\ucos-led.axf: Error: L6406E: No space in execution regions with .ANY selector matching stm32f10x_rcc.o(.data).
.\Objects\ucos-led.axf: Error: L6406E: No space in execution regions with .ANY selector matching cpu_core.o(.bss).
.\Objects\ucos-led.axf: Error: L6406E: No space in execution regions with .ANY selector matching lib_mem.o(.data).
.\Objects\ucos-led.axf: Error: L6406E: No space in execution regions with .ANY selector matching os_prio.o(.data).
.\Objects\ucos-led.axf: Error: L6406E: No space in execution regions with .ANY selector matching os_cpu_c.o(.data).
.\Objects\ucos-led.axf: Error: L6407E: Sections of aggregate size 0x8e30 bytes could not fit into .ANY selector(s).
Not enough information to list image symbols.
Not enough information to list the image map.
Finished: 2 information, 0 warning and 13 error messages.
".\Objects\ucos-led.axf" - 13 Error(s), 0 Warning(s).
需要修改
//lib_cfg.h
#define LIB_MEM_CFG_HEAP_SIZE 27u * 1024u /* Configure heap memory size [see Note #2a]. */
這裡把堆空間設置為27K。。。。堆空間都比RAM還大了,這程式怎麼可能在單片機是正常運行,把堆空格改為10K,程式編譯通過。
#define LIB_MEM_CFG_HEAP_SIZE 10u * 1024u