shithub: lwext4

Download patch

ref: 0220020635d5d67ecece00461807a5e7f011a7ba
parent: c4ae65b16f802df86318c7f95d32f25be094e6f2
author: gkostka <kostka.grzegorz@gmail.com>
date: Wed Apr 22 17:30:36 EDT 2015

Sync ChibiOS demos with trunk system codebase

--- a/demos/chibios/apps/olimex_stm32_lcd_sd/Makefile
+++ b/demos/chibios/apps/olimex_stm32_lcd_sd/Makefile
@@ -88,29 +88,35 @@
 # Imported source files and paths
 include ../../boards/olimex_stm32_lcd/board.mk
 
+# Startup files.
+include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/startup_stm32f1xx.mk
+# HAL-OSAL files (optional).
 include $(CHIBIOS)/os/hal/hal.mk
 include $(CHIBIOS)/os/hal/ports/STM32/STM32F1xx/platform.mk
 include $(CHIBIOS)/os/hal/osal/rt/osal.mk
+# RTOS files (optional).
 include $(CHIBIOS)/os/rt/rt.mk
-include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32f1xx.mk
+include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk
+# Other files (optional).
 include $(CHIBIOS)/test/rt/test.mk
 
 # Define linker script file here
-LDSCRIPT = $(PORTLD)/STM32F103xD.ld
+LDSCRIPT= $(STARTUPLD)/STM32F103xD.ld
 
 # C sources that can be compiled in ARM or THUMB mode depending on the global
 # setting.
-CSRC = $(PORTSRC) \
+CSRC = $(STARTUPSRC) \
        $(KERNSRC) \
-       $(TESTSRC) \
-       $(HALSRC) \
+       $(PORTSRC) \
        $(OSALSRC) \
+       $(HALSRC) \
        $(PLATFORMSRC) \
        $(BOARDSRC) \
-       $(CHIBIOS)/os/various/chprintf.c \
+       $(TESTSRC) \
+       $(CHIBIOS)/os/hal/lib/streams/chprintf.c \
        $(CHIBIOS)/os/various/syscalls.c \
        main.c
-       
+
 CSRC += $(COMMON)/sdc_lwext4.c
 CSRC += $(COMMON)/test_lwext4.c
 CSRC += $(COMMON)/timings.c
@@ -140,11 +146,12 @@
 TCPPSRC =
 
 # List ASM source files here
-ASMSRC = $(PORTASM)
+ASMSRC = $(STARTUPASM) $(PORTASM) $(OSALASM)
 
-INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
-         $(HALINC) $(OSALINC) $(PLATFORMINC) $(BOARDINC) \
-         $(CHIBIOS)/os/various
+INCDIR = $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \
+         $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \
+         $(CHIBIOS)/os/various $(CHIBIOS)/os/hal/lib/streams
+
 
 #
 # Project, sources and paths
--- a/demos/chibios/apps/olimex_stm32_p107_sd/Makefile
+++ b/demos/chibios/apps/olimex_stm32_p107_sd/Makefile
@@ -88,29 +88,35 @@
 # Imported source files and paths
 include ../../boards/olimex_stm32_p107/board.mk
 
+# Startup files.
+include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/startup_stm32f1xx.mk
+# HAL-OSAL files (optional).
 include $(CHIBIOS)/os/hal/hal.mk
 include $(CHIBIOS)/os/hal/ports/STM32/STM32F1xx/platform.mk
 include $(CHIBIOS)/os/hal/osal/rt/osal.mk
+# RTOS files (optional).
 include $(CHIBIOS)/os/rt/rt.mk
-include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32f1xx.mk
+include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk
+# Other files (optional).
 include $(CHIBIOS)/test/rt/test.mk
 
 # Define linker script file here
-LDSCRIPT = $(PORTLD)/STM32F107xC.ld
+LDSCRIPT= $(STARTUPLD)/STM32F103xD.ld
 
 # C sources that can be compiled in ARM or THUMB mode depending on the global
 # setting.
-CSRC = $(PORTSRC) \
+CSRC = $(STARTUPSRC) \
        $(KERNSRC) \
-       $(TESTSRC) \
-       $(HALSRC) \
+       $(PORTSRC) \
        $(OSALSRC) \
