diff --git a/SoC/evalsoc/Common/npk.yml b/SoC/evalsoc/Common/npk.yml index 56d6276f..cb8bc3b9 100644 --- a/SoC/evalsoc/Common/npk.yml +++ b/SoC/evalsoc/Common/npk.yml @@ -275,6 +275,11 @@ configuration: hints: "_zba_zbb_zbc_zbs_xxldsp" global: true description: ARCH Extensions(ARCH_EXT=) + nuclei_gen: + default_value: 0 + type: checkbox + tips: "If SDK is generated by cpu nuclei_gen tool, please click it!" + description: SDK gen by nuclei_gen nuclei_cache: default_value: [] type: multicheckbox_v2 @@ -446,6 +451,10 @@ buildconfig: - flags: -x assembler-with-cpp cxxflags: common_defines: + # if SDK is generated by cpu nuclei_gen tool it will define HAS_AUTOGEN_CPUCFG + # to match the cpu rtl configuration + - defines: HAS_AUTOGEN_CPUCFG + condition: $( ${nuclei_gen} == 1 ) - defines: SMP_CPU_CNT=${nuclei_smp} condition: $( ${nuclei_smp} > 1 ) - defines: BOOT_HARTID=${boothartid} diff --git a/SoC/evalsoc/build.mk b/SoC/evalsoc/build.mk index 01b30329..bc40255e 100644 --- a/SoC/evalsoc/build.mk +++ b/SoC/evalsoc/build.mk @@ -109,7 +109,11 @@ ifneq ($(SPLITMODE),) OPENOCD_CMD_ARGS += set SPLITMODE $(SPLITMODE); endif -# If using generated cpu configs +# If using generated cpu configs done by nuclei_gen +# Notice: cpu nuclei_gen tool will do the following things: +# 1. generate autogen_nuclei_cpu.h in where evalsoc.h located +# 2. generate Makefile.global in /Build/ folder +# 3. sed and replace flash/ilm/dlm/sram/ddr base and size in gcc_evalsoc_*.ld ifeq ($(CPU_CONFIG_K),1) COMMON_FLAGS += -DHAS_AUTOGEN_CPUCFG endif