diff --git a/contrib/loaders/flash/numicro_m4/Makefile b/contrib/loaders/flash/numicro/Makefile similarity index 82% rename from contrib/loaders/flash/numicro_m4/Makefile rename to contrib/loaders/flash/numicro/Makefile index 0f9c507cd..e4f44417c 100644 --- a/contrib/loaders/flash/numicro_m4/Makefile +++ b/contrib/loaders/flash/numicro/Makefile @@ -9,9 +9,9 @@ OBJCOPY=$(CROSS_COMPILE)objcopy OBJDUMP=$(CROSS_COMPILE)objdump -AFLAGS = -static -nostartfiles -mlittle-endian -mcpu=cortex-m4 -Wa,-EL +AFLAGS = -static -nostartfiles -mlittle-endian -Wa,-EL -all: numicro_m4.inc +all: numicro_m0.inc numicro_m4.inc .PHONY: clean diff --git a/contrib/loaders/flash/numicro/numicro_m0.S b/contrib/loaders/flash/numicro/numicro_m0.S new file mode 100644 index 000000000..37d435532 --- /dev/null +++ b/contrib/loaders/flash/numicro/numicro_m0.S @@ -0,0 +1,73 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +/*************************************************************************** + * Copyright (C) 2015 Nemui Trinomius * + * nemuisan_kawausogasuki@live.jp * + * * + * Copyright (C) 2017 Zale Yu * + * CYYU@nuvoton.com * + * * + * Copyright (C) 2022 Jian-Hong Pan * + * chienhung.pan@gmail.com * + ***************************************************************************/ + + .text + .cpu cortex-m0 + .thumb + + /* Params: + * r0 - workarea buffer / result + * r1 - target address + * r2 - wordcount + * Clobbered: + * r4 - tmp + * r5 - tmp + * r6 - tmp + * r7 - tmp + */ + +.L1: + /* for(register uint32_t i=0;i