From 60c3c89f25870849e5c64dd415429822f483bc3f Mon Sep 17 00:00:00 2001 From: travisutk Date: Sun, 6 May 2012 13:42:26 +0000 Subject: [PATCH] STM407 port has working IVT. Still no comms. git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@1158 12e2690d-a6be-4b82-a7b7-67c4a43b65c8 --- firmware/config.mk | 2 +- firmware/lib/stm32f407.c | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/firmware/config.mk b/firmware/config.mk index 86b6d5e..71b9a58 100644 --- a/firmware/config.mk +++ b/firmware/config.mk @@ -33,7 +33,7 @@ ifneq (,$(findstring $(board),stm32f4discovery)) periph ?= /opt/STM32F4xx_StdPeriph_Driver discovery ?= /opt/STM32F4-Discovery_FW_V1.1.0 -pincs ?= -I$(periph)/inc -I$(discovery)/Libraries/CMSIS/ST/STM32F4xx/Include -I$(discovery)/Libraries/CMSIS/Include -Dassert_param\(x\) +pincs ?= -I$(periph)/inc -I$(discovery)/Libraries/CMSIS/ST/STM32F4xx/Include -I$(discovery)/Libraries/CMSIS/Include -Dassert_param\(x\)= psrc ?= /opt/STM32F4xx_StdPeriph_Driver/src diff --git a/firmware/lib/stm32f407.c b/firmware/lib/stm32f407.c index f59967a..10ec8f4 100644 --- a/firmware/lib/stm32f407.c +++ b/firmware/lib/stm32f407.c @@ -47,3 +47,21 @@ void setbaud1(unsigned char rate){ } +//Declarations +void nmi_handler(void); +void hardfault_handler(void); +int main(void); + +//From min.s +void Reset_Handler(void); + + + +// Define the vector table +unsigned int * myvectors[50] + __attribute__ ((section("vectors")))= { + (unsigned int *) 0x20000800, // stack pointer + (unsigned int *) Reset_Handler, // code entry point + (unsigned int *) main, // NMI handler (not really) + (unsigned int *) main, // hard fault handler (let's hope not) +}; -- 2.20.1