mirror of
https://gitee.com/muyuchl/nrf51_2in13_epd.git
synced 2025-12-15 02:08:12 +08:00
copy project from century 2in6 esl project
This commit is contained in:
70
external/micro-ecc/nrf52_armgcc/armgcc/Makefile
vendored
Normal file
70
external/micro-ecc/nrf52_armgcc/armgcc/Makefile
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
PROJECT_NAME := ext_micro_ecc_nrf52_library_armgcc
|
||||
TARGETS := micro_ecc_lib
|
||||
OUTPUT_DIRECTORY := _build
|
||||
|
||||
SDK_ROOT := ../../../..
|
||||
PROJ_DIR := ../..
|
||||
|
||||
|
||||
# Source files common to all targets
|
||||
SRC_FILES += \
|
||||
$(PROJ_DIR)/micro-ecc/uECC.c \
|
||||
|
||||
# Include folders common to all targets
|
||||
INC_FOLDERS += \
|
||||
|
||||
# Libraries common to all targets
|
||||
LIB_FILES += \
|
||||
|
||||
# C flags common to all targets
|
||||
CFLAGS += -DuECC_ENABLE_VLI_API
|
||||
CFLAGS += -DuECC_VLI_NATIVE_LITTLE_ENDIAN=1
|
||||
CFLAGS += -DuECC_SQUARE_FUNC=1
|
||||
CFLAGS += -DuECC_SUPPORTS_secp256r1=1
|
||||
CFLAGS += -DuECC_SUPPORT_COMPRESSED_POINT=0
|
||||
CFLAGS += -DuECC_OPTIMIZATION_LEVEL=3
|
||||
CFLAGS += -mcpu=cortex-m4
|
||||
CFLAGS += -mthumb -mabi=aapcs
|
||||
CFLAGS += -Wall -Werror -Os -g3
|
||||
CFLAGS += -mfloat-abi=hard -mfpu=fpv4-sp-d16
|
||||
# keep every function in separate section, this allows linker to discard unused ones
|
||||
CFLAGS += -ffunction-sections -fdata-sections -fno-strict-aliasing
|
||||
CFLAGS += -fno-builtin --short-enums
|
||||
|
||||
# C++ flags common to all targets
|
||||
CXXFLAGS += \
|
||||
|
||||
# Assembler flags common to all targets
|
||||
ASMFLAGS += -x assembler-with-cpp
|
||||
ASMFLAGS += -DuECC_ENABLE_VLI_API
|
||||
ASMFLAGS += -DuECC_VLI_NATIVE_LITTLE_ENDIAN=1
|
||||
ASMFLAGS += -DuECC_SQUARE_FUNC=1
|
||||
ASMFLAGS += -DuECC_SUPPORTS_secp256r1=1
|
||||
ASMFLAGS += -DuECC_SUPPORT_COMPRESSED_POINT=0
|
||||
ASMFLAGS += -DuECC_OPTIMIZATION_LEVEL=3
|
||||
|
||||
|
||||
|
||||
.PHONY: $(TARGETS) default all clean help flash
|
||||
|
||||
# Default target - first one defined
|
||||
default: micro_ecc_lib
|
||||
|
||||
# Print all targets that can be built
|
||||
help:
|
||||
@echo following targets are available:
|
||||
@echo micro_ecc_lib
|
||||
|
||||
TEMPLATE_PATH := $(SDK_ROOT)/components/toolchain/gcc
|
||||
|
||||
include $(TEMPLATE_PATH)/Makefile.common
|
||||
|
||||
$(call define_library, $(TARGETS), $(PROJ_DIR)/nrf52_armgcc/armgcc/micro_ecc_lib_nrf52.a)
|
||||
|
||||
define create_library
|
||||
@echo Creating library: $($@)
|
||||
$(NO_ECHO)$(AR) $($@) $^
|
||||
@echo Done
|
||||
endef
|
||||
micro_ecc_lib:
|
||||
$(create_library)
|
||||
28
external/micro-ecc/nrf52_armgcc/armgcc/ext_micro_ecc_gcc_nRF5x.ld
vendored
Normal file
28
external/micro-ecc/nrf52_armgcc/armgcc/ext_micro_ecc_gcc_nRF5x.ld
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
/* Linker script to configure memory regions. */
|
||||
|
||||
SEARCH_DIR(.)
|
||||
GROUP(-lgcc -lc -lnosys)
|
||||
|
||||
MEMORY
|
||||
{
|
||||
FLASH (rx) : ORIGIN = 0x0, LENGTH = 0x0
|
||||
RAM (rwx) : ORIGIN = 0x0, LENGTH = 0x0
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
.fs_data :
|
||||
{
|
||||
PROVIDE(__start_fs_data = .);
|
||||
KEEP(*(.fs_data))
|
||||
PROVIDE(__stop_fs_data = .);
|
||||
} > RAM
|
||||
.pwr_mgmt_data :
|
||||
{
|
||||
PROVIDE(__start_pwr_mgmt_data = .);
|
||||
KEEP(*(.pwr_mgmt_data))
|
||||
PROVIDE(__stop_pwr_mgmt_data = .);
|
||||
} > RAM
|
||||
} INSERT AFTER .data;
|
||||
|
||||
INCLUDE "nrf5x_common.ld"
|
||||
Reference in New Issue
Block a user