From a8e2ff3420a775472a875893e044049567a2cf9c Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 23 Apr 2013 09:32:11 -0600 Subject: [PATCH] Correction to ARM RAM vectors logic from Paul Y. Zhang --- ChangeLog | 2 ++ arch/arm/src/armv7-m/ram_vectors.h | 2 +- arch/arm/src/armv7-m/up_ramvec_initialize.c | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index d18ab3f68b..7ae3d73ed8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4594,3 +4594,5 @@ (2014-4-23). * configs/zkit-arm-1769/src: ADC and SPI/USB MSC updates from MKannan (2014-4-23). + * arm/src/armv7-m/ram_vectors.h and arm/src/armv7-m/up_ramvec_initialize.c: + Fixes to RAM vector logic from Paul Y. Zhang (2014-4-23) diff --git a/arch/arm/src/armv7-m/ram_vectors.h b/arch/arm/src/armv7-m/ram_vectors.h index 4cbe42d8c4..90bcc30e67 100644 --- a/arch/arm/src/armv7-m/ram_vectors.h +++ b/arch/arm/src/armv7-m/ram_vectors.h @@ -68,7 +68,7 @@ * the table. */ -#define ARMV7M_VECTAB_SIZE (ARMV7M_PERIPHERAL_INTERRUPTS) +#define ARMV7M_VECTAB_SIZE (ARMV7M_PERIPHERAL_INTERRUPTS + 16) /************************************************************************************ * Public Data diff --git a/arch/arm/src/armv7-m/up_ramvec_initialize.c b/arch/arm/src/armv7-m/up_ramvec_initialize.c index 3d33f61c87..806bdf3fc4 100644 --- a/arch/arm/src/armv7-m/up_ramvec_initialize.c +++ b/arch/arm/src/armv7-m/up_ramvec_initialize.c @@ -100,7 +100,7 @@ void up_ramvec_initialize(void) /* The vector table must be aligned */ - DEBUGASSERT(((uintptr)g_ram_vectors & ~NVIC_VECTAB_TBLOFF_MASK) == 0); + DEBUGASSERT(((uint32_t)g_ram_vectors & ~NVIC_VECTAB_TBLOFF_MASK) == 0); /* Copy the ROM vector table at address zero to RAM vector table. *