- ;LR_IROM1 是flash 0x08000000-0x08040000 (高速区)区域
- LR_IROM1 0x08020000 0x08040000 { ; load region size_region
- ER_IROM1 0x08020000 0x00020000 { ; load address = execution address
- *.o (RESET, +First)
- *(InRoot$Sections)
- .ANY (+RO)
- main.o (+RO)
- intr.o (+RO)
- clock.o (+RO)
- uart.o (+RO)
- scom.o (+RO)
- ;*是通配符,写过脚本的应该都理解,不理解的自行百度,这样就把stm32f4xx_it.c,stm32f4xx_hal_gpio.c都编译进了高速区
- ;(+RO)代表将stm32f4xx*.c文件中的代码段,全局变量,静态变量编译进去。
- stm32f10x*.o (+RO)
-
- }
- RW_IRAM1 0x20000000 0x00018000 { ; RW data
- .ANY (+RW +ZI)
- }
- }
- ;LR_IROM1 是flash 0x08040000 0x08200000(低速区)区域
- LR_IROM2 0x08040000 0x08200000 { ; load region size_region
- ER_IROM2 0x08040000 0x08200000 { ; load address = execution address
- .ANY (+RO)
- ;同理,这样就把user_a.c,user_b.c都编译进了低速区
-
- }
- }
|