[PATCH 01/47] bsps/arm: Use shared empty bsp_start_hook_0()

Sebastian Huber sebastian.huber at embedded-brains.de
Thu Dec 21 14:37:34 UTC 2023


---
 bsps/arm/beagle/start/bspstarthooks.c         |  4 --
 bsps/arm/lm3s69xx/start/bspstarthook.c        |  5 ---
 bsps/arm/shared/start/bspstarthook0-empty.c   | 42 +++++++++++++++++++
 bsps/arm/stm32f4/start/bspstarthook.c         |  5 ---
 bsps/arm/tms570/start/bspstarthooks.c         |  5 ---
 bsps/arm/xen/start/bspstarthooks.c            |  5 ---
 bsps/arm/xilinx-zynqmp/start/bspstarthooks.c  |  5 ---
 spec/build/bsps/arm/beagle/obj.yml            |  1 +
 spec/build/bsps/arm/lm3s69xx/obj.yml          |  1 +
 spec/build/bsps/arm/stm32f4/obj.yml           |  1 +
 spec/build/bsps/arm/tms570/objnohwinit.yml    |  1 +
 spec/build/bsps/arm/xen/bspxen.yml            |  1 +
 .../arm/xilinx-zynqmp/bspxilinxzynqmp.yml     |  1 +
 13 files changed, 48 insertions(+), 29 deletions(-)
 create mode 100644 bsps/arm/shared/start/bspstarthook0-empty.c

diff --git a/bsps/arm/beagle/start/bspstarthooks.c b/bsps/arm/beagle/start/bspstarthooks.c
index e3c380cfb1..69d5256f52 100644
--- a/bsps/arm/beagle/start/bspstarthooks.c
+++ b/bsps/arm/beagle/start/bspstarthooks.c
@@ -29,10 +29,6 @@
 #include <bsp/start.h>
 #include <bsp/arm-cp15-start.h>
 
