Fixes for USB host example to compile on 4.0.x
This commit is contained in:
parent
46a0296ed6
commit
830f09e2b7
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
# Compiler options here.
|
# Compiler options here.
|
||||||
ifeq ($(USE_OPT),)
|
ifeq ($(USE_OPT),)
|
||||||
USE_OPT = -Og -ggdb3 -fomit-frame-pointer -falign-functions=16
|
USE_OPT = -Os -ggdb -fomit-frame-pointer -falign-functions=16
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# C specific options here (added to USE_OPT).
|
# C specific options here (added to USE_OPT).
|
||||||
|
@ -30,7 +30,7 @@ endif
|
||||||
|
|
||||||
# Enable this if you want link time optimizations (LTO)
|
# Enable this if you want link time optimizations (LTO)
|
||||||
ifeq ($(USE_LTO),)
|
ifeq ($(USE_LTO),)
|
||||||
USE_LTO = no
|
USE_LTO = yes
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# If enabled, this option allows to compile the application in THUMB mode.
|
# If enabled, this option allows to compile the application in THUMB mode.
|
||||||
|
@ -89,7 +89,7 @@ PROJECT = ch
|
||||||
CHIBIOS = ../../../../../ChibiOS-RT
|
CHIBIOS = ../../../../../ChibiOS-RT
|
||||||
CHIBIOS_CONTRIB = $(CHIBIOS)/../ChibiOS-Contrib
|
CHIBIOS_CONTRIB = $(CHIBIOS)/../ChibiOS-Contrib
|
||||||
# Startup files.
|
# 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).
|
# HAL-OSAL files (optional).
|
||||||
include $(CHIBIOS_CONTRIB)/os/hal/hal.mk
|
include $(CHIBIOS_CONTRIB)/os/hal/hal.mk
|
||||||
include $(CHIBIOS_CONTRIB)/os/hal/ports/STM32/STM32F4xx/platform.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
|
include $(CHIBIOS)/os/hal/osal/rt/osal.mk
|
||||||
# RTOS files (optional).
|
# RTOS files (optional).
|
||||||
include $(CHIBIOS)/os/rt/rt.mk
|
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).
|
# Other files (optional).
|
||||||
include $(CHIBIOS)/test/rt/test.mk
|
include $(CHIBIOS)/test/rt/test.mk
|
||||||
include $(CHIBIOS_CONTRIB)/os/various/fatfs_bindings/fatfs.mk
|
include $(CHIBIOS)/os/hal/lib/streams/streams.mk
|
||||||
|
include $(CHIBIOS)/os/various/shell/shell.mk
|
||||||
STREAMSSRC = $(CHIBIOS)/os/hal/lib/streams/chprintf.c $(CHIBIOS)/os/hal/lib/streams/memstreams.c
|
include $(CHIBIOS)/os/various/fatfs_bindings/fatfs.mk
|
||||||
STREAMSINC = $(CHIBIOS)/os/hal/lib/streams/
|
|
||||||
SHELLSRC = $(CHIBIOS)/os/various/shell.c
|
|
||||||
SHELLINC = $(CHIBIOS)/os/various/
|
|
||||||
|
|
||||||
# Define linker script file here
|
# Define linker script file here
|
||||||
LDSCRIPT= $(STARTUPLD)/STM32F407xG.ld
|
LDSCRIPT= $(STARTUPLD)/STM32F407xG.ld
|
||||||
|
@ -150,7 +147,8 @@ TCSRC =
|
||||||
TCPPSRC =
|
TCPPSRC =
|
||||||
|
|
||||||
# List ASM source files here
|
# List ASM source files here
|
||||||
ASMSRC = $(STARTUPASM) $(PORTASM) $(OSALASM)
|
ASMSRC =
|
||||||
|
ASMXSRC = $(STARTUPASM) $(PORTASM) $(OSALASM)
|
||||||
|
|
||||||
INCDIR = $(CHIBIOS)/os/license \
|
INCDIR = $(CHIBIOS)/os/license \
|
||||||
$(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \
|
$(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \
|
||||||
|
@ -224,5 +222,5 @@ ULIBS =
|
||||||
# End of user defines
|
# End of user defines
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
RULESPATH = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC
|
RULESPATH = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC
|
||||||
include $(RULESPATH)/rules.mk
|
include $(RULESPATH)/rules.mk
|
||||||
|
|
|
@ -125,7 +125,7 @@
|
||||||
* @brief Enables the SDC subsystem.
|
* @brief Enables the SDC subsystem.
|
||||||
*/
|
*/
|
||||||
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
|
#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__)
|
||||||
#define HAL_USE_SDC FALSE
|
#define HAL_USE_SDC TRUE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -124,7 +124,10 @@ start:
|
||||||
if (usbhftdipGetState(ftdipp) != USBHFTDIP_STATE_READY)
|
if (usbhftdipGetState(ftdipp) != USBHFTDIP_STATE_READY)
|
||||||
goto start;
|
goto start;
|
||||||
if (!shelltp) {
|
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)) {
|
} else if (chThdTerminatedX(shelltp)) {
|
||||||
chThdRelease(shelltp);
|
chThdRelease(shelltp);
|
||||||
if (usbhftdipGetState(ftdipp) != USBHFTDIP_STATE_READY)
|
if (usbhftdipGetState(ftdipp) != USBHFTDIP_STATE_READY)
|
||||||
|
|
Loading…
Reference in New Issue