pussuw commented on a change in pull request #5758:
URL: https://github.com/apache/incubator-nuttx/pull/5758#discussion_r828434785



##########
File path: arch/risc-v/src/mpfs/Make.defs
##########
@@ -55,19 +56,29 @@ CHIP_CSRCS += mpfs_irq.c mpfs_irq_dispatch.c
 CHIP_CSRCS += mpfs_lowputc.c mpfs_serial.c
 CHIP_CSRCS += mpfs_start.c mpfs_timerisr.c
 CHIP_CSRCS += mpfs_gpio.c mpfs_systemreset.c
+CHIP_CSRCS += mpfs_plic.c
 
 ifeq ($(CONFIG_MPFS_DMA),y)
 CHIP_CSRCS += mpfs_dma.c
 endif
 
-ifeq ($(CONFIG_BUILD_PROTECTED),y)
-CMN_CSRCS += riscv_task_start.c
-CMN_CSRCS += riscv_pthread_start.c
-CMN_CSRCS += riscv_signal_dispatch.c
+# Flag to enable certain modules for non-flat builds (PROTECTED/KERNEL)
+__MPFS_BUILD_NONFLAT =
 
+ifeq ($(CONFIG_BUILD_PROTECTED),y)
+CHIP_CSRCS += mpfs_userspace.c
 CMN_UASRCS += riscv_signal_handler.S
+__MPFS_BUILD_NONFLAT=y
+endif
 
-CHIP_CSRCS += mpfs_userspace.c
+ifeq ($(CONFIG_BUILD_KERNEL),y)
+__MPFS_BUILD_NONFLAT=y
+endif
+
+ifeq ($(__MPFS_BUILD_NONFLAT),y)
+CMN_CSRCS  += riscv_task_start.c

Review comment:
       These are the common sources needed by both BUILD_PROTECTED and 
BUILD_KERNEL




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to