mips: Clean-up makefiles
This commit is contained in:
parent
7b824fe7fe
commit
af70c0844c
@ -1,4 +1,5 @@
|
||||
export CPU = mips32r2_common
|
||||
export INCLUDES += -I$(RIOTBOARD)/$(BOARD)/include/
|
||||
export USE_HARD_FLOAT = 1
|
||||
#export USE_HARD_FLOAT = 1
|
||||
export USE_DSP = 1
|
||||
export USE_UHI_SYSCALLS = 1
|
||||
|
||||
@ -41,16 +41,6 @@ extern "C" {
|
||||
*/
|
||||
#define UART_NUMOF (0)
|
||||
|
||||
/**
|
||||
* @brief Enable DSP context save + restore.
|
||||
*/
|
||||
#define MIPS_DSP (1)
|
||||
|
||||
/**
|
||||
* @brief Enable FPU context save + restore.
|
||||
*/
|
||||
#define MIPS_HARD_FLOAT (1)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
export CPU = mips_pic32mx
|
||||
export CPU_MODEL=p32mx470f512h
|
||||
export INCLUDES += -I$(RIOTBOARD)/$(BOARD)/include/
|
||||
export APPDEPS += $(RIOTCPU)/$(CPU)/$(CPU_MODEL)/$(CPU_MODEL).S
|
||||
export APPDEPS += $(RIOTCPU)/$(CPU)/$(CPU_MODEL)/$(CPU_MODEL).S
|
||||
export USE_UHI_SYSCALLS = 1
|
||||
|
||||
@ -2,3 +2,4 @@ export CPU = mips_pic32mz
|
||||
export CPU_MODEL=p32mz2048efg100
|
||||
export INCLUDES += -I$(RIOTBOARD)/$(BOARD)/include/
|
||||
export APPDEPS += $(RIOTCPU)/$(CPU)/$(CPU_MODEL)/$(CPU_MODEL).S
|
||||
export USE_UHI_SYSCALLS = 1
|
||||
|
||||
@ -4,7 +4,6 @@ export APP_START=0x80000000
|
||||
|
||||
include $(RIOTMAKE)/arch/mips.inc.mk
|
||||
|
||||
export LINKFLAGS += -Tuhi32.ld
|
||||
export USEMODULE += periph
|
||||
export USEMODULE += newlib
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
*
|
||||
* @file
|
||||
* @brief Newlib system call implementation for use with the mips-mti-elf
|
||||
* toolchain newlib incoporating as sem-hosting interface caled 'UHI'
|
||||
* toolchain newlib incorporating as semi-hosting interface called 'UHI'
|
||||
*
|
||||
* @author Neil Jones <neil.jones@imgtec.com>
|
||||
*
|
||||
@ -49,7 +49,7 @@ char *heap_top = &_sheap + 4;
|
||||
/**
|
||||
* @brief Free resources on NewLib de-initialization, not used for RIOT
|
||||
*/
|
||||
|
||||
|
||||
/* __attribute__((used)) fixes linker errors when building with LTO, but without nano.specs */
|
||||
__attribute__((used)) void _fini(void)
|
||||
{
|
||||
@ -69,7 +69,6 @@ void _exit(int n)
|
||||
{
|
||||
exit(n);
|
||||
pm_off();
|
||||
while(1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -1,6 +1,3 @@
|
||||
export MEMORY_BASE=0x80000000
|
||||
export MEMORY_SIZE=128K
|
||||
export APP_START=0x80000000
|
||||
export ROMABLE = 1
|
||||
|
||||
include $(RIOTMAKE)/arch/mips.inc.mk
|
||||
@ -9,7 +6,18 @@ include $(RIOTCPU)/mips_pic32_common/Makefile.include
|
||||
# define build specific options
|
||||
export CFLAGS += -march=m4k -DSKIP_COPY_TO_RAM
|
||||
|
||||
export USEMODULE += mips_pic32_common
|
||||
export USEMODULE += periph
|
||||
export USEMODULE += newlib
|
||||
|
||||
ifeq ($(USE_UHI_SYSCALLS),1)
|
||||
#Use UHI to handle syscalls
|
||||
export LINKFLAGS += -luhi
|
||||
export USEMODULE += newlib_syscalls_mips_uhi
|
||||
else
|
||||
#Use RIOT to handle syscalls (default)
|
||||
export USEMODULE += newlib_syscalls_default
|
||||
endif
|
||||
|
||||
export LINKFLAGS += -Wl,--defsym,__use_excpt_boot=0 $(CFLAGS)
|
||||
export LINKFLAGS += -Tpic32mx512_12_128_uhi.ld
|
||||
|
||||
@ -1,6 +1,3 @@
|
||||
export MEMORY_BASE=0x80000000
|
||||
export MEMORY_SIZE=512K
|
||||
export APP_START=0x80000000
|
||||
export ROMABLE = 1
|
||||
|
||||
include $(RIOTMAKE)/arch/mips.inc.mk
|
||||
@ -10,7 +7,19 @@ include $(RIOTCPU)/mips_pic32_common/Makefile.include
|
||||
export CFLAGS += -march=m5101 -mmicromips -DSKIP_COPY_TO_RAM
|
||||
export CFLAGS += -DMIPS_MICROMIPS
|
||||
|
||||
export USEMODULE += mips_pic32_common
|
||||
export USEMODULE += periph
|
||||
export USEMODULE += newlib
|
||||
|
||||
ifeq ($(USE_UHI_SYSCALLS),1)
|
||||
#Use UHI to handle syscalls
|
||||
export LINKFLAGS += -luhi
|
||||
export USEMODULE += newlib_syscalls_mips_uhi
|
||||
else
|
||||
#Use RIOT to handle syscalls (default)
|
||||
export USEMODULE += newlib_syscalls_default
|
||||
endif
|
||||
|
||||
|
||||
export LINKFLAGS += -Wl,--defsym,__use_excpt_boot=0 $(CFLAGS)
|
||||
export LINKFLAGS += -Tpic32mz2048_uhi.ld
|
||||
|
||||
@ -41,7 +41,7 @@ export CFLAGS_OPT = -Os
|
||||
export CFLAGS += $(CFLAGS_CPU) $(CFLAGS_LINK) $(CFLAGS_OPT) $(CFLAGS_DBG)
|
||||
|
||||
ifeq ($(USE_HARD_FLOAT),1)
|
||||
export CFLAGS += -mhard-float
|
||||
export CFLAGS += -mhard-float -DMIPS_HARD_FLOAT
|
||||
else
|
||||
#hard-float is the default so we must set soft-float
|
||||
export CFLAGS += -msoft-float
|
||||
@ -49,7 +49,7 @@ else
|
||||
endif
|
||||
|
||||
ifeq ($(USE_DSP),1)
|
||||
export CFLAGS += -mdsp
|
||||
export CFLAGS += -mdsp -DMIPS_DSP
|
||||
endif
|
||||
|
||||
ifeq ($(TOOLCHAIN),llvm)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user