Add ibex compatibility to pulpissimo

This commit is contained in:
Michael Rogenmoser 2021-01-22 17:52:42 +01:00
parent a3f57b07d3
commit babf8b1c4e
3 changed files with 17 additions and 0 deletions

View file

@ -24,7 +24,11 @@
//#include "archi/periph_v2.h"
#include "archi/gpio/gpio_v3.h"
#include "archi/riscv/priv_1_10.h"
#ifdef __ibex__
#include "archi/ibex/mhpm.h"
#else // __ibex__
#include "archi/riscv/pcer_v2.h"
#endif // __ibex__
#include "archi/chips/pulpissimo/memory_map.h"
#include "archi/chips/pulpissimo/apb_soc.h"

View file

@ -17,7 +17,11 @@
#ifndef __HAL_CHIPS_PULPISSIMO_PULP_H__
#define __HAL_CHIPS_PULPISSIMO_PULP_H__
#ifdef __ibex__
#include "hal/ibex/ibex.h"
#else // __ibex__
#include "hal/riscv/riscv_v5.h"
#endif // __ibex__
#include "hal/itc/itc_v1.h"
#include "hal/timer/timer_v2.h"
#include "hal/soc_eu/soc_eu_v2.h"

View file

@ -1,8 +1,17 @@
ifdef USE_IBEX
PULP_LDFLAGS +=
PULP_CFLAGS += -D__ibex__ -U__riscv__ -UARCHI_CORE_HAS_PULPV2 -DRV_ISA_RV32
PULP_ARCH_CFLAGS ?= -march=rv32imc
PULP_ARCH_LDFLAGS ?= -march=rv32imc
PULP_ARCH_OBJDFLAGS ?= -Mmarch=rv32imc
else
PULP_LDFLAGS +=
PULP_CFLAGS += -D__riscv__
PULP_ARCH_CFLAGS ?= -march=rv32imcxgap9
PULP_ARCH_LDFLAGS ?= -march=rv32imcxgap9
PULP_ARCH_OBJDFLAGS ?= -Mmarch=rv32imcxgap9
endif
PULP_CFLAGS += -fdata-sections -ffunction-sections -include chips/pulpissimo/config.h -I$(PULPRT_HOME)/include/chips/pulpissimo
PULP_OMP_CFLAGS += -fopenmp -mnativeomp
PULP_LDFLAGS += -nostartfiles -nostdlib -Wl,--gc-sections -L$(PULPRT_HOME)/kernel -Tchips/pulpissimo/link.ld -lgcc