初始版本
This commit is contained in:
24
external/micro-ecc/build_all.bat
vendored
Normal file
24
external/micro-ecc/build_all.bat
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
@ECHO OFF
|
||||
|
||||
:: This script will use git (must be in %PATH%) and arm-none-eabi tools in combination with GNU Make
|
||||
:: to both fetch and compile all variants of micro-ecc for the nRF5 families
|
||||
|
||||
WHERE >nul 2>nul git
|
||||
IF %ERRORLEVEL% NEQ 0 (
|
||||
ECHO "git is not installed. Please install and append to PATH."
|
||||
)
|
||||
|
||||
IF NOT EXIST micro-ecc/uECC.c (
|
||||
ECHO "micro-ecc not found! Let's pull it from HEAD."
|
||||
git clone https://github.com/kmackay/micro-ecc.git
|
||||
)
|
||||
|
||||
make -C nrf51_armgcc/armgcc
|
||||
make -C nrf51_iar/armgcc
|
||||
make -C nrf51_keil/armgcc
|
||||
make -C nrf52hf_armgcc/armgcc
|
||||
make -C nrf52hf_iar/armgcc
|
||||
make -C nrf52hf_keil/armgcc
|
||||
make -C nrf52nf_armgcc/armgcc
|
||||
make -C nrf52nf_iar/armgcc
|
||||
make -C nrf52nf_keil/armgcc
|
||||
24
external/micro-ecc/build_all.sh
vendored
Normal file
24
external/micro-ecc/build_all.sh
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
# This script will use git (must be in $PATH) and arm-none-eabi tools in combination with GNU Make
|
||||
# to both fetch and compile all variants of micro-ecc for the nRF5 families
|
||||
|
||||
if ! [ -x "$(command -v git)" ]; then
|
||||
echo 'git is not installed. Please install and append to PATH.' >&2
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ ! -f micro-ecc/uECC.c ]; then
|
||||
echo "micro-ecc not found! Let's pull it from HEAD."
|
||||
git clone https://github.com/kmackay/micro-ecc.git
|
||||
fi
|
||||
|
||||
make -C nrf51_armgcc/armgcc &&
|
||||
make -C nrf51_iar/armgcc &&
|
||||
make -C nrf51_keil/armgcc &&
|
||||
make -C nrf52hf_armgcc/armgcc &&
|
||||
make -C nrf52hf_iar/armgcc &&
|
||||
make -C nrf52hf_keil/armgcc &&
|
||||
make -C nrf52nf_armgcc/armgcc &&
|
||||
make -C nrf52nf_iar/armgcc &&
|
||||
make -C nrf52nf_keil/armgcc
|
||||
21
external/micro-ecc/license.txt
vendored
Normal file
21
external/micro-ecc/license.txt
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
Copyright (c) 2014, Kenneth MacKay
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
93
external/micro-ecc/nrf51_armgcc/armgcc/Makefile
vendored
Normal file
93
external/micro-ecc/nrf51_armgcc/armgcc/Makefile
vendored
Normal file
@@ -0,0 +1,93 @@
|
||||
PROJECT_NAME := ext_micro_ecc_nrf51_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 += \
|
||||
$(SDK_ROOT)/components/toolchain/cmsis/include \
|
||||
$(PROJ_DIR)/micro-ecc \
|
||||
|
||||
# Libraries common to all targets
|
||||
LIB_FILES += \
|
||||
|
||||
# Optimization flags
|
||||
OPT = -Os -g3
|
||||
# Uncomment the line below to enable link time optimization
|
||||
#OPT += -flto
|
||||
|
||||
# C flags common to all targets
|
||||
CFLAGS += $(OPT)
|
||||
CFLAGS += -DuECC_ENABLE_VLI_API=0
|
||||
CFLAGS += -DuECC_OPTIMIZATION_LEVEL=3
|
||||
CFLAGS += -DuECC_SQUARE_FUNC=0
|
||||
CFLAGS += -DuECC_SUPPORT_COMPRESSED_POINT=0
|
||||
CFLAGS += -DuECC_VLI_NATIVE_LITTLE_ENDIAN=1
|
||||
CFLAGS += -mcpu=cortex-m0
|
||||
CFLAGS += -mthumb -mabi=aapcs
|
||||
CFLAGS += -Wall -Werror
|
||||
CFLAGS += -mfloat-abi=soft
|
||||
# keep every function in a separate section, this allows linker to discard unused ones
|
||||
CFLAGS += -ffunction-sections -fdata-sections -fno-strict-aliasing
|
||||
CFLAGS += -fno-builtin -fshort-enums -Wno-unused-function
|
||||
|
||||
# C++ flags common to all targets
|
||||
CXXFLAGS += $(OPT)
|
||||
# Assembler flags common to all targets
|
||||
ASMFLAGS += -g3
|
||||
ASMFLAGS += -mcpu=cortex-m0
|
||||
ASMFLAGS += -mthumb -mabi=aapcs
|
||||
ASMFLAGS += -mfloat-abi=soft
|
||||
ASMFLAGS += -DuECC_ENABLE_VLI_API=0
|
||||
ASMFLAGS += -DuECC_OPTIMIZATION_LEVEL=3
|
||||
ASMFLAGS += -DuECC_SQUARE_FUNC=0
|
||||
ASMFLAGS += -DuECC_SUPPORT_COMPRESSED_POINT=0
|
||||
ASMFLAGS += -DuECC_VLI_NATIVE_LITTLE_ENDIAN=1
|
||||
|
||||
|
||||
micro_ecc_lib: CFLAGS += -D__HEAP_SIZE=4096
|
||||
micro_ecc_lib: CFLAGS += -D__STACK_SIZE=4096
|
||||
micro_ecc_lib: ASMFLAGS += -D__HEAP_SIZE=4096
|
||||
micro_ecc_lib: ASMFLAGS += -D__STACK_SIZE=4096
|
||||
|
||||
# Add standard libraries at the very end of the linker input, after all objects
|
||||
# that may need symbols provided by these libraries.
|
||||
LIB_FILES += -lc -lnosys -lm
|
||||
|
||||
|
||||
.PHONY: default help
|
||||
|
||||
# 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)/nrf51_armgcc/armgcc/micro_ecc_lib_nrf51.a)
|
||||
|
||||
define create_library
|
||||
@echo Creating library: $($@)
|
||||
$(NO_ECHO)$(AR) $($@) $^
|
||||
@echo Done
|
||||
endef
|
||||
micro_ecc_lib:
|
||||
$(create_library)
|
||||
|
||||
SDK_CONFIG_FILE := ../config/sdk_config.h
|
||||
CMSIS_CONFIG_TOOL := $(SDK_ROOT)/external_tools/cmsisconfig/CMSIS_Configuration_Wizard.jar
|
||||
sdk_config:
|
||||
java -jar $(CMSIS_CONFIG_TOOL) $(SDK_CONFIG_FILE)
|
||||
34
external/micro-ecc/nrf51_armgcc/armgcc/ext_micro_ecc_gcc_nRF5x.ld
vendored
Normal file
34
external/micro-ecc/nrf51_armgcc/armgcc/ext_micro_ecc_gcc_nRF5x.ld
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
/* 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
|
||||
{
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
. = ALIGN(4);
|
||||
.mem_section_dummy_ram :
|
||||
{
|
||||
}
|
||||
|
||||
} INSERT AFTER .data;
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
.mem_section_dummy_rom :
|
||||
{
|
||||
}
|
||||
|
||||
} INSERT AFTER .text
|
||||
|
||||
|
||||
INCLUDE "nrf_common.ld"
|
||||
93
external/micro-ecc/nrf51_iar/armgcc/Makefile
vendored
Normal file
93
external/micro-ecc/nrf51_iar/armgcc/Makefile
vendored
Normal file
@@ -0,0 +1,93 @@
|
||||
PROJECT_NAME := ext_micro_ecc_nrf51_library_iar
|
||||
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 += \
|
||||
$(SDK_ROOT)/components/toolchain/cmsis/include \
|
||||
$(PROJ_DIR)/micro-ecc \
|
||||
|
||||
# Libraries common to all targets
|
||||
LIB_FILES += \
|
||||
|
||||
# Optimization flags
|
||||
OPT = -Os -gdwarf-3
|
||||
# Uncomment the line below to enable link time optimization
|
||||
#OPT += -flto
|
||||
|
||||
# C flags common to all targets
|
||||
CFLAGS += $(OPT)
|
||||
CFLAGS += -DuECC_ENABLE_VLI_API=0
|
||||
CFLAGS += -DuECC_OPTIMIZATION_LEVEL=3
|
||||
CFLAGS += -DuECC_SQUARE_FUNC=0
|
||||
CFLAGS += -DuECC_SUPPORT_COMPRESSED_POINT=0
|
||||
CFLAGS += -DuECC_VLI_NATIVE_LITTLE_ENDIAN=1
|
||||
CFLAGS += -mcpu=cortex-m0
|
||||
CFLAGS += -mthumb -mabi=aapcs
|
||||
CFLAGS += -Wall -Werror
|
||||
CFLAGS += -mfloat-abi=soft
|
||||
# keep every function in a separate section, this allows linker to discard unused ones
|
||||
CFLAGS += -ffunction-sections -fdata-sections -fno-strict-aliasing
|
||||
CFLAGS += -fno-builtin -fshort-enums -fshort-wchar -Wno-unused-function
|
||||
|
||||
# C++ flags common to all targets
|
||||
CXXFLAGS += $(OPT)
|
||||
# Assembler flags common to all targets
|
||||
ASMFLAGS += -gdwarf-3
|
||||
ASMFLAGS += -mcpu=cortex-m0
|
||||
ASMFLAGS += -mthumb -mabi=aapcs
|
||||
ASMFLAGS += -mfloat-abi=soft
|
||||
ASMFLAGS += -DuECC_ENABLE_VLI_API=0
|
||||
ASMFLAGS += -DuECC_OPTIMIZATION_LEVEL=3
|
||||
ASMFLAGS += -DuECC_SQUARE_FUNC=0
|
||||
ASMFLAGS += -DuECC_SUPPORT_COMPRESSED_POINT=0
|
||||
ASMFLAGS += -DuECC_VLI_NATIVE_LITTLE_ENDIAN=1
|
||||
|
||||
|
||||
micro_ecc_lib: CFLAGS += -D__HEAP_SIZE=4096
|
||||
micro_ecc_lib: CFLAGS += -D__STACK_SIZE=4096
|
||||
micro_ecc_lib: ASMFLAGS += -D__HEAP_SIZE=4096
|
||||
micro_ecc_lib: ASMFLAGS += -D__STACK_SIZE=4096
|
||||
|
||||
# Add standard libraries at the very end of the linker input, after all objects
|
||||
# that may need symbols provided by these libraries.
|
||||
LIB_FILES += -lc -lnosys -lm
|
||||
|
||||
|
||||
.PHONY: default help
|
||||
|
||||
# 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)/nrf51_iar/armgcc/micro_ecc_lib_nrf51.a)
|
||||
|
||||
define create_library
|
||||
@echo Creating library: $($@)
|
||||
$(NO_ECHO)$(AR) $($@) $^
|
||||
@echo Done
|
||||
endef
|
||||
micro_ecc_lib:
|
||||
$(create_library)
|
||||
|
||||
SDK_CONFIG_FILE := ../config/sdk_config.h
|
||||
CMSIS_CONFIG_TOOL := $(SDK_ROOT)/external_tools/cmsisconfig/CMSIS_Configuration_Wizard.jar
|
||||
sdk_config:
|
||||
java -jar $(CMSIS_CONFIG_TOOL) $(SDK_CONFIG_FILE)
|
||||
34
external/micro-ecc/nrf51_iar/armgcc/ext_micro_ecc_gcc_nRF5x.ld
vendored
Normal file
34
external/micro-ecc/nrf51_iar/armgcc/ext_micro_ecc_gcc_nRF5x.ld
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
/* 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
|
||||
{
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
. = ALIGN(4);
|
||||
.mem_section_dummy_ram :
|
||||
{
|
||||
}
|
||||
|
||||
} INSERT AFTER .data;
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
.mem_section_dummy_rom :
|
||||
{
|
||||
}
|
||||
|
||||
} INSERT AFTER .text
|
||||
|
||||
|
||||
INCLUDE "nrf_common.ld"
|
||||
93
external/micro-ecc/nrf51_keil/armgcc/Makefile
vendored
Normal file
93
external/micro-ecc/nrf51_keil/armgcc/Makefile
vendored
Normal file
@@ -0,0 +1,93 @@
|
||||
PROJECT_NAME := ext_micro_ecc_nrf51_library_keil
|
||||
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 += \
|
||||
$(SDK_ROOT)/components/toolchain/cmsis/include \
|
||||
$(PROJ_DIR)/micro-ecc \
|
||||
|
||||
# Libraries common to all targets
|
||||
LIB_FILES += \
|
||||
|
||||
# Optimization flags
|
||||
OPT = -Os -g2
|
||||
# Uncomment the line below to enable link time optimization
|
||||
#OPT += -flto
|
||||
|
||||
# C flags common to all targets
|
||||
CFLAGS += $(OPT)
|
||||
CFLAGS += -DuECC_ENABLE_VLI_API=0
|
||||
CFLAGS += -DuECC_OPTIMIZATION_LEVEL=3
|
||||
CFLAGS += -DuECC_SQUARE_FUNC=0
|
||||
CFLAGS += -DuECC_SUPPORT_COMPRESSED_POINT=0
|
||||
CFLAGS += -DuECC_VLI_NATIVE_LITTLE_ENDIAN=1
|
||||
CFLAGS += -mcpu=cortex-m0
|
||||
CFLAGS += -mthumb -mabi=aapcs
|
||||
CFLAGS += -Wall -Werror
|
||||
CFLAGS += -mfloat-abi=soft
|
||||
# keep every function in a separate section, this allows linker to discard unused ones
|
||||
CFLAGS += -ffunction-sections -fdata-sections -fno-strict-aliasing
|
||||
CFLAGS += -fno-builtin -fshort-enums -fshort-wchar -Wno-unused-function
|
||||
|
||||
# C++ flags common to all targets
|
||||
CXXFLAGS += $(OPT)
|
||||
# Assembler flags common to all targets
|
||||
ASMFLAGS += -g2
|
||||
ASMFLAGS += -mcpu=cortex-m0
|
||||
ASMFLAGS += -mthumb -mabi=aapcs
|
||||
ASMFLAGS += -mfloat-abi=soft
|
||||
ASMFLAGS += -DuECC_ENABLE_VLI_API=0
|
||||
ASMFLAGS += -DuECC_OPTIMIZATION_LEVEL=3
|
||||
ASMFLAGS += -DuECC_SQUARE_FUNC=0
|
||||
ASMFLAGS += -DuECC_SUPPORT_COMPRESSED_POINT=0
|
||||
ASMFLAGS += -DuECC_VLI_NATIVE_LITTLE_ENDIAN=1
|
||||
|
||||
|
||||
micro_ecc_lib: CFLAGS += -D__HEAP_SIZE=4096
|
||||
micro_ecc_lib: CFLAGS += -D__STACK_SIZE=4096
|
||||
micro_ecc_lib: ASMFLAGS += -D__HEAP_SIZE=4096
|
||||
micro_ecc_lib: ASMFLAGS += -D__STACK_SIZE=4096
|
||||
|
||||
# Add standard libraries at the very end of the linker input, after all objects
|
||||
# that may need symbols provided by these libraries.
|
||||
LIB_FILES += -lc -lnosys -lm
|
||||
|
||||
|
||||
.PHONY: default help
|
||||
|
||||
# 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)/nrf51_keil/armgcc/micro_ecc_lib_nrf51.lib)
|
||||
|
||||
define create_library
|
||||
@echo Creating library: $($@)
|
||||
$(NO_ECHO)$(AR) $($@) $^
|
||||
@echo Done
|
||||
endef
|
||||
micro_ecc_lib:
|
||||
$(create_library)
|
||||
|
||||
SDK_CONFIG_FILE := ../config/sdk_config.h
|
||||
CMSIS_CONFIG_TOOL := $(SDK_ROOT)/external_tools/cmsisconfig/CMSIS_Configuration_Wizard.jar
|
||||
sdk_config:
|
||||
java -jar $(CMSIS_CONFIG_TOOL) $(SDK_CONFIG_FILE)
|
||||
34
external/micro-ecc/nrf51_keil/armgcc/ext_micro_ecc_gcc_nRF5x.ld
vendored
Normal file
34
external/micro-ecc/nrf51_keil/armgcc/ext_micro_ecc_gcc_nRF5x.ld
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
/* 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
|
||||
{
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
. = ALIGN(4);
|
||||
.mem_section_dummy_ram :
|
||||
{
|
||||
}
|
||||
|
||||
} INSERT AFTER .data;
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
.mem_section_dummy_rom :
|
||||
{
|
||||
}
|
||||
|
||||
} INSERT AFTER .text
|
||||
|
||||
|
||||
INCLUDE "nrf_common.ld"
|
||||
95
external/micro-ecc/nrf52hf_armgcc/armgcc/Makefile
vendored
Normal file
95
external/micro-ecc/nrf52hf_armgcc/armgcc/Makefile
vendored
Normal file
@@ -0,0 +1,95 @@
|
||||
PROJECT_NAME := ext_micro_ecc_nrf52hf_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 += \
|
||||
$(SDK_ROOT)/components/toolchain/cmsis/include \
|
||||
$(PROJ_DIR)/micro-ecc \
|
||||
|
||||
# Libraries common to all targets
|
||||
LIB_FILES += \
|
||||
|
||||
# Optimization flags
|
||||
OPT = -Os -g3
|
||||
# Uncomment the line below to enable link time optimization
|
||||
#OPT += -flto
|
||||
|
||||
# C flags common to all targets
|
||||
CFLAGS += $(OPT)
|
||||
CFLAGS += -DFLOAT_ABI_HARD
|
||||
CFLAGS += -DuECC_ENABLE_VLI_API=0
|
||||
CFLAGS += -DuECC_OPTIMIZATION_LEVEL=3
|
||||
CFLAGS += -DuECC_SQUARE_FUNC=0
|
||||
CFLAGS += -DuECC_SUPPORT_COMPRESSED_POINT=0
|
||||
CFLAGS += -DuECC_VLI_NATIVE_LITTLE_ENDIAN=1
|
||||
CFLAGS += -mcpu=cortex-m4
|
||||
CFLAGS += -mthumb -mabi=aapcs
|
||||
CFLAGS += -Wall -Werror
|
||||
CFLAGS += -mfloat-abi=hard -mfpu=fpv4-sp-d16
|
||||
# keep every function in a separate section, this allows linker to discard unused ones
|
||||
CFLAGS += -ffunction-sections -fdata-sections -fno-strict-aliasing
|
||||
CFLAGS += -fno-builtin -fshort-enums -Wno-unused-function
|
||||
|
||||
# C++ flags common to all targets
|
||||
CXXFLAGS += $(OPT)
|
||||
# Assembler flags common to all targets
|
||||
ASMFLAGS += -g3
|
||||
ASMFLAGS += -mcpu=cortex-m4
|
||||
ASMFLAGS += -mthumb -mabi=aapcs
|
||||
ASMFLAGS += -mfloat-abi=hard -mfpu=fpv4-sp-d16
|
||||
ASMFLAGS += -DFLOAT_ABI_HARD
|
||||
ASMFLAGS += -DuECC_ENABLE_VLI_API=0
|
||||
ASMFLAGS += -DuECC_OPTIMIZATION_LEVEL=3
|
||||
ASMFLAGS += -DuECC_SQUARE_FUNC=0
|
||||
ASMFLAGS += -DuECC_SUPPORT_COMPRESSED_POINT=0
|
||||
ASMFLAGS += -DuECC_VLI_NATIVE_LITTLE_ENDIAN=1
|
||||
|
||||
|
||||
micro_ecc_lib: CFLAGS += -D__HEAP_SIZE=4096
|
||||
micro_ecc_lib: CFLAGS += -D__STACK_SIZE=4096
|
||||
micro_ecc_lib: ASMFLAGS += -D__HEAP_SIZE=4096
|
||||
micro_ecc_lib: ASMFLAGS += -D__STACK_SIZE=4096
|
||||
|
||||
# Add standard libraries at the very end of the linker input, after all objects
|
||||
# that may need symbols provided by these libraries.
|
||||
LIB_FILES += -lc -lnosys -lm
|
||||
|
||||
|
||||
.PHONY: default help
|
||||
|
||||
# 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)/nrf52hf_armgcc/armgcc/micro_ecc_lib_nrf52.a)
|
||||
|
||||
define create_library
|
||||
@echo Creating library: $($@)
|
||||
$(NO_ECHO)$(AR) $($@) $^
|
||||
@echo Done
|
||||
endef
|
||||
micro_ecc_lib:
|
||||
$(create_library)
|
||||
|
||||
SDK_CONFIG_FILE := ../config/sdk_config.h
|
||||
CMSIS_CONFIG_TOOL := $(SDK_ROOT)/external_tools/cmsisconfig/CMSIS_Configuration_Wizard.jar
|
||||
sdk_config:
|
||||
java -jar $(CMSIS_CONFIG_TOOL) $(SDK_CONFIG_FILE)
|
||||
34
external/micro-ecc/nrf52hf_armgcc/armgcc/ext_micro_ecc_gcc_nRF5x.ld
vendored
Normal file
34
external/micro-ecc/nrf52hf_armgcc/armgcc/ext_micro_ecc_gcc_nRF5x.ld
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
/* 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
|
||||
{
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
. = ALIGN(4);
|
||||
.mem_section_dummy_ram :
|
||||
{
|
||||
}
|
||||
|
||||
} INSERT AFTER .data;
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
.mem_section_dummy_rom :
|
||||
{
|
||||
}
|
||||
|
||||
} INSERT AFTER .text
|
||||
|
||||
|
||||
INCLUDE "nrf_common.ld"
|
||||
95
external/micro-ecc/nrf52hf_iar/armgcc/Makefile
vendored
Normal file
95
external/micro-ecc/nrf52hf_iar/armgcc/Makefile
vendored
Normal file
@@ -0,0 +1,95 @@
|
||||
PROJECT_NAME := ext_micro_ecc_nrf52hf_library_iar
|
||||
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 += \
|
||||
$(SDK_ROOT)/components/toolchain/cmsis/include \
|
||||
$(PROJ_DIR)/micro-ecc \
|
||||
|
||||
# Libraries common to all targets
|
||||
LIB_FILES += \
|
||||
|
||||
# Optimization flags
|
||||
OPT = -Os -gdwarf-3
|
||||
# Uncomment the line below to enable link time optimization
|
||||
#OPT += -flto
|
||||
|
||||
# C flags common to all targets
|
||||
CFLAGS += $(OPT)
|
||||
CFLAGS += -DFLOAT_ABI_HARD
|
||||
CFLAGS += -DuECC_ENABLE_VLI_API=0
|
||||
CFLAGS += -DuECC_OPTIMIZATION_LEVEL=3
|
||||
CFLAGS += -DuECC_SQUARE_FUNC=0
|
||||
CFLAGS += -DuECC_SUPPORT_COMPRESSED_POINT=0
|
||||
CFLAGS += -DuECC_VLI_NATIVE_LITTLE_ENDIAN=1
|
||||
CFLAGS += -mcpu=cortex-m4
|
||||
CFLAGS += -mthumb -mabi=aapcs
|
||||
CFLAGS += -Wall -Werror
|
||||
CFLAGS += -mfloat-abi=hard -mfpu=fpv4-sp-d16
|
||||
# keep every function in a separate section, this allows linker to discard unused ones
|
||||
CFLAGS += -ffunction-sections -fdata-sections -fno-strict-aliasing
|
||||
CFLAGS += -fno-builtin -fshort-enums -fshort-wchar -Wno-unused-function
|
||||
|
||||
# C++ flags common to all targets
|
||||
CXXFLAGS += $(OPT)
|
||||
# Assembler flags common to all targets
|
||||
ASMFLAGS += -gdwarf-3
|
||||
ASMFLAGS += -mcpu=cortex-m4
|
||||
ASMFLAGS += -mthumb -mabi=aapcs
|
||||
ASMFLAGS += -mfloat-abi=hard -mfpu=fpv4-sp-d16
|
||||
ASMFLAGS += -DFLOAT_ABI_HARD
|
||||
ASMFLAGS += -DuECC_ENABLE_VLI_API=0
|
||||
ASMFLAGS += -DuECC_OPTIMIZATION_LEVEL=3
|
||||
ASMFLAGS += -DuECC_SQUARE_FUNC=0
|
||||
ASMFLAGS += -DuECC_SUPPORT_COMPRESSED_POINT=0
|
||||
ASMFLAGS += -DuECC_VLI_NATIVE_LITTLE_ENDIAN=1
|
||||
|
||||
|
||||
micro_ecc_lib: CFLAGS += -D__HEAP_SIZE=4096
|
||||
micro_ecc_lib: CFLAGS += -D__STACK_SIZE=4096
|
||||
micro_ecc_lib: ASMFLAGS += -D__HEAP_SIZE=4096
|
||||
micro_ecc_lib: ASMFLAGS += -D__STACK_SIZE=4096
|
||||
|
||||
# Add standard libraries at the very end of the linker input, after all objects
|
||||
# that may need symbols provided by these libraries.
|
||||
LIB_FILES += -lc -lnosys -lm
|
||||
|
||||
|
||||
.PHONY: default help
|
||||
|
||||
# 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)/nrf52hf_iar/armgcc/micro_ecc_lib_nrf52.a)
|
||||
|
||||
define create_library
|
||||
@echo Creating library: $($@)
|
||||
$(NO_ECHO)$(AR) $($@) $^
|
||||
@echo Done
|
||||
endef
|
||||
micro_ecc_lib:
|
||||
$(create_library)
|
||||
|
||||
SDK_CONFIG_FILE := ../config/sdk_config.h
|
||||
CMSIS_CONFIG_TOOL := $(SDK_ROOT)/external_tools/cmsisconfig/CMSIS_Configuration_Wizard.jar
|
||||
sdk_config:
|
||||
java -jar $(CMSIS_CONFIG_TOOL) $(SDK_CONFIG_FILE)
|
||||
34
external/micro-ecc/nrf52hf_iar/armgcc/ext_micro_ecc_gcc_nRF5x.ld
vendored
Normal file
34
external/micro-ecc/nrf52hf_iar/armgcc/ext_micro_ecc_gcc_nRF5x.ld
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
/* 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
|
||||
{
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
. = ALIGN(4);
|
||||
.mem_section_dummy_ram :
|
||||
{
|
||||
}
|
||||
|
||||
} INSERT AFTER .data;
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
.mem_section_dummy_rom :
|
||||
{
|
||||
}
|
||||
|
||||
} INSERT AFTER .text
|
||||
|
||||
|
||||
INCLUDE "nrf_common.ld"
|
||||
95
external/micro-ecc/nrf52hf_keil/armgcc/Makefile
vendored
Normal file
95
external/micro-ecc/nrf52hf_keil/armgcc/Makefile
vendored
Normal file
@@ -0,0 +1,95 @@
|
||||
PROJECT_NAME := ext_micro_ecc_nrf52hf_library_keil
|
||||
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 += \
|
||||
$(SDK_ROOT)/components/toolchain/cmsis/include \
|
||||
$(PROJ_DIR)/micro-ecc \
|
||||
|
||||
# Libraries common to all targets
|
||||
LIB_FILES += \
|
||||
|
||||
# Optimization flags
|
||||
OPT = -Os -g2
|
||||
# Uncomment the line below to enable link time optimization
|
||||
#OPT += -flto
|
||||
|
||||
# C flags common to all targets
|
||||
CFLAGS += $(OPT)
|
||||
CFLAGS += -DFLOAT_ABI_HARD
|
||||
CFLAGS += -DuECC_ENABLE_VLI_API=0
|
||||
CFLAGS += -DuECC_OPTIMIZATION_LEVEL=3
|
||||
CFLAGS += -DuECC_SQUARE_FUNC=0
|
||||
CFLAGS += -DuECC_SUPPORT_COMPRESSED_POINT=0
|
||||
CFLAGS += -DuECC_VLI_NATIVE_LITTLE_ENDIAN=1
|
||||
CFLAGS += -mcpu=cortex-m4
|
||||
CFLAGS += -mthumb -mabi=aapcs
|
||||
CFLAGS += -Wall -Werror
|
||||
CFLAGS += -mfloat-abi=hard -mfpu=fpv4-sp-d16
|
||||
# keep every function in a separate section, this allows linker to discard unused ones
|
||||
CFLAGS += -ffunction-sections -fdata-sections -fno-strict-aliasing
|
||||
CFLAGS += -fno-builtin -fshort-enums -fshort-wchar -Wno-unused-function
|
||||
|
||||
# C++ flags common to all targets
|
||||
CXXFLAGS += $(OPT)
|
||||
# Assembler flags common to all targets
|
||||
ASMFLAGS += -g2
|
||||
ASMFLAGS += -mcpu=cortex-m4
|
||||
ASMFLAGS += -mthumb -mabi=aapcs
|
||||
ASMFLAGS += -mfloat-abi=hard -mfpu=fpv4-sp-d16
|
||||
ASMFLAGS += -DFLOAT_ABI_HARD
|
||||
ASMFLAGS += -DuECC_ENABLE_VLI_API=0
|
||||
ASMFLAGS += -DuECC_OPTIMIZATION_LEVEL=3
|
||||
ASMFLAGS += -DuECC_SQUARE_FUNC=0
|
||||
ASMFLAGS += -DuECC_SUPPORT_COMPRESSED_POINT=0
|
||||
ASMFLAGS += -DuECC_VLI_NATIVE_LITTLE_ENDIAN=1
|
||||
|
||||
|
||||
micro_ecc_lib: CFLAGS += -D__HEAP_SIZE=4096
|
||||
micro_ecc_lib: CFLAGS += -D__STACK_SIZE=4096
|
||||
micro_ecc_lib: ASMFLAGS += -D__HEAP_SIZE=4096
|
||||
micro_ecc_lib: ASMFLAGS += -D__STACK_SIZE=4096
|
||||
|
||||
# Add standard libraries at the very end of the linker input, after all objects
|
||||
# that may need symbols provided by these libraries.
|
||||
LIB_FILES += -lc -lnosys -lm
|
||||
|
||||
|
||||
.PHONY: default help
|
||||
|
||||
# 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)/nrf52hf_keil/armgcc/micro_ecc_lib_nrf52.lib)
|
||||
|
||||
define create_library
|
||||
@echo Creating library: $($@)
|
||||
$(NO_ECHO)$(AR) $($@) $^
|
||||
@echo Done
|
||||
endef
|
||||
micro_ecc_lib:
|
||||
$(create_library)
|
||||
|
||||
SDK_CONFIG_FILE := ../config/sdk_config.h
|
||||
CMSIS_CONFIG_TOOL := $(SDK_ROOT)/external_tools/cmsisconfig/CMSIS_Configuration_Wizard.jar
|
||||
sdk_config:
|
||||
java -jar $(CMSIS_CONFIG_TOOL) $(SDK_CONFIG_FILE)
|
||||
34
external/micro-ecc/nrf52hf_keil/armgcc/ext_micro_ecc_gcc_nRF5x.ld
vendored
Normal file
34
external/micro-ecc/nrf52hf_keil/armgcc/ext_micro_ecc_gcc_nRF5x.ld
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
/* 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
|
||||
{
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
. = ALIGN(4);
|
||||
.mem_section_dummy_ram :
|
||||
{
|
||||
}
|
||||
|
||||
} INSERT AFTER .data;
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
.mem_section_dummy_rom :
|
||||
{
|
||||
}
|
||||
|
||||
} INSERT AFTER .text
|
||||
|
||||
|
||||
INCLUDE "nrf_common.ld"
|
||||
95
external/micro-ecc/nrf52nf_armgcc/armgcc/Makefile
vendored
Normal file
95
external/micro-ecc/nrf52nf_armgcc/armgcc/Makefile
vendored
Normal file
@@ -0,0 +1,95 @@
|
||||
PROJECT_NAME := ext_micro_ecc_nrf52nf_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 += \
|
||||
$(SDK_ROOT)/components/toolchain/cmsis/include \
|
||||
$(PROJ_DIR)/micro-ecc \
|
||||
|
||||
# Libraries common to all targets
|
||||
LIB_FILES += \
|
||||
|
||||
# Optimization flags
|
||||
OPT = -Os -g3
|
||||
# Uncomment the line below to enable link time optimization
|
||||
#OPT += -flto
|
||||
|
||||
# C flags common to all targets
|
||||
CFLAGS += $(OPT)
|
||||
CFLAGS += -DFLOAT_ABI_SOFT
|
||||
CFLAGS += -DuECC_ENABLE_VLI_API=0
|
||||
CFLAGS += -DuECC_OPTIMIZATION_LEVEL=3
|
||||
CFLAGS += -DuECC_SQUARE_FUNC=0
|
||||
CFLAGS += -DuECC_SUPPORT_COMPRESSED_POINT=0
|
||||
CFLAGS += -DuECC_VLI_NATIVE_LITTLE_ENDIAN=1
|
||||
CFLAGS += -mcpu=cortex-m4
|
||||
CFLAGS += -mthumb -mabi=aapcs
|
||||
CFLAGS += -Wall -Werror
|
||||
CFLAGS += -mfloat-abi=soft
|
||||
# keep every function in a separate section, this allows linker to discard unused ones
|
||||
CFLAGS += -ffunction-sections -fdata-sections -fno-strict-aliasing
|
||||
CFLAGS += -fno-builtin -fshort-enums -Wno-unused-function
|
||||
|
||||
# C++ flags common to all targets
|
||||
CXXFLAGS += $(OPT)
|
||||
# Assembler flags common to all targets
|
||||
ASMFLAGS += -g3
|
||||
ASMFLAGS += -mcpu=cortex-m4
|
||||
ASMFLAGS += -mthumb -mabi=aapcs
|
||||
ASMFLAGS += -mfloat-abi=soft
|
||||
ASMFLAGS += -DFLOAT_ABI_SOFT
|
||||
ASMFLAGS += -DuECC_ENABLE_VLI_API=0
|
||||
ASMFLAGS += -DuECC_OPTIMIZATION_LEVEL=3
|
||||
ASMFLAGS += -DuECC_SQUARE_FUNC=0
|
||||
ASMFLAGS += -DuECC_SUPPORT_COMPRESSED_POINT=0
|
||||
ASMFLAGS += -DuECC_VLI_NATIVE_LITTLE_ENDIAN=1
|
||||
|
||||
|
||||
micro_ecc_lib: CFLAGS += -D__HEAP_SIZE=4096
|
||||
micro_ecc_lib: CFLAGS += -D__STACK_SIZE=4096
|
||||
micro_ecc_lib: ASMFLAGS += -D__HEAP_SIZE=4096
|
||||
micro_ecc_lib: ASMFLAGS += -D__STACK_SIZE=4096
|
||||
|
||||
# Add standard libraries at the very end of the linker input, after all objects
|
||||
# that may need symbols provided by these libraries.
|
||||
LIB_FILES += -lc -lnosys -lm
|
||||
|
||||
|
||||
.PHONY: default help
|
||||
|
||||
# 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)/nrf52nf_armgcc/armgcc/micro_ecc_lib_nrf52.a)
|
||||
|
||||
define create_library
|
||||
@echo Creating library: $($@)
|
||||
$(NO_ECHO)$(AR) $($@) $^
|
||||
@echo Done
|
||||
endef
|
||||
micro_ecc_lib:
|
||||
$(create_library)
|
||||
|
||||
SDK_CONFIG_FILE := ../config/sdk_config.h
|
||||
CMSIS_CONFIG_TOOL := $(SDK_ROOT)/external_tools/cmsisconfig/CMSIS_Configuration_Wizard.jar
|
||||
sdk_config:
|
||||
java -jar $(CMSIS_CONFIG_TOOL) $(SDK_CONFIG_FILE)
|
||||
34
external/micro-ecc/nrf52nf_armgcc/armgcc/ext_micro_ecc_gcc_nRF5x.ld
vendored
Normal file
34
external/micro-ecc/nrf52nf_armgcc/armgcc/ext_micro_ecc_gcc_nRF5x.ld
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
/* 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
|
||||
{
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
. = ALIGN(4);
|
||||
.mem_section_dummy_ram :
|
||||
{
|
||||
}
|
||||
|
||||
} INSERT AFTER .data;
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
.mem_section_dummy_rom :
|
||||
{
|
||||
}
|
||||
|
||||
} INSERT AFTER .text
|
||||
|
||||
|
||||
INCLUDE "nrf_common.ld"
|
||||
95
external/micro-ecc/nrf52nf_iar/armgcc/Makefile
vendored
Normal file
95
external/micro-ecc/nrf52nf_iar/armgcc/Makefile
vendored
Normal file
@@ -0,0 +1,95 @@
|
||||
PROJECT_NAME := ext_micro_ecc_nrf52nf_library_iar
|
||||
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 += \
|
||||
$(SDK_ROOT)/components/toolchain/cmsis/include \
|
||||
$(PROJ_DIR)/micro-ecc \
|
||||
|
||||
# Libraries common to all targets
|
||||
LIB_FILES += \
|
||||
|
||||
# Optimization flags
|
||||
OPT = -Os -gdwarf-3
|
||||
# Uncomment the line below to enable link time optimization
|
||||
#OPT += -flto
|
||||
|
||||
# C flags common to all targets
|
||||
CFLAGS += $(OPT)
|
||||
CFLAGS += -DFLOAT_ABI_SOFT
|
||||
CFLAGS += -DuECC_ENABLE_VLI_API=0
|
||||
CFLAGS += -DuECC_OPTIMIZATION_LEVEL=3
|
||||
CFLAGS += -DuECC_SQUARE_FUNC=0
|
||||
CFLAGS += -DuECC_SUPPORT_COMPRESSED_POINT=0
|
||||
CFLAGS += -DuECC_VLI_NATIVE_LITTLE_ENDIAN=1
|
||||
CFLAGS += -mcpu=cortex-m4
|
||||
CFLAGS += -mthumb -mabi=aapcs
|
||||
CFLAGS += -Wall -Werror
|
||||
CFLAGS += -mfloat-abi=soft
|
||||
# keep every function in a separate section, this allows linker to discard unused ones
|
||||
CFLAGS += -ffunction-sections -fdata-sections -fno-strict-aliasing
|
||||
CFLAGS += -fno-builtin -fshort-enums -fshort-wchar -Wno-unused-function
|
||||
|
||||
# C++ flags common to all targets
|
||||
CXXFLAGS += $(OPT)
|
||||
# Assembler flags common to all targets
|
||||
ASMFLAGS += -gdwarf-3
|
||||
ASMFLAGS += -mcpu=cortex-m4
|
||||
ASMFLAGS += -mthumb -mabi=aapcs
|
||||
ASMFLAGS += -mfloat-abi=soft
|
||||
ASMFLAGS += -DFLOAT_ABI_SOFT
|
||||
ASMFLAGS += -DuECC_ENABLE_VLI_API=0
|
||||
ASMFLAGS += -DuECC_OPTIMIZATION_LEVEL=3
|
||||
ASMFLAGS += -DuECC_SQUARE_FUNC=0
|
||||
ASMFLAGS += -DuECC_SUPPORT_COMPRESSED_POINT=0
|
||||
ASMFLAGS += -DuECC_VLI_NATIVE_LITTLE_ENDIAN=1
|
||||
|
||||
|
||||
micro_ecc_lib: CFLAGS += -D__HEAP_SIZE=4096
|
||||
micro_ecc_lib: CFLAGS += -D__STACK_SIZE=4096
|
||||
micro_ecc_lib: ASMFLAGS += -D__HEAP_SIZE=4096
|
||||
micro_ecc_lib: ASMFLAGS += -D__STACK_SIZE=4096
|
||||
|
||||
# Add standard libraries at the very end of the linker input, after all objects
|
||||
# that may need symbols provided by these libraries.
|
||||
LIB_FILES += -lc -lnosys -lm
|
||||
|
||||
|
||||
.PHONY: default help
|
||||
|
||||
# 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)/nrf52nf_iar/armgcc/micro_ecc_lib_nrf52.a)
|
||||
|
||||
define create_library
|
||||
@echo Creating library: $($@)
|
||||
$(NO_ECHO)$(AR) $($@) $^
|
||||
@echo Done
|
||||
endef
|
||||
micro_ecc_lib:
|
||||
$(create_library)
|
||||
|
||||
SDK_CONFIG_FILE := ../config/sdk_config.h
|
||||
CMSIS_CONFIG_TOOL := $(SDK_ROOT)/external_tools/cmsisconfig/CMSIS_Configuration_Wizard.jar
|
||||
sdk_config:
|
||||
java -jar $(CMSIS_CONFIG_TOOL) $(SDK_CONFIG_FILE)
|
||||
34
external/micro-ecc/nrf52nf_iar/armgcc/ext_micro_ecc_gcc_nRF5x.ld
vendored
Normal file
34
external/micro-ecc/nrf52nf_iar/armgcc/ext_micro_ecc_gcc_nRF5x.ld
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
/* 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
|
||||
{
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
. = ALIGN(4);
|
||||
.mem_section_dummy_ram :
|
||||
{
|
||||
}
|
||||
|
||||
} INSERT AFTER .data;
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
.mem_section_dummy_rom :
|
||||
{
|
||||
}
|
||||
|
||||
} INSERT AFTER .text
|
||||
|
||||
|
||||
INCLUDE "nrf_common.ld"
|
||||
95
external/micro-ecc/nrf52nf_keil/armgcc/Makefile
vendored
Normal file
95
external/micro-ecc/nrf52nf_keil/armgcc/Makefile
vendored
Normal file
@@ -0,0 +1,95 @@
|
||||
PROJECT_NAME := ext_micro_ecc_nrf52nf_library_keil
|
||||
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 += \
|
||||
$(SDK_ROOT)/components/toolchain/cmsis/include \
|
||||
$(PROJ_DIR)/micro-ecc \
|
||||
|
||||
# Libraries common to all targets
|
||||
LIB_FILES += \
|
||||
|
||||
# Optimization flags
|
||||
OPT = -Os -g2
|
||||
# Uncomment the line below to enable link time optimization
|
||||
#OPT += -flto
|
||||
|
||||
# C flags common to all targets
|
||||
CFLAGS += $(OPT)
|
||||
CFLAGS += -DFLOAT_ABI_SOFT
|
||||
CFLAGS += -DuECC_ENABLE_VLI_API=0
|
||||
CFLAGS += -DuECC_OPTIMIZATION_LEVEL=3
|
||||
CFLAGS += -DuECC_SQUARE_FUNC=0
|
||||
CFLAGS += -DuECC_SUPPORT_COMPRESSED_POINT=0
|
||||
CFLAGS += -DuECC_VLI_NATIVE_LITTLE_ENDIAN=1
|
||||
CFLAGS += -mcpu=cortex-m4
|
||||
CFLAGS += -mthumb -mabi=aapcs
|
||||
CFLAGS += -Wall -Werror
|
||||
CFLAGS += -mfloat-abi=soft
|
||||
# keep every function in a separate section, this allows linker to discard unused ones
|
||||
CFLAGS += -ffunction-sections -fdata-sections -fno-strict-aliasing
|
||||
CFLAGS += -fno-builtin -fshort-enums -fshort-wchar -Wno-unused-function
|
||||
|
||||
# C++ flags common to all targets
|
||||
CXXFLAGS += $(OPT)
|
||||
# Assembler flags common to all targets
|
||||
ASMFLAGS += -g2
|
||||
ASMFLAGS += -mcpu=cortex-m4
|
||||
ASMFLAGS += -mthumb -mabi=aapcs
|
||||
ASMFLAGS += -mfloat-abi=soft
|
||||
ASMFLAGS += -DFLOAT_ABI_SOFT
|
||||
ASMFLAGS += -DuECC_ENABLE_VLI_API=0
|
||||
ASMFLAGS += -DuECC_OPTIMIZATION_LEVEL=3
|
||||
ASMFLAGS += -DuECC_SQUARE_FUNC=0
|
||||
ASMFLAGS += -DuECC_SUPPORT_COMPRESSED_POINT=0
|
||||
ASMFLAGS += -DuECC_VLI_NATIVE_LITTLE_ENDIAN=1
|
||||
|
||||
|
||||
micro_ecc_lib: CFLAGS += -D__HEAP_SIZE=4096
|
||||
micro_ecc_lib: CFLAGS += -D__STACK_SIZE=4096
|
||||
micro_ecc_lib: ASMFLAGS += -D__HEAP_SIZE=4096
|
||||
micro_ecc_lib: ASMFLAGS += -D__STACK_SIZE=4096
|
||||
|
||||
# Add standard libraries at the very end of the linker input, after all objects
|
||||
# that may need symbols provided by these libraries.
|
||||
LIB_FILES += -lc -lnosys -lm
|
||||
|
||||
|
||||
.PHONY: default help
|
||||
|
||||
# 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)/nrf52nf_keil/armgcc/micro_ecc_lib_nrf52.lib)
|
||||
|
||||
define create_library
|
||||
@echo Creating library: $($@)
|
||||
$(NO_ECHO)$(AR) $($@) $^
|
||||
@echo Done
|
||||
endef
|
||||
micro_ecc_lib:
|
||||
$(create_library)
|
||||
|
||||
SDK_CONFIG_FILE := ../config/sdk_config.h
|
||||
CMSIS_CONFIG_TOOL := $(SDK_ROOT)/external_tools/cmsisconfig/CMSIS_Configuration_Wizard.jar
|
||||
sdk_config:
|
||||
java -jar $(CMSIS_CONFIG_TOOL) $(SDK_CONFIG_FILE)
|
||||
34
external/micro-ecc/nrf52nf_keil/armgcc/ext_micro_ecc_gcc_nRF5x.ld
vendored
Normal file
34
external/micro-ecc/nrf52nf_keil/armgcc/ext_micro_ecc_gcc_nRF5x.ld
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
/* 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
|
||||
{
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
. = ALIGN(4);
|
||||
.mem_section_dummy_ram :
|
||||
{
|
||||
}
|
||||
|
||||
} INSERT AFTER .data;
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
.mem_section_dummy_rom :
|
||||
{
|
||||
}
|
||||
|
||||
} INSERT AFTER .text
|
||||
|
||||
|
||||
INCLUDE "nrf_common.ld"
|
||||
Reference in New Issue
Block a user