-BSP_START_TEXT_SECTION void bsp_start_hook_0(void)
-{
-}
-
 BSP_START_TEXT_SECTION void bsp_start_hook_1(void)
 {
   bsp_start_copy_sections();
diff --git a/bsps/arm/lm3s69xx/start/bspstarthook.c b/bsps/arm/lm3s69xx/start/bspstarthook.c
index af6a4c4e1e..14cd554117 100644
--- a/bsps/arm/lm3s69xx/start/bspstarthook.c
+++ b/bsps/arm/lm3s69xx/start/bspstarthook.c
@@ -9,11 +9,6 @@
 #include <bsp.h>
 #include <bsp/start.h>
 
-void BSP_START_TEXT_SECTION bsp_start_hook_0(void)
-{
-  /* Do nothing */
-}
-
 void BSP_START_TEXT_SECTION bsp_start_hook_1(void)
 {
   bsp_start_copy_sections();
diff --git a/bsps/arm/shared/start/bspstarthook0-empty.c b/bsps/arm/shared/start/bspstarthook0-empty.c
new file mode 100644
index 0000000000..65e2efcf03
--- /dev/null
+++ b/bsps/arm/shared/start/bspstarthook0-empty.c
@@ -0,0 +1,42 @@
+/* SPDX-License-Identifier: BSD-2-Clause */
+
+/**
+ * @file
+ *
+ * @ingroup RTEMSBSPsARMShared
+ *
+ * @brief This source file contains a bsp_start_hook_0() implentation which
+ *  does nothing.
+ */
+
+/*
+ * Copyright (C) 2023 embedded brains GmbH & Co. KG
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <bsp/start.h>
+
+void BSP_START_TEXT_SECTION bsp_start_hook_0( void )
+{
+  /* Do nothing */
+}
diff --git a/bsps/arm/stm32f4/start/bspstarthook.c b/bsps/arm/stm32f4/start/bspstarthook.c
index bbfaed615e..21a9189f26 100644
--- a/bsps/arm/stm32f4/start/bspstarthook.c
+++ b/bsps/arm/stm32f4/start/bspstarthook.c
@@ -9,11 +9,6 @@
 #include <bsp.h>
 #include <bsp/start.h>
 
-void BSP_START_TEXT_SECTION bsp_start_hook_0(void)
-{
-  /* Do nothing */
-}
-
 void BSP_START_TEXT_SECTION bsp_start_hook_1(void)
 {
   bsp_start_copy_sections();
diff --git a/bsps/arm/tms570/start/bspstarthooks.c b/bsps/arm/tms570/start/bspstarthooks.c
index f6bf19c754..e7722ab698 100644
--- a/bsps/arm/tms570/start/bspstarthooks.c
+++ b/bsps/arm/tms570/start/bspstarthooks.c
@@ -27,11 +27,6 @@
 #include <bsp.h>
 #include <bsp/start.h>
 
-BSP_START_TEXT_SECTION void bsp_start_hook_0( void )
-{
-  ;
-}
-
 BSP_START_TEXT_SECTION void bsp_start_hook_1( void )
 {
   bsp_start_copy_sections();
diff --git a/bsps/arm/xen/start/bspstarthooks.c b/bsps/arm/xen/start/bspstarthooks.c
index a9e1fbbfb1..6f0e4c3d0c 100644
--- a/bsps/arm/xen/start/bspstarthooks.c
+++ b/bsps/arm/xen/start/bspstarthooks.c
@@ -29,11 +29,6 @@
 #include <bsp.h>
 #include <bsp/start.h>
 
-BSP_START_TEXT_SECTION void bsp_start_hook_0(void)
-{
-  /* Do nothing */
-}
-
 BSP_START_TEXT_SECTION void bsp_start_hook_1(void)
 {
   bsp_start_copy_sections();
diff --git a/bsps/arm/xilinx-zynqmp/start/bspstarthooks.c b/bsps/arm/xilinx-zynqmp/start/bspstarthooks.c
index dc414ffb3a..fba23515f7 100644
--- a/bsps/arm/xilinx-zynqmp/start/bspstarthooks.c
+++ b/bsps/arm/xilinx-zynqmp/start/bspstarthooks.c
@@ -33,11 +33,6 @@
 #include <bsp.h>
 #include <bsp/start.h>
 
-BSP_START_TEXT_SECTION void bsp_start_hook_0(void)
-{
-  /* Nothing to do */
-}
-
 BSP_START_TEXT_SECTION void bsp_start_hook_1(void)
 {
   bsp_start_copy_sections();
diff --git a/spec/build/bsps/arm/beagle/obj.yml b/spec/build/bsps/arm/beagle/obj.yml
index 5660b968f4..0f2f354ab9 100644
--- a/spec/build/bsps/arm/beagle/obj.yml
+++ b/spec/build/bsps/arm/beagle/obj.yml
@@ -47,6 +47,7 @@ source:
 - bsps/arm/shared/cp15/arm-cp15-set-exception-handler.c
 - bsps/arm/shared/cp15/arm-cp15-set-ttb-entries.c
 - bsps/arm/shared/start/bsp-start-memcpy.S
+- bsps/arm/shared/start/bspstarthook0-empty.c
 - bsps/shared/dev/btimer/btimer-cpucounter.c
 - bsps/shared/dev/cpucounter/cpucounterfrequency.c
 - bsps/shared/dev/cpucounter/cpucounterread.c
diff --git a/spec/build/bsps/arm/lm3s69xx/obj.yml b/spec/build/bsps/arm/lm3s69xx/obj.yml
index 98bd344fe9..19f0e15bb7 100644
--- a/spec/build/bsps/arm/lm3s69xx/obj.yml
+++ b/spec/build/bsps/arm/lm3s69xx/obj.yml
@@ -38,6 +38,7 @@ source:
 - bsps/arm/shared/irq/irq-dispatch-armv7m.c
 - bsps/arm/shared/start/bsp-start-memcpy.S
 - bsps/arm/shared/start/bspreset-armv7m.c
+- bsps/arm/shared/start/bspstarthook0-empty.c
 - bsps/shared/cache/nocache.c
 - bsps/shared/dev/btimer/btimer-cpucounter.c
 - bsps/shared/dev/cpucounter/cpucounterfrequency.c
diff --git a/spec/build/bsps/arm/stm32f4/obj.yml b/spec/build/bsps/arm/stm32f4/obj.yml
index d879287d1d..f895299d1a 100644
--- a/spec/build/bsps/arm/stm32f4/obj.yml
+++ b/spec/build/bsps/arm/stm32f4/obj.yml
@@ -43,6 +43,7 @@ source:
 - bsps/arm/shared/irq/irq-armv7m.c
 - bsps/arm/shared/irq/irq-dispatch-armv7m.c
 - bsps/arm/shared/start/bsp-start-memcpy.S
+- bsps/arm/shared/start/bspstarthook0-empty.c
 - bsps/arm/stm32f4/console/console-config.c
 - bsps/arm/stm32f4/console/usart.c
 - bsps/arm/stm32f4/i2c/i2c-config.c
diff --git a/spec/build/bsps/arm/tms570/objnohwinit.yml b/spec/build/bsps/arm/tms570/objnohwinit.yml
index c34432f38b..0d122b7d98 100644
--- a/spec/build/bsps/arm/tms570/objnohwinit.yml
+++ b/spec/build/bsps/arm/tms570/objnohwinit.yml
@@ -11,5 +11,6 @@ includes: []
 install: []
 links: []
 source:
+- bsps/arm/shared/start/bspstarthook0-empty.c
 - bsps/arm/tms570/start/bspstarthooks.c
 type: build
diff --git a/spec/build/bsps/arm/xen/bspxen.yml b/spec/build/bsps/arm/xen/bspxen.yml
index eb4b681fc7..fd5d519083 100644
--- a/spec/build/bsps/arm/xen/bspxen.yml
+++ b/spec/build/bsps/arm/xen/bspxen.yml
@@ -65,6 +65,7 @@ source:
 - bsps/arm/shared/cp15/arm-cp15-set-exception-handler.c
 - bsps/arm/shared/cp15/arm-cp15-set-ttb-entries.c
 - bsps/arm/shared/start/bsp-start-memcpy.S
+- bsps/arm/shared/start/bspstarthook0-empty.c
 - bsps/arm/xen/console/console.c
 - bsps/arm/xen/start/bspstart.c
 - bsps/arm/xen/start/bspstarthooks.c
diff --git a/spec/build/bsps/arm/xilinx-zynqmp/bspxilinxzynqmp.yml b/spec/build/bsps/arm/xilinx-zynqmp/bspxilinxzynqmp.yml
index 2b0e162964..53c5b4d7d2 100644
--- a/spec/build/bsps/arm/xilinx-zynqmp/bspxilinxzynqmp.yml
+++ b/spec/build/bsps/arm/xilinx-zynqmp/bspxilinxzynqmp.yml
@@ -87,6 +87,7 @@ source:
 - bsps/arm/shared/cp15/arm-cp15-set-exception-handler.c
 - bsps/arm/shared/cp15/arm-cp15-set-ttb-entries.c
 - bsps/arm/shared/start/bsp-start-memcpy.S
+- bsps/arm/shared/start/bspstarthook0-empty.c
 - bsps/arm/xilinx-zynqmp/console/console-config.c
 - bsps/arm/xilinx-zynqmp/start/bspreset.c
 - bsps/arm/xilinx-zynqmp/start/bspstart.c
-- 
2.35.3



More information about the devel mailing list