Fixed bugs 3591317 and 3591321.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4847 35acf78f-673a-0410-8e92-d51de3d6d3f4
master
gdisirio 2012-11-30 11:56:26 +00:00
parent 202daf2a58
commit 6593964852
10 changed files with 457 additions and 173 deletions

View File

@ -30,8 +30,36 @@
#include "ch.h"
/**
* @brief Type of an IRQ vector.
*/
typedef void (*irq_vector_t)(void);
/**
* @brief Type of a structure representing the whole vectors table.
*/
typedef struct {
uint32_t *init_stack;
irq_vector_t reset_vector;
irq_vector_t nmi_vector;
irq_vector_t hardfault_vector;
irq_vector_t memmanage_vector;
irq_vector_t busfault_vector;
irq_vector_t usagefault_vector;
irq_vector_t vector1c;
irq_vector_t vector20;
irq_vector_t vector24;
irq_vector_t vector28;
irq_vector_t svcall_vector;
irq_vector_t debugmonitor_vector;
irq_vector_t vector34;
irq_vector_t pendsv_vector;
irq_vector_t systick_vector;
irq_vector_t vectors[32];
} vectors_t;
#if !defined(__DOXYGEN__)
extern void __main_stack_end__(void);
extern uint32_t __main_stack_end__;
extern void ResetHandler(void);
extern void NMIVector(void);
extern void HardFaultVector(void);
@ -87,11 +115,12 @@ extern void VectorBC(void);
#if !defined(__DOXYGEN__)
__attribute__ ((section("vectors")))
#endif
void (*_vectors[])(void) = {
__main_stack_end__, ResetHandler, NMIVector, HardFaultVector,
vectors_t _vectors = {
&__main_stack_end__,ResetHandler, NMIVector, HardFaultVector,
MemManageVector, BusFaultVector, UsageFaultVector, Vector1C,
Vector20, Vector24, Vector28, SVCallVector,
DebugMonitorVector, Vector34, PendSVVector, SysTickVector,
{
Vector40, Vector44, Vector48, Vector4C,
Vector50, Vector54, Vector58, Vector5C,
Vector60, Vector64, Vector68, Vector6C,
@ -100,6 +129,7 @@ void (*_vectors[])(void) = {
Vector90, Vector94, Vector98, Vector9C,
VectorA0, VectorA4, VectorA8, VectorAC,
VectorB0, VectorB4, VectorB8, VectorBC
}
};
/**

View File

@ -30,8 +30,36 @@
#include "ch.h"
/**
* @brief Type of an IRQ vector.
*/
typedef void (*irq_vector_t)(void);
/**
* @brief Type of a structure representing the whole vectors table.
*/
typedef struct {
uint32_t *init_stack;
irq_vector_t reset_vector;
irq_vector_t nmi_vector;
irq_vector_t hardfault_vector;
irq_vector_t memmanage_vector;
irq_vector_t busfault_vector;
irq_vector_t usagefault_vector;
irq_vector_t vector1c;
irq_vector_t vector20;
irq_vector_t vector24;
irq_vector_t vector28;
irq_vector_t svcall_vector;
irq_vector_t debugmonitor_vector;
irq_vector_t vector34;
irq_vector_t pendsv_vector;
irq_vector_t systick_vector;
irq_vector_t vectors[58];
} vectors_t;
#if !defined(__DOXYGEN__)
extern void __main_stack_end__(void);
extern uint32_t __main_stack_end__;
extern void ResetHandler(void);
extern void NMIVector(void);
extern void HardFaultVector(void);
@ -113,11 +141,12 @@ extern void Vector124(void);
#if !defined(__DOXYGEN__)
__attribute__ ((section("vectors")))
#endif
void (*_vectors[])(void) = {
__main_stack_end__, ResetHandler, NMIVector, HardFaultVector,
vectors_t _vectors = {
&__main_stack_end__,ResetHandler, NMIVector, HardFaultVector,
MemManageVector, BusFaultVector, UsageFaultVector, Vector1C,
Vector20, Vector24, Vector28, SVCallVector,
DebugMonitorVector, Vector34, PendSVVector, SysTickVector,
{
Vector40, Vector44, Vector48, Vector4C,
Vector50, Vector54, Vector58, Vector5C,
Vector60, Vector64, Vector68, Vector6C,
@ -133,6 +162,7 @@ void (*_vectors[])(void) = {
Vector100, Vector104, Vector108, Vector10C,
Vector110, Vector114, Vector118, Vector11C,
Vector120, Vector124
}
};
/**

View File

@ -30,8 +30,36 @@
#include "ch.h"
/**
* @brief Type of an IRQ vector.
*/
typedef void (*irq_vector_t)(void);
/**
* @brief Type of a structure representing the whole vectors table.
*/
typedef struct {
uint32_t *init_stack;
irq_vector_t reset_vector;
irq_vector_t nmi_vector;
irq_vector_t hardfault_vector;
irq_vector_t memmanage_vector;
irq_vector_t busfault_vector;
irq_vector_t usagefault_vector;
irq_vector_t vector1c;
irq_vector_t vector20;
irq_vector_t vector24;
irq_vector_t vector28;
irq_vector_t svcall_vector;
irq_vector_t debugmonitor_vector;
irq_vector_t vector34;
irq_vector_t pendsv_vector;
irq_vector_t systick_vector;
irq_vector_t vectors[80];
} vectors_t;
#if !defined(__DOXYGEN__)
extern void __main_stack_end__(void);
extern uint32_t __main_stack_end__;
extern void ResetHandler(void);
extern void NMIVector(void);
extern void HardFaultVector(void);
@ -135,11 +163,12 @@ extern void Vector17C(void);
#if !defined(__DOXYGEN__)
__attribute__ ((section("vectors")))
#endif
void (*_vectors[])(void) = {
__main_stack_end__, ResetHandler, NMIVector, HardFaultVector,
vectors_t _vectors = {
&__main_stack_end__,ResetHandler, NMIVector, HardFaultVector,
MemManageVector, BusFaultVector, UsageFaultVector, Vector1C,
Vector20, Vector24, Vector28, SVCallVector,
DebugMonitorVector, Vector34, PendSVVector, SysTickVector,
{
Vector40, Vector44, Vector48, Vector4C,
Vector50, Vector54, Vector58, Vector5C,
Vector60, Vector64, Vector68, Vector6C,
@ -160,6 +189,7 @@ void (*_vectors[])(void) = {
Vector150, Vector154, Vector158, Vector15C,
Vector160, Vector164, Vector168, Vector16C,
Vector170, Vector174, Vector178, Vector17C
}
};
/**

View File

@ -30,8 +30,36 @@
#include "ch.h"
/**
* @brief Type of an IRQ vector.
*/
typedef void (*irq_vector_t)(void);
/**
* @brief Type of a structure representing the whole vectors table.
*/
typedef struct {
uint32_t *init_stack;
irq_vector_t reset_vector;
irq_vector_t nmi_vector;
irq_vector_t hardfault_vector;
irq_vector_t memmanage_vector;
irq_vector_t busfault_vector;
irq_vector_t usagefault_vector;
irq_vector_t vector1c;
irq_vector_t vector20;
irq_vector_t vector24;
irq_vector_t vector28;
irq_vector_t svcall_vector;
irq_vector_t debugmonitor_vector;
irq_vector_t vector34;
irq_vector_t pendsv_vector;
irq_vector_t systick_vector;
irq_vector_t vectors[32];
} vectors_t;
#if !defined(__DOXYGEN__)
extern void __main_stack_end__(void);
extern uint32_t __main_stack_end__;
extern void ResetHandler(void);
extern void NMIVector(void);
extern void HardFaultVector(void);
@ -87,11 +115,12 @@ extern void VectorBC(void);
#if !defined(__DOXYGEN__)
__attribute__ ((section("vectors")))
#endif
void (*_vectors[])(void) = {
__main_stack_end__, ResetHandler, NMIVector, HardFaultVector,
vectors_t _vectors = {
&__main_stack_end__,ResetHandler, NMIVector, HardFaultVector,
MemManageVector, BusFaultVector, UsageFaultVector, Vector1C,
Vector20, Vector24, Vector28, SVCallVector,
DebugMonitorVector, Vector34, PendSVVector, SysTickVector,
{
Vector40, Vector44, Vector48, Vector4C,
Vector50, Vector54, Vector58, Vector5C,
Vector60, Vector64, Vector68, Vector6C,
@ -100,6 +129,7 @@ void (*_vectors[])(void) = {
Vector90, Vector94, Vector98, Vector9C,
VectorA0, VectorA4, VectorA8, VectorAC,
VectorB0, VectorB4, VectorB8, VectorBC
}
};
/**

View File

@ -49,8 +49,46 @@
#include "board.h"
#endif
#if defined(STM32F10X_MD_VL) || defined(__DOXYGEN__)
#define NUM_VECTORS 46
#elif defined(STM32F10X_HD) || defined(STM32F10X_XL)
#define NUM_VECTORS 60
#elif defined(STM32F10X_CL)
#define NUM_VECTORS 68
#else
#define NUM_VECTORS 43
#endif
/**
* @brief Type of an IRQ vector.
*/
typedef void (*irq_vector_t)(void);
/**
* @brief Type of a structure representing the whole vectors table.
*/
typedef struct {
uint32_t *init_stack;
irq_vector_t reset_vector;
irq_vector_t nmi_vector;
irq_vector_t hardfault_vector;
irq_vector_t memmanage_vector;
irq_vector_t busfault_vector;
irq_vector_t usagefault_vector;
irq_vector_t vector1c;
irq_vector_t vector20;
irq_vector_t vector24;
irq_vector_t vector28;
irq_vector_t svcall_vector;
irq_vector_t debugmonitor_vector;
irq_vector_t vector34;
irq_vector_t pendsv_vector;
irq_vector_t systick_vector;
irq_vector_t vectors[NUM_VECTORS];
} vectors_t;
#if !defined(__DOXYGEN__)
extern void __main_stack_end__(void);
extern uint32_t __main_stack_end__;
extern void ResetHandler(void);
extern void NMIVector(void);
extern void HardFaultVector(void);
@ -149,11 +187,12 @@ extern void Vector14C(void);
#if !defined(__DOXYGEN__)
__attribute__ ((section("vectors")))
#endif
void (*_vectors[])(void) = {
__main_stack_end__, ResetHandler, NMIVector, HardFaultVector,
vectors_t _vectors = {
&__main_stack_end__,ResetHandler, NMIVector, HardFaultVector,
MemManageVector, BusFaultVector, UsageFaultVector, Vector1C,
Vector20, Vector24, Vector28, SVCallVector,
DebugMonitorVector, Vector34, PendSVVector, SysTickVector,
{
Vector40, Vector44, Vector48, Vector4C,
Vector50, Vector54, Vector58, Vector5C,
Vector60, Vector64, Vector68, Vector6C,
@ -179,6 +218,7 @@ void (*_vectors[])(void) = {
Vector130, Vector134, Vector138, Vector13C,
Vector140, Vector144, Vector148, Vector14C
#endif
}
};
/**

View File

@ -30,8 +30,36 @@
#include "ch.h"
/**
* @brief Type of an IRQ vector.
*/
typedef void (*irq_vector_t)(void);
/**
* @brief Type of a structure representing the whole vectors table.
*/
typedef struct {
uint32_t *init_stack;
irq_vector_t reset_vector;
irq_vector_t nmi_vector;
irq_vector_t hardfault_vector;
irq_vector_t memmanage_vector;
irq_vector_t busfault_vector;
irq_vector_t usagefault_vector;
irq_vector_t vector1c;
irq_vector_t vector20;
irq_vector_t vector24;
irq_vector_t vector28;
irq_vector_t svcall_vector;
irq_vector_t debugmonitor_vector;
irq_vector_t vector34;
irq_vector_t pendsv_vector;
irq_vector_t systick_vector;
irq_vector_t vectors[81];
} vectors_t;
#if !defined(__DOXYGEN__)
extern void __main_stack_end__(void);
extern uint32_t __main_stack_end__;
extern void ResetHandler(void);
extern void NMIVector(void);
extern void HardFaultVector(void);
@ -136,11 +164,12 @@ extern void Vector180(void);
#if !defined(__DOXYGEN__)
__attribute__ ((section("vectors")))
#endif
void (*_vectors[])(void) = {
__main_stack_end__, ResetHandler, NMIVector, HardFaultVector,
vectors_t _vectors = {
&__main_stack_end__,ResetHandler, NMIVector, HardFaultVector,
MemManageVector, BusFaultVector, UsageFaultVector, Vector1C,
Vector20, Vector24, Vector28, SVCallVector,
DebugMonitorVector, Vector34, PendSVVector, SysTickVector,
{
Vector40, Vector44, Vector48, Vector4C,
Vector50, Vector54, Vector58, Vector5C,
Vector60, Vector64, Vector68, Vector6C,
@ -162,6 +191,7 @@ void (*_vectors[])(void) = {
Vector160, Vector164, Vector168, Vector16C,
Vector170, Vector174, Vector178, Vector17C,
Vector180
}
};
/**

View File

@ -30,8 +30,36 @@
#include "ch.h"
/**
* @brief Type of an IRQ vector.
*/
typedef void (*irq_vector_t)(void);
/**
* @brief Type of a structure representing the whole vectors table.
*/
typedef struct {
uint32_t *init_stack;
irq_vector_t reset_vector;
irq_vector_t nmi_vector;
irq_vector_t hardfault_vector;
irq_vector_t memmanage_vector;
irq_vector_t busfault_vector;
irq_vector_t usagefault_vector;
irq_vector_t vector1c;
irq_vector_t vector20;
irq_vector_t vector24;
irq_vector_t vector28;
irq_vector_t svcall_vector;
irq_vector_t debugmonitor_vector;
irq_vector_t vector34;
irq_vector_t pendsv_vector;
irq_vector_t systick_vector;
irq_vector_t vectors[82];
} vectors_t;
#if !defined(__DOXYGEN__)
extern void __main_stack_end__(void);
extern uint32_t __main_stack_end__;
extern void ResetHandler(void);
extern void NMIVector(void);
extern void HardFaultVector(void);
@ -137,11 +165,12 @@ extern void Vector184(void);
#if !defined(__DOXYGEN__)
__attribute__ ((section("vectors")))
#endif
void (*_vectors[])(void) = {
__main_stack_end__, ResetHandler, NMIVector, HardFaultVector,
vectors_t _vectors = {
&__main_stack_end__,ResetHandler, NMIVector, HardFaultVector,
MemManageVector, BusFaultVector, UsageFaultVector, Vector1C,
Vector20, Vector24, Vector28, SVCallVector,
DebugMonitorVector, Vector34, PendSVVector, SysTickVector,
{
Vector40, Vector44, Vector48, Vector4C,
Vector50, Vector54, Vector58, Vector5C,
Vector60, Vector64, Vector68, Vector6C,
@ -163,6 +192,7 @@ void (*_vectors[])(void) = {
Vector160, Vector164, Vector168, Vector16C,
Vector170, Vector174, Vector178, Vector17C,
Vector180, Vector184
}
};
/**

View File

@ -30,8 +30,36 @@
#include "ch.h"
/**
* @brief Type of an IRQ vector.
*/
typedef void (*irq_vector_t)(void);
/**
* @brief Type of a structure representing the whole vectors table.
*/
typedef struct {
uint32_t *init_stack;
irq_vector_t reset_vector;
irq_vector_t nmi_vector;
irq_vector_t hardfault_vector;
irq_vector_t memmanage_vector;
irq_vector_t busfault_vector;
irq_vector_t usagefault_vector;
irq_vector_t vector1c;
irq_vector_t vector20;
irq_vector_t vector24;
irq_vector_t vector28;
irq_vector_t svcall_vector;
irq_vector_t debugmonitor_vector;
irq_vector_t vector34;
irq_vector_t pendsv_vector;
irq_vector_t systick_vector;
irq_vector_t vectors[82];
} vectors_t;
#if !defined(__DOXYGEN__)
extern void __main_stack_end__(void);
extern uint32_t __main_stack_end__;
extern void ResetHandler(void);
extern void NMIVector(void);
extern void HardFaultVector(void);
@ -137,11 +165,12 @@ extern void Vector184(void);
#if !defined(__DOXYGEN__)
__attribute__ ((section("vectors")))
#endif
void (*_vectors[])(void) = {
__main_stack_end__, ResetHandler, NMIVector, HardFaultVector,
vectors_t _vectors = {
&__main_stack_end__,ResetHandler, NMIVector, HardFaultVector,
MemManageVector, BusFaultVector, UsageFaultVector, Vector1C,
Vector20, Vector24, Vector28, SVCallVector,
DebugMonitorVector, Vector34, PendSVVector, SysTickVector,
{
Vector40, Vector44, Vector48, Vector4C,
Vector50, Vector54, Vector58, Vector5C,
Vector60, Vector64, Vector68, Vector6C,
@ -163,6 +192,7 @@ void (*_vectors[])(void) = {
Vector160, Vector164, Vector168, Vector16C,
Vector170, Vector174, Vector178, Vector17C,
Vector180, Vector184
}
};
/**

View File

@ -30,8 +30,36 @@
#include "ch.h"
/**
* @brief Type of an IRQ vector.
*/
typedef void (*irq_vector_t)(void);
/**
* @brief Type of a structure representing the whole vectors table.
*/
typedef struct {
uint32_t *init_stack;
irq_vector_t reset_vector;
irq_vector_t nmi_vector;
irq_vector_t hardfault_vector;
irq_vector_t memmanage_vector;
irq_vector_t busfault_vector;
irq_vector_t usagefault_vector;
irq_vector_t vector1c;
irq_vector_t vector20;
irq_vector_t vector24;
irq_vector_t vector28;
irq_vector_t svcall_vector;
irq_vector_t debugmonitor_vector;
irq_vector_t vector34;
irq_vector_t pendsv_vector;
irq_vector_t systick_vector;
irq_vector_t vectors[45];
} vectors_t;
#if !defined(__DOXYGEN__)
extern void __ram_end__(void);
extern uint32_t __main_stack_end__;
extern void ResetHandler(void);
extern void NMIVector(void);
extern void HardFaultVector(void);
@ -100,11 +128,12 @@ extern void VectorF0(void);
#if !defined(__DOXYGEN__)
__attribute__ ((section("vectors")))
#endif
void (*_vectors[])(void) = {
__ram_end__, ResetHandler, NMIVector, HardFaultVector,
vectors_t _vectors = {
&__main_stack_end__,ResetHandler, NMIVector, HardFaultVector,
MemManageVector, BusFaultVector, UsageFaultVector, Vector1C,
Vector20, Vector24, Vector28, SVCallVector,
DebugMonitorVector, Vector34, PendSVVector, SysTickVector,
{
Vector40, Vector44, Vector48, Vector4C,
Vector50, Vector54, Vector58, Vector5C,
Vector60, Vector64, Vector68, Vector6C,
@ -117,6 +146,7 @@ void (*_vectors[])(void) = {
VectorD0, VectorD4, VectorD8, VectorDC,
VectorE0, VectorE4, VectorE8, VectorEC,
VectorF0
}
};
/**

View File

@ -82,6 +82,10 @@
*****************************************************************************
*** 2.5.1 ***
- FIX: Fixed wrong stack initializations in GCC STM32L1xx port files (bug
3591321)(backported to 2.4.3).
- FIX: Fixed different redefinition for __main_stack_end__ symbol (bug
3591317)(backported to 2.4.3).
- FIX: Fixed workaround for errata in STM32F4-A devices (bug 3586425)
(backported to 2.4.3).
- FIX: Fixed error in palWritePad() macro (bug 3586230)(backported to 2.2.10