boards/risc-v: Replace board_app_initialize

Replaced board_app_initialize logic with board_late_initialize.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
This commit is contained in:
Matteo Golin
2026-02-18 23:20:09 -05:00
committed by Xiang Xiao
parent 945329efd0
commit 73e243584e
107 changed files with 305 additions and 2150 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ include $(TOPDIR)/Make.defs
CSRCS = bl602_bringup.c bl602_boot.c
ifeq ($(CONFIG_BOARDCTL),y)
CSRCS += bl602_appinit.c
CSRCS += bl602_boardctl.c
ifeq ($(CONFIG_BOARDCTL_RESET),y)
CSRCS += bl602_reset.c
endif
@@ -1,5 +1,5 @@
/****************************************************************************
* boards/risc-v/bl602/bl602evb/src/bl602_appinit.c
* boards/risc-v/bl602/bl602evb/src/bl602_boardctl.c
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -42,36 +42,6 @@
* Public Functions
****************************************************************************/
/****************************************************************************
* Name: board_app_initialize
*
* Description:
* Perform architecture specific initialization
*
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initialization logic and the
* matching application logic. The value could be such things as a
* mode enumeration value, a set of DIP switch switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
*
****************************************************************************/
int board_app_initialize(uintptr_t arg)
{
bl602_bringup();
return 0;
}
#ifdef CONFIG_BOARDCTL_IOCTL
int board_ioctl(unsigned int cmd, uintptr_t arg)
{
@@ -31,6 +31,8 @@
#include <nuttx/board.h>
#include <arch/board/board.h>
#include "bl602evb.h"
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
@@ -58,3 +60,29 @@ void bl602_boardinitialize(void)
{
}
/****************************************************************************
* Name: board_late_initialize
*
* Description:
* If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional
* initialization call will be performed in the boot-up sequence to a
* function called board_late_initialize(). board_late_initialize() will
* be called immediately after up_initialize() is called and just before
* the initial application is started. This additional initialization
* phase may be used, for example, to initialize board-specific device
* drivers.
*
* Input Parameters:
* None.
*
* Returned Value:
* None.
*
****************************************************************************/
#ifdef CONFIG_BOARD_LATE_INITIALIZE
void board_late_initialize(void)
{
bl602_bringup();
}
#endif
+1 -1
View File
@@ -24,6 +24,6 @@ include $(TOPDIR)/Make.defs
RCSRCS = etc/init.d/rc.sysinit etc/init.d/rcS
CSRCS = bl808_appinit.c bl808_autoleds.c bl808_userleds.c
CSRCS = bl808_boardinit.c bl808_autoleds.c bl808_userleds.c
include $(TOPDIR)/boards/Board.mk
@@ -1,5 +1,5 @@
/****************************************************************************
* boards/risc-v/bl808/ox64/src/bl808_appinit.c
* boards/risc-v/bl808/ox64/src/bl808_boardinit.c
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -110,44 +110,6 @@ static int mount_ramdisk(void)
* Public Functions
****************************************************************************/
/****************************************************************************
* Name: board_app_initialize
*
* Description:
* Perform architecture specific initialization
*
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initialization logic and the
* matching application logic. The value could be such things as a
* mode enumeration value, a set of DIP switch switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
*
****************************************************************************/
int board_app_initialize(uintptr_t arg)
{
#ifdef CONFIG_BOARD_LATE_INITIALIZE
/* Board initialization already performed by board_late_initialize() */
return OK;
#else
/* Perform board-specific initialization */
mount(NULL, "/proc", "procfs", 0, NULL);
return OK;
#endif
}
/****************************************************************************
* Name: board_late_initialize
*
@@ -167,6 +129,7 @@ int board_app_initialize(uintptr_t arg)
*
****************************************************************************/
#ifdef CONFIG_BOARD_LATE_INITIALIZE
void board_late_initialize(void)
{
/* Mount the RAM Disk */
@@ -229,3 +192,4 @@ void board_late_initialize(void)
}
#endif
}
#endif /* CONFIG_BOARD_LATE_INITIALIZE */
@@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs
CSRCS = c906_bringup.c c906_boot.c
ifeq ($(CONFIG_BOARDCTL),y)
CSRCS += c906_appinit.c
endif
ifeq ($(CONFIG_ARCH_LEDS),y)
CSRCS += c906_leds.c
endif
@@ -1,77 +0,0 @@
/****************************************************************************
* boards/risc-v/c906/smartl-c906/src/c906_appinit.c
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
****************************************************************************/
/****************************************************************************
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <stdbool.h>
#include <stdio.h>
#include <syslog.h>
#include <errno.h>
#include <nuttx/board.h>
#include "c906.h"
#include "smartl-c906.h"
/****************************************************************************
* Public Functions
****************************************************************************/
/****************************************************************************
* Name: board_app_initialize
*
* Description:
* Perform architecture specific initialization
*
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initialization logic and the
* matching application logic. The value could be such things as a
* mode enumeration value, a set of DIP switch switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
*
****************************************************************************/
int board_app_initialize(uintptr_t arg)
{
#ifdef CONFIG_BOARD_LATE_INITIALIZE
/* Board initialization already performed by board_late_initialize() */
return OK;
#else
/* Perform board-specific initialization */
return c906_bringup();
#endif
}
@@ -31,6 +31,8 @@
#include <nuttx/board.h>
#include <arch/board/board.h>
#include "smartl-c906.h"
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
@@ -58,3 +60,30 @@ void c906_boardinitialize(void)
{
board_autoled_initialize();
}
/****************************************************************************
* Name: board_late_initialize
*
* Description:
* If CONFIG_BOARD_LATE_INITIALIZE is selected, then an additional
* initialization call will be performed in the boot-up sequence to a
* function called board_late_initialize(). board_late_initialize() will
* be called immediately after up_initialize() is called and just before
* the initial application is started. This additional initialization
* phase may be used, for example, to initialize board-specific device
* drivers.
*
* Input Parameters:
* None.
*
* Returned Value:
* None.
*
****************************************************************************/
#ifdef CONFIG_BOARD_LATE_INITIALIZE
void board_late_initialize(void)
{
c906_bringup();
}
#endif
@@ -24,6 +24,6 @@ include $(TOPDIR)/Make.defs
RCSRCS = etc/init.d/rc.sysinit etc/init.d/rcS
CSRCS = eic7700x_appinit.c
CSRCS = eic7700x_boardinit.c
include $(TOPDIR)/boards/Board.mk
@@ -1,5 +1,5 @@
/****************************************************************************
* boards/risc-v/eic7700x/starpro64/src/eic7700x_appinit.c
* boards/risc-v/eic7700x/starpro64/src/eic7700x_boardinit.c
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -92,44 +92,6 @@ static int mount_ramdisk(void)
* Public Functions
****************************************************************************/
/****************************************************************************
* Name: board_app_initialize
*
* Description:
* Perform architecture specific initialization
*
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initialization logic and the
* matching application logic. The value could be such things as a
* mode enumeration value, a set of DIP switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
*
****************************************************************************/
int board_app_initialize(uintptr_t arg)
{
#ifdef CONFIG_BOARD_LATE_INITIALIZE
/* Board initialization already performed by board_late_initialize() */
return OK;
#else
/* Perform board-specific initialization */
mount(NULL, "/proc", "procfs", 0, NULL);
return OK;
#endif
}
/****************************************************************************
* Name: board_late_initialize
*
@@ -149,6 +111,7 @@ int board_app_initialize(uintptr_t arg)
*
****************************************************************************/
#ifdef CONFIG_BOARD_LATE_INITIALIZE
void board_late_initialize(void)
{
/* Mount the RAM Disk */
@@ -159,3 +122,4 @@ void board_late_initialize(void)
mount(NULL, "/proc", "procfs", 0, NULL);
}
#endif /* CONFIG_BOARD_LATE_INITIALIZE */
@@ -24,12 +24,8 @@ include $(TOPDIR)/Make.defs
CSRCS = esp32c3_boot.c esp32c3_bringup.c
ifeq ($(CONFIG_BOARDCTL),y)
CSRCS += esp32c3_appinit.c
ifeq ($(CONFIG_BOARDCTL_RESET),y)
CSRCS += esp32c3_reset.c
endif
ifeq ($(CONFIG_BOARDCTL_RESET),y)
CSRCS += esp32c3_reset.c
endif
ifeq ($(CONFIG_ARCH_LEDS),y)
@@ -70,9 +70,6 @@
* CONFIG_BOARD_LATE_INITIALIZE=y :
* Called from board_late_initialize().
*
* CONFIG_BOARD_LATE_INITIALIZE=y && CONFIG_BOARDCTL=y :
* Called from the NSH library via board_app_initialize()
*
****************************************************************************/
int esp32c3_bringup(void);
@@ -1,82 +0,0 @@
/****************************************************************************
* boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit-rust-1/src/esp32c3_appinit.c
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
****************************************************************************/
/****************************************************************************
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <sys/types.h>
#include <nuttx/board.h>
#include "esp32c3-legacy-devkit-rust-1.h"
#ifdef CONFIG_BOARDCTL
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/****************************************************************************
* Public Functions
****************************************************************************/
/****************************************************************************
* Name: board_app_initialize
*
* Description:
* Perform application specific initialization. This function is never
* called directly from application code, but only indirectly via the
* (non-standard) boardctl() interface using the command BOARDIOC_INIT.
*
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initialization logic and the
* matching application logic. The value could be such things as a
* mode enumeration value, a set of DIP switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
*
****************************************************************************/
int board_app_initialize(uintptr_t arg)
{
#ifdef CONFIG_BOARD_LATE_INITIALIZE
/* Board initialization already performed by board_late_initialize() */
return OK;
#else
/* Perform board-specific initialization */
return esp32c3_bringup();
#endif
}
#endif /* CONFIG_BOARDCTL */
@@ -28,6 +28,8 @@
#include <nuttx/arch.h>
#include <nuttx/board.h>
#include "esp32c3-legacy-devkit-rust-1.h"
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
@@ -24,12 +24,8 @@ include $(TOPDIR)/Make.defs
CSRCS = esp32c3_boot.c esp32c3_bringup.c
ifeq ($(CONFIG_BOARDCTL),y)
CSRCS += esp32c3_appinit.c
ifeq ($(CONFIG_BOARDCTL_RESET),y)
CSRCS += esp32c3_reset.c
endif
ifeq ($(CONFIG_BOARDCTL_RESET),y)
CSRCS += esp32c3_reset.c
endif
ifeq ($(CONFIG_DEV_GPIO),y)
@@ -66,9 +66,6 @@
* CONFIG_BOARD_LATE_INITIALIZE=y :
* Called from board_late_initialize().
*
* CONFIG_BOARD_LATE_INITIALIZE=y && CONFIG_BOARDCTL=y :
* Called from the NSH library via board_app_initialize()
*
****************************************************************************/
int esp32c3_bringup(void);
@@ -1,82 +0,0 @@
/****************************************************************************
* boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/src/esp32c3_appinit.c
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
****************************************************************************/
/****************************************************************************
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <sys/types.h>
#include <nuttx/board.h>
#include "esp32c3-legacy-devkit.h"
#ifdef CONFIG_BOARDCTL
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/****************************************************************************
* Public Functions
****************************************************************************/
/****************************************************************************
* Name: board_app_initialize
*
* Description:
* Perform application specific initialization. This function is never
* called directly from application code, but only indirectly via the
* (non-standard) boardctl() interface using the command BOARDIOC_INIT.
*
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initialization logic and the
* matching application logic. The value could be such things as a
* mode enumeration value, a set of DIP switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
*
****************************************************************************/
int board_app_initialize(uintptr_t arg)
{
#ifdef CONFIG_BOARD_LATE_INITIALIZE
/* Board initialization already performed by board_late_initialize() */
return OK;
#else
/* Perform board-specific initialization */
return esp32c3_bringup();
#endif
}
#endif /* CONFIG_BOARDCTL */
@@ -28,6 +28,8 @@
#include <nuttx/arch.h>
#include <nuttx/board.h>
#include "esp32c3-legacy-devkit.h"
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
@@ -23,8 +23,6 @@
set(SRCS esp32c3_boot.c esp32c3_bringup.c)
if(CONFIG_BOARDCTL)
list(APPEND SRCS esp32c3_appinit.c)
if(CONFIG_BOARDCTL_RESET)
list(APPEND SRCS esp32c3_reset.c)
endif()
@@ -24,12 +24,8 @@ include $(TOPDIR)/Make.defs
CSRCS = esp32c3_boot.c esp32c3_bringup.c
ifeq ($(CONFIG_BOARDCTL),y)
CSRCS += esp32c3_appinit.c
ifeq ($(CONFIG_BOARDCTL_RESET),y)
CSRCS += esp32c3_reset.c
endif
ifeq ($(CONFIG_BOARDCTL_RESET),y)
CSRCS += esp32c3_reset.c
endif
ifeq ($(CONFIG_DEV_GPIO),y)
@@ -69,9 +69,6 @@
* CONFIG_BOARD_LATE_INITIALIZE=y :
* Called from board_late_initialize().
*
* CONFIG_BOARD_LATE_INITIALIZE=y && CONFIG_BOARDCTL=y :
* Called from the NSH library via board_app_initialize().
*
* Input Parameters:
* None.
*
@@ -1,83 +0,0 @@
/****************************************************************************
* boards/risc-v/esp32c3/esp32-c3-zero/src/esp32c3_appinit.c
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
****************************************************************************/
/****************************************************************************
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <sys/types.h>
#include <nuttx/board.h>
#include "esp32-c3-zero.h"
#ifdef CONFIG_BOARDCTL
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/****************************************************************************
* Public Functions
****************************************************************************/
/****************************************************************************
* Name: board_app_initialize
*
* Description:
* Perform application specific initialization. This function is never
* called directly from application code, but only indirectly via the
* (non-standard) boardctl() interface using the command BOARDIOC_INIT.
*
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initialization logic and the
* matching application logic. The value could be such things as a
* mode enumeration value, a set of DIP switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
*
****************************************************************************/
int board_app_initialize(uintptr_t arg)
{
#ifdef CONFIG_BOARD_LATE_INITIALIZE
/* Board initialization already performed by board_late_initialize() */
return OK;
#else
/* Perform board-specific initialization */
return esp_bringup();
#endif
}
#endif /* CONFIG_BOARDCTL */
@@ -26,6 +26,8 @@
#include <nuttx/config.h>
#include "esp32-c3-zero.h"
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
@@ -164,9 +164,6 @@
* CONFIG_BOARD_LATE_INITIALIZE=y :
* Called from board_late_initialize().
*
* CONFIG_BOARD_LATE_INITIALIZE=y && CONFIG_BOARDCTL=y :
* Called from the NSH library via board_app_initialize().
*
* Input Parameters:
* None.
*
@@ -23,8 +23,6 @@
set(SRCS esp32c3_boot.c esp32c3_bringup.c)
if(CONFIG_BOARDCTL)
list(APPEND SRCS esp32c3_appinit.c)
if(CONFIG_BOARDCTL_RESET)
list(APPEND SRCS esp32c3_reset.c)
endif()
@@ -24,12 +24,8 @@ include $(TOPDIR)/Make.defs
CSRCS = esp32c3_boot.c esp32c3_bringup.c
ifeq ($(CONFIG_BOARDCTL),y)
CSRCS += esp32c3_appinit.c
ifeq ($(CONFIG_BOARDCTL_RESET),y)
CSRCS += esp32c3_reset.c
endif
ifeq ($(CONFIG_BOARDCTL_RESET),y)
CSRCS += esp32c3_reset.c
endif
ifeq ($(CONFIG_DEV_GPIO),y)
@@ -69,9 +69,6 @@
* CONFIG_BOARD_LATE_INITIALIZE=y :
* Called from board_late_initialize().
*
* CONFIG_BOARD_LATE_INITIALIZE=y && CONFIG_BOARDCTL=y :
* Called from the NSH library via board_app_initialize().
*
* Input Parameters:
* None.
*
@@ -1,83 +0,0 @@
/****************************************************************************
* boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_appinit.c
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
****************************************************************************/
/****************************************************************************
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <sys/types.h>
#include <nuttx/board.h>
#include "esp32c3-devkit.h"
#ifdef CONFIG_BOARDCTL
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/****************************************************************************
* Public Functions
****************************************************************************/
/****************************************************************************
* Name: board_app_initialize
*
* Description:
* Perform application specific initialization. This function is never
* called directly from application code, but only indirectly via the
* (non-standard) boardctl() interface using the command BOARDIOC_INIT.
*
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initialization logic and the
* matching application logic. The value could be such things as a
* mode enumeration value, a set of DIP switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
*
****************************************************************************/
int board_app_initialize(uintptr_t arg)
{
#ifdef CONFIG_BOARD_LATE_INITIALIZE
/* Board initialization already performed by board_late_initialize() */
return OK;
#else
/* Perform board-specific initialization */
return esp_bringup();
#endif
}
#endif /* CONFIG_BOARDCTL */
@@ -26,6 +26,8 @@
#include <nuttx/config.h>
#include "esp32c3-devkit.h"
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
@@ -155,9 +155,6 @@
* CONFIG_BOARD_LATE_INITIALIZE=y :
* Called from board_late_initialize().
*
* CONFIG_BOARD_LATE_INITIALIZE=y && CONFIG_BOARDCTL=y :
* Called from the NSH library via board_app_initialize().
*
* Input Parameters:
* None.
*
@@ -23,8 +23,6 @@
set(SRCS esp32c3_boot.c esp32c3_bringup.c)
if(CONFIG_BOARDCTL)
list(APPEND SRCS esp32c3_appinit.c)
if(CONFIG_BOARDCTL_RESET)
list(APPEND SRCS esp32c3_reset.c)
endif()
@@ -24,12 +24,8 @@ include $(TOPDIR)/Make.defs
CSRCS = esp32c3_boot.c esp32c3_bringup.c
ifeq ($(CONFIG_BOARDCTL),y)
CSRCS += esp32c3_appinit.c
ifeq ($(CONFIG_BOARDCTL_RESET),y)
CSRCS += esp32c3_reset.c
endif
ifeq ($(CONFIG_BOARDCTL_RESET),y)
CSRCS += esp32c3_reset.c
endif
ifeq ($(CONFIG_DEV_GPIO),y)
@@ -69,9 +69,6 @@
* CONFIG_BOARD_LATE_INITIALIZE=y :
* Called from board_late_initialize().
*
* CONFIG_BOARD_LATE_INITIALIZE=y && CONFIG_BOARDCTL=y :
* Called from the NSH library via board_app_initialize().
*
* Input Parameters:
* None.
*
@@ -1,83 +0,0 @@
/****************************************************************************
* boards/risc-v/esp32c3/esp32c3-xiao/src/esp32c3_appinit.c
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
****************************************************************************/
/****************************************************************************
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <sys/types.h>
#include <nuttx/board.h>
#include "esp32c3-xiao.h"
#ifdef CONFIG_BOARDCTL
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/****************************************************************************
* Public Functions
****************************************************************************/
/****************************************************************************
* Name: board_app_initialize
*
* Description:
* Perform application specific initialization. This function is never
* called directly from application code, but only indirectly via the
* (non-standard) boardctl() interface using the command BOARDIOC_INIT.
*
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initialization logic and the
* matching application logic. The value could be such things as a
* mode enumeration value, a set of DIP switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
*
****************************************************************************/
int board_app_initialize(uintptr_t arg)
{
#ifdef CONFIG_BOARD_LATE_INITIALIZE
/* Board initialization already performed by board_late_initialize() */
return OK;
#else
/* Perform board-specific initialization */
return esp_bringup();
#endif
}
#endif /* CONFIG_BOARDCTL */
@@ -26,6 +26,8 @@
#include <nuttx/config.h>
#include "esp32c3-xiao.h"
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
@@ -127,9 +127,6 @@
* CONFIG_BOARD_LATE_INITIALIZE=y :
* Called from board_late_initialize().
*
* CONFIG_BOARD_LATE_INITIALIZE=y && CONFIG_BOARDCTL=y :
* Called from the NSH library via board_app_initialize().
*
* Input Parameters:
* None.
*
@@ -23,8 +23,6 @@
set(SRCS esp32c6_boot.c esp32c6_bringup.c)
if(CONFIG_BOARDCTL)
list(APPEND SRCS esp32c6_appinit.c)
if(CONFIG_BOARDCTL_RESET)
list(APPEND SRCS esp32c6_reset.c)
endif()
@@ -24,12 +24,8 @@ include $(TOPDIR)/Make.defs
CSRCS = esp32c6_boot.c esp32c6_bringup.c
ifeq ($(CONFIG_BOARDCTL),y)
CSRCS += esp32c6_appinit.c
ifeq ($(CONFIG_BOARDCTL_RESET),y)
CSRCS += esp32c6_reset.c
endif
ifeq ($(CONFIG_BOARDCTL_RESET),y)
CSRCS += esp32c6_reset.c
endif
ifeq ($(CONFIG_DEV_GPIO),y)
@@ -69,9 +69,6 @@
* CONFIG_BOARD_LATE_INITIALIZE=y :
* Called from board_late_initialize().
*
* CONFIG_BOARD_LATE_INITIALIZE=y && CONFIG_BOARDCTL=y :
* Called from the NSH library via board_app_initialize().
*
* Input Parameters:
* None.
*
@@ -1,83 +0,0 @@
/****************************************************************************
* boards/risc-v/esp32c6/esp32c6-devkitc/src/esp32c6_appinit.c
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
****************************************************************************/
/****************************************************************************
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <sys/types.h>
#include <nuttx/board.h>
#include "esp32c6-devkitc.h"
#ifdef CONFIG_BOARDCTL
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/****************************************************************************
* Public Functions
****************************************************************************/
/****************************************************************************
* Name: board_app_initialize
*
* Description:
* Perform application specific initialization. This function is never
* called directly from application code, but only indirectly via the
* (non-standard) boardctl() interface using the command BOARDIOC_INIT.
*
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initialization logic and the
* matching application logic. The value could be such things as a
* mode enumeration value, a set of DIP switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
*
****************************************************************************/
int board_app_initialize(uintptr_t arg)
{
#ifdef CONFIG_BOARD_LATE_INITIALIZE
/* Board initialization already performed by board_late_initialize() */
return OK;
#else
/* Perform board-specific initialization */
return esp_bringup();
#endif
}
#endif /* CONFIG_BOARDCTL */
@@ -173,9 +173,6 @@
* CONFIG_BOARD_LATE_INITIALIZE=y :
* Called from board_late_initialize().
*
* CONFIG_BOARD_LATE_INITIALIZE=y && CONFIG_BOARDCTL=y :
* Called from the NSH library via board_app_initialize().
*
* Input Parameters:
* None.
*
@@ -23,8 +23,6 @@
set(SRCS esp32c6_boot.c esp32c6_bringup.c)
if(CONFIG_BOARDCTL)
list(APPEND SRCS esp32c6_appinit.c)
if(CONFIG_BOARDCTL_RESET)
list(APPEND SRCS esp32c6_reset.c)
endif()
@@ -24,12 +24,8 @@ include $(TOPDIR)/Make.defs
CSRCS = esp32c6_boot.c esp32c6_bringup.c
ifeq ($(CONFIG_BOARDCTL),y)
CSRCS += esp32c6_appinit.c
ifeq ($(CONFIG_BOARDCTL_RESET),y)
CSRCS += esp32c6_reset.c
endif
ifeq ($(CONFIG_BOARDCTL_RESET),y)
CSRCS += esp32c6_reset.c
endif
ifeq ($(CONFIG_DEV_GPIO),y)
@@ -69,9 +69,6 @@
* CONFIG_BOARD_LATE_INITIALIZE=y :
* Called from board_late_initialize().
*
* CONFIG_BOARD_LATE_INITIALIZE=y && CONFIG_BOARDCTL=y :
* Called from the NSH library via board_app_initialize().
*
* Input Parameters:
* None.
*
@@ -1,83 +0,0 @@
/****************************************************************************
* boards/risc-v/esp32c6/esp32c6-devkitm/src/esp32c6_appinit.c
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
****************************************************************************/
/****************************************************************************
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <sys/types.h>
#include <nuttx/board.h>
#include "esp32c6-devkitm.h"
#ifdef CONFIG_BOARDCTL
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/****************************************************************************
* Public Functions
****************************************************************************/
/****************************************************************************
* Name: board_app_initialize
*
* Description:
* Perform application specific initialization. This function is never
* called directly from application code, but only indirectly via the
* (non-standard) boardctl() interface using the command BOARDIOC_INIT.
*
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initialization logic and the
* matching application logic. The value could be such things as a
* mode enumeration value, a set of DIP switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
*
****************************************************************************/
int board_app_initialize(uintptr_t arg)
{
#ifdef CONFIG_BOARD_LATE_INITIALIZE
/* Board initialization already performed by board_late_initialize() */
return OK;
#else
/* Perform board-specific initialization */
return esp_bringup();
#endif
}
#endif /* CONFIG_BOARDCTL */
@@ -138,9 +138,6 @@
* CONFIG_BOARD_LATE_INITIALIZE=y :
* Called from board_late_initialize().
*
* CONFIG_BOARD_LATE_INITIALIZE=y && CONFIG_BOARDCTL=y :
* Called from the NSH library via board_app_initialize().
*
* Input Parameters:
* None.
*
@@ -23,8 +23,6 @@
set(SRCS esp32c6_boot.c esp32c6_bringup.c)
if(CONFIG_BOARDCTL)
list(APPEND SRCS esp32c6_appinit.c)
if(CONFIG_BOARDCTL_RESET)
list(APPEND SRCS esp32c6_reset.c)
endif()
@@ -24,12 +24,8 @@ include $(TOPDIR)/Make.defs
CSRCS = esp32c6_boot.c esp32c6_bringup.c
ifeq ($(CONFIG_BOARDCTL),y)
CSRCS += esp32c6_appinit.c
ifeq ($(CONFIG_BOARDCTL_RESET),y)
CSRCS += esp32c6_reset.c
endif
ifeq ($(CONFIG_BOARDCTL_RESET),y)
CSRCS += esp32c6_reset.c
endif
ifeq ($(CONFIG_DEV_GPIO),y)
@@ -69,9 +69,6 @@
* CONFIG_BOARD_LATE_INITIALIZE=y :
* Called from board_late_initialize().
*
* CONFIG_BOARD_LATE_INITIALIZE=y && CONFIG_BOARDCTL=y :
* Called from the NSH library via board_app_initialize().
*
* Input Parameters:
* None.
*
@@ -1,83 +0,0 @@
/****************************************************************************
* boards/risc-v/esp32c6/esp32c6-xiao/src/esp32c6_appinit.c
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
****************************************************************************/
/****************************************************************************
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include <sys/types.h>
#include <nuttx/board.h>
#include "esp32c6-xiao.h"
#ifdef CONFIG_BOARDCTL
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/****************************************************************************
* Public Functions
****************************************************************************/
/****************************************************************************
* Name: board_app_initialize
*
* Description:
* Perform application specific initialization. This function is never
* called directly from application code, but only indirectly via the
* (non-standard) boardctl() interface using the command BOARDIOC_INIT.
*
* Input Parameters:
* arg - The boardctl() argument is passed to the board_app_initialize()
* implementation without modification. The argument has no
* meaning to NuttX; the meaning of the argument is a contract
* between the board-specific initialization logic and the
* matching application logic. The value could be such things as a
* mode enumeration value, a set of DIP switch settings, a
* pointer to configuration data read from a file or serial FLASH,
* or whatever you would like to do with it. Every implementation
* should accept zero/NULL as a default configuration.
*
* Returned Value:
* Zero (OK) is returned on success; a negated errno value is returned on
* any failure to indicate the nature of the failure.
*
****************************************************************************/
int board_app_initialize(uintptr_t arg)
{
#ifdef CONFIG_BOARD_LATE_INITIALIZE
/* Board initialization already performed by board_late_initialize() */
return OK;
#else
/* Perform board-specific initialization */
return esp_bringup();
#endif
}
#endif /* CONFIG_BOARDCTL */

Some files were not shown because too many files have changed in this diff Show More