diff options
author | Andreas Färber <afaerber@suse.de> | 2015-11-29 03:09:46 +0100 |
---|---|---|
committer | Andreas Fritiofson <andreas.fritiofson@gmail.com> | 2016-02-29 19:42:21 +0000 |
commit | 7cf68a0f16e265996143056754774481eb9df7eb (patch) | |
tree | f104a71d4bb0a893077362dd445ae7b716456233 /src | |
parent | 43ff5acd45017fd9828cc56f54b929e600956c3b (diff) |
xmc4xxx: Integrate build of erase check code
Instead of pointing to the assembler sources in a comment and
inline-commenting the THUMB bytecode, place the hex array alongside the
assembler sources and include it via preprocessor.
Originally inspired by a typo in the file path during driver development,
but it also facilitates making changes to the assembler sources.
A Makefile is provided to help automate updating the bytecode. It is not
integrated with the automake system to avoid forcing an ARM cross-compiler
onto every user, i.e. after modifying the sources they need to be rebuilt
in that directory before building the usual way. ARM_CROSS_COMPILE= can
be passed on the make command line to deal with native ARM toolchains
or with varying prefixes of cross-toolchains.
Change-Id: I00ceb980a68c8554a180dd13719ac77b677a8bcd
Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-on: http://openocd.zylin.com/3133
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-by: Paul Fertser <fercerpav@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/flash/nor/xmc4xxx.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/flash/nor/xmc4xxx.c b/src/flash/nor/xmc4xxx.c index 10497834..f676e8cd 100644 --- a/src/flash/nor/xmc4xxx.c +++ b/src/flash/nor/xmc4xxx.c @@ -628,16 +628,8 @@ int xmc4xxx_blank_check_memory(struct target *target, struct armv7m_algorithm armv7m_info; int retval; - /* see contrib/loaders/erase_check/armv7m_0_erase_check.s for src */ - static const uint8_t erase_check_code[] = { - /* loop: */ - 0x03, 0x78, /* ldrb r3, [r0] */ - 0x01, 0x30, /* adds r0, #1 */ - 0x1A, 0x43, /* orrs r2, r2, r3 */ - 0x01, 0x39, /* subs r1, r1, #1 */ - 0xFA, 0xD1, /* bne loop */ - 0x00, 0xBE /* bkpt #0 */ +#include "../../../contrib/loaders/erase_check/armv7m_0_erase_check.inc" }; /* make sure we have a working area */ |