Skip to content
This repository has been archived by the owner on Mar 27, 2021. It is now read-only.

Commit

Permalink
updated project files
Browse files Browse the repository at this point in the history
  • Loading branch information
Szymański Rajmund committed Dec 24, 2018
1 parent 6065b66 commit 7d2df9f
Show file tree
Hide file tree
Showing 17 changed files with 43 additions and 39 deletions.
8 changes: 5 additions & 3 deletions makefile.armcc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#**********************************************************#
#file makefile
#author Rajmund Szymanski
#date 10.01.2018
#date 24.12.2018
#brief LM4F120H5QR makefile.
#**********************************************************#

Expand All @@ -15,10 +15,10 @@ QEMU := c:/sys/qemu-arm/bin/qemu-system-gnuarmeclipse -semihosting -board

PROJECT ?= $(notdir $(CURDIR))
DEFS ?= __MICROLIB
LIBS ?=
DIRS ?=
KEYS ?=
INCS ?= .
LIBS ?=
KEYS ?=
OPTF ?= 2 # space
SCRIPT ?=

Expand Down Expand Up @@ -95,6 +95,8 @@ TXTS := $(OBJS:.o=.txt)
CORE_F := --cpu=cortex-m4
ifneq ($(MAKECMDGOALS),qemu)
CORE_F += --fpu=fpv4-sp --apcs=/hardfp/interwork
else
DEFS += QEMU
endif
COMMON_F = --md --depend=$(@:.o=.d) # --feedback=$(FED)
COMMON_F += # --debug
Expand Down
10 changes: 6 additions & 4 deletions makefile.clang
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#**********************************************************#
#file makefile
#author Rajmund Szymanski
#date 10.01.2018
#date 24.12.2018
#brief LM4F120H5QR makefile.
#**********************************************************#

Expand All @@ -15,10 +15,10 @@ QEMU := c:/sys/qemu-arm/bin/qemu-system-gnuarmeclipse -semihosting -board

PROJECT ?= $(notdir $(CURDIR))
DEFS ?= __MICROLIB
LIBS ?=
DIRS ?=
KEYS ?=
INCS ?= .
LIBS ?=
KEYS ?=
OPTF ?= 2 # z
SCRIPT ?=

Expand Down Expand Up @@ -93,6 +93,8 @@ TXTS := $(OBJS:.o=.txt)
COMMON_F = --target=arm-arm-none-eabi -mthumb -mcpu=cortex-m4
ifneq ($(MAKECMDGOALS),qemu)
COMMON_F += -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffast-math
else
DEFS += QEMU
endif
COMMON_F += -O$(OPTF) -ffunction-sections -fdata-sections
ifneq ($(filter USE_LTO,$(DEFS)),)
Expand All @@ -104,7 +106,7 @@ COMMON_F += # --debug

AS_FLAGS =
C_FLAGS = -std=gnu11
CXX_FLAGS = -std=gnu++11 -fno-rtti -fno-exceptions # -fno-use-cxa-atexit
CXX_FLAGS = -std=gnu++14 -fno-rtti -fno-exceptions # -fno-use-cxa-atexit
LD_FLAGS = --strict --scatter=$(SCRIPT) --symbols --list_mapping_symbols
LD_FLAGS += --map --info common,sizes,summarysizes,totals,veneers,unused --list=$(MAP) # --callgraph
ifneq ($(filter USE_LTO,$(DEFS)),)
Expand Down
7 changes: 4 additions & 3 deletions makefile.csmcc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#**********************************************************#
#file makefile
#author Rajmund Szymanski
#date 10.01.2018
#date 24.12.2018
#brief LM4F120H5QR makefile.
#**********************************************************#

Expand All @@ -15,10 +15,10 @@ QEMU := c:/sys/qemu-arm/bin/qemu-system-gnuarmeclipse -semihosting -board

PROJECT ?= $(notdir $(CURDIR))
DEFS ?=
LIBS ?=
DIRS ?=
KEYS ?=
INCS ?= .
LIBS ?=
KEYS ?=
OPTF ?=
SCRIPT ?=

Expand All @@ -29,6 +29,7 @@ KEYS += .csmcc .cortexm .lm4f *
ifneq ($(MAKECMDGOALS),qemu)
LIBS += crtsi libfpulc libilc libm
else
DEFS += QEMU
LIBS += crtsi libflc libilc libm
endif
MODEL := modlc
Expand Down
10 changes: 6 additions & 4 deletions makefile.gnucc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#**********************************************************#
#file makefile
#author Rajmund Szymanski
#date 10.01.2018
#date 24.12.2018
#brief LM4F120H5QR makefile.
#**********************************************************#

Expand All @@ -14,10 +14,10 @@ QEMU := c:/sys/qemu-arm/bin/qemu-system-gnuarmeclipse -semihosting -board

PROJECT ?= $(notdir $(CURDIR))
DEFS ?= USE_NANO
LIBS ?=
DIRS ?=
KEYS ?=
INCS ?= ./.
LIBS ?=
KEYS ?=
OPTF ?= 2 # s
SCRIPT ?=

