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
}
+//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)
+};