|
1 | | -ifndef MIPS_ELF_ROOT |
2 | | - $(error "Please set $$(MIPS_ELF_ROOT) and ensure $$(MIPS_ELF_ROOT)/bin is on your PATH") |
3 | | -endif |
4 | | - |
5 | | -# Target triple for the build. |
6 | | -export TARGET_ARCH ?= mips-mti-elf |
7 | | - |
8 | | -export ABI=32 |
9 | 1 | export MEMORY_BASE=0x80000000 |
10 | 2 | export MEMORY_SIZE=128K |
11 | 3 | export APP_START=0x80000000 |
12 | 4 | export ROMABLE = 1 |
13 | 5 |
|
14 | | -include $(MIPS_ELF_ROOT)/share/mips/rules/mipshal.mk |
| 6 | +include $(RIOTCPU)/Makefile.include.mips_common |
15 | 7 |
|
16 | 8 | # define build specific options |
17 | | -export CFLAGS_CPU = -EL -march=m4k |
18 | | -export CFLAGS_LINK = -ffunction-sections -fno-builtin -fshort-enums |
19 | | -export CFLAGS_DBG = -O0 -g2 |
20 | | -export CFLAGS_OPT = -Os -g2 |
21 | | - |
22 | | -export CFLAGS += $(CFLAGS_CPU) $(CFLAGS_LINK) $(CFLAGS_OPT) -DSKIP_COPY_TO_RAM |
23 | | -#$(CFLAGS_DBG) |
24 | | - |
25 | | -ifeq ($(USE_HARD_FLOAT),1) |
26 | | - export CFLAGS += -mhard-float |
27 | | -else |
28 | | - export CFLAGS += -msoft-float #hard-float is the default so we must set soft-float |
29 | | - export LINKFLAGS += -msoft-float |
30 | | -endif |
31 | | - |
32 | | -ifeq ($(USE_DSP),1) |
33 | | - export CFLAGS += -mdsp |
34 | | -endif |
| 9 | +export CFLAGS += -march=m4k -DSKIP_COPY_TO_RAM |
35 | 10 |
|
36 | | -export ASFLAGS += $(CFLAGS_CPU) $(CFLAGS_OPT) #$(CFLAGS_DBG) |
| 11 | +export USEMODULE += periph |
37 | 12 |
|
38 | | -export LINKFLAGS += $(MIPS_HAL_LDFLAGS) -mabi=$(ABI) -Wl,--defsym,__use_excpt_boot=0 |
| 13 | +export LINKFLAGS += -Wl,--defsym,__use_excpt_boot=0 $(CFLAGS) |
39 | 14 | export LINKFLAGS += -T$(RIOTCPU)/$(CPU)/ldscripts/pic32mx512_12_128_uhi.ld |
40 | | -export LINKFLAGS += $(CFLAGS_CPU) $(CFLAGS_DBG) #$(CFLAGS_OPT) |
41 | | -export LINKFLAGS += -Wl,--gc-sections |
42 | | - |
43 | | -# This CPU implementation is using the new core/CPU interface: |
44 | | -export CFLAGS += -DCOREIF_NG=1 |
45 | | - |
46 | | -export USEMODULE += periph |
47 | 15 |
|
48 | 16 | # the pickit programmer (MPLAB-IPE) wants physical addresses in the hex file!! |
49 | 17 | export OBJCOPY = objcopy #use system objcopy as toolchain one is broken. |
|
0 commit comments