pkarashchenko commented on code in PR #7500:
URL: https://github.com/apache/incubator-nuttx/pull/7500#discussion_r1010947723


##########
boards/xtensa/esp32s3/esp32s3-eye/scripts/Make.defs:
##########
@@ -23,13 +23,26 @@ include $(TOPDIR)/tools/Config.mk
 include $(TOPDIR)/tools/esp32s3/Config.mk
 include $(TOPDIR)/arch/xtensa/src/lx7/Toolchain.defs
 
-ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32s3_out.ld
-ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32s3.ld
-ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32s3_rom.ld
-ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32s3_peripherals.ld
+# Pick the linker scripts from the board level if they exist, if not
+# pick the common linker scripts.
+
+ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)esp32s3_peripherals.ld
+ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)esp32s3_rom.ld
+
+ifneq ($(wildcard $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32s3_memory.ld),)
+       ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32s3_memory.ld

Review Comment:
   From file that you are pointing:
   ```
   # ARCHxxx means the predefined setting(either toolchain, arch, or system 
specific)
   
   ARCHDEFINES += ${shell $(DEFINE) "$(CC)" __NuttX__}
   ifeq ($(CONFIG_NDEBUG),y)
     ARCHDEFINES += ${shell $(DEFINE) "$(CC)" NDEBUG}
   endif
   
   # The default C/C++ search path
   
   ARCHINCLUDES += ${shell $(INCDIR) -s "$(CC)" $(TOPDIR)$(DELIM)include}
   
   ifeq ($(CONFIG_LIBCXX),y)
     ARCHXXINCLUDES += ${shell $(INCDIR) -s "$(CC)" 
$(TOPDIR)$(DELIM)include$(DELIM)libcxx}
   else ifeq ($(CONFIG_UCLIBCXX),y)
     ARCHXXINCLUDES += ${shell $(INCDIR) -s "$(CC)" 
$(TOPDIR)$(DELIM)include$(DELIM)uClibc++}
   else
     ARCHXXINCLUDES += ${shell $(INCDIR) -s "$(CC)" 
$(TOPDIR)$(DELIM)include$(DELIM)cxx}
     ifeq ($(CONFIG_ETL),y)
       ARCHXXINCLUDES += ${shell $(INCDIR) -s "$(CC)" 
$(TOPDIR)$(DELIM)include$(DELIM)etl}
     endif
   endif
   ARCHXXINCLUDES += ${shell $(INCDIR) -s "$(CC)" $(TOPDIR)$(DELIM)include}
   ```
   I'm referring to:
   ```
   boards/risc-v/mpfs/icicle/scripts/Make.defs
   boards/risc-v/esp32c3/esp32c3-devkit/scripts/Make.defs
   boards/arm/samv7/samv71-xult/configs/knsh/Make.defs
   ```
   and some others. Anyway I can unify style later



-- 
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: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to