Fixed bug 3513897.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4068 35acf78f-673a-0410-8e92-d51de3d6d3f4master
parent
1c852f67c7
commit
e5a10ba0c5
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
# Compiler options here.
|
# Compiler options here.
|
||||||
ifeq ($(USE_OPT),)
|
ifeq ($(USE_OPT),)
|
||||||
USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16 -mhard-float -mfpu=fpv4-sp-d16 -fsingle-precision-constant
|
USE_OPT = -O2 -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).
|
||||||
|
@ -41,6 +41,12 @@ endif
|
||||||
# Architecture or project specific options
|
# Architecture or project specific options
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# Enables the use of FPU on Cortex-M4.
|
||||||
|
# Enable this if you really want to use the STM FWLib.
|
||||||
|
ifeq ($(USE_FPU),)
|
||||||
|
USE_FPU = no
|
||||||
|
endif
|
||||||
|
|
||||||
# Enable this if you really want to use the STM FWLib.
|
# Enable this if you really want to use the STM FWLib.
|
||||||
ifeq ($(USE_FWLIB),)
|
ifeq ($(USE_FWLIB),)
|
||||||
USE_FWLIB = no
|
USE_FWLIB = no
|
||||||
|
@ -200,6 +206,13 @@ ULIBS =
|
||||||
# End of user defines
|
# End of user defines
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
|
ifeq ($(USE_FPU),yes)
|
||||||
|
USE_OPT += -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -fsingle-precision-constant
|
||||||
|
DDEFS += -DCORTEX_USE_FPU=TRUE
|
||||||
|
else
|
||||||
|
DDEFS += -DCORTEX_USE_FPU=FALSE
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(USE_FWLIB),yes)
|
ifeq ($(USE_FWLIB),yes)
|
||||||
include $(CHIBIOS)/ext/stm32lib/stm32lib.mk
|
include $(CHIBIOS)/ext/stm32lib/stm32lib.mk
|
||||||
CSRC += $(STM32SRC)
|
CSRC += $(STM32SRC)
|
||||||
|
|
|
@ -530,8 +530,6 @@
|
||||||
/* Port-specific settings (override port settings defaulted in chcore.h). */
|
/* Port-specific settings (override port settings defaulted in chcore.h). */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
#define CORTEX_USE_FPU FALSE
|
|
||||||
|
|
||||||
#endif /* _CHCONF_H_ */
|
#endif /* _CHCONF_H_ */
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
|
@ -5,8 +5,8 @@ Settings: SYSCLK=168, ACR=0x705 (5 wait states)
|
||||||
|
|
||||||
*** ChibiOS/RT test suite
|
*** ChibiOS/RT test suite
|
||||||
***
|
***
|
||||||
*** Kernel: 2.4.0
|
*** Kernel: 2.5.0
|
||||||
*** Compiled: Jan 15 2012 - 20:12:59
|
*** Compiled: Apr 1 2012 - 14:19:33
|
||||||
*** Compiler: GCC 4.6.2
|
*** Compiler: GCC 4.6.2
|
||||||
*** Architecture: ARMv7-ME
|
*** Architecture: ARMv7-ME
|
||||||
*** Core Variant: Cortex-M4F
|
*** Core Variant: Cortex-M4F
|
||||||
|
@ -100,55 +100,55 @@ Settings: SYSCLK=168, ACR=0x705 (5 wait states)
|
||||||
--- Result: SUCCESS
|
--- Result: SUCCESS
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
--- Test Case 11.1 (Benchmark, messages #1)
|
--- Test Case 11.1 (Benchmark, messages #1)
|
||||||
--- Score : 574777 msgs/S, 1149554 ctxswc/S
|
--- Score : 576749 msgs/S, 1153498 ctxswc/S
|
||||||
--- Result: SUCCESS
|
--- Result: SUCCESS
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
--- Test Case 11.2 (Benchmark, messages #2)
|
--- Test Case 11.2 (Benchmark, messages #2)
|
||||||
--- Score : 493631 msgs/S, 987262 ctxswc/S
|
--- Score : 493633 msgs/S, 987266 ctxswc/S
|
||||||
--- Result: SUCCESS
|
--- Result: SUCCESS
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
--- Test Case 11.3 (Benchmark, messages #3)
|
--- Test Case 11.3 (Benchmark, messages #3)
|
||||||
--- Score : 493627 msgs/S, 987254 ctxswc/S
|
--- Score : 493631 msgs/S, 987262 ctxswc/S
|
||||||
--- Result: SUCCESS
|
--- Result: SUCCESS
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
--- Test Case 11.4 (Benchmark, context switch)
|
--- Test Case 11.4 (Benchmark, context switch)
|
||||||
--- Score : 1655616 ctxswc/S
|
--- Score : 1672112 ctxswc/S
|
||||||
--- Result: SUCCESS
|
--- Result: SUCCESS
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
--- Test Case 11.5 (Benchmark, threads, full cycle)
|
--- Test Case 11.5 (Benchmark, threads, full cycle)
|
||||||
--- Score : 384066 threads/S
|
--- Score : 382319 threads/S
|
||||||
--- Result: SUCCESS
|
--- Result: SUCCESS
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
--- Test Case 11.6 (Benchmark, threads, create only)
|
--- Test Case 11.6 (Benchmark, threads, create only)
|
||||||
--- Score : 510142 threads/S
|
--- Score : 510144 threads/S
|
||||||
--- Result: SUCCESS
|
--- Result: SUCCESS
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
--- Test Case 11.7 (Benchmark, mass reschedule, 5 threads)
|
--- Test Case 11.7 (Benchmark, mass reschedule, 5 threads)
|
||||||
--- Score : 156416 reschedules/S, 938496 ctxswc/S
|
--- Score : 156526 reschedules/S, 939156 ctxswc/S
|
||||||
--- Result: SUCCESS
|
--- Result: SUCCESS
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
--- Test Case 11.8 (Benchmark, round robin context switching)
|
--- Test Case 11.8 (Benchmark, round robin context switching)
|
||||||
--- Score : 1070720 ctxswc/S
|
--- Score : 1063936 ctxswc/S
|
||||||
--- Result: SUCCESS
|
--- Result: SUCCESS
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
--- Test Case 11.9 (Benchmark, I/O Queues throughput)
|
--- Test Case 11.9 (Benchmark, I/O Queues throughput)
|
||||||
--- Score : 1804688 bytes/S
|
--- Score : 1804680 bytes/S
|
||||||
--- Result: SUCCESS
|
--- Result: SUCCESS
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
--- Test Case 11.10 (Benchmark, virtual timers set/reset)
|
--- Test Case 11.10 (Benchmark, virtual timers set/reset)
|
||||||
--- Score : 2124530 timers/S
|
--- Score : 2124518 timers/S
|
||||||
--- Result: SUCCESS
|
--- Result: SUCCESS
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
--- Test Case 11.11 (Benchmark, semaphores wait/signal)
|
--- Test Case 11.11 (Benchmark, semaphores wait/signal)
|
||||||
--- Score : 2685380 wait+signal/S
|
--- Score : 2685364 wait+signal/S
|
||||||
--- Result: SUCCESS
|
--- Result: SUCCESS
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
--- Test Case 11.12 (Benchmark, mutexes lock/unlock)
|
--- Test Case 11.12 (Benchmark, mutexes lock/unlock)
|
||||||
--- Score : 1885800 lock+unlock/S
|
--- Score : 1885792 lock+unlock/S
|
||||||
--- Result: SUCCESS
|
--- Result: SUCCESS
|
||||||
----------------------------------------------------------------------------
|
----------------------------------------------------------------------------
|
||||||
--- Test Case 11.13 (Benchmark, RAM footprint)
|
--- Test Case 11.13 (Benchmark, RAM footprint)
|
||||||
--- System: 648 bytes
|
--- System: 644 bytes
|
||||||
--- Thread: 72 bytes
|
--- Thread: 72 bytes
|
||||||
--- Timer : 20 bytes
|
--- Timer : 20 bytes
|
||||||
--- Semaph: 12 bytes
|
--- Semaph: 12 bytes
|
||||||
|
|
|
@ -6,7 +6,7 @@ Settings: SYSCLK=168, ACR=0x705 (5 wait states)
|
||||||
*** ChibiOS/RT test suite
|
*** ChibiOS/RT test suite
|
||||||
***
|
***
|
||||||
*** Kernel: 2.5.0
|
*** Kernel: 2.5.0
|
||||||
*** Compiled: Feb 8 2012 - 19:52:01
|
*** Compiled: Apr 1 2012 - 14:26:26
|
||||||
*** Compiler: GCC 4.6.2
|
*** Compiler: GCC 4.6.2
|
||||||
*** Architecture: ARMv7-ME
|
*** Architecture: ARMv7-ME
|
||||||
*** Core Variant: Cortex-M4
|
*** Core Variant: Cortex-M4
|
||||||
|
|
|
@ -114,28 +114,6 @@ void _port_init(void) {
|
||||||
SCB_VTOR = CORTEX_VTOR_INIT;
|
SCB_VTOR = CORTEX_VTOR_INIT;
|
||||||
SCB_AIRCR = AIRCR_VECTKEY | AIRCR_PRIGROUP(0);
|
SCB_AIRCR = AIRCR_VECTKEY | AIRCR_PRIGROUP(0);
|
||||||
|
|
||||||
#if CORTEX_USE_FPU
|
|
||||||
{
|
|
||||||
uint32_t reg;
|
|
||||||
|
|
||||||
/* Initializing the FPU context save in lazy mode.*/
|
|
||||||
SCB_FPCCR = FPCCR_ASPEN | FPCCR_LSPEN;
|
|
||||||
|
|
||||||
/* CP10 and CP11 set to full access.*/
|
|
||||||
SCB_CPACR |= 0x00F00000;
|
|
||||||
|
|
||||||
/* Enables FPU context save/restore on exception entry/exit (FPCA bit).*/
|
|
||||||
asm volatile ("mrs %0, CONTROL" : "=r" (reg) : : "memory");
|
|
||||||
reg |= 4;
|
|
||||||
asm volatile ("msr CONTROL, %0" : : "r" (reg) : "memory");
|
|
||||||
|
|
||||||
/* FPSCR and FPDSCR initially zero.*/
|
|
||||||
reg = 0;
|
|
||||||
asm volatile ("vmsr FPSCR, %0" : : "r" (reg) : "memory");
|
|
||||||
SCB_FPDSCR = reg;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Initialization of the system vectors used by the port.*/
|
/* Initialization of the system vectors used by the port.*/
|
||||||
nvicSetSystemHandlerPriority(HANDLER_SVCALL,
|
nvicSetSystemHandlerPriority(HANDLER_SVCALL,
|
||||||
CORTEX_PRIORITY_MASK(CORTEX_PRIORITY_SVCALL));
|
CORTEX_PRIORITY_MASK(CORTEX_PRIORITY_SVCALL));
|
||||||
|
|
|
@ -26,10 +26,7 @@
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdint.h>
|
#include "ch.h"
|
||||||
|
|
||||||
#define FALSE 0
|
|
||||||
#define TRUE (!FALSE)
|
|
||||||
|
|
||||||
typedef void (*funcp_t)(void);
|
typedef void (*funcp_t)(void);
|
||||||
typedef funcp_t * funcpp_t;
|
typedef funcp_t * funcpp_t;
|
||||||
|
@ -250,7 +247,7 @@ static void fill32(uint32_t *start, uint32_t *end, uint32_t filler) {
|
||||||
__attribute__((naked))
|
__attribute__((naked))
|
||||||
#endif
|
#endif
|
||||||
void ResetHandler(void) {
|
void ResetHandler(void) {
|
||||||
uint32_t psp, ctl;
|
uint32_t psp, reg;
|
||||||
|
|
||||||
/* Process Stack initialization, it is allocated starting from the
|
/* Process Stack initialization, it is allocated starting from the
|
||||||
symbol __process_stack_end__ and its lower limit is the symbol
|
symbol __process_stack_end__ and its lower limit is the symbol
|
||||||
|
@ -259,9 +256,25 @@ void ResetHandler(void) {
|
||||||
psp = SYMVAL(__process_stack_end__);
|
psp = SYMVAL(__process_stack_end__);
|
||||||
asm volatile ("msr PSP, %0" : : "r" (psp));
|
asm volatile ("msr PSP, %0" : : "r" (psp));
|
||||||
|
|
||||||
|
#if CORTEX_USE_FPU
|
||||||
|
/* Initializing the FPU context save in lazy mode.*/
|
||||||
|
SCB_FPCCR = FPCCR_ASPEN | FPCCR_LSPEN;
|
||||||
|
|
||||||
|
/* CP10 and CP11 set to full access.*/
|
||||||
|
SCB_CPACR |= 0x00F00000;
|
||||||
|
|
||||||
|
/* FPSCR and FPDSCR initially zero.*/
|
||||||
|
reg = 0;
|
||||||
|
asm volatile ("vmsr FPSCR, %0" : : "r" (reg) : "memory");
|
||||||
|
SCB_FPDSCR = reg;
|
||||||
|
|
||||||
|
/* CPU mode initialization, enforced FPCA bit.*/
|
||||||
|
reg = CRT0_CONTROL_INIT | 4;
|
||||||
|
#else
|
||||||
/* CPU mode initialization.*/
|
/* CPU mode initialization.*/
|
||||||
ctl = CRT0_CONTROL_INIT;
|
reg = CRT0_CONTROL_INIT;
|
||||||
asm volatile ("msr CONTROL, %0" : : "r" (ctl));
|
#endif
|
||||||
|
asm volatile ("msr CONTROL, %0" : : "r" (reg));
|
||||||
asm volatile ("isb");
|
asm volatile ("isb");
|
||||||
|
|
||||||
/* Early initialization hook invocation.*/
|
/* Early initialization hook invocation.*/
|
||||||
|
|
|
@ -79,6 +79,8 @@
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
|
|
||||||
*** 2.5.0 ***
|
*** 2.5.0 ***
|
||||||
|
- FIX: Fixed problem with FPU initialization in GCC Cortex-M4 port (bug
|
||||||
|
3513897)(backported to 2.4.1).
|
||||||
- FIX: Spelling fixes (bug 3510812)(backported to 2.4.1).
|
- FIX: Spelling fixes (bug 3510812)(backported to 2.4.1).
|
||||||
- FIX: Fixed STM32 ICUD8 not functional because wrong initialization (bug
|
- FIX: Fixed STM32 ICUD8 not functional because wrong initialization (bug
|
||||||
3508758)(backported to 2.4.1).
|
3508758)(backported to 2.4.1).
|
||||||
|
@ -102,6 +104,8 @@
|
||||||
3484947)(backported to 2.4.1).
|
3484947)(backported to 2.4.1).
|
||||||
- FIX: Fixed various minor documentation errors (bug 3484942)(backported
|
- FIX: Fixed various minor documentation errors (bug 3484942)(backported
|
||||||
to 2.4.1).
|
to 2.4.1).
|
||||||
|
- NEW: Added a switch to the STM32F4 Makefile files in order to enable or
|
||||||
|
disable the FPU support in a single place.
|
||||||
- NEW: Added float support (optional) to chprintf(), by Fabio Utzig.
|
- NEW: Added float support (optional) to chprintf(), by Fabio Utzig.
|
||||||
- NEW: Added overflow handling in the ICU driver (contributed by Xo).
|
- NEW: Added overflow handling in the ICU driver (contributed by Xo).
|
||||||
- NEW: Updated debug plugin 1.0.8 (backported to 2.4.0).
|
- NEW: Updated debug plugin 1.0.8 (backported to 2.4.0).
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
# Compiler options here.
|
# Compiler options here.
|
||||||
ifeq ($(USE_OPT),)
|
ifeq ($(USE_OPT),)
|
||||||
USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16 -mhard-float -mfpu=fpv4-sp-d16 -fsingle-precision-constant
|
USE_OPT = -O2 -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).
|
||||||
|
@ -41,6 +41,12 @@ endif
|
||||||
# Architecture or project specific options
|
# Architecture or project specific options
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# Enables the use of FPU on Cortex-M4.
|
||||||
|
# Enable this if you really want to use the STM FWLib.
|
||||||
|
ifeq ($(USE_FPU),)
|
||||||
|
USE_FPU = no
|
||||||
|
endif
|
||||||
|
|
||||||
# Enable this if you really want to use the STM FWLib.
|
# Enable this if you really want to use the STM FWLib.
|
||||||
ifeq ($(USE_FWLIB),)
|
ifeq ($(USE_FWLIB),)
|
||||||
USE_FWLIB = no
|
USE_FWLIB = no
|
||||||
|
@ -58,16 +64,17 @@ endif
|
||||||
PROJECT = ch
|
PROJECT = ch
|
||||||
|
|
||||||
# Imported source files and paths
|
# Imported source files and paths
|
||||||
CHIBIOS = ../../..
|
CHIBIOS = ../..
|
||||||
include $(CHIBIOS)/boards/ST_STM32F4_DISCOVERY/board.mk
|
include $(CHIBIOS)/boards/ST_STM32F4_DISCOVERY/board.mk
|
||||||
include $(CHIBIOS)/os/hal/platforms/STM32F4xx/platform.mk
|
include $(CHIBIOS)/os/hal/platforms/STM32F4xx/platform.mk
|
||||||
include $(CHIBIOS)/os/hal/hal.mk
|
include $(CHIBIOS)/os/hal/hal.mk
|
||||||
include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F4xx/port.mk
|
include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F4xx/port.mk
|
||||||
include $(CHIBIOS)/os/kernel/kernel.mk
|
include $(CHIBIOS)/os/kernel/kernel.mk
|
||||||
#include $(CHIBIOS)/test/test.mk
|
include $(CHIBIOS)/test/test.mk
|
||||||
|
|
||||||
# Define linker script file here
|
# Define linker script file here
|
||||||
LDSCRIPT= $(PORTLD)/STM32F407xG.ld
|
LDSCRIPT= $(PORTLD)/STM32F407xG.ld
|
||||||
|
#LDSCRIPT= $(PORTLD)/STM32F407xG_CCM.ld
|
||||||
|
|
||||||
# C sources that can be compiled in ARM or THUMB mode depending on the global
|
# C sources that can be compiled in ARM or THUMB mode depending on the global
|
||||||
# setting.
|
# setting.
|
||||||
|
@ -77,6 +84,8 @@ CSRC = $(PORTSRC) \
|
||||||
$(HALSRC) \
|
$(HALSRC) \
|
||||||
$(PLATFORMSRC) \
|
$(PLATFORMSRC) \
|
||||||
$(BOARDSRC) \
|
$(BOARDSRC) \
|
||||||
|
$(CHIBIOS)/os/various/lis302dl.c \
|
||||||
|
$(CHIBIOS)/os/various/chprintf.c \
|
||||||
main.c
|
main.c
|
||||||
|
|
||||||
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
|
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
|
||||||
|
@ -197,6 +206,13 @@ ULIBS =
|
||||||
# End of user defines
|
# End of user defines
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
|
ifeq ($(USE_FPU),yes)
|
||||||
|
USE_OPT += -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -fsingle-precision-constant
|
||||||
|
DDEFS += -DCORTEX_USE_FPU=TRUE
|
||||||
|
else
|
||||||
|
DDEFS += -DCORTEX_USE_FPU=FALSE
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(USE_FWLIB),yes)
|
ifeq ($(USE_FWLIB),yes)
|
||||||
include $(CHIBIOS)/ext/stm32lib/stm32lib.mk
|
include $(CHIBIOS)/ext/stm32lib/stm32lib.mk
|
||||||
CSRC += $(STM32SRC)
|
CSRC += $(STM32SRC)
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
# Compiler options here.
|
# Compiler options here.
|
||||||
ifeq ($(USE_OPT),)
|
ifeq ($(USE_OPT),)
|
||||||
USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16 -mhard-float -mfpu=fpv4-sp-d16 -fsingle-precision-constant
|
USE_OPT = -O2 -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).
|
||||||
|
@ -41,6 +41,12 @@ endif
|
||||||
# Architecture or project specific options
|
# Architecture or project specific options
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# Enables the use of FPU on Cortex-M4.
|
||||||
|
# Enable this if you really want to use the STM FWLib.
|
||||||
|
ifeq ($(USE_FPU),)
|
||||||
|
USE_FPU = no
|
||||||
|
endif
|
||||||
|
|
||||||
# Enable this if you really want to use the STM FWLib.
|
# Enable this if you really want to use the STM FWLib.
|
||||||
ifeq ($(USE_FWLIB),)
|
ifeq ($(USE_FWLIB),)
|
||||||
USE_FWLIB = no
|
USE_FWLIB = no
|
||||||
|
@ -58,16 +64,17 @@ endif
|
||||||
PROJECT = ch
|
PROJECT = ch
|
||||||
|
|
||||||
# Imported source files and paths
|
# Imported source files and paths
|
||||||
CHIBIOS = ../../..
|
CHIBIOS = ../..
|
||||||
include $(CHIBIOS)/boards/ST_STM32F4_DISCOVERY/board.mk
|
include $(CHIBIOS)/boards/ST_STM32F4_DISCOVERY/board.mk
|
||||||
include $(CHIBIOS)/os/hal/platforms/STM32F4xx/platform.mk
|
include $(CHIBIOS)/os/hal/platforms/STM32F4xx/platform.mk
|
||||||
include $(CHIBIOS)/os/hal/hal.mk
|
include $(CHIBIOS)/os/hal/hal.mk
|
||||||
include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F4xx/port.mk
|
include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F4xx/port.mk
|
||||||
include $(CHIBIOS)/os/kernel/kernel.mk
|
include $(CHIBIOS)/os/kernel/kernel.mk
|
||||||
#include $(CHIBIOS)/test/test.mk
|
include $(CHIBIOS)/test/test.mk
|
||||||
|
|
||||||
# Define linker script file here
|
# Define linker script file here
|
||||||
LDSCRIPT= $(PORTLD)/STM32F407xG.ld
|
LDSCRIPT= $(PORTLD)/STM32F407xG.ld
|
||||||
|
#LDSCRIPT= $(PORTLD)/STM32F407xG_CCM.ld
|
||||||
|
|
||||||
# C sources that can be compiled in ARM or THUMB mode depending on the global
|
# C sources that can be compiled in ARM or THUMB mode depending on the global
|
||||||
# setting.
|
# setting.
|
||||||
|
@ -77,8 +84,8 @@ CSRC = $(PORTSRC) \
|
||||||
$(HALSRC) \
|
$(HALSRC) \
|
||||||
$(PLATFORMSRC) \
|
$(PLATFORMSRC) \
|
||||||
$(BOARDSRC) \
|
$(BOARDSRC) \
|
||||||
$(CHIBIOS)/os/various/evtimer.c \
|
$(CHIBIOS)/os/various/lis302dl.c \
|
||||||
$(CHIBIOS)/os/various/syscalls.c \
|
$(CHIBIOS)/os/various/chprintf.c \
|
||||||
main.c
|
main.c
|
||||||
|
|
||||||
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
|
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
|
||||||
|
@ -199,6 +206,13 @@ ULIBS =
|
||||||
# End of user defines
|
# End of user defines
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
|
ifeq ($(USE_FPU),yes)
|
||||||
|
USE_OPT += -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -fsingle-precision-constant
|
||||||
|
DDEFS += -DCORTEX_USE_FPU=TRUE
|
||||||
|
else
|
||||||
|
DDEFS += -DCORTEX_USE_FPU=FALSE
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(USE_FWLIB),yes)
|
ifeq ($(USE_FWLIB),yes)
|
||||||
include $(CHIBIOS)/ext/stm32lib/stm32lib.mk
|
include $(CHIBIOS)/ext/stm32lib/stm32lib.mk
|
||||||
CSRC += $(STM32SRC)
|
CSRC += $(STM32SRC)
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
# Compiler options here.
|
# Compiler options here.
|
||||||
ifeq ($(USE_OPT),)
|
ifeq ($(USE_OPT),)
|
||||||
USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16 -mhard-float -mfpu=fpv4-sp-d16 -fsingle-precision-constant
|
USE_OPT = -O2 -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).
|
||||||
|
@ -41,6 +41,12 @@ endif
|
||||||
# Architecture or project specific options
|
# Architecture or project specific options
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# Enables the use of FPU on Cortex-M4.
|
||||||
|
# Enable this if you really want to use the STM FWLib.
|
||||||
|
ifeq ($(USE_FPU),)
|
||||||
|
USE_FPU = no
|
||||||
|
endif
|
||||||
|
|
||||||
# Enable this if you really want to use the STM FWLib.
|
# Enable this if you really want to use the STM FWLib.
|
||||||
ifeq ($(USE_FWLIB),)
|
ifeq ($(USE_FWLIB),)
|
||||||
USE_FWLIB = no
|
USE_FWLIB = no
|
||||||
|
@ -58,16 +64,17 @@ endif
|
||||||
PROJECT = ch
|
PROJECT = ch
|
||||||
|
|
||||||
# Imported source files and paths
|
# Imported source files and paths
|
||||||
CHIBIOS = ../../..
|
CHIBIOS = ../..
|
||||||
include $(CHIBIOS)/boards/ST_STM32F4_DISCOVERY/board.mk
|
include $(CHIBIOS)/boards/ST_STM32F4_DISCOVERY/board.mk
|
||||||
include $(CHIBIOS)/os/hal/platforms/STM32F4xx/platform.mk
|
include $(CHIBIOS)/os/hal/platforms/STM32F4xx/platform.mk
|
||||||
include $(CHIBIOS)/os/hal/hal.mk
|
include $(CHIBIOS)/os/hal/hal.mk
|
||||||
include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F4xx/port.mk
|
include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F4xx/port.mk
|
||||||
include $(CHIBIOS)/os/kernel/kernel.mk
|
include $(CHIBIOS)/os/kernel/kernel.mk
|
||||||
#include $(CHIBIOS)/test/test.mk
|
include $(CHIBIOS)/test/test.mk
|
||||||
|
|
||||||
# Define linker script file here
|
# Define linker script file here
|
||||||
LDSCRIPT= $(PORTLD)/STM32F407xG.ld
|
LDSCRIPT= $(PORTLD)/STM32F407xG.ld
|
||||||
|
#LDSCRIPT= $(PORTLD)/STM32F407xG_CCM.ld
|
||||||
|
|
||||||
# C sources that can be compiled in ARM or THUMB mode depending on the global
|
# C sources that can be compiled in ARM or THUMB mode depending on the global
|
||||||
# setting.
|
# setting.
|
||||||
|
@ -77,6 +84,8 @@ CSRC = $(PORTSRC) \
|
||||||
$(HALSRC) \
|
$(HALSRC) \
|
||||||
$(PLATFORMSRC) \
|
$(PLATFORMSRC) \
|
||||||
$(BOARDSRC) \
|
$(BOARDSRC) \
|
||||||
|
$(CHIBIOS)/os/various/lis302dl.c \
|
||||||
|
$(CHIBIOS)/os/various/chprintf.c \
|
||||||
main.c
|
main.c
|
||||||
|
|
||||||
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
|
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
|
||||||
|
@ -197,6 +206,13 @@ ULIBS =
|
||||||
# End of user defines
|
# End of user defines
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
|
ifeq ($(USE_FPU),yes)
|
||||||
|
USE_OPT += -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -fsingle-precision-constant
|
||||||
|
DDEFS += -DCORTEX_USE_FPU=TRUE
|
||||||
|
else
|
||||||
|
DDEFS += -DCORTEX_USE_FPU=FALSE
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(USE_FWLIB),yes)
|
ifeq ($(USE_FWLIB),yes)
|
||||||
include $(CHIBIOS)/ext/stm32lib/stm32lib.mk
|
include $(CHIBIOS)/ext/stm32lib/stm32lib.mk
|
||||||
CSRC += $(STM32SRC)
|
CSRC += $(STM32SRC)
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
# Compiler options here.
|
# Compiler options here.
|
||||||
ifeq ($(USE_OPT),)
|
ifeq ($(USE_OPT),)
|
||||||
USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16 -mhard-float -mfpu=fpv4-sp-d16 -fsingle-precision-constant
|
USE_OPT = -O2 -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).
|
||||||
|
@ -41,6 +41,12 @@ endif
|
||||||
# Architecture or project specific options
|
# Architecture or project specific options
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# Enables the use of FPU on Cortex-M4.
|
||||||
|
# Enable this if you really want to use the STM FWLib.
|
||||||
|
ifeq ($(USE_FPU),)
|
||||||
|
USE_FPU = no
|
||||||
|
endif
|
||||||
|
|
||||||
# Enable this if you really want to use the STM FWLib.
|
# Enable this if you really want to use the STM FWLib.
|
||||||
ifeq ($(USE_FWLIB),)
|
ifeq ($(USE_FWLIB),)
|
||||||
USE_FWLIB = no
|
USE_FWLIB = no
|
||||||
|
@ -58,16 +64,17 @@ endif
|
||||||
PROJECT = ch
|
PROJECT = ch
|
||||||
|
|
||||||
# Imported source files and paths
|
# Imported source files and paths
|
||||||
CHIBIOS = ../../..
|
CHIBIOS = ../..
|
||||||
include $(CHIBIOS)/boards/ST_STM32F4_DISCOVERY/board.mk
|
include $(CHIBIOS)/boards/ST_STM32F4_DISCOVERY/board.mk
|
||||||
include $(CHIBIOS)/os/hal/platforms/STM32F4xx/platform.mk
|
include $(CHIBIOS)/os/hal/platforms/STM32F4xx/platform.mk
|
||||||
include $(CHIBIOS)/os/hal/hal.mk
|
include $(CHIBIOS)/os/hal/hal.mk
|
||||||
include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F4xx/port.mk
|
include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F4xx/port.mk
|
||||||
include $(CHIBIOS)/os/kernel/kernel.mk
|
include $(CHIBIOS)/os/kernel/kernel.mk
|
||||||
#include $(CHIBIOS)/test/test.mk
|
include $(CHIBIOS)/test/test.mk
|
||||||
|
|
||||||
# Define linker script file here
|
# Define linker script file here
|
||||||
LDSCRIPT= $(PORTLD)/STM32F407xG.ld
|
LDSCRIPT= $(PORTLD)/STM32F407xG.ld
|
||||||
|
#LDSCRIPT= $(PORTLD)/STM32F407xG_CCM.ld
|
||||||
|
|
||||||
# C sources that can be compiled in ARM or THUMB mode depending on the global
|
# C sources that can be compiled in ARM or THUMB mode depending on the global
|
||||||
# setting.
|
# setting.
|
||||||
|
@ -77,6 +84,8 @@ CSRC = $(PORTSRC) \
|
||||||
$(HALSRC) \
|
$(HALSRC) \
|
||||||
$(PLATFORMSRC) \
|
$(PLATFORMSRC) \
|
||||||
$(BOARDSRC) \
|
$(BOARDSRC) \
|
||||||
|
$(CHIBIOS)/os/various/lis302dl.c \
|
||||||
|
$(CHIBIOS)/os/various/chprintf.c \
|
||||||
main.c
|
main.c
|
||||||
|
|
||||||
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
|
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
|
||||||
|
@ -197,6 +206,13 @@ ULIBS =
|
||||||
# End of user defines
|
# End of user defines
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
|
ifeq ($(USE_FPU),yes)
|
||||||
|
USE_OPT += -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -fsingle-precision-constant
|
||||||
|
DDEFS += -DCORTEX_USE_FPU=TRUE
|
||||||
|
else
|
||||||
|
DDEFS += -DCORTEX_USE_FPU=FALSE
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(USE_FWLIB),yes)
|
ifeq ($(USE_FWLIB),yes)
|
||||||
include $(CHIBIOS)/ext/stm32lib/stm32lib.mk
|
include $(CHIBIOS)/ext/stm32lib/stm32lib.mk
|
||||||
CSRC += $(STM32SRC)
|
CSRC += $(STM32SRC)
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
# Compiler options here.
|
# Compiler options here.
|
||||||
ifeq ($(USE_OPT),)
|
ifeq ($(USE_OPT),)
|
||||||
USE_OPT = -O0 -ggdb -fomit-frame-pointer -falign-functions=16 -mhard-float -mfpu=fpv4-sp-d16 -fsingle-precision-constant
|
USE_OPT = -O2 -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).
|
||||||
|
@ -41,6 +41,12 @@ endif
|
||||||
# Architecture or project specific options
|
# Architecture or project specific options
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# Enables the use of FPU on Cortex-M4.
|
||||||
|
# Enable this if you really want to use the STM FWLib.
|
||||||
|
ifeq ($(USE_FPU),)
|
||||||
|
USE_FPU = no
|
||||||
|
endif
|
||||||
|
|
||||||
# Enable this if you really want to use the STM FWLib.
|
# Enable this if you really want to use the STM FWLib.
|
||||||
ifeq ($(USE_FWLIB),)
|
ifeq ($(USE_FWLIB),)
|
||||||
USE_FWLIB = no
|
USE_FWLIB = no
|
||||||
|
@ -58,16 +64,17 @@ endif
|
||||||
PROJECT = ch
|
PROJECT = ch
|
||||||
|
|
||||||
# Imported source files and paths
|
# Imported source files and paths
|
||||||
CHIBIOS = ../../..
|
CHIBIOS = ../..
|
||||||
include $(CHIBIOS)/boards/NONSTANDARD_STM32F4_BARTHESS1/board.mk
|
include $(CHIBIOS)/boards/ST_STM32F4_DISCOVERY/board.mk
|
||||||
include $(CHIBIOS)/os/hal/platforms/STM32F4xx/platform.mk
|
include $(CHIBIOS)/os/hal/platforms/STM32F4xx/platform.mk
|
||||||
include $(CHIBIOS)/os/hal/hal.mk
|
include $(CHIBIOS)/os/hal/hal.mk
|
||||||
include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F4xx/port.mk
|
include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F4xx/port.mk
|
||||||
include $(CHIBIOS)/os/kernel/kernel.mk
|
include $(CHIBIOS)/os/kernel/kernel.mk
|
||||||
#include $(CHIBIOS)/test/test.mk
|
include $(CHIBIOS)/test/test.mk
|
||||||
|
|
||||||
# Define linker script file here
|
# Define linker script file here
|
||||||
LDSCRIPT= $(PORTLD)/STM32F407xG.ld
|
LDSCRIPT= $(PORTLD)/STM32F407xG.ld
|
||||||
|
#LDSCRIPT= $(PORTLD)/STM32F407xG_CCM.ld
|
||||||
|
|
||||||
# C sources that can be compiled in ARM or THUMB mode depending on the global
|
# C sources that can be compiled in ARM or THUMB mode depending on the global
|
||||||
# setting.
|
# setting.
|
||||||
|
@ -77,6 +84,8 @@ CSRC = $(PORTSRC) \
|
||||||
$(HALSRC) \
|
$(HALSRC) \
|
||||||
$(PLATFORMSRC) \
|
$(PLATFORMSRC) \
|
||||||
$(BOARDSRC) \
|
$(BOARDSRC) \
|
||||||
|
$(CHIBIOS)/os/various/lis302dl.c \
|
||||||
|
$(CHIBIOS)/os/various/chprintf.c \
|
||||||
main.c
|
main.c
|
||||||
|
|
||||||
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
|
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
|
||||||
|
@ -197,6 +206,13 @@ ULIBS =
|
||||||
# End of user defines
|
# End of user defines
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
|
ifeq ($(USE_FPU),yes)
|
||||||
|
USE_OPT += -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -fsingle-precision-constant
|
||||||
|
DDEFS += -DCORTEX_USE_FPU=TRUE
|
||||||
|
else
|
||||||
|
DDEFS += -DCORTEX_USE_FPU=FALSE
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(USE_FWLIB),yes)
|
ifeq ($(USE_FWLIB),yes)
|
||||||
include $(CHIBIOS)/ext/stm32lib/stm32lib.mk
|
include $(CHIBIOS)/ext/stm32lib/stm32lib.mk
|
||||||
CSRC += $(STM32SRC)
|
CSRC += $(STM32SRC)
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
# Compiler options here.
|
# Compiler options here.
|
||||||
ifeq ($(USE_OPT),)
|
ifeq ($(USE_OPT),)
|
||||||
USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16 -mhard-float -mfpu=fpv4-sp-d16 -fsingle-precision-constant
|
USE_OPT = -O2 -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).
|
||||||
|
@ -41,6 +41,12 @@ endif
|
||||||
# Architecture or project specific options
|
# Architecture or project specific options
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# Enables the use of FPU on Cortex-M4.
|
||||||
|
# Enable this if you really want to use the STM FWLib.
|
||||||
|
ifeq ($(USE_FPU),)
|
||||||
|
USE_FPU = no
|
||||||
|
endif
|
||||||
|
|
||||||
# Enable this if you really want to use the STM FWLib.
|
# Enable this if you really want to use the STM FWLib.
|
||||||
ifeq ($(USE_FWLIB),)
|
ifeq ($(USE_FWLIB),)
|
||||||
USE_FWLIB = no
|
USE_FWLIB = no
|
||||||
|
@ -58,16 +64,17 @@ endif
|
||||||
PROJECT = ch
|
PROJECT = ch
|
||||||
|
|
||||||
# Imported source files and paths
|
# Imported source files and paths
|
||||||
CHIBIOS = ../../..
|
CHIBIOS = ../..
|
||||||
include $(CHIBIOS)/boards/ST_STM32F4_DISCOVERY/board.mk
|
include $(CHIBIOS)/boards/ST_STM32F4_DISCOVERY/board.mk
|
||||||
include $(CHIBIOS)/os/hal/platforms/STM32F4xx/platform.mk
|
include $(CHIBIOS)/os/hal/platforms/STM32F4xx/platform.mk
|
||||||
include $(CHIBIOS)/os/hal/hal.mk
|
include $(CHIBIOS)/os/hal/hal.mk
|
||||||
include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F4xx/port.mk
|
include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F4xx/port.mk
|
||||||
include $(CHIBIOS)/os/kernel/kernel.mk
|
include $(CHIBIOS)/os/kernel/kernel.mk
|
||||||
#include $(CHIBIOS)/test/test.mk
|
include $(CHIBIOS)/test/test.mk
|
||||||
|
|
||||||
# Define linker script file here
|
# Define linker script file here
|
||||||
LDSCRIPT= $(PORTLD)/STM32F407xG.ld
|
LDSCRIPT= $(PORTLD)/STM32F407xG.ld
|
||||||
|
#LDSCRIPT= $(PORTLD)/STM32F407xG_CCM.ld
|
||||||
|
|
||||||
# C sources that can be compiled in ARM or THUMB mode depending on the global
|
# C sources that can be compiled in ARM or THUMB mode depending on the global
|
||||||
# setting.
|
# setting.
|
||||||
|
@ -77,6 +84,8 @@ CSRC = $(PORTSRC) \
|
||||||
$(HALSRC) \
|
$(HALSRC) \
|
||||||
$(PLATFORMSRC) \
|
$(PLATFORMSRC) \
|
||||||
$(BOARDSRC) \
|
$(BOARDSRC) \
|
||||||
|
$(CHIBIOS)/os/various/lis302dl.c \
|
||||||
|
$(CHIBIOS)/os/various/chprintf.c \
|
||||||
main.c
|
main.c
|
||||||
|
|
||||||
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
|
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
|
||||||
|
@ -197,6 +206,13 @@ ULIBS =
|
||||||
# End of user defines
|
# End of user defines
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
|
ifeq ($(USE_FPU),yes)
|
||||||
|
USE_OPT += -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -fsingle-precision-constant
|
||||||
|
DDEFS += -DCORTEX_USE_FPU=TRUE
|
||||||
|
else
|
||||||
|
DDEFS += -DCORTEX_USE_FPU=FALSE
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(USE_FWLIB),yes)
|
ifeq ($(USE_FWLIB),yes)
|
||||||
include $(CHIBIOS)/ext/stm32lib/stm32lib.mk
|
include $(CHIBIOS)/ext/stm32lib/stm32lib.mk
|
||||||
CSRC += $(STM32SRC)
|
CSRC += $(STM32SRC)
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
# Compiler options here.
|
# Compiler options here.
|
||||||
ifeq ($(USE_OPT),)
|
ifeq ($(USE_OPT),)
|
||||||
USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16 -mhard-float -mfpu=fpv4-sp-d16 -fsingle-precision-constant
|
USE_OPT = -O2 -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).
|
||||||
|
@ -41,6 +41,12 @@ endif
|
||||||
# Architecture or project specific options
|
# Architecture or project specific options
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# Enables the use of FPU on Cortex-M4.
|
||||||
|
# Enable this if you really want to use the STM FWLib.
|
||||||
|
ifeq ($(USE_FPU),)
|
||||||
|
USE_FPU = yes
|
||||||
|
endif
|
||||||
|
|
||||||
# Enable this if you really want to use the STM FWLib.
|
# Enable this if you really want to use the STM FWLib.
|
||||||
ifeq ($(USE_FWLIB),)
|
ifeq ($(USE_FWLIB),)
|
||||||
USE_FWLIB = no
|
USE_FWLIB = no
|
||||||
|
@ -58,16 +64,17 @@ endif
|
||||||
PROJECT = ch
|
PROJECT = ch
|
||||||
|
|
||||||
# Imported source files and paths
|
# Imported source files and paths
|
||||||
CHIBIOS = ../../..
|
CHIBIOS = ../..
|
||||||
include $(CHIBIOS)/boards/ST_STM32F4_DISCOVERY/board.mk
|
include $(CHIBIOS)/boards/ST_STM32F4_DISCOVERY/board.mk
|
||||||
include $(CHIBIOS)/os/hal/platforms/STM32F4xx/platform.mk
|
include $(CHIBIOS)/os/hal/platforms/STM32F4xx/platform.mk
|
||||||
include $(CHIBIOS)/os/hal/hal.mk
|
include $(CHIBIOS)/os/hal/hal.mk
|
||||||
include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F4xx/port.mk
|
include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F4xx/port.mk
|
||||||
include $(CHIBIOS)/os/kernel/kernel.mk
|
include $(CHIBIOS)/os/kernel/kernel.mk
|
||||||
#include $(CHIBIOS)/test/test.mk
|
include $(CHIBIOS)/test/test.mk
|
||||||
|
|
||||||
# Define linker script file here
|
# Define linker script file here
|
||||||
LDSCRIPT= $(PORTLD)/STM32F407xG.ld
|
LDSCRIPT= $(PORTLD)/STM32F407xG.ld
|
||||||
|
#LDSCRIPT= $(PORTLD)/STM32F407xG_CCM.ld
|
||||||
|
|
||||||
# C sources that can be compiled in ARM or THUMB mode depending on the global
|
# C sources that can be compiled in ARM or THUMB mode depending on the global
|
||||||
# setting.
|
# setting.
|
||||||
|
@ -77,7 +84,9 @@ CSRC = $(PORTSRC) \
|
||||||
$(HALSRC) \
|
$(HALSRC) \
|
||||||
$(PLATFORMSRC) \
|
$(PLATFORMSRC) \
|
||||||
$(BOARDSRC) \
|
$(BOARDSRC) \
|
||||||
extfunc.c main.c
|
$(CHIBIOS)/os/various/lis302dl.c \
|
||||||
|
$(CHIBIOS)/os/various/chprintf.c \
|
||||||
|
main.c
|
||||||
|
|
||||||
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
|
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
|
||||||
# setting.
|
# setting.
|
||||||
|
@ -197,6 +206,13 @@ ULIBS =
|
||||||
# End of user defines
|
# End of user defines
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
|
ifeq ($(USE_FPU),yes)
|
||||||
|
USE_OPT += -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -fsingle-precision-constant
|
||||||
|
DDEFS += -DCORTEX_USE_FPU=TRUE
|
||||||
|
else
|
||||||
|
DDEFS += -DCORTEX_USE_FPU=FALSE
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(USE_FWLIB),yes)
|
ifeq ($(USE_FWLIB),yes)
|
||||||
include $(CHIBIOS)/ext/stm32lib/stm32lib.mk
|
include $(CHIBIOS)/ext/stm32lib/stm32lib.mk
|
||||||
CSRC += $(STM32SRC)
|
CSRC += $(STM32SRC)
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
# Compiler options here.
|
# Compiler options here.
|
||||||
ifeq ($(USE_OPT),)
|
ifeq ($(USE_OPT),)
|
||||||
USE_OPT = -O0 -ggdb -fomit-frame-pointer -falign-functions=16 -mhard-float -mfpu=fpv4-sp-d16 -fsingle-precision-constant
|
USE_OPT = -O2 -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).
|
||||||
|
@ -41,6 +41,12 @@ endif
|
||||||
# Architecture or project specific options
|
# Architecture or project specific options
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# Enables the use of FPU on Cortex-M4.
|
||||||
|
# Enable this if you really want to use the STM FWLib.
|
||||||
|
ifeq ($(USE_FPU),)
|
||||||
|
USE_FPU = no
|
||||||
|
endif
|
||||||
|
|
||||||
# Enable this if you really want to use the STM FWLib.
|
# Enable this if you really want to use the STM FWLib.
|
||||||
ifeq ($(USE_FWLIB),)
|
ifeq ($(USE_FWLIB),)
|
||||||
USE_FWLIB = no
|
USE_FWLIB = no
|
||||||
|
@ -58,15 +64,17 @@ endif
|
||||||
PROJECT = ch
|
PROJECT = ch
|
||||||
|
|
||||||
# Imported source files and paths
|
# Imported source files and paths
|
||||||
CHIBIOS = ../../..
|
CHIBIOS = ../..
|
||||||
include $(CHIBIOS)/boards/NONSTANDARD_STM32F4_BARTHESS1/board.mk
|
include $(CHIBIOS)/boards/ST_STM32F4_DISCOVERY/board.mk
|
||||||
include $(CHIBIOS)/os/hal/platforms/STM32F4xx/platform.mk
|
include $(CHIBIOS)/os/hal/platforms/STM32F4xx/platform.mk
|
||||||
include $(CHIBIOS)/os/hal/hal.mk
|
include $(CHIBIOS)/os/hal/hal.mk
|
||||||
include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F4xx/port.mk
|
include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F4xx/port.mk
|
||||||
include $(CHIBIOS)/os/kernel/kernel.mk
|
include $(CHIBIOS)/os/kernel/kernel.mk
|
||||||
|
include $(CHIBIOS)/test/test.mk
|
||||||
|
|
||||||
# Define linker script file here
|
# Define linker script file here
|
||||||
LDSCRIPT= $(PORTLD)/STM32F407xG.ld
|
LDSCRIPT= $(PORTLD)/STM32F407xG.ld
|
||||||
|
#LDSCRIPT= $(PORTLD)/STM32F407xG_CCM.ld
|
||||||
|
|
||||||
# C sources that can be compiled in ARM or THUMB mode depending on the global
|
# C sources that can be compiled in ARM or THUMB mode depending on the global
|
||||||
# setting.
|
# setting.
|
||||||
|
@ -76,7 +84,9 @@ CSRC = $(PORTSRC) \
|
||||||
$(HALSRC) \
|
$(HALSRC) \
|
||||||
$(PLATFORMSRC) \
|
$(PLATFORMSRC) \
|
||||||
$(BOARDSRC) \
|
$(BOARDSRC) \
|
||||||
main.c
|
$(CHIBIOS)/os/various/lis302dl.c \
|
||||||
|
$(CHIBIOS)/os/various/chprintf.c \
|
||||||
|
main.c
|
||||||
|
|
||||||
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
|
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
|
||||||
# setting.
|
# setting.
|
||||||
|
@ -196,6 +206,13 @@ ULIBS =
|
||||||
# End of user defines
|
# End of user defines
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
|
ifeq ($(USE_FPU),yes)
|
||||||
|
USE_OPT += -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -fsingle-precision-constant
|
||||||
|
DDEFS += -DCORTEX_USE_FPU=TRUE
|
||||||
|
else
|
||||||
|
DDEFS += -DCORTEX_USE_FPU=FALSE
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(USE_FWLIB),yes)
|
ifeq ($(USE_FWLIB),yes)
|
||||||
include $(CHIBIOS)/ext/stm32lib/stm32lib.mk
|
include $(CHIBIOS)/ext/stm32lib/stm32lib.mk
|
||||||
CSRC += $(STM32SRC)
|
CSRC += $(STM32SRC)
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
# Compiler options here.
|
# Compiler options here.
|
||||||
ifeq ($(USE_OPT),)
|
ifeq ($(USE_OPT),)
|
||||||
USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16 -mhard-float -mfpu=fpv4-sp-d16 -fsingle-precision-constant
|
USE_OPT = -O2 -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).
|
||||||
|
@ -41,6 +41,12 @@ endif
|
||||||
# Architecture or project specific options
|
# Architecture or project specific options
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# Enables the use of FPU on Cortex-M4.
|
||||||
|
# Enable this if you really want to use the STM FWLib.
|
||||||
|
ifeq ($(USE_FPU),)
|
||||||
|
USE_FPU = no
|
||||||
|
endif
|
||||||
|
|
||||||
# Enable this if you really want to use the STM FWLib.
|
# Enable this if you really want to use the STM FWLib.
|
||||||
ifeq ($(USE_FWLIB),)
|
ifeq ($(USE_FWLIB),)
|
||||||
USE_FWLIB = no
|
USE_FWLIB = no
|
||||||
|
@ -58,16 +64,17 @@ endif
|
||||||
PROJECT = ch
|
PROJECT = ch
|
||||||
|
|
||||||
# Imported source files and paths
|
# Imported source files and paths
|
||||||
CHIBIOS = ../../..
|
CHIBIOS = ../..
|
||||||
include $(CHIBIOS)/boards/ST_STM32F4_DISCOVERY/board.mk
|
include $(CHIBIOS)/boards/ST_STM32F4_DISCOVERY/board.mk
|
||||||
include $(CHIBIOS)/os/hal/platforms/STM32F4xx/platform.mk
|
include $(CHIBIOS)/os/hal/platforms/STM32F4xx/platform.mk
|
||||||
include $(CHIBIOS)/os/hal/hal.mk
|
include $(CHIBIOS)/os/hal/hal.mk
|
||||||
include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F4xx/port.mk
|
include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F4xx/port.mk
|
||||||
include $(CHIBIOS)/os/kernel/kernel.mk
|
include $(CHIBIOS)/os/kernel/kernel.mk
|
||||||
#include $(CHIBIOS)/test/test.mk
|
include $(CHIBIOS)/test/test.mk
|
||||||
|
|
||||||
# Define linker script file here
|
# Define linker script file here
|
||||||
LDSCRIPT= $(PORTLD)/STM32F407xG.ld
|
LDSCRIPT= $(PORTLD)/STM32F407xG.ld
|
||||||
|
#LDSCRIPT= $(PORTLD)/STM32F407xG_CCM.ld
|
||||||
|
|
||||||
# C sources that can be compiled in ARM or THUMB mode depending on the global
|
# C sources that can be compiled in ARM or THUMB mode depending on the global
|
||||||
# setting.
|
# setting.
|
||||||
|
@ -77,6 +84,8 @@ CSRC = $(PORTSRC) \
|
||||||
$(HALSRC) \
|
$(HALSRC) \
|
||||||
$(PLATFORMSRC) \
|
$(PLATFORMSRC) \
|
||||||
$(BOARDSRC) \
|
$(BOARDSRC) \
|
||||||
|
$(CHIBIOS)/os/various/lis302dl.c \
|
||||||
|
$(CHIBIOS)/os/various/chprintf.c \
|
||||||
main.c
|
main.c
|
||||||
|
|
||||||
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
|
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
|
||||||
|
@ -197,6 +206,13 @@ ULIBS =
|
||||||
# End of user defines
|
# End of user defines
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
|
ifeq ($(USE_FPU),yes)
|
||||||
|
USE_OPT += -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -fsingle-precision-constant
|
||||||
|
DDEFS += -DCORTEX_USE_FPU=TRUE
|
||||||
|
else
|
||||||
|
DDEFS += -DCORTEX_USE_FPU=FALSE
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(USE_FWLIB),yes)
|
ifeq ($(USE_FWLIB),yes)
|
||||||
include $(CHIBIOS)/ext/stm32lib/stm32lib.mk
|
include $(CHIBIOS)/ext/stm32lib/stm32lib.mk
|
||||||
CSRC += $(STM32SRC)
|
CSRC += $(STM32SRC)
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
# Compiler options here.
|
# Compiler options here.
|
||||||
ifeq ($(USE_OPT),)
|
ifeq ($(USE_OPT),)
|
||||||
USE_OPT = -O0 -ggdb -fomit-frame-pointer -falign-functions=16
|
USE_OPT = -O2 -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).
|
||||||
|
@ -41,6 +41,12 @@ endif
|
||||||
# Architecture or project specific options
|
# Architecture or project specific options
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# Enables the use of FPU on Cortex-M4.
|
||||||
|
# Enable this if you really want to use the STM FWLib.
|
||||||
|
ifeq ($(USE_FPU),)
|
||||||
|
USE_FPU = no
|
||||||
|
endif
|
||||||
|
|
||||||
# Enable this if you really want to use the STM FWLib.
|
# Enable this if you really want to use the STM FWLib.
|
||||||
ifeq ($(USE_FWLIB),)
|
ifeq ($(USE_FWLIB),)
|
||||||
USE_FWLIB = no
|
USE_FWLIB = no
|
||||||
|
@ -57,17 +63,18 @@ endif
|
||||||
# Define project name here
|
# Define project name here
|
||||||
PROJECT = ch
|
PROJECT = ch
|
||||||
|
|
||||||
# Imported source files
|
# Imported source files and paths
|
||||||
CHIBIOS = ../../..
|
CHIBIOS = ../..
|
||||||
include $(CHIBIOS)/boards/NONSTANDARD_STM32F4_BARTHESS1/board.mk
|
include $(CHIBIOS)/boards/ST_STM32F4_DISCOVERY/board.mk
|
||||||
include $(CHIBIOS)/os/hal/platforms/STM32F4xx/platform.mk
|
include $(CHIBIOS)/os/hal/platforms/STM32F4xx/platform.mk
|
||||||
include $(CHIBIOS)/os/hal/hal.mk
|
include $(CHIBIOS)/os/hal/hal.mk
|
||||||
include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F4xx/port.mk
|
include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F4xx/port.mk
|
||||||
include $(CHIBIOS)/os/kernel/kernel.mk
|
include $(CHIBIOS)/os/kernel/kernel.mk
|
||||||
#include $(CHIBIOS)/test/test.mk
|
include $(CHIBIOS)/test/test.mk
|
||||||
|
|
||||||
# Define linker script file here
|
# Define linker script file here
|
||||||
LDSCRIPT= $(PORTLD)/STM32F407xG.ld
|
LDSCRIPT= $(PORTLD)/STM32F407xG.ld
|
||||||
|
#LDSCRIPT= $(PORTLD)/STM32F407xG_CCM.ld
|
||||||
|
|
||||||
# C sources that can be compiled in ARM or THUMB mode depending on the global
|
# C sources that can be compiled in ARM or THUMB mode depending on the global
|
||||||
# setting.
|
# setting.
|
||||||
|
@ -77,11 +84,9 @@ CSRC = $(PORTSRC) \
|
||||||
$(HALSRC) \
|
$(HALSRC) \
|
||||||
$(PLATFORMSRC) \
|
$(PLATFORMSRC) \
|
||||||
$(BOARDSRC) \
|
$(BOARDSRC) \
|
||||||
$(CHIBIOS)/os/various/evtimer.c \
|
$(CHIBIOS)/os/various/lis302dl.c \
|
||||||
$(CHIBIOS)/os/various/syscalls.c \
|
|
||||||
$(CHIBIOS)/os/various/shell.c \
|
|
||||||
$(CHIBIOS)/os/various/chprintf.c \
|
$(CHIBIOS)/os/various/chprintf.c \
|
||||||
main.c \
|
main.c
|
||||||
|
|
||||||
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
|
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
|
||||||
# setting.
|
# setting.
|
||||||
|
@ -131,8 +136,7 @@ CPPC = $(TRGT)g++
|
||||||
# Enable loading with g++ only if you need C++ runtime support.
|
# Enable loading with g++ only if you need C++ runtime support.
|
||||||
# NOTE: You can use C++ even without C++ support if you are careful. C++
|
# NOTE: You can use C++ even without C++ support if you are careful. C++
|
||||||
# runtime support makes code size explode.
|
# runtime support makes code size explode.
|
||||||
|
LD = $(TRGT)gcc
|
||||||
LD = $(TRGT)gcc
|
|
||||||
#LD = $(TRGT)g++
|
#LD = $(TRGT)g++
|
||||||
CP = $(TRGT)objcopy
|
CP = $(TRGT)objcopy
|
||||||
AS = $(TRGT)gcc -x assembler-with-cpp
|
AS = $(TRGT)gcc -x assembler-with-cpp
|
||||||
|
@ -141,13 +145,13 @@ HEX = $(CP) -O ihex
|
||||||
BIN = $(CP) -O binary
|
BIN = $(CP) -O binary
|
||||||
|
|
||||||
# ARM-specific options here
|
# ARM-specific options here
|
||||||
AOPT =
|
AOPT =
|
||||||
|
|
||||||
# THUMB-specific options here
|
# THUMB-specific options here
|
||||||
TOPT = -mthumb -DTHUMB
|
TOPT = -mthumb -DTHUMB
|
||||||
|
|
||||||
# Define C warning options here
|
# Define C warning options here
|
||||||
CWARN = -Wall -Wextra -Wstrict-prototypes
|
CWARN = -Wall -Wextra -Wstrict-prototypes
|
||||||
|
|
||||||
# Define C++ warning options here
|
# Define C++ warning options here
|
||||||
CPPWARN = -Wall -Wextra
|
CPPWARN = -Wall -Wextra
|
||||||
|
@ -193,7 +197,7 @@ UADEFS =
|
||||||
UINCDIR =
|
UINCDIR =
|
||||||
|
|
||||||
# List the user directory to look for the libraries here
|
# List the user directory to look for the libraries here
|
||||||
ULIBDIR =
|
ULIBDIR =
|
||||||
|
|
||||||
# List all user libraries here
|
# List all user libraries here
|
||||||
ULIBS =
|
ULIBS =
|
||||||
|
@ -202,6 +206,13 @@ ULIBS =
|
||||||
# End of user defines
|
# End of user defines
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
|
ifeq ($(USE_FPU),yes)
|
||||||
|
USE_OPT += -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -fsingle-precision-constant
|
||||||
|
DDEFS += -DCORTEX_USE_FPU=TRUE
|
||||||
|
else
|
||||||
|
DDEFS += -DCORTEX_USE_FPU=FALSE
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(USE_FWLIB),yes)
|
ifeq ($(USE_FWLIB),yes)
|
||||||
include $(CHIBIOS)/ext/stm32lib/stm32lib.mk
|
include $(CHIBIOS)/ext/stm32lib/stm32lib.mk
|
||||||
CSRC += $(STM32SRC)
|
CSRC += $(STM32SRC)
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
# Compiler options here.
|
# Compiler options here.
|
||||||
ifeq ($(USE_OPT),)
|
ifeq ($(USE_OPT),)
|
||||||
USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16 -mhard-float -mfpu=fpv4-sp-d16 -fsingle-precision-constant
|
USE_OPT = -O2 -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).
|
||||||
|
@ -41,6 +41,12 @@ endif
|
||||||
# Architecture or project specific options
|
# Architecture or project specific options
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# Enables the use of FPU on Cortex-M4.
|
||||||
|
# Enable this if you really want to use the STM FWLib.
|
||||||
|
ifeq ($(USE_FPU),)
|
||||||
|
USE_FPU = no
|
||||||
|
endif
|
||||||
|
|
||||||
# Enable this if you really want to use the STM FWLib.
|
# Enable this if you really want to use the STM FWLib.
|
||||||
ifeq ($(USE_FWLIB),)
|
ifeq ($(USE_FWLIB),)
|
||||||
USE_FWLIB = no
|
USE_FWLIB = no
|
||||||
|
@ -58,16 +64,17 @@ endif
|
||||||
PROJECT = ch
|
PROJECT = ch
|
||||||
|
|
||||||
# Imported source files and paths
|
# Imported source files and paths
|
||||||
CHIBIOS = ../../..
|
CHIBIOS = ../..
|
||||||
include $(CHIBIOS)/boards/ST_STM32F4_DISCOVERY/board.mk
|
include $(CHIBIOS)/boards/ST_STM32F4_DISCOVERY/board.mk
|
||||||
include $(CHIBIOS)/os/hal/platforms/STM32F4xx/platform.mk
|
include $(CHIBIOS)/os/hal/platforms/STM32F4xx/platform.mk
|
||||||
include $(CHIBIOS)/os/hal/hal.mk
|
include $(CHIBIOS)/os/hal/hal.mk
|
||||||
include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F4xx/port.mk
|
include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F4xx/port.mk
|
||||||
include $(CHIBIOS)/os/kernel/kernel.mk
|
include $(CHIBIOS)/os/kernel/kernel.mk
|
||||||
#include $(CHIBIOS)/test/test.mk
|
include $(CHIBIOS)/test/test.mk
|
||||||
|
|
||||||
# Define linker script file here
|
# Define linker script file here
|
||||||
LDSCRIPT= $(PORTLD)/STM32F407xG.ld
|
LDSCRIPT= $(PORTLD)/STM32F407xG.ld
|
||||||
|
#LDSCRIPT= $(PORTLD)/STM32F407xG_CCM.ld
|
||||||
|
|
||||||
# C sources that can be compiled in ARM or THUMB mode depending on the global
|
# C sources that can be compiled in ARM or THUMB mode depending on the global
|
||||||
# setting.
|
# setting.
|
||||||
|
@ -77,8 +84,8 @@ CSRC = $(PORTSRC) \
|
||||||
$(HALSRC) \
|
$(HALSRC) \
|
||||||
$(PLATFORMSRC) \
|
$(PLATFORMSRC) \
|
||||||
$(BOARDSRC) \
|
$(BOARDSRC) \
|
||||||
$(CHIBIOS)/os/various/evtimer.c \
|
$(CHIBIOS)/os/various/lis302dl.c \
|
||||||
$(CHIBIOS)/os/various/syscalls.c \
|
$(CHIBIOS)/os/various/chprintf.c \
|
||||||
main.c
|
main.c
|
||||||
|
|
||||||
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
|
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
|
||||||
|
@ -199,6 +206,13 @@ ULIBS =
|
||||||
# End of user defines
|
# End of user defines
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
|
ifeq ($(USE_FPU),yes)
|
||||||
|
USE_OPT += -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -fsingle-precision-constant
|
||||||
|
DDEFS += -DCORTEX_USE_FPU=TRUE
|
||||||
|
else
|
||||||
|
DDEFS += -DCORTEX_USE_FPU=FALSE
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(USE_FWLIB),yes)
|
ifeq ($(USE_FWLIB),yes)
|
||||||
include $(CHIBIOS)/ext/stm32lib/stm32lib.mk
|
include $(CHIBIOS)/ext/stm32lib/stm32lib.mk
|
||||||
CSRC += $(STM32SRC)
|
CSRC += $(STM32SRC)
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
# Compiler options here.
|
# Compiler options here.
|
||||||
ifeq ($(USE_OPT),)
|
ifeq ($(USE_OPT),)
|
||||||
USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16 -mhard-float -mfpu=fpv4-sp-d16 -fsingle-precision-constant
|
USE_OPT = -O2 -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).
|
||||||
|
@ -41,6 +41,12 @@ endif
|
||||||
# Architecture or project specific options
|
# Architecture or project specific options
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# Enables the use of FPU on Cortex-M4.
|
||||||
|
# Enable this if you really want to use the STM FWLib.
|
||||||
|
ifeq ($(USE_FPU),)
|
||||||
|
USE_FPU = no
|
||||||
|
endif
|
||||||
|
|
||||||
# Enable this if you really want to use the STM FWLib.
|
# Enable this if you really want to use the STM FWLib.
|
||||||
ifeq ($(USE_FWLIB),)
|
ifeq ($(USE_FWLIB),)
|
||||||
USE_FWLIB = no
|
USE_FWLIB = no
|
||||||
|
@ -58,16 +64,17 @@ endif
|
||||||
PROJECT = ch
|
PROJECT = ch
|
||||||
|
|
||||||
# Imported source files and paths
|
# Imported source files and paths
|
||||||
CHIBIOS = ../../..
|
CHIBIOS = ../..
|
||||||
include $(CHIBIOS)/boards/ST_STM32F4_DISCOVERY/board.mk
|
include $(CHIBIOS)/boards/ST_STM32F4_DISCOVERY/board.mk
|
||||||
include $(CHIBIOS)/os/hal/platforms/STM32F4xx/platform.mk
|
include $(CHIBIOS)/os/hal/platforms/STM32F4xx/platform.mk
|
||||||
include $(CHIBIOS)/os/hal/hal.mk
|
include $(CHIBIOS)/os/hal/hal.mk
|
||||||
include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F4xx/port.mk
|
include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F4xx/port.mk
|
||||||
include $(CHIBIOS)/os/kernel/kernel.mk
|
include $(CHIBIOS)/os/kernel/kernel.mk
|
||||||
#include $(CHIBIOS)/test/test.mk
|
include $(CHIBIOS)/test/test.mk
|
||||||
|
|
||||||
# Define linker script file here
|
# Define linker script file here
|
||||||
LDSCRIPT= $(PORTLD)/STM32F407xG.ld
|
LDSCRIPT= $(PORTLD)/STM32F407xG.ld
|
||||||
|
#LDSCRIPT= $(PORTLD)/STM32F407xG_CCM.ld
|
||||||
|
|
||||||
# C sources that can be compiled in ARM or THUMB mode depending on the global
|
# C sources that can be compiled in ARM or THUMB mode depending on the global
|
||||||
# setting.
|
# setting.
|
||||||
|
@ -77,6 +84,8 @@ CSRC = $(PORTSRC) \
|
||||||
$(HALSRC) \
|
$(HALSRC) \
|
||||||
$(PLATFORMSRC) \
|
$(PLATFORMSRC) \
|
||||||
$(BOARDSRC) \
|
$(BOARDSRC) \
|
||||||
|
$(CHIBIOS)/os/various/lis302dl.c \
|
||||||
|
$(CHIBIOS)/os/various/chprintf.c \
|
||||||
main.c
|
main.c
|
||||||
|
|
||||||
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
|
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
|
||||||
|
@ -197,6 +206,13 @@ ULIBS =
|
||||||
# End of user defines
|
# End of user defines
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
|
ifeq ($(USE_FPU),yes)
|
||||||
|
USE_OPT += -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -fsingle-precision-constant
|
||||||
|
DDEFS += -DCORTEX_USE_FPU=TRUE
|
||||||
|
else
|
||||||
|
DDEFS += -DCORTEX_USE_FPU=FALSE
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(USE_FWLIB),yes)
|
ifeq ($(USE_FWLIB),yes)
|
||||||
include $(CHIBIOS)/ext/stm32lib/stm32lib.mk
|
include $(CHIBIOS)/ext/stm32lib/stm32lib.mk
|
||||||
CSRC += $(STM32SRC)
|
CSRC += $(STM32SRC)
|
||||||
|
|
|
@ -41,6 +41,12 @@ endif
|
||||||
# Architecture or project specific options
|
# Architecture or project specific options
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# Enables the use of FPU on Cortex-M4.
|
||||||
|
# Enable this if you really want to use the STM FWLib.
|
||||||
|
ifeq ($(USE_FPU),)
|
||||||
|
USE_FPU = no
|
||||||
|
endif
|
||||||
|
|
||||||
# Enable this if you really want to use the STM FWLib.
|
# Enable this if you really want to use the STM FWLib.
|
||||||
ifeq ($(USE_FWLIB),)
|
ifeq ($(USE_FWLIB),)
|
||||||
USE_FWLIB = no
|
USE_FWLIB = no
|
||||||
|
@ -58,7 +64,7 @@ endif
|
||||||
PROJECT = ch
|
PROJECT = ch
|
||||||
|
|
||||||
# Imported source files and paths
|
# Imported source files and paths
|
||||||
CHIBIOS = ../../..
|
CHIBIOS = ../..
|
||||||
include $(CHIBIOS)/boards/ST_STM32F4_DISCOVERY/board.mk
|
include $(CHIBIOS)/boards/ST_STM32F4_DISCOVERY/board.mk
|
||||||
include $(CHIBIOS)/os/hal/platforms/STM32F4xx/platform.mk
|
include $(CHIBIOS)/os/hal/platforms/STM32F4xx/platform.mk
|
||||||
include $(CHIBIOS)/os/hal/hal.mk
|
include $(CHIBIOS)/os/hal/hal.mk
|
||||||
|
@ -68,6 +74,7 @@ include $(CHIBIOS)/test/test.mk
|
||||||
|
|
||||||
# Define linker script file here
|
# Define linker script file here
|
||||||
LDSCRIPT= $(PORTLD)/STM32F407xG.ld
|
LDSCRIPT= $(PORTLD)/STM32F407xG.ld
|
||||||
|
#LDSCRIPT= $(PORTLD)/STM32F407xG_CCM.ld
|
||||||
|
|
||||||
# C sources that can be compiled in ARM or THUMB mode depending on the global
|
# C sources that can be compiled in ARM or THUMB mode depending on the global
|
||||||
# setting.
|
# setting.
|
||||||
|
@ -77,7 +84,7 @@ CSRC = $(PORTSRC) \
|
||||||
$(HALSRC) \
|
$(HALSRC) \
|
||||||
$(PLATFORMSRC) \
|
$(PLATFORMSRC) \
|
||||||
$(BOARDSRC) \
|
$(BOARDSRC) \
|
||||||
$(CHIBIOS)/os/various/shell.c \
|
$(CHIBIOS)/os/various/lis302dl.c \
|
||||||
$(CHIBIOS)/os/various/chprintf.c \
|
$(CHIBIOS)/os/various/chprintf.c \
|
||||||
main.c
|
main.c
|
||||||
|
|
||||||
|
@ -158,7 +165,7 @@ CPPWARN = -Wall -Wextra
|
||||||
#
|
#
|
||||||
|
|
||||||
# List all default C defines here, like -D_DEBUG=1
|
# List all default C defines here, like -D_DEBUG=1
|
||||||
DDEFS = -DCORTEX_USE_FPU=0
|
DDEFS =
|
||||||
|
|
||||||
# List all default ASM defines here, like -D_DEBUG=1
|
# List all default ASM defines here, like -D_DEBUG=1
|
||||||
DADEFS =
|
DADEFS =
|
||||||
|
@ -199,6 +206,13 @@ ULIBS =
|
||||||
# End of user defines
|
# End of user defines
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
|
ifeq ($(USE_FPU),yes)
|
||||||
|
USE_OPT += -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -fsingle-precision-constant
|
||||||
|
DDEFS += -DCORTEX_USE_FPU=TRUE
|
||||||
|
else
|
||||||
|
DDEFS += -DCORTEX_USE_FPU=FALSE
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(USE_FWLIB),yes)
|
ifeq ($(USE_FWLIB),yes)
|
||||||
include $(CHIBIOS)/ext/stm32lib/stm32lib.mk
|
include $(CHIBIOS)/ext/stm32lib/stm32lib.mk
|
||||||
CSRC += $(STM32SRC)
|
CSRC += $(STM32SRC)
|
||||||
|
|
Loading…
Reference in New Issue