Commit e5637bd0 authored by Mikaël BRIDAY's avatar Mikaël BRIDAY
Browse files

start FPU. update optimisation flags

parent 95d27008
# define CPU OPTIONS # define CPU OPTIONS
#set(CPU_OPTIONS -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DSTM32F303x8 -DARMCM4) set(CPU_OPTIONS -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DSTM32F303x8 -DARMCM4)
set(CPU_OPTIONS -mthumb -mcpu=cortex-m4 -mfloat-abi=soft -DSTM32F303x8 -DARMCM4) #set(CPU_OPTIONS -mthumb -mcpu=cortex-m4 -mfloat-abi=soft -DSTM32F303x8 -DARMCM4)
set(CMAKE_C_FLAGS_DEBUG "-O0 -g -Wall -fexceptions -Wno-deprecated -DDEBUG") set(CMAKE_C_FLAGS_DEBUG "-O0 -Wno-deprecated -Werror -DDEBUG")
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -Wall -fexceptions -Wno-deprecated -DDEBUG") set(CMAKE_CXX_FLAGS_DEBUG "-O0 -Wno-deprecated -Werror -DDEBUG")
set(CMAKE_C_FLAGS_RELEASE "-O3 -funroll-loops -fomit-frame-pointer -fno-strict-aliasing -pipe -ffast-math -fexceptions -flto") set(CMAKE_C_FLAGS_RELEASE "-O3") #remove the -Werror => pb with Adafruit lib.
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -funroll-loops -fomit-frame-pointer -fno-strict-aliasing -pipe -ffast-math -fexceptions -flto") set(CMAKE_CXX_FLAGS_RELEASE "-O3")
#compiler options #compiler options
add_compile_options( add_compile_options(
...@@ -22,7 +22,6 @@ add_compile_options( ...@@ -22,7 +22,6 @@ add_compile_options(
$<$<COMPILE_LANGUAGE:CXX>:-fno-threadsafe-statics> $<$<COMPILE_LANGUAGE:CXX>:-fno-threadsafe-statics>
-fstrict-volatile-bitfields -fstrict-volatile-bitfields
-ffunction-sections -ffunction-sections
-Werror
-Wall -Wall
-Wextra -Wextra
-Wcast-align -Wcast-align
...@@ -33,6 +32,8 @@ add_compile_options( ...@@ -33,6 +32,8 @@ add_compile_options(
-Wsuggest-final-types -Wsuggest-final-types
-Wsuggest-final-methods -Wsuggest-final-methods
#-pedantic #-pedantic
-fexceptions
-g
) )
include_directories( include_directories(
......
...@@ -35,6 +35,8 @@ ...@@ -35,6 +35,8 @@
// #error device not specified! // #error device not specified!
//#endif //#endif
#include <stdint.h> #include <stdint.h>
#include "stm32f3xx.h"
#include "core_cm4.h"
/*---------------------------------------------------------------------------- /*----------------------------------------------------------------------------
Linker generated Symbols Linker generated Symbols
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment