diff --git a/compileopts/target.go b/compileopts/target.go index 5d5e2f1b..d6a30a3f 100644 --- a/compileopts/target.go +++ b/compileopts/target.go @@ -276,6 +276,7 @@ func defaultTarget(goos, goarch, triple string) (*TargetSpec, error) { GDB: "gdb", PortReset: "false", FlashMethod: "native", + CodeModel: "default", } if goos == "darwin" { spec.LDFlags = append(spec.LDFlags, "-Wl,-dead_strip") diff --git a/targets/maixbit.ld b/targets/maixbit.ld index 9206809b..9b277a6c 100644 --- a/targets/maixbit.ld +++ b/targets/maixbit.ld @@ -1,7 +1,7 @@ MEMORY { - RAM (xrw) : ORIGIN = 0xffffffff80000000, LENGTH = 6M + RAM (xrw) : ORIGIN = 0x80000000, LENGTH = (6 * 1024 * 1024) } REGION_ALIAS("FLASH_TEXT", RAM);