xiaoxiang781216 commented on code in PR #19916:
URL: https://github.com/apache/nuttx/pull/19916#discussion_r3855629053


##########
tools/Config.mk:
##########
@@ -861,3 +861,16 @@ LOWERMAP = A a B b C c D d E e F f G g H h I i J j K k L l 
M m N n O o P p Q q R
 
 UPPER_CASE = $(call ULMAP,$(UPPERMAP),$(1))
 LOWER_CASE = $(call ULMAP,$(LOWERMAP),$(1))
+
+# ZBus iterable sections "zero-touch" mode: supplement the board linker
+# script with the zbus sections via INSERT (see include/nuttx/linker/zbus.ld)
+# instead of requiring the board script to include common-rom.ld.
+#
+# The fragment is added through ARCHSCRIPT (not EXTRALINKCMDS) because GNU
+# ld requires the INSERT script to come BEFORE the script that defines the
+# target section on the command line; this file is included by the board
+# Make.defs before it appends its own script, so the fragment lands first.
+
+ifeq ($(CONFIG_ZBUS_LINKER_INSERT),y)
+  ARCHSCRIPT += 
$(TOPDIR)$(DELIM)include$(DELIM)nuttx$(DELIM)linker$(DELIM)zbus.ld

Review Comment:
   could we include a general ld here and let this general ld include zbus.ld? 
so, we can include new ld in the general file



##########
tools/Config.mk:
##########
@@ -861,3 +861,16 @@ LOWERMAP = A a B b C c D d E e F f G g H h I i J j K k L l 
M m N n O o P p Q q R
 
 UPPER_CASE = $(call ULMAP,$(UPPERMAP),$(1))
 LOWER_CASE = $(call ULMAP,$(LOWERMAP),$(1))
+
+# ZBus iterable sections "zero-touch" mode: supplement the board linker
+# script with the zbus sections via INSERT (see include/nuttx/linker/zbus.ld)
+# instead of requiring the board script to include common-rom.ld.
+#
+# The fragment is added through ARCHSCRIPT (not EXTRALINKCMDS) because GNU
+# ld requires the INSERT script to come BEFORE the script that defines the
+# target section on the command line; this file is included by the board
+# Make.defs before it appends its own script, so the fragment lands first.
+
+ifeq ($(CONFIG_ZBUS_LINKER_INSERT),y)

Review Comment:
   change to a general option and move to 
https://github.com/apache/nuttx/pull/19927



-- 
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