Skip to content

Commit db1a7cb

Browse files
committed
Allow to redefine Exception handler
By default, all Interruption and Exception Handlers are weaked and aliased to Default_Handler (Infinite Loop, See CMSIS device startup file) So, those defined handlers in the core doing a loop bring nothing except to not allow further redefinition. But this is what we want, be able to redefine those handler. Ex: FreeRTOS library requires to be able to redefine them. Signed-off-by: Frederic.Pillon <[email protected]>
1 parent 57585ac commit db1a7cb

File tree

1 file changed

+0
-104
lines changed

1 file changed

+0
-104
lines changed

cores/arduino/stm32/hw_config.c

-104
Original file line numberDiff line numberDiff line change
@@ -114,110 +114,6 @@ void hw_config_init(void)
114114
SystemClock_Config();
115115
}
116116

117-
/******************************************************************************/
118-
/* Cortex-M4 Processor Interruption and Exception Handlers */
119-
/******************************************************************************/
120-
121-
/**
122-
* @brief This function handles Non maskable interrupt.
123-
*/
124-
void NMI_Handler(void)
125-
{
126-
/* USER CODE BEGIN NonMaskableInt_IRQn 0 */
127-
128-
/* USER CODE END NonMaskableInt_IRQn 0 */
129-
130-
/* USER CODE BEGIN NonMaskableInt_IRQn 1 */
131-
132-
/* USER CODE END NonMaskableInt_IRQn 1 */
133-
134-
}
135-
136-
/**
137-
* @brief This function handles Hard fault interrupt.
138-
*/
139-
void HardFault_Handler(void)
140-
{
141-
/* USER CODE BEGIN HardFault_IRQn 0 */
142-
143-
/* USER CODE END HardFault_IRQn 0 */
144-
while (1)
145-
{
146-
}
147-
/* USER CODE BEGIN HardFault_IRQn 1 */
148-
149-
/* USER CODE END HardFault_IRQn 1 */
150-
}
151-
152-
/**
153-
* @brief This function handles Memory management fault.
154-
*/
155-
void MemManage_Handler(void)
156-
{
157-
158-
/* USER CODE BEGIN MemoryManagement_IRQn 0 */
159-
160-
/* USER CODE END MemoryManagement_IRQn 0 */
161-
while (1)
162-
{
163-
}
164-
/* USER CODE BEGIN MemoryManagement_IRQn 1 */
165-
166-
/* USER CODE END MemoryManagement_IRQn 1 */
167-
}
168-
169-
/**
170-
* @brief This function handles Pre-fetch fault, memory access fault.
171-
*/
172-
void BusFault_Handler(void)
173-
{
174-
175-
/* USER CODE BEGIN BusFault_IRQn 0 */
176-
177-
/* USER CODE END BusFault_IRQn 0 */
178-
while (1)
179-
{
180-
}
181-
/* USER CODE BEGIN BusFault_IRQn 1 */
182-
183-
/* USER CODE END BusFault_IRQn 1 */
184-
}
185-
186-
/**
187-
* @brief This function handles Undefined instruction or illegal state.
188-
*/
189-
void UsageFault_Handler(void)
190-
{
191-
192-
/* USER CODE BEGIN UsageFault_IRQn 0 */
193-
194-
/* USER CODE END UsageFault_IRQn 0 */
195-
while (1)
196-
{
197-
}
198-
/* USER CODE BEGIN UsageFault_IRQn 1 */
199-
200-
/* USER CODE END UsageFault_IRQn 1 */
201-
}
202-
203-
/**
204-
* @brief This function handles Debug monitor.
205-
*/
206-
void DebugMon_Handler(void)
207-
{
208-
209-
/* USER CODE BEGIN DebugMonitor_IRQn 0 */
210-
211-
/* USER CODE END DebugMonitor_IRQn 0 */
212-
while (1)
213-
{
214-
}
215-
/* USER CODE BEGIN DebugMonitor_IRQn 1 */
216-
217-
/* USER CODE END DebugMonitor_IRQn 1 */
218-
}
219-
220-
221117
/**
222118
* @}
223119
*/

0 commit comments

Comments
 (0)