added ability to specify additional assembler options in custom target configurations

This commit is contained in:
Irmen de Jong
2025-02-01 16:09:43 +01:00
parent 67bc0b6931
commit f335251c2b
13 changed files with 26 additions and 19 deletions
@@ -35,6 +35,7 @@ interface ICompilationTarget: IStringEncoding, IMemSizer {
var golden: GoldenRam
val libraryPath: Path?
val customLauncher: List<String>
val additionalAssemblerOptions: String?
fun initializeMemoryAreas(compilerOptions: CompilationOptions)
fun getFloatAsmBytes(num: Number): String
@@ -12,6 +12,7 @@ class AtariTarget: ICompilationTarget, IStringEncoding by Encoder, IMemSizer by
override val defaultEncoding = Encoding.ATASCII
override val libraryPath = null
override val customLauncher: List<String> = emptyList()
override val additionalAssemblerOptions = null
companion object {
const val NAME = "atari"
@@ -19,6 +19,7 @@ class C128Target: ICompilationTarget, IStringEncoding by Encoder, IMemSizer by N
override val defaultEncoding = Encoding.PETSCII
override val libraryPath = null
override val customLauncher: List<String> = emptyList()
override val additionalAssemblerOptions = null
companion object {
const val NAME = "c128"
@@ -12,6 +12,7 @@ class C64Target: ICompilationTarget, IStringEncoding by Encoder, IMemSizer by No
override val defaultEncoding = Encoding.PETSCII
override val libraryPath = null
override val customLauncher: List<String> = emptyList()
override val additionalAssemblerOptions = null
companion object {
const val NAME = "c64"
@@ -27,6 +27,7 @@ class ConfigFileTarget(
override val BSSGOLDENRAM_END: UInt,
override val libraryPath: Path,
override val customLauncher: List<String>,
override val additionalAssemblerOptions: String?,
val ioAddresses: List<UIntRange>,
val zpScratchB1: UInt,
val zpScratchReg: UInt,
@@ -107,6 +108,8 @@ class ConfigFileTarget(
if(customLauncherStr?.isNotBlank()==true)
(customLauncherStr+"\n").lines().map { it.trimEnd() }
else emptyList()
val assemblerOptionsStr = props.getProperty("assembler_options", "").trim()
val assemblerOptions = if(assemblerOptionsStr.isBlank()) null else assemblerOptionsStr
return ConfigFileTarget(
configfile.nameWithoutExtension,
@@ -122,6 +125,7 @@ class ConfigFileTarget(
props.getInteger("bss_goldenram_end"),
libraryPath,
customLauncher,
assemblerOptions,
ioAddresses,
props.getInteger("zp_scratch_b1"),
props.getInteger("zp_scratch_reg"),
@@ -19,6 +19,7 @@ class Cx16Target: ICompilationTarget, IStringEncoding by Encoder, IMemSizer by N
override val defaultEncoding = Encoding.PETSCII
override val libraryPath = null
override val customLauncher: List<String> = emptyList()
override val additionalAssemblerOptions = null
companion object {
const val NAME = "cx16"
@@ -11,6 +11,7 @@ class Neo6502Target: ICompilationTarget, IStringEncoding by Encoder, IMemSizer b
override val defaultEncoding = Encoding.ISO
override val libraryPath = null
override val customLauncher: List<String> = emptyList()
override val additionalAssemblerOptions = null
companion object {
const val NAME = "neo"
@@ -19,6 +19,7 @@ class PETTarget: ICompilationTarget, IStringEncoding by Encoder, IMemSizer by No
override val defaultEncoding = Encoding.PETSCII
override val libraryPath = null
override val customLauncher: List<String> = emptyList()
override val additionalAssemblerOptions = null
companion object {
const val NAME = "pet32"
@@ -12,6 +12,7 @@ class VMTarget: ICompilationTarget, IStringEncoding by Encoder, IMemSizer by Nor
override val defaultEncoding = Encoding.ISO
override val libraryPath = null
override val customLauncher: List<String> = emptyList()
override val additionalAssemblerOptions = null
companion object {
const val NAME = "virtual"