PSDR/Source/system/src/cortexm/exception_handlers.c
Michael Colton ffcb904b66 Initial commit to GitHub.
Includes the Source (as an Eclipse project) and the Hardware files (including schematic, layout, gerbers, and bill of materials.)

The firmware is extremely incomplete. At this point the DDS chips work (with controlled phase relationship), the LCD (with fast-ish SPI, scrolling, and GFX, modified from Adafruit's library), the encoder knob, and LED work.

The ADC is capturing, but not in a usable way, but it's enough to feed the DSP code and see a nice pretty waterfall. Timers, interrupts, and DACs are not working yet.
2014-06-22 17:49:43 -06:00

126 lines
2.1 KiB
C

//
// This file is part of the µOS++ III distribution.
// Copyright (c) 2014 Liviu Ionescu.
//
// ----------------------------------------------------------------------------
#include "cortexm/ExceptionHandlers.h"
// ----------------------------------------------------------------------------
extern void
__attribute__((noreturn))
_start(void);
// ----------------------------------------------------------------------------
// Default exception handlers. Override the ones here by defining your own
// handler routines in your application code.
// ----------------------------------------------------------------------------
#if defined(DEBUG)
// The DEBUG version is not naked, to allow breakpoints at Reset_Handler
void __attribute__ ((section(".after_vectors"),noreturn))
Reset_Handler (void)
{
_start ();
}
#else
// The Release version is optimised to a quick branch to _start.
void __attribute__ ((section(".after_vectors"),naked))
Reset_Handler(void)
{
asm volatile
(
" b _start \n"
:
:
:
);
}
#endif
void __attribute__ ((section(".after_vectors"),weak))
NMI_Handler(void)
{
while (1)
{
}
}
void __attribute__ ((section(".after_vectors"),weak))
HardFault_Handler(void)
{
while (1)
{
}
}
#if defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__)
void __attribute__ ((section(".after_vectors"),weak))
MemManage_Handler(void)
{
while (1)
{
}
}
void __attribute__ ((section(".after_vectors"),weak))
BusFault_Handler(void)
{
while (1)
{
}
}
void __attribute__ ((section(".after_vectors"),weak))
UsageFault_Handler(void)
{
while (1)
{
}
}
#endif
void __attribute__ ((section(".after_vectors"),weak))
SVC_Handler(void)
{
while (1)
{
}
}
#if defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__)
void __attribute__ ((section(".after_vectors"),weak))
DebugMon_Handler(void)
{
while (1)
{
}
}
#endif
void __attribute__ ((section(".after_vectors"),weak))
PendSV_Handler(void)
{
while (1)
{
}
}
void __attribute__ ((section(".after_vectors"),weak))
SysTick_Handler(void)
{
while (1)
{
}
}