Skip to content

Commit

Permalink
SoC/evalsoc: allow user to select nuclei_gen sdk and add comments
Browse files Browse the repository at this point in the history
Signed-off-by: Huaqi Fang <[email protected]>
  • Loading branch information
fanghuaqi committed Jun 5, 2024
1 parent 0e2b5b3 commit f4e0f1f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
9 changes: 9 additions & 0 deletions SoC/evalsoc/Common/npk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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}
Expand Down
6 changes: 5 additions & 1 deletion SoC/evalsoc/build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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 <SDK>/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
Expand Down

0 comments on commit f4e0f1f

Please sign in to comment.