-
Notifications
You must be signed in to change notification settings - Fork 6
/
config.mk
62 lines (49 loc) · 2.29 KB
/
config.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
###############################################################################
# The following variables might need adjusting on your local system. Change
# them here or in private.mk. The latter file can be created if it does not
# exist.
###############################################################################
# The path to the bluenet repository
BLUENET_PATH=$(HOME)/workspace/bluenet
# Path to the gcc arm none eabi compiler (do not use another one).
GCC_PATH=$(BLUENET_PATH)/tools/gcc_arm_none_eabi/bin
# The file with the extracted log strings.
LOG_STRINGS_FILE=$(BLUENET_PATH)/build/default/extracted_logs.json
###############################################################################
# The variables following this section probably do not need to be changed.
###############################################################################
# Shared path in the bluenet repos
SHARED_PATH=$(BLUENET_PATH)/source/shared
# The different gcc tools
CC=$(GCC_PATH)/arm-none-eabi-g++
OBJCOPY=$(GCC_PATH)/arm-none-eabi-objcopy
OBJDUMP=$(GCC_PATH)/arm-none-eabi-objdump
NM=$(GCC_PATH)/arm-none-eabi-nm
SIZE=$(GCC_PATH)/arm-none-eabi-size
STRIP=$(GCC_PATH)/arm-none-eabi-strip
READELF=$(GCC_PATH)/arm-none-eabi-readelf
# The build directory
BUILD_PATH=build
# The target name
TARGET_NAME=hello
# The target source file
TARGET_SOURCE=examples/$(TARGET_NAME).ino
# The build target (including build directory)
TARGET=$(BUILD_PATH)/$(TARGET_NAME)
# Number of pages
MICROAPP_PAGES=4
# These flags are meant for C++
# The nano newlib library is removed as well. This reduces binary size even more. Only disadvantage is that memset, etc
# need to be implemented. To enable newlib nano again: `--specs=nano.specs -Wl,-lc_nano`
FLAGS=-std=c++17 -mthumb -ffunction-sections -fdata-sections -Wall -Werror \
-fno-strict-aliasing -fno-builtin -fshort-enums -Wno-error=format \
-fno-exceptions -fdelete-dead-exceptions -fno-unwind-tables -fno-non-call-exceptions \
-fno-threadsafe-statics \
-nostdlib \
-Wl,--gc-sections \
-Wl,-eReset_Handler \
-g \
-Wno-error=unused-function -Os -fomit-frame-pointer -Wl,-z,nocopyreloc \
--specs=nosys.specs -Wl,-lnosys \
-mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -u _printf_float
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #