diff lwlink/script.c @ 344:55c1f9a321e9

Add S-record output support to lwlink Thanks to a patch from Joachim Ga?ler <achim@diegasslers.de>, lwlink now has output support for S-records. This is output only - it does not add input support for S-record files.
author William Astle <lost@l-w.ca>
date Thu, 09 Apr 2015 12:27:33 -0600
parents fcd103148aa6
children b8e9ac01deda
line wrap: on
line diff
--- a/lwlink/script.c	Mon Mar 16 09:27:20 2015 -0600
+++ b/lwlink/script.c	Thu Apr 09 12:27:33 2015 -0600
@@ -58,6 +58,17 @@
 	"entry 2000\n"
 	;
 
+// the built-in SREC target linker script
+static char *srec_script =
+	"define basesympat s_%s\n"
+	"define lensympat l_%s\n"
+	"section init load 0400\n"
+	"section code\n"
+	"section *,!bss\n"
+	"section *,bss\n"
+	"entry __start\n"
+	;
+
 // the built-in RAW target linker script
 static char *raw_script = 
 	"define basesympat s_%s\n"
@@ -147,6 +158,10 @@
 			script = decb_script;
 			break;
 		
+		case OUTPUT_SREC:
+			script = srec_script;
+			break;
+		
 		case OUTPUT_LWEX0:
 			script = lwex0_script;
 			break;