Support for FLY MINI (#19185)
This commit is contained in:
		
							
								
								
									
										14
									
								
								buildroot/share/PlatformIO/ldscripts/fly_mini.ld
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								buildroot/share/PlatformIO/ldscripts/fly_mini.ld
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,14 @@ | ||||
| MEMORY | ||||
| { | ||||
|   ram (rwx) : ORIGIN = 0x20000000, LENGTH = 48K - 40 | ||||
|   rom (rx)  : ORIGIN = 0x08005000, LENGTH = 256K - 20K - 4K | ||||
| } | ||||
|  | ||||
| /* Provide memory region aliases for common.inc */ | ||||
| REGION_ALIAS("REGION_TEXT", rom); | ||||
| REGION_ALIAS("REGION_DATA", ram); | ||||
| REGION_ALIAS("REGION_BSS", ram); | ||||
| REGION_ALIAS("REGION_RODATA", rom); | ||||
|  | ||||
| /* Let common.inc handle the real work. */ | ||||
| INCLUDE common.inc | ||||
							
								
								
									
										16
									
								
								buildroot/share/PlatformIO/scripts/fly_mini.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								buildroot/share/PlatformIO/scripts/fly_mini.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,16 @@ | ||||
| import os | ||||
| Import("env") | ||||
|  | ||||
| # Relocate firmware from 0x08000000 to 0x08005000 | ||||
| for define in env['CPPDEFINES']: | ||||
|     if define[0] == "VECT_TAB_ADDR": | ||||
|         env['CPPDEFINES'].remove(define) | ||||
| env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x08005000")) | ||||
|  | ||||
| custom_ld_script = os.path.abspath("buildroot/share/PlatformIO/ldscripts/fly_mini.ld") | ||||
| for i, flag in enumerate(env["LINKFLAGS"]): | ||||
|     if "-Wl,-T" in flag: | ||||
|         env["LINKFLAGS"][i] = "-Wl,-T" + custom_ld_script | ||||
|     elif flag == "-T": | ||||
|         env["LINKFLAGS"][i + 1] = custom_ld_script | ||||
|  | ||||
| @@ -144,7 +144,7 @@ WEAK const PinMap PinMap_PWM[] = { | ||||
|   {PE_5,  TIM9,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 1, 0)}, // TIM9_CH1 | ||||
|   {PE_6,  TIM9,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 2, 0)}, // TIM9_CH2 | ||||
|   //{PE_11, TIM1,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 0)}, // TIM1_CH2 | ||||
|   {PE_13, TIM1,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 0)}, // TIM1_CH3 | ||||
|   //{PE_13, TIM1,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 0)}, // TIM1_CH3 | ||||
|   {PF_6,  TIM10,  STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM10, 1, 0)}, // TIM10_CH1 | ||||
|   {PF_7,  TIM11,  STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM11, 1, 0)}, // TIM11_CH1 | ||||
|   {PF_8,  TIM13,  STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF9_TIM13, 1, 0)}, // TIM13_CH1 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user