updated Makefile to dl std periph lib
authordrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Wed, 22 May 2013 12:15:45 +0000 (12:15 +0000)
committerdrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Wed, 22 May 2013 12:15:45 +0000 (12:15 +0000)
git-svn-id: https://svn.code.sf.net/p/freetel/code@1260 01035d8c-6547-0410-b346-abe4f91aad63

codec2-dev/stm32/Makefile
codec2-dev/stm32/README.txt

index a8b74c06ad62719eeb01fadab0a40bc7180911b0..3946dc5f2488def3573d60e81967f548664db8aa 100644 (file)
@@ -29,6 +29,8 @@ endif
 
 # Definitions for the STM32F4 Standard Peripheral Library
 
+PERIPHLIBURL    = http://www.st.com/st-web-ui/static/active/en/st_prod_software_internet/resource/technical/software/firmware/
+PERIPHLIBZIP    = stm32f4_dsp_stdperiph_lib.zip
 PERIPHLIBVER   = V1.1.0
 PERIPHLIBNAME  = STM32F4xx_DSP_StdPeriph_Lib
 PERIPHLIBDIR   = $(PERIPHLIBNAME)_$(PERIPHLIBVER)
@@ -69,7 +71,10 @@ $(CODEC2_SRC)/codebookge.c \
 $(CODEC2_SRC)/dump.c 
 
 CFLAGS += -D__EMBEDDED__ -DTIMER
+
+#enable this for dump files to help verify optimisation
 #CFLAGS += -DDUMP
+
 CFLAGS += -I/home/david/codec2-dev/src
 CFLAGS += -I/home/david/codec2-dev/unittest
 CFLAGS += -Iinc
@@ -107,7 +112,15 @@ OBJS = $(SRCS:.c=.o)
 
 all: libstm32f4.a $(PROJ_NAME).elf fft_test.elf
 
-libstm32f4.a:
+dl/$(PERIPHLIBZIP):
+       mkdir -p dl
+       cd dl; wget $(PERIPHLIBURL)/$(PERIPHLIBZIP)
+       
+$(PERIPHLIBDIR): dl/$(PERIPHLIBZIP)
+       cd dl; unzip $(PERIPHLIBZIP)
+       mv dl/$(PERIPHLIBDIR) $(PERIPHLIBDIR)
+
+libstm32f4.a: $(PERIPHLIBDIR)
        $(MAKE) $(STM32F4TEMPLATE)/system_stm32f4xx.o
        for F in $(STM32F4LIB)/src/*.c ; do $(MAKE) $${F%.c}.o ; done
        for F in $(CMSIS)/DSP_Lib/Source/*/*.c ; do $(MAKE) $${F%.c}.o ; done
index fbd2cadd1cfd6dabcef1ce1ad56078134b3cdbeb..d582967930c45f49be2dc84846b89bf4ac2fd742 100644 (file)
@@ -2,28 +2,34 @@ README.txt
 codec2-dev stm32f4 
 David Rowe May 2013
 
+TODO
+ + Describe what gdb_stdio does, describe what UT does.
+ +  Where raw files end up.  
+ + Dump files and how to use them.
+
 Getting Started
 -------------------------
 
-Describe what gdb_stdio does, describe what UT does. Where raw files
-end up.  Dump files and how to use them.
+. Install arm toolchain binary
 
-Install arm toolchain binary
+  wget https://launchpadlibrarian.net/126639661/gcc-arm-none-eabi-4_7-2012q4-20121208-linux.tar.bz2
+  untar, I placed it in ~/sat
 
-Download and untar STM32F4xx_DSP_StdPeriph_Lib_V1.1.0
+. Build codec2 unit test:
 
-build codec2 unit test, describe what it does
-make
+  cd codec2_dec/stm
+  edit BINPATH for your toolchain locations
+  make
 
-1. Patching and build stlink:
+. Patching and build stlink:
 
    TBC
 
-2. start st-util:
+. start st-util:
 
    ~/stlink$ sudo ./st-util -f /home/david/codec2-dev/stm32/stm32f4_codec2.elf
 
-3. Start gdb:
+. Start gdb:
 
    ~/codec2-dev/stm32$ ~/sat/bin/arm-none-eabi-gdb stm32f4_codec2.elf
 
@@ -37,11 +43,11 @@ make
     Start address 0x800a885, load size 118572
     Transfer rate: 13 KB/sec, 10779 bytes/write.
  
-4. Power cycle Discovery.
+. Power cycle Discovery.
 
-5. ctrl-C to stop st-util, then restart st-util
+. ctrl-C to stop st-util, then restart st-util
 
-6. Back to gdb:
+. Back to gdb:
 
     (gdb) tar ext :4242
     A program is being debugged already.  Kill it? (y or n) y