From b8203d791047d450e7fb548f3596bddf31999cf9 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sun, 21 Oct 2012 15:50:22 +0000 Subject: Fixed bug 3578927. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4767 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/ports/GCC/ARMCMx/crt0.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) (limited to 'os') diff --git a/os/ports/GCC/ARMCMx/crt0.c b/os/ports/GCC/ARMCMx/crt0.c index bb8d3830d..4ac08ecdb 100644 --- a/os/ports/GCC/ARMCMx/crt0.c +++ b/os/ports/GCC/ARMCMx/crt0.c @@ -33,6 +33,17 @@ typedef funcp_t * funcpp_t; #define SYMVAL(sym) (uint32_t)(((uint8_t *)&(sym)) - ((uint8_t *)0)) +/* + * Area fill code, it is a macro because here functions cannot be called + * until stacks are initialized. + */ +#define fill32(start, end, filler) { \ + uint32_t *p1 = start; \ + uint32_t *p2 = end; \ + while (p1 < p2) \ + *p1++ = filler; \ +} + /*===========================================================================*/ /** * @name Startup settings @@ -227,19 +238,6 @@ void _default_exit(void) { ; } -/** - * @brief Memory fill. - * - * @param[in] start fill area start - * @param[in] end fill area end - * @param[in] filler filler pattern - */ -static void fill32(uint32_t *start, uint32_t *end, uint32_t filler) { - - while (start < end) - *start++ = filler; -} - /** * @brief Reset vector. */ -- cgit v1.2.3