aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
Diffstat (limited to 'os')
-rw-r--r--os/hal/include/sdc.h18
-rw-r--r--os/hal/platforms/STM32/sdc_lld.c38
-rw-r--r--os/hal/platforms/STM32/sdc_lld.h45
-rw-r--r--os/kernel/include/ch.h34
-rw-r--r--os/kernel/src/chmtx.c2
-rw-r--r--os/ports/GCC/ARMCMx/LPC11xx/vectors.c96
-rw-r--r--os/ports/GCC/ARMCMx/LPC13xx/vectors.c144
-rw-r--r--os/ports/GCC/ARMCMx/STM32F1xx/vectors.c174
-rw-r--r--os/ports/GCC/ARMCMx/STM32F2xx/vectors.c194
-rw-r--r--os/ports/GCC/ARMCMx/STM32F4xx/vectors.c196
-rw-r--r--os/ports/GCC/ARMCMx/STM32L1xx/vectors.c122
-rw-r--r--os/ports/GCC/ARMCMx/chcore.h2
-rw-r--r--os/ports/IAR/ARMCMx/chcore.h2
-rw-r--r--os/ports/RVCT/ARMCMx/chcore.h2
-rw-r--r--os/various/lwip_bindings/lwipthread.c2
15 files changed, 546 insertions, 525 deletions
diff --git a/os/hal/include/sdc.h b/os/hal/include/sdc.h
index 605cb7048..f5051731e 100644
--- a/os/hal/include/sdc.h
+++ b/os/hal/include/sdc.h
@@ -137,20 +137,6 @@
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
#define SDC_NICE_WAITING TRUE
#endif
-
-/**
- * @brief Write timeout in milliseconds.
- */
-#if !defined(SDC_WRITE_TIMEOUT_MS) || defined(__DOXYGEN__)
-#define SDC_WRITE_TIMEOUT_MS 250
-#endif
-
-/**
- * @brief Write timeout in milliseconds.
- */
-#if !defined(SDC_READ_TIMEOUT_MS) || defined(__DOXYGEN__)
-#define SDC_READ_TIMEOUT_MS 5
-#endif
/** @} */
/*===========================================================================*/
@@ -262,8 +248,12 @@ typedef enum {
* @api
*/
#define sdcGetCardCapacity(sdcp) ((sdcp)->capacity)
+/** @} */
/**
+ * @name CSD record offsets
+ */
+/**
* @brief Slice position of values in CSD register.
*/
/* CSD version 2.0 */
diff --git a/os/hal/platforms/STM32/sdc_lld.c b/os/hal/platforms/STM32/sdc_lld.c
index 37cac4d90..953f42d32 100644
--- a/os/hal/platforms/STM32/sdc_lld.c
+++ b/os/hal/platforms/STM32/sdc_lld.c
@@ -249,7 +249,10 @@ static void sdc_lld_collect_errors(SDCDriver *sdcp) {
*
* @notapi
*/
-static void sdc_lld_error_cleanup(SDCDriver *sdcp, uint32_t n, uint32_t *resp){
+static void sdc_lld_error_cleanup(SDCDriver *sdcp,
+ uint32_t n,
+ uint32_t *resp) {
+
dmaStreamClearInterrupt(sdcp->dma);
dmaStreamDisable(sdcp->dma);
SDIO->ICR = STM32_SDIO_ICR_ALL_FLAGS;
@@ -324,11 +327,11 @@ void sdc_lld_start(SDCDriver *sdcp) {
STM32_DMA_CR_MSIZE_WORD |
STM32_DMA_CR_MINC;
- #if (defined(STM32F4XX) || defined(STM32F2XX))
- sdcp->dmamode |= STM32_DMA_CR_PFCTRL |
- STM32_DMA_CR_PBURST_INCR4 |
- STM32_DMA_CR_MBURST_INCR4;
- #endif
+#if (defined(STM32F4XX) || defined(STM32F2XX))
+ sdcp->dmamode |= STM32_DMA_CR_PFCTRL |
+ STM32_DMA_CR_PBURST_INCR4 |
+ STM32_DMA_CR_MBURST_INCR4;
+#endif
if (sdcp->state == SDC_STOP) {
/* Note, the DMA must be enabled before the IRQs.*/
@@ -336,9 +339,9 @@ void sdc_lld_start(SDCDriver *sdcp) {
b = dmaStreamAllocate(sdcp->dma, STM32_SDC_SDIO_IRQ_PRIORITY, NULL, NULL);
chDbgAssert(!b, "i2c_lld_start(), #3", "stream already allocated");
dmaStreamSetPeripheral(sdcp->dma, &SDIO->FIFO);
- #if (defined(STM32F4XX) || defined(STM32F2XX))
- dmaStreamSetFIFO(sdcp->dma, STM32_DMA_FCR_DMDIS | STM32_DMA_FCR_FTH_FULL);
- #endif
+#if (defined(STM32F4XX) || defined(STM32F2XX))
+ dmaStreamSetFIFO(sdcp->dma, STM32_DMA_FCR_DMDIS | STM32_DMA_FCR_FTH_FULL);
+#endif
nvicEnableVector(SDIO_IRQn,
CORTEX_PRIORITY_MASK(STM32_SDC_SDIO_IRQ_PRIORITY));
rccEnableSDIO(FALSE);
@@ -383,6 +386,7 @@ void sdc_lld_stop(SDCDriver *sdcp) {
void sdc_lld_start_clk(SDCDriver *sdcp) {
(void)sdcp;
+
/* Initial clock setting: 400kHz, 1bit mode.*/
SDIO->CLKCR = STM32_SDIO_DIV_LS;
SDIO->POWER |= SDIO_POWER_PWRCTRL_0 | SDIO_POWER_PWRCTRL_1;
@@ -399,6 +403,7 @@ void sdc_lld_start_clk(SDCDriver *sdcp) {
void sdc_lld_set_data_clk(SDCDriver *sdcp) {
(void)sdcp;
+
SDIO->CLKCR = (SDIO->CLKCR & 0xFFFFFF00) | STM32_SDIO_DIV_HS;
}
@@ -412,6 +417,7 @@ void sdc_lld_set_data_clk(SDCDriver *sdcp) {
void sdc_lld_stop_clk(SDCDriver *sdcp) {
(void)sdcp;
+
SDIO->CLKCR = 0;
SDIO->POWER = 0;
}
@@ -428,6 +434,7 @@ void sdc_lld_set_bus_mode(SDCDriver *sdcp, sdcbusmode_t mode) {
uint32_t clk = SDIO->CLKCR & ~SDIO_CLKCR_WIDBUS;
(void)sdcp;
+
switch (mode) {
case SDC_MODE_1BIT:
SDIO->CLKCR = clk;
@@ -453,6 +460,7 @@ void sdc_lld_set_bus_mode(SDCDriver *sdcp, sdcbusmode_t mode) {
void sdc_lld_send_cmd_none(SDCDriver *sdcp, uint8_t cmd, uint32_t arg) {
(void)sdcp;
+
SDIO->ARG = arg;
SDIO->CMD = (uint32_t)cmd | SDIO_CMD_CPSMEN;
while ((SDIO->STA & SDIO_STA_CMDSENT) == 0)
@@ -480,6 +488,7 @@ bool_t sdc_lld_send_cmd_short(SDCDriver *sdcp, uint8_t cmd, uint32_t arg,
uint32_t sta;
(void)sdcp;
+
SDIO->ARG = arg;
SDIO->CMD = (uint32_t)cmd | SDIO_CMD_WAITRESP_0 | SDIO_CMD_CPSMEN;
while (((sta = SDIO->STA) & (SDIO_STA_CMDREND | SDIO_STA_CTIMEOUT |
@@ -513,6 +522,7 @@ bool_t sdc_lld_send_cmd_short_crc(SDCDriver *sdcp, uint8_t cmd, uint32_t arg,
uint32_t sta;
(void)sdcp;
+
SDIO->ARG = arg;
SDIO->CMD = (uint32_t)cmd | SDIO_CMD_WAITRESP_0 | SDIO_CMD_CPSMEN;
while (((sta = SDIO->STA) & (SDIO_STA_CMDREND | SDIO_STA_CTIMEOUT |
@@ -543,10 +553,10 @@ bool_t sdc_lld_send_cmd_short_crc(SDCDriver *sdcp, uint8_t cmd, uint32_t arg,
*/
bool_t sdc_lld_send_cmd_long_crc(SDCDriver *sdcp, uint8_t cmd, uint32_t arg,
uint32_t *resp) {
-
uint32_t sta;
(void)sdcp;
+
SDIO->ARG = arg;
SDIO->CMD = (uint32_t)cmd | SDIO_CMD_WAITRESP_0 | SDIO_CMD_WAITRESP_1 |
SDIO_CMD_CPSMEN;
@@ -620,8 +630,8 @@ bool_t sdc_lld_read_aligned(SDCDriver *sdcp, uint32_t startblk,
SDIO_DCTRL_DTEN;
if (sdc_lld_wait_transaction_end(sdcp, n, resp) == TRUE)
goto error;
- else
- return CH_SUCCESS;
+
+ return CH_SUCCESS;
error:
sdc_lld_error_cleanup(sdcp, n, resp);
@@ -681,8 +691,8 @@ bool_t sdc_lld_write_aligned(SDCDriver *sdcp, uint32_t startblk,
SDIO_DCTRL_DTEN;
if (sdc_lld_wait_transaction_end(sdcp, n, resp) == TRUE)
goto error;
- else
- return CH_SUCCESS;
+
+ return CH_SUCCESS;
error:
sdc_lld_error_cleanup(sdcp, n, resp);
diff --git a/os/hal/platforms/STM32/sdc_lld.h b/os/hal/platforms/STM32/sdc_lld.h
index b3ef6a788..a807b28ce 100644
--- a/os/hal/platforms/STM32/sdc_lld.h
+++ b/os/hal/platforms/STM32/sdc_lld.h
@@ -75,6 +75,19 @@
#define STM32_SDC_SDIO_IRQ_PRIORITY 9
#endif
+/**
+ * @brief Write timeout in milliseconds.
+ */
+#if !defined(SDC_WRITE_TIMEOUT_MS) || defined(__DOXYGEN__)
+#define SDC_WRITE_TIMEOUT_MS 250
+#endif
+
+/**
+ * @brief Read timeout in milliseconds.
+ */
+#if !defined(SDC_READ_TIMEOUT_MS) || defined(__DOXYGEN__)
+#define SDC_READ_TIMEOUT_MS 5
+#endif
/** @} */
/*===========================================================================*/
@@ -93,32 +106,34 @@
* SDIO clock divider.
*/
#if (defined(STM32F4XX) || defined(STM32F2XX))
- #define STM32_SDIO_DIV_HS 0
- #define STM32_SDIO_DIV_LS 120
+#define STM32_SDIO_DIV_HS 0
+#define STM32_SDIO_DIV_LS 120
+
#elif STM32_HCLK > 48000000
- #define STM32_SDIO_DIV_HS 1
- #define STM32_SDIO_DIV_LS 178
+#define STM32_SDIO_DIV_HS 1
+#define STM32_SDIO_DIV_LS 178
#else
- #define STM32_SDIO_DIV_HS 0
- #define STM32_SDIO_DIV_LS 118
+
+#define STM32_SDIO_DIV_HS 0
+#define STM32_SDIO_DIV_LS 118
#endif
/**
* @brief SDIO data timeouts in SDIO clock cycles.
*/
#if (defined(STM32F4XX) || defined(STM32F2XX))
- #define STM32_SDC_WRITE_TIMEOUT \
- (((48000000 / (STM32_SDIO_DIV_HS + 2)) / 1000) * SDC_WRITE_TIMEOUT_MS)
- #define STM32_SDC_READ_TIMEOUT \
- (((48000000 / (STM32_SDIO_DIV_HS + 2)) / 1000) * SDC_READ_TIMEOUT_MS)
+#define STM32_SDC_WRITE_TIMEOUT \
+ (((STM32_PLL48CLK / (STM32_SDIO_DIV_HS + 2)) / 1000) * SDC_WRITE_TIMEOUT_MS)
+#define STM32_SDC_READ_TIMEOUT \
+ (((STM32_PLL48CLK / (STM32_SDIO_DIV_HS + 2)) / 1000) * SDC_READ_TIMEOUT_MS)
+
#else
- #define STM32_SDC_WRITE_TIMEOUT \
- (((STM32_HCLK /((STM32_SDIO_DIV_HS + 2)) / 1000) * SDC_WRITE_TIMEOUT_MS)
- #define STM32_SDC_READ_TIMEOUT \
- (((STM32_HCLK /((STM32_SDIO_DIV_HS + 2)) / 1000) * SDC_READ_TIMEOUT_MS)
+#define STM32_SDC_WRITE_TIMEOUT \
+ (((STM32_HCLK /((STM32_SDIO_DIV_HS + 2)) / 1000) * SDC_WRITE_TIMEOUT_MS)
+#define STM32_SDC_READ_TIMEOUT \
+ (((STM32_HCLK /((STM32_SDIO_DIV_HS + 2)) / 1000) * SDC_READ_TIMEOUT_MS)
#endif
-
/*===========================================================================*/
/* Driver data structures and types. */
/*===========================================================================*/
diff --git a/os/kernel/include/ch.h b/os/kernel/include/ch.h
index 7386b622b..3696f78b3 100644
--- a/os/kernel/include/ch.h
+++ b/os/kernel/include/ch.h
@@ -62,25 +62,43 @@
#define CH_KERNEL_PATCH 0
/** @} */
-/*
- * Common values.
+/**
+ * @name Common constants
+ */
+/**
+ * @brief Generic 'false' boolean constant.
*/
-#ifndef FALSE
+#if !defined(FALSE) || defined(__DOXYGEN__)
#define FALSE 0
#endif
-#ifndef TRUE
+
+/**
+ * @brief Generic 'true' boolean constant.
+ */
+#if !defined(TRUE) || defined(__DOXYGEN__)
#define TRUE (!FALSE)
#endif
-/*
- * Human readable boolean error conditions.
+/**
+ * @brief Generic success constant.
+ * @details This constant is functionally equivalent to @p FALSE but more
+ * readable, it can be used as return value of all those functions
+ * returning a @p bool_t as a status indicator.
*/
-#ifndef CH_SUCCESS
+#if !defined(CH_SUCCESS) || defined(__DOXYGEN__)
#define CH_SUCCESS FALSE
#endif
-#ifndef CH_FAILED
+
+/**
+ * @brief Generic failure constant.
+ * @details This constant is functionally equivalent to @p TRUE but more
+ * readable, it can be used as return value of all those functions
+ * returning a @p bool_t as a status indicator.
+ */
+#if !defined(CH_FAILED) || defined(__DOXYGEN__)
#define CH_FAILED TRUE
#endif
+/** @} */
#include "chconf.h"
#include "chtypes.h"
diff --git a/os/kernel/src/chmtx.c b/os/kernel/src/chmtx.c
index 20a4700fe..6e32ca439 100644
--- a/os/kernel/src/chmtx.c
+++ b/os/kernel/src/chmtx.c
@@ -258,7 +258,7 @@ Mutex *chMtxUnlock(void) {
chDbgAssert(ctp->p_mtxlist->m_owner == ctp,
"chMtxUnlock(), #2",
"ownership failure");
- /* Removes the top Mutex from the Thread's owned mutexes list and matk it
+ /* Removes the top Mutex from the Thread's owned mutexes list and marks it
as not owned.*/
ump = ctp->p_mtxlist;
ctp->p_mtxlist = ump->m_next;
diff --git a/os/ports/GCC/ARMCMx/LPC11xx/vectors.c b/os/ports/GCC/ARMCMx/LPC11xx/vectors.c
index 2fd25a686..c51a89e25 100644
--- a/os/ports/GCC/ARMCMx/LPC11xx/vectors.c
+++ b/os/ports/GCC/ARMCMx/LPC11xx/vectors.c
@@ -114,57 +114,55 @@ __attribute__ ((naked))
#endif
void _unhandled_exception(void) {
- asm volatile (
- ".weak NMIVector \nNMIVector: \n\t"
- ".weak HardFaultVector \nHardFaultVector: \n\t"
- ".weak MemManageVector \nMemManageVector: \n\t"
- ".weak BusFaultVector \nBusFaultVector: \n\t"
- ".weak UsageFaultVector \nUsageFaultVector: \n\t"
- ".weak Vector1C \nVector1C: \n\t"
- ".weak Vector20 \nVector20: \n\t"
- ".weak Vector24 \nVector24: \n\t"
- ".weak Vector28 \nVector28: \n\t"
- ".weak SVCallVector \nSVCallVector: \n\t"
- ".weak DebugMonitorVector \nDebugMonitorVector: \n\t"
- ".weak Vector34 \nVector34: \n\t"
- ".weak PendSVVector \nPendSVVector: \n\t"
- ".weak SysTickVector \nSysTickVector: \n\t"
- ".weak Vector40 \nVector40: \n\t"
- ".weak Vector44 \nVector44: \n\t"
- ".weak Vector48 \nVector48: \n\t"
- ".weak Vector4C \nVector4C: \n\t"
- ".weak Vector50 \nVector50: \n\t"
- ".weak Vector54 \nVector54: \n\t"
- ".weak Vector58 \nVector58: \n\t"
- ".weak Vector5C \nVector5C: \n\t"
- ".weak Vector60 \nVector60: \n\t"
- ".weak Vector64 \nVector64: \n\t"
- ".weak Vector68 \nVector68: \n\t"
- ".weak Vector6C \nVector6C: \n\t"
- ".weak Vector70 \nVector70: \n\t"
- ".weak Vector74 \nVector74: \n\t"
- ".weak Vector78 \nVector78: \n\t"
- ".weak Vector7C \nVector7C: \n\t"
- ".weak Vector80 \nVector80: \n\t"
- ".weak Vector84 \nVector84: \n\t"
- ".weak Vector88 \nVector88: \n\t"
- ".weak Vector8C \nVector8C: \n\t"
- ".weak Vector90 \nVector90: \n\t"
- ".weak Vector94 \nVector94: \n\t"
- ".weak Vector98 \nVector98: \n\t"
- ".weak Vector9C \nVector9C: \n\t"
- ".weak VectorA0 \nVectorA0: \n\t"
- ".weak VectorA4 \nVectorA4: \n\t"
- ".weak VectorA8 \nVectorA8: \n\t"
- ".weak VectorAC \nVectorAC: \n\t"
- ".weak VectorB0 \nVectorB0: \n\t"
- ".weak VectorB4 \nVectorB4: \n\t"
- ".weak VectorB8 \nVectorB8: \n\t"
- ".weak VectorBC \nVectorBC: \n\t"
- );
-
while (TRUE)
;
}
+void NMIVector(void) __attribute__((weak, alias("_unhandled_exception")));
+void HardFaultVector(void) __attribute__((weak, alias("_unhandled_exception")));
+void MemManageVector(void) __attribute__((weak, alias("_unhandled_exception")));
+void BusFaultVector(void) __attribute__((weak, alias("_unhandled_exception")));
+void UsageFaultVector(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector1C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector20(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector24(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector28(void) __attribute__((weak, alias("_unhandled_exception")));
+void SVCallVector(void) __attribute__((weak, alias("_unhandled_exception")));
+void DebugMonitorVector(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector34(void) __attribute__((weak, alias("_unhandled_exception")));
+void PendSVVector(void) __attribute__((weak, alias("_unhandled_exception")));
+void SysTickVector(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector40(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector44(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector48(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector4C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector50(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector54(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector58(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector5C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector60(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector64(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector68(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector6C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector70(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector74(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector78(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector7C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector80(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector84(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector88(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector8C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector90(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector94(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector98(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector9C(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorA0(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorA4(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorA8(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorAC(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorB0(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorB4(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorB8(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorBC(void) __attribute__((weak, alias("_unhandled_exception")));
+
/** @} */
diff --git a/os/ports/GCC/ARMCMx/LPC13xx/vectors.c b/os/ports/GCC/ARMCMx/LPC13xx/vectors.c
index b956aeebc..9c902c670 100644
--- a/os/ports/GCC/ARMCMx/LPC13xx/vectors.c
+++ b/os/ports/GCC/ARMCMx/LPC13xx/vectors.c
@@ -144,81 +144,79 @@ __attribute__ ((naked))
#endif
void _unhandled_exception(void) {
- asm volatile (
- ".weak NMIVector \nNMIVector: \n\t"
- ".weak HardFaultVector \nHardFaultVector: \n\t"
- ".weak MemManageVector \nMemManageVector: \n\t"
- ".weak BusFaultVector \nBusFaultVector: \n\t"
- ".weak UsageFaultVector \nUsageFaultVector: \n\t"
- ".weak Vector1C \nVector1C: \n\t"
- ".weak Vector20 \nVector20: \n\t"
- ".weak Vector24 \nVector24: \n\t"
- ".weak Vector28 \nVector28: \n\t"
- ".weak SVCallVector \nSVCallVector: \n\t"
- ".weak DebugMonitorVector \nDebugMonitorVector: \n\t"
- ".weak Vector34 \nVector34: \n\t"
- ".weak PendSVVector \nPendSVVector: \n\t"
- ".weak SysTickVector \nSysTickVector: \n\t"
- ".weak Vector40 \nVector40: \n\t"
- ".weak Vector44 \nVector44: \n\t"
- ".weak Vector48 \nVector48: \n\t"
- ".weak Vector4C \nVector4C: \n\t"
- ".weak Vector50 \nVector50: \n\t"
- ".weak Vector54 \nVector54: \n\t"
- ".weak Vector58 \nVector58: \n\t"
- ".weak Vector5C \nVector5C: \n\t"
- ".weak Vector60 \nVector60: \n\t"
- ".weak Vector64 \nVector64: \n\t"
- ".weak Vector68 \nVector68: \n\t"
- ".weak Vector6C \nVector6C: \n\t"
- ".weak Vector70 \nVector70: \n\t"
- ".weak Vector74 \nVector74: \n\t"
- ".weak Vector78 \nVector78: \n\t"
- ".weak Vector7C \nVector7C: \n\t"
- ".weak Vector80 \nVector80: \n\t"
- ".weak Vector84 \nVector84: \n\t"
- ".weak Vector88 \nVector88: \n\t"
- ".weak Vector8C \nVector8C: \n\t"
- ".weak Vector90 \nVector90: \n\t"
- ".weak Vector94 \nVector94: \n\t"
- ".weak Vector98 \nVector98: \n\t"
- ".weak Vector9C \nVector9C: \n\t"
- ".weak VectorA0 \nVectorA0: \n\t"
- ".weak VectorA4 \nVectorA4: \n\t"
- ".weak VectorA8 \nVectorA8: \n\t"
- ".weak VectorAC \nVectorAC: \n\t"
- ".weak VectorB0 \nVectorB0: \n\t"
- ".weak VectorB4 \nVectorB4: \n\t"
- ".weak VectorB8 \nVectorB8: \n\t"
- ".weak VectorBC \nVectorBC: \n\t"
- ".weak VectorC0 \nVectorC0: \n\t"
- ".weak VectorC4 \nVectorC4: \n\t"
- ".weak VectorC8 \nVectorC8: \n\t"
- ".weak VectorCC \nVectorCC: \n\t"
- ".weak VectorD0 \nVectorD0: \n\t"
- ".weak VectorD4 \nVectorD4: \n\t"
- ".weak VectorD8 \nVectorD8: \n\t"
- ".weak VectorDC \nVectorDC: \n\t"
- ".weak VectorE0 \nVectorE0: \n\t"
- ".weak VectorE4 \nVectorE4: \n\t"
- ".weak VectorE8 \nVectorE8: \n\t"
- ".weak VectorEC \nVectorEC: \n\t"
- ".weak VectorF0 \nVectorF0: \n\t"
- ".weak VectorF4 \nVectorF4: \n\t"
- ".weak VectorF8 \nVectorF8: \n\t"
- ".weak VectorFC \nVectorFC: \n\t"
- ".weak Vector100 \nVector100: \n\t"
- ".weak Vector104 \nVector104: \n\t"
- ".weak Vector108 \nVector108: \n\t"
- ".weak Vector10C \nVector10C: \n\t"
- ".weak Vector110 \nVector110: \n\t"
- ".weak Vector114 \nVector114: \n\t"
- ".weak Vector118 \nVector118: \n\t"
- ".weak Vector11C \nVector11C: \n\t"
- );
-
while (TRUE)
;
}
+void NMIVector(void) __attribute__((weak, alias("_unhandled_exception")));
+void HardFaultVector(void) __attribute__((weak, alias("_unhandled_exception")));
+void MemManageVector(void) __attribute__((weak, alias("_unhandled_exception")));
+void BusFaultVector(void) __attribute__((weak, alias("_unhandled_exception")));
+void UsageFaultVector(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector1C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector20(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector24(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector28(void) __attribute__((weak, alias("_unhandled_exception")));
+void SVCallVector(void) __attribute__((weak, alias("_unhandled_exception")));
+void DebugMonitorVector(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector34(void) __attribute__((weak, alias("_unhandled_exception")));
+void PendSVVector(void) __attribute__((weak, alias("_unhandled_exception")));
+void SysTickVector(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector40(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector44(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector48(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector4C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector50(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector54(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector58(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector5C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector60(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector64(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector68(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector6C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector70(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector74(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector78(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector7C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector80(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector84(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector88(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector8C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector90(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector94(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector98(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector9C(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorA0(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorA4(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorA8(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorAC(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorB0(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorB4(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorB8(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorBC(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorC0(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorC4(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorC8(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorCC(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorD0(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorD4(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorD8(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorDC(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorE0(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorE4(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorE8(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorEC(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorF0(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorF4(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorF8(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorFC(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector100(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector104(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector108(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector10C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector110(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector114(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector118(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector11C(void) __attribute__((weak, alias("_unhandled_exception")));
+
/** @} */
diff --git a/os/ports/GCC/ARMCMx/STM32F1xx/vectors.c b/os/ports/GCC/ARMCMx/STM32F1xx/vectors.c
index 9d8ee8793..07145f76c 100644
--- a/os/ports/GCC/ARMCMx/STM32F1xx/vectors.c
+++ b/os/ports/GCC/ARMCMx/STM32F1xx/vectors.c
@@ -193,100 +193,98 @@ __attribute__ ((naked))
#endif
void _unhandled_exception(void) {
- asm volatile (
- ".weak NMIVector \nNMIVector: \n\t"
- ".weak HardFaultVector \nHardFaultVector: \n\t"
- ".weak MemManageVector \nMemManageVector: \n\t"
- ".weak BusFaultVector \nBusFaultVector: \n\t"
- ".weak UsageFaultVector \nUsageFaultVector: \n\t"
- ".weak Vector1C \nVector1C: \n\t"
- ".weak Vector20 \nVector20: \n\t"
- ".weak Vector24 \nVector24: \n\t"
- ".weak Vector28 \nVector28: \n\t"
- ".weak SVCallVector \nSVCallVector: \n\t"
- ".weak DebugMonitorVector \nDebugMonitorVector: \n\t"
- ".weak Vector34 \nVector34: \n\t"
- ".weak PendSVVector \nPendSVVector: \n\t"
- ".weak SysTickVector \nSysTickVector: \n\t"
- ".weak Vector40 \nVector40: \n\t"
- ".weak Vector44 \nVector44: \n\t"
- ".weak Vector48 \nVector48: \n\t"
- ".weak Vector4C \nVector4C: \n\t"
- ".weak Vector50 \nVector50: \n\t"
- ".weak Vector54 \nVector54: \n\t"
- ".weak Vector58 \nVector58: \n\t"
- ".weak Vector5C \nVector5C: \n\t"
- ".weak Vector60 \nVector60: \n\t"
- ".weak Vector64 \nVector64: \n\t"
- ".weak Vector68 \nVector68: \n\t"
- ".weak Vector6C \nVector6C: \n\t"
- ".weak Vector70 \nVector70: \n\t"
- ".weak Vector74 \nVector74: \n\t"
- ".weak Vector78 \nVector78: \n\t"
- ".weak Vector7C \nVector7C: \n\t"
- ".weak Vector80 \nVector80: \n\t"
- ".weak Vector84 \nVector84: \n\t"
- ".weak Vector88 \nVector88: \n\t"
- ".weak Vector8C \nVector8C: \n\t"
- ".weak Vector90 \nVector90: \n\t"
- ".weak Vector94 \nVector94: \n\t"
- ".weak Vector98 \nVector98: \n\t"
- ".weak Vector9C \nVector9C: \n\t"
- ".weak VectorA0 \nVectorA0: \n\t"
- ".weak VectorA4 \nVectorA4: \n\t"
- ".weak VectorA8 \nVectorA8: \n\t"
- ".weak VectorAC \nVectorAC: \n\t"
- ".weak VectorB0 \nVectorB0: \n\t"
- ".weak VectorB4 \nVectorB4: \n\t"
- ".weak VectorB8 \nVectorB8: \n\t"
- ".weak VectorBC \nVectorBC: \n\t"
- ".weak VectorC0 \nVectorC0: \n\t"
- ".weak VectorC4 \nVectorC4: \n\t"
- ".weak VectorC8 \nVectorC8: \n\t"
- ".weak VectorCC \nVectorCC: \n\t"
- ".weak VectorD0 \nVectorD0: \n\t"
- ".weak VectorD4 \nVectorD4: \n\t"
- ".weak VectorD8 \nVectorD8: \n\t"
- ".weak VectorDC \nVectorDC: \n\t"
- ".weak VectorE0 \nVectorE0: \n\t"
- ".weak VectorE4 \nVectorE4: \n\t"
- ".weak VectorE8 \nVectorE8: \n\t"
+ while (TRUE)
+ ;
+}
+
+void NMIVector(void) __attribute__((weak, alias("_unhandled_exception")));
+void HardFaultVector(void) __attribute__((weak, alias("_unhandled_exception")));
+void MemManageVector(void) __attribute__((weak, alias("_unhandled_exception")));
+void BusFaultVector(void) __attribute__((weak, alias("_unhandled_exception")));
+void UsageFaultVector(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector1C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector20(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector24(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector28(void) __attribute__((weak, alias("_unhandled_exception")));
+void SVCallVector(void) __attribute__((weak, alias("_unhandled_exception")));
+void DebugMonitorVector(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector34(void) __attribute__((weak, alias("_unhandled_exception")));
+void PendSVVector(void) __attribute__((weak, alias("_unhandled_exception")));
+void SysTickVector(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector40(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector44(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector48(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector4C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector50(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector54(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector58(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector5C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector60(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector64(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector68(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector6C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector70(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector74(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector78(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector7C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector80(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector84(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector88(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector8C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector90(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector94(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector98(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector9C(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorA0(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorA4(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorA8(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorAC(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorB0(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorB4(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorB8(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorBC(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorC0(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorC4(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorC8(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorCC(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorD0(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorD4(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorD8(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorDC(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorE0(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorE4(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorE8(void) __attribute__((weak, alias("_unhandled_exception")));
#if defined(STM32F10X_MD_VL) || defined(STM32F10X_HD) || \
defined(STM32F10X_XL) || defined(STM32F10X_CL)
- ".weak VectorEC \nVectorEC: \n\t"
- ".weak VectorF0 \nVectorF0: \n\t"
- ".weak VectorF4 \nVectorF4: \n\t"
+void VectorEC(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorF0(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorF4(void) __attribute__((weak, alias("_unhandled_exception")));
#endif
#if defined(STM32F10X_HD) || defined(STM32F10X_XL) || defined(STM32F10X_CL)
- ".weak VectorF8 \nVectorF8: \n\t"
- ".weak VectorFC \nVectorFC: \n\t"
- ".weak Vector100 \nVector100: \n\t"
- ".weak Vector104 \nVector104: \n\t"
- ".weak Vector108 \nVector108: \n\t"
- ".weak Vector10C \nVector10C: \n\t"
- ".weak Vector110 \nVector110: \n\t"
- ".weak Vector114 \nVector114: \n\t"
- ".weak Vector118 \nVector118: \n\t"
- ".weak Vector11C \nVector11C: \n\t"
- ".weak Vector120 \nVector120: \n\t"
- ".weak Vector124 \nVector124: \n\t"
- ".weak Vector128 \nVector128: \n\t"
- ".weak Vector12C \nVector12C: \n\t"
+void VectorF8(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorFC(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector100(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector104(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector108(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector10C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector110(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector114(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector118(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector11C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector120(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector124(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector128(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector12C(void) __attribute__((weak, alias("_unhandled_exception")));
#endif
#if defined(STM32F10X_CL)
- ".weak Vector130 \nVector130: \n\t"
- ".weak Vector134 \nVector134: \n\t"
- ".weak Vector138 \nVector138: \n\t"
- ".weak Vector13C \nVector13C: \n\t"
- ".weak Vector140 \nVector140: \n\t"
- ".weak Vector144 \nVector144: \n\t"
- ".weak Vector148 \nVector148: \n\t"
- ".weak Vector14C \nVector14C: \n\t"
+void Vector130(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector134(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector138(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector13C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector140(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector144(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector148(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector14C(void) __attribute__((weak, alias("_unhandled_exception")));
#endif
- );
-
- while (TRUE)
- ;
-}
/** @} */
diff --git a/os/ports/GCC/ARMCMx/STM32F2xx/vectors.c b/os/ports/GCC/ARMCMx/STM32F2xx/vectors.c
index f69b72b41..fce885f4f 100644
--- a/os/ports/GCC/ARMCMx/STM32F2xx/vectors.c
+++ b/os/ports/GCC/ARMCMx/STM32F2xx/vectors.c
@@ -176,106 +176,104 @@ __attribute__ ((naked))
#endif
void _unhandled_exception(void) {
- asm volatile (
- ".weak NMIVector \nNMIVector: \n\t"
- ".weak HardFaultVector \nHardFaultVector: \n\t"
- ".weak MemManageVector \nMemManageVector: \n\t"
- ".weak BusFaultVector \nBusFaultVector: \n\t"
- ".weak UsageFaultVector \nUsageFaultVector: \n\t"
- ".weak Vector1C \nVector1C: \n\t"
- ".weak Vector20 \nVector20: \n\t"
- ".weak Vector24 \nVector24: \n\t"
- ".weak Vector28 \nVector28: \n\t"
- ".weak SVCallVector \nSVCallVector: \n\t"
- ".weak DebugMonitorVector \nDebugMonitorVector: \n\t"
- ".weak Vector34 \nVector34: \n\t"
- ".weak PendSVVector \nPendSVVector: \n\t"
- ".weak SysTickVector \nSysTickVector: \n\t"
- ".weak Vector40 \nVector40: \n\t"
- ".weak Vector44 \nVector44: \n\t"
- ".weak Vector48 \nVector48: \n\t"
- ".weak Vector4C \nVector4C: \n\t"
- ".weak Vector50 \nVector50: \n\t"
- ".weak Vector54 \nVector54: \n\t"
- ".weak Vector58 \nVector58: \n\t"
- ".weak Vector5C \nVector5C: \n\t"
- ".weak Vector60 \nVector60: \n\t"
- ".weak Vector64 \nVector64: \n\t"
- ".weak Vector68 \nVector68: \n\t"
- ".weak Vector6C \nVector6C: \n\t"
- ".weak Vector70 \nVector70: \n\t"
- ".weak Vector74 \nVector74: \n\t"
- ".weak Vector78 \nVector78: \n\t"
- ".weak Vector7C \nVector7C: \n\t"
- ".weak Vector80 \nVector80: \n\t"
- ".weak Vector84 \nVector84: \n\t"
- ".weak Vector88 \nVector88: \n\t"
- ".weak Vector8C \nVector8C: \n\t"
- ".weak Vector90 \nVector90: \n\t"
- ".weak Vector94 \nVector94: \n\t"
- ".weak Vector98 \nVector98: \n\t"
- ".weak Vector9C \nVector9C: \n\t"
- ".weak VectorA0 \nVectorA0: \n\t"
- ".weak VectorA4 \nVectorA4: \n\t"
- ".weak VectorA8 \nVectorA8: \n\t"
- ".weak VectorAC \nVectorAC: \n\t"
- ".weak VectorB0 \nVectorB0: \n\t"
- ".weak VectorB4 \nVectorB4: \n\t"
- ".weak VectorB8 \nVectorB8: \n\t"
- ".weak VectorBC \nVectorBC: \n\t"
- ".weak VectorC0 \nVectorC0: \n\t"
- ".weak VectorC4 \nVectorC4: \n\t"
- ".weak VectorC8 \nVectorC8: \n\t"
- ".weak VectorCC \nVectorCC: \n\t"
- ".weak VectorD0 \nVectorD0: \n\t"
- ".weak VectorD4 \nVectorD4: \n\t"
- ".weak VectorD8 \nVectorD8: \n\t"
- ".weak VectorDC \nVectorDC: \n\t"
- ".weak VectorE0 \nVectorE0: \n\t"
- ".weak VectorE4 \nVectorE4: \n\t"
- ".weak VectorE8 \nVectorE8: \n\t"
- ".weak VectorEC \nVectorEC: \n\t"
- ".weak VectorF0 \nVectorF0: \n\t"
- ".weak VectorF4 \nVectorF4: \n\t"
- ".weak VectorF8 \nVectorF8: \n\t"
- ".weak VectorFC \nVectorFC: \n\t"
- ".weak Vector100 \nVector100: \n\t"
- ".weak Vector104 \nVector104: \n\t"
- ".weak Vector108 \nVector108: \n\t"
- ".weak Vector10C \nVector10C: \n\t"
- ".weak Vector110 \nVector110: \n\t"
- ".weak Vector114 \nVector114: \n\t"
- ".weak Vector118 \nVector118: \n\t"
- ".weak Vector11C \nVector11C: \n\t"
- ".weak Vector120 \nVector120: \n\t"
- ".weak Vector124 \nVector124: \n\t"
- ".weak Vector128 \nVector128: \n\t"
- ".weak Vector12C \nVector12C: \n\t"
- ".weak Vector130 \nVector130: \n\t"
- ".weak Vector134 \nVector134: \n\t"
- ".weak Vector138 \nVector138: \n\t"
- ".weak Vector13C \nVector13C: \n\t"
- ".weak Vector140 \nVector140: \n\t"
- ".weak Vector144 \nVector144: \n\t"
- ".weak Vector148 \nVector148: \n\t"
- ".weak Vector14C \nVector14C: \n\t"
- ".weak Vector150 \nVector150: \n\t"
- ".weak Vector154 \nVector154: \n\t"
- ".weak Vector158 \nVector158: \n\t"
- ".weak Vector15C \nVector15C: \n\t"
- ".weak Vector160 \nVector160: \n\t"
- ".weak Vector164 \nVector164: \n\t"
- ".weak Vector168 \nVector168: \n\t"
- ".weak Vector16C \nVector16C: \n\t"
- ".weak Vector170 \nVector170: \n\t"
- ".weak Vector174 \nVector174: \n\t"
- ".weak Vector178 \nVector178: \n\t"
- ".weak Vector17C \nVector17C: \n\t"
- ".weak Vector180 \nVector180: \n\t"
- );
-
while (TRUE)
;
}
+void NMIVector(void) __attribute__((weak, alias("_unhandled_exception")));
+void HardFaultVector(void) __attribute__((weak, alias("_unhandled_exception")));
+void MemManageVector(void) __attribute__((weak, alias("_unhandled_exception")));
+void BusFaultVector(void) __attribute__((weak, alias("_unhandled_exception")));
+void UsageFaultVector(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector1C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector20(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector24(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector28(void) __attribute__((weak, alias("_unhandled_exception")));
+void SVCallVector(void) __attribute__((weak, alias("_unhandled_exception")));
+void DebugMonitorVector(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector34(void) __attribute__((weak, alias("_unhandled_exception")));
+void PendSVVector(void) __attribute__((weak, alias("_unhandled_exception")));
+void SysTickVector(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector40(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector44(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector48(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector4C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector50(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector54(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector58(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector5C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector60(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector64(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector68(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector6C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector70(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector74(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector78(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector7C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector80(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector84(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector88(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector8C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector90(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector94(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector98(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector9C(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorA0(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorA4(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorA8(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorAC(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorB0(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorB4(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorB8(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorBC(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorC0(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorC4(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorC8(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorCC(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorD0(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorD4(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorD8(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorDC(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorE0(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorE4(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorE8(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorEC(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorF0(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorF4(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorF8(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorFC(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector100(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector104(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector108(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector10C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector110(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector114(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector118(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector11C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector120(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector124(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector128(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector12C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector130(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector134(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector138(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector13C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector140(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector144(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector148(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector14C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector150(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector154(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector158(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector15C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector160(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector164(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector168(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector16C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector170(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector174(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector178(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector17C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector180(void) __attribute__((weak, alias("_unhandled_exception")));
+
/** @} */
diff --git a/os/ports/GCC/ARMCMx/STM32F4xx/vectors.c b/os/ports/GCC/ARMCMx/STM32F4xx/vectors.c
index d3d9ecf7e..6d552779d 100644
--- a/os/ports/GCC/ARMCMx/STM32F4xx/vectors.c
+++ b/os/ports/GCC/ARMCMx/STM32F4xx/vectors.c
@@ -177,107 +177,105 @@ __attribute__ ((naked))
#endif
void _unhandled_exception(void) {
- asm volatile (
- ".weak NMIVector \nNMIVector: \n\t"
- ".weak HardFaultVector \nHardFaultVector: \n\t"
- ".weak MemManageVector \nMemManageVector: \n\t"
- ".weak BusFaultVector \nBusFaultVector: \n\t"
- ".weak UsageFaultVector \nUsageFaultVector: \n\t"
- ".weak Vector1C \nVector1C: \n\t"
- ".weak Vector20 \nVector20: \n\t"
- ".weak Vector24 \nVector24: \n\t"
- ".weak Vector28 \nVector28: \n\t"
- ".weak SVCallVector \nSVCallVector: \n\t"
- ".weak DebugMonitorVector \nDebugMonitorVector: \n\t"
- ".weak Vector34 \nVector34: \n\t"
- ".weak PendSVVector \nPendSVVector: \n\t"
- ".weak SysTickVector \nSysTickVector: \n\t"
- ".weak Vector40 \nVector40: \n\t"
- ".weak Vector44 \nVector44: \n\t"
- ".weak Vector48 \nVector48: \n\t"
- ".weak Vector4C \nVector4C: \n\t"
- ".weak Vector50 \nVector50: \n\t"
- ".weak Vector54 \nVector54: \n\t"
- ".weak Vector58 \nVector58: \n\t"
- ".weak Vector5C \nVector5C: \n\t"
- ".weak Vector60 \nVector60: \n\t"
- ".weak Vector64 \nVector64: \n\t"
- ".weak Vector68 \nVector68: \n\t"
- ".weak Vector6C \nVector6C: \n\t"
- ".weak Vector70 \nVector70: \n\t"
- ".weak Vector74 \nVector74: \n\t"
- ".weak Vector78 \nVector78: \n\t"
- ".weak Vector7C \nVector7C: \n\t"
- ".weak Vector80 \nVector80: \n\t"
- ".weak Vector84 \nVector84: \n\t"
- ".weak Vector88 \nVector88: \n\t"
- ".weak Vector8C \nVector8C: \n\t"
- ".weak Vector90 \nVector90: \n\t"
- ".weak Vector94 \nVector94: \n\t"
- ".weak Vector98 \nVector98: \n\t"
- ".weak Vector9C \nVector9C: \n\t"
- ".weak VectorA0 \nVectorA0: \n\t"
- ".weak VectorA4 \nVectorA4: \n\t"
- ".weak VectorA8 \nVectorA8: \n\t"
- ".weak VectorAC \nVectorAC: \n\t"
- ".weak VectorB0 \nVectorB0: \n\t"
- ".weak VectorB4 \nVectorB4: \n\t"
- ".weak VectorB8 \nVectorB8: \n\t"
- ".weak VectorBC \nVectorBC: \n\t"
- ".weak VectorC0 \nVectorC0: \n\t"
- ".weak VectorC4 \nVectorC4: \n\t"
- ".weak VectorC8 \nVectorC8: \n\t"
- ".weak VectorCC \nVectorCC: \n\t"
- ".weak VectorD0 \nVectorD0: \n\t"
- ".weak VectorD4 \nVectorD4: \n\t"
- ".weak VectorD8 \nVectorD8: \n\t"
- ".weak VectorDC \nVectorDC: \n\t"
- ".weak VectorE0 \nVectorE0: \n\t"
- ".weak VectorE4 \nVectorE4: \n\t"
- ".weak VectorE8 \nVectorE8: \n\t"
- ".weak VectorEC \nVectorEC: \n\t"
- ".weak VectorF0 \nVectorF0: \n\t"
- ".weak VectorF4 \nVectorF4: \n\t"
- ".weak VectorF8 \nVectorF8: \n\t"
- ".weak VectorFC \nVectorFC: \n\t"
- ".weak Vector100 \nVector100: \n\t"
- ".weak Vector104 \nVector104: \n\t"
- ".weak Vector108 \nVector108: \n\t"
- ".weak Vector10C \nVector10C: \n\t"
- ".weak Vector110 \nVector110: \n\t"
- ".weak Vector114 \nVector114: \n\t"
- ".weak Vector118 \nVector118: \n\t"
- ".weak Vector11C \nVector11C: \n\t"
- ".weak Vector120 \nVector120: \n\t"
- ".weak Vector124 \nVector124: \n\t"
- ".weak Vector128 \nVector128: \n\t"
- ".weak Vector12C \nVector12C: \n\t"
- ".weak Vector130 \nVector130: \n\t"
- ".weak Vector134 \nVector134: \n\t"
- ".weak Vector138 \nVector138: \n\t"
- ".weak Vector13C \nVector13C: \n\t"
- ".weak Vector140 \nVector140: \n\t"
- ".weak Vector144 \nVector144: \n\t"
- ".weak Vector148 \nVector148: \n\t"
- ".weak Vector14C \nVector14C: \n\t"
- ".weak Vector150 \nVector150: \n\t"
- ".weak Vector154 \nVector154: \n\t"
- ".weak Vector158 \nVector158: \n\t"
- ".weak Vector15C \nVector15C: \n\t"
- ".weak Vector160 \nVector160: \n\t"
- ".weak Vector164 \nVector164: \n\t"
- ".weak Vector168 \nVector168: \n\t"
- ".weak Vector16C \nVector16C: \n\t"
- ".weak Vector170 \nVector170: \n\t"
- ".weak Vector174 \nVector174: \n\t"
- ".weak Vector178 \nVector178: \n\t"
- ".weak Vector17C \nVector17C: \n\t"
- ".weak Vector180 \nVector180: \n\t"
- ".weak Vector184 \nVector184: \n\t"
- );
-
while (TRUE)
;
}
+void NMIVector(void) __attribute__((weak, alias("_unhandled_exception")));
+void HardFaultVector(void) __attribute__((weak, alias("_unhandled_exception")));
+void MemManageVector(void) __attribute__((weak, alias("_unhandled_exception")));
+void BusFaultVector(void) __attribute__((weak, alias("_unhandled_exception")));
+void UsageFaultVector(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector1C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector20(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector24(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector28(void) __attribute__((weak, alias("_unhandled_exception")));
+void SVCallVector(void) __attribute__((weak, alias("_unhandled_exception")));
+void DebugMonitorVector(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector34(void) __attribute__((weak, alias("_unhandled_exception")));
+void PendSVVector(void) __attribute__((weak, alias("_unhandled_exception")));
+void SysTickVector(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector40(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector44(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector48(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector4C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector50(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector54(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector58(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector5C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector60(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector64(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector68(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector6C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector70(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector74(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector78(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector7C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector80(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector84(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector88(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector8C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector90(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector94(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector98(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector9C(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorA0(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorA4(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorA8(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorAC(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorB0(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorB4(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorB8(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorBC(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorC0(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorC4(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorC8(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorCC(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorD0(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorD4(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorD8(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorDC(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorE0(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorE4(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorE8(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorEC(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorF0(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorF4(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorF8(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorFC(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector100(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector104(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector108(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector10C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector110(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector114(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector118(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector11C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector120(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector124(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector128(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector12C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector130(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector134(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector138(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector13C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector140(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector144(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector148(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector14C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector150(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector154(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector158(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector15C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector160(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector164(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector168(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector16C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector170(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector174(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector178(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector17C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector180(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector184(void) __attribute__((weak, alias("_unhandled_exception")));
+
/** @} */
diff --git a/os/ports/GCC/ARMCMx/STM32L1xx/vectors.c b/os/ports/GCC/ARMCMx/STM32L1xx/vectors.c
index 21e5ece1c..b66222873 100644
--- a/os/ports/GCC/ARMCMx/STM32L1xx/vectors.c
+++ b/os/ports/GCC/ARMCMx/STM32L1xx/vectors.c
@@ -131,70 +131,68 @@ __attribute__ ((naked))
#endif
void _unhandled_exception(void) {
- asm volatile (
- ".weak NMIVector \nNMIVector: \n\t"
- ".weak HardFaultVector \nHardFaultVector: \n\t"
- ".weak MemManageVector \nMemManageVector: \n\t"
- ".weak BusFaultVector \nBusFaultVector: \n\t"
- ".weak UsageFaultVector \nUsageFaultVector: \n\t"
- ".weak Vector1C \nVector1C: \n\t"
- ".weak Vector20 \nVector20: \n\t"
- ".weak Vector24 \nVector24: \n\t"
- ".weak Vector28 \nVector28: \n\t"
- ".weak SVCallVector \nSVCallVector: \n\t"
- ".weak DebugMonitorVector \nDebugMonitorVector: \n\t"
- ".weak Vector34 \nVector34: \n\t"
- ".weak PendSVVector \nPendSVVector: \n\t"
- ".weak SysTickVector \nSysTickVector: \n\t"
- ".weak Vector40 \nVector40: \n\t"
- ".weak Vector44 \nVector44: \n\t"
- ".weak Vector48 \nVector48: \n\t"
- ".weak Vector4C \nVector4C: \n\t"
- ".weak Vector50 \nVector50: \n\t"
- ".weak Vector54 \nVector54: \n\t"
- ".weak Vector58 \nVector58: \n\t"
- ".weak Vector5C \nVector5C: \n\t"
- ".weak Vector60 \nVector60: \n\t"
- ".weak Vector64 \nVector64: \n\t"
- ".weak Vector68 \nVector68: \n\t"
- ".weak Vector6C \nVector6C: \n\t"
- ".weak Vector70 \nVector70: \n\t"
- ".weak Vector74 \nVector74: \n\t"
- ".weak Vector78 \nVector78: \n\t"
- ".weak Vector7C \nVector7C: \n\t"
- ".weak Vector80 \nVector80: \n\t"
- ".weak Vector84 \nVector84: \n\t"
- ".weak Vector88 \nVector88: \n\t"
- ".weak Vector8C \nVector8C: \n\t"
- ".weak Vector90 \nVector90: \n\t"
- ".weak Vector94 \nVector94: \n\t"
- ".weak Vector98 \nVector98: \n\t"
- ".weak Vector9C \nVector9C: \n\t"
- ".weak VectorA0 \nVectorA0: \n\t"
- ".weak VectorA4 \nVectorA4: \n\t"
- ".weak VectorA8 \nVectorA8: \n\t"
- ".weak VectorAC \nVectorAC: \n\t"
- ".weak VectorB0 \nVectorB0: \n\t"
- ".weak VectorB4 \nVectorB4: \n\t"
- ".weak VectorB8 \nVectorB8: \n\t"
- ".weak VectorBC \nVectorBC: \n\t"
- ".weak VectorC0 \nVectorC0: \n\t"
- ".weak VectorC4 \nVectorC4: \n\t"
- ".weak VectorC8 \nVectorC8: \n\t"
- ".weak VectorCC \nVectorCC: \n\t"
- ".weak VectorD0 \nVectorD0: \n\t"
- ".weak VectorD4 \nVectorD4: \n\t"
- ".weak VectorD8 \nVectorD8: \n\t"
- ".weak VectorDC \nVectorDC: \n\t"
- ".weak VectorE0 \nVectorE0: \n\t"
- ".weak VectorE4 \nVectorE4: \n\t"
- ".weak VectorE8 \nVectorE8: \n\t"
- ".weak VectorEC \nVectorEC: \n\t"
- ".weak VectorF0 \nVectorF0: \n\t"
- );
-
while (TRUE)
;
}
+void NMIVector(void) __attribute__((weak, alias("_unhandled_exception")));
+void HardFaultVector(void) __attribute__((weak, alias("_unhandled_exception")));
+void MemManageVector(void) __attribute__((weak, alias("_unhandled_exception")));
+void BusFaultVector(void) __attribute__((weak, alias("_unhandled_exception")));
+void UsageFaultVector(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector1C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector20(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector24(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector28(void) __attribute__((weak, alias("_unhandled_exception")));
+void SVCallVector(void) __attribute__((weak, alias("_unhandled_exception")));
+void DebugMonitorVector(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector34(void) __attribute__((weak, alias("_unhandled_exception")));
+void PendSVVector(void) __attribute__((weak, alias("_unhandled_exception")));
+void SysTickVector(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector40(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector44(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector48(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector4C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector50(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector54(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector58(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector5C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector60(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector64(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector68(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector6C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector70(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector74(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector78(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector7C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector80(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector84(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector88(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector8C(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector90(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector94(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector98(void) __attribute__((weak, alias("_unhandled_exception")));
+void Vector9C(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorA0(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorA4(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorA8(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorAC(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorB0(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorB4(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorB8(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorBC(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorC0(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorC4(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorC8(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorCC(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorD0(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorD4(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorD8(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorDC(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorE0(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorE4(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorE8(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorEC(void) __attribute__((weak, alias("_unhandled_exception")));
+void VectorF0(void) __attribute__((weak, alias("_unhandled_exception")));
+
/** @} */
diff --git a/os/ports/GCC/ARMCMx/chcore.h b/os/ports/GCC/ARMCMx/chcore.h
index b2cf4deaa..18ee5a364 100644
--- a/os/ports/GCC/ARMCMx/chcore.h
+++ b/os/ports/GCC/ARMCMx/chcore.h
@@ -165,7 +165,7 @@ struct intctx {};
#if (CH_TIME_QUANTUM > 0) || defined(__DOXYGEN__)
/**
- * @brief Inlineable version of this kernel function.
+ * @brief Inline-able version of this kernel function.
*/
#define chSchIsPreemptionRequired() \
(currp->p_preempt ? firstprio(&rlist.r_queue) > currp->p_prio : \
diff --git a/os/ports/IAR/ARMCMx/chcore.h b/os/ports/IAR/ARMCMx/chcore.h
index 0b18c92bc..fd21b92ac 100644
--- a/os/ports/IAR/ARMCMx/chcore.h
+++ b/os/ports/IAR/ARMCMx/chcore.h
@@ -166,7 +166,7 @@ struct intctx {};
#if (CH_TIME_QUANTUM > 0) || defined(__DOXYGEN__)
/**
- * @brief Inlineable version of this kernel function.
+ * @brief Inline-able version of this kernel function.
*/
#define chSchIsPreemptionRequired() \
(currp->p_preempt ? firstprio(&rlist.r_queue) > currp->p_prio : \
diff --git a/os/ports/RVCT/ARMCMx/chcore.h b/os/ports/RVCT/ARMCMx/chcore.h
index 521f7ea73..950cc571f 100644
--- a/os/ports/RVCT/ARMCMx/chcore.h
+++ b/os/ports/RVCT/ARMCMx/chcore.h
@@ -165,7 +165,7 @@ struct intctx {};
#if (CH_TIME_QUANTUM > 0) || defined(__DOXYGEN__)
/**
- * @brief Inlineable version of this kernel function.
+ * @brief Inline-able version of this kernel function.
*/
#define chSchIsPreemptionRequired() \
(currp->p_preempt ? firstprio(&rlist.r_queue) > currp->p_prio : \
diff --git a/os/various/lwip_bindings/lwipthread.c b/os/various/lwip_bindings/lwipthread.c
index a1dd2b178..0a29829a5 100644
--- a/os/various/lwip_bindings/lwipthread.c
+++ b/os/various/lwip_bindings/lwipthread.c
@@ -96,7 +96,7 @@ static void low_level_init(struct netif *netif) {
netif->mtu = 1500;
/* device capabilities */
- /* don't set NETIF_FLAG_ETHARP if this device is not an ethernet one */
+ /* don't set NETIF_FLAG_ETHARP if this device is not an Ethernet one */
netif->flags = NETIF_FLAG_BROADCAST | NETIF_FLAG_ETHARP | NETIF_FLAG_LINK_UP;
/* Do whatever else is needed to initialize interface. */