1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00
RIOT/cpu/mips_pic32mz/Makefile.include
Francois Berder 74a999abe4 cpu: mips: Fix missing include for pic32mx and pic32mz
Compilation for pic32mx and pic32mz did not include the path
to cpu/mips_pic32_common/include. Also,
cpu/mips_pic32_common/Makefile.include was never parsed. It was
found that mips32r2_common and mips_pic32_common are both defining
similar parameters for linkers which cause issues if both
Makefile.include get parsed.

Signed-off-by: Francois Berder <francois.berder@imgtec.com>
2017-04-12 10:58:52 +01:00

37 lines
1.4 KiB
Makefile

export MEMORY_BASE=0x80000000
export MEMORY_SIZE=512K
export APP_START=0x80000000
export ROMABLE = 1
include $(RIOTMAKE)/arch/mips.inc.mk
include $(RIOTCPU)/mips_pic32_common/Makefile.include
# define build specific options
export CFLAGS += -march=m5101 -mmicromips -DSKIP_COPY_TO_RAM
export CFLAGS += -DMIPS_MICROMIPS
export USEMODULE += periph
export LINKFLAGS += -Wl,--defsym,__use_excpt_boot=0 $(CFLAGS)
export LINKFLAGS += -T$(RIOTCPU)/$(CPU)/ldscripts/pic32mz2048_uhi.ld
# 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 \
--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