Getting closer to working Cortex M3 targets.
authortravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Sun, 6 May 2012 13:11:06 +0000 (13:11 +0000)
committertravisutk <travisutk@12e2690d-a6be-4b82-a7b7-67c4a43b65c8>
Sun, 6 May 2012 13:11:06 +0000 (13:11 +0000)
git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@1156 12e2690d-a6be-4b82-a7b7-67c4a43b65c8

firmware/Makefile
firmware/config.mk
firmware/lib/cortexm3.s [new file with mode: 0644]
firmware/lib/stm32f407.c
firmware/platforms/stm32f4discovery.h

index a3ffacd..49dbf99 100644 (file)
@@ -68,14 +68,8 @@ CC =$(GCC) -Wall -O1 -fno-strict-aliasing -g   $(CCEXTRA)
 # your firmware.  The "config" variable is just a space-delimited list
 # of apps you want included.  The makefile will take the list of apps
 # and include all of the proper code needed to build your desired
-# firmware.  This is generated by config.mk.
+# firmware.  $(config) is generated by config.mk.
 
-# New default.
-# ifeq ($(platform),tilaunchpad)
-# config ?= monitor chipcon i2c
-# else
-# config ?= monitor chipcon spi jtag430 jtag430x2 avr openocd ccspi maxusb
-# endif
 
 
 # Build the needed list of app and lib object files from the config
@@ -85,7 +79,7 @@ ifeq ($(platform),tilaunchpad)
 libs= lib/$(platform).o lib/command.o lib/apps.o lib/msp430_serial.o
 #libs+=lib/setjmp.o
 else
-libs= lib/$(mcu).o lib/command.o lib/dco_calib.o lib/apps.o lib/msp430.o lib/arduino.o
+libs= lib/$(mcu).o lib/command.o lib/dco_calib.o lib/apps.o lib/msp430.o lib/arduino.o $(extralibs)
 endif
 
 hdrs=
index 554e79a..48829ce 100644 (file)
@@ -47,6 +47,7 @@ LDFLAGS =
 mcu ?= stm32f407
 platform := stm32f4discovery
 config = monitor
+extralibs = lib/cortexm3.o
 endif
 
 ifneq (,$(findstring $(board),facedancer10))
diff --git a/firmware/lib/cortexm3.s b/firmware/lib/cortexm3.s
new file mode 100644 (file)
index 0000000..cccf7c5
--- /dev/null
@@ -0,0 +1,15 @@
+  .syntax unified
+  .cpu cortex-m3
+  .fpu softvfp
+  .thumb
+
+
+.section  .text.Reset_Handler
+  .weak  Reset_Handler
+  .type  Reset_Handler, %function
+
+Reset_Handler:
+       mov r0, #0
+       ldr r13, =0x20002000
+       bl main
+
index 8e22329..603c0eb 100644 (file)
@@ -1,10 +1,16 @@
-//! MSP430F2618 clock and I/O definitions
-
-// Included by other 2xx ports, such as the 2274.
+/*! \file stm32f407.h
+  \author Travis Goodspeed
+  \brief STM32F407 port definitions.
+*/
 
 #include "platform.h"
 
 
+//! Initialize the STM32F4xx ports and USB.
+void stm32f4xx_init(){
+  
+}
+
 //! Receive a byte.
 unsigned char serial0_rx(){
 }
@@ -35,16 +41,4 @@ void setbaud1(unsigned char rate){
 
 }
 
-void msp430_init_uart(){
-
-}
-
-
-//! Initialization is correct.
-void msp430_init_dco_done(){
-}
-
-//! Initialize the MSP430 clock.
-void msp430_init_dco() {
-}
 
index 4b7c518..2eb33a0 100644 (file)
@@ -2,3 +2,7 @@
 
 // Nothing to see here.
 
+
+#define INITCHIP stm32f4xx_init();
+
+void stm32f4xx_init();