aboutsummaryrefslogtreecommitdiffstats
path: root/testhal
diff options
context:
space:
mode:
authorDiego Ismirlian <dismirlian (at) google's mail.com>2017-08-07 17:56:00 -0300
committerDiego Ismirlian <dismirlian (at) google's mail.com>2017-08-07 17:56:00 -0300
commitd72557da5a5144819e493cd0f16480b1f67b2226 (patch)
tree458f4fd35f869e4964d747bf100da099203a42fd /testhal
parent84f28dd0b1916890081d5b205835741a9ae2a8b6 (diff)
parent4092650b1bc013a21c0eaf27f62c84dbf2aece42 (diff)
downloadChibiOS-Contrib-d72557da5a5144819e493cd0f16480b1f67b2226.tar.gz
ChibiOS-Contrib-d72557da5a5144819e493cd0f16480b1f67b2226.tar.bz2
ChibiOS-Contrib-d72557da5a5144819e493cd0f16480b1f67b2226.zip
Merge branch 'master' of https://github.com/dismirlian/ChibiOS-Contrib into usbh_devel
Diffstat (limited to 'testhal')
-rw-r--r--testhal/STM32/STM32F4xx/USB_HOST/Makefile22
-rw-r--r--testhal/STM32/STM32F4xx/USB_HOST/halconf.h2
-rw-r--r--testhal/STM32/STM32F4xx/USB_HOST/main.c5
3 files changed, 15 insertions, 14 deletions
diff --git a/testhal/STM32/STM32F4xx/USB_HOST/Makefile b/testhal/STM32/STM32F4xx/USB_HOST/Makefile
index c0cfc80..33d032a 100644
--- a/testhal/STM32/STM32F4xx/USB_HOST/Makefile
+++ b/testhal/STM32/STM32F4xx/USB_HOST/Makefile
@@ -5,7 +5,7 @@
# Compiler options here.
ifeq ($(USE_OPT),)
- USE_OPT = -Og -ggdb3 -fomit-frame-pointer -falign-functions=16
+ USE_OPT = -Os -ggdb -fomit-frame-pointer -falign-functions=16
endif
# C specific options here (added to USE_OPT).
@@ -30,7 +30,7 @@ endif
# Enable this if you want link time optimizations (LTO)
ifeq ($(USE_LTO),)
- USE_LTO = no
+ USE_LTO = yes
endif
# If enabled, this option allows to compile the application in THUMB mode.
@@ -89,7 +89,7 @@ PROJECT = ch
CHIBIOS = ../../../../../ChibiOS-RT
CHIBIOS_CONTRIB = $(CHIBIOS)/../ChibiOS-Contrib
# Startup files.
-include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/startup_stm32f4xx.mk
+include $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f4xx.mk
# HAL-OSAL files (optional).
include $(CHIBIOS_CONTRIB)/os/hal/hal.mk
include $(CHIBIOS_CONTRIB)/os/hal/ports/STM32/STM32F4xx/platform.mk
@@ -97,15 +97,12 @@ include $(CHIBIOS)/os/hal/boards/ST_STM32F4_DISCOVERY/board.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_v7m.mk
+include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk
# Other files (optional).
include $(CHIBIOS)/test/rt/test.mk
-include $(CHIBIOS_CONTRIB)/os/various/fatfs_bindings/fatfs.mk
-
-STREAMSSRC = $(CHIBIOS)/os/hal/lib/streams/chprintf.c $(CHIBIOS)/os/hal/lib/streams/memstreams.c
-STREAMSINC = $(CHIBIOS)/os/hal/lib/streams/
-SHELLSRC = $(CHIBIOS)/os/various/shell.c
-SHELLINC = $(CHIBIOS)/os/various/
+include $(CHIBIOS)/os/hal/lib/streams/streams.mk
+include $(CHIBIOS)/os/various/shell/shell.mk
+include $(CHIBIOS)/os/various/fatfs_bindings/fatfs.mk
# Define linker script file here
LDSCRIPT= $(STARTUPLD)/STM32F407xG.ld
@@ -150,7 +147,8 @@ TCSRC =
TCPPSRC =
# List ASM source files here
-ASMSRC = $(STARTUPASM) $(PORTASM) $(OSALASM)
+ASMSRC =
+ASMXSRC = $(STARTUPASM) $(PORTASM) $(OSALASM)
INCDIR = $(CHIBIOS)/os/license \
$(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \
@@ -224,5 +222,5 @@ ULIBS =
# End of user defines
##############################################################################
-RULESPATH = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC
+RULESPATH = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC
include $(RULESPATH)/rules.mk
diff --git a/testhal/STM32/STM32F4xx/USB_HOST/halconf.h b/testhal/STM32/STM32F4xx/USB_HOST/halconf.h
index 9ddbb1b..1511a42 100644
--- a/testhal/STM32/STM32F4xx/USB_HOST/halconf.h
+++ b/testhal/STM32/STM32F4xx/USB_HOST/halconf.h
@@ -125,7 +125,7 @@
* @brief Enables the SDC subsystem.
*/
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
-#define HAL_USE_SDC FALSE
+#define HAL_USE_SDC TRUE
#endif
/**
diff --git a/testhal/STM32/STM32F4xx/USB_HOST/main.c b/testhal/STM32/STM32F4xx/USB_HOST/main.c
index 44210a3..595e454 100644
--- a/testhal/STM32/STM32F4xx/USB_HOST/main.c
+++ b/testhal/STM32/STM32F4xx/USB_HOST/main.c
@@ -126,7 +126,10 @@ start:
if (usbhftdipGetState(ftdipp) != USBHFTDIP_STATE_READY)
goto start;
if (!shelltp) {
- shelltp = shellCreate(&shell_cfg1, SHELL_WA_SIZE, NORMALPRIO);
+ shelltp = chThdCreateFromHeap(NULL, SHELL_WA_SIZE,
+ "shell", NORMALPRIO,
+ shellThread, (void *)&shell_cfg1);
+
} else if (chThdTerminatedX(shelltp)) {
chThdRelease(shelltp);
if (usbhftdipGetState(ftdipp) != USBHFTDIP_STATE_READY)