+       $(HALSRC) \
        $(PLATFORMSRC) \
        $(BOARDSRC) \
-       $(CHIBIOS)/os/various/chprintf.c \
+       $(TESTSRC) \
+       $(CHIBIOS)/os/hal/lib/streams/chprintf.c \
        $(CHIBIOS)/os/various/syscalls.c \
        main.c
-       
+
 CSRC += $(COMMON)/spi_lwext4.c
 CSRC += $(COMMON)/test_lwext4.c
 CSRC += $(COMMON)/timings.c
@@ -140,11 +146,12 @@
 TCPPSRC =
 
 # List ASM source files here
-ASMSRC = $(PORTASM)
+ASMSRC = $(STARTUPASM) $(PORTASM) $(OSALASM)
 
-INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
-         $(HALINC) $(OSALINC) $(PLATFORMINC) $(BOARDINC) \
-         $(CHIBIOS)/os/various
+INCDIR = $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \
+         $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \
+         $(CHIBIOS)/os/various $(CHIBIOS)/os/hal/lib/streams
+
 
 #
 # Project, sources and paths
--- a/demos/chibios/apps/redbull_v1_sd/Makefile
+++ b/demos/chibios/apps/redbull_v1_sd/Makefile
@@ -88,29 +88,35 @@
 # Imported source files and paths
 include ../../boards/redbull_v1/board.mk
 
+# Startup files.
+include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/startup_stm32f1xx.mk
+# HAL-OSAL files (optional).
 include $(CHIBIOS)/os/hal/hal.mk
 include $(CHIBIOS)/os/hal/ports/STM32/STM32F1xx/platform.mk
 include $(CHIBIOS)/os/hal/osal/rt/osal.mk
+# RTOS files (optional).
 include $(CHIBIOS)/os/rt/rt.mk
-include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32f1xx.mk
+include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk
+# Other files (optional).
 include $(CHIBIOS)/test/rt/test.mk
 
 # Define linker script file here
-LDSCRIPT = $(PORTLD)/STM32F103xD.ld
+LDSCRIPT= $(STARTUPLD)/STM32F103xD.ld
 
 # C sources that can be compiled in ARM or THUMB mode depending on the global
 # setting.
-CSRC = $(PORTSRC) \
+CSRC = $(STARTUPSRC) \
        $(KERNSRC) \
-       $(TESTSRC) \
-       $(HALSRC) \
+       $(PORTSRC) \
        $(OSALSRC) \
+       $(HALSRC) \
        $(PLATFORMSRC) \
        $(BOARDSRC) \
-       $(CHIBIOS)/os/various/chprintf.c \
+       $(TESTSRC) \
+       $(CHIBIOS)/os/hal/lib/streams/chprintf.c \
        $(CHIBIOS)/os/various/syscalls.c \
        main.c
-       
+
 CSRC += $(COMMON)/sdc_lwext4.c
 CSRC += $(COMMON)/test_lwext4.c
 CSRC += $(COMMON)/timings.c
@@ -140,12 +146,11 @@
 TCPPSRC =
 
 # List ASM source files here
-ASMSRC = $(PORTASM)
+ASMSRC = $(STARTUPASM) $(PORTASM) $(OSALASM)
 
-INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \
-         $(HALINC) $(OSALINC) $(PLATFORMINC) $(BOARDINC) \
-         $(CHIBIOS)/os/various
-
+INCDIR = $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \
+         $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \
+         $(CHIBIOS)/os/various $(CHIBIOS)/os/hal/lib/streams
 #
 # Project, sources and paths
 ##############################################################################
@@ -194,7 +199,7 @@
 #
 
 # List all user C define here, like -D_DEBUG=1
-UDEFS = -DSTDOUT_SD=SD1
+UDEFS = -DSTDOUT_SD=SD1 
 
 # Define ASM defines here
 UADEFS =
--- a/demos/chibios/apps/redbull_v1_sd/main.c
+++ b/demos/chibios/apps/redbull_v1_sd/main.c
@@ -25,7 +25,6 @@
         palClearPad(GPIOF, 6);
         chThdSleepMilliseconds(500);
     }
-    return 0;
 }
 
 #define TEST_DELAY_MS    1000