From d39c3a85967a4fb8d18fece28a0fc29e9c4e1616 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 6 May 2025 12:46:08 -0700 Subject: [PATCH] quantimotor-v2: Use LPC11U12-specific linker script And switch the usual script back to LPC11U14 memory size. Signed-off-by: Keith Packard --- src/lpc/Makefile.defs | 4 ++++ src/lpc/altos-lpc11u12.ld | 26 ++++++++++++++++++++++++++ src/lpc/altos.ld | 2 +- src/quantimotor-v2/Makefile | 4 ++++ 4 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 src/lpc/altos-lpc11u12.ld diff --git a/src/lpc/Makefile.defs b/src/lpc/Makefile.defs index 9b1554c7..dd3d8af7 100644 --- a/src/lpc/Makefile.defs +++ b/src/lpc/Makefile.defs @@ -5,8 +5,12 @@ endif ifdef RAMSIZE LINKER_SCRIPT=altos-$(RAMSIZE).ld else +ifdef LPC11U12 +LINKER_SCRIPT=altos-lpc11u12.ld +else LINKER_SCRIPT=altos.ld endif +endif include $(TOPDIR)/lpc/Makefile-lpc.defs diff --git a/src/lpc/altos-lpc11u12.ld b/src/lpc/altos-lpc11u12.ld new file mode 100644 index 00000000..c2e913c6 --- /dev/null +++ b/src/lpc/altos-lpc11u12.ld @@ -0,0 +1,26 @@ +/* + * Copyright © 2025 Keith Packard + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + */ + +__flash = 0x1000; +__flash_size = 12K; +__ram = 0x10000000; +__ram_size = 4k; +__stack_size = 128; + +INCLUDE registers.ld +INCLUDE picolibc.ld diff --git a/src/lpc/altos.ld b/src/lpc/altos.ld index eea57db8..3e015730 100644 --- a/src/lpc/altos.ld +++ b/src/lpc/altos.ld @@ -17,7 +17,7 @@ */ __flash = 0x1000; -__flash_size = 12K; +__flash_size = 28K; __ram = 0x10000000; __ram_size = 4k; __stack_size = 128; diff --git a/src/quantimotor-v2/Makefile b/src/quantimotor-v2/Makefile index c4fd6cba..c23f9571 100644 --- a/src/quantimotor-v2/Makefile +++ b/src/quantimotor-v2/Makefile @@ -3,6 +3,10 @@ # # +# use the 11u12 linker script + +LPC11U12=1 + include ../lpc/Makefile.defs INC = \ -- 2.47.2