2016-11-07 14:32:42 +01:00
|
|
|
export ROMABLE = 1
|
|
|
|
|
2016-01-27 10:47:12 +01:00
|
|
|
include $(RIOTMAKE)/arch/mips.inc.mk
|
2017-03-30 16:47:51 +02:00
|
|
|
include $(RIOTCPU)/mips_pic32_common/Makefile.include
|
2017-11-13 15:02:56 +01:00
|
|
|
include $(RIOTCPU)/mips32r2_common/Makefile.include
|
2016-11-07 14:32:42 +01:00
|
|
|
|
|
|
|
# define build specific options
|
2016-11-07 14:35:17 +01:00
|
|
|
export CFLAGS += -march=m5101 -mmicromips -DSKIP_COPY_TO_RAM
|
2016-11-07 14:32:42 +01:00
|
|
|
export CFLAGS += -DMIPS_MICROMIPS
|
|
|
|
|
2016-11-07 14:35:17 +01:00
|
|
|
export LINKFLAGS += -Wl,--defsym,__use_excpt_boot=0 $(CFLAGS)
|
2017-02-22 16:07:58 +01:00
|
|
|
export LINKFLAGS += -Tpic32mz2048_uhi.ld
|
2016-11-07 14:35:17 +01:00
|
|
|
|
2016-11-07 14:32:42 +01:00
|
|
|
# the pickit programmer (MPLAB-IPE) wants physical addresses in the hex file!!
|
|
|
|
export OBJCOPY = objcopy #use system objcopy as toolchain one is broken.
|
|
|
|
export OFLAGS += -O ihex \
|
2016-11-07 14:35:17 +01:00
|
|
|
--change-section-lma .lowerbootflashalias-0xA0000000 \
|
|
|
|
--change-section-lma .bootflash1-0xA0000000 \
|
|
|
|
--change-section-lma .bootflash2-0xA0000000 \
|
|
|
|
--change-section-lma .exception_vector-0x80000000 \
|
|
|
|
--change-section-lma .text-0x80000000 \
|
|
|
|
--change-section-lma .init-0x80000000 \
|
|
|
|
--change-section-lma .fini-0x80000000 \
|
|
|
|
--change-section-lma .eh_frame-0x80000000 \
|
|
|
|
--change-section-lma .gcc_except_table-0x80000000 \
|
|
|
|
--change-section-lma .jcr-0x80000000 \
|
|
|
|
--change-section-lma .ctors-0x80000000 \
|
|
|
|
--change-section-lma .dtors-0x80000000 \
|
|
|
|
--change-section-lma .rodata-0x80000000 \
|
|
|
|
--change-section-lma .data-0x80000000 \
|
|
|
|
--change-section-lma .bss-0x80000000 \
|
|
|
|
--change-section-lma .startdata-0x80000000
|