Expand Down Expand Up @@ -90,6 +90,8 @@ LSTS := $(OBJS:.o=.lst)
COMMON_F = -mthumb -mcpu=cortex-m4
ifneq ($(MAKECMDGOALS),qemu)
COMMON_F += -mfpu=fpv4-sp-d16 -mfloat-abi=hard -ffast-math
else
DEFS += QEMU
endif
COMMON_F += -O$(OPTF) -ffunction-sections -fdata-sections
ifneq ($(filter USE_LTO,$(DEFS)),)
Expand All @@ -102,7 +104,7 @@ COMMON_F += # -g -ggdb

AS_FLAGS =
C_FLAGS = -std=gnu11
CXX_FLAGS = -std=gnu++11 -fno-rtti -fno-exceptions # -fno-use-cxa-atexit
CXX_FLAGS = -std=gnu++14 -fno-rtti -fno-exceptions -fno-use-cxa-atexit
LD_FLAGS = -Wl,-T$(SCRIPT),-Map=$(MAP),--cref,--no-warn-mismatch,--gc-sections
ifneq ($(filter main_stack_size%,$(DEFS)),)
LD_FLAGS += -Wl,--defsym=$(filter main_stack_size%,$(DEFS))
Expand Down
10 changes: 6 additions & 4 deletions makefile.iarcc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#**********************************************************#
#file makefile
#author Rajmund Szymanski
#date 10.01.2018
#date 24.12.2018
#brief LM4F120H5QR makefile.
#**********************************************************#

Expand All @@ -14,11 +14,11 @@ QEMU := c:/sys/qemu-arm/bin/qemu-system-gnuarmeclipse -semihosting -board
#----------------------------------------------------------#

PROJECT ?= $(notdir $(CURDIR))
DEFS ?=
LIBS ?=
DEFS ?= port_sys_init=__iar_init_core
DIRS ?=
KEYS ?=
INCS ?= ./.
LIBS ?=
KEYS ?=
OPTF ?= h # hz
SCRIPT ?=

Expand Down Expand Up @@ -92,6 +92,8 @@ LSTS := $(OBJS:.o=.lst)
CORE_F := --cpu Cortex-M4
ifneq ($(MAKECMDGOALS),qemu)
CORE_F += --fpu VFPv4_sp
else
DEFS += QEMU
endif
COMMON_F = --thumb -O$(OPTF) -e --dependencies=m $*.d
AS_FLAGS = -S -s+ -w+
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*******************************************************************************
@file startup.h
@author Rajmund Szymanski
@date 21.11.2017
@date 21.12.2018
@brief Startup file header for gcc compiler.
*******************************************************************************/

Expand Down Expand Up @@ -30,8 +30,6 @@ __NO_RETURN void _start( void );

#endif//USE_CRT

__NO_RETURN __ALIAS(Fault_Handler) void _exit( int );

/*******************************************************************************
Symbols defined in linker script
*******************************************************************************/
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*******************************************************************************
@file startup.h
@author Rajmund Szymanski
@date 14.11.2017
@date 09.08.2018
@brief Startup file header for iar c compiler.
*******************************************************************************/

Expand All @@ -18,7 +18,6 @@
Prototypes of external functions
*******************************************************************************/

__WEAK void port_sys_init( void );
__NO_RETURN void __iar_program_start( void );

/*******************************************************************************
Expand All @@ -28,8 +27,6 @@ __NO_RETURN void __iar_program_start( void );
__STATIC_INLINE __NO_RETURN
void __main( void )
{
/* Call the os initialization procedure */
port_sys_init();
/* Call the application's entry point */
__iar_program_start();
}
Expand Down
28 changes: 14 additions & 14 deletions startup/LM4F/startup_lm4f.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*******************************************************************************
@file startup.c
@author Rajmund Szymanski
@date 19.07.2018
@date 21.12.2018
@brief LM4F120H5QR startup file.
After reset the Cortex-M4 processor is in thread mode,
priority is privileged, and the stack is set to main.
Expand Down Expand Up @@ -34,6 +34,18 @@
extern char __initial_msp[];
extern char __initial_sp [];

/*******************************************************************************
Default _exit handler
*******************************************************************************/

__WEAK __NO_RETURN
void _exit( int status )
{
(void) status;
/* Go into an infinite loop */
for (;;);
}

/*******************************************************************************
Default fault handler
*******************************************************************************/
Expand All @@ -49,19 +61,7 @@ void Fault_Handler( void )
Specific definitions for the compiler
*******************************************************************************/

#if defined(__CC_ARM)
#include "ARMCC/startup.h"
#elif defined(__ARMCOMPILER_VERSION)
#include "CLANG/startup.h"
#elif defined(__GNUC__)
#include "GNUCC/startup.h"
#elif defined(__CSMC__)
#include "CSMCC/startup.h"
#elif defined(__ICCARM__)
#include "IARCC/startup.h"
#else
#error Unknown compiler!
#endif
#include "startup.h"

/*******************************************************************************
Default reset handler
Expand Down

0 comments on commit 7d2df9f

Please sign in to comment.