Initial Longer3D LK1/2 (Alfawise U20/U20+/U30) support (#14597)
This commit is contained in:
		
				
					committed by
					
						 Scott Lahteine
						Scott Lahteine
					
				
			
			
				
	
			
			
			
						parent
						
							475ccfad62
						
					
				
				
					commit
					45bde333d5
				
			
							
								
								
									
										14
									
								
								buildroot/share/PlatformIO/ldscripts/alfawise_Ux0.ld
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								buildroot/share/PlatformIO/ldscripts/alfawise_Ux0.ld
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,14 @@ | ||||
| MEMORY | ||||
| { | ||||
|   ram (rwx) : ORIGIN = 0x20000000, LENGTH = 64K - 40 | ||||
|   rom (rx)  : ORIGIN = 0x08010000, LENGTH = 512K - 64K | ||||
| } | ||||
|  | ||||
| /* 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 | ||||
							
								
								
									
										26
									
								
								buildroot/share/PlatformIO/scripts/alfawise_Ux0.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								buildroot/share/PlatformIO/scripts/alfawise_Ux0.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,26 @@ | ||||
| Import("env") | ||||
|  | ||||
| # Relocate firmware from 0x08000000 to 0x08010000 | ||||
| for define in env['CPPDEFINES']: | ||||
|     if define[0] == "VECT_TAB_ADDR": | ||||
|         env['CPPDEFINES'].remove(define) | ||||
| env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x08010000")) | ||||
| env.Replace(LDSCRIPT_PATH="buildroot/share/PlatformIO/ldscripts/alfawise_Ux0.ld") | ||||
|  | ||||
| # Encrypt ${PROGNAME}.bin and save it as 'project.bin' | ||||
| def encrypt(source, target, env): | ||||
|     import os | ||||
|  | ||||
|     firmware = open(target[0].path, "rb") | ||||
|     marlin_alfa = open(target[0].dir.path +'/project.bin', "wb") | ||||
|     length = os.path.getsize(target[0].path) | ||||
|     position = 0 | ||||
|     try: | ||||
|         while position < length: | ||||
|             byte = firmware.read(1) | ||||
|             marlin_alfa.write(byte) | ||||
|             position += 1 | ||||
|     finally: | ||||
|         firmware.close() | ||||
|         marlin_alfa.close() | ||||
| env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", encrypt); | ||||
							
								
								
									
										15
									
								
								buildroot/share/tests/alfawise_U20-tests
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										15
									
								
								buildroot/share/tests/alfawise_U20-tests
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,15 @@ | ||||
| #!/usr/bin/env bash | ||||
| # | ||||
| # Build tests for STM32F103VET6 | ||||
| # | ||||
|  | ||||
| # exit on first failure | ||||
| set -e | ||||
|  | ||||
| use_example_configs Alfawise/U20 | ||||
| opt_set MOTHERBOARD BOARD_LONGER3D_LK | ||||
| opt_set SERIAL_PORT 1 | ||||
| exec_test $1 $2 "Full-featured U20 config" | ||||
|  | ||||
| # cleanup | ||||
| restore_configs | ||||
		Reference in New Issue
	
	Block a user