diff --git a/.codespell-ignore-lines b/.codespell-ignore-lines index b3cf3e346d21c..9e5f1a392d112 100644 --- a/.codespell-ignore-lines +++ b/.codespell-ignore-lines @@ -178,3 +178,4 @@ libs/libc/tre-mem.c #define RTPROT_RA 9 /* RDISC/ND router advertisements */ /* Followed by one or more ND options */ * message using the Neighbor Discovery (ND) protocol. It then listens +PIO DUE SCHEM. PIN MAPPING SAM3X DUE SCHEM. BOARD LABEL diff --git a/Documentation/applications/examples/lvglterm/index.rst b/Documentation/applications/examples/lvglterm/index.rst index 3825fa2ff1c09..a6547069119b6 100644 --- a/Documentation/applications/examples/lvglterm/index.rst +++ b/Documentation/applications/examples/lvglterm/index.rst @@ -6,7 +6,6 @@ LVGL application that executes NuttShell (NSH) commands entered with a Touchscreen Keyboard and displays the NSH output. Prerequisite configuration settings: -- ``CONFIG_NSH_ARCHINIT=n`` – NSH architecture initialization must be disabled. - ``CONFIG_NSH_CONSOLE=y`` – NSH must be configured to use a console. - ``CONFIG_LIBC_EXECFUNCS=y`` – posix_spawn() must be enabled. - ``CONFIG_PIPES=y`` – Pipes must be enabled. diff --git a/Documentation/applications/nsh/config.rst b/Documentation/applications/nsh/config.rst index e28027797cc73..ce61947209a65 100644 --- a/Documentation/applications/nsh/config.rst +++ b/Documentation/applications/nsh/config.rst @@ -374,12 +374,6 @@ Configuration Description ``CONFIG_NSH_TELNET`` If ``CONFIG_NSH_TELNET`` is set to *y*, then a TELNET server front-end is selected. When this option is provided, you may log into NuttX remotely using telnet in order to access NSH. - - ``CONFIG_NSH_ARCHINIT`` Set ``CONFIG_NSH_ARCHINIT`` if your board provides architecture - specific initialization via the board-specific function - ``board_app_initialize()``. This function will be called early in - NSH initialization to allow board logic to do such things as - configure MMC/SD slots. =================================== ================================== .. _nsh_vars_table: diff --git a/Documentation/applications/nsh/customizing.rst b/Documentation/applications/nsh/customizing.rst index ca2d305ff8c25..bab4dc3882bb5 100644 --- a/Documentation/applications/nsh/customizing.rst +++ b/Documentation/applications/nsh/customizing.rst @@ -108,13 +108,6 @@ The NSH initialization function, ``nsh_initialize()``, be found in ``apps/nshlib/rc.sysinit.template``. The resulting ROMFS file system can be found in ``apps/nshlib/nsh_romfsimg.h``. - #. ``board_app_initialize()``: Next any architecture-specific NSH - initialization will be performed (if any). For the STM3240G-EVAL, - this architecture specific initialization can be found at - ``boards/arm/stm32/stm3240g-eval/src/stm32_appinit.c``. This it does - things like: (1) Initialize SPI devices, (2) Initialize SDIO, and (3) - mount any SD cards that may be inserted. - #. ``nsh_netinit()``: The ``nsh_netinit()`` function can be found in ``apps/nshlib/nsh_netinit.c``. diff --git a/Documentation/applications/nsh/installation.rst b/Documentation/applications/nsh/installation.rst index 2e37d248b5b56..49a5cc289629b 100644 --- a/Documentation/applications/nsh/installation.rst +++ b/Documentation/applications/nsh/installation.rst @@ -6,11 +6,6 @@ Customizing NSH Initialization customize the NSH start-up behavior. Here they are presented in order of increasing difficulty: - #. You can extend the initialization logic in - ``boards/arm/stm32/stm3240g-eval/src/stm32_appinit.c``. The logic - there is called each time that NSH is started and is good place in - particular for any device-related initialization. - #. You replace the sample code at ``apps/examples/nsh/nsh_main.c`` with whatever start-up logic that you want. NSH is a library at ``apps/nshlib``. ``apps.examples/nsh`` is just a tiny, example diff --git a/Documentation/components/drivers/character/timers/timer.rst b/Documentation/components/drivers/character/timers/timer.rst index 679d539916e84..dc562eddea2ee 100644 --- a/Documentation/components/drivers/character/timers/timer.rst +++ b/Documentation/components/drivers/character/timers/timer.rst @@ -498,8 +498,7 @@ To enable this feature, set the following configuration options: CONFIG_TIMER=y CONFIG_TIMER_WDOG=y -Then call ``timer_wdog_initialize()`` from your board initialization code -(typically in ``board_late_initialize()`` or ``board_app_initialize()``): +Then call ``timer_wdog_initialize()`` from your board initialization code. .. code-block:: c diff --git a/Documentation/components/drivers/special/usbhost.rst b/Documentation/components/drivers/special/usbhost.rst index a44494ae6567b..b4e274686264c 100644 --- a/Documentation/components/drivers/special/usbhost.rst +++ b/Documentation/components/drivers/special/usbhost.rst @@ -8,7 +8,7 @@ USB Host-Side Drivers ``struct usbhost_connection_s`` defined in ``include/nuttx/usb/usbhost.h``. - - ``struct usbhost_driver_s`` provides the interface between + - ``struct usbhost_driver_s`` provides the interface between the USB host driver and the USB host class driver. - ``struct usbhost_connection_s`` provides the interface between @@ -91,9 +91,6 @@ USB Host-Side Drivers registered USB host class driver to the USB host controller driver. - **Examples**: The function ``nsh_waiter()`` in the file - ``boards/arm/lpc17xx_40xx/olimex-lpc1766stk/src/lpc17_40_appinit.c``. - #. As part of its operation during the binding operation, the USB host class driver will register an instances of a standard NuttX driver under the ``/dev`` directory. To diff --git a/Documentation/faq/index.rst b/Documentation/faq/index.rst index 1347df2c3a048..f832292e2d5bf 100644 --- a/Documentation/faq/index.rst +++ b/Documentation/faq/index.rst @@ -149,12 +149,10 @@ Why after putting my application on ENTRYPOINT it stops to work? ---------------------------------------------------------------- When you replace the ENTRYPOINT from "nsh_main" to your application some -initialization flow are changed, for instance the NSH_ARCHINIT is not -executed anymore and so some drivers initialization that are called from -it also stops to work. +initialization flow are changed. -You can fix it enabling the Board Late Initialization that will replace the -NSH_ARCHINIT to call those drivers initialization. Just enable it:: +You can fix it enabling the Board Late Initialization that will +perform driver initialization. Just enable it:: RTOS Features ---> RTOS hooks ---> diff --git a/Documentation/guides/protected_build.rst b/Documentation/guides/protected_build.rst index c5ad95e06d9d8..e2a60713a3ae8 100644 --- a/Documentation/guides/protected_build.rst +++ b/Documentation/guides/protected_build.rst @@ -3,24 +3,24 @@ NuttX Protected Build ===================== .. warning:: - Migrated from : + Migrated from : https://cwiki.apache.org/confluence/display/NUTTX/NuttX+Protected+Build The Traditional "Flat" Build ============================ -The traditional NuttX build is a "flat" build. By flat, I mean that when -you build NuttX, you end up with a single "blob" called ``nuttx``. All of the -components of the build reside in the same address space. All components +The traditional NuttX build is a "flat" build. By flat, I mean that when +you build NuttX, you end up with a single "blob" called ``nuttx``. All of the +components of the build reside in the same address space. All components of the build can access all other components of the build. The "Two Pass" Protected Build ============================== -The NuttX protected build, on the other hand, is a "two-pass" build and -generates two "blobs": (1) a separately compiled and linked `kernel` blob -called, again, `nuttx` and separately compiled and linked `user` blob called -in ``nuttx_user.elf`` (in the existing build configurations). The user blob +The NuttX protected build, on the other hand, is a "two-pass" build and +generates two "blobs": (1) a separately compiled and linked `kernel` blob +called, again, `nuttx` and separately compiled and linked `user` blob called +in ``nuttx_user.elf`` (in the existing build configurations). The user blob is created on pass 1 and the kernel blob is created on pass2. These two make commands are identical: @@ -30,10 +30,10 @@ These two make commands are identical: make make pass1 pass2 -But the second is clearer and I prefer to use it for the protected build. -In the second case, the user and kernel blobs are built separately; in the -first, the kernel and user blob builds may be intermixed and somewhat -confusing. You can also build the kernel and user blobs separately with +But the second is clearer and I prefer to use it for the protected build. +In the second case, the user and kernel blobs are built separately; in the +first, the kernel and user blob builds may be intermixed and somewhat +confusing. You can also build the kernel and user blobs separately with one of the following commands: .. code-block:: bash @@ -56,46 +56,46 @@ From Pass 2: The Memory Protection Unit ========================== -If the MCU supports a Memory Protection Unit (MPU), then the logic within -the kernel blob all execute in kernel-mode, i.e., with all privileges. -These privileged threads can access all memory, all CPU instructions, -and all MCU registers. The logic executing within the user-mode blob, -on the other hand, all execute in user-mode with certain restrictions -as enforced by the MCU and by the MPU. The MCU may restrict access to -certain registers and machine instructions; with the MPU, access to all -kernel memory resources are prohibited from the user logic. This includes +If the MCU supports a Memory Protection Unit (MPU), then the logic within +the kernel blob all execute in kernel-mode, i.e., with all privileges. +These privileged threads can access all memory, all CPU instructions, +and all MCU registers. The logic executing within the user-mode blob, +on the other hand, all execute in user-mode with certain restrictions +as enforced by the MCU and by the MPU. The MCU may restrict access to +certain registers and machine instructions; with the MPU, access to all +kernel memory resources are prohibited from the user logic. This includes the kernel blob's FLASH, .bss/.data storage, and the kernel heap memory. Advantages of the Protected Build ================================= -The advantages of such a protected build are (1) security and (2) -modularity. Since the kernel resources are protected, it will be much -less likely that a misbehaving task will crash the system or that a -wild pointer access will corrupt critical memory. This security also -provides a safer environment in which to execute 3rd party software +The advantages of such a protected build are (1) security and (2) +modularity. Since the kernel resources are protected, it will be much +less likely that a misbehaving task will crash the system or that a +wild pointer access will corrupt critical memory. This security also +provides a safer environment in which to execute 3rd party software and prevents "snooping" into the kernel memory from the hosted applications. -Modularity is assured because there is a strict control of the exposed -kernel interfaces. In the flat build, all symbols are exposed and there -is no enforcement of a kernel API. With the protected build, on the -other hand, all interactions with the kernel from the user application -logic must use `system calls` (or `syscalls`) to interface with the OS. A -system call is necessary to transition from user-mode to kernel-mode; -all user-space operating system interfaces are via syscall `proxies`. -Then, while in kernel mode, the kernel system call handler will -perform the OS service requested by the application. At the -conclusion of system processing, user-privileges are restored -and control is return to the user application. Since the only -interactions with the kernel can be through support system calls, +Modularity is assured because there is a strict control of the exposed +kernel interfaces. In the flat build, all symbols are exposed and there +is no enforcement of a kernel API. With the protected build, on the +other hand, all interactions with the kernel from the user application +logic must use `system calls` (or `syscalls`) to interface with the OS. A +system call is necessary to transition from user-mode to kernel-mode; +all user-space operating system interfaces are via syscall `proxies`. +Then, while in kernel mode, the kernel system call handler will +perform the OS service requested by the application. At the +conclusion of system processing, user-privileges are restored +and control is return to the user application. Since the only +interactions with the kernel can be through support system calls, modularity of the OS is guaranteed. User-Space Proxies/Kernel-Space Stubs ===================================== -The same OS interfaces are exposed to the application in both the "flat" -build and the protected build. The difference is that in the protected -build, the user-code interfaces with a `proxy` for the OS function. For +The same OS interfaces are exposed to the application in both the "flat" +build and the protected build. The difference is that in the protected +build, the user-code interfaces with a `proxy` for the OS function. For example, here is what a proxy for the OS ``getpid()`` interface: .. code-block:: c @@ -107,26 +107,26 @@ example, here is what a proxy for the OS ``getpid()`` interface: return (pid_t)sys_call0(SYS_getpid); } -Thus the ``getpid()`` proxy is a stand-in for the real OS ``getpid()`` interface -that executes a system call so the kernel code can perform the real -``getpid()`` operation on behalf of the user application. Proxies are -auto-generated for all exported OS interfaces using the CSV file -``syscall/syscall.csv`` and the program ``tools/mksyscalls``. Similarly, -on the kernel-side, there are auto-generated `stubs` that map the -system calls back into real OS calls. These, however, are internal -to the OS and the implementation may be architecture-specific. +Thus the ``getpid()`` proxy is a stand-in for the real OS ``getpid()`` interface +that executes a system call so the kernel code can perform the real +``getpid()`` operation on behalf of the user application. Proxies are +auto-generated for all exported OS interfaces using the CSV file +``syscall/syscall.csv`` and the program ``tools/mksyscalls``. Similarly, +on the kernel-side, there are auto-generated `stubs` that map the +system calls back into real OS calls. These, however, are internal +to the OS and the implementation may be architecture-specific. See the ``README.txt`` files in those directories for further information. Combining Intel HEX Files ========================= -One issue that you may face is that the two pass builds creates two -FLASH images. Some debuggers that I use will allow me to write each -image to FLASH separately. Others will expect to have a single Intel -HEX image. In this latter case, you may need to combine the two Intel +One issue that you may face is that the two pass builds creates two +FLASH images. Some debuggers that I use will allow me to write each +image to FLASH separately. Others will expect to have a single Intel +HEX image. In this latter case, you may need to combine the two Intel HEX files into one. Here is how you can do that: -1) The `tail` of the ``nuttx.hex`` file should look something like this +1) The `tail` of the ``nuttx.hex`` file should look something like this (with my comments and spaces added): .. code-block:: bash @@ -144,10 +144,10 @@ HEX files into one. Here is how you can do that: Use an editor such as vi to remove the 05 and 01 records. -2) The `head` of the ``nuttx_user.hex`` file should look something like this +2) The `head` of the ``nuttx_user.hex`` file should look something like this (again with my comments and spaces added): -.. code-block:: bash +.. code-block:: bash $ head nuttx_user.hex # 04, Extended Linear Address Record @@ -160,94 +160,94 @@ Use an editor such as vi to remove the 05 and 01 records. Nothing needs to be done here. The ``nuttx_user.hex`` file should be fine. -3) Combine the edited nuttx.hex and un-edited ``nuttx_user.hex`` file to produce +3) Combine the edited nuttx.hex and un-edited ``nuttx_user.hex`` file to produce a single combined hex file: .. code-block:: bash $ cat nuttx.hex nuttx_user.hex >combined.hex -Then use the ``combined.hex`` file with for FLASH/JTAG tool. If you do this -a lot, you will probably want to invest a little time to develop a tool +Then use the ``combined.hex`` file with for FLASH/JTAG tool. If you do this +a lot, you will probably want to invest a little time to develop a tool to automate these steps. Files and Directories ===================== -Here is a summary of directories and files used by the STM32F4Discovery +Here is a summary of directories and files used by the STM32F4Discovery protected build: -* ``boards/arm/stm32/stm32f4discovery/configs/kostest``. This is the kernel - mode OS test configuration. The two standard configuration files +* ``boards/arm/stm32/stm32f4discovery/configs/kostest``. This is the kernel + mode OS test configuration. The two standard configuration files can be found in this directory: (1) ``defconfig`` and (2) ``Make.defs``. -* ``boards/arm/stm32/stm32f4discovery/kernel``. This is the first past - build directory. The Makefile in this directory is invoked to - produce the pass1 object (``nuttx_user.elf`` in this case). The - second pass object is created by ``arch/arm/src/Makefile``. Also - in this directory is the file ``userspace.c``. The user-mode blob - contains a header that includes information need by the kernel - blob in order to interface with the user-code. That header is +* ``boards/arm/stm32/stm32f4discovery/kernel``. This is the first past + build directory. The Makefile in this directory is invoked to + produce the pass1 object (``nuttx_user.elf`` in this case). The + second pass object is created by ``arch/arm/src/Makefile``. Also + in this directory is the file ``userspace.c``. The user-mode blob + contains a header that includes information need by the kernel + blob in order to interface with the user-code. That header is defined in by this file. -* ``boards/arm/stm32/stm32f4discovery/scripts``. Linker scripts for - the kernel mode build are found in this directory. This includes - (1) ``memory.ld`` which hold the common memory map, (2) ``user-space.ld`` - that is used for linking the pass1 user-mode blob, and (3) +* ``boards/arm/stm32/stm32f4discovery/scripts``. Linker scripts for + the kernel mode build are found in this directory. This includes + (1) ``memory.ld`` which hold the common memory map, (2) ``user-space.ld`` + that is used for linking the pass1 user-mode blob, and (3) ``kernel-space.ld`` that is used for linking the pass1 kernel-mode blob. Alignment, Regions, and Subregions ================================== -There are some important comments in the ``memory.ld`` +There are some important comments in the ``memory.ld`` file that are worth duplicating here: -"The STM32F407VG has 1024Kb of FLASH beginning at address +"The STM32F407VG has 1024Kb of FLASH beginning at address 0x0800:0000 and 192Kb of SRAM. SRAM is split up into three blocks: * "112KB of SRAM beginning at address 0x2000:0000 * "16KB of SRAM beginning at address 0x2001:c000 * "64KB of CCM SRAM beginning at address 0x1000:0000 -"When booting from FLASH, FLASH memory is aliased to address -0x0000:0000 where the code expects to begin execution by jumping +"When booting from FLASH, FLASH memory is aliased to address +0x0000:0000 where the code expects to begin execution by jumping to the entry point in the 0x0800:0000 address range. -"For MPU support, the kernel-mode NuttX section is assumed to -be 128Kb of FLASH and 4Kb of SRAM. That is an excessive amount -for the kernel which should fit into 64KB and, of course, can -be optimized as needed... Allowing the additional memory does -permit addition debug instrumentation to be added to the kernel +"For MPU support, the kernel-mode NuttX section is assumed to +be 128Kb of FLASH and 4Kb of SRAM. That is an excessive amount +for the kernel which should fit into 64KB and, of course, can +be optimized as needed... Allowing the additional memory does +permit addition debug instrumentation to be added to the kernel space without overflowing the partition. -"Alignment of the user space FLASH partition is also a critical -factor: The user space FLASH partition will be spanned with a -single region of size 2||n bytes. The alignment of the user-space -region must be the same. As a consequence, as the user-space +"Alignment of the user space FLASH partition is also a critical +factor: The user space FLASH partition will be spanned with a +single region of size 2||n bytes. The alignment of the user-space +region must be the same. As a consequence, as the user-space increases in size, the alignment requirement also increases. -"This alignment requirement means that the largest user space -FLASH region you can have will be 512KB at it would have to be -positioned at 0x08800000. If you change this address, don't -forget to change the ``CONFIG_NUTTX_USERSPACE`` configuration +"This alignment requirement means that the largest user space +FLASH region you can have will be 512KB at it would have to be +positioned at 0x08800000. If you change this address, don't +forget to change the ``CONFIG_NUTTX_USERSPACE`` configuration setting to match and to modify the check in ``kernel/userspace.c``. -"For the same reasons, the maximum size of the SRAM mapping is -limited to 4KB. Both of these alignment limitations could be -reduced by using multiple MPU regions to map the FLASH/SDRAM +"For the same reasons, the maximum size of the SRAM mapping is +limited to 4KB. Both of these alignment limitations could be +reduced by using multiple MPU regions to map the FLASH/SDRAM range or perhaps with some clever use of subregions." Memory Management ================= -At present, there are two options for memory management in the +At present, there are two options for memory management in the NuttX protected build: Single User Heap ---------------- -By default, there is only a single user-space heap and heap -allocator that is shared by both kernel- and user-modes. -PROs: Simple and makes good use of the heap memory space, -CONs: Awkward architecture and no security for kernel-mode +By default, there is only a single user-space heap and heap +allocator that is shared by both kernel- and user-modes. +PROs: Simple and makes good use of the heap memory space, +CONs: Awkward architecture and no security for kernel-mode allocations. Dual, Partitioned Heaps @@ -255,70 +255,70 @@ Dual, Partitioned Heaps Two configuration options can change this behavior: -* ``CONFIG_MM_MULTIHEAP=y``. This changes internal memory manager interfaces +* ``CONFIG_MM_MULTIHEAP=y``. This changes internal memory manager interfaces so that multiple heaps can be supported. -* ``CONFIG_MM_KERNEL_HEAP=y``. Uses the multi-heap capability to enable +* ``CONFIG_MM_KERNEL_HEAP=y``. Uses the multi-heap capability to enable a kernel heap -If this both options are defined defined, the two heap partitions and +If this both options are defined defined, the two heap partitions and two copies of the memory allocators are built: -One un-protected heap partition that will allocate user accessible memory -that is shared by both the kernel- and user-space code. That allocator -physically resides in the user address space so that it can be called -directly by both the user- and kernel-space code. There is a header at -the beginning of the user-space blob; the kernel-space code gets +One un-protected heap partition that will allocate user accessible memory +that is shared by both the kernel- and user-space code. That allocator +physically resides in the user address space so that it can be called +directly by both the user- and kernel-space code. There is a header at +the beginning of the user-space blob; the kernel-space code gets address of the user-space allocator from this header. -And another protected heap partition that will allocate protected -memory that is only accessible from the kernel code. This allocator -is built into the kernel block. This separate protected heap is +And another protected heap partition that will allocate protected +memory that is only accessible from the kernel code. This allocator +is built into the kernel block. This separate protected heap is required if you want to support security features. -NOTE: There are security issues with calling into the user space -allocators in kernel mode. That is a security hole that could be -exploit to gain control of the system! Instead, the kernel code -should switch to user mode before entering the memory allocator -stubs (perhaps via a trap). The memory allocator stubs should +NOTE: There are security issues with calling into the user space +allocators in kernel mode. That is a security hole that could be +exploit to gain control of the system! Instead, the kernel code +should switch to user mode before entering the memory allocator +stubs (perhaps via a trap). The memory allocator stubs should then trap to return to kernel mode (as does the signal handler now). The Traditional Approach ------------------------ -A more traditional approach would use something like the interface -``sbrk()``. The ``sbrk()`` function adds memory to the heap space -allocation of the calling process. In this case, there would -still be kernel- and user-mode instances of the memory allocators. -Each would ``sbrk()`` as necessary to extend their heap; the pages -allocated for the kernel-mode allocator would be protected but -the pages allocated for the user-mode allocator would not. -PROs: Meets all of the needs. CONs: Complex. Memory losses +A more traditional approach would use something like the interface +``sbrk()``. The ``sbrk()`` function adds memory to the heap space +allocation of the calling process. In this case, there would +still be kernel- and user-mode instances of the memory allocators. +Each would ``sbrk()`` as necessary to extend their heap; the pages +allocated for the kernel-mode allocator would be protected but +the pages allocated for the user-mode allocator would not. +PROs: Meets all of the needs. CONs: Complex. Memory losses due to quantization. -This approach works well with CPUs that have very capable -Memory Management Units (MMUs) that can coalesce the -srbk-ed chunks to a contiguous, `virtual` heap region. -Without an MMU, the sbrk-ed memory would not be -contiguous; this would limit the sizes of allocations +This approach works well with CPUs that have very capable +Memory Management Units (MMUs) that can coalesce the +srbk-ed chunks to a contiguous, `virtual` heap region. +Without an MMU, the sbrk-ed memory would not be +contiguous; this would limit the sizes of allocations due to the physical pages. -Many MCUs will have Memory Protection Units (MPUs) that can -support the security features (only). However these lower -end MPUs may not support sufficient mapping capability to -support this traditional approach. The ARMv7-M MPU, for -example, only supports eight protection regions to manage -all FLASH and SRAM and so this approach would not be +Many MCUs will have Memory Protection Units (MPUs) that can +support the security features (only). However these lower +end MPUs may not support sufficient mapping capability to +support this traditional approach. The ARMv7-M MPU, for +example, only supports eight protection regions to manage +all FLASH and SRAM and so this approach would not be technically feasible for th ARMv7-M family (Cortex-M3/4). Comparing the "Flat" Build Configuration with the Protected Build Configuration =============================================================================== -Compare, for example the configuration -``boards/arm/stm32/stm32f4discovery/configs/ostest`` and the -configuration ``boards/arm/stm32/stm32f4discovery/configs/kostest``. -These two configurations are identical except that one builds a -"flat" version of OS test and the other builds a kernel version -of the OS test. See the file ``boards/arm/stm32/stm32f4discovery/README.txt`` +Compare, for example the configuration +``boards/arm/stm32/stm32f4discovery/configs/ostest`` and the +configuration ``boards/arm/stm32/stm32f4discovery/configs/kostest``. +These two configurations are identical except that one builds a +"flat" version of OS test and the other builds a kernel version +of the OS test. See the file ``boards/arm/stm32/stm32f4discovery/README.txt`` for more details about those configurations. The configurations can be compared using the ``cmpconfig`` tool: @@ -330,120 +330,116 @@ The configurations can be compared using the ``cmpconfig`` tool: cd .. tools/cmpconfig boards/arm/stm32/stm32f4discovery/configs/ostest/defconfig boards/arm/stm32/stm32f4discovery/configs/kostest/defconfig -Here is a summary of the meaning of all of the important differences in the -configurations. This should be enough information for you to convert any +Here is a summary of the meaning of all of the important differences in the +configurations. This should be enough information for you to convert any configuration from a "flat" to a protected build: * ``CONFIG_BUILD_2PASS=y``. This enables the two pass build. -* ``CONFIG_BUILD_PROTECTED=y``. This option enables the "two pass" +* ``CONFIG_BUILD_PROTECTED=y``. This option enables the "two pass" protected build. -* ``CONFIG_PASS1_BUILDIR="boards/arm/stm32/stm32f4discovery/kernel"``. +* ``CONFIG_PASS1_BUILDIR="boards/arm/stm32/stm32f4discovery/kernel"``. This tells the build system the (relative) location of the pass1 build directory. -* ``CONFIG_PASS1_OBJECT=""``. In some "two pass" build configurations, - the build system need to know the name of the first pass object. +* ``CONFIG_PASS1_OBJECT=""``. In some "two pass" build configurations, + the build system need to know the name of the first pass object. This setting is not used for the protected build. -* ``CONFIG_NUTTX_USERSPACE=0x08020000``. This is the expected location - where the user-mode blob will be located. The user-mode blob - contains a header that includes information need by the kernel - blob in order to interface with the user-code. That header will +* ``CONFIG_NUTTX_USERSPACE=0x08020000``. This is the expected location + where the user-mode blob will be located. The user-mode blob + contains a header that includes information need by the kernel + blob in order to interface with the user-code. That header will be expected to reside at this location. -* ``CONFIG_PASS1_TARGET="all"``. This is the build target to use for +* ``CONFIG_PASS1_TARGET="all"``. This is the build target to use for invoking the pass1 make. -* ``CONFIG_MM_MULTIHEAP=y``. This changes internal memory manager +* ``CONFIG_MM_MULTIHEAP=y``. This changes internal memory manager interfaces so that multiple heaps can be supported. -* ``CONFIG_MM_KERNEL_HEAP=y``. NuttX supports the option of using a - single user-accessible heap or, if this options is defined, - two heaps: (1) one that will allocate user accessible memory - that is shared by both the kernel- and user-space code, and - (2) one that will allocate protected memory that is only - accessible from the kernel code. Separate heap memory is required +* ``CONFIG_MM_KERNEL_HEAP=y``. NuttX supports the option of using a + single user-accessible heap or, if this options is defined, + two heaps: (1) one that will allocate user accessible memory + that is shared by both the kernel- and user-space code, and + (2) one that will allocate protected memory that is only + accessible from the kernel code. Separate heap memory is required if you want to support security features. -* ``CONFIG_MM_KERNEL_HEAPSIZE=8192``. This determines an approximate - size for the kernel heap. The standard heap space is partitioned - into a kernel- and user-heap space. This size of the kernel heap - is only approximate because the user heap is subject to stringent - alignment requirements. Because of the alignment requirements, the +* ``CONFIG_MM_KERNEL_HEAPSIZE=8192``. This determines an approximate + size for the kernel heap. The standard heap space is partitioned + into a kernel- and user-heap space. This size of the kernel heap + is only approximate because the user heap is subject to stringent + alignment requirements. Because of the alignment requirements, the actual size of the kernel heap could be considerable larger than this. -* ``CONFIG_BOARD_EARLY_INITIALIZE=y``. This setting enables a special, +* ``CONFIG_BOARD_EARLY_INITIALIZE=y``. This setting enables a special, `early` initialization call to initialize board-specific resources. -* ``CONFIG_BOARD_LATE_INITIALIZE=y``. This setting enables a special - initialization call to initialize `late` board-specific resources. - The difference between ``CONFIG_BOARD_EARLY_INITIALIZE`` and - ``CONFIG_BOARD_LATE_INITIALIZE`` is that the ``CONFIG_BOARD_EARLY_INITIALIZE`` - logic runs earlier in initialization before the full operating - system is up and running. ``CONFIG_BOARD_LATE_INITIALIZE``, on the - other hand, runs at the completion of initialization, just before - the user applications are started. Neither ``CONFIG_BOARD_EARLY_INITIALIZE`` - nor ``CONFIG_BOARD_LATE_INITIALIZE`` are used in the OS test - configuration but other configurations (such as NSH) - require some application-specific initialization before - the application can run. In the "flat" build, such initialization - is performed as part of the application start-up sequence. - These includes such things as initializing device drivers. - These same initialization steps must be performed in kernel - mode for the protected build and ``CONFIG_BOARD_LATE_INITIALIZE``. - See ``boards/arm/stm32/stm32f4discovery/src/up_boot.c`` for an +* ``CONFIG_BOARD_LATE_INITIALIZE=y``. This setting enables a special + initialization call to initialize `late` board-specific resources. + The difference between ``CONFIG_BOARD_EARLY_INITIALIZE`` and + ``CONFIG_BOARD_LATE_INITIALIZE`` is that the ``CONFIG_BOARD_EARLY_INITIALIZE`` + logic runs earlier in initialization before the full operating + system is up and running. ``CONFIG_BOARD_LATE_INITIALIZE``, on the + other hand, runs at the completion of initialization, just before + the user applications are started. Neither ``CONFIG_BOARD_EARLY_INITIALIZE`` + nor ``CONFIG_BOARD_LATE_INITIALIZE`` are used in the OS test + configuration but other configurations (such as NSH) + require some application-specific initialization before + the application can run. In the "flat" build, such initialization + is performed as part of the application start-up sequence. + These includes such things as initializing device drivers. + These same initialization steps must be performed in kernel + mode for the protected build and ``CONFIG_BOARD_LATE_INITIALIZE``. + See ``boards/arm/stm32/stm32f4discovery/src/up_boot.c`` for an example of such board initialization code. -* ``CONFIG_NSH_ARCHINITIALIZE`` is not defined. The setting - ``CONFIG_NSH_ARCHINITIALIZE`` does not apply to the OS test - configuration, however, this is noted here as an example - of initialization that cannot be performed in the protected build. Architecture-Specific Options: -* ``CONFIG_SYS_RESERVED=8``. The user application logic - interfaces with the kernel blob using system calls. - The architecture-specific logic may need to reserved a - few system calls for its own internal use. The ARMv7-M +* ``CONFIG_SYS_RESERVED=8``. The user application logic + interfaces with the kernel blob using system calls. + The architecture-specific logic may need to reserved a + few system calls for its own internal use. The ARMv7-M architectures all require 8 reserved system calls. -* ``CONFIG_SYS_NNEST=2``. System calls may be nested. The - system must retain information about each nested system - call and this setting is used to set aside resources for - nested system calls. In the current architecture, a maximum +* ``CONFIG_SYS_NNEST=2``. System calls may be nested. The + system must retain information about each nested system + call and this setting is used to set aside resources for + nested system calls. In the current architecture, a maximum nesting level of two is all that is needed. -* ``CONFIG_ARMV7M_MPU=y``. This settings enables support for - the ARMv7-M Memory Protection Unit (MPU). The MPU is used +* ``CONFIG_ARMV7M_MPU=y``. This settings enables support for + the ARMv7-M Memory Protection Unit (MPU). The MPU is used to prohibit user-mode access to kernel resources. -* ``CONFIG_ARMV7M_MPU_NREGIONS=8``. The ARMv7-M MPU supports 8 +* ``CONFIG_ARMV7M_MPU_NREGIONS=8``. The ARMv7-M MPU supports 8 protection regions. Size Expansion ============== -The protected build will, or course, result in a FLASH image that is -larger than that of the corresponding "flat" build. How much larger? -I don't have the numbers in hand, but you can build -``boards/arm/stm32/stm32f4discovery/configs/nsh`` and -``boards/arm/stm32/stm32f4discovery/configs/kostest`` and compare +The protected build will, or course, result in a FLASH image that is +larger than that of the corresponding "flat" build. How much larger? +I don't have the numbers in hand, but you can build +``boards/arm/stm32/stm32f4discovery/configs/nsh`` and +``boards/arm/stm32/stm32f4discovery/configs/kostest`` and compare the resulting binaries for yourself using the ``size`` command. Increases in size are expected because: -* The syscall layer is included in the protected build but not the flat +* The syscall layer is included in the protected build but not the flat build. -* The kernel-size _syscal_l stubs will cause all enabled OS code to be - drawn into the build. In the flat build, only those OS interfaces +* The kernel-size _syscal_l stubs will cause all enabled OS code to be + drawn into the build. In the flat build, only those OS interfaces actually called by the application will be included in the final objects. * The dual memory allocators will increase size. -* Code duplication. Some code, such as the C library, will be +* Code duplication. Some code, such as the C library, will be duplicated in both the kernel- and user-blobs, and -* Alignment. The alignments required by the MPU logic will leave +* Alignment. The alignments required by the MPU logic will leave relatively large regions of FLASH (and perhaps RAM) is not usable. Performance Issues ================== -The only performance differences using the protected build should -result as a consequence of the `sycalls` used to interact with the -OS vs. the direct C calls as used in the flat build. If your -performance is highly dependent upon high rate OS calls, then -this could be an issue for you. But, in the typical application, +The only performance differences using the protected build should +result as a consequence of the `sycalls` used to interact with the +OS vs. the direct C calls as used in the flat build. If your +performance is highly dependent upon high rate OS calls, then +this could be an issue for you. But, in the typical application, OS calls do not often figure into the critical performance paths. -The `syscalls` are, ultimately, software interrupts. If the platform -does not support prioritized, nested interrupts then the `syscall` -execution could also delay other hardware interrupt processing. -However, `sycall` processing is negligible: they really just -configure to return to in supervisor mode and vector to the -`syscall` stub. They should be lightning fast and, for the typical -real-time applications, should cause no issues. \ No newline at end of file +The `syscalls` are, ultimately, software interrupts. If the platform +does not support prioritized, nested interrupts then the `syscall` +execution could also delay other hardware interrupt processing. +However, `sycall` processing is negligible: they really just +configure to return to in supervisor mode and vector to the +`syscall` stub. They should be lightning fast and, for the typical +real-time applications, should cause no issues. diff --git a/Documentation/guides/usbtrace.rst b/Documentation/guides/usbtrace.rst index 4f7a318a7b02f..e873634e97159 100644 --- a/Documentation/guides/usbtrace.rst +++ b/Documentation/guides/usbtrace.rst @@ -182,10 +182,6 @@ Device Drivers -> USB Device Driver Support . =========================================== =================================================== Application Configuration -> NSH LIbrary . ``CONFIG_NSH_USBDEV_TRACE=n`` Make sure that any built-in tracing from NSH is disabled. -``CONFIG_NSH_ARCHINIT=y`` Enable this option only if your board-specific logic -. has logic to automatically start the USB monitor. -. Otherwise the USB monitor can be started or stopped -. with the usbmon_start and usbmon_stop commands from the NSH console. =========================================== =================================================== =============================================== ============================================ diff --git a/Documentation/platforms/arm/kinetis/boards/freedom-k64f/README.txt b/Documentation/platforms/arm/kinetis/boards/freedom-k64f/README.txt index 3b3979e5eed63..bf46251329e1d 100644 --- a/Documentation/platforms/arm/kinetis/boards/freedom-k64f/README.txt +++ b/Documentation/platforms/arm/kinetis/boards/freedom-k64f/README.txt @@ -459,7 +459,6 @@ SD Card Support CONFIG_SCHED_HPWORK=y Application Configuration -> NSH Library - CONFIG_NSH_ARCHINIT=y : NSH board-initialization, and CONFIG_BOARDCTL=y : Or CONFIG_BOARD_LATE_INITIALIZE=y diff --git a/Documentation/platforms/arm/kinetis/boards/freedom-k66f/README.txt b/Documentation/platforms/arm/kinetis/boards/freedom-k66f/README.txt index fb741019594f9..4011650e5e89e 100644 --- a/Documentation/platforms/arm/kinetis/boards/freedom-k66f/README.txt +++ b/Documentation/platforms/arm/kinetis/boards/freedom-k66f/README.txt @@ -462,7 +462,6 @@ SD Card Support CONFIG_SCHED_HPWORK=y Application Configuration -> NSH Library - CONFIG_NSH_ARCHINIT=y : NSH board-initialization, and CONFIG_BOARDCTL=y : Or CONFIG_BOARD_LATE_INITIALIZE=y diff --git a/Documentation/platforms/arm/kinetis/boards/twr-k60n512/README.txt b/Documentation/platforms/arm/kinetis/boards/twr-k60n512/README.txt index 38923bcd041d2..03cf5ce7653ae 100644 --- a/Documentation/platforms/arm/kinetis/boards/twr-k60n512/README.txt +++ b/Documentation/platforms/arm/kinetis/boards/twr-k60n512/README.txt @@ -490,5 +490,3 @@ Where is one of the following: CONFIG_KINETIS_PORTEINTS=y : Enable PortE GPIO interrupts CONFIG_SCHED_WORKQUEUE=y : Enable the NuttX workqueue - - CONFIG_NSH_ARCHINIT=y : Provide NSH initialization logic diff --git a/Documentation/platforms/arm/kinetis/boards/twr-k64f120m/README.txt b/Documentation/platforms/arm/kinetis/boards/twr-k64f120m/README.txt index 11757f75edaf2..f021b36bec12a 100644 --- a/Documentation/platforms/arm/kinetis/boards/twr-k64f120m/README.txt +++ b/Documentation/platforms/arm/kinetis/boards/twr-k64f120m/README.txt @@ -591,8 +591,6 @@ Where is one of the following: CONFIG_SCHED_WORKQUEUE=y : Enable the NuttX workqueue - CONFIG_NSH_ARCHINIT=y : Provide NSH initialization logic - netnsh: ------ This is the same config then nsh, but it adds Ethernet support with the diff --git a/Documentation/platforms/arm/lpc43xx/boards/bambino-200e/README.txt b/Documentation/platforms/arm/lpc43xx/boards/bambino-200e/README.txt index 6d1ab0e3308e1..5e2a9258458db 100644 --- a/Documentation/platforms/arm/lpc43xx/boards/bambino-200e/README.txt +++ b/Documentation/platforms/arm/lpc43xx/boards/bambino-200e/README.txt @@ -497,7 +497,6 @@ Where is one of the following: CONFIG_USBDEV_TRACE=y : Enable USB trace feature CONFIG_USBDEV_TRACE_NRECORDS=128 : Buffer 128 records in memory CONFIG_NSH_USBDEV_TRACE=n : No builtin tracing from NSH - CONFIG_NSH_ARCHINIT=y : Automatically start the USB monitor CONFIG_USBMONITOR=y : Enable the USB monitor daemon CONFIG_USBMONITOR_STACKSIZE=2048 : USB monitor daemon stack size CONFIG_USBMONITOR_PRIORITY=50 : USB monitor daemon priority diff --git a/Documentation/platforms/arm/sam34/boards/arduino-due/index.rst b/Documentation/platforms/arm/sam34/boards/arduino-due/index.rst index 6053d3c046397..f0780145452d6 100644 --- a/Documentation/platforms/arm/sam34/boards/arduino-due/index.rst +++ b/Documentation/platforms/arm/sam34/boards/arduino-due/index.rst @@ -5,7 +5,7 @@ Arduino Due This documentation discusses issues unique to NuttX configurations for the Arduino DUE board featuring the Atmel ATSAM3X8E MCU running at 84 MHz. -.. note:: +.. note:: If found that newer Arduino Due board differ from the older boards mine: Mine has the 32.768 slow clock crystal and associated caps installed. The newer @@ -25,83 +25,83 @@ Supported Shields PIO Pin Usage ============= -PORTA +PORTA ----- -.. csv-table:: +.. csv-table:: :header: PIO,SIGNAL,CONN,PIN - PA0,CANTX0,ADCH,8 - PA1,CANRX0,ACDH,7 - PA2,AD7,ADCL,8 - PA3,AD6,ADCL,7 - PA4,AD5,ADCL,6 - PA5,EEXTINT,ETH ,8 - PA6,AD4,ADCL,5 - PA7,PIN31,XIO ,12 - PA8,[U]RX,PWML,1 - PA9,[U]TX,PWML,2 - PA10,RXD2,COMM,6 - PA11,TXD2,COMM,5 - PA12,RXD1,COMM,4 - PA13,TXD1,COMM,3 - PA14,PIN23,XIO ,4 - PA15,PIN24,XIO ,5 - PA16,AD0,ADCL,1 - PA17,SDA1,PWMH,9 - PA18,SCL1,PWMH,10 - PA19,PIN42,XIO ,23 - PA20,PIN43,XIO ,24 + PA0,CANTX0,ADCH,8 + PA1,CANRX0,ACDH,7 + PA2,AD7,ADCL,8 + PA3,AD6,ADCL,7 + PA4,AD5,ADCL,6 + PA5,EEXTINT,ETH ,8 + PA6,AD4,ADCL,5 + PA7,PIN31,XIO ,12 + PA8,[U]RX,PWML,1 + PA9,[U]TX,PWML,2 + PA10,RXD2,COMM,6 + PA11,TXD2,COMM,5 + PA12,RXD1,COMM,4 + PA13,TXD1,COMM,3 + PA14,PIN23,XIO ,4 + PA15,PIN24,XIO ,5 + PA16,AD0,ADCL,1 + PA17,SDA1,PWMH,9 + PA18,SCL1,PWMH,10 + PA19,PIN42,XIO ,23 + PA20,PIN43,XIO ,24 PA21,TXL,TX,YELLOW LED - PA22,AD3,ADCL,4 - PA23,AD2,ADCL,3 - PA24,AD1,ADCL,2 - PA25,MISO,SPI,1 - PA26,MOSI,SPI,4 - PA27,SPCK,SPI,3 + PA22,AD3,ADCL,4 + PA23,AD2,ADCL,3 + PA24,AD1,ADCL,2 + PA25,MISO,SPI,1 + PA26,MOSI,SPI,4 + PA27,SPCK,SPI,3 PA28,SS0/PWM10,(ETH) PWML,10 - PA29,SS1/PWM4 ,(SD), - PA30,N/A,N/A, - PA31,N/A,N/A, + PA29,SS1/PWM4 ,(SD), + PA30,N/A,N/A, + PA31,N/A,N/A, -PORTB +PORTB ----- .. csv-table:: :header: PIO,SIGNAL,CONN,PIN - PB0,ETX_CLK,ETH,1 - PB1,ETX_EN,ETH,3 - PB2,ETXD0,ETH,5 - PB3,ETXD1,ETH,7 - PB4,ERX_DV,ETH,10 - PB5,ERXD0,ETH,9 - PB6,ERXD1,ETH,11 - PB7,ERX_ER,ETH,13 - PB8,EMDC,ETH,14 - PB9,EMDIO,ETH,12 + PB0,ETX_CLK,ETH,1 + PB1,ETX_EN,ETH,3 + PB2,ETXD0,ETH,5 + PB3,ETXD1,ETH,7 + PB4,ERX_DV,ETH,10 + PB5,ERXD0,ETH,9 + PB6,ERXD1,ETH,11 + PB7,ERX_ER,ETH,13 + PB8,EMDC,ETH,14 + PB9,EMDIO,ETH,12 PB10,UOTGVBO,Vbus power, - PB11,UOTGID ,USB1,4 - PB12,SDA0-3 ,COMM,7 - PB13,SCL0-3 ,COMM,8 - PB14,CANTX1/IO ,XIO ,34 - PB15,DAC0(CANRX1),ADCH,5 - PB16,DAC1,ADCH,6 - PB17,AD8,ADCH,1 - PB18,AD9,ADCH,2 - PB19,AD10,ADCH,3 - PB20,AD11(TXD3),ADCH,4 - PB21,AD14(RXD3),XIO,33 - PB22,N/C,N/A, - PB23,SS3,???, - PB24,N/C,N/A, - PB25,PWM2,PWML,3 - PB26,PIN22,???, - PB27,PWM13,PWMH,6 - PB28,JTAG_TCK,JTAG,4 - PB29,JTAG_TDI,JTAG,8 - PB30,JTAG_TDO,JTAG,6 - PB31,JTAG_TMS,JTAG,2 + PB11,UOTGID ,USB1,4 + PB12,SDA0-3 ,COMM,7 + PB13,SCL0-3 ,COMM,8 + PB14,CANTX1/IO ,XIO ,34 + PB15,DAC0(CANRX1),ADCH,5 + PB16,DAC1,ADCH,6 + PB17,AD8,ADCH,1 + PB18,AD9,ADCH,2 + PB19,AD10,ADCH,3 + PB20,AD11(TXD3),ADCH,4 + PB21,AD14(RXD3),XIO,33 + PB22,N/C,N/A, + PB23,SS3,???, + PB24,N/C,N/A, + PB25,PWM2,PWML,3 + PB26,PIN22,???, + PB27,PWM13,PWMH,6 + PB28,JTAG_TCK,JTAG,4 + PB29,JTAG_TDI,JTAG,8 + PB30,JTAG_TDO,JTAG,6 + PB31,JTAG_TMS,JTAG,2 PORTC ----- @@ -146,79 +146,79 @@ PORTD ----- .. csv-table:: - :header: PIO,SIGNAL,CONN,PIN - - PD0 , PIN25, XIO ,6 - PD1 , PIN26, XIO ,7 - PD2 , PIN27, XIO ,8 - PD3 , PIN28, XIO ,9 - PD4 , TXD0, COMM,1 - PD5 , RXD0, COMM,2 - PD6 , PIN29, XIO ,10 - PD7 , PWM11, PWMH,4 - PD8 , PWM12, PWMH,5 - PD9 , PIN30, XIO ,11 - PD10, PIN32, XIO ,13 - PD11, N/A, N/A , - PD12, N/A, N/A , - PD13, N/A, N/A , - PD14, N/A, N/A , - PD15, N/A, N/A , - PD16, N/A, N/A , - PD17, N/A, N/A , - PD18, N/A, N/A , - PD19, N/A, N/A , - PD20, N/A, N/A , - PD21, N/A, N/A , - PD22, N/A, N/A , - PD23, N/A, N/A , - PD24, N/A, N/A , - PD25, N/A, N/A , - PD26, N/A, N/A , - PD27, N/A, N/A , - PD28, N/A, N/A , - PD29, N/A, N/A , - PD30, N/A, N/A , - PD31, N/A, N/A , - -PORTE + :header: PIO,SIGNAL,CONN,PIN + + PD0 , PIN25, XIO ,6 + PD1 , PIN26, XIO ,7 + PD2 , PIN27, XIO ,8 + PD3 , PIN28, XIO ,9 + PD4 , TXD0, COMM,1 + PD5 , RXD0, COMM,2 + PD6 , PIN29, XIO ,10 + PD7 , PWM11, PWMH,4 + PD8 , PWM12, PWMH,5 + PD9 , PIN30, XIO ,11 + PD10, PIN32, XIO ,13 + PD11, N/A, N/A , + PD12, N/A, N/A , + PD13, N/A, N/A , + PD14, N/A, N/A , + PD15, N/A, N/A , + PD16, N/A, N/A , + PD17, N/A, N/A , + PD18, N/A, N/A , + PD19, N/A, N/A , + PD20, N/A, N/A , + PD21, N/A, N/A , + PD22, N/A, N/A , + PD23, N/A, N/A , + PD24, N/A, N/A , + PD25, N/A, N/A , + PD26, N/A, N/A , + PD27, N/A, N/A , + PD28, N/A, N/A , + PD29, N/A, N/A , + PD30, N/A, N/A , + PD31, N/A, N/A , + +PORTE ----- .. csv-table:: - :header: PIO,SIGNAL,CONN,PIN - - PE0 ,N/A,N/A - PE1 ,N/A,N/A - PE2 ,N/A,N/A - PE3 ,N/A,N/A - PE4 ,N/A,N/A - PE5 ,N/A,N/A - PE6 ,N/A,N/A - PE7 ,N/A,N/A - PE8 ,N/A,N/A - PE9 ,N/A,N/A - PE10,N/A,N/A - PE11,N/A,N/A - PE12,N/A,N/A - PE13,N/A,N/A - PE14,N/A,N/A - PE15,N/A,N/A - PE16,N/A,N/A - PE17,N/A,N/A - PE18,N/A,N/A - PE19,N/A,N/A - PE20,N/A,N/A - PE21,N/A,N/A - PE22,N/A,N/A - PE23,N/A,N/A - PE24,N/A,N/A - PE25,N/A,N/A - PE26,N/A,N/A - PE27,N/A,N/A - PE28,N/A,N/A - PE29,N/A,N/A - PE30,N/A,N/A - PE31,N/A,N/A + :header: PIO,SIGNAL,CONN,PIN + + PE0 ,N/A,N/A + PE1 ,N/A,N/A + PE2 ,N/A,N/A + PE3 ,N/A,N/A + PE4 ,N/A,N/A + PE5 ,N/A,N/A + PE6 ,N/A,N/A + PE7 ,N/A,N/A + PE8 ,N/A,N/A + PE9 ,N/A,N/A + PE10,N/A,N/A + PE11,N/A,N/A + PE12,N/A,N/A + PE13,N/A,N/A + PE14,N/A,N/A + PE15,N/A,N/A + PE16,N/A,N/A + PE17,N/A,N/A + PE18,N/A,N/A + PE19,N/A,N/A + PE20,N/A,N/A + PE21,N/A,N/A + PE22,N/A,N/A + PE23,N/A,N/A + PE24,N/A,N/A + PE25,N/A,N/A + PE26,N/A,N/A + PE27,N/A,N/A + PE28,N/A,N/A + PE29,N/A,N/A + PE30,N/A,N/A + PE31,N/A,N/A PORTF ----- @@ -362,7 +362,7 @@ Due PIN GPIO FUNCTION SIGNAL ITHEAD PIN ITHEAD SIGNA a bit-bang SPI interface is used. This includes the touch controller a bit-bang SPI interface is used. This includes the touch controller and the SD card. - + 2. UART0 cannot be used. USARTs on the COMM connector should be available. 3. Parallel data is not contiguous in the PIO register @@ -381,27 +381,27 @@ SD Interface ------------ ====== ========= ======== ========= ======== -SD PIN SD SIGNAL PIN SIGNAL GPIO +SD PIN SD SIGNAL PIN SIGNAL GPIO ====== ========= ======== ========= ======== -1 /CS J2 pin 3 D10 PA28 +1 /CS J2 pin 3 D10 PA28 2 DI J2 pin 4 D11 PD7 -3 GND --- --- --- +3 GND --- --- --- 4 VCC --- --- --- -5 CLK J2 pin 6 D13 PB27 +5 CLK J2 pin 6 D13 PB27 6 GND --- --- --- -7 DO J2 pin 5 D12 PD8 +7 DO J2 pin 5 D12 PD8 8 IRQ N/C --- --- -9 N/C --- --- --- +9 N/C --- --- --- 10 SW N/C --- --- -11 WP N/C --- --- +11 WP N/C --- --- 12 CD N/C --- --- -13 CD N/C --- --- +13 CD N/C --- --- 14 GND --- --- --- -15 GND --- --- --- +15 GND --- --- --- 16 GND --- --- --- ====== ========= ======== ========= ======== -.. note:: +.. note:: * The SD slot shares the pin with LED "L" so LED support must be disabled to use the MMC/SD card on the ITEAD shield. @@ -412,27 +412,27 @@ Touch Controller Interface -------------------------- =========== ============== ======== ========= ======== -XPT2046 PIN XPT2046 SIGNAL PIN SIGNAL GPIO +XPT2046 PIN XPT2046 SIGNAL PIN SIGNAL GPIO =========== ============== ======== ========= ======== -1 VCC --- --- --- +1 VCC --- --- --- 2 X+ --- --- --- -3 Y+ --- --- --- +3 Y+ --- --- --- 4 X- --- --- --- -5 Y- --- --- --- +5 Y- --- --- --- 6 GND --- --- --- -7 IN3 N/C --- --- +7 IN3 N/C --- --- 8 IN4 N/C --- --- -9 VREF --- --- --- +9 VREF --- --- --- 10 VCC --- --- --- -11 IRQ J2 pin 2 D9 PC21 +11 IRQ J2 pin 2 D9 PC21 12 DOUT J2 pin 1 D8 PC22 -13 BUSY N/C --- --- +13 BUSY N/C --- --- 14 DIN J1 pin 1 A0/D15 PA16 -15 /CS --- --- --- +15 /CS --- --- --- 16 DCLK J1 pin 2 A1/D15 PA24 =========== ============== ======== ========= ======== -.. note:: +.. note:: CS is connected to ground (XPT2046 is always selected) @@ -465,7 +465,7 @@ defined. In that case, the usage by the board port is defined in ``include/board.h`` and ``src/sam_leds.c``. The LEDs are used to encode OS-related events as follows: -.. csv-table:: +.. csv-table:: :header: SYMBOL,MEANING,L,TX,RX ``LED_STARTED`` ,NuttX has been started ,OFF ,OFF ,OFF @@ -523,7 +523,7 @@ the case of UART0). Loading Code ============ -.. note:: +.. note:: I believe that there have been significant changes to the more recent tool environment such that Bossac may no longer be usable. I don't know that for @@ -712,7 +712,7 @@ a. Write code to FLASH don't change boot mode and don't reset. This lets you b. Verify the FLASH contents (the bootloader must be running) .. code:: console - + $ bossac.exe --port=COM26 --usb-port=false -v nuttx.bin Verify 64628 bytes of flash [==============================] 100% (253/253 pages) @@ -721,7 +721,7 @@ b. Verify the FLASH contents (the bootloader must be running) c. Read from FLASH to a file (the bootloader must be running): .. code:: console - + $ bossac.exe --port=COM26 --usb-port=false --read=4096 nuttx.dump Read 4096 bytes from flash [==============================] 100% (16/16 pages) @@ -729,10 +729,10 @@ c. Read from FLASH to a file (the bootloader must be running): d. Change to boot from FLASH .. code:: console - + $ bossac.exe --port=COM26 --usb-port=false --boot=1 Set boot flash true - + Uploading NuttX to the Due Using JTAG ------------------------------------- @@ -1012,7 +1012,7 @@ This configuration directory will build the NuttShell. support for the SD card slot can be enabled by making the following changes to the configuration: - .. note:: + .. note:: You cannot use UART0 or LEDs with this ITEAD module. You must switch to USART0 and disable LED support as described above. @@ -1047,14 +1047,9 @@ This configuration directory will build the NuttShell. Board Selection -> Common Board Options - * ``CONFIG_NSH_ARCHINIT=y``: Initialize the MMC/SD slot when NSH starts * ``CONFIG_NSH_MMCSDSLOTNO=0``: Only one MMC/SD slot, slot 0 * ``CONFIG_NSH_MMCSDSPIPORTNO=0``: (does not really matter in this case) - Application Configuration -> NSH Library - - * ``CONFIG_NSH_ARCHINIT=y``: Board has architecture-specific initialization - .. warning:: 2013-7-2: SD card is not responding. All 0's received on SPI. @@ -1065,7 +1060,7 @@ This configuration directory will build the NuttShell. an NSH built-in application. You can enable the touchscreen and test by modifying the default configuration in the following ways: - .. note:: + .. note:: You cannot use UART0 or LEDs with this ITEAD module. You must switch to USART0 and disable LED support as described above. diff --git a/Documentation/platforms/arm/sam34/boards/sam3u-ek/index.rst b/Documentation/platforms/arm/sam34/boards/sam3u-ek/index.rst index ea4e5b9c321ee..d8b4af05e9ac8 100644 --- a/Documentation/platforms/arm/sam34/boards/sam3u-ek/index.rst +++ b/Documentation/platforms/arm/sam34/boards/sam3u-ek/index.rst @@ -56,7 +56,7 @@ LED_PANIC The system has crashed FLASH N/C N/C glow is because of timer interrupts that result in the LED being illuminated on a small proportion of the time. -.. note:: +.. note:: LED2 may also flicker normally if signals are processed. @@ -225,7 +225,7 @@ The ```` that is provided above as an argument to the a. Build and install the kconfig-mconf tool. See ``nuttx/README.txt`` see additional README.txt files in the NuttX tools repository. - + b. Execute ``make menuconfig`` in ``nuttx/`` in order to start the reconfiguration process. @@ -250,7 +250,7 @@ The ```` that is provided above as an argument to the Cygwin) System Type -> Toolchain: - + * ``CONFIG_ARM_TOOLCHAIN_BUILDROOT=y``: Buildroot toolchain * ``CONFIG_ARM_TOOLCHAIN_BUILDROOT_OABI=y``: Older, OABI toolchain @@ -458,10 +458,6 @@ Configuration enables both the serial and telnetd NSH interfaces. * ``CONFIG_SCHED_WORKQUEUE=y``: Driver needs work queue support - Application Configuration -> NSH Library - - * ``CONFIG_NSH_ARCHINIT=y``: NSH board-initialization - .. warning:: * 2013-6-28: The touchscreen is functional. @@ -501,18 +497,18 @@ The NxWM window manager can be found at ``apps/graphics/NxWidgets/nxwm``. The NxWM unit test can be found at ``apps/graphics/NxWidgets/UnitTests/nxwm``. -.. warning:: +.. warning:: 1. 2013-6-28: Created the configuration but have not yet done anything with it. - + 2. 2013-6-29: Various changes to get a clean build of this configuration. Still untested. - + 3. 20113-6-30: I cannot load this program using AtmelStudio6.1. The total size with DEBUG on is 138.9 KB. I have verified that the first 128KB may have been written correctly, but then the code above 128KB wraps and overwrites the code at the beginning of FLASH, trashing the FLASH images. - + Bottom line: Still untested. diff --git a/Documentation/platforms/arm/sam34/boards/sam4e-ek/index.rst b/Documentation/platforms/arm/sam34/boards/sam4e-ek/index.rst index 7f6d3dbb42316..41491dcc21f2c 100644 --- a/Documentation/platforms/arm/sam34/boards/sam4e-ek/index.rst +++ b/Documentation/platforms/arm/sam34/boards/sam4e-ek/index.rst @@ -161,7 +161,7 @@ LED_ASSERTION An assertion failed FLASH N/C N/C LED_PANIC The system has crashed FLASH N/C N/C =================== ================================= ======= ======= ======= -.. note:: +.. note:: If D2 and D4 are statically on, then NuttX probably failed to boot and these LEDs will give you some indication of where the failure was @@ -378,7 +378,7 @@ You can also log into the NSH from the host PC like this: This delay will be especially long if the board is not connected to a network because additional time will be required to fail with timeout errors. - + This delay will be especially long if the board is not connected to a network. On the order of a minute! You will probably think that NuttX has crashed! And then, when it finally does come up, the network will not be @@ -473,10 +473,6 @@ FLASH: Use care if you plan to use FAT long file name feature in a product; There are issues with certain Microsoft patents on the long file name technology. - Application Configuration -> NSH Library - - * ``CONFIG_NSH_ARCHINIT=y``: NSH board-initialization - Board Selection * ``CONFIG_SAM4EEK_AT25_BLOCKMOUNT=y``: Mounts AT25 for NSH @@ -520,10 +516,6 @@ System Type -> ATSAM3/4 Peripheral Support * ``CONFIG_SAM34_UDP=y``: Enable UDP Full Speed USB device -Application Configuration -> NSH Library - -* ``CONFIG_NSH_ARCHINIT=y``: NSH board-initialization - Mass Storage Class ------------------ @@ -693,10 +685,9 @@ serial console in this configuration): Application Configuration -> NSH LIbrary: * ``CONFIG_NSH_USBDEV_TRACE=n``: No builtin tracing from NSH - * ``CONFIG_NSH_ARCHINIT=y``: Automatically start the USB monitor Application Configuration -> System NSH Add-Ons: - + * ``CONFIG_USBMONITOR=y``: Enable the USB monitor daemon * ``CONFIG_USBMONITOR_STACKSIZE=2048``: USB monitor daemon stack size * ``CONFIG_USBMONITOR_PRIORITY=50``: USB monitor daemon priority @@ -747,7 +738,6 @@ for the SD slot can be enabled with the following settings: Application Configuration -> NSH Library - * ``CONFIG_NSH_ARCHINIT=y``: NSH board-initialization * ``CONFIG_NSH_MMCSDSLOTNO=0``: Only one slot, slot 0 After an SD card is successfully initialized, the block device ``/dev/mmcsd0`` @@ -792,7 +782,7 @@ following ways: * ``CONFIG_ADS7843E_THRESHY=39`` System Type -> Peripherals: - + * ``CONFIG_SAM34_SPI0=y``: Enable support for SPI System Type: @@ -865,13 +855,13 @@ PIN PIO SIGNAL NOTES 27 IM1 Grounded 28 GND 29 [PC13] LED-A Backlight controls: PC13 enables AAT3155 charge pump that drives the backlight LEDs - 30 [PC13] LEDK1 - 31 [PC13] LEDK2 + 30 [PC13] LEDK1 + 31 [PC13] LEDK2 32 [PC13] LEDK3 33 [PC13] LEDK4 34 [PC13] LEDK1 35 Y+ These go to the ADS7843 touchscreen controller. - 36 Y- + 36 Y- 37 X+ 38 X- 39 NC @@ -929,57 +919,57 @@ SAM4E-EK-specific Configuration Options * ``CONFIG_ARCH``: Identifies the ``arch/`` subdirectory. This should be set to: - + * ``CONFIG_ARCH=arm`` - + * ``CONFIG_ARCH_family``: For use in C code: - + * ``CONFIG_ARCH_ARM=y`` - + * ``CONFIG_ARCH_architecture``: For use in C code: - + * ``CONFIG_ARCH_CORTEXM3=y`` - + * ``CONFIG_ARCH_CHIP``: Identifies the ``arch/*/chip`` subdirectory - + * ``CONFIG_ARCH_CHIP="sam34"`` - + * ``CONFIG_ARCH_CHIP_name``: For use in C code to identify the exact chip: - + * ``CONFIG_ARCH_CHIP_SAM34`` * ``CONFIG_ARCH_CHIP_SAM3U`` * ``CONFIG_ARCH_CHIP_ATSAM3U4`` - + * ``CONFIG_ARCH_BOARD``: Identifies the ``boards/`` subdirectory and hence, the board that supports the particular chip or SoC. - + * ``CONFIG_ARCH_BOARD=sam4e:ek`` (for the SAM4E-EK development board) - + * ``CONFIG_ARCH_BOARD_name``: For use in C code - + * ``CONFIG_ARCH_BOARD_SAM4EEK=y`` - + * ``CONFIG_ARCH_LOOPSPERMSEC``: Must be calibrated for correct operation of delay loops - + * ``CONFIG_ENDIAN_BIG``: define if big endian (default is little endian) - + * ``CONFIG_RAM_SIZE``: Describes the installed DRAM (SRAM in this case): - + * ``CONFIG_RAM_SIZE=0x00020000`` (128Kb) - + * ``CONFIG_RAM_START``: The start address of installed DRAM - + * ``CONFIG_RAM_START=0x20000000`` - + * ``CONFIG_ARCH_LEDS``: Use LEDs to show state. Unique to boards that have LEDs - + * ``CONFIG_ARCH_INTERRUPTSTACK``: This architecture supports an interrupt stack. If defined, this symbol is the size of the interrupt stack in bytes. If not defined, the user task stacks will be used during interrupt handling. - + * ``CONFIG_ARCH_STACKDUMP``: Do stack dumps after assertions - + * ``CONFIG_ARCH_LEDS``: Use LEDs to show state. Unique to board architecture. Individual subsystems can be enabled: @@ -1447,5 +1437,5 @@ The NxWM unit test can be found at ``apps/graphics/NxWidgets/UnitTests/nxwm`` 2014-08-20. I have seen the demo work well but it is not thoroughly exercised. I suspect some touchscreen issues. - + 2014-10-11. Today's build crashes in nxwm_main on startup. diff --git a/Documentation/platforms/arm/sam34/boards/sam4l-xplained/index.rst b/Documentation/platforms/arm/sam34/boards/sam4l-xplained/index.rst index db64373159c54..05616a79b05e9 100644 --- a/Documentation/platforms/arm/sam34/boards/sam4l-xplained/index.rst +++ b/Documentation/platforms/arm/sam34/boards/sam4l-xplained/index.rst @@ -419,7 +419,7 @@ The ```` that is provided above as an argument to the 1. Build and install the kconfig-mconf tool. See nuttx/README.txt see additional README.txt files in the NuttX tools repository. - + 2. Execute 'make menuconfig' in nuttx/ in order to start the reconfiguration process. @@ -428,7 +428,7 @@ The ```` that is provided above as an argument to the a. Build and install the kconfig-mconf tool. See nuttx/README.txt see additional README.txt files in the NuttX tools repository. - + b. Execute ``make menuconfig`` in nuttx/ in order to start the reconfiguration process. @@ -502,7 +502,7 @@ nsh This configuration directory will built the NuttShell. -.. note:: +.. note:: If you get a compilation error like: @@ -558,10 +558,6 @@ Board Selection -> SAM4L Xplained Pro Modules * ``CONFIG_SAM4L_XPLAINED_IOMODULE_EXT1=y``: In EXT1, or EXT2 * ``CONFIG_SAM4L_XPLAINED_IOMODULE_EXT2=y`` -Application Configuration -> NSH Library - -* ``CONFIG_NSH_ARCHINIT=y``: Board has architecture-specific initialization - .. note:: If you enable the I/O1 this configuration with USART0 as the console and with @@ -617,7 +613,7 @@ The NX graphics subsystem also needs to be configured: * ``CONFIG_NXFONTS_CHARBITS=7``: 7-bit fonts * ``CONFIG_NXFONT_SANS17X23B=y``: Pick a font (any that will fit) -.. note:: +.. note:: This orientation will put the buttons "above" the LCD. The reverse landscape configuration (CONFIG_LCD_RLANDSCAPE) will "flip" the display so that the @@ -640,18 +636,18 @@ setup for the graphic "Hello, World!" example: * ``CONFIG_EXAMPLES_NXHELLO_BPP=1``: One bit per pixel * ``CONFIG_EXAMPLES_NXHELLO_EXTERNINIT=y``: Special initialization is required. -.. note:: +.. note:: The OLED is monochrome so the only "colors" are black and white. The default "colors" will give you while text on a black background. You can override the faults it you want black text on a while background. -.. warning:: +.. warning:: One issue that I have seen with the NXHello example when running as an NSH command is that it only works the first time. So, after you run the 'nxhello' command one time, you will have to reset the board before you run it again. - + This is clearly some issue with initializing, un-initializing, and then re-initializing. If you want to fix this, patches are quite welcome. @@ -687,10 +683,6 @@ Application Configuration -> Examples * ``CONFIG_EXAMPLES_SLCD_DEVNAME="/dev/slcd0"`` * ``CONFIG_EXAMPLES_SLCD_BUFSIZE=64`` -Application Configuration -> NSH Library - -* ``CONFIG_NSH_ARCHINIT=y`` - .. note:: In order to use the segment LCD you *must* open the ``VLCD_A`` and diff --git a/Documentation/platforms/arm/sama5/boards/sama5d3-xplained/README.txt b/Documentation/platforms/arm/sama5/boards/sama5d3-xplained/README.txt index 287965f1abfac..f19f5c26b1349 100644 --- a/Documentation/platforms/arm/sama5/boards/sama5d3-xplained/README.txt +++ b/Documentation/platforms/arm/sama5/boards/sama5d3-xplained/README.txt @@ -1134,9 +1134,6 @@ AT25 Serial FLASH a lot, but at 20MHz, the behavior is not the same with all CM modules. This lower rate gives more predictable performance. - Application Configuration -> NSH Library - CONFIG_NSH_ARCHINIT=y : NSH board-initialization - Board Selection CONFIG_SAMA5D3XPLAINED_AT25_AUTOMOUNT=y : Mounts AT25 for NSH CONFIG_SAMA5D3XPLAINED_AT25_FTL=y : Create block driver for FAT @@ -1231,9 +1228,6 @@ HSMCI Card Slots Library Routines CONFIG_SCHED_WORKQUEUE=y : Driver needs work queue support - Application Configuration -> NSH Library - CONFIG_NSH_ARCHINIT=y : NSH board-initialization - Using the SD card ----------------- @@ -1374,9 +1368,6 @@ USB High-Speed Device System Type -> ATSAMA5 Peripheral Support CONFIG_SAMA5_UDPHS=y : Enable UDPHS High Speed USB device - Application Configuration -> NSH Library - CONFIG_NSH_ARCHINIT=y : NSH board-initialization - Mass Storage Class ------------------ @@ -1471,7 +1462,6 @@ USB High-Speed Device Application Configuration -> NSH LIbrary: CONFIG_NSH_USBDEV_TRACE=n : No builtin tracing from NSH - CONFIG_NSH_ARCHINIT=y : Automatically start the USB monitor Application Configuration -> System NSH Add-Ons: CONFIG_USBMONITOR=y : Enable the USB monitor daemon @@ -1515,8 +1505,6 @@ USB High-Speed Host CONFIG_SCHED_WORKQUEUE=y : High priority worker thread support is required CONFIG_SCHED_HPWORK=y : - Application Configuration -> NSH Library - CONFIG_NSH_ARCHINIT=y : NSH board-initialization file1: CONFIG_USBHOST_ISOC_DISABLE=y NOTE: When OHCI is selected, the SAMA5 will operate at 384MHz instead of @@ -1553,9 +1541,6 @@ file1: CONFIG_USBHOST_ISOC_DISABLE=y CONFIG_SCHED_WORKQUEUE=y : High priority worker thread support is required CONFIG_SCHED_HPWORK=y : - Application Configuration -> NSH Library - CONFIG_NSH_ARCHINIT=y : NSH board-initialization - USB Hub Support ---------------- @@ -1665,7 +1650,6 @@ file1: CONFIG_USBHOST_ISOC_DISABLE=y Application Configuration -> NSH LIbrary: CONFIG_NSH_USBDEV_TRACE=n : No builtin tracing from NSH - CONFIG_NSH_ARCHINIT=y : Automatically start the USB monitor Application Configuration -> System NSH Add-Ons: CONFIG_USBMONITOR=y : Enable the USB monitor daemon @@ -1821,9 +1805,6 @@ NAND Support Defaults for ROM page table addresses should be okay - Application Configuration -> NSH Library - CONFIG_NSH_ARCHINIT=y : Use architecture-specific initialization - NOTES: 1. WARNING: This will wipe out everything that you may have on the NAND @@ -2868,7 +2849,6 @@ Shields For testing, you can add the following configuration options to enable the analog joystick example at apps/examples/ajoystick: - CONFIG_NSH_ARCHINIT=y CONFIG_EXAMPLES_AJOYSTICK=y CONFIG_EXAMPLES_AJOYSTICK_DEVNAME="/dev/ajoy0" diff --git a/Documentation/platforms/arm/sama5/boards/sama5d3x-ek/README.txt b/Documentation/platforms/arm/sama5/boards/sama5d3x-ek/README.txt index f1a1e176b4f8a..45921aff3d19e 100644 --- a/Documentation/platforms/arm/sama5/boards/sama5d3x-ek/README.txt +++ b/Documentation/platforms/arm/sama5/boards/sama5d3x-ek/README.txt @@ -1176,9 +1176,6 @@ AT25 Serial FLASH a lot, but at 20MHz, the behavior is not the same with all CM modules. This lower rate gives more predictable performance. - Application Configuration -> NSH Library - CONFIG_NSH_ARCHINIT=y : NSH board-initialization - Board Selection CONFIG_SAMA5D3XEK_AT25_BLOCKMOUNT=y : Mounts AT25 for NSH CONFIG_SAMA5D3XEK_AT25_FTL=y : Create block driver for FAT @@ -1276,9 +1273,6 @@ HSMCI Card Slots Library Routines CONFIG_SCHED_WORKQUEUE=y : Driver needs work queue support - Application Configuration -> NSH Library - CONFIG_NSH_ARCHINIT=y : NSH board-initialization - Using the SD card ----------------- @@ -1418,9 +1412,6 @@ USB High-Speed Device System Type -> ATSAMA5 Peripheral Support CONFIG_SAMA5_UDPHS=y : Enable UDPHS High Speed USB device - Application Configuration -> NSH Library - CONFIG_NSH_ARCHINIT=y : NSH board-initialization - Mass Storage Class ------------------ @@ -1508,7 +1499,6 @@ USB High-Speed Device Application Configuration -> NSH LIbrary: CONFIG_NSH_USBDEV_TRACE=n : No builtin tracing from NSH - CONFIG_NSH_ARCHINIT=y : Automatically start the USB monitor Application Configuration -> System NSH Add-Ons: CONFIG_USBMONITOR=y : Enable the USB monitor daemon @@ -1552,9 +1542,6 @@ USB High-Speed Host CONFIG_SCHED_WORKQUEUE=y : High priority worker thread support is required CONFIG_SCHED_HPWORK=y : - Application Configuration -> NSH Library - CONFIG_NSH_ARCHINIT=y : NSH board-initialization - EHCI ---- @@ -1584,9 +1571,6 @@ USB High-Speed Host CONFIG_SCHED_WORKQUEUE=y : High priority worker thread support is required CONFIG_SCHED_HPWORK=y : - Application Configuration -> NSH Library - CONFIG_NSH_ARCHINIT=y : NSH board-initialization - USB Hub Support ---------------- @@ -1692,7 +1676,6 @@ USB High-Speed Host Application Configuration -> NSH LIbrary: CONFIG_NSH_USBDEV_TRACE=n : No builtin tracing from NSH - CONFIG_NSH_ARCHINIT=y : Automatically start the USB monitor Application Configuration -> System NSH Add-Ons: CONFIG_USBMONITOR=y : Enable the USB monitor daemon @@ -1883,9 +1866,6 @@ NAND Support Defaults for ROM page table addresses should be okay - Application Configuration -> NSH Library - CONFIG_NSH_ARCHINIT=y : Use architecture-specific initialization - NOTES: 1. WARNING: This will wipe out everything that you may have on the NAND @@ -2224,9 +2204,6 @@ AT24 Serial EEPROM CONFIG_AT24XX_SIZE=512 : Specifies the AT 24C512 part CONFIG_AT24XX_ADDR=0x53 : AT24 I2C address - Application Configuration -> NSH Library - CONFIG_NSH_ARCHINIT=y : NSH board-initialization - File systems CONFIG_NXFFS=y : Enables the NXFFS file system CONFIG_NXFFS_PREALLOCATED=y : Required diff --git a/Documentation/platforms/arm/sama5/boards/sama5d4-ek/README.txt b/Documentation/platforms/arm/sama5/boards/sama5d4-ek/README.txt index cf50e4d8a24f2..ba171cbbf19a6 100644 --- a/Documentation/platforms/arm/sama5/boards/sama5d4-ek/README.txt +++ b/Documentation/platforms/arm/sama5/boards/sama5d4-ek/README.txt @@ -1533,9 +1533,6 @@ AT25 Serial FLASH a lot, but at 20MHz, the behavior is not the same with all CM modules. This lower rate gives more predictable performance. - Application Configuration -> NSH Library - CONFIG_NSH_ARCHINIT=y : NSH board-initialization - Board Selection CONFIG_SAMA5D4EK_AT25_BLOCKMOUNT=y : Mounts AT25 for NSH CONFIG_SAMA5D4EK_AT25_FTL=y : Create block driver for FAT @@ -1643,7 +1640,6 @@ HSMCI Card Slots CONFIG_SCHED_WORKQUEUE=y : Driver needs work queue support Application Configuration -> NSH Library - CONFIG_NSH_ARCHINIT=y : NSH board-initialization, OR CONFIG_BOARD_LATE_INITIALIZE=y Using the SD card @@ -1788,9 +1784,6 @@ USB High-Speed Device System Type -> ATSAMA5 Peripheral Support CONFIG_SAMA5_UDPHS=y : Enable UDPHS High Speed USB device - Application Configuration -> NSH Library - CONFIG_NSH_ARCHINIT=y : NSH board-initialization - Mass Storage Class ------------------ @@ -1878,7 +1871,6 @@ USB High-Speed Device Application Configuration -> NSH LIbrary: CONFIG_NSH_USBDEV_TRACE=n : No builtin tracing from NSH - CONFIG_NSH_ARCHINIT=y : Automatically start the USB monitor Application Configuration -> System NSH Add-Ons: CONFIG_USBMONITOR=y : Enable the USB monitor daemon @@ -1922,9 +1914,6 @@ USB High-Speed Host CONFIG_SCHED_WORKQUEUE=y : High priority worker thread support is required CONFIG_SCHED_HPWORK=y : - Application Configuration -> NSH Library - CONFIG_NSH_ARCHINIT=y : NSH board-initialization - EHCI ---- @@ -1957,9 +1946,6 @@ USB High-Speed Host CONFIG_SCHED_WORKQUEUE=y : High priority worker thread support is required CONFIG_SCHED_HPWORK=y : - Application Configuration -> NSH Library - CONFIG_NSH_ARCHINIT=y : NSH board-initialization - USB Hub Support ---------------- @@ -2070,7 +2056,6 @@ USB High-Speed Host Application Configuration -> NSH LIbrary: CONFIG_NSH_USBDEV_TRACE=n : No builtin tracing from NSH - CONFIG_NSH_ARCHINIT=y : Automatically start the USB monitor Application Configuration -> System NSH Add-Ons: CONFIG_USBMONITOR=y : Enable the USB monitor daemon @@ -2226,9 +2211,6 @@ NAND Support Defaults for ROM page table addresses should be okay - Application Configuration -> NSH Library - CONFIG_NSH_ARCHINIT=y : Use architecture-specific initialization - NOTES: 1. WARNING: This will wipe out everything that you may have on the NAND diff --git a/Documentation/platforms/arm/samd2l2/boards/samd20-xplained/README.txt b/Documentation/platforms/arm/samd2l2/boards/samd20-xplained/README.txt index 995cbb5d06b06..0f311faff479b 100644 --- a/Documentation/platforms/arm/samd2l2/boards/samd20-xplained/README.txt +++ b/Documentation/platforms/arm/samd2l2/boards/samd20-xplained/README.txt @@ -763,9 +763,6 @@ Configuration sub-directories CONFIG_SAMD20_XPLAINED_IOMODULE=y : I/O1 module is connected CONFIG_SAMD20_XPLAINED_IOMODULE_EXT1=y : I/O1 modules is in EXT1 - Application Configuration -> NSH Library - CONFIG_NSH_ARCHINIT=y : Board has architecture-specific initialization - NOTE: If you enable the I/O1 this configuration with SERCOM4 as the console and with the I/O1 module in EXT1, you *must* remove USART jumper. Otherwise, you have lookpack on SERCOM4 and NSH will *not* diff --git a/Documentation/platforms/arm/samd2l2/boards/samd21-xplained/README.txt b/Documentation/platforms/arm/samd2l2/boards/samd21-xplained/README.txt index fa8c7a502f605..42d9bf53cf2c4 100644 --- a/Documentation/platforms/arm/samd2l2/boards/samd21-xplained/README.txt +++ b/Documentation/platforms/arm/samd2l2/boards/samd21-xplained/README.txt @@ -636,9 +636,6 @@ Configuration sub-directories CONFIG_SAMD21_XPLAINED_IOMODULE=y : I/O1 module is connected CONFIG_SAMD21_XPLAINED_IOMODULE_EXT1=y : I/O1 modules is in EXT1 - Application Configuration -> NSH Library - CONFIG_NSH_ARCHINIT=y : Board has architecture-specific initialization - NOTE: If you enable the I/O1 this configuration with SERCOM4 as the console and with the I/O1 module in EXT1, you *must* remove USART jumper. Otherwise, you have lookpack on SERCOM4 and NSH will *not* diff --git a/Documentation/platforms/arm/samd2l2/boards/saml21-xplained/README.txt b/Documentation/platforms/arm/samd2l2/boards/saml21-xplained/README.txt index d52e2c8742b46..1d2c0e647ebf5 100644 --- a/Documentation/platforms/arm/samd2l2/boards/saml21-xplained/README.txt +++ b/Documentation/platforms/arm/samd2l2/boards/saml21-xplained/README.txt @@ -797,9 +797,6 @@ Configuration sub-directories CONFIG_SAML21_XPLAINED_IOMODULE=y : I/O1 module is connected CONFIG_SAML21_XPLAINED_IOMODULE_EXT2=y : I/O1 modules is in EXT2 - Application Configuration -> NSH Library - CONFIG_NSH_ARCHINIT=y : Board has architecture-specific initialization - NOTE: If you enable the I/O1 this configuration with SERCOM4 as the console and with the I/O1 module in EXT1, you *must* remove USART jumper. Otherwise, you have lookback on SERCOM4 and NSH will *not* diff --git a/Documentation/platforms/arm/samv7/boards/same70-qmtech/README.txt b/Documentation/platforms/arm/samv7/boards/same70-qmtech/README.txt index db32cef39475f..9db1ea4dd3ed3 100644 --- a/Documentation/platforms/arm/samv7/boards/same70-qmtech/README.txt +++ b/Documentation/platforms/arm/samv7/boards/same70-qmtech/README.txt @@ -111,7 +111,6 @@ the SD slots can be enabled with the following settings: CONFIG_SCHED_WORKQUEUE=y : Driver needs work queue support Application Configuration -> NSH Library - CONFIG_NSH_ARCHINIT=y : NSH board-initialization, OR CONFIG_BOARD_LATE_INITIALIZE=y Using the SD card diff --git a/Documentation/platforms/arm/samv7/boards/same70-xplained/README.txt b/Documentation/platforms/arm/samv7/boards/same70-xplained/README.txt index 3abd62ce39e96..de5014f7dba8d 100644 --- a/Documentation/platforms/arm/samv7/boards/same70-xplained/README.txt +++ b/Documentation/platforms/arm/samv7/boards/same70-xplained/README.txt @@ -174,7 +174,6 @@ the SD slots can be enabled with the following settings: CONFIG_SCHED_WORKQUEUE=y : Driver needs work queue support Application Configuration -> NSH Library - CONFIG_NSH_ARCHINIT=y : NSH board-initialization, OR CONFIG_BOARD_LATE_INITIALIZE=y Using the SD card diff --git a/Documentation/platforms/arm/samv7/boards/samv71-xult/index.rst b/Documentation/platforms/arm/samv7/boards/samv71-xult/index.rst index ad824e3ad264f..2c863f9f4e40d 100644 --- a/Documentation/platforms/arm/samv7/boards/samv71-xult/index.rst +++ b/Documentation/platforms/arm/samv7/boards/samv71-xult/index.rst @@ -263,7 +263,6 @@ enabled with the following settings: ``Application Configuration -> NSH Library``:: - CONFIG_NSH_ARCHINIT=y : NSH board-initialization, OR CONFIG_BOARD_LATE_INITIALIZE=y Using the SD card @@ -2007,7 +2006,7 @@ mxtxplnd -------- Configures the NuttShell (``nsh``) located at ``examples/nsh``. - + There are five very similar NSH configurations: - ``knsh``. This is a somewhat simplified version of the nsh configuration diff --git a/Documentation/platforms/arm/samv7/index.rst b/Documentation/platforms/arm/samv7/index.rst index 83e08f6b1a1fe..1f7c01862b917 100644 --- a/Documentation/platforms/arm/samv7/index.rst +++ b/Documentation/platforms/arm/samv7/index.rst @@ -173,7 +173,6 @@ the SD slots can be enabled with the following settings: - ``CONFIG_SCHED_WORKQUEUE=y`` : Driver needs work queue support - Application Configuration -> NSH Library - - ``CONFIG_NSH_ARCHINIT=y`` : NSH board-initialization, OR - ``CONFIG_BOARD_LATE_INITIALIZE=y`` The lower-half of this driver is initialized by calling :c:func:`sdio_initialize`. diff --git a/Documentation/platforms/arm/stm32f1/boards/hymini-stm32/index.rst b/Documentation/platforms/arm/stm32f1/boards/hymini-stm32/index.rst index 8e81833776644..4b399f98b4cdb 100644 --- a/Documentation/platforms/arm/stm32f1/boards/hymini-stm32/index.rst +++ b/Documentation/platforms/arm/stm32f1/boards/hymini-stm32/index.rst @@ -417,8 +417,6 @@ Differences between the two NSH configurations:: nsh> mount -t vfat /dev/mmcsd0 /mnt/sdcard # Restore the mount Failure to do this could result in corruption of the SD card format. - (5) Option CONFIG_NSH_ARCHINIT must be enabled in order to call the SDIO slot - initialization code. usbmsc ------ @@ -454,7 +452,6 @@ NOTES: CONFIG_USBDEV_TRACE=y : Enable USB trace feature CONFIG_USBDEV_TRACE_NRECORDS=128 : Buffer 128 records in memory CONFIG_NSH_USBDEV_TRACE=n : No builtin tracing from NSH - CONFIG_NSH_ARCHINIT=y : Automatically start the USB monitor CONFIG_USBMONITOR=y : Enable the USB monitor daemon CONFIG_USBMONITOR_STACKSIZE=2048 : USB monitor daemon stack size CONFIG_USBMONITOR_PRIORITY=50 : USB monitor daemon priority diff --git a/Documentation/platforms/arm/stm32f1/boards/stm3210e-eval/index.rst b/Documentation/platforms/arm/stm32f1/boards/stm3210e-eval/index.rst index 06cbc7e0b7739..fb218ff3c3b13 100644 --- a/Documentation/platforms/arm/stm32f1/boards/stm3210e-eval/index.rst +++ b/Documentation/platforms/arm/stm32f1/boards/stm3210e-eval/index.rst @@ -129,7 +129,7 @@ events as follows: LED_SIGNAL In a signal handler[3] N/C ON N/C OFF LED_ASSERTION An assertion failed ON ON N/C OFF LED_PANIC The system has crashed N/C N/C N/C ON - LED_IDLE STM32 is is sleep mode + LED_IDLE STM32 is is sleep mode =================== ======================= ======= ======= ======= ====== [1] If LED1, LED2, LED3 are statically on, then NuttX probably failed to boot @@ -186,9 +186,6 @@ configuration options:: CONFIG_LIBM=y CONFIG_LIBC_FLOATINGPOINT=y - Applications -> NSH Library - CONFIG_NSH_ARCHINIT=y - Applications -> System Add-Ons CONFIG_SYSTEM_LM75=y CONFIG_SYSTEM_LM75_DEVNAME="/dev/temp" diff --git a/Documentation/platforms/arm/stm32f1/boards/stm32_tiny/index.rst b/Documentation/platforms/arm/stm32f1/boards/stm32_tiny/index.rst index 9da3a2b7d0d51..d42f547766b33 100644 --- a/Documentation/platforms/arm/stm32f1/boards/stm32_tiny/index.rst +++ b/Documentation/platforms/arm/stm32f1/boards/stm32_tiny/index.rst @@ -323,7 +323,6 @@ NOTES: CONFIG_USBDEV=y : USB device support must be enabled CONFIG_CDCACM=y : The CDC/ACM driver must be built CONFIG_NSH_BUILTIN_APPS=y : NSH built-in application support must be enabled - CONFIG_NSH_ARCHINIT=y : To perform USB initialization 8. Using the USB console. @@ -426,7 +425,6 @@ NOTES: CONFIG_USBDEV_TRACE=y : Enable USB trace feature CONFIG_USBDEV_TRACE_NRECORDS=128 : Buffer 128 records in memory CONFIG_NSH_USBDEV_TRACE=n : No builtin tracing from NSH - CONFIG_NSH_ARCHINIT=y : Automatically start the USB monitor CONFIG_USBMONITOR=y : Enable the USB monitor daemon CONFIG_USBMONITOR_STACKSIZE=2048 : USB monitor daemon stack size CONFIG_USBMONITOR_PRIORITY=50 : USB monitor daemon priority diff --git a/Documentation/platforms/arm/stm32f1/boards/stm32f103-minimum/index.rst b/Documentation/platforms/arm/stm32f1/boards/stm32f103-minimum/index.rst index bb3e4d645f1ae..68819f0f60316 100644 --- a/Documentation/platforms/arm/stm32f1/boards/stm32f103-minimum/index.rst +++ b/Documentation/platforms/arm/stm32f1/boards/stm32f103-minimum/index.rst @@ -85,7 +85,7 @@ Problems with both boards: - No user button This is the board pinout based on its form-factor for the Blue board: - + .. USB ___ @@ -536,7 +536,7 @@ The STM32F103C8 has a USB Device controller, then we can use NuttX support to USB Device. We can the console over USB enabling these options: :: - + System Type ---> STM32 Peripheral Support ---> [*] USB Device @@ -891,7 +891,6 @@ NOTES: CONFIG_USBDEV_TRACE=y : Enable USB trace feature CONFIG_USBDEV_TRACE_NRECORDS=128 : Buffer 128 records in memory CONFIG_NSH_USBDEV_TRACE=n : No builtin tracing from NSH - CONFIG_NSH_ARCHINIT=y : Automatically start the USB monitor CONFIG_USBMONITOR=y : Enable the USB monitor daemon CONFIG_USBMONITOR_STACKSIZE=2048 : USB monitor daemon stack size CONFIG_USBMONITOR_PRIORITY=50 : USB monitor daemon priority diff --git a/Documentation/platforms/arm/stm32f1/boards/viewtool-stm32f107/index.rst b/Documentation/platforms/arm/stm32f1/boards/viewtool-stm32f107/index.rst index 0f6d5f114c269..ab956a36db548 100644 --- a/Documentation/platforms/arm/stm32f1/boards/viewtool-stm32f107/index.rst +++ b/Documentation/platforms/arm/stm32f1/boards/viewtool-stm32f107/index.rst @@ -283,9 +283,6 @@ Configuration (STM32F103 only) Library Routines CONFIG_SCHED_WORKQUEUE=y : Driver needs work queue support - Application Configuration -> NSH Library - CONFIG_NSH_ARCHINIT=y : NSH board-initialization - Using the SD card ----------------- @@ -418,7 +415,6 @@ enabled support for the barometer:: Drivers -> Sensors CONFIG_SENSORS=y CONFIG_SENSORS_MPL115A=y - CONFIG_NSH_ARCHINIT=y Note: this driver uses SPI3 then since PB3 pin is also use to JTAG TDO you need to disable JTAG support to get this driver working:: @@ -769,7 +765,6 @@ todo:: support the MAX3421E: CONFIG_EXPERIMENTAL=y # EXPERIMENTAL required for now (might change) - CONFIG_NSH_ARCHINIT=y # Board level initialization required CONFIG_STM32_SPI1=y # SPI for the MAX3421E (could use SPI2) CONFIG_USBHOST=y # General USB host support CONFIG_USBHOST_ISOC_DISABLE=y # Does not support Isochronous endpoints diff --git a/Documentation/platforms/arm/stm32f2/boards/stm3220g-eval/index.rst b/Documentation/platforms/arm/stm32f2/boards/stm3220g-eval/index.rst index a3c2be5fc8425..521269dc3214f 100644 --- a/Documentation/platforms/arm/stm32f2/boards/stm3220g-eval/index.rst +++ b/Documentation/platforms/arm/stm32f2/boards/stm3220g-eval/index.rst @@ -43,7 +43,7 @@ events as follows: LED_SIGNAL In a signal handler[3] N/C ON N/C OFF LED_ASSERTION An assertion failed ON ON N/C OFF LED_PANIC The system has crashed N/C N/C N/C ON - LED_IDLE STM32 is is sleep mode + LED_IDLE STM32 is is sleep mode =================== ======================= ======= ======= ======= ====== [1] If LED1, LED2, LED3 are statically on, then NuttX probably failed to boot @@ -278,7 +278,7 @@ NOTES: b. Execute 'make menuconfig' in nuttx/ in order to start the reconfiguration process. - + 2. This example assumes that a network is connected. During its initialization, it will try to negotiate the link speed. If you have no network connected when you reset the board, there will be a long @@ -399,8 +399,6 @@ Enable the application configurations that you want to use. As examples:: CONFIG_SCHED_WORKQUEUE : Worker thread support is required for the mass storage class (both host and device). - CONFIG_NSH_ARCHINIT : Architecture specific USB initialization - is needed 11. This configuration requires that jumper JP22 be set to enable RS-232 operation. diff --git a/Documentation/platforms/arm/stm32f3/boards/stm32f3discovery/index.rst b/Documentation/platforms/arm/stm32f3/boards/stm32f3discovery/index.rst index 13b983c2c8905..f835898050271 100644 --- a/Documentation/platforms/arm/stm32f3/boards/stm32f3discovery/index.rst +++ b/Documentation/platforms/arm/stm32f3/boards/stm32f3discovery/index.rst @@ -194,7 +194,6 @@ NOTES: CONFIG_USBDEV=y : USB device support must be enabled CONFIG_CDCACM=y : The CDC/ACM driver must be built CONFIG_NSH_BUILTIN_APPS=y : NSH built-in application support must be enabled - CONFIG_NSH_ARCHINIT=y : To perform USB initialization The CDC/ACM example is included as two NSH "built-in" commands.:: @@ -299,7 +298,6 @@ NOTES: Application Configuration -> NSH LIbrary:: CONFIG_NSH_USBDEV_TRACE=n : No builtin tracing from NSH - CONFIG_NSH_ARCHINIT=y : Automatically start the USB monitor Application Configuration -> System NSH Add-Ons:: CONFIG_USBMONITOR=y : Enable the USB monitor daemon diff --git a/Documentation/platforms/arm/stm32f4/boards/clicker2-stm32/index.rst b/Documentation/platforms/arm/stm32f4/boards/clicker2-stm32/index.rst index b0f63b0ebf8f3..40be36a057637 100644 --- a/Documentation/platforms/arm/stm32f4/boards/clicker2-stm32/index.rst +++ b/Documentation/platforms/arm/stm32f4/boards/clicker2-stm32/index.rst @@ -55,8 +55,8 @@ controls the LEDs: LED_IRQSENABLED Interrupts enabled OFF OFF LED_STACKCREATED Idle stack created ON OFF LED_INIRQ In an interrupt N/C ON - LED_SIGNAL In a signal handler N/C N/C - LED_ASSERTION An assertion failed N/C N/C + LED_SIGNAL In a signal handler N/C N/C + LED_ASSERTION An assertion failed N/C N/C LED_PANIC The system has crashed OFF Blinking LED_IDLE STM32 is is sleep mode N/U N/U =================== ======================= ======== ======== @@ -362,8 +362,6 @@ summarized below: 7. Initialization hooks are provided to enable the MRF24J40 and to register the radio character driver. - CONFIG_NSH_ARCHINIT=y - 8. Configuration instructions: WPAN configuration must be performed using the i8sak program. Detailed instructions are provided in a README.txt file at apps/wireless/ieee802154/i8sak. You should make @@ -776,7 +774,6 @@ NOTES: CONFIG_USBDEV_TRACE=y : Enable USB trace feature CONFIG_USBDEV_TRACE_NRECORDS=128 : Buffer 128 records in memory CONFIG_NSH_USBDEV_TRACE=n : No builtin tracing from NSH - CONFIG_NSH_ARCHINIT=y : Automatically start the USB monitor CONFIG_USBMONITOR=y : Enable the USB monitor daemon CONFIG_USBMONITOR_STACKSIZE=2048 : USB monitor daemon stack size CONFIG_USBMONITOR_PRIORITY=50 : USB monitor daemon priority diff --git a/Documentation/platforms/arm/stm32f4/boards/mikroe-stm32f4/index.rst b/Documentation/platforms/arm/stm32f4/boards/mikroe-stm32f4/index.rst index b66ebe694ffbe..99ef06928f5c9 100644 --- a/Documentation/platforms/arm/stm32f4/boards/mikroe-stm32f4/index.rst +++ b/Documentation/platforms/arm/stm32f4/boards/mikroe-stm32f4/index.rst @@ -348,7 +348,6 @@ NOTES: CONFIG_USBDEV_TRACE=y : Enable USB trace feature CONFIG_USBDEV_TRACE_NRECORDS=128 : Buffer 128 records in memory CONFIG_NSH_USBDEV_TRACE=n : No builtin tracing from NSH - CONFIG_NSH_ARCHINIT=y : Automatically start the USB monitor CONFIG_USBMONITOR=y : Enable the USB monitor daemon CONFIG_USBMONITOR_STACKSIZE=2048 : USB monitor daemon stack size CONFIG_USBMONITOR_PRIORITY=50 : USB monitor daemon priority diff --git a/Documentation/platforms/arm/stm32f4/boards/nucleo-f401re/index.rst b/Documentation/platforms/arm/stm32f4/boards/nucleo-f401re/index.rst index afbc0cfc82a03..15adaf23e9c4e 100644 --- a/Documentation/platforms/arm/stm32f4/boards/nucleo-f401re/index.rst +++ b/Documentation/platforms/arm/stm32f4/boards/nucleo-f401re/index.rst @@ -320,7 +320,6 @@ There is nothing in the configuration that currently uses the joystick. For testing, you can add the following configuration options to enable the analog joystick example at apps/examples/ajoystick:: - CONFIG_NSH_ARCHINIT=y CONFIG_EXAMPLES_AJOYSTICK=y CONFIG_EXAMPLES_AJOYSTICK_DEVNAME="/dev/ajoy0" @@ -360,7 +359,7 @@ NOTES: b. Execute 'make menuconfig' in nuttx/ in order to start the reconfiguration process. - + 2. By default, this configuration uses the ARM EABI toolchain for Linux. That can easily be reconfigured, of course.: diff --git a/Documentation/platforms/arm/stm32f4/boards/nucleo-f411re/index.rst b/Documentation/platforms/arm/stm32f4/boards/nucleo-f411re/index.rst index bb474309aa392..14e1a002196fa 100644 --- a/Documentation/platforms/arm/stm32f4/boards/nucleo-f411re/index.rst +++ b/Documentation/platforms/arm/stm32f4/boards/nucleo-f411re/index.rst @@ -320,7 +320,6 @@ There is nothing in the configuration that currently uses the joystick. For testing, you can add the following configuration options to enable the analog joystick example at apps/examples/ajoystick:: - CONFIG_NSH_ARCHINIT=y CONFIG_EXAMPLES_AJOYSTICK=y CONFIG_EXAMPLES_AJOYSTICK_DEVNAME="/dev/ajoy0" @@ -360,7 +359,7 @@ NOTES: b. Execute 'make menuconfig' in nuttx/ in order to start the reconfiguration process. - + 2. By default, this configuration uses the ARM EABI toolchain for Linux. That can easily be reconfigured, of course.: diff --git a/Documentation/platforms/arm/stm32f4/boards/nucleo-f446re/index.rst b/Documentation/platforms/arm/stm32f4/boards/nucleo-f446re/index.rst index 5c898c5c71620..ae56f58dc1d40 100644 --- a/Documentation/platforms/arm/stm32f4/boards/nucleo-f446re/index.rst +++ b/Documentation/platforms/arm/stm32f4/boards/nucleo-f446re/index.rst @@ -319,7 +319,6 @@ There is nothing in the configuration that currently uses the joystick. For testing, you can add the following configuration options to enable the analog joystick example at apps/examples/ajoystick:: - CONFIG_NSH_ARCHINIT=y CONFIG_EXAMPLES_AJOYSTICK=y CONFIG_EXAMPLES_AJOYSTICK_DEVNAME="/dev/ajoy0" diff --git a/Documentation/platforms/arm/stm32f4/boards/olimex-stm32-p407/index.rst b/Documentation/platforms/arm/stm32f4/boards/olimex-stm32-p407/index.rst index 12288775657bb..99515dc88c4e9 100644 --- a/Documentation/platforms/arm/stm32f4/boards/olimex-stm32-p407/index.rst +++ b/Documentation/platforms/arm/stm32f4/boards/olimex-stm32-p407/index.rst @@ -107,10 +107,6 @@ Library Routines:: CONFIG_SCHED_WORKQUEUE=y : Driver needs work queue support -Application Configuration -> NSH Library:: - - CONFIG_NSH_ARCHINIT=y : NSH board-initialization - Using the SD card ----------------- @@ -437,7 +433,7 @@ NOTES: reliable. 2. Kernel Modules / Shared Libraries - + I used this configuration for testing NuttX kernel modules in the FLAT build with the following configuration additions to the configuration file:: diff --git a/Documentation/platforms/arm/stm32f4/boards/stm3240g-eval/index.rst b/Documentation/platforms/arm/stm32f4/boards/stm3240g-eval/index.rst index d123f86866116..b9d9c192a5c49 100644 --- a/Documentation/platforms/arm/stm32f4/boards/stm3240g-eval/index.rst +++ b/Documentation/platforms/arm/stm32f4/boards/stm3240g-eval/index.rst @@ -601,8 +601,6 @@ NOTES: CONFIG_STM32_SYSCFG=y : Needed for all USB OTF FS support CONFIG_SCHED_WORKQUEUE=y : Worker thread support is required for the mass storage class driver. - CONFIG_NSH_ARCHINIT=y : Architecture specific USB initialization - is needed for NSH CONFIG_FS_FAT=y : Needed by the USB host mass storage class. With those changes, you can use NSH with a FLASH pen driver as shown diff --git a/Documentation/platforms/arm/stm32f4/boards/stm32f429i-disco/index.rst b/Documentation/platforms/arm/stm32f4/boards/stm32f429i-disco/index.rst index 88c6f3dc8df3d..298ce9cee63d6 100644 --- a/Documentation/platforms/arm/stm32f4/boards/stm32f429i-disco/index.rst +++ b/Documentation/platforms/arm/stm32f4/boards/stm32f429i-disco/index.rst @@ -459,7 +459,6 @@ NOTES: CONFIG_USBDEV=y : USB device support must be enabled CONFIG_CDCACM=y : The CDC/ACM driver must be built CONFIG_NSH_BUILTIN_APPS=y : NSH built-in application support must be enabled - CONFIG_NSH_ARCHINIT=y : To perform USB initialization 8. Using the USB console. @@ -482,7 +481,7 @@ NOTES: configuration will also create a NSH USB console but this version will use /dev/console. Instead, it will use the normal /dev/ttyACM0 USB serial device for the console:: - + CONFIG_STM32_OTGFS=y : STM32 OTG FS support CONFIG_USART2_SERIAL_CONSOLE=y : Keep the USART2 console CONFIG_DEV_CONSOLE=y : /dev/console exists (but NSH won't use it) @@ -541,11 +540,7 @@ NOTES: CONFIG_FS_FAT=y : Needed by the USB host mass storage class. Board Selection -> - CONFIG_BOARDCTL=y : Needed for CONFIG_NSH_ARCHINIT - - Application Configuration -> NSH Library - CONFIG_NSH_ARCHINIT=y : Architecture specific USB initialization - : is needed for NSH + CONFIG_BOARDCTL=y With those changes, you can use NSH with a FLASH pen driver as shown belong. Here NSH is started with nothing in the USB host slot: @@ -617,7 +612,7 @@ NOTES: 2. Stack usage make increase when USB hub support is enabled because the nesting depth of certain USB host class logic can increase. - + STATUS: 2015-04-30 Appears to be fully functional. @@ -638,7 +633,7 @@ UnitTest. NOTES: 1. The NxWM window manager can be found here:: - + apps/graphics/NxWidgets/nxwm The NxWM unit test can be found at:: diff --git a/Documentation/platforms/arm/stm32f4/boards/stm32f4discovery/index.rst b/Documentation/platforms/arm/stm32f4/boards/stm32f4discovery/index.rst index 1c2197aa35dca..31e724c4ba76b 100644 --- a/Documentation/platforms/arm/stm32f4/boards/stm32f4discovery/index.rst +++ b/Documentation/platforms/arm/stm32f4/boards/stm32f4discovery/index.rst @@ -1646,7 +1646,6 @@ NOTES: CONFIG_USBDEV=y : USB device support must be enabled CONFIG_CDCACM=y : The CDC/ACM driver must be built CONFIG_NSH_BUILTIN_APPS=y : NSH built-in application support must be enabled - CONFIG_NSH_ARCHINIT=y : To perform USB initialization 7. Using the USB console. @@ -1728,11 +1727,7 @@ NOTES: CONFIG_FS_FAT=y : Needed by the USB host mass storage class. Board Selection -> - CONFIG_BOARDCTL=y : Needed for CONFIG_NSH_ARCHINIT - - Application Configuration -> NSH Library - CONFIG_NSH_ARCHINIT=y : Architecture specific USB initialization - : is needed for NSH + CONFIG_BOARDCTL=y With those changes, you can use NSH with a FLASH pen driver as shown belong. Here NSH is started with nothing in the USB host slot:: @@ -2273,7 +2268,6 @@ NOTES: CONFIG_USBDEV_TRACE=y : Enable USB trace feature CONFIG_USBDEV_TRACE_NRECORDS=128 : Buffer 128 records in memory CONFIG_NSH_USBDEV_TRACE=n : No builtin tracing from NSH - CONFIG_NSH_ARCHINIT=y : Automatically start the USB monitor CONFIG_USBMONITOR=y : Enable the USB monitor daemon CONFIG_USBMONITOR_STACKSIZE=2048 : USB monitor daemon stack size CONFIG_USBMONITOR_PRIORITY=50 : USB monitor daemon priority diff --git a/Documentation/platforms/arm/stm32f7/boards/nucleo-f722ze/index.rst b/Documentation/platforms/arm/stm32f7/boards/nucleo-f722ze/index.rst index a740675219dfa..7beb7bb52a087 100644 --- a/Documentation/platforms/arm/stm32f7/boards/nucleo-f722ze/index.rst +++ b/Documentation/platforms/arm/stm32f7/boards/nucleo-f722ze/index.rst @@ -252,7 +252,7 @@ Since this board is so generic, having a quick way to set the SPI configuration seams in order. So the board provides a quick test that can be selected vi CONFIG_NUCLEO_SPI_TEST that will initialize the selected buses (SPI1-SPI3) and send some text on the bus at -application initialization time board_app_initialize. +application initialization time. SDIO ---- diff --git a/Documentation/platforms/arm/stm32f7/boards/nucleo-f746zg/index.rst b/Documentation/platforms/arm/stm32f7/boards/nucleo-f746zg/index.rst index dd50318b860f0..f9ce45c6e3b74 100644 --- a/Documentation/platforms/arm/stm32f7/boards/nucleo-f746zg/index.rst +++ b/Documentation/platforms/arm/stm32f7/boards/nucleo-f746zg/index.rst @@ -294,7 +294,7 @@ Since this board is so generic, having a quick way to set the SPI configuration seams in order. So the board provides a quick test that can be selected vi CONFIG_NUCLEO_SPI_TEST that will initialize the selected buses (SPI1-SPI3) and send some text on the bus at -application initialization time board_app_initialize. +application initialization time. SDIO ---- diff --git a/Documentation/platforms/arm/stm32f7/boards/nucleo-f767zi/index.rst b/Documentation/platforms/arm/stm32f7/boards/nucleo-f767zi/index.rst index 42ca198ae4b82..ef64085ad76b3 100644 --- a/Documentation/platforms/arm/stm32f7/boards/nucleo-f767zi/index.rst +++ b/Documentation/platforms/arm/stm32f7/boards/nucleo-f767zi/index.rst @@ -296,7 +296,7 @@ Since this board is so generic, having a quick way to set the SPI configuration seams in order. So the board provides a quick test that can be selected vi CONFIG_NUCLEO_SPI_TEST that will initialize the selected buses (SPI1-SPI3) and send some text on the bus at -application initialization time board_app_initialize. +application initialization time. SDIO ---- diff --git a/Documentation/platforms/arm/stm32f7/index.rst b/Documentation/platforms/arm/stm32f7/index.rst index bb8abff95b186..5669353e6a07f 100644 --- a/Documentation/platforms/arm/stm32f7/index.rst +++ b/Documentation/platforms/arm/stm32f7/index.rst @@ -17,7 +17,7 @@ Peripheral Support Notes ========== ======= ===== FLASH Yes PM ? -RCC Yes +RCC Yes GPIO Yes SYSCFG Yes DMA Yes @@ -192,7 +192,7 @@ CAN - CONFIG_CAN_TXFIFOSIZE - The size of the circular tx buffer of CAN messages. Default: 8 - + - CONFIG_CAN_RXFIFOSIZE - The size of the circular rx buffer of CAN messages. Default: 8 @@ -382,7 +382,6 @@ The builtin SPI test facility can be enabled with the following settings:: +CONFIG_NUCLEO_SPI3_TEST_MODE3=y +CONFIG_BOARDCTL=y - +CONFIG_NSH_ARCHINIT=y Development Environment ======================= diff --git a/Documentation/platforms/arm/stm32l1/boards/stm32ldiscovery/index.rst b/Documentation/platforms/arm/stm32l1/boards/stm32ldiscovery/index.rst index 93c5b718bf438..dc3516ff3987d 100644 --- a/Documentation/platforms/arm/stm32l1/boards/stm32ldiscovery/index.rst +++ b/Documentation/platforms/arm/stm32l1/boards/stm32ldiscovery/index.rst @@ -293,7 +293,7 @@ NOTES: CONFIG_WINDOWS_CYGWIN=y : Using Cygwin System Type:: - + CONFIG_ARM_TOOLCHAIN_GNU_EABI=y : GNU EABI toolchain for Windows 4. SLCD. @@ -318,7 +318,6 @@ NOTES: Application Configuration -> NSH Library:: CONFIG_NSH_BUILTIN_APPS=y : Enable builtin apps in NSH - CONFIG_NSH_ARCHINIT=y : Needed to initialize the SLCD Application Configuration -> Examples:: diff --git a/Documentation/platforms/arm/stm32l4/boards/nucleo-l476rg/index.rst b/Documentation/platforms/arm/stm32l4/boards/nucleo-l476rg/index.rst index 5ba30e8676167..17cb93b0dcc15 100644 --- a/Documentation/platforms/arm/stm32l4/boards/nucleo-l476rg/index.rst +++ b/Documentation/platforms/arm/stm32l4/boards/nucleo-l476rg/index.rst @@ -470,7 +470,6 @@ There is nothing in the configuration that currently uses the joystick. For testing, you can add the following configuration options to enable the analog joystick example at apps/examples/ajoystick:: - CONFIG_NSH_ARCHINIT=y CONFIG_EXAMPLES_AJOYSTICK=y CONFIG_EXAMPLES_AJOYSTICK_DEVNAME="/dev/ajoy0" diff --git a/Documentation/platforms/arm/stm32l4/boards/nucleo-l496zg/index.rst b/Documentation/platforms/arm/stm32l4/boards/nucleo-l496zg/index.rst index 67a8e7f217eb4..0080c9db8d29e 100644 --- a/Documentation/platforms/arm/stm32l4/boards/nucleo-l496zg/index.rst +++ b/Documentation/platforms/arm/stm32l4/boards/nucleo-l496zg/index.rst @@ -50,7 +50,7 @@ information about this board. Hardware ======== -Section needs updating +Section needs updating GPIO - there are 144 I/O lines on the STM32L4xxZx with various pins pined out on the Nucleo 144. @@ -193,7 +193,7 @@ Since this board is so generic, having a quick way to vet the SPI configuration seams in order. So the board provides a quick test that can be selected vi CONFIG_NUCLEO_SPI_TEST that will initialize the selected buses (SPI1-SPI3) and send some text on the bus at -application initialization time board_app_initialize. +application initialization time. SDIO ---- diff --git a/Documentation/platforms/arm/stm32l4/boards/stm32l476vg-disco/index.rst b/Documentation/platforms/arm/stm32l4/boards/stm32l476vg-disco/index.rst index da5acc0599099..f3eb6fc33a360 100644 --- a/Documentation/platforms/arm/stm32l4/boards/stm32l476vg-disco/index.rst +++ b/Documentation/platforms/arm/stm32l4/boards/stm32l476vg-disco/index.rst @@ -144,7 +144,7 @@ TTL to RS-232 converter connection: Nucleo CN10 STM32F4x1RE =========== ============ Pin 21 PA9 USART1_RX - Pin 33 PA10 USART1_TX + Pin 33 PA10 USART1_TX Pin 20 GND Pin 8 U5V =========== ============ @@ -181,7 +181,7 @@ TTL to RS-232 converter connection: Nucleo CN9 STM32F4x1RE =========== ============ Pin 1 PA3 USART2_RX - Pin 2 PA2 USART2_TX + Pin 2 PA2 USART2_TX =========== ============ Warning you make need to reverse RX/TX on some RS-232 converters @@ -336,7 +336,6 @@ There is nothing in the configuration that currently uses the joystick. For testing, you can add the following configuration options to enable the analog joystick example at apps/examples/ajoystick:: - CONFIG_NSH_ARCHINIT=y CONFIG_EXAMPLES_AJOYSTICK=y CONFIG_EXAMPLES_AJOYSTICK_DEVNAME="/dev/ajoy0" diff --git a/Documentation/platforms/arm/tiva/boards/dk-tm4c129x/README.txt b/Documentation/platforms/arm/tiva/boards/dk-tm4c129x/README.txt index b3548ef2ac4ae..5038ee1b43faa 100644 --- a/Documentation/platforms/arm/tiva/boards/dk-tm4c129x/README.txt +++ b/Documentation/platforms/arm/tiva/boards/dk-tm4c129x/README.txt @@ -494,9 +494,6 @@ Temperature Sensor CONFIG_SENSORS_LM75=y CONFIG_LM75_I2C=y - Applications -> NSH Library - CONFIG_NSH_ARCHINIT=y - Then you can implement logic like the following to use the temperature sensor: #include @@ -524,9 +521,6 @@ Temperature Sensor CONFIG_LIBM=y CONFIG_LIBC_FLOATINGPOINT=y - Applications -> NSH Library - CONFIG_NSH_ARCHINIT=y - Applications -> System Add-Ons CONFIG_SYSTEM_LM75=y CONFIG_SYSTEM_LM75_DEVNAME="/dev/temp" diff --git a/Documentation/platforms/arm/tiva/boards/tm4c123g-launchpad/README.txt b/Documentation/platforms/arm/tiva/boards/tm4c123g-launchpad/README.txt index a5598beb9f997..a1b3633e8997a 100644 --- a/Documentation/platforms/arm/tiva/boards/tm4c123g-launchpad/README.txt +++ b/Documentation/platforms/arm/tiva/boards/tm4c123g-launchpad/README.txt @@ -116,9 +116,6 @@ AT24 Serial EEPROM CONFIG_AT24XX_SIZE=512 : Specifies the AT 24C512 part CONFIG_AT24XX_ADDR=0x53 : AT24 I2C address - Application Configuration -> NSH Library - CONFIG_NSH_ARCHINIT=y : NSH board-initialization - File systems CONFIG_NXFFS=y : Enables the NXFFS file system CONFIG_NXFFS_PREALLOCATED=y : Required diff --git a/Documentation/platforms/mips/pic32mx/boards/mirtoo/README.txt b/Documentation/platforms/mips/pic32mx/boards/mirtoo/README.txt index 1badaf65752f2..2fce916e80867 100644 --- a/Documentation/platforms/mips/pic32mx/boards/mirtoo/README.txt +++ b/Documentation/platforms/mips/pic32mx/boards/mirtoo/README.txt @@ -913,7 +913,6 @@ Where is one of the following: CONFIG_SST25_SECTOR512=y CONFIG_DISABLE_MOUNTPOINT=n CONFIG_FS_NXFFS=y - CONFIG_NSH_ARCHINIT=y 4. Many operating system features are suppressed to produce a smaller footprint. diff --git a/Documentation/platforms/mips/pic32mx/boards/pic32mx7mmb/README.txt b/Documentation/platforms/mips/pic32mx/boards/pic32mx7mmb/README.txt index 2648dee5e7aed..ec1c4a3d72691 100644 --- a/Documentation/platforms/mips/pic32mx/boards/pic32mx7mmb/README.txt +++ b/Documentation/platforms/mips/pic32mx/boards/pic32mx7mmb/README.txt @@ -617,7 +617,6 @@ Where is one of the following: SD card support is built into this example by default: CONFIG_PIC32MX_SPI1=y - CONFIG_NSH_ARCHINIT=y The SD card can be mounted from the NSH command line as follows: diff --git a/Documentation/platforms/mips/pic32mx/boards/sure-pic32mx/README.txt b/Documentation/platforms/mips/pic32mx/boards/sure-pic32mx/README.txt index 1ecba7a00487f..ad488f4f5f655 100644 --- a/Documentation/platforms/mips/pic32mx/boards/sure-pic32mx/README.txt +++ b/Documentation/platforms/mips/pic32mx/boards/sure-pic32mx/README.txt @@ -738,9 +738,6 @@ Where is one of the following: To enable apps/examples/slcd to test the LCD: - Application Configuration -> NSH Library: - CONFIG_NSH_ARCHINIT=y : Needed to initialize the SLCD - Application Configuration -> Examples: CONFIG_EXAMPLES_SLCD=y : Enable apps/examples/slcd use /dev/lcd1602 CONFIG_EXAMPLES_SLCD_DEVNAME="/dev/lcd1602" @@ -855,7 +852,6 @@ Where is one of the following: Application Configuration -> NSH LIbrary: CONFIG_NSH_USBDEV_TRACE=n : No builtin tracing from NSH - CONFIG_NSH_ARCHINIT=y : Automatically start the USB monitor Application Configuration -> System NSH Add-Ons: CONFIG_USBMONITOR=y : Enable the USB monitor daemon diff --git a/Documentation/reference/user/13_boardctl.rst b/Documentation/reference/user/13_boardctl.rst index 137e57399151b..e9f09849af28f 100644 --- a/Documentation/reference/user/13_boardctl.rst +++ b/Documentation/reference/user/13_boardctl.rst @@ -42,73 +42,55 @@ implementing the :c:func:`board_ioctl` interface. System state control -------------------- -.. c:macro:: BOARDIOC_INIT - - Perform one-time application initialization. - - :Argument: The argument is passed to the - :c:func:`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. - - :Dependencies: Board logic must provide :c:func:`board_app_initialize`. - .. c:macro:: BOARDIOC_POWEROFF Power off the board - + :Argument: Integer value providing power off status information - + :configuration: CONFIG_BOARDCTL_POWEROFF - + :dependencies: Board logic must provide the :c:func:`board_power_off` interface. - + .. c:macro:: BOARDIOC_RESET Reset the board - + :Argument: Integer value providing power off status information - + :configuration: CONFIG_BOARDCTL_RESET - + :dependencies: Board logic must provide the :c:func:`board_reset` interface. - + Power Management ---------------- - + .. c:macro:: BOARDIOC_PM_CONTROL Manage power state transition and query. The supplied argument indicates the specific PM operation to perform, which map to corresponding internal ``pm_`` functions (see :doc:`/components/drivers/special/power/pm/index`). - + With this interface you can interact with PM handling arch/board logic (typically done in IDLE loop) or you can directly manage state transitions from userspace. - + :Argument: A pointer to an instance of :c:struct:`boardioc_pm_ctrl_s`. - + :configuration: CONFIG_PM - + Board information ----------------- - + .. c:macro:: BOARDIOC_UNIQUEID Return a unique ID associated with the board (such as a serial number or a MAC address). - + :Argument: A writable array of size :c:macro:`CONFIG_BOARDCTL_UNIQUEID_SIZE` in which to receive the board unique ID. - + :dependencies: Board logic must provide the :c:func:`board_uniqueid` interface. .. c:macro:: BOARDIOC_MACADDR @@ -120,49 +102,49 @@ Board information :configuration: CONFIG_BOARDCTL_MACADDR :dependencies: Board logic must provide the :c:func:`board_macaddr` interface. - + Filesystems ----------- - + .. c:macro:: BOARDIOC_MKRD Create a RAM disk - + :Argument: Pointer to read-only instance of :c:struct:`boardioc_mkrd_s`. - + :configuration: CONFIG_BOARDCTL_MKRD .. c:macro:: BOARDIOC_ROMDISK Register a ROM disk - + :Argument: Pointer to read-only instance of :c:struct:`boardioc_romdisk_s`. - + :configuration: CONFIG_BOARDCTL_ROMDISK - + Symbol Handling --------------- - + .. c:macro:: BOARDIOC_APP_SYMTAB Select the application symbol table. This symbol table provides the symbol definitions exported to application code from application space. - + :Argument: A pointer to an instance of :c:struct:`boardioc_symtab_s`. - + :configuration: CONFIG_BOARDCTL_APP_SYMTAB - + .. c:macro:: BOARDIOC_OS_SYMTAB Select the OS symbol table. This symbol table provides the symbol definitions exported by the OS to kernel modules. - + :Argument: A pointer to an instance of :c:struct:`boardioc_symtab_s`. - + :configuration: CONFIG_BOARDCTL_OS_SYMTAB - + .. c:macro:: BOARDIOC_BUILTINS Provide the user-space list of built-in applications for @@ -176,86 +158,86 @@ Symbol Handling available. (BINFS is not supportable in KERNEL mode since user-space address have no general meaning that configuration). - + :Argument: A pointer to an instance of :c:struct:`boardioc_builtin_s`. - + :configuration: This command is always available when CONFIG_BUILTIN is enabled, but does nothing unless CONFIG_BUILD_PROTECTED is also selected. - + USB --- - + .. c:macro:: BOARDIOC_USBDEV_CONTROL Manage USB device classes - + :Argument: A pointer to an instance of :c:struct:`boardioc_usbdev_ctrl_s`. - + :configuration: CONFIG_BOARDCTL && CONFIG_BOARDCTL_USBDEVCTRL - + :dependencies: Board logic must provide `board__initialize()`. - + Graphics -------- - + .. c:macro:: BOARDIOC_NX_START Start the NX server - + :Argument: Integer display number to be served by this NXMU instance. - + :configuration: CONFIG_NX - + :dependencies: Base graphics logic provides :c:func:`nxmu_start`. - + .. c:macro:: BOARDIOC_VNC_START Start the NX server and framebuffer driver. - + :Argument: A reference readable instance of :c:struct:`boardioc_vncstart_s`. - + :configuration: CONFIG_VNCSERVER - + :dependencies: VNC server provides :c:func:`nx_vnc_fbinitialize`. - + .. c:macro:: BOARDIOC_NXTERM Create an NX terminal device - + :Argument: A reference readable/writable instance of :c:struct:`boardioc_nxterm_create_s`. - + :configuration: CONFIG_NXTERM - + :dependencies: Base NX terminal logic provides :c:func:`nx_register` and :c:func:`nxtk_register`. - + .. c:macro:: BOARDIOC_NXTERM_IOCTL Create an NX terminal IOCTL command. Normal IOCTLs cannot be be performed in most graphics contexts since the depend on the task holding an open file descriptor - + :Argument: A reference readable/writable instance of :c:struct:`boardioc_nxterm_ioctl_s`. - + :configuration: CONFIG_NXTERM - + :dependencies: Base NX terminal logic provides :c:func:`nxterm_ioctl_tap`. - + Testing ------- - + .. c:macro:: BOARDIOC_TESTSET Access architecture-specific up_testset() operation - + :Argument: A pointer to a write-able spinlock object. On success the preceding spinlock state is returned: 0=unlocked, 1=locked. - + :configuration: CONFIG_BOARDCTL_TESTSET - + :dependencies: Architecture-specific logic provides :c:func:`up_testset`. diff --git a/LICENSE b/LICENSE index 41feb44395e41..f78dcd33b6ea2 100644 --- a/LICENSE +++ b/LICENSE @@ -3216,7 +3216,6 @@ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. boards/arm/lpc2378/olimex-lpc2378/include/board.h -boards/arm/lpc2378/olimex-lpc2378/src/lpc2378_appinit.c boards/arm/lpc2378/olimex-lpc2378/src/lpc2378_leds.c boards/arm/lpc2378/olimex-lpc2378/scripts/ld.script ======================================================= diff --git a/arch/arm/include/cxd56xx/scu.h b/arch/arm/include/cxd56xx/scu.h index bf8c9b7a66944..3316a4e3aabb7 100644 --- a/arch/arm/include/cxd56xx/scu.h +++ b/arch/arm/include/cxd56xx/scu.h @@ -503,16 +503,14 @@ int scu_i2ctransfer(int port, int slave, uint16_t *inst, uint32_t nr_insts, /* Initialize SCU * - * warning: This API called from board_app_initialize(). - * Do not call this API from each sensor drivers. + * WARNING: Do not call this API from each sensor drivers. */ void scu_initialize(void); /* Uninitialize SCU * - * warning: This API called from board_app_initialize(). - * Do not call this API from each sensor drivers. + * WARNING: Do not call this API from each sensor drivers. */ void scu_uninitialize(void); diff --git a/arch/ceva/src/common/ceva_board.c b/arch/ceva/src/common/ceva_board.c index f587a3ba7d596..24962859161d2 100644 --- a/arch/ceva/src/common/ceva_board.c +++ b/arch/ceva/src/common/ceva_board.c @@ -36,12 +36,8 @@ * Pre-processor Definitions ****************************************************************************/ -#if !defined(CONFIG_BOARD_LATE_INITIALIZE) && !defined(CONFIG_NSH_ARCHINIT) -# error CONFIG_BOARD_LATE_INITIALIZE or CONFIG_NSH_ARCHINIT is required for late initialization -#endif - -#if defined(CONFIG_BOARD_LATE_INITIALIZE) && defined(CONFIG_NSH_ARCHINIT) -# error CONFIG_BOARD_LATE_INITIALIZE and CONFIG_NSH_ARCHINIT can not be defined at the same time +#if !defined(CONFIG_BOARD_LATE_INITIALIZE) +# error CONFIG_BOARD_LATE_INITIALIZE is required for late initialization #endif /**************************************************************************** @@ -74,48 +70,6 @@ void board_late_initialize(void) } #endif /* CONFIG_BOARD_LATE_INITIALIZE */ -/**************************************************************************** - * 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 cold 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. - * - ****************************************************************************/ - -#ifdef CONFIG_LIB_BOARDCTL -int board_app_initialize(uintptr_t arg) -{ -# ifdef CONFIG_NSH_ARCHINIT - /* Perform the arch late initialization */ - - ceva_lateinitialize(); - - /* Perform the board late initialization */ - - board_lateinitialize(); -# endif - - return 0; -} -#endif /* CONFIG_LIB_BOARDCTL */ - /**************************************************************************** * Name: board_app_finalinitialize * diff --git a/boards/Kconfig b/boards/Kconfig index c599b666454e0..50ee48cd9916f 100644 --- a/boards/Kconfig +++ b/boards/Kconfig @@ -5270,8 +5270,7 @@ config BOARDCTL bool "Enable boardctl() interface" default n ---help--- - Enables support for the boardctl() interface. Architecture - specific logic must provide board_app_initialize() interface. + Enables support for the boardctl() interface. if BOARDCTL diff --git a/boards/arm/a1x/pcduino-a10/src/CMakeLists.txt b/boards/arm/a1x/pcduino-a10/src/CMakeLists.txt index cc31b93875144..c65ee12639713 100644 --- a/boards/arm/a1x/pcduino-a10/src/CMakeLists.txt +++ b/boards/arm/a1x/pcduino-a10/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS a1x_boot.c a1x_bringup.c a1x_leds.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS a1x_appinit.c) -endif() - if(CONFIG_ARCH_BUTTONS) list(APPEND SRCS a1x_buttons.c) endif() diff --git a/boards/arm/a1x/pcduino-a10/src/Makefile b/boards/arm/a1x/pcduino-a10/src/Makefile index bcaa1debec928..cecb3d5cf0cd3 100644 --- a/boards/arm/a1x/pcduino-a10/src/Makefile +++ b/boards/arm/a1x/pcduino-a10/src/Makefile @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = a1x_boot.c a1x_bringup.c a1x_leds.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += a1x_appinit.c -endif - ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += a1x_buttons.c endif diff --git a/boards/arm/a1x/pcduino-a10/src/a1x_appinit.c b/boards/arm/a1x/pcduino-a10/src/a1x_appinit.c deleted file mode 100644 index 3471ef774ea00..0000000000000 --- a/boards/arm/a1x/pcduino-a10/src/a1x_appinit.c +++ /dev/null @@ -1,80 +0,0 @@ -/**************************************************************************** - * boards/arm/a1x/pcduino-a10/src/a1x_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 - -#include -#include - -#include - -#include "pcduino_a10.h" - -/**************************************************************************** - * 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 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 a1x_bringup(); -#endif -} diff --git a/boards/arm/am335x/beaglebone-black/src/CMakeLists.txt b/boards/arm/am335x/beaglebone-black/src/CMakeLists.txt index 90057ac2ca6fd..f0acea7cbc76b 100644 --- a/boards/arm/am335x/beaglebone-black/src/CMakeLists.txt +++ b/boards/arm/am335x/beaglebone-black/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS am335x_boot.c am335x_bringup.c am335x_leds.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS am335x_appinit.c) -endif() - if(CONFIG_ARCH_BUTTONS) list(APPEND SRCS am335x_buttons.c) endif() diff --git a/boards/arm/am335x/beaglebone-black/src/Makefile b/boards/arm/am335x/beaglebone-black/src/Makefile index 4ee7508a804e0..5002d5d8ca5ff 100644 --- a/boards/arm/am335x/beaglebone-black/src/Makefile +++ b/boards/arm/am335x/beaglebone-black/src/Makefile @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = am335x_boot.c am335x_bringup.c am335x_leds.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += am335x_appinit.c -endif - ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += am335x_buttons.c endif diff --git a/boards/arm/am335x/beaglebone-black/src/am335x_appinit.c b/boards/arm/am335x/beaglebone-black/src/am335x_appinit.c deleted file mode 100644 index 821436013fabf..0000000000000 --- a/boards/arm/am335x/beaglebone-black/src/am335x_appinit.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm/am335x/beaglebone-black/src/am335x_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 - -#include -#include - -#include "beaglebone-black.h" - -/**************************************************************************** - * 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 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 am335x_bringup(); -#endif -} diff --git a/boards/arm/at32/at32f437-mini/configs/adc/defconfig b/boards/arm/at32/at32f437-mini/configs/adc/defconfig index 47020f4649c42..b8747f0224dc5 100644 --- a/boards/arm/at32/at32f437-mini/configs/adc/defconfig +++ b/boards/arm/at32/at32f437-mini/configs/adc/defconfig @@ -22,7 +22,6 @@ CONFIG_AT32_ADC1=y CONFIG_AT32_JTAG_SW_ENABLE=y CONFIG_AT32_PWR=y CONFIG_AT32_USART1=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=26145 CONFIG_BUILTIN=y CONFIG_EXAMPLES_ADC=y diff --git a/boards/arm/at32/at32f437-mini/configs/can_char/defconfig b/boards/arm/at32/at32f437-mini/configs/can_char/defconfig index 821f7d207535b..6677c90d6bef0 100644 --- a/boards/arm/at32/at32f437-mini/configs/can_char/defconfig +++ b/boards/arm/at32/at32f437-mini/configs/can_char/defconfig @@ -20,7 +20,6 @@ CONFIG_AT32_CAN1=y CONFIG_AT32_JTAG_SW_ENABLE=y CONFIG_AT32_PWR=y CONFIG_AT32_USART1=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=26145 CONFIG_BUILTIN=y CONFIG_EXAMPLES_CAN=y diff --git a/boards/arm/at32/at32f437-mini/configs/can_socket/defconfig b/boards/arm/at32/at32f437-mini/configs/can_socket/defconfig index d494cd99b06d1..a35c092537e33 100644 --- a/boards/arm/at32/at32f437-mini/configs/can_socket/defconfig +++ b/boards/arm/at32/at32f437-mini/configs/can_socket/defconfig @@ -23,7 +23,6 @@ CONFIG_AT32_CAN_SOCKET=y CONFIG_AT32_JTAG_SW_ENABLE=y CONFIG_AT32_PWR=y CONFIG_AT32_USART1=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=26145 CONFIG_BUILTIN=y CONFIG_CAN=y diff --git a/boards/arm/at32/at32f437-mini/configs/eth/defconfig b/boards/arm/at32/at32f437-mini/configs/eth/defconfig index 1dfa699dd0f08..265d88408e8f2 100644 --- a/boards/arm/at32/at32f437-mini/configs/eth/defconfig +++ b/boards/arm/at32/at32f437-mini/configs/eth/defconfig @@ -29,7 +29,6 @@ CONFIG_AT32_PHYSR_ALTMODE=0x001c CONFIG_AT32_PWR=y CONFIG_AT32_RMII_EXTCLK=y CONFIG_AT32_USART1=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=26145 CONFIG_BUILTIN=y CONFIG_ETH0_PHY_LAN8720=y diff --git a/boards/arm/at32/at32f437-mini/configs/msc/defconfig b/boards/arm/at32/at32f437-mini/configs/msc/defconfig index 5a28ed623586f..29d16c8b9d4fd 100644 --- a/boards/arm/at32/at32f437-mini/configs/msc/defconfig +++ b/boards/arm/at32/at32f437-mini/configs/msc/defconfig @@ -22,7 +22,6 @@ CONFIG_AT32_OTGFS=y CONFIG_AT32_PWR=y CONFIG_AT32_USART1=y CONFIG_AT32_USBHOST=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=26145 CONFIG_BUILTIN=y CONFIG_EXAMPLES_HELLO=y diff --git a/boards/arm/at32/at32f437-mini/configs/nsh/defconfig b/boards/arm/at32/at32f437-mini/configs/nsh/defconfig index c9305183909d3..07f6c64ddf6bc 100644 --- a/boards/arm/at32/at32f437-mini/configs/nsh/defconfig +++ b/boards/arm/at32/at32f437-mini/configs/nsh/defconfig @@ -19,7 +19,6 @@ CONFIG_ARCH_STACKDUMP=y CONFIG_AT32_JTAG_SW_ENABLE=y CONFIG_AT32_PWR=y CONFIG_AT32_USART1=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=26145 CONFIG_BUILTIN=y CONFIG_EXAMPLES_HELLO=y diff --git a/boards/arm/at32/at32f437-mini/configs/pwm/defconfig b/boards/arm/at32/at32f437-mini/configs/pwm/defconfig index db6f2389c77ef..9f2b9920ac54d 100644 --- a/boards/arm/at32/at32f437-mini/configs/pwm/defconfig +++ b/boards/arm/at32/at32f437-mini/configs/pwm/defconfig @@ -22,7 +22,6 @@ CONFIG_AT32_TIM20=y CONFIG_AT32_TIM20_CH1OUT=y CONFIG_AT32_TIM20_PWM=y CONFIG_AT32_USART1=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=26145 CONFIG_BUILTIN=y CONFIG_EXAMPLES_HELLO=y diff --git a/boards/arm/at32/at32f437-mini/configs/rtc/defconfig b/boards/arm/at32/at32f437-mini/configs/rtc/defconfig index caa433fdd742c..034e784ea4000 100644 --- a/boards/arm/at32/at32f437-mini/configs/rtc/defconfig +++ b/boards/arm/at32/at32f437-mini/configs/rtc/defconfig @@ -21,7 +21,6 @@ CONFIG_AT32_PWR=y CONFIG_AT32_RTC=y CONFIG_AT32_RTC_LSICLOCK=y CONFIG_AT32_USART1=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=26145 CONFIG_BUILTIN=y CONFIG_EXAMPLES_HELLO=y diff --git a/boards/arm/at32/at32f437-mini/configs/sdcard/defconfig b/boards/arm/at32/at32f437-mini/configs/sdcard/defconfig index 8b8483b11f2ea..73f97b9682212 100644 --- a/boards/arm/at32/at32f437-mini/configs/sdcard/defconfig +++ b/boards/arm/at32/at32f437-mini/configs/sdcard/defconfig @@ -24,7 +24,6 @@ CONFIG_AT32_JTAG_SW_ENABLE=y CONFIG_AT32_PWR=y CONFIG_AT32_SDIO=y CONFIG_AT32_USART1=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=26145 CONFIG_BUILTIN=y CONFIG_EXAMPLES_HELLO=y diff --git a/boards/arm/at32/at32f437-mini/configs/systemview/defconfig b/boards/arm/at32/at32f437-mini/configs/systemview/defconfig index c19d522645b34..0e2c78638d96b 100644 --- a/boards/arm/at32/at32f437-mini/configs/systemview/defconfig +++ b/boards/arm/at32/at32f437-mini/configs/systemview/defconfig @@ -19,7 +19,6 @@ CONFIG_ARCH_STACKDUMP=y CONFIG_AT32_JTAG_SW_ENABLE=y CONFIG_AT32_PWR=y CONFIG_AT32_USART1=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=26145 CONFIG_BUILTIN=y CONFIG_DRIVERS_NOTE=y diff --git a/boards/arm/at32/at32f437-mini/configs/usbnsh/defconfig b/boards/arm/at32/at32f437-mini/configs/usbnsh/defconfig index 94531bfe9fbce..b234bb33cc955 100644 --- a/boards/arm/at32/at32f437-mini/configs/usbnsh/defconfig +++ b/boards/arm/at32/at32f437-mini/configs/usbnsh/defconfig @@ -21,7 +21,6 @@ CONFIG_AT32_OTGFS=y CONFIG_AT32_PWR=y CONFIG_AT32_USART1=y CONFIG_BOARDCTL_USBDEVCTRL=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=26145 CONFIG_BUILTIN=y CONFIG_CDCACM=y diff --git a/boards/arm/at32/at32f437-mini/configs/usbserial/defconfig b/boards/arm/at32/at32f437-mini/configs/usbserial/defconfig index b64a7280d7945..700a1cb7af119 100644 --- a/boards/arm/at32/at32f437-mini/configs/usbserial/defconfig +++ b/boards/arm/at32/at32f437-mini/configs/usbserial/defconfig @@ -20,7 +20,6 @@ CONFIG_AT32_JTAG_SW_ENABLE=y CONFIG_AT32_OTGFS=y CONFIG_AT32_PWR=y CONFIG_AT32_USART1=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=26145 CONFIG_BUILTIN=y CONFIG_CDCACM=y diff --git a/boards/arm/at32/at32f437-mini/src/Makefile b/boards/arm/at32/at32f437-mini/src/Makefile index fe4346a648a22..291e04270540a 100644 --- a/boards/arm/at32/at32f437-mini/src/Makefile +++ b/boards/arm/at32/at32f437-mini/src/Makefile @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = at32_boot.c at32_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) - CSRCS += at32_appinit.c -endif - ifeq ($(CONFIG_DEV_GPIO),y) CSRCS += at32_gpio.c endif diff --git a/boards/arm/at32/at32f437-mini/src/at32_appinit.c b/boards/arm/at32/at32f437-mini/src/at32_appinit.c deleted file mode 100644 index 777531517b6cd..0000000000000 --- a/boards/arm/at32/at32f437-mini/src/at32_appinit.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm/at32/at32f437-mini/src/at32_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 - -#include -#include - -#include "at32f437-mini.h" - -/**************************************************************************** - * 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 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 at32_bringup(); -#endif -} diff --git a/boards/arm/c5471/c5471evm/src/c5471_leds.c b/boards/arm/c5471/c5471evm/src/c5471_leds.c index c90c4e18d6042..a9483aa8e5517 100644 --- a/boards/arm/c5471/c5471evm/src/c5471_leds.c +++ b/boards/arm/c5471/c5471evm/src/c5471_leds.c @@ -96,3 +96,22 @@ void board_autoled_off(int led) } #endif /* CONFIG_ARCH_LEDS */ + +/**************************************************************************** + * 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ +} +#endif /* CONFIG_BOARD_LATE_INITIALIZE */ diff --git a/boards/arm/csk6/csk6011a-nano/configs/nsh/defconfig b/boards/arm/csk6/csk6011a-nano/configs/nsh/defconfig index d61687b0b2127..a0194ab9a71e5 100644 --- a/boards/arm/csk6/csk6011a-nano/configs/nsh/defconfig +++ b/boards/arm/csk6/csk6011a-nano/configs/nsh/defconfig @@ -22,7 +22,6 @@ CONFIG_ARCH_CHIP="csk6" CONFIG_ARCH_CHIP_CSK6=y CONFIG_ARCH_STACKDUMP=y CONFIG_ARMV8M_SYSTICK=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y CONFIG_DEBUG_FEATURES=y diff --git a/boards/arm/csk6/csk6011a-nano/src/CMakeLists.txt b/boards/arm/csk6/csk6011a-nano/src/CMakeLists.txt index f8c5639559f0f..4941a4d551f2e 100644 --- a/boards/arm/csk6/csk6011a-nano/src/CMakeLists.txt +++ b/boards/arm/csk6/csk6011a-nano/src/CMakeLists.txt @@ -20,7 +20,7 @@ # # ############################################################################## -set(SRCS csk6011a_nano_appinit.c) +set(SRCS csk6011a_nano_boardinit.c) target_sources(board PRIVATE ${SRCS}) diff --git a/boards/arm/csk6/csk6011a-nano/src/Makefile b/boards/arm/csk6/csk6011a-nano/src/Makefile index ccece7f7ad26a..31b18025fa95a 100644 --- a/boards/arm/csk6/csk6011a-nano/src/Makefile +++ b/boards/arm/csk6/csk6011a-nano/src/Makefile @@ -22,6 +22,6 @@ include $(TOPDIR)/Make.defs -CSRCS = csk6011a_nano_appinit.c +CSRCS = csk6011a_nano_boardinit.c include $(TOPDIR)/boards/Board.mk diff --git a/boards/arm/csk6/csk6011a-nano/src/csk6011a_nano_appinit.c b/boards/arm/csk6/csk6011a-nano/src/csk6011a_nano_boardinit.c similarity index 67% rename from boards/arm/csk6/csk6011a-nano/src/csk6011a_nano_appinit.c rename to boards/arm/csk6/csk6011a-nano/src/csk6011a_nano_boardinit.c index 482c6991344cc..9809a14bc7892 100644 --- a/boards/arm/csk6/csk6011a-nano/src/csk6011a_nano_appinit.c +++ b/boards/arm/csk6/csk6011a-nano/src/csk6011a_nano_boardinit.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/csk6/csk6011a-nano/src/csk6011a_nano_appinit.c + * boards/arm/csk6/csk6011a-nano/src/csk6011a_nano_boardinit.c * * SPDX-License-Identifier: Apache-2.0 * @@ -26,7 +26,12 @@ #include +#include + +#include +#include #include + #include /**************************************************************************** @@ -60,46 +65,23 @@ static const char verification_table[] VERIFICATION_TABLE_ATTR = ****************************************************************************/ /**************************************************************************** - * Name: board_app_initialize + * Name: board_late_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 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. + * 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_intitialize() 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. * ****************************************************************************/ -int board_app_initialize(uintptr_t arg) -{ - /* Perform board-specific initialization */ - - /* TODO */ - - return OK; -} - #ifdef CONFIG_BOARD_LATE_INITIALIZE - void board_late_initialize(void) { /* Perform board-specific initialization */ /* TODO */ } - #endif diff --git a/boards/arm/cxd56xx/common/src/cxd56_usbmsc.c b/boards/arm/cxd56xx/common/src/cxd56_usbmsc.c index 0f6b95b92fb56..b84b4373cf1ec 100644 --- a/boards/arm/cxd56xx/common/src/cxd56_usbmsc.c +++ b/boards/arm/cxd56xx/common/src/cxd56_usbmsc.c @@ -54,8 +54,7 @@ int board_usbmsc_initialize(int port) { /* If system/usbmsc is built as an NSH command, then SD slot should - * already have been initialized in board_app_initialize() - * (see stm32_appinit.c). + * already have been initialized. * In this case, there is nothing further to be done here. */ diff --git a/boards/arm/cxd56xx/spresense/configs/audio/defconfig b/boards/arm/cxd56xx/spresense/configs/audio/defconfig index d75749f84e1c5..2c6e8dba0b723 100644 --- a/boards/arm/cxd56xx/spresense/configs/audio/defconfig +++ b/boards/arm/cxd56xx/spresense/configs/audio/defconfig @@ -50,7 +50,6 @@ CONFIG_MTD_SMART=y CONFIG_MTD_SMART_ENABLE_CRC=y CONFIG_MTD_SMART_SECTOR_SIZE=4096 CONFIG_NAME_MAX=128 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/cxd56xx/spresense/configs/audio_sdk/defconfig b/boards/arm/cxd56xx/spresense/configs/audio_sdk/defconfig index ed3e8ca10a98f..56f7acb896ce1 100644 --- a/boards/arm/cxd56xx/spresense/configs/audio_sdk/defconfig +++ b/boards/arm/cxd56xx/spresense/configs/audio_sdk/defconfig @@ -47,7 +47,6 @@ CONFIG_MTD_SMART=y CONFIG_MTD_SMART_ENABLE_CRC=y CONFIG_MTD_SMART_SECTOR_SIZE=4096 CONFIG_NAME_MAX=128 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/cxd56xx/spresense/configs/camera/defconfig b/boards/arm/cxd56xx/spresense/configs/camera/defconfig index bf1051da17f32..9d526b086f7ab 100644 --- a/boards/arm/cxd56xx/spresense/configs/camera/defconfig +++ b/boards/arm/cxd56xx/spresense/configs/camera/defconfig @@ -50,7 +50,6 @@ CONFIG_MTD_SMART=y CONFIG_MTD_SMART_ENABLE_CRC=y CONFIG_MTD_SMART_SECTOR_SIZE=4096 CONFIG_NAME_MAX=128 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/cxd56xx/spresense/configs/charger/defconfig b/boards/arm/cxd56xx/spresense/configs/charger/defconfig index 898250a0ce16d..bfaa2747f79af 100644 --- a/boards/arm/cxd56xx/spresense/configs/charger/defconfig +++ b/boards/arm/cxd56xx/spresense/configs/charger/defconfig @@ -33,7 +33,6 @@ CONFIG_FS_PROCFS_REGISTER=y CONFIG_HAVE_CXX=y CONFIG_HAVE_CXXINITIALIZE=y CONFIG_INIT_ENTRYPOINT="spresense_main" -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/cxd56xx/spresense/configs/example_camera/defconfig b/boards/arm/cxd56xx/spresense/configs/example_camera/defconfig index 3f464b10eb384..42f747d760184 100644 --- a/boards/arm/cxd56xx/spresense/configs/example_camera/defconfig +++ b/boards/arm/cxd56xx/spresense/configs/example_camera/defconfig @@ -59,7 +59,6 @@ CONFIG_MTD_SMART=y CONFIG_MTD_SMART_ENABLE_CRC=y CONFIG_MTD_SMART_SECTOR_SIZE=4096 CONFIG_NAME_MAX=128 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_NX=y diff --git a/boards/arm/cxd56xx/spresense/configs/example_lcd/defconfig b/boards/arm/cxd56xx/spresense/configs/example_lcd/defconfig index 3c3483693483b..8567fca82ca76 100644 --- a/boards/arm/cxd56xx/spresense/configs/example_lcd/defconfig +++ b/boards/arm/cxd56xx/spresense/configs/example_lcd/defconfig @@ -66,7 +66,6 @@ CONFIG_MTD_SMART=y CONFIG_MTD_SMART_ENABLE_CRC=y CONFIG_MTD_SMART_SECTOR_SIZE=4096 CONFIG_NAME_MAX=128 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_NX=y diff --git a/boards/arm/cxd56xx/spresense/configs/fmsynth/defconfig b/boards/arm/cxd56xx/spresense/configs/fmsynth/defconfig index 4dba8ff2664d5..747e7cced06df 100644 --- a/boards/arm/cxd56xx/spresense/configs/fmsynth/defconfig +++ b/boards/arm/cxd56xx/spresense/configs/fmsynth/defconfig @@ -54,7 +54,6 @@ CONFIG_MTD_SMART=y CONFIG_MTD_SMART_ENABLE_CRC=y CONFIG_MTD_SMART_SECTOR_SIZE=4096 CONFIG_NAME_MAX=128 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/cxd56xx/spresense/configs/lcd/defconfig b/boards/arm/cxd56xx/spresense/configs/lcd/defconfig index fbdac76bd7073..501089a0edecc 100644 --- a/boards/arm/cxd56xx/spresense/configs/lcd/defconfig +++ b/boards/arm/cxd56xx/spresense/configs/lcd/defconfig @@ -57,7 +57,6 @@ CONFIG_MTD_SMART=y CONFIG_MTD_SMART_ENABLE_CRC=y CONFIG_MTD_SMART_SECTOR_SIZE=4096 CONFIG_NAME_MAX=128 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/cxd56xx/spresense/configs/lte/defconfig b/boards/arm/cxd56xx/spresense/configs/lte/defconfig index 0c3779956f7a0..5bc1cf88dc8a8 100644 --- a/boards/arm/cxd56xx/spresense/configs/lte/defconfig +++ b/boards/arm/cxd56xx/spresense/configs/lte/defconfig @@ -63,7 +63,6 @@ CONFIG_NETUTILS_WEBCLIENT=y CONFIG_NET_IPv6=y CONFIG_NET_USRSOCK=y CONFIG_NET_USRSOCK_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/cxd56xx/spresense/configs/mpy/defconfig b/boards/arm/cxd56xx/spresense/configs/mpy/defconfig index bfe800900a9d7..e70fe9d5e3e12 100644 --- a/boards/arm/cxd56xx/spresense/configs/mpy/defconfig +++ b/boards/arm/cxd56xx/spresense/configs/mpy/defconfig @@ -60,7 +60,6 @@ CONFIG_MTD_SMART=y CONFIG_MTD_SMART_ENABLE_CRC=y CONFIG_MTD_SMART_SECTOR_SIZE=4096 CONFIG_NAME_MAX=128 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/cxd56xx/spresense/configs/nsh/defconfig b/boards/arm/cxd56xx/spresense/configs/nsh/defconfig index f7047ed7546d4..262f071b331b0 100644 --- a/boards/arm/cxd56xx/spresense/configs/nsh/defconfig +++ b/boards/arm/cxd56xx/spresense/configs/nsh/defconfig @@ -30,7 +30,6 @@ CONFIG_FS_PROCFS_REGISTER=y CONFIG_HAVE_CXX=y CONFIG_HAVE_CXXINITIALIZE=y CONFIG_INIT_ENTRYPOINT="spresense_main" -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/cxd56xx/spresense/configs/nsh_automount/defconfig b/boards/arm/cxd56xx/spresense/configs/nsh_automount/defconfig index 961420837acc1..e42b3f90f6438 100644 --- a/boards/arm/cxd56xx/spresense/configs/nsh_automount/defconfig +++ b/boards/arm/cxd56xx/spresense/configs/nsh_automount/defconfig @@ -36,7 +36,6 @@ CONFIG_FS_PROCFS_REGISTER=y CONFIG_HAVE_CXX=y CONFIG_HAVE_CXXINITIALIZE=y CONFIG_INIT_ENTRYPOINT="spresense_main" -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/cxd56xx/spresense/configs/nsh_trace/defconfig b/boards/arm/cxd56xx/spresense/configs/nsh_trace/defconfig index 6cacf93c53c75..811f5aa07232b 100644 --- a/boards/arm/cxd56xx/spresense/configs/nsh_trace/defconfig +++ b/boards/arm/cxd56xx/spresense/configs/nsh_trace/defconfig @@ -32,7 +32,6 @@ CONFIG_FS_PROCFS_REGISTER=y CONFIG_HAVE_CXX=y CONFIG_HAVE_CXXINITIALIZE=y CONFIG_INIT_ENTRYPOINT="spresense_main" -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/cxd56xx/spresense/configs/rndis/defconfig b/boards/arm/cxd56xx/spresense/configs/rndis/defconfig index 9b398a3db0df7..db4035518b3dc 100644 --- a/boards/arm/cxd56xx/spresense/configs/rndis/defconfig +++ b/boards/arm/cxd56xx/spresense/configs/rndis/defconfig @@ -99,7 +99,6 @@ CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NFS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/arm/cxd56xx/spresense/configs/rndis_composite/defconfig b/boards/arm/cxd56xx/spresense/configs/rndis_composite/defconfig index 131740f0cc2c1..68f019511cf26 100644 --- a/boards/arm/cxd56xx/spresense/configs/rndis_composite/defconfig +++ b/boards/arm/cxd56xx/spresense/configs/rndis_composite/defconfig @@ -101,7 +101,6 @@ CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NFS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/arm/cxd56xx/spresense/configs/rndis_smp/defconfig b/boards/arm/cxd56xx/spresense/configs/rndis_smp/defconfig index 0f81eb2e36faf..7992084cc4636 100644 --- a/boards/arm/cxd56xx/spresense/configs/rndis_smp/defconfig +++ b/boards/arm/cxd56xx/spresense/configs/rndis_smp/defconfig @@ -23,7 +23,6 @@ CONFIG_AUDIO=y CONFIG_AUDIO_CXD56=y CONFIG_BOARDCTL_RESET=y CONFIG_BOARDCTL_USBDEVCTRL=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=5434 CONFIG_BOOT_RUNFROMISRAM=y CONFIG_BUILTIN=y @@ -98,7 +97,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NFS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/arm/cxd56xx/spresense/configs/smp/defconfig b/boards/arm/cxd56xx/spresense/configs/smp/defconfig index 0b9c1fb2a90f9..f60d5f6332f11 100644 --- a/boards/arm/cxd56xx/spresense/configs/smp/defconfig +++ b/boards/arm/cxd56xx/spresense/configs/smp/defconfig @@ -17,7 +17,6 @@ CONFIG_ARCH_INTERRUPTSTACK=2048 CONFIG_ARCH_LEDS_CPU_ACTIVITY=y CONFIG_ARCH_STACKDUMP=y CONFIG_BOARDCTL_RESET=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=5434 CONFIG_BOOT_RUNFROMISRAM=y CONFIG_BUILTIN=y @@ -35,7 +34,6 @@ CONFIG_FS_PROCFS_REGISTER=y CONFIG_HAVE_CXX=y CONFIG_HAVE_CXXINITIALIZE=y CONFIG_INIT_ENTRYPOINT="spresense_main" -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/cxd56xx/spresense/configs/usbmsc/defconfig b/boards/arm/cxd56xx/spresense/configs/usbmsc/defconfig index 76884023d966c..690428daddd51 100644 --- a/boards/arm/cxd56xx/spresense/configs/usbmsc/defconfig +++ b/boards/arm/cxd56xx/spresense/configs/usbmsc/defconfig @@ -52,7 +52,6 @@ CONFIG_MTD_SMART=y CONFIG_MTD_SMART_ENABLE_CRC=y CONFIG_MTD_SMART_SECTOR_SIZE=4096 CONFIG_NAME_MAX=128 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/cxd56xx/spresense/configs/usbnsh/defconfig b/boards/arm/cxd56xx/spresense/configs/usbnsh/defconfig index 431a763a58c3e..a3a0d2478c51c 100644 --- a/boards/arm/cxd56xx/spresense/configs/usbnsh/defconfig +++ b/boards/arm/cxd56xx/spresense/configs/usbnsh/defconfig @@ -47,7 +47,6 @@ CONFIG_MTD_SMART=y CONFIG_MTD_SMART_ENABLE_CRC=y CONFIG_MTD_SMART_SECTOR_SIZE=4096 CONFIG_NAME_MAX=128 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/cxd56xx/spresense/configs/wifi/defconfig b/boards/arm/cxd56xx/spresense/configs/wifi/defconfig index 811b9d5536d00..53df2500306f7 100644 --- a/boards/arm/cxd56xx/spresense/configs/wifi/defconfig +++ b/boards/arm/cxd56xx/spresense/configs/wifi/defconfig @@ -104,7 +104,6 @@ CONFIG_NET_USRSOCK=y CONFIG_NET_USRSOCK_PREALLOC_CONNS=16 CONFIG_NET_USRSOCK_UDP=y CONFIG_NFS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_DISABLE_NSLOOKUP=y diff --git a/boards/arm/cxd56xx/spresense/configs/wifi_smp/defconfig b/boards/arm/cxd56xx/spresense/configs/wifi_smp/defconfig index 1f99fb17eecad..ba5e8bcd9e503 100644 --- a/boards/arm/cxd56xx/spresense/configs/wifi_smp/defconfig +++ b/boards/arm/cxd56xx/spresense/configs/wifi_smp/defconfig @@ -24,7 +24,6 @@ CONFIG_ARCH_STACKDUMP=y CONFIG_AUDIO=y CONFIG_AUDIO_CXD56=y CONFIG_BOARDCTL_RESET=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=5434 CONFIG_BOOT_RUNFROMISRAM=y CONFIG_BUILTIN=y @@ -107,7 +106,6 @@ CONFIG_NET_USRSOCK=y CONFIG_NET_USRSOCK_PREALLOC_CONNS=16 CONFIG_NET_USRSOCK_UDP=y CONFIG_NFS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_DISABLE_NSLOOKUP=y diff --git a/boards/arm/cxd56xx/spresense/src/CMakeLists.txt b/boards/arm/cxd56xx/spresense/src/CMakeLists.txt index 25f089b3f0d51..ea80531c4cf63 100644 --- a/boards/arm/cxd56xx/spresense/src/CMakeLists.txt +++ b/boards/arm/cxd56xx/spresense/src/CMakeLists.txt @@ -22,12 +22,8 @@ set(SRCS) -set(SRCS cxd56_main.c cxd56_clock.c cxd56_bringup.c) - -if(CONFIG_BOARDCTL) - list(APPEND SRCS cxd56_appinit.c) - list(APPEND SRCS cxd56_power.c) -endif() +set(SRCS cxd56_main.c cxd56_clock.c cxd56_bringup.c cxd56_boardinit.c + cxd56_power.c) if(CONFIG_BOARDCTL_IOCTL) list(APPEND SRCS cxd56_ioctl.c) diff --git a/boards/arm/cxd56xx/spresense/src/Make.defs b/boards/arm/cxd56xx/spresense/src/Make.defs index 06e14e890d8e2..3fc13a2db2aa1 100644 --- a/boards/arm/cxd56xx/spresense/src/Make.defs +++ b/boards/arm/cxd56xx/spresense/src/Make.defs @@ -23,11 +23,8 @@ CSRCS += cxd56_main.c CSRCS += cxd56_clock.c CSRCS += cxd56_bringup.c - -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += cxd56_appinit.c +CSRCS += cxd56_boardinit.c CSRCS += cxd56_power.c -endif ifeq ($(CONFIG_BOARDCTL_IOCTL),y) CSRCS += cxd56_ioctl.c diff --git a/boards/arm/cxd56xx/spresense/src/cxd56_appinit.c b/boards/arm/cxd56xx/spresense/src/cxd56_appinit.c deleted file mode 100644 index e1d29d36c47d2..0000000000000 --- a/boards/arm/cxd56xx/spresense/src/cxd56_appinit.c +++ /dev/null @@ -1,104 +0,0 @@ -/**************************************************************************** - * boards/arm/cxd56xx/spresense/src/cxd56_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 -#include - -#include -#include - -#include "spresense.h" - -/**************************************************************************** - * 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 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 cxd56_bringup(); -#endif -} - -/**************************************************************************** - * 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. - * - ****************************************************************************/ - -#ifdef CONFIG_BOARD_LATE_INITIALIZE -void weak_function board_late_initialize(void) -{ - /* Perform board bring-up here instead of from the - * board_app_initialize(). - */ - - cxd56_bringup(); -} -#endif diff --git a/boards/arm/tiva/ekk-lm3s9b96/src/lm_appinit.c b/boards/arm/cxd56xx/spresense/src/cxd56_boardinit.c similarity index 63% rename from boards/arm/tiva/ekk-lm3s9b96/src/lm_appinit.c rename to boards/arm/cxd56xx/spresense/src/cxd56_boardinit.c index cc2f132157e2c..c3c7544581d66 100644 --- a/boards/arm/tiva/ekk-lm3s9b96/src/lm_appinit.c +++ b/boards/arm/cxd56xx/spresense/src/cxd56_boardinit.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/tiva/ekk-lm3s9b96/src/lm_appinit.c + * boards/arm/cxd56xx/spresense/src/cxd56_boardinit.c * * SPDX-License-Identifier: Apache-2.0 * @@ -25,13 +25,18 @@ ****************************************************************************/ #include +#include + +#include #include -#include #include +#include #include +#include "spresense.h" + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -41,29 +46,22 @@ ****************************************************************************/ /**************************************************************************** - * Name: board_app_initialize + * Name: board_late_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. + * 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. * ****************************************************************************/ -int board_app_initialize(uintptr_t arg) +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void weak_function board_late_initialize(void) { - return OK; + cxd56_bringup(); } +#endif diff --git a/boards/arm/cxd56xx/spresense/src/cxd56_ioctl.c b/boards/arm/cxd56xx/spresense/src/cxd56_ioctl.c index b70fc672face6..83b992d3f64df 100644 --- a/boards/arm/cxd56xx/spresense/src/cxd56_ioctl.c +++ b/boards/arm/cxd56xx/spresense/src/cxd56_ioctl.c @@ -85,7 +85,6 @@ int board_ioctl(unsigned int cmd, uintptr_t arg) * and supply current value. * ARG: None * CONFIGURATION: CONFIG_BOARDCTL - * DEPENDENCIES: Board logic must provide board_app_initialization */ case BOARDIOC_USBDEV_SETNOTIFYSIG: diff --git a/boards/arm/dm320/ntosd-dm320/src/Makefile b/boards/arm/dm320/ntosd-dm320/src/Makefile index c84cc1751dff9..2dc99532d6ca1 100644 --- a/boards/arm/dm320/ntosd-dm320/src/Makefile +++ b/boards/arm/dm320/ntosd-dm320/src/Makefile @@ -28,8 +28,4 @@ ifeq ($(CONFIG_BOARD_LATE_INITIALIZE),y) CSRCS += dm320_boardinit.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += dm320_appinit.c -endif - include $(TOPDIR)/boards/Board.mk diff --git a/boards/arm/dm320/ntosd-dm320/src/dm320_appinit.c b/boards/arm/dm320/ntosd-dm320/src/dm320_appinit.c deleted file mode 100644 index 7f35a0afaf21c..0000000000000 --- a/boards/arm/dm320/ntosd-dm320/src/dm320_appinit.c +++ /dev/null @@ -1,68 +0,0 @@ -/**************************************************************************** - * boards/arm/dm320/ntosd-dm320/src/dm320_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 - -#include -#include - -/**************************************************************************** - * 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 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) -{ - return OK; -} diff --git a/boards/arm/eoss3/quickfeather/src/CMakeLists.txt b/boards/arm/eoss3/quickfeather/src/CMakeLists.txt index 0b6d3334fba77..4fdae9c25f6d6 100644 --- a/boards/arm/eoss3/quickfeather/src/CMakeLists.txt +++ b/boards/arm/eoss3/quickfeather/src/CMakeLists.txt @@ -20,7 +20,7 @@ # # ############################################################################## -set(SRCS eoss3_boot.c eoss3_bringup.c eoss3_appinit.c) +set(SRCS eoss3_boot.c eoss3_bringup.c) if(CONFIG_ARCH_LEDS) list(APPEND SRCS eoss3_autoleds.c) diff --git a/boards/arm/eoss3/quickfeather/src/Makefile b/boards/arm/eoss3/quickfeather/src/Makefile index eaa7341472a90..cdd0ae9c12488 100644 --- a/boards/arm/eoss3/quickfeather/src/Makefile +++ b/boards/arm/eoss3/quickfeather/src/Makefile @@ -22,7 +22,7 @@ include $(TOPDIR)/Make.defs -CSRCS = eoss3_boot.c eoss3_bringup.c eoss3_appinit.c +CSRCS = eoss3_boot.c eoss3_bringup.c ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += eoss3_autoleds.c @@ -30,4 +30,4 @@ else CSRCS += eoss3_userleds.c endif -include $(TOPDIR)/boards/Board.mk \ No newline at end of file +include $(TOPDIR)/boards/Board.mk diff --git a/boards/arm/eoss3/quickfeather/src/eoss3_appinit.c b/boards/arm/eoss3/quickfeather/src/eoss3_appinit.c deleted file mode 100644 index f5562cca630ae..0000000000000 --- a/boards/arm/eoss3/quickfeather/src/eoss3_appinit.c +++ /dev/null @@ -1,68 +0,0 @@ -/**************************************************************************** - * boards/arm/eoss3/quickfeather/src/eoss3_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 - -#include - -#include - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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 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) -{ - return OK; -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/arm/fvp-v8r-aarch32/fvp-armv8r-aarch32/configs/nsh/defconfig b/boards/arm/fvp-v8r-aarch32/fvp-armv8r-aarch32/configs/nsh/defconfig index 48ba92cbee240..d99e9b33ec3cf 100644 --- a/boards/arm/fvp-v8r-aarch32/fvp-armv8r-aarch32/configs/nsh/defconfig +++ b/boards/arm/fvp-v8r-aarch32/fvp-armv8r-aarch32/configs/nsh/defconfig @@ -30,7 +30,6 @@ CONFIG_FS_ROMFS=y CONFIG_IDLETHREAD_STACKSIZE=8192 CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/fvp-v8r-aarch32/fvp-armv8r-aarch32/src/CMakeLists.txt b/boards/arm/fvp-v8r-aarch32/fvp-armv8r-aarch32/src/CMakeLists.txt index b9932aa82a1fd..cc71d166c5c8d 100644 --- a/boards/arm/fvp-v8r-aarch32/fvp-armv8r-aarch32/src/CMakeLists.txt +++ b/boards/arm/fvp-v8r-aarch32/fvp-armv8r-aarch32/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS fvp_boardinit.c fvp_bringup.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS fvp_appinit.c) -endif() - target_sources(board PRIVATE ${SRCS}) set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/dramboot.ld") diff --git a/boards/arm/fvp-v8r-aarch32/fvp-armv8r-aarch32/src/Makefile b/boards/arm/fvp-v8r-aarch32/fvp-armv8r-aarch32/src/Makefile index 945a32b2d8ec7..404dd54a381b7 100644 --- a/boards/arm/fvp-v8r-aarch32/fvp-armv8r-aarch32/src/Makefile +++ b/boards/arm/fvp-v8r-aarch32/fvp-armv8r-aarch32/src/Makefile @@ -24,8 +24,4 @@ include $(TOPDIR)/Make.defs CSRCS = fvp_boardinit.c fvp_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += fvp_appinit.c -endif - include $(TOPDIR)/boards/Board.mk diff --git a/boards/arm/fvp-v8r-aarch32/fvp-armv8r-aarch32/src/fvp_appinit.c b/boards/arm/fvp-v8r-aarch32/fvp-armv8r-aarch32/src/fvp_appinit.c deleted file mode 100644 index f653f198ac5e8..0000000000000 --- a/boards/arm/fvp-v8r-aarch32/fvp-armv8r-aarch32/src/fvp_appinit.c +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** - * boards/arm/fvp-v8r-aarch32/fvp-armv8r-aarch32/src/fvp_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 -#include -#include -#include "fvp-armv8r.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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 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) -{ - UNUSED(arg); -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board initialization */ - - return fvp_bringup(); -#else - return OK; -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/arm/gd32f4/gd32f450zk-aiotbox/configs/aiotboxnsh/defconfig b/boards/arm/gd32f4/gd32f450zk-aiotbox/configs/aiotboxnsh/defconfig index d7ed2c755fadf..49d4dedbbe9cb 100644 --- a/boards/arm/gd32f4/gd32f450zk-aiotbox/configs/aiotboxnsh/defconfig +++ b/boards/arm/gd32f4/gd32f450zk-aiotbox/configs/aiotboxnsh/defconfig @@ -38,7 +38,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/gd32f4/gd32f450zk-aiotbox/src/CMakeLists.txt b/boards/arm/gd32f4/gd32f450zk-aiotbox/src/CMakeLists.txt index 7ae638988e765..a3eceac076d5c 100644 --- a/boards/arm/gd32f4/gd32f450zk-aiotbox/src/CMakeLists.txt +++ b/boards/arm/gd32f4/gd32f450zk-aiotbox/src/CMakeLists.txt @@ -22,9 +22,7 @@ set(SRCS gd32f4xx_boot.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS gd32f4xx_appinit.c gd32f4xx_bringup.c) -elseif(CONFIG_BOARD_LATE_INITIALIZE) +if(CONFIG_BOARD_LATE_INITIALIZE) list(APPEND SRCS gd32f4xx_bringup.c) endif() diff --git a/boards/arm/gd32f4/gd32f450zk-aiotbox/src/Makefile b/boards/arm/gd32f4/gd32f450zk-aiotbox/src/Makefile index 39c9efbaed92e..f1e4b19e3fb09 100644 --- a/boards/arm/gd32f4/gd32f450zk-aiotbox/src/Makefile +++ b/boards/arm/gd32f4/gd32f450zk-aiotbox/src/Makefile @@ -22,17 +22,7 @@ include $(TOPDIR)/Make.defs -CSRCS = gd32f4xx_boot.c - -# ifeq ($(CONFIG_BOARDCTL),y) -# CSRCS += gd32f4xx_appinit.c -# endif - -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += gd32f4xx_appinit.c gd32f4xx_bringup.c -else ifeq ($(CONFIG_BOARD_LATE_INITIALIZE),y) -CSRCS += gd32f4xx_bringup.c -endif +CSRCS = gd32f4xx_boot.c gd32f4xx_bringup.c ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += gd32f4xx_autoleds.c diff --git a/boards/arm/gd32f4/gd32f450zk-aiotbox/src/gd32f450z_aiotbox.h b/boards/arm/gd32f4/gd32f450zk-aiotbox/src/gd32f450z_aiotbox.h index 4fa311a511268..149a4560006b3 100644 --- a/boards/arm/gd32f4/gd32f450zk-aiotbox/src/gd32f450z_aiotbox.h +++ b/boards/arm/gd32f4/gd32f450zk-aiotbox/src/gd32f450z_aiotbox.h @@ -136,16 +136,9 @@ * Description: * Perform architecture specific initialization * - * CONFIG_BOARDCTL=y: - * If CONFIG_NSH_ARCHINIT=y: - * Called from the NSH library (or other application) - * Otherwise, assumed to be called from some other application. - * - * Otherwise CONFIG_BOARD_LATE_INITIALIZE=y: + * CONFIG_BOARD_LATE_INITIALIZE=y: * Called from board_late_initialize(). * - * Otherwise, bad news: Never called - * ****************************************************************************/ int gd32_bringup(void); @@ -348,16 +341,9 @@ void gd32_i2c_initialize(void); * Description: * Perform architecture specific initialization * - * CONFIG_BOARDCTL=y: - * If CONFIG_NSH_ARCHINIT=y: - * Called from the NSH library (or other application) - * Otherwise, assumed to be called from some other application. - * - * Otherwise CONFIG_BOARD_LATE_INITIALIZE=y: + * CONFIG_BOARD_LATE_INITIALIZE=y: * Called from board_late_initialize(). * - * Otherwise, bad news: Never called - * ****************************************************************************/ int gd32_bringup(void); @@ -422,4 +408,4 @@ int gd32_sdio_initialize(void); #ifdef CONFIG_I2C void gd32_i2c_initialize(void); -#endif \ No newline at end of file +#endif diff --git a/boards/arm/gd32f4/gd32f450zk-aiotbox/src/gd32f4xx_appinit.c b/boards/arm/gd32f4/gd32f450zk-aiotbox/src/gd32f4xx_appinit.c deleted file mode 100644 index 2f7d3b307f279..0000000000000 --- a/boards/arm/gd32f4/gd32f450zk-aiotbox/src/gd32f4xx_appinit.c +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** - * boards/arm/gd32f4/gd32f450zk-aiotbox/src/gd32f4xx_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 - -#include -#include -#include -#include - -#include - -#include "gd32f4xx.h" -#include "gd32f450z_aiotbox.h" - -/**************************************************************************** - * 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 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) -{ - /* Perform board initialization here */ - - return gd32_bringup(); -} diff --git a/boards/arm/gd32f4/gd32f450zk-eval/Kconfig b/boards/arm/gd32f4/gd32f450zk-eval/Kconfig index f799fbfe168d7..7f57a041d8e2b 100644 --- a/boards/arm/gd32f4/gd32f450zk-eval/Kconfig +++ b/boards/arm/gd32f4/gd32f450zk-eval/Kconfig @@ -124,7 +124,7 @@ endchoice # GD25 serial FLASH configuration config GD32F450ZK_EVAL_AT24_TEST bool "I2C0 EEPROM AT2402 write and read test" default n - depends on NSH_ARCHINIT && GD32F4_I2C0 && MTD_AT24XX + depends on BOARD_LATE_INITIALIZE && GD32F4_I2C0 && MTD_AT24XX ---help--- Automatically initialize and test the AT24 I2C EEPROM driver when NSH starts. After test the I2C0 will be released. diff --git a/boards/arm/gd32f4/gd32f450zk-eval/configs/btngpionsh/defconfig b/boards/arm/gd32f4/gd32f450zk-eval/configs/btngpionsh/defconfig index c883f6452332b..7b96efa294630 100644 --- a/boards/arm/gd32f4/gd32f450zk-eval/configs/btngpionsh/defconfig +++ b/boards/arm/gd32f4/gd32f450zk-eval/configs/btngpionsh/defconfig @@ -75,7 +75,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/gd32f4/gd32f450zk-eval/configs/fmcfsnsh/defconfig b/boards/arm/gd32f4/gd32f450zk-eval/configs/fmcfsnsh/defconfig index 63fd1fddf739a..60d4198b1de87 100644 --- a/boards/arm/gd32f4/gd32f450zk-eval/configs/fmcfsnsh/defconfig +++ b/boards/arm/gd32f4/gd32f450zk-eval/configs/fmcfsnsh/defconfig @@ -64,7 +64,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/gd32f4/gd32f450zk-eval/configs/fmclfsnsh/defconfig b/boards/arm/gd32f4/gd32f450zk-eval/configs/fmclfsnsh/defconfig index 733c2e13bec99..eda1cb4307c49 100644 --- a/boards/arm/gd32f4/gd32f450zk-eval/configs/fmclfsnsh/defconfig +++ b/boards/arm/gd32f4/gd32f450zk-eval/configs/fmclfsnsh/defconfig @@ -65,7 +65,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/gd32f4/gd32f450zk-eval/configs/i2c0testnsh/defconfig b/boards/arm/gd32f4/gd32f450zk-eval/configs/i2c0testnsh/defconfig index 8949408d34c95..e12cff065b71b 100644 --- a/boards/arm/gd32f4/gd32f450zk-eval/configs/i2c0testnsh/defconfig +++ b/boards/arm/gd32f4/gd32f450zk-eval/configs/i2c0testnsh/defconfig @@ -42,7 +42,6 @@ CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 CONFIG_MTD=y CONFIG_MTD_AT24XX=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/gd32f4/gd32f450zk-eval/configs/netnsh/defconfig b/boards/arm/gd32f4/gd32f450zk-eval/configs/netnsh/defconfig index 44f2110991496..e9a48bb2a21b1 100644 --- a/boards/arm/gd32f4/gd32f450zk-eval/configs/netnsh/defconfig +++ b/boards/arm/gd32f4/gd32f450zk-eval/configs/netnsh/defconfig @@ -60,7 +60,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/gd32f4/gd32f450zk-eval/configs/sdionsh/defconfig b/boards/arm/gd32f4/gd32f450zk-eval/configs/sdionsh/defconfig index 2c6b974cde36c..200792ee78cd5 100644 --- a/boards/arm/gd32f4/gd32f450zk-eval/configs/sdionsh/defconfig +++ b/boards/arm/gd32f4/gd32f450zk-eval/configs/sdionsh/defconfig @@ -71,7 +71,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/gd32f4/gd32f450zk-eval/configs/spifsnsh/defconfig b/boards/arm/gd32f4/gd32f450zk-eval/configs/spifsnsh/defconfig index 7de60dcce5ca4..8b799d3cbaf29 100644 --- a/boards/arm/gd32f4/gd32f450zk-eval/configs/spifsnsh/defconfig +++ b/boards/arm/gd32f4/gd32f450zk-eval/configs/spifsnsh/defconfig @@ -68,7 +68,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/gd32f4/gd32f450zk-eval/configs/spilfsnsh/defconfig b/boards/arm/gd32f4/gd32f450zk-eval/configs/spilfsnsh/defconfig index 915ca569086c5..9e1afa2bdc82d 100644 --- a/boards/arm/gd32f4/gd32f450zk-eval/configs/spilfsnsh/defconfig +++ b/boards/arm/gd32f4/gd32f450zk-eval/configs/spilfsnsh/defconfig @@ -69,7 +69,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/gd32f4/gd32f450zk-eval/src/CMakeLists.txt b/boards/arm/gd32f4/gd32f450zk-eval/src/CMakeLists.txt index 7036cfa561b8a..aab550e463328 100644 --- a/boards/arm/gd32f4/gd32f450zk-eval/src/CMakeLists.txt +++ b/boards/arm/gd32f4/gd32f450zk-eval/src/CMakeLists.txt @@ -22,9 +22,7 @@ set(SRCS gd32f4xx_boot.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS gd32f4xx_appinit.c gd32f4xx_bringup.c) -elseif(CONFIG_BOARD_LATE_INITIALIZE) +if(CONFIG_BOARD_LATE_INITIALIZE) list(APPEND SRCS gd32f4xx_bringup.c) endif() diff --git a/boards/arm/gd32f4/gd32f450zk-eval/src/Makefile b/boards/arm/gd32f4/gd32f450zk-eval/src/Makefile index 8f87b677fb3bc..e9a79e6727a55 100644 --- a/boards/arm/gd32f4/gd32f450zk-eval/src/Makefile +++ b/boards/arm/gd32f4/gd32f450zk-eval/src/Makefile @@ -22,17 +22,7 @@ include $(TOPDIR)/Make.defs -CSRCS = gd32f4xx_boot.c - -# ifeq ($(CONFIG_BOARDCTL),y) -# CSRCS += gd32f4xx_appinit.c -# endif - -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += gd32f4xx_appinit.c gd32f4xx_bringup.c -else ifeq ($(CONFIG_BOARD_LATE_INITIALIZE),y) -CSRCS += gd32f4xx_bringup.c -endif +CSRCS = gd32f4xx_boot.c gd32f4xx_bringup.c ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += gd32f4xx_autoleds.c diff --git a/boards/arm/gd32f4/gd32f450zk-eval/src/gd32f450z_eval.h b/boards/arm/gd32f4/gd32f450zk-eval/src/gd32f450z_eval.h index b1caed736aa68..2022049d294e8 100644 --- a/boards/arm/gd32f4/gd32f450zk-eval/src/gd32f450z_eval.h +++ b/boards/arm/gd32f4/gd32f450zk-eval/src/gd32f450z_eval.h @@ -188,16 +188,9 @@ * Description: * Perform architecture specific initialization * - * CONFIG_BOARDCTL=y: - * If CONFIG_NSH_ARCHINIT=y: - * Called from the NSH library (or other application) - * Otherwise, assumed to be called from some other application. - * - * Otherwise CONFIG_BOARD_LATE_INITIALIZE=y: + * CONFIG_BOARD_LATE_INITIALIZE=y: * Called from board_late_initialize(). * - * Otherwise, bad news: Never called - * ****************************************************************************/ int gd32_bringup(void); diff --git a/boards/arm/gd32f4/gd32f450zk-eval/src/gd32f4xx_appinit.c b/boards/arm/gd32f4/gd32f450zk-eval/src/gd32f4xx_appinit.c deleted file mode 100644 index 23df26fd7de32..0000000000000 --- a/boards/arm/gd32f4/gd32f450zk-eval/src/gd32f4xx_appinit.c +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** - * boards/arm/gd32f4/gd32f450zk-eval/src/gd32f4xx_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 - -#include -#include -#include -#include - -#include - -#include "gd32f4xx.h" -#include "gd32f450z_eval.h" - -/**************************************************************************** - * 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 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) -{ - /* Perform board initialization here */ - - return gd32_bringup(); -} diff --git a/boards/arm/gd32f4/gd32f470ik-eval/Kconfig b/boards/arm/gd32f4/gd32f470ik-eval/Kconfig index 1ebfc70f7aa94..5a6d65db6f30a 100644 --- a/boards/arm/gd32f4/gd32f470ik-eval/Kconfig +++ b/boards/arm/gd32f4/gd32f470ik-eval/Kconfig @@ -69,7 +69,7 @@ choice config GD32F470I_240MHZ bool "240 MHz" - + config GD32F470I_200MHZ bool "200 MHz" @@ -122,7 +122,7 @@ endchoice # GD25 serial FLASH configuration config GD32F470IK_EVAL_AT24_TEST bool "I2C0 EEPROM AT2402 write and read test" default n - depends on NSH_ARCHINIT && GD32F4_I2C0 && MTD_AT24XX + depends on BOARD_LATE_INITIALIZE && GD32F4_I2C0 && MTD_AT24XX ---help--- Automatically initialize and test the AT24 I2C EEPROM driver when NSH starts. After test the I2C0 will be released. diff --git a/boards/arm/gd32f4/gd32f470ik-eval/configs/fmclfsnsh/defconfig b/boards/arm/gd32f4/gd32f470ik-eval/configs/fmclfsnsh/defconfig index 09ba57123e4d5..5d7280b25def5 100644 --- a/boards/arm/gd32f4/gd32f470ik-eval/configs/fmclfsnsh/defconfig +++ b/boards/arm/gd32f4/gd32f470ik-eval/configs/fmclfsnsh/defconfig @@ -65,7 +65,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/gd32f4/gd32f470ik-eval/configs/i2c0testnsh/defconfig b/boards/arm/gd32f4/gd32f470ik-eval/configs/i2c0testnsh/defconfig index a8102c549382e..9747193a4f89e 100644 --- a/boards/arm/gd32f4/gd32f470ik-eval/configs/i2c0testnsh/defconfig +++ b/boards/arm/gd32f4/gd32f470ik-eval/configs/i2c0testnsh/defconfig @@ -42,7 +42,6 @@ CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 CONFIG_MTD=y CONFIG_MTD_AT24XX=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/gd32f4/gd32f470ik-eval/configs/netnsh/defconfig b/boards/arm/gd32f4/gd32f470ik-eval/configs/netnsh/defconfig index 67edaa07ef8ae..6b1f95c2cc075 100644 --- a/boards/arm/gd32f4/gd32f470ik-eval/configs/netnsh/defconfig +++ b/boards/arm/gd32f4/gd32f470ik-eval/configs/netnsh/defconfig @@ -59,7 +59,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/gd32f4/gd32f470ik-eval/src/CMakeLists.txt b/boards/arm/gd32f4/gd32f470ik-eval/src/CMakeLists.txt index b6af78fd172d2..2ff2544822e3e 100644 --- a/boards/arm/gd32f4/gd32f470ik-eval/src/CMakeLists.txt +++ b/boards/arm/gd32f4/gd32f470ik-eval/src/CMakeLists.txt @@ -22,9 +22,7 @@ set(SRCS gd32f4xx_boot.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS gd32f4xx_appinit.c gd32f4xx_bringup.c) -elseif(CONFIG_BOARD_LATE_INITIALIZE) +if(CONFIG_BOARD_LATE_INITIALIZE) list(APPEND SRCS gd32f4xx_bringup.c) endif() diff --git a/boards/arm/gd32f4/gd32f470ik-eval/src/Makefile b/boards/arm/gd32f4/gd32f470ik-eval/src/Makefile index ad497847e286d..9b10a9d5e3000 100644 --- a/boards/arm/gd32f4/gd32f470ik-eval/src/Makefile +++ b/boards/arm/gd32f4/gd32f470ik-eval/src/Makefile @@ -22,17 +22,7 @@ include $(TOPDIR)/Make.defs -CSRCS = gd32f4xx_boot.c - -# ifeq ($(CONFIG_BOARDCTL),y) -# CSRCS += gd32f4xx_appinit.c -# endif - -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += gd32f4xx_appinit.c gd32f4xx_bringup.c -else ifeq ($(CONFIG_BOARD_LATE_INITIALIZE),y) -CSRCS += gd32f4xx_bringup.c -endif +CSRCS = gd32f4xx_boot.c gd32f4xx_bringup.c ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += gd32f4xx_autoleds.c diff --git a/boards/arm/gd32f4/gd32f470ik-eval/src/gd32f470i_eval.h b/boards/arm/gd32f4/gd32f470ik-eval/src/gd32f470i_eval.h index 1077a7ea1a930..3af1c63bcf344 100644 --- a/boards/arm/gd32f4/gd32f470ik-eval/src/gd32f470i_eval.h +++ b/boards/arm/gd32f4/gd32f470ik-eval/src/gd32f470i_eval.h @@ -188,16 +188,9 @@ * Description: * Perform architecture specific initialization * - * CONFIG_BOARDCTL=y: - * If CONFIG_NSH_ARCHINITIALIZE=y: - * Called from the NSH library (or other application) - * Otherwise, assumed to be called from some other application. - * - * Otherwise CONFIG_BOARD_LATE_INITIALIZE=y: + * CONFIG_BOARD_LATE_INITIALIZE=y: * Called from board_late_initialize(). * - * Otherwise, bad news: Never called - * ****************************************************************************/ int gd32_bringup(void); diff --git a/boards/arm/gd32f4/gd32f470ik-eval/src/gd32f4xx_appinit.c b/boards/arm/gd32f4/gd32f470ik-eval/src/gd32f4xx_appinit.c deleted file mode 100644 index fb7e387b82204..0000000000000 --- a/boards/arm/gd32f4/gd32f470ik-eval/src/gd32f4xx_appinit.c +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** - * boards/arm/gd32f4/gd32f470ik-eval/src/gd32f4xx_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 - -#include -#include -#include -#include - -#include - -#include "gd32f4xx.h" -#include "gd32f470i_eval.h" - -/**************************************************************************** - * 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 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) -{ - /* Perform board initialization here */ - - return gd32_bringup(); -} diff --git a/boards/arm/gd32f4/gd32f470zk-aiotbox/Kconfig b/boards/arm/gd32f4/gd32f470zk-aiotbox/Kconfig index 0b2870d2ba4af..73eab180db524 100644 --- a/boards/arm/gd32f4/gd32f470zk-aiotbox/Kconfig +++ b/boards/arm/gd32f4/gd32f470zk-aiotbox/Kconfig @@ -74,7 +74,7 @@ choice config GD32F470_240MHZ_AIOTBOX bool "240 MHz" - + config GD32F470_200MHZ_AIOTBOX bool "200 MHz" @@ -127,7 +127,7 @@ endchoice # GD25 serial FLASH configuration config GD32F470ZK_AIOTBOX_AT24_TEST bool "I2C0 EEPROM AT2402 write and read test" default n - depends on NSH_ARCHINIT && GD32F4_I2C0 && MTD_AT24XX + depends on BOARD_LATE_INITIALIZE && GD32F4_I2C0 && MTD_AT24XX ---help--- Automatically initialize and test the AT24 I2C EEPROM driver when NSH starts. After test the I2C0 will be released. diff --git a/boards/arm/gd32f4/gd32f470zk-aiotbox/configs/aiotboxnsh/defconfig b/boards/arm/gd32f4/gd32f470zk-aiotbox/configs/aiotboxnsh/defconfig index a93d44d4e8072..f858f67e0b0cd 100644 --- a/boards/arm/gd32f4/gd32f470zk-aiotbox/configs/aiotboxnsh/defconfig +++ b/boards/arm/gd32f4/gd32f470zk-aiotbox/configs/aiotboxnsh/defconfig @@ -43,7 +43,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/gd32f4/gd32f470zk-aiotbox/src/Makefile b/boards/arm/gd32f4/gd32f470zk-aiotbox/src/Makefile index 70295bf60b290..b429046bd679e 100644 --- a/boards/arm/gd32f4/gd32f470zk-aiotbox/src/Makefile +++ b/boards/arm/gd32f4/gd32f470zk-aiotbox/src/Makefile @@ -22,17 +22,7 @@ include $(TOPDIR)/Make.defs -CSRCS = gd32f4xx_boot.c - -# ifeq ($(CONFIG_BOARDCTL),y) -# CSRCS += gd32f4xx_appinit.c -# endif - -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += gd32f4xx_appinit.c gd32f4xx_bringup.c -else ifeq ($(CONFIG_BOARD_LATE_INITIALIZE),y) -CSRCS += gd32f4xx_bringup.c -endif +CSRCS = gd32f4xx_boot.c gd32f4xx_bringup.c ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += gd32f4xx_autoleds.c diff --git a/boards/arm/gd32f4/gd32f470zk-aiotbox/src/gd32f470z_aiotbox.h b/boards/arm/gd32f4/gd32f470zk-aiotbox/src/gd32f470z_aiotbox.h index 55aaae5165631..17eda55614b34 100644 --- a/boards/arm/gd32f4/gd32f470zk-aiotbox/src/gd32f470z_aiotbox.h +++ b/boards/arm/gd32f4/gd32f470zk-aiotbox/src/gd32f470z_aiotbox.h @@ -188,16 +188,9 @@ * Description: * Perform architecture specific initialization * - * CONFIG_BOARDCTL=y: - * If CONFIG_NSH_ARCHINITIALIZE=y: - * Called from the NSH library (or other application) - * Otherwise, assumed to be called from some other application. - * - * Otherwise CONFIG_BOARD_LATE_INITIALIZE=y: + * CONFIG_BOARD_LATE_INITIALIZE=y: * Called from board_late_initialize(). * - * Otherwise, bad news: Never called - * ****************************************************************************/ int gd32_bringup(void); diff --git a/boards/arm/gd32f4/gd32f470zk-aiotbox/src/gd32f4xx_appinit.c b/boards/arm/gd32f4/gd32f470zk-aiotbox/src/gd32f4xx_appinit.c deleted file mode 100644 index fb5720f941412..0000000000000 --- a/boards/arm/gd32f4/gd32f470zk-aiotbox/src/gd32f4xx_appinit.c +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** - * boards/arm/gd32f4/gd32f470zk-aiotbox/src/gd32f4xx_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 - -#include -#include -#include -#include - -#include - -#include "gd32f4xx.h" -#include "gd32f470z_aiotbox.h" - -/**************************************************************************** - * 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 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) -{ - /* Perform board initialization here */ - - return gd32_bringup(); -} diff --git a/boards/arm/gd32f4/gd32f470zk-eval/Kconfig b/boards/arm/gd32f4/gd32f470zk-eval/Kconfig index ed85d6354cb67..0036b7a632882 100644 --- a/boards/arm/gd32f4/gd32f470zk-eval/Kconfig +++ b/boards/arm/gd32f4/gd32f470zk-eval/Kconfig @@ -74,7 +74,7 @@ choice config GD32F470_240MHZ bool "240 MHz" - + config GD32F470_200MHZ bool "200 MHz" @@ -127,7 +127,7 @@ endchoice # GD25 serial FLASH configuration config GD32F470ZK_EVAL_AT24_TEST bool "I2C0 EEPROM AT2402 write and read test" default n - depends on NSH_ARCHINIT && GD32F4_I2C0 && MTD_AT24XX + depends on BOARD_LATE_INITIALIZE && GD32F4_I2C0 && MTD_AT24XX ---help--- Automatically initialize and test the AT24 I2C EEPROM driver when NSH starts. After test the I2C0 will be released. diff --git a/boards/arm/gd32f4/gd32f470zk-eval/configs/fmclfsnsh/defconfig b/boards/arm/gd32f4/gd32f470zk-eval/configs/fmclfsnsh/defconfig index e338342a127b6..6e74170d19fb4 100644 --- a/boards/arm/gd32f4/gd32f470zk-eval/configs/fmclfsnsh/defconfig +++ b/boards/arm/gd32f4/gd32f470zk-eval/configs/fmclfsnsh/defconfig @@ -65,7 +65,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/gd32f4/gd32f470zk-eval/configs/i2c0testnsh/defconfig b/boards/arm/gd32f4/gd32f470zk-eval/configs/i2c0testnsh/defconfig index f30920b18ce89..bd25e8151d2f1 100644 --- a/boards/arm/gd32f4/gd32f470zk-eval/configs/i2c0testnsh/defconfig +++ b/boards/arm/gd32f4/gd32f470zk-eval/configs/i2c0testnsh/defconfig @@ -42,7 +42,6 @@ CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 CONFIG_MTD=y CONFIG_MTD_AT24XX=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/gd32f4/gd32f470zk-eval/configs/netnsh/defconfig b/boards/arm/gd32f4/gd32f470zk-eval/configs/netnsh/defconfig index 8660583e9482a..87ff3523a9c22 100644 --- a/boards/arm/gd32f4/gd32f470zk-eval/configs/netnsh/defconfig +++ b/boards/arm/gd32f4/gd32f470zk-eval/configs/netnsh/defconfig @@ -60,7 +60,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/gd32f4/gd32f470zk-eval/configs/sdionsh/defconfig b/boards/arm/gd32f4/gd32f470zk-eval/configs/sdionsh/defconfig index 7dfb5e749ef96..05d9a8f603a40 100644 --- a/boards/arm/gd32f4/gd32f470zk-eval/configs/sdionsh/defconfig +++ b/boards/arm/gd32f4/gd32f470zk-eval/configs/sdionsh/defconfig @@ -71,7 +71,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/gd32f4/gd32f470zk-eval/configs/spilfsnsh/defconfig b/boards/arm/gd32f4/gd32f470zk-eval/configs/spilfsnsh/defconfig index 49ed435abc671..759b2c624e86f 100644 --- a/boards/arm/gd32f4/gd32f470zk-eval/configs/spilfsnsh/defconfig +++ b/boards/arm/gd32f4/gd32f470zk-eval/configs/spilfsnsh/defconfig @@ -68,7 +68,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/gd32f4/gd32f470zk-eval/src/Makefile b/boards/arm/gd32f4/gd32f470zk-eval/src/Makefile index 0ac508bc75e8b..853d8448313f7 100644 --- a/boards/arm/gd32f4/gd32f470zk-eval/src/Makefile +++ b/boards/arm/gd32f4/gd32f470zk-eval/src/Makefile @@ -22,17 +22,7 @@ include $(TOPDIR)/Make.defs -CSRCS = gd32f4xx_boot.c - -# ifeq ($(CONFIG_BOARDCTL),y) -# CSRCS += gd32f4xx_appinit.c -# endif - -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += gd32f4xx_appinit.c gd32f4xx_bringup.c -else ifeq ($(CONFIG_BOARD_LATE_INITIALIZE),y) -CSRCS += gd32f4xx_bringup.c -endif +CSRCS = gd32f4xx_boot.c gd32f4xx_bringup.c ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += gd32f4xx_autoleds.c diff --git a/boards/arm/gd32f4/gd32f470zk-eval/src/gd32f470z_eval.h b/boards/arm/gd32f4/gd32f470zk-eval/src/gd32f470z_eval.h index bb01ac0058075..e00df0aa7cdb9 100644 --- a/boards/arm/gd32f4/gd32f470zk-eval/src/gd32f470z_eval.h +++ b/boards/arm/gd32f4/gd32f470zk-eval/src/gd32f470z_eval.h @@ -188,16 +188,9 @@ * Description: * Perform architecture specific initialization * - * CONFIG_BOARDCTL=y: - * If CONFIG_NSH_ARCHINITIALIZE=y: - * Called from the NSH library (or other application) - * Otherwise, assumed to be called from some other application. - * - * Otherwise CONFIG_BOARD_LATE_INITIALIZE=y: + * CONFIG_BOARD_LATE_INITIALIZE=y: * Called from board_late_initialize(). * - * Otherwise, bad news: Never called - * ****************************************************************************/ int gd32_bringup(void); diff --git a/boards/arm/gd32f4/gd32f470zk-eval/src/gd32f4xx_appinit.c b/boards/arm/gd32f4/gd32f470zk-eval/src/gd32f4xx_appinit.c deleted file mode 100644 index 523a6339e5471..0000000000000 --- a/boards/arm/gd32f4/gd32f470zk-eval/src/gd32f4xx_appinit.c +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** - * boards/arm/gd32f4/gd32f470zk-eval/src/gd32f4xx_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 - -#include -#include -#include -#include - -#include - -#include "gd32f4xx.h" -#include "gd32f470z_eval.h" - -/**************************************************************************** - * 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 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) -{ - /* Perform board initialization here */ - - return gd32_bringup(); -} diff --git a/boards/arm/ht32f491x3/esk32/include/board.h b/boards/arm/ht32f491x3/esk32/include/board.h index 1a5e99c76502c..9fff7de015712 100644 --- a/boards/arm/ht32f491x3/esk32/include/board.h +++ b/boards/arm/ht32f491x3/esk32/include/board.h @@ -118,8 +118,6 @@ void ht32f491x3_clockconfig(void); void ht32f491x3_boardinitialize(void); -int board_app_initialize(uintptr_t arg); - #ifdef CONFIG_PWM int ht32_pwm_setup(void); #endif diff --git a/boards/arm/ht32f491x3/esk32/src/CMakeLists.txt b/boards/arm/ht32f491x3/esk32/src/CMakeLists.txt index a76fb93ce6460..6d4a8b63c4e53 100644 --- a/boards/arm/ht32f491x3/esk32/src/CMakeLists.txt +++ b/boards/arm/ht32f491x3/esk32/src/CMakeLists.txt @@ -22,8 +22,8 @@ set(SRCS ht32_boot.c) -if(CONFIG_BOARDCTL OR CONFIG_BOARD_LATE_INITIALIZE) - list(APPEND SRCS ht32_appinit.c) +if(CONFIG_BOARD_LATE_INITIALIZE) + list(APPEND SRCS ht32_bringup.c) endif() if(CONFIG_USERLED) diff --git a/boards/arm/ht32f491x3/esk32/src/Makefile b/boards/arm/ht32f491x3/esk32/src/Makefile index 2ff294bed3b49..f0f4a7fd236c7 100644 --- a/boards/arm/ht32f491x3/esk32/src/Makefile +++ b/boards/arm/ht32f491x3/esk32/src/Makefile @@ -24,10 +24,8 @@ include $(TOPDIR)/Make.defs CSRCS += ht32_boot.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += ht32_appinit.c -else ifeq ($(CONFIG_BOARD_LATE_INITIALIZE),y) -CSRCS += ht32_appinit.c +ifeq ($(CONFIG_BOARD_LATE_INITIALIZE),y) +CSRCS += ht32_bringup.c endif ifeq ($(CONFIG_USERLED),y) diff --git a/boards/arm/ht32f491x3/esk32/src/ht32_appinit.c b/boards/arm/ht32f491x3/esk32/src/ht32_bringup.c similarity index 93% rename from boards/arm/ht32f491x3/esk32/src/ht32_appinit.c rename to boards/arm/ht32f491x3/esk32/src/ht32_bringup.c index 3c1d276f0f7fa..f715b657181d0 100644 --- a/boards/arm/ht32f491x3/esk32/src/ht32_appinit.c +++ b/boards/arm/ht32f491x3/esk32/src/ht32_bringup.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/ht32f491x3/esk32/src/ht32_appinit.c + * boards/arm/ht32f491x3/esk32/src/ht32_bringup.c * * SPDX-License-Identifier: Apache-2.0 * @@ -91,17 +91,6 @@ static int ht32_bringup(void) * Public Functions ****************************************************************************/ -int board_app_initialize(uintptr_t arg) -{ - (void)arg; - -#ifdef CONFIG_BOARD_LATE_INITIALIZE - return OK; -#else - return ht32_bringup(); -#endif -} - #ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { diff --git a/boards/arm/imx6/sabre-6quad/configs/citest/defconfig b/boards/arm/imx6/sabre-6quad/configs/citest/defconfig index d66eab9cf76ea..05b5b8b0e00ea 100644 --- a/boards/arm/imx6/sabre-6quad/configs/citest/defconfig +++ b/boards/arm/imx6/sabre-6quad/configs/citest/defconfig @@ -44,7 +44,6 @@ CONFIG_MM_IOB=y CONFIG_NET=y CONFIG_NETDEV_LATEINIT=y CONFIG_NET_USRSOCK=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/imx6/sabre-6quad/configs/coredump/defconfig b/boards/arm/imx6/sabre-6quad/configs/coredump/defconfig index a62de4fa0a60c..f3fbbfa9bbb66 100644 --- a/boards/arm/imx6/sabre-6quad/configs/coredump/defconfig +++ b/boards/arm/imx6/sabre-6quad/configs/coredump/defconfig @@ -35,7 +35,6 @@ CONFIG_IMX6_UART1=y CONFIG_IMX_DDR_SIZE=1073741824 CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/imx6/sabre-6quad/configs/knsh/defconfig b/boards/arm/imx6/sabre-6quad/configs/knsh/defconfig index ee1359ceacb1a..d7446da382d4f 100644 --- a/boards/arm/imx6/sabre-6quad/configs/knsh/defconfig +++ b/boards/arm/imx6/sabre-6quad/configs/knsh/defconfig @@ -60,7 +60,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_ENVPATH=y CONFIG_LIBC_EXECFUNCS=y CONFIG_MM_PGALLOC=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/arm/imx6/sabre-6quad/configs/knsh_smp/defconfig b/boards/arm/imx6/sabre-6quad/configs/knsh_smp/defconfig index d3b17a55e2c6b..001c1f2033197 100644 --- a/boards/arm/imx6/sabre-6quad/configs/knsh_smp/defconfig +++ b/boards/arm/imx6/sabre-6quad/configs/knsh_smp/defconfig @@ -60,7 +60,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_ENVPATH=y CONFIG_LIBC_EXECFUNCS=y CONFIG_MM_PGALLOC=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/arm/imx6/sabre-6quad/configs/libcxx/defconfig b/boards/arm/imx6/sabre-6quad/configs/libcxx/defconfig index eaf8ad5765eba..350b9c2aea526 100644 --- a/boards/arm/imx6/sabre-6quad/configs/libcxx/defconfig +++ b/boards/arm/imx6/sabre-6quad/configs/libcxx/defconfig @@ -40,7 +40,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBCXX=y CONFIG_LIBC_LOCALE=y CONFIG_LIBC_MAX_EXITFUNS=1 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/imx6/sabre-6quad/configs/netknsh/defconfig b/boards/arm/imx6/sabre-6quad/configs/netknsh/defconfig index 585cc8c58815c..5cad237fb1f03 100644 --- a/boards/arm/imx6/sabre-6quad/configs/netknsh/defconfig +++ b/boards/arm/imx6/sabre-6quad/configs/netknsh/defconfig @@ -87,7 +87,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NFS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/arm/imx6/sabre-6quad/configs/netknsh_smp/defconfig b/boards/arm/imx6/sabre-6quad/configs/netknsh_smp/defconfig index f4a48d9c1dfa2..2e2b708b21cd1 100644 --- a/boards/arm/imx6/sabre-6quad/configs/netknsh_smp/defconfig +++ b/boards/arm/imx6/sabre-6quad/configs/netknsh_smp/defconfig @@ -87,7 +87,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NFS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/arm/imx6/sabre-6quad/configs/netnsh/defconfig b/boards/arm/imx6/sabre-6quad/configs/netnsh/defconfig index 49e9f69325c8a..311a26f44dfdc 100644 --- a/boards/arm/imx6/sabre-6quad/configs/netnsh/defconfig +++ b/boards/arm/imx6/sabre-6quad/configs/netnsh/defconfig @@ -93,7 +93,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NFS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/imx6/sabre-6quad/configs/netnsh_ar8031/defconfig b/boards/arm/imx6/sabre-6quad/configs/netnsh_ar8031/defconfig index d6a89f2dfca9e..40a4599be738b 100644 --- a/boards/arm/imx6/sabre-6quad/configs/netnsh_ar8031/defconfig +++ b/boards/arm/imx6/sabre-6quad/configs/netnsh_ar8031/defconfig @@ -69,7 +69,6 @@ CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_WRITE_BUFFERS=y CONFIG_NFS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/imx6/sabre-6quad/configs/netnsh_smp/defconfig b/boards/arm/imx6/sabre-6quad/configs/netnsh_smp/defconfig index 602d91af63810..200d770838203 100644 --- a/boards/arm/imx6/sabre-6quad/configs/netnsh_smp/defconfig +++ b/boards/arm/imx6/sabre-6quad/configs/netnsh_smp/defconfig @@ -69,7 +69,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NFS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/imx6/sabre-6quad/configs/netnsh_wb/defconfig b/boards/arm/imx6/sabre-6quad/configs/netnsh_wb/defconfig index 411ca3e5cc7d7..7bce4a45c3dec 100644 --- a/boards/arm/imx6/sabre-6quad/configs/netnsh_wb/defconfig +++ b/boards/arm/imx6/sabre-6quad/configs/netnsh_wb/defconfig @@ -95,7 +95,6 @@ CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_WRITE_BUFFERS=y CONFIG_NFS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/imx6/sabre-6quad/configs/nsh/defconfig b/boards/arm/imx6/sabre-6quad/configs/nsh/defconfig index e8538584d7513..4c9abbfb5ce48 100644 --- a/boards/arm/imx6/sabre-6quad/configs/nsh/defconfig +++ b/boards/arm/imx6/sabre-6quad/configs/nsh/defconfig @@ -35,7 +35,6 @@ CONFIG_IMX6_UART1=y CONFIG_IMX_DDR_SIZE=1073741824 CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/imx6/sabre-6quad/configs/smp/defconfig b/boards/arm/imx6/sabre-6quad/configs/smp/defconfig index 527c488559443..eb72e03bdd62f 100644 --- a/boards/arm/imx6/sabre-6quad/configs/smp/defconfig +++ b/boards/arm/imx6/sabre-6quad/configs/smp/defconfig @@ -34,7 +34,6 @@ CONFIG_IMX6_UART1=y CONFIG_IMX_DDR_SIZE=1073741824 CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/imx6/sabre-6quad/src/CMakeLists.txt b/boards/arm/imx6/sabre-6quad/src/CMakeLists.txt index f4d998bbaf08d..d8ba2b7f9fe1a 100644 --- a/boards/arm/imx6/sabre-6quad/src/CMakeLists.txt +++ b/boards/arm/imx6/sabre-6quad/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS imx_boardinit.c imx_bringup.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS imx_appinit.c) -endif() - if(CONFIG_ARCH_LEDS) list(APPEND SRCS imx_autoleds.c) else() diff --git a/boards/arm/imx6/sabre-6quad/src/Makefile b/boards/arm/imx6/sabre-6quad/src/Makefile index d80f1c02a0a91..95ae85ce8f831 100644 --- a/boards/arm/imx6/sabre-6quad/src/Makefile +++ b/boards/arm/imx6/sabre-6quad/src/Makefile @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = imx_boardinit.c imx_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += imx_appinit.c -endif - ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += imx_autoleds.c else diff --git a/boards/arm/imx6/sabre-6quad/src/imx_appinit.c b/boards/arm/imx6/sabre-6quad/src/imx_appinit.c deleted file mode 100644 index 93f2f8c94352e..0000000000000 --- a/boards/arm/imx6/sabre-6quad/src/imx_appinit.c +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** - * boards/arm/imx6/sabre-6quad/src/imx_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 - -#include - -#include - -#include "sabre-6quad.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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 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) -{ -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board initialization */ - - return imx_bringup(); -#else - return OK; -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/arm/imx9/imx93-qsb/src/CMakeLists.txt b/boards/arm/imx9/imx93-qsb/src/CMakeLists.txt index 1e9702770a8ff..bac76e40de67a 100644 --- a/boards/arm/imx9/imx93-qsb/src/CMakeLists.txt +++ b/boards/arm/imx9/imx93-qsb/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS imx93_boardinit.c imx93_bringup.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS imx93_appinit.c) -endif() - target_sources(board PRIVATE ${SRCS}) if(CONFIG_IMX93_RUN_FROM_ITCM) diff --git a/boards/arm/imx9/imx93-qsb/src/Makefile b/boards/arm/imx9/imx93-qsb/src/Makefile index 953a4c7109b08..b1f3fecc154d4 100644 --- a/boards/arm/imx9/imx93-qsb/src/Makefile +++ b/boards/arm/imx9/imx93-qsb/src/Makefile @@ -25,8 +25,4 @@ include $(TOPDIR)/Make.defs CSRCS = imx93_boardinit.c imx93_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += imx93_appinit.c -endif - include $(TOPDIR)/boards/Board.mk diff --git a/boards/arm/imx9/imx93-qsb/src/imx93_appinit.c b/boards/arm/imx9/imx93-qsb/src/imx93_appinit.c deleted file mode 100644 index e7836900addf5..0000000000000 --- a/boards/arm/imx9/imx93-qsb/src/imx93_appinit.c +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** - * boards/arm/imx9/imx93-qsb/src/imx93_appinit.c - * - * SPDX-License-Identifier: Apache-2.0 - * SPDX-FileCopyrightText: 2024 NXP - * - * 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 -#include -#include -#include "imx93-qsb.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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 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) -{ - UNUSED(arg); -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board initialization */ - - return imx93_bringup(); -#else - return OK; -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/arm/imx9/imx95-evk/configs/can/defconfig b/boards/arm/imx9/imx95-evk/configs/can/defconfig index 0ec5dc87ee4ad..7510776e90a63 100644 --- a/boards/arm/imx9/imx95-evk/configs/can/defconfig +++ b/boards/arm/imx9/imx95-evk/configs/can/defconfig @@ -64,7 +64,6 @@ CONFIG_NET_CAN_RAW_TX_DEADLINE=y CONFIG_NET_CAN_SOCK_OPTS=y CONFIG_NET_LL_GUARDSIZE=14 CONFIG_NET_TIMESTAMP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_RAM_SIZE=134217728 diff --git a/boards/arm/imx9/imx95-evk/configs/nsh/defconfig b/boards/arm/imx9/imx95-evk/configs/nsh/defconfig index 269c09d6a13a8..30e7db8b33a0b 100644 --- a/boards/arm/imx9/imx95-evk/configs/nsh/defconfig +++ b/boards/arm/imx9/imx95-evk/configs/nsh/defconfig @@ -42,7 +42,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_LOCALTIME=y CONFIG_LPUART3_SERIAL_CONSOLE=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/imx9/imx95-evk/configs/rpmsg/defconfig b/boards/arm/imx9/imx95-evk/configs/rpmsg/defconfig index 5e5ff3e30dee7..592d8bc8e2049 100644 --- a/boards/arm/imx9/imx95-evk/configs/rpmsg/defconfig +++ b/boards/arm/imx9/imx95-evk/configs/rpmsg/defconfig @@ -54,7 +54,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_LOCALTIME=y CONFIG_LPUART3_SERIAL_CONSOLE=y CONFIG_MM_HEAP_MEMPOOL_THRESHOLD=0 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/imx9/imx95-evk/src/CMakeLists.txt b/boards/arm/imx9/imx95-evk/src/CMakeLists.txt index 470144134ce1c..b867984a064e6 100644 --- a/boards/arm/imx9/imx95-evk/src/CMakeLists.txt +++ b/boards/arm/imx9/imx95-evk/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS imx95_boardinit.c imx95_bringup.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS imx95_appinit.c) -endif() - if(CONFIG_PWM) list(APPEND SRCS imx95_pwm.c) endif() diff --git a/boards/arm/imx9/imx95-evk/src/Makefile b/boards/arm/imx9/imx95-evk/src/Makefile index ad36c4085c2c6..38e0db974f0f5 100644 --- a/boards/arm/imx9/imx95-evk/src/Makefile +++ b/boards/arm/imx9/imx95-evk/src/Makefile @@ -25,10 +25,6 @@ include $(TOPDIR)/Make.defs CSRCS = imx95_boardinit.c imx95_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += imx95_appinit.c -endif - ifeq ($(CONFIG_PWM),y) CSRCS += imx95_pwm.c endif diff --git a/boards/arm/imx9/imx95-evk/src/imx95_appinit.c b/boards/arm/imx9/imx95-evk/src/imx95_appinit.c deleted file mode 100644 index 207befa8147f1..0000000000000 --- a/boards/arm/imx9/imx95-evk/src/imx95_appinit.c +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** - * boards/arm/imx9/imx95-evk/src/imx95_appinit.c - * - * SPDX-License-Identifier: Apache-2.0 - * SPDX-FileCopyrightText: 2024 NXP - * - * 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 -#include -#include -#include "imx95-evk.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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 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) -{ - UNUSED(arg); -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board initialization */ - - return imx95_bringup(); -#else - return OK; -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/arm/imx9/mr-navq95b/configs/nsh/defconfig b/boards/arm/imx9/mr-navq95b/configs/nsh/defconfig index 4aa196b5914a3..7d0f44e938ec0 100644 --- a/boards/arm/imx9/mr-navq95b/configs/nsh/defconfig +++ b/boards/arm/imx9/mr-navq95b/configs/nsh/defconfig @@ -42,7 +42,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_LOCALTIME=y CONFIG_LPUART2_SERIAL_CONSOLE=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/imx9/mr-navq95b/configs/rpmsg/defconfig b/boards/arm/imx9/mr-navq95b/configs/rpmsg/defconfig index 894d672fa8041..3f3725582134e 100644 --- a/boards/arm/imx9/mr-navq95b/configs/rpmsg/defconfig +++ b/boards/arm/imx9/mr-navq95b/configs/rpmsg/defconfig @@ -57,7 +57,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_LOCALTIME=y CONFIG_LPUART2_SERIAL_CONSOLE=y CONFIG_MM_HEAP_MEMPOOL_THRESHOLD=0 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/imx9/mr-navq95b/src/CMakeLists.txt b/boards/arm/imx9/mr-navq95b/src/CMakeLists.txt index 2a30bf6bce7a9..affbdf1de0d03 100644 --- a/boards/arm/imx9/mr-navq95b/src/CMakeLists.txt +++ b/boards/arm/imx9/mr-navq95b/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS imx95_boardinit.c imx95_bringup.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS imx95_appinit.c) -endif() - if(CONFIG_PWM) list(APPEND SRCS imx95_pwm.c) endif() diff --git a/boards/arm/imx9/mr-navq95b/src/Makefile b/boards/arm/imx9/mr-navq95b/src/Makefile index 5f75df705b0c2..9ece31344a257 100644 --- a/boards/arm/imx9/mr-navq95b/src/Makefile +++ b/boards/arm/imx9/mr-navq95b/src/Makefile @@ -25,10 +25,6 @@ include $(TOPDIR)/Make.defs CSRCS = imx95_boardinit.c imx95_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += imx95_appinit.c -endif - ifeq ($(CONFIG_PWM),y) CSRCS += imx95_pwm.c endif diff --git a/boards/arm/imx9/mr-navq95b/src/imx95_appinit.c b/boards/arm/imx9/mr-navq95b/src/imx95_appinit.c deleted file mode 100644 index 6a3d2d40e3fa4..0000000000000 --- a/boards/arm/imx9/mr-navq95b/src/imx95_appinit.c +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** - * boards/arm/imx9/mr-navq95b/src/imx95_appinit.c - * - * SPDX-License-Identifier: Apache-2.0 - * SPDX-FileCopyrightText: 2026 NXP - * - * 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 -#include -#include -#include "mr-navq95b.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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 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) -{ - UNUSED(arg); -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board initialization */ - - return imx95_bringup(); -#else - return OK; -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/arm/imxrt/arcx-socket-grid/configs/nsh/defconfig b/boards/arm/imxrt/arcx-socket-grid/configs/nsh/defconfig index 312837e0d423c..97ac1825ede6c 100644 --- a/boards/arm/imxrt/arcx-socket-grid/configs/nsh/defconfig +++ b/boards/arm/imxrt/arcx-socket-grid/configs/nsh/defconfig @@ -24,7 +24,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_LPUART1_SERIAL_CONSOLE=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/imxrt/arcx-socket-grid/configs/usbdisk/defconfig b/boards/arm/imxrt/arcx-socket-grid/configs/usbdisk/defconfig index ff107025ab3c4..53d9e1d1e8dbb 100644 --- a/boards/arm/imxrt/arcx-socket-grid/configs/usbdisk/defconfig +++ b/boards/arm/imxrt/arcx-socket-grid/configs/usbdisk/defconfig @@ -30,7 +30,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_LPUART1_SERIAL_CONSOLE=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/imxrt/arcx-socket-grid/src/CMakeLists.txt b/boards/arm/imxrt/arcx-socket-grid/src/CMakeLists.txt index 393a38a41bc4b..bb59f42c1f7ed 100644 --- a/boards/arm/imxrt/arcx-socket-grid/src/CMakeLists.txt +++ b/boards/arm/imxrt/arcx-socket-grid/src/CMakeLists.txt @@ -20,18 +20,13 @@ # # ############################################################################## -set(SRCS imxrt_boot.c imxrt_flexspi_nor_boot.c imxrt_flexspi_nor_flash.c) +set(SRCS imxrt_boot.c imxrt_flexspi_nor_boot.c imxrt_flexspi_nor_flash.c + imxrt_bringup.c) if(CONFIG_IMXRT_SDRAMC) list(APPEND SRCS imxrt_sdram.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS imxrt_appinit.c imxrt_bringup.c) -elseif(CONFIG_BOARD_LATE_INITIALIZE) - list(APPEND SRCS imxrt_bringup.c) -endif() - if(CONFIG_ARCH_LEDS) list(APPEND SRCS imxrt_autoleds.c) else() diff --git a/boards/arm/imxrt/arcx-socket-grid/src/Makefile b/boards/arm/imxrt/arcx-socket-grid/src/Makefile index c4b41eb81df2f..06417d05b1a10 100644 --- a/boards/arm/imxrt/arcx-socket-grid/src/Makefile +++ b/boards/arm/imxrt/arcx-socket-grid/src/Makefile @@ -23,17 +23,12 @@ include $(TOPDIR)/Make.defs CSRCS = imxrt_boot.c imxrt_flexspi_nor_boot.c imxrt_flexspi_nor_flash.c +CSRCS += imxrt_bringup.c ifeq ($(CONFIG_IMXRT_SDRAMC),y) CSRCS += imxrt_sdram.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += imxrt_appinit.c imxrt_bringup.c -else ifeq ($(CONFIG_BOARD_LATE_INITIALIZE),y) -CSRCS += imxrt_bringup.c -endif - ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += imxrt_autoleds.c else diff --git a/boards/arm/imxrt/arcx-socket-grid/src/arcx-socket-grid.h b/boards/arm/imxrt/arcx-socket-grid/src/arcx-socket-grid.h index c211cbeb05590..6272bec74c844 100644 --- a/boards/arm/imxrt/arcx-socket-grid/src/arcx-socket-grid.h +++ b/boards/arm/imxrt/arcx-socket-grid/src/arcx-socket-grid.h @@ -138,9 +138,7 @@ * ****************************************************************************/ -#if defined(CONFIG_BOARDCTL) || defined(CONFIG_BOARD_LATE_INITIALIZE) int imxrt_bringup(void); -#endif /**************************************************************************** * Name: imxrt_spidev_initialize diff --git a/boards/arm/imxrt/arcx-socket-grid/src/imxrt_appinit.c b/boards/arm/imxrt/arcx-socket-grid/src/imxrt_appinit.c deleted file mode 100644 index dd599b1a5e2a4..0000000000000 --- a/boards/arm/imxrt/arcx-socket-grid/src/imxrt_appinit.c +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** - * boards/arm/imxrt/arcx-socket-grid/src/imxrt_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 - -#include - -#include - -#include "arcx-socket-grid.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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 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) -{ -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board initialization */ - - return imxrt_bringup(); -#else - return OK; -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/arm/imxrt/imxrt1020-evk/configs/netnsh/defconfig b/boards/arm/imxrt/imxrt1020-evk/configs/netnsh/defconfig index 16b20169d0a3c..70c252c8b25ad 100644 --- a/boards/arm/imxrt/imxrt1020-evk/configs/netnsh/defconfig +++ b/boards/arm/imxrt/imxrt1020-evk/configs/netnsh/defconfig @@ -42,7 +42,6 @@ CONFIG_NET_ICMP_SOCKET=y CONFIG_NET_IGMP=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/imxrt/imxrt1020-evk/configs/nsh/defconfig b/boards/arm/imxrt/imxrt1020-evk/configs/nsh/defconfig index f6070d740af00..82e128f7a7910 100644 --- a/boards/arm/imxrt/imxrt1020-evk/configs/nsh/defconfig +++ b/boards/arm/imxrt/imxrt1020-evk/configs/nsh/defconfig @@ -31,7 +31,6 @@ CONFIG_LINE_MAX=64 CONFIG_LPUART1_RXBUFSIZE=1024 CONFIG_LPUART1_SERIAL_CONSOLE=y CONFIG_LPUART1_TXBUFSIZE=1024 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/imxrt/imxrt1020-evk/configs/usdhc/defconfig b/boards/arm/imxrt/imxrt1020-evk/configs/usdhc/defconfig index 225238af67e57..d19e639efe137 100644 --- a/boards/arm/imxrt/imxrt1020-evk/configs/usdhc/defconfig +++ b/boards/arm/imxrt/imxrt1020-evk/configs/usdhc/defconfig @@ -47,7 +47,6 @@ CONFIG_LPUART1_TXBUFSIZE=1024 CONFIG_MMCSD=y CONFIG_MMCSD_SDIO=y CONFIG_MM_IOB=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/imxrt/imxrt1020-evk/src/CMakeLists.txt b/boards/arm/imxrt/imxrt1020-evk/src/CMakeLists.txt index 78b11bbd725f9..b7bc46c6803ba 100644 --- a/boards/arm/imxrt/imxrt1020-evk/src/CMakeLists.txt +++ b/boards/arm/imxrt/imxrt1020-evk/src/CMakeLists.txt @@ -20,18 +20,13 @@ # # ############################################################################## -set(SRCS imxrt_flexspi_nor_flash.c imxrt_boot.c imxrt_flexspi_nor_boot.c) +set(SRCS imxrt_flexspi_nor_flash.c imxrt_boot.c imxrt_flexspi_nor_boot.c + imxrt_bringup.c) if(CONFIG_IMXRT_SDRAMC) list(APPEND SRCS imxrt_sdram.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS imxrt_appinit.c imxrt_bringup.c) -elseif(CONFIG_BOARD_LATE_INITIALIZE) - list(APPEND SRCS imxrt_bringup.c) -endif() - if(CONFIG_ARCH_LEDS) list(APPEND SRCS imxrt_autoleds.c) else() diff --git a/boards/arm/imxrt/imxrt1020-evk/src/Makefile b/boards/arm/imxrt/imxrt1020-evk/src/Makefile index 271a9274b8dab..d2404930d37c5 100644 --- a/boards/arm/imxrt/imxrt1020-evk/src/Makefile +++ b/boards/arm/imxrt/imxrt1020-evk/src/Makefile @@ -23,16 +23,12 @@ include $(TOPDIR)/Make.defs CSRCS = imxrt_flexspi_nor_flash.c imxrt_boot.c imxrt_flexspi_nor_boot.c +CSRCS += imxrt_bringup.c + ifeq ($(CONFIG_IMXRT_SDRAMC),y) CSRCS += imxrt_sdram.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += imxrt_appinit.c imxrt_bringup.c -else ifeq ($(CONFIG_BOARD_LATE_INITIALIZE),y) -CSRCS += imxrt_bringup.c -endif - ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += imxrt_autoleds.c else diff --git a/boards/arm/imxrt/imxrt1020-evk/src/imxrt_appinit.c b/boards/arm/imxrt/imxrt1020-evk/src/imxrt_appinit.c deleted file mode 100644 index eaba3ad82583b..0000000000000 --- a/boards/arm/imxrt/imxrt1020-evk/src/imxrt_appinit.c +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** - * boards/arm/imxrt/imxrt1020-evk/src/imxrt_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 - -#include - -#include - -#include "imxrt1020-evk.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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 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) -{ -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board initialization */ - - return imxrt_bringup(); -#else - return OK; -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/arm/imxrt/imxrt1050-evk/configs/knsh/defconfig b/boards/arm/imxrt/imxrt1050-evk/configs/knsh/defconfig index b1f9594177340..c9d585b225c4b 100644 --- a/boards/arm/imxrt/imxrt1050-evk/configs/knsh/defconfig +++ b/boards/arm/imxrt/imxrt1050-evk/configs/knsh/defconfig @@ -26,7 +26,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_LPUART1_SERIAL_CONSOLE=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_DISABLE_MKRD=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/imxrt/imxrt1050-evk/configs/libcxxtest/defconfig b/boards/arm/imxrt/imxrt1050-evk/configs/libcxxtest/defconfig index cac883dc017a2..dd06a8522e3a5 100644 --- a/boards/arm/imxrt/imxrt1050-evk/configs/libcxxtest/defconfig +++ b/boards/arm/imxrt/imxrt1050-evk/configs/libcxxtest/defconfig @@ -12,7 +12,6 @@ CONFIG_ARCH_CHIP="imxrt" CONFIG_ARCH_CHIP_IMXRT=y CONFIG_ARCH_CHIP_MIMXRT1052DVL6A=y CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=20000 CONFIG_BUILTIN=y CONFIG_CXX_LOCALIZATION=y diff --git a/boards/arm/imxrt/imxrt1050-evk/configs/netnsh/defconfig b/boards/arm/imxrt/imxrt1050-evk/configs/netnsh/defconfig index 6debcff3d0695..733b3cc13bc88 100644 --- a/boards/arm/imxrt/imxrt1050-evk/configs/netnsh/defconfig +++ b/boards/arm/imxrt/imxrt1050-evk/configs/netnsh/defconfig @@ -44,7 +44,6 @@ CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_WRITE_BUFFERS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/imxrt/imxrt1050-evk/configs/nsh/defconfig b/boards/arm/imxrt/imxrt1050-evk/configs/nsh/defconfig index 87cca291427c3..181bc16fca800 100644 --- a/boards/arm/imxrt/imxrt1050-evk/configs/nsh/defconfig +++ b/boards/arm/imxrt/imxrt1050-evk/configs/nsh/defconfig @@ -24,7 +24,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_LPUART1_SERIAL_CONSOLE=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/imxrt/imxrt1050-evk/src/CMakeLists.txt b/boards/arm/imxrt/imxrt1050-evk/src/CMakeLists.txt index 0810cb71c883f..972d105f16ff7 100644 --- a/boards/arm/imxrt/imxrt1050-evk/src/CMakeLists.txt +++ b/boards/arm/imxrt/imxrt1050-evk/src/CMakeLists.txt @@ -20,18 +20,13 @@ # # ############################################################################## -set(SRCS imxrt_boot.c imxrt_flexspi_nor_boot.c imxrt_flexspi_nor_flash.c) +set(SRCS imxrt_boot.c imxrt_flexspi_nor_boot.c imxrt_flexspi_nor_flash.c + imxrt_bringup.c) if(CONFIG_IMXRT_SDRAMC) list(APPEND SRCS imxrt_sdram.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS imxrt_appinit.c imxrt_bringup.c) -elseif(CONFIG_BOARD_LATE_INITIALIZE) - list(APPEND SRCS imxrt_bringup.c) -endif() - if(CONFIG_ARCH_LEDS) list(APPEND SRCS imxrt_autoleds.c) else() diff --git a/boards/arm/imxrt/imxrt1050-evk/src/Makefile b/boards/arm/imxrt/imxrt1050-evk/src/Makefile index a088fb4ec62ff..ee67fd28bb256 100644 --- a/boards/arm/imxrt/imxrt1050-evk/src/Makefile +++ b/boards/arm/imxrt/imxrt1050-evk/src/Makefile @@ -23,17 +23,12 @@ include $(TOPDIR)/Make.defs CSRCS = imxrt_boot.c imxrt_flexspi_nor_boot.c imxrt_flexspi_nor_flash.c +CSRCS += imxrt_bringup.c ifeq ($(CONFIG_IMXRT_SDRAMC),y) CSRCS += imxrt_sdram.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += imxrt_appinit.c imxrt_bringup.c -else ifeq ($(CONFIG_BOARD_LATE_INITIALIZE),y) -CSRCS += imxrt_bringup.c -endif - ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += imxrt_autoleds.c else diff --git a/boards/arm/imxrt/imxrt1050-evk/src/imxrt_appinit.c b/boards/arm/imxrt/imxrt1050-evk/src/imxrt_appinit.c deleted file mode 100644 index 9857be556f01d..0000000000000 --- a/boards/arm/imxrt/imxrt1050-evk/src/imxrt_appinit.c +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** - * boards/arm/imxrt/imxrt1050-evk/src/imxrt_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 - -#include - -#include - -#include "imxrt1050-evk.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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 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) -{ -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board initialization */ - - return imxrt_bringup(); -#else - return OK; -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/arm/imxrt/imxrt1060-evk/configs/can/defconfig b/boards/arm/imxrt/imxrt1060-evk/configs/can/defconfig index 9d1f0b4d00f99..fa021c041a791 100644 --- a/boards/arm/imxrt/imxrt1060-evk/configs/can/defconfig +++ b/boards/arm/imxrt/imxrt1060-evk/configs/can/defconfig @@ -61,7 +61,6 @@ CONFIG_NET_CAN_NOTIFIER=y CONFIG_NET_SOCKOPTS=y CONFIG_NET_STATISTICS=y CONFIG_NET_TIMESTAMP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/imxrt/imxrt1060-evk/configs/canfd/defconfig b/boards/arm/imxrt/imxrt1060-evk/configs/canfd/defconfig index ad73e218b9d0b..7bf60bf218e33 100644 --- a/boards/arm/imxrt/imxrt1060-evk/configs/canfd/defconfig +++ b/boards/arm/imxrt/imxrt1060-evk/configs/canfd/defconfig @@ -62,7 +62,6 @@ CONFIG_NET_CAN_NOTIFIER=y CONFIG_NET_CAN_SOCK_OPTS=y CONFIG_NET_STATISTICS=y CONFIG_NET_TIMESTAMP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/imxrt/imxrt1060-evk/configs/knsh/defconfig b/boards/arm/imxrt/imxrt1060-evk/configs/knsh/defconfig index 4fe8df7159108..8f8c768a96ee6 100644 --- a/boards/arm/imxrt/imxrt1060-evk/configs/knsh/defconfig +++ b/boards/arm/imxrt/imxrt1060-evk/configs/knsh/defconfig @@ -38,7 +38,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_LPUART1_SERIAL_CONSOLE=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_MKRD=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/imxrt/imxrt1060-evk/configs/libcxxtest/defconfig b/boards/arm/imxrt/imxrt1060-evk/configs/libcxxtest/defconfig index 0d71833edb3f7..0a9426d4a6dc3 100644 --- a/boards/arm/imxrt/imxrt1060-evk/configs/libcxxtest/defconfig +++ b/boards/arm/imxrt/imxrt1060-evk/configs/libcxxtest/defconfig @@ -12,7 +12,6 @@ CONFIG_ARCH_CHIP="imxrt" CONFIG_ARCH_CHIP_IMXRT=y CONFIG_ARCH_CHIP_MIMXRT1062DVL6A=y CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=20000 CONFIG_BUILTIN=y CONFIG_CXX_LOCALIZATION=y diff --git a/boards/arm/imxrt/imxrt1060-evk/configs/lvgl/defconfig b/boards/arm/imxrt/imxrt1060-evk/configs/lvgl/defconfig index 91aed44ff7422..c04e09ea77075 100644 --- a/boards/arm/imxrt/imxrt1060-evk/configs/lvgl/defconfig +++ b/boards/arm/imxrt/imxrt1060-evk/configs/lvgl/defconfig @@ -51,7 +51,6 @@ CONFIG_LV_USE_LOG=y CONFIG_LV_USE_NUTTX=y CONFIG_LV_USE_NUTTX_TOUCHSCREEN=y CONFIG_MOTOROLA_SREC=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/imxrt/imxrt1060-evk/configs/netnsh/defconfig b/boards/arm/imxrt/imxrt1060-evk/configs/netnsh/defconfig index efc4fbdb09534..3941482e826d1 100644 --- a/boards/arm/imxrt/imxrt1060-evk/configs/netnsh/defconfig +++ b/boards/arm/imxrt/imxrt1060-evk/configs/netnsh/defconfig @@ -50,7 +50,6 @@ CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_WRITE_BUFFERS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/imxrt/imxrt1060-evk/configs/netnsh_dcache_wb/defconfig b/boards/arm/imxrt/imxrt1060-evk/configs/netnsh_dcache_wb/defconfig index d5bfad6ca6e77..e6a61fbc358c8 100644 --- a/boards/arm/imxrt/imxrt1060-evk/configs/netnsh_dcache_wb/defconfig +++ b/boards/arm/imxrt/imxrt1060-evk/configs/netnsh_dcache_wb/defconfig @@ -57,7 +57,6 @@ CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_WRITE_BUFFERS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/imxrt/imxrt1060-evk/configs/nsh/defconfig b/boards/arm/imxrt/imxrt1060-evk/configs/nsh/defconfig index ec54664f1f290..98eb4eca69324 100644 --- a/boards/arm/imxrt/imxrt1060-evk/configs/nsh/defconfig +++ b/boards/arm/imxrt/imxrt1060-evk/configs/nsh/defconfig @@ -24,7 +24,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_LPUART1_SERIAL_CONSOLE=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/imxrt/imxrt1060-evk/configs/nshocram/defconfig b/boards/arm/imxrt/imxrt1060-evk/configs/nshocram/defconfig index f956fa01417a8..abdccff6dd339 100644 --- a/boards/arm/imxrt/imxrt1060-evk/configs/nshocram/defconfig +++ b/boards/arm/imxrt/imxrt1060-evk/configs/nshocram/defconfig @@ -29,7 +29,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_LPUART1_SERIAL_CONSOLE=y CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/imxrt/imxrt1060-evk/src/CMakeLists.txt b/boards/arm/imxrt/imxrt1060-evk/src/CMakeLists.txt index 3493fd541e055..02c6fb86936f5 100644 --- a/boards/arm/imxrt/imxrt1060-evk/src/CMakeLists.txt +++ b/boards/arm/imxrt/imxrt1060-evk/src/CMakeLists.txt @@ -20,18 +20,13 @@ # # ############################################################################## -set(SRCS imxrt_boot.c imxrt_flexspi_nor_boot.c imxrt_flexspi_nor_flash.c) +set(SRCS imxrt_boot.c imxrt_flexspi_nor_boot.c imxrt_flexspi_nor_flash.c + imxrt_bringup.c) if(CONFIG_IMXRT_SDRAMC) list(APPEND SRCS imxrt_sdram.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS imxrt_appinit.c imxrt_bringup.c) -elseif(CONFIG_BOARD_LATE_INITIALIZE) - list(APPEND SRCS imxrt_bringup.c) -endif() - if(CONFIG_ARCH_LEDS) list(APPEND SRCS imxrt_autoleds.c) else() diff --git a/boards/arm/imxrt/imxrt1060-evk/src/Makefile b/boards/arm/imxrt/imxrt1060-evk/src/Makefile index 7c0d5099ce2a7..5248d181414e3 100644 --- a/boards/arm/imxrt/imxrt1060-evk/src/Makefile +++ b/boards/arm/imxrt/imxrt1060-evk/src/Makefile @@ -23,17 +23,12 @@ include $(TOPDIR)/Make.defs CSRCS = imxrt_boot.c imxrt_flexspi_nor_boot.c imxrt_flexspi_nor_flash.c +CSRCS += imxrt_bringup.c ifeq ($(CONFIG_IMXRT_SDRAMC),y) CSRCS += imxrt_sdram.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += imxrt_appinit.c imxrt_bringup.c -else ifeq ($(CONFIG_BOARD_LATE_INITIALIZE),y) -CSRCS += imxrt_bringup.c -endif - ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += imxrt_autoleds.c else diff --git a/boards/arm/imxrt/imxrt1060-evk/src/imxrt_appinit.c b/boards/arm/imxrt/imxrt1060-evk/src/imxrt_appinit.c deleted file mode 100644 index b5efb37b5c7e1..0000000000000 --- a/boards/arm/imxrt/imxrt1060-evk/src/imxrt_appinit.c +++ /dev/null @@ -1,90 +0,0 @@ -/**************************************************************************** - * boards/arm/imxrt/imxrt1060-evk/src/imxrt_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 -#include -#include - -#include -#include - -#include "imxrt1060-evk.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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 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) -{ -#if !defined(CONFIG_ARCH_LEDS) && defined(CONFIG_USERLED_LOWER) - /* Register the LED driver */ - - int ret; - ret = userled_lower_initialize(LED_DRIVER_PATH); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: userled_lower_initialize() failed: %d\n", ret); - return ret; - } -#endif - -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board initialization */ - - return imxrt_bringup(); -#else - return OK; -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/arm/imxrt/imxrt1060-evk/src/imxrt_boot.c b/boards/arm/imxrt/imxrt1060-evk/src/imxrt_boot.c index d6237861a0471..15fd608aeee41 100644 --- a/boards/arm/imxrt/imxrt1060-evk/src/imxrt_boot.c +++ b/boards/arm/imxrt/imxrt1060-evk/src/imxrt_boot.c @@ -26,8 +26,12 @@ #include +#include +#include + #include #include +#include #include "imxrt_start.h" #include "imxrt1060-evk.h" @@ -112,6 +116,17 @@ void imxrt_boardinitialize(void) #ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { +#if !defined(CONFIG_ARCH_LEDS) && defined(CONFIG_USERLED_LOWER) + /* Register the LED driver */ + + int ret; + ret = userled_lower_initialize(LED_DRIVER_PATH); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: userled_lower_initialize() failed: %d\n", ret); + } +#endif + /* Perform board initialization */ imxrt_bringup(); diff --git a/boards/arm/imxrt/imxrt1064-evk/configs/can/defconfig b/boards/arm/imxrt/imxrt1064-evk/configs/can/defconfig index 1bfa228a3fae2..2f52bb5d3cd71 100644 --- a/boards/arm/imxrt/imxrt1064-evk/configs/can/defconfig +++ b/boards/arm/imxrt/imxrt1064-evk/configs/can/defconfig @@ -61,7 +61,6 @@ CONFIG_NET_CAN_NOTIFIER=y CONFIG_NET_SOCKOPTS=y CONFIG_NET_STATISTICS=y CONFIG_NET_TIMESTAMP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/imxrt/imxrt1064-evk/configs/canfd/defconfig b/boards/arm/imxrt/imxrt1064-evk/configs/canfd/defconfig index 16db089bb92d3..30a14a6e43dd0 100644 --- a/boards/arm/imxrt/imxrt1064-evk/configs/canfd/defconfig +++ b/boards/arm/imxrt/imxrt1064-evk/configs/canfd/defconfig @@ -62,7 +62,6 @@ CONFIG_NET_CAN_NOTIFIER=y CONFIG_NET_CAN_SOCK_OPTS=y CONFIG_NET_STATISTICS=y CONFIG_NET_TIMESTAMP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/imxrt/imxrt1064-evk/configs/knsh/defconfig b/boards/arm/imxrt/imxrt1064-evk/configs/knsh/defconfig index 75dc36f01152d..133896b9d2477 100644 --- a/boards/arm/imxrt/imxrt1064-evk/configs/knsh/defconfig +++ b/boards/arm/imxrt/imxrt1064-evk/configs/knsh/defconfig @@ -26,7 +26,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_LPUART1_SERIAL_CONSOLE=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_DISABLE_MKRD=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/imxrt/imxrt1064-evk/configs/libcxxtest/defconfig b/boards/arm/imxrt/imxrt1064-evk/configs/libcxxtest/defconfig index c8d21e044ffbc..645686547423a 100644 --- a/boards/arm/imxrt/imxrt1064-evk/configs/libcxxtest/defconfig +++ b/boards/arm/imxrt/imxrt1064-evk/configs/libcxxtest/defconfig @@ -12,7 +12,6 @@ CONFIG_ARCH_CHIP="imxrt" CONFIG_ARCH_CHIP_IMXRT=y CONFIG_ARCH_CHIP_MIMXRT1064DVL6A=y CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=20000 CONFIG_BUILTIN=y CONFIG_CXX_LOCALIZATION=y diff --git a/boards/arm/imxrt/imxrt1064-evk/configs/lvgl/defconfig b/boards/arm/imxrt/imxrt1064-evk/configs/lvgl/defconfig index 58de0530bbe16..a0f99ac14ba55 100644 --- a/boards/arm/imxrt/imxrt1064-evk/configs/lvgl/defconfig +++ b/boards/arm/imxrt/imxrt1064-evk/configs/lvgl/defconfig @@ -53,7 +53,6 @@ CONFIG_LV_USE_LOG=y CONFIG_LV_USE_NUTTX=y CONFIG_LV_USE_NUTTX_TOUCHSCREEN=y CONFIG_MOTOROLA_SREC=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/imxrt/imxrt1064-evk/configs/mcuboot-app/defconfig b/boards/arm/imxrt/imxrt1064-evk/configs/mcuboot-app/defconfig index beec0598dd080..568f036fe6337 100644 --- a/boards/arm/imxrt/imxrt1064-evk/configs/mcuboot-app/defconfig +++ b/boards/arm/imxrt/imxrt1064-evk/configs/mcuboot-app/defconfig @@ -61,7 +61,6 @@ CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_WRITE_BUFFERS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_MOTD=y diff --git a/boards/arm/imxrt/imxrt1064-evk/configs/netnsh/defconfig b/boards/arm/imxrt/imxrt1064-evk/configs/netnsh/defconfig index ee1f01b8d9785..d2104f5ca422b 100644 --- a/boards/arm/imxrt/imxrt1064-evk/configs/netnsh/defconfig +++ b/boards/arm/imxrt/imxrt1064-evk/configs/netnsh/defconfig @@ -48,7 +48,6 @@ CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_WRITE_BUFFERS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/imxrt/imxrt1064-evk/configs/nsh/defconfig b/boards/arm/imxrt/imxrt1064-evk/configs/nsh/defconfig index 378ec4af10c14..b4645a43cc72d 100644 --- a/boards/arm/imxrt/imxrt1064-evk/configs/nsh/defconfig +++ b/boards/arm/imxrt/imxrt1064-evk/configs/nsh/defconfig @@ -24,7 +24,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_LPUART1_SERIAL_CONSOLE=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/imxrt/imxrt1064-evk/configs/nshocram/defconfig b/boards/arm/imxrt/imxrt1064-evk/configs/nshocram/defconfig index 2c519ba1eec45..f720cd077fc71 100644 --- a/boards/arm/imxrt/imxrt1064-evk/configs/nshocram/defconfig +++ b/boards/arm/imxrt/imxrt1064-evk/configs/nshocram/defconfig @@ -29,7 +29,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_LPUART1_SERIAL_CONSOLE=y CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/imxrt/imxrt1064-evk/src/CMakeLists.txt b/boards/arm/imxrt/imxrt1064-evk/src/CMakeLists.txt index 5b36e3338c77a..0711958020d88 100644 --- a/boards/arm/imxrt/imxrt1064-evk/src/CMakeLists.txt +++ b/boards/arm/imxrt/imxrt1064-evk/src/CMakeLists.txt @@ -20,18 +20,13 @@ # # ############################################################################## -set(SRCS imxrt_boot.c imxrt_flexspi_nor_boot.c imxrt_flexspi_nor_flash.c) +set(SRCS imxrt_boot.c imxrt_flexspi_nor_boot.c imxrt_flexspi_nor_flash.c + imxrt_bringup.c) if(CONFIG_IMXRT_SDRAMC) list(APPEND SRCS imxrt_sdram.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS imxrt_appinit.c imxrt_bringup.c) -elseif(CONFIG_BOARD_LATE_INITIALIZE) - list(APPEND SRCS imxrt_bringup.c) -endif() - if(CONFIG_ARCH_LEDS) list(APPEND SRCS imxrt_autoleds.c) else() diff --git a/boards/arm/imxrt/imxrt1064-evk/src/Makefile b/boards/arm/imxrt/imxrt1064-evk/src/Makefile index 86e1bb5f96568..73df28beab77a 100644 --- a/boards/arm/imxrt/imxrt1064-evk/src/Makefile +++ b/boards/arm/imxrt/imxrt1064-evk/src/Makefile @@ -23,17 +23,12 @@ include $(TOPDIR)/Make.defs CSRCS = imxrt_boot.c imxrt_flexspi_nor_boot.c imxrt_flexspi_nor_flash.c +CSRCS += imxrt_bringup.c ifeq ($(CONFIG_IMXRT_SDRAMC),y) CSRCS += imxrt_sdram.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += imxrt_appinit.c imxrt_bringup.c -else ifeq ($(CONFIG_BOARD_LATE_INITIALIZE),y) -CSRCS += imxrt_bringup.c -endif - ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += imxrt_autoleds.c else diff --git a/boards/arm/imxrt/imxrt1064-evk/src/imxrt_appinit.c b/boards/arm/imxrt/imxrt1064-evk/src/imxrt_appinit.c deleted file mode 100644 index 63dad92bf566c..0000000000000 --- a/boards/arm/imxrt/imxrt1064-evk/src/imxrt_appinit.c +++ /dev/null @@ -1,90 +0,0 @@ -/**************************************************************************** - * boards/arm/imxrt/imxrt1064-evk/src/imxrt_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 -#include -#include - -#include -#include - -#include "imxrt1064-evk.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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 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) -{ -#if !defined(CONFIG_ARCH_LEDS) && defined(CONFIG_USERLED_LOWER) - /* Register the LED driver */ - - int ret; - ret = userled_lower_initialize(LED_DRIVER_PATH); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: userled_lower_initialize() failed: %d\n", ret); - return ret; - } -#endif - -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board initialization */ - - return imxrt_bringup(); -#else - return OK; -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/arm/imxrt/imxrt1064-evk/src/imxrt_boot.c b/boards/arm/imxrt/imxrt1064-evk/src/imxrt_boot.c index 8ff31cf02a46b..afcc69ad53ae7 100644 --- a/boards/arm/imxrt/imxrt1064-evk/src/imxrt_boot.c +++ b/boards/arm/imxrt/imxrt1064-evk/src/imxrt_boot.c @@ -26,8 +26,12 @@ #include +#include +#include + #include #include +#include #include "imxrt_start.h" #include "imxrt1064-evk.h" @@ -112,6 +116,17 @@ void imxrt_boardinitialize(void) #ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { +#if !defined(CONFIG_ARCH_LEDS) && defined(CONFIG_USERLED_LOWER) + /* Register the LED driver */ + + int ret; + ret = userled_lower_initialize(LED_DRIVER_PATH); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: userled_lower_initialize() failed: %d\n", ret); + } +#endif + /* Perform board initialization */ imxrt_bringup(); diff --git a/boards/arm/imxrt/imxrt1170-evk/configs/can/defconfig b/boards/arm/imxrt/imxrt1170-evk/configs/can/defconfig index 01584356c1ede..c4009b72df480 100644 --- a/boards/arm/imxrt/imxrt1170-evk/configs/can/defconfig +++ b/boards/arm/imxrt/imxrt1170-evk/configs/can/defconfig @@ -63,7 +63,6 @@ CONFIG_NET_CAN_NOTIFIER=y CONFIG_NET_SOCKOPTS=y CONFIG_NET_STATISTICS=y CONFIG_NET_TIMESTAMP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/imxrt/imxrt1170-evk/configs/canfd/defconfig b/boards/arm/imxrt/imxrt1170-evk/configs/canfd/defconfig index 9f5a236d61516..402ece45ab3b8 100644 --- a/boards/arm/imxrt/imxrt1170-evk/configs/canfd/defconfig +++ b/boards/arm/imxrt/imxrt1170-evk/configs/canfd/defconfig @@ -63,7 +63,6 @@ CONFIG_NET_CAN_NOTIFIER=y CONFIG_NET_CAN_SOCK_OPTS=y CONFIG_NET_STATISTICS=y CONFIG_NET_TIMESTAMP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/imxrt/imxrt1170-evk/configs/knsh/defconfig b/boards/arm/imxrt/imxrt1170-evk/configs/knsh/defconfig index b0115f341090a..2e1b92d6d7b21 100644 --- a/boards/arm/imxrt/imxrt1170-evk/configs/knsh/defconfig +++ b/boards/arm/imxrt/imxrt1170-evk/configs/knsh/defconfig @@ -28,7 +28,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_LPUART1_SERIAL_CONSOLE=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_DISABLE_MKRD=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/imxrt/imxrt1170-evk/configs/libcxxtest/defconfig b/boards/arm/imxrt/imxrt1170-evk/configs/libcxxtest/defconfig index 945e2245405d7..006dcb678be44 100644 --- a/boards/arm/imxrt/imxrt1170-evk/configs/libcxxtest/defconfig +++ b/boards/arm/imxrt/imxrt1170-evk/configs/libcxxtest/defconfig @@ -12,7 +12,6 @@ CONFIG_ARCH_CHIP="imxrt" CONFIG_ARCH_CHIP_IMXRT=y CONFIG_ARCH_CHIP_MIMXRT1176DVMAA=y CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=20000 CONFIG_BUILTIN=y CONFIG_CXX_LOCALIZATION=y diff --git a/boards/arm/imxrt/imxrt1170-evk/configs/netnsh/defconfig b/boards/arm/imxrt/imxrt1170-evk/configs/netnsh/defconfig index ad3b39e8047e0..92807805acb64 100644 --- a/boards/arm/imxrt/imxrt1170-evk/configs/netnsh/defconfig +++ b/boards/arm/imxrt/imxrt1170-evk/configs/netnsh/defconfig @@ -73,7 +73,6 @@ CONFIG_NETUTILS_DHCPC=y CONFIG_NET_ICMP_SOCKET=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/imxrt/imxrt1170-evk/configs/nsh/defconfig b/boards/arm/imxrt/imxrt1170-evk/configs/nsh/defconfig index 8f3e04c35bdc8..4cef27e9f0bbd 100644 --- a/boards/arm/imxrt/imxrt1170-evk/configs/nsh/defconfig +++ b/boards/arm/imxrt/imxrt1170-evk/configs/nsh/defconfig @@ -34,7 +34,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_LOCALTIME=y CONFIG_LINE_MAX=64 CONFIG_LPUART1_SERIAL_CONSOLE=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/imxrt/imxrt1170-evk/src/CMakeLists.txt b/boards/arm/imxrt/imxrt1170-evk/src/CMakeLists.txt index a152cf3f22f6f..99e1741b4175b 100644 --- a/boards/arm/imxrt/imxrt1170-evk/src/CMakeLists.txt +++ b/boards/arm/imxrt/imxrt1170-evk/src/CMakeLists.txt @@ -21,18 +21,12 @@ # ############################################################################## set(SRCS imxrt_boot.c imxrt_flexspi_nor_boot.c imxrt_flexspi_nor_flash.c - imxrt_clockconfig.c) + imxrt_clockconfig.c imxrt_bringup.c) if(CONFIG_IMXRT_SDRAMC) list(APPEND SRCS imxrt_sdram.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS imxrt_appinit.c imxrt_bringup.c) -elseif(CONFIG_BOARD_LATE_INITIALIZE) - list(APPEND SRCS imxrt_bringup.c) -endif() - if(CONFIG_ARCH_LEDS) list(APPEND SRCS imxrt_autoleds.c) else() diff --git a/boards/arm/imxrt/imxrt1170-evk/src/Makefile b/boards/arm/imxrt/imxrt1170-evk/src/Makefile index 33b33360ed728..87f0a67539355 100644 --- a/boards/arm/imxrt/imxrt1170-evk/src/Makefile +++ b/boards/arm/imxrt/imxrt1170-evk/src/Makefile @@ -23,18 +23,12 @@ include $(TOPDIR)/Make.defs CSRCS = imxrt_boot.c imxrt_flexspi_nor_boot.c imxrt_flexspi_nor_flash.c -CSRCS += imxrt_clockconfig.c +CSRCS += imxrt_clockconfig.c imxrt_bringup.c ifeq ($(CONFIG_IMXRT_SDRAMC),y) CSRCS += imxrt_sdram.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += imxrt_appinit.c imxrt_bringup.c -else ifeq ($(CONFIG_BOARD_LATE_INITIALIZE),y) -CSRCS += imxrt_bringup.c -endif - ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += imxrt_autoleds.c else diff --git a/boards/arm/imxrt/imxrt1170-evk/src/imxrt_appinit.c b/boards/arm/imxrt/imxrt1170-evk/src/imxrt_appinit.c deleted file mode 100644 index b4e7fc7dcb4ca..0000000000000 --- a/boards/arm/imxrt/imxrt1170-evk/src/imxrt_appinit.c +++ /dev/null @@ -1,90 +0,0 @@ -/**************************************************************************** - * boards/arm/imxrt/imxrt1170-evk/src/imxrt_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 -#include -#include - -#include -#include - -#include "imxrt1170-evk.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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 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) -{ -#if !defined(CONFIG_ARCH_LEDS) && defined(CONFIG_USERLED_LOWER) - /* Register the LED driver */ - - int ret; - ret = userled_lower_initialize(LED_DRIVER_PATH); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: userled_lower_initialize() failed: %d\n", ret); - return ret; - } -#endif - -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board initialization */ - - return imxrt_bringup(); -#else - return OK; -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/arm/imxrt/imxrt1170-evk/src/imxrt_boot.c b/boards/arm/imxrt/imxrt1170-evk/src/imxrt_boot.c index c2b0a31c73996..00ae6df22ea48 100644 --- a/boards/arm/imxrt/imxrt1170-evk/src/imxrt_boot.c +++ b/boards/arm/imxrt/imxrt1170-evk/src/imxrt_boot.c @@ -26,8 +26,12 @@ #include +#include +#include + #include #include +#include #include "imxrt_start.h" #include "imxrt1170-evk.h" @@ -124,6 +128,17 @@ void imxrt_boardinitialize(void) #ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { +#if !defined(CONFIG_ARCH_LEDS) && defined(CONFIG_USERLED_LOWER) + /* Register the LED driver */ + + int ret; + ret = userled_lower_initialize(LED_DRIVER_PATH); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: userled_lower_initialize() failed: %d\n", ret); + } +#endif + /* Perform board initialization */ imxrt_bringup(); diff --git a/boards/arm/imxrt/teensy-4.x/configs/can-4.1/defconfig b/boards/arm/imxrt/teensy-4.x/configs/can-4.1/defconfig index 62a85b36c5862..be3140e069f3d 100644 --- a/boards/arm/imxrt/teensy-4.x/configs/can-4.1/defconfig +++ b/boards/arm/imxrt/teensy-4.x/configs/can-4.1/defconfig @@ -42,7 +42,6 @@ CONFIG_NET_CAN_NOTIFIER=y CONFIG_NET_CAN_SOCK_OPTS=y CONFIG_NET_STATISTICS=y CONFIG_NET_TIMESTAMP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/imxrt/teensy-4.x/configs/enc-4.1/defconfig b/boards/arm/imxrt/teensy-4.x/configs/enc-4.1/defconfig index b2a71dca07712..ba5bb0d70d651 100644 --- a/boards/arm/imxrt/teensy-4.x/configs/enc-4.1/defconfig +++ b/boards/arm/imxrt/teensy-4.x/configs/enc-4.1/defconfig @@ -30,7 +30,6 @@ CONFIG_IOB_NCHAINS=24 CONFIG_LINE_MAX=64 CONFIG_LPUART1_SERIAL_CONSOLE=y CONFIG_MM_IOB=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/imxrt/teensy-4.x/configs/lcd-4.1/defconfig b/boards/arm/imxrt/teensy-4.x/configs/lcd-4.1/defconfig index e283a6ff2e865..a904ceda4aa44 100644 --- a/boards/arm/imxrt/teensy-4.x/configs/lcd-4.1/defconfig +++ b/boards/arm/imxrt/teensy-4.x/configs/lcd-4.1/defconfig @@ -36,7 +36,6 @@ CONFIG_LCD_FRAMEBUFFER=y CONFIG_LCD_PORTRAIT=y CONFIG_LCD_ST7789=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/imxrt/teensy-4.x/configs/lua-4.1/defconfig b/boards/arm/imxrt/teensy-4.x/configs/lua-4.1/defconfig index a865e170d9263..5dbf5a4ac101f 100644 --- a/boards/arm/imxrt/teensy-4.x/configs/lua-4.1/defconfig +++ b/boards/arm/imxrt/teensy-4.x/configs/lua-4.1/defconfig @@ -40,7 +40,6 @@ CONFIG_LINE_MAX=64 CONFIG_MMCSD=y CONFIG_MMCSD_MULTIBLOCK_LIMIT=1 CONFIG_MMCSD_SDIO=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/imxrt/teensy-4.x/configs/netnsh-4.1/defconfig b/boards/arm/imxrt/teensy-4.x/configs/netnsh-4.1/defconfig index 34421cfd55a22..570f15b7aa932 100644 --- a/boards/arm/imxrt/teensy-4.x/configs/netnsh-4.1/defconfig +++ b/boards/arm/imxrt/teensy-4.x/configs/netnsh-4.1/defconfig @@ -47,7 +47,6 @@ CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_WRITE_BUFFERS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/imxrt/teensy-4.x/configs/nsh-4.0/defconfig b/boards/arm/imxrt/teensy-4.x/configs/nsh-4.0/defconfig index 5b3f8ebbda6c7..c5f70a648aa50 100644 --- a/boards/arm/imxrt/teensy-4.x/configs/nsh-4.0/defconfig +++ b/boards/arm/imxrt/teensy-4.x/configs/nsh-4.0/defconfig @@ -26,7 +26,6 @@ CONFIG_IMXRT_USBDEV=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/imxrt/teensy-4.x/configs/nsh-4.1/defconfig b/boards/arm/imxrt/teensy-4.x/configs/nsh-4.1/defconfig index 5022ac5146826..840bb052abd49 100644 --- a/boards/arm/imxrt/teensy-4.x/configs/nsh-4.1/defconfig +++ b/boards/arm/imxrt/teensy-4.x/configs/nsh-4.1/defconfig @@ -26,7 +26,6 @@ CONFIG_IMXRT_USBDEV=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/imxrt/teensy-4.x/configs/pikron-bb/defconfig b/boards/arm/imxrt/teensy-4.x/configs/pikron-bb/defconfig index 2c85160af8434..62928977d918a 100644 --- a/boards/arm/imxrt/teensy-4.x/configs/pikron-bb/defconfig +++ b/boards/arm/imxrt/teensy-4.x/configs/pikron-bb/defconfig @@ -114,7 +114,6 @@ CONFIG_NET_TCP_KEEPALIVE=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_WRITE_BUFFERS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_FILE_APPS=y diff --git a/boards/arm/imxrt/teensy-4.x/configs/pwm-4.1/defconfig b/boards/arm/imxrt/teensy-4.x/configs/pwm-4.1/defconfig index 5a0953ac5b0c4..706e3d3087b8a 100644 --- a/boards/arm/imxrt/teensy-4.x/configs/pwm-4.1/defconfig +++ b/boards/arm/imxrt/teensy-4.x/configs/pwm-4.1/defconfig @@ -36,7 +36,6 @@ CONFIG_IOB_NCHAINS=24 CONFIG_LINE_MAX=64 CONFIG_LPUART1_SERIAL_CONSOLE=y CONFIG_MM_IOB=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/imxrt/teensy-4.x/configs/sd-4.1/defconfig b/boards/arm/imxrt/teensy-4.x/configs/sd-4.1/defconfig index 41f6b0d3fd4e6..23486f5b6e381 100644 --- a/boards/arm/imxrt/teensy-4.x/configs/sd-4.1/defconfig +++ b/boards/arm/imxrt/teensy-4.x/configs/sd-4.1/defconfig @@ -37,7 +37,6 @@ CONFIG_LINE_MAX=64 CONFIG_MMCSD=y CONFIG_MMCSD_MULTIBLOCK_LIMIT=1 CONFIG_MMCSD_SDIO=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/imxrt/teensy-4.x/src/CMakeLists.txt b/boards/arm/imxrt/teensy-4.x/src/CMakeLists.txt index 8e6ab53f78416..a96e99581ec0c 100644 --- a/boards/arm/imxrt/teensy-4.x/src/CMakeLists.txt +++ b/boards/arm/imxrt/teensy-4.x/src/CMakeLists.txt @@ -20,13 +20,8 @@ # # ############################################################################## -set(SRCS imxrt_boot.c imxrt_flexspi_nor_boot.c imxrt_flexspi_nor_flash.c) - -if(CONFIG_BOARDCTL) - list(APPEND SRCS imxrt_appinit.c imxrt_bringup.c) -elseif(CONFIG_BOARD_LATE_INITIALIZE) - list(APPEND SRCS imxrt_bringup.c) -endif() +set(SRCS imxrt_boot.c imxrt_flexspi_nor_boot.c imxrt_flexspi_nor_flash.c + imxrt_bringup.c) if(CONFIG_BOARDCTL_RESET) list(APPEND SRCS imxrt_reset.c) diff --git a/boards/arm/imxrt/teensy-4.x/src/Makefile b/boards/arm/imxrt/teensy-4.x/src/Makefile index 5bb3b17c59fa8..fbb43ad76e541 100644 --- a/boards/arm/imxrt/teensy-4.x/src/Makefile +++ b/boards/arm/imxrt/teensy-4.x/src/Makefile @@ -23,12 +23,7 @@ include $(TOPDIR)/Make.defs CSRCS = imxrt_boot.c imxrt_flexspi_nor_boot.c imxrt_flexspi_nor_flash.c - -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += imxrt_appinit.c imxrt_bringup.c -else ifeq ($(CONFIG_BOARD_LATE_INITIALIZE),y) CSRCS += imxrt_bringup.c -endif ifeq ($(CONFIG_BOARDCTL_RESET),y) CSRCS += imxrt_reset.c diff --git a/boards/arm/imxrt/teensy-4.x/src/imxrt_appinit.c b/boards/arm/imxrt/teensy-4.x/src/imxrt_appinit.c deleted file mode 100644 index cefaabe207b38..0000000000000 --- a/boards/arm/imxrt/teensy-4.x/src/imxrt_appinit.c +++ /dev/null @@ -1,98 +0,0 @@ -/**************************************************************************** - * boards/arm/imxrt/teensy-4.x/src/imxrt_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 - -#include -#include - -#include -#include - -#include "teensy-4.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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 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) -{ - int ret; -#if !defined(CONFIG_ARCH_LEDS) && defined(CONFIG_USERLED_LOWER) - /* Register the LED driver */ - - ret = userled_lower_initialize(LED_DRIVER_PATH); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: userled_lower_initialize() failed: %d\n", ret); - return ret; - } -#endif - -#if defined(CONFIG_IMXRT_LPSPI1) || defined(CONFIG_IMXRT_LPSPI2) || \ - defined(CONFIG_IMXRT_LPSPI3) || defined(CONFIG_IMXRT_LPSPI4) - imxrt_spidev_initialize(); -#endif - -# ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board initialization */ - - return imxrt_bringup(); -# else - return OK; -# endif - - UNUSED(ret); -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/arm/imxrt/teensy-4.x/src/imxrt_boot.c b/boards/arm/imxrt/teensy-4.x/src/imxrt_boot.c index 2c0194c433ca8..80939907e8a83 100644 --- a/boards/arm/imxrt/teensy-4.x/src/imxrt_boot.c +++ b/boards/arm/imxrt/teensy-4.x/src/imxrt_boot.c @@ -26,8 +26,12 @@ #include +#include +#include + #include #include +#include #include "imxrt_start.h" #include "teensy-4.h" @@ -113,8 +117,24 @@ void imxrt_boardinitialize(void) #ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { - /* Perform board initialization */ + int ret; +#if !defined(CONFIG_ARCH_LEDS) && defined(CONFIG_USERLED_LOWER) + /* Register the LED driver */ + + ret = userled_lower_initialize(LED_DRIVER_PATH); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: userled_lower_initialize() failed: %d\n", ret); + } +#endif + +#if defined(CONFIG_IMXRT_LPSPI1) || defined(CONFIG_IMXRT_LPSPI2) || \ + defined(CONFIG_IMXRT_LPSPI3) || defined(CONFIG_IMXRT_LPSPI4) + imxrt_spidev_initialize(); +#endif imxrt_bringup(); + + UNUSED(ret); } #endif /* CONFIG_BOARD_LATE_INITIALIZE */ diff --git a/boards/arm/kinetis/freedom-k28f/configs/nsh/defconfig b/boards/arm/kinetis/freedom-k28f/configs/nsh/defconfig index 55f1cac5fad94..c2fb14ffff084 100644 --- a/boards/arm/kinetis/freedom-k28f/configs/nsh/defconfig +++ b/boards/arm/kinetis/freedom-k28f/configs/nsh/defconfig @@ -26,7 +26,6 @@ CONFIG_KINETIS_SERIALBRK_BSDCOMPAT=y CONFIG_KINETIS_UART_BREAKS=y CONFIG_LINE_MAX=64 CONFIG_LPUART0_SERIAL_CONSOLE=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/kinetis/freedom-k28f/configs/nshsdusb/defconfig b/boards/arm/kinetis/freedom-k28f/configs/nshsdusb/defconfig index 936795e047cf5..ac84a08d9bc7a 100644 --- a/boards/arm/kinetis/freedom-k28f/configs/nshsdusb/defconfig +++ b/boards/arm/kinetis/freedom-k28f/configs/nshsdusb/defconfig @@ -56,7 +56,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/kinetis/freedom-k28f/src/CMakeLists.txt b/boards/arm/kinetis/freedom-k28f/src/CMakeLists.txt index 3041d649abff2..de911f5d882aa 100644 --- a/boards/arm/kinetis/freedom-k28f/src/CMakeLists.txt +++ b/boards/arm/kinetis/freedom-k28f/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS k28_boot.c k28_bringup.c k28_spi.c k28_i2c.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS k28_appinit.c) -endif() - # If the RGB driver is not enabled, then treat the RGB as 3 LEDs if(NOT CONFIG_RGBLED) diff --git a/boards/arm/kinetis/freedom-k28f/src/Makefile b/boards/arm/kinetis/freedom-k28f/src/Makefile index 8ba545e0828b5..0f3e1c14a45a0 100644 --- a/boards/arm/kinetis/freedom-k28f/src/Makefile +++ b/boards/arm/kinetis/freedom-k28f/src/Makefile @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = k28_boot.c k28_bringup.c k28_spi.c k28_i2c.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += k28_appinit.c -endif - # If the RGB driver is not enabled, then treat the RGB as 3 LEDs ifneq ($(CONFIG_RGBLED),y) diff --git a/boards/arm/kinetis/freedom-k28f/src/k28_appinit.c b/boards/arm/kinetis/freedom-k28f/src/k28_appinit.c deleted file mode 100644 index 277c395ac26a4..0000000000000 --- a/boards/arm/kinetis/freedom-k28f/src/k28_appinit.c +++ /dev/null @@ -1,85 +0,0 @@ -/**************************************************************************** - * boards/arm/kinetis/freedom-k28f/src/k28_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 - -#include -#include - -#include - -#include "kinetis_usbotg.h" -#include "freedom-k28f.h" - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * 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 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 k28_bringup(); -#endif -} diff --git a/boards/arm/kinetis/freedom-k64f/configs/cdcacm/defconfig b/boards/arm/kinetis/freedom-k64f/configs/cdcacm/defconfig index d833f6c18676e..263cc075b1605 100644 --- a/boards/arm/kinetis/freedom-k64f/configs/cdcacm/defconfig +++ b/boards/arm/kinetis/freedom-k64f/configs/cdcacm/defconfig @@ -42,7 +42,6 @@ CONFIG_MMCSD=y CONFIG_MMCSD_MULTIBLOCK_LIMIT=1 CONFIG_MMCSD_SDIO=y CONFIG_MOTOROLA_SREC=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/kinetis/freedom-k64f/configs/demo/defconfig b/boards/arm/kinetis/freedom-k64f/configs/demo/defconfig index d61b6193ca986..84fa5f84fb88d 100644 --- a/boards/arm/kinetis/freedom-k64f/configs/demo/defconfig +++ b/boards/arm/kinetis/freedom-k64f/configs/demo/defconfig @@ -51,7 +51,6 @@ CONFIG_NETUTILS_NETCAT=y CONFIG_NET_BROADCAST=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/kinetis/freedom-k64f/configs/netnsh/defconfig b/boards/arm/kinetis/freedom-k64f/configs/netnsh/defconfig index 7c124841764f4..4a6b1a68b1b76 100644 --- a/boards/arm/kinetis/freedom-k64f/configs/netnsh/defconfig +++ b/boards/arm/kinetis/freedom-k64f/configs/netnsh/defconfig @@ -43,7 +43,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/kinetis/freedom-k64f/configs/nsh/defconfig b/boards/arm/kinetis/freedom-k64f/configs/nsh/defconfig index 18c675c6e967b..8adfdb8779d76 100644 --- a/boards/arm/kinetis/freedom-k64f/configs/nsh/defconfig +++ b/boards/arm/kinetis/freedom-k64f/configs/nsh/defconfig @@ -41,7 +41,6 @@ CONFIG_MMCSD=y CONFIG_MMCSD_MULTIBLOCK_LIMIT=1 CONFIG_MMCSD_SDIO=y CONFIG_MOTOROLA_SREC=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/kinetis/freedom-k64f/src/CMakeLists.txt b/boards/arm/kinetis/freedom-k64f/src/CMakeLists.txt index 8987c8811bb12..8a8a896b770bc 100644 --- a/boards/arm/kinetis/freedom-k64f/src/CMakeLists.txt +++ b/boards/arm/kinetis/freedom-k64f/src/CMakeLists.txt @@ -20,7 +20,7 @@ # # ############################################################################## -set(SRCS k64_boot.c k64_spi.c) +set(SRCS k64_boot.c k64_spi.c k64_bringup.c) if(CONFIG_ARCH_LEDS) list(APPEND SRCS k64_autoleds.c) @@ -32,12 +32,6 @@ if(CONFIG_ARCH_BUTTONS) list(APPEND SRCS k64_buttons.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS k64_appinit.c k64_bringup.c) -elseif(CONFIG_BOARD_LATE_INITIALIZE) - list(APPEND SRCS k64_bringup.c) -endif() - if(CONFIG_I2C) list(APPEND SRCS k64_i2c.c) endif() diff --git a/boards/arm/kinetis/freedom-k64f/src/Makefile b/boards/arm/kinetis/freedom-k64f/src/Makefile index 1bd41fda42bdb..b3ef284e740ae 100644 --- a/boards/arm/kinetis/freedom-k64f/src/Makefile +++ b/boards/arm/kinetis/freedom-k64f/src/Makefile @@ -22,7 +22,7 @@ include $(TOPDIR)/Make.defs -CSRCS = k64_boot.c k64_spi.c +CSRCS = k64_bringup.c k64_boot.c k64_spi.c ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += k64_autoleds.c @@ -34,12 +34,6 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += k64_buttons.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += k64_appinit.c k64_bringup.c -else ifeq ($(CONFIG_BOARD_LATE_INITIALIZE),y) -CSRCS += k64_bringup.c -endif - ifeq ($(CONFIG_I2C),y) CSRCS += k64_i2c.c endif diff --git a/boards/arm/kinetis/freedom-k64f/src/freedom-k64f.h b/boards/arm/kinetis/freedom-k64f/src/freedom-k64f.h index d6c57b9a3edfb..4f401446f9f4c 100644 --- a/boards/arm/kinetis/freedom-k64f/src/freedom-k64f.h +++ b/boards/arm/kinetis/freedom-k64f/src/freedom-k64f.h @@ -260,9 +260,7 @@ void weak_function k64_usbinitialize(void); * ****************************************************************************/ -#if defined(CONFIG_BOARDCTL) || defined(CONFIG_BOARD_LATE_INITIALIZE) int k64_bringup(void); -#endif /**************************************************************************** * Name: k64_sdhc_initialize diff --git a/boards/arm/kinetis/freedom-k64f/src/k64_appinit.c b/boards/arm/kinetis/freedom-k64f/src/k64_appinit.c deleted file mode 100644 index 664f27f1ebdc1..0000000000000 --- a/boards/arm/kinetis/freedom-k64f/src/k64_appinit.c +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** - * boards/arm/kinetis/freedom-k64f/src/k64_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 - -#include - -#include - -#include "freedom-k64f.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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 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) -{ -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board initialization */ - - return k64_bringup(); -#else - return OK; -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/arm/kinetis/freedom-k64f/src/k64_usbmsc.c b/boards/arm/kinetis/freedom-k64f/src/k64_usbmsc.c index 7c399532fc05c..9f660f328d85d 100644 --- a/boards/arm/kinetis/freedom-k64f/src/k64_usbmsc.c +++ b/boards/arm/kinetis/freedom-k64f/src/k64_usbmsc.c @@ -73,8 +73,7 @@ int board_usbmsc_initialize(int port) { /* If system/usbmsc is built as an NSH command, then SD slot should - * already have been initialized in board_app_initialize() - * (see k64_appinit.c). + * already have been initialized. * In this case, there is nothing further to be done here. */ diff --git a/boards/arm/kinetis/freedom-k66f/configs/netnsh/defconfig b/boards/arm/kinetis/freedom-k66f/configs/netnsh/defconfig index 0c4c4600e4de6..2a3322b286149 100644 --- a/boards/arm/kinetis/freedom-k66f/configs/netnsh/defconfig +++ b/boards/arm/kinetis/freedom-k66f/configs/netnsh/defconfig @@ -51,7 +51,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/kinetis/freedom-k66f/configs/nsh/defconfig b/boards/arm/kinetis/freedom-k66f/configs/nsh/defconfig index b2d763c59160a..3f78687990be2 100644 --- a/boards/arm/kinetis/freedom-k66f/configs/nsh/defconfig +++ b/boards/arm/kinetis/freedom-k66f/configs/nsh/defconfig @@ -64,7 +64,6 @@ CONFIG_LINE_MAX=64 CONFIG_MMCSD=y CONFIG_MMCSD_MULTIBLOCK_LIMIT=1 CONFIG_MMCSD_SDIO=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/kinetis/freedom-k66f/src/CMakeLists.txt b/boards/arm/kinetis/freedom-k66f/src/CMakeLists.txt index 325329f673d61..2e4f0f7c03ae3 100644 --- a/boards/arm/kinetis/freedom-k66f/src/CMakeLists.txt +++ b/boards/arm/kinetis/freedom-k66f/src/CMakeLists.txt @@ -20,7 +20,7 @@ # # ############################################################################## -set(SRCS k66_boot.c k66_spi.c) +set(SRCS k66_boot.c k66_spi.c k66_bringup.c) if(CONFIG_ARCH_LEDS) list(APPEND SRCS k66_autoleds.c) @@ -32,13 +32,8 @@ if(CONFIG_ARCH_BUTTONS) list(APPEND SRCS k66_buttons.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS k66_appinit.c k66_bringup.c) - if(CONFIG_BOARDCTL_RESET) - list(APPEND SRCS k66_reset.c) - endif() -elseif(CONFIG_BOARD_LATE_INITIALIZE) - list(APPEND SRCS k66_bringup.c) +if(CONFIG_BOARDCTL_RESET) + list(APPEND SRCS k66_reset.c) endif() if(CONFIG_KINETIS_SDHC) diff --git a/boards/arm/kinetis/freedom-k66f/src/Makefile b/boards/arm/kinetis/freedom-k66f/src/Makefile index 12ec96c1b253a..192ff41df2868 100644 --- a/boards/arm/kinetis/freedom-k66f/src/Makefile +++ b/boards/arm/kinetis/freedom-k66f/src/Makefile @@ -22,7 +22,7 @@ include $(TOPDIR)/Make.defs -CSRCS = k66_boot.c k66_spi.c +CSRCS = k66_boot.c k66_spi.c k66_bringup.c ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += k66_autoleds.c @@ -34,14 +34,9 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += k66_buttons.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += k66_appinit.c k66_bringup.c ifeq ($(CONFIG_BOARDCTL_RESET),y) CSRCS += k66_reset.c endif -else ifeq ($(CONFIG_BOARD_LATE_INITIALIZE),y) -CSRCS += k66_bringup.c -endif ifeq ($(CONFIG_KINETIS_SDHC),y) CSRCS += k66_sdhc.c diff --git a/boards/arm/kinetis/freedom-k66f/src/k66_appinit.c b/boards/arm/kinetis/freedom-k66f/src/k66_appinit.c deleted file mode 100644 index 1d69ed8407213..0000000000000 --- a/boards/arm/kinetis/freedom-k66f/src/k66_appinit.c +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** - * boards/arm/kinetis/freedom-k66f/src/k66_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 - -#include - -#include - -#include "freedom-k66f.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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 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) -{ -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board initialization */ - - return k66_bringup(); -#else - return OK; -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/arm/kinetis/freedom-k66f/src/k66_usbmsc.c b/boards/arm/kinetis/freedom-k66f/src/k66_usbmsc.c index a21f1dce6162f..022cd6f2450aa 100644 --- a/boards/arm/kinetis/freedom-k66f/src/k66_usbmsc.c +++ b/boards/arm/kinetis/freedom-k66f/src/k66_usbmsc.c @@ -73,8 +73,7 @@ int board_usbmsc_initialize(int port) { /* If system/usbmsc is built as an NSH command, then SD slot should - * already have been initialized in board_app_initialize() - * (see k66_appinit.c). + * already have been initialized. * In this case, there is nothing further to be done here. */ diff --git a/boards/arm/kinetis/kwikstik-k40/configs/ostest/defconfig b/boards/arm/kinetis/kwikstik-k40/configs/ostest/defconfig index 78312779bf3d3..992df643f0124 100644 --- a/boards/arm/kinetis/kwikstik-k40/configs/ostest/defconfig +++ b/boards/arm/kinetis/kwikstik-k40/configs/ostest/defconfig @@ -20,6 +20,8 @@ CONFIG_DISABLE_ENVIRON=y CONFIG_DISABLE_MOUNTPOINT=y CONFIG_INIT_ENTRYPOINT="ostest_main" CONFIG_INTELHEX_BINARY=y +CONFIG_KINETIS_GPIOIRQ=y +CONFIG_KINETIS_PORTEINTS=y CONFIG_KINETIS_UART5=y CONFIG_PREALLOC_TIMERS=4 CONFIG_RAM_SIZE=65536 diff --git a/boards/arm/kinetis/kwikstik-k40/src/CMakeLists.txt b/boards/arm/kinetis/kwikstik-k40/src/CMakeLists.txt index f970c3160d931..bf80c4b0accb0 100644 --- a/boards/arm/kinetis/kwikstik-k40/src/CMakeLists.txt +++ b/boards/arm/kinetis/kwikstik-k40/src/CMakeLists.txt @@ -30,10 +30,6 @@ if(CONFIG_ARCH_BUTTONS) list(APPEND SRCS k40_buttons.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS k40_appinit.c) -endif() - if(CONFIG_USBDEV) list(APPEND SRCS k40_usbdev.c) endif() diff --git a/boards/arm/kinetis/kwikstik-k40/src/Makefile b/boards/arm/kinetis/kwikstik-k40/src/Makefile index 6111cebad245f..19270ed97aaab 100644 --- a/boards/arm/kinetis/kwikstik-k40/src/Makefile +++ b/boards/arm/kinetis/kwikstik-k40/src/Makefile @@ -32,10 +32,6 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += k40_buttons.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += k40_appinit.c -endif - ifeq ($(CONFIG_USBDEV),y) CSRCS += k40_usbdev.c endif diff --git a/boards/arm/kinetis/kwikstik-k40/src/k40_appinit.c b/boards/arm/kinetis/kwikstik-k40/src/k40_appinit.c deleted file mode 100644 index fde1e6c9b0040..0000000000000 --- a/boards/arm/kinetis/kwikstik-k40/src/k40_appinit.c +++ /dev/null @@ -1,253 +0,0 @@ -/**************************************************************************** - * boards/arm/kinetis/kwikstik-k40/src/k40_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 - -#include -#include -#include -#include - -#include - -#ifdef CONFIG_KINETIS_SDHC -# include -# include -#endif - -#include "kinetis.h" -#include "kwikstik-k40.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Configuration ************************************************************/ - -/* PORT and SLOT number probably depend on the board configuration */ - -#ifdef CONFIG_ARCH_BOARD_KWIKSTIK_K40 -# define NSH_HAVEUSBDEV 1 -# define NSH_HAVEMMCSD 1 -# if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != 0 -# error "Only one MMC/SD slot, slot 0" -# undef CONFIG_NSH_MMCSDSLOTNO -# endif -# ifndef CONFIG_NSH_MMCSDSLOTNO -# define CONFIG_NSH_MMCSDSLOTNO 0 -# endif -#else - /* Add configuration for new Kinetis boards here */ - -# error "Unrecognized Kinetis board" -# undef NSH_HAVEUSBDEV -# undef NSH_HAVEMMCSD -#endif - -/* Can't support USB features if USB is not enabled */ - -#ifndef CONFIG_USBDEV -# undef NSH_HAVEUSBDEV -#endif - -/* Can't support MMC/SD features if mountpoints are disabled or if SDHC - * support is not enabled. - */ - -#if defined(CONFIG_DISABLE_MOUNTPOINT) || !defined(CONFIG_KINETIS_SDHC) -# undef NSH_HAVEMMCSD -#endif - -#ifndef CONFIG_NSH_MMCSDMINOR -# define CONFIG_NSH_MMCSDMINOR 0 -#endif - -/* We expect to receive GPIO interrupts for card insertion events */ - -#ifndef CONFIG_KINETIS_GPIOIRQ -# error "CONFIG_KINETIS_GPIOIRQ required for card detect interrupt" -#endif - -#ifndef CONFIG_KINETIS_PORTEINTS -# error "CONFIG_KINETIS_PORTEINTS required for card detect interrupt" -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ - -/* This structure encapsulates the global variable used in this file and - * reduces the probability of name collisions. - */ - -#ifdef NSH_HAVEMMCSD -struct kinetis_nsh_s -{ - struct sdio_dev_s *sdhc; /* SDIO driver handle */ - bool inserted; /* True: card is inserted */ -}; -#endif - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -#ifdef NSH_HAVEMMCSD -static struct kinetis_nsh_s g_nsh; -#endif - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: kinetis_mediachange - ****************************************************************************/ - -#ifdef NSH_HAVEMMCSD -static void kinetis_mediachange(void) -{ - bool inserted; - - /* Get the current value of the card detect pin. This pin is pulled up on - * board. So low means that a card is present. - */ - - inserted = !kinetis_gpioread(GPIO_SD_CARDDETECT); - - /* Has the pin changed state? */ - - if (inserted != g_nsh.inserted) - { - /* Yes.. - * perform the appropriate action (this might need some debounce). - */ - - g_nsh.inserted = inserted; - sdhc_mediachange(g_nsh.sdhc, inserted); - } -} -#endif - -/**************************************************************************** - * Name: kinetis_cdinterrupt - ****************************************************************************/ - -#ifdef NSH_HAVEMMCSD -static int kinetis_cdinterrupt(int irq, void *context) -{ - /* All of the work is done by kinetis_mediachange() */ - - kinetis_mediachange(); - return OK; -} -#endif - -/**************************************************************************** - * 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 NSH_HAVEMMCSD - int ret; - - /* Configure GPIO pins. - * - * First CD power. The initial state will provide SD power. - */ - - kinetis_pinconfig(GPIO_SD_CARDON); /* Applies power to the card */ - - /* Attached the card detect interrupt (but don't enable it yet) */ - - kinetis_pinconfig(GPIO_SD_CARDDETECT); - kinetis_pinirqattach(GPIO_SD_CARDDETECT, kinetis_cdinterrupt, NULL); - - /* Mount the SDHC-based MMC/SD block driver */ - - /* First, get an instance of the SDHC interface */ - - syslog(LOG_INFO, "Initializing SDHC slot %d\n", - CONFIG_NSH_MMCSDSLOTNO); - - g_nsh.sdhc = sdhc_initialize(CONFIG_NSH_MMCSDSLOTNO); - if (!g_nsh.sdhc) - { - syslog(LOG_ERR, "ERROR: Failed to initialize SDHC slot %d\n", - CONFIG_NSH_MMCSDSLOTNO); - return -ENODEV; - } - - /* Now bind the SDHC interface to the MMC/SD driver */ - - syslog(LOG_INFO, "Bind SDHC to the MMC/SD driver, minor=%d\n", - CONFIG_NSH_MMCSDMINOR); - - ret = mmcsd_slotinitialize(CONFIG_NSH_MMCSDMINOR, g_nsh.sdhc); - if (ret != OK) - { - syslog(LOG_ERR, - "ERROR: Failed to bind SDHC to the MMC/SD driver: %d\n", - ret); - return ret; - } - - syslog(LOG_INFO, "Successfully bound SDHC to the MMC/SD driver\n"); - - /* Handle the initial card state */ - - kinetis_mediachange(); - - /* Enable CD interrupts to handle subsequent media changes */ - - kinetis_pinirqenable(GPIO_SD_CARDDETECT); -#endif - return OK; -} diff --git a/boards/arm/kinetis/kwikstik-k40/src/k40_boot.c b/boards/arm/kinetis/kwikstik-k40/src/k40_boot.c index d305aa0514932..39315c1bd8fac 100644 --- a/boards/arm/kinetis/kwikstik-k40/src/k40_boot.c +++ b/boards/arm/kinetis/kwikstik-k40/src/k40_boot.c @@ -28,20 +28,148 @@ #include +#include +#include +#include +#include + #include #include +#ifdef CONFIG_KINETIS_SDHC +# include +# include +#endif + #include "arm_internal.h" +#include "kinetis.h" #include "kwikstik-k40.h" /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ +/* Configuration ************************************************************/ + +/* PORT and SLOT number probably depend on the board configuration */ + +#ifdef CONFIG_ARCH_BOARD_KWIKSTIK_K40 +# define NSH_HAVEUSBDEV 1 +# define NSH_HAVEMMCSD 1 +# if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != 0 +# error "Only one MMC/SD slot, slot 0" +# undef CONFIG_NSH_MMCSDSLOTNO +# endif +# ifndef CONFIG_NSH_MMCSDSLOTNO +# define CONFIG_NSH_MMCSDSLOTNO 0 +# endif +#else + /* Add configuration for new Kinetis boards here */ + +# error "Unrecognized Kinetis board" +# undef NSH_HAVEUSBDEV +# undef NSH_HAVEMMCSD +#endif + +/* Can't support USB features if USB is not enabled */ + +#ifndef CONFIG_USBDEV +# undef NSH_HAVEUSBDEV +#endif + +/* Can't support MMC/SD features if mountpoints are disabled or if SDHC + * support is not enabled. + */ + +#if defined(CONFIG_DISABLE_MOUNTPOINT) || !defined(CONFIG_KINETIS_SDHC) +# undef NSH_HAVEMMCSD +#endif + +#ifndef CONFIG_NSH_MMCSDMINOR +# define CONFIG_NSH_MMCSDMINOR 0 +#endif + +/* We expect to receive GPIO interrupts for card insertion events */ + +#ifndef CONFIG_KINETIS_GPIOIRQ +# error "CONFIG_KINETIS_GPIOIRQ required for card detect interrupt" +#endif + +#ifndef CONFIG_KINETIS_PORTEINTS +# error "CONFIG_KINETIS_PORTEINTS required for card detect interrupt" +#endif + +/**************************************************************************** + * Private Types + ****************************************************************************/ + +/* This structure encapsulates the global variable used in this file and + * reduces the probability of name collisions. + */ + +#ifdef NSH_HAVEMMCSD +struct kinetis_nsh_s +{ + struct sdio_dev_s *sdhc; /* SDIO driver handle */ + bool inserted; /* True: card is inserted */ +}; +#endif + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +#ifdef NSH_HAVEMMCSD +static struct kinetis_nsh_s g_nsh; +#endif + /**************************************************************************** * Private Functions ****************************************************************************/ +/**************************************************************************** + * Name: kinetis_mediachange + ****************************************************************************/ + +#ifdef NSH_HAVEMMCSD +static void kinetis_mediachange(void) +{ + bool inserted; + + /* Get the current value of the card detect pin. This pin is pulled up on + * board. So low means that a card is present. + */ + + inserted = !kinetis_gpioread(GPIO_SD_CARDDETECT); + + /* Has the pin changed state? */ + + if (inserted != g_nsh.inserted) + { + /* Yes.. + * perform the appropriate action (this might need some debounce). + */ + + g_nsh.inserted = inserted; + sdhc_mediachange(g_nsh.sdhc, inserted); + } +} +#endif + +/**************************************************************************** + * Name: kinetis_cdinterrupt + ****************************************************************************/ + +#ifdef NSH_HAVEMMCSD +static int kinetis_cdinterrupt(int irq, void *context) +{ + /* All of the work is done by kinetis_mediachange() */ + + kinetis_mediachange(); + return OK; +} +#endif + /**************************************************************************** * Public Functions ****************************************************************************/ @@ -88,3 +216,76 @@ void kinetis_boardinitialize(void) board_autoled_initialize(); #endif } + +/**************************************************************************** + * 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ +#ifdef NSH_HAVEMMCSD + int ret; + + /* Configure GPIO pins. + * + * First CD power. The initial state will provide SD power. + */ + + kinetis_pinconfig(GPIO_SD_CARDON); /* Applies power to the card */ + + /* Attached the card detect interrupt (but don't enable it yet) */ + + kinetis_pinconfig(GPIO_SD_CARDDETECT); + kinetis_pinirqattach(GPIO_SD_CARDDETECT, kinetis_cdinterrupt, NULL); + + /* Mount the SDHC-based MMC/SD block driver */ + + /* First, get an instance of the SDHC interface */ + + syslog(LOG_INFO, "Initializing SDHC slot %d\n", + CONFIG_NSH_MMCSDSLOTNO); + + g_nsh.sdhc = sdhc_initialize(CONFIG_NSH_MMCSDSLOTNO); + if (!g_nsh.sdhc) + { + syslog(LOG_ERR, "ERROR: Failed to initialize SDHC slot %d\n", + CONFIG_NSH_MMCSDSLOTNO); + return; + } + + /* Now bind the SDHC interface to the MMC/SD driver */ + + syslog(LOG_INFO, "Bind SDHC to the MMC/SD driver, minor=%d\n", + CONFIG_NSH_MMCSDMINOR); + + ret = mmcsd_slotinitialize(CONFIG_NSH_MMCSDMINOR, g_nsh.sdhc); + if (ret != OK) + { + syslog(LOG_ERR, + "ERROR: Failed to bind SDHC to the MMC/SD driver: %d\n", + ret); + return; + } + + syslog(LOG_INFO, "Successfully bound SDHC to the MMC/SD driver\n"); + + /* Handle the initial card state */ + + kinetis_mediachange(); + + /* Enable CD interrupts to handle subsequent media changes */ + + kinetis_pinirqenable(GPIO_SD_CARDDETECT); +#endif +} +#endif diff --git a/boards/arm/kinetis/kwikstik-k40/src/k40_usbmsc.c b/boards/arm/kinetis/kwikstik-k40/src/k40_usbmsc.c index 4be33dc3b1db0..783b1bbda3d75 100644 --- a/boards/arm/kinetis/kwikstik-k40/src/k40_usbmsc.c +++ b/boards/arm/kinetis/kwikstik-k40/src/k40_usbmsc.c @@ -72,8 +72,7 @@ int board_usbmsc_initialize(int port) { /* If system/usbmsc is built as an NSH command, then SD slot should - * already have been initialized in board_app_initialize() - * (see k40_appinit.c). + * already have been initialized. * In this case, there is nothing further to be done here. */ diff --git a/boards/arm/kinetis/teensy-3.x/configs/usbnsh/defconfig b/boards/arm/kinetis/teensy-3.x/configs/usbnsh/defconfig index b2b5e76c48f21..74c3f8214fa7c 100644 --- a/boards/arm/kinetis/teensy-3.x/configs/usbnsh/defconfig +++ b/boards/arm/kinetis/teensy-3.x/configs/usbnsh/defconfig @@ -28,7 +28,6 @@ CONFIG_KINETIS_UARTFIFOS=y CONFIG_KINETIS_UART_BREAKS=y CONFIG_KINETIS_USBOTG=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/kinetis/teensy-3.x/src/CMakeLists.txt b/boards/arm/kinetis/teensy-3.x/src/CMakeLists.txt index d362c5d70912a..125acc1514f41 100644 --- a/boards/arm/kinetis/teensy-3.x/src/CMakeLists.txt +++ b/boards/arm/kinetis/teensy-3.x/src/CMakeLists.txt @@ -31,10 +31,6 @@ if(CONFIG_KINETIS_USBOTG) list(APPEND SRCS k20_usbdev.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS k20_appinit.c) -endif() - if(CONFIG_PWM) list(APPEND SRCS k20_pwm.c) endif() diff --git a/boards/arm/kinetis/teensy-3.x/src/Makefile b/boards/arm/kinetis/teensy-3.x/src/Makefile index e255c86ca0a00..8d2e24fb1dc76 100644 --- a/boards/arm/kinetis/teensy-3.x/src/Makefile +++ b/boards/arm/kinetis/teensy-3.x/src/Makefile @@ -33,10 +33,6 @@ ifeq ($(CONFIG_KINETIS_USBOTG),y) CSRCS += k20_usbdev.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += k20_appinit.c -endif - ifeq ($(CONFIG_PWM),y) CSRCS += k20_pwm.c endif diff --git a/boards/arm/kinetis/teensy-3.x/src/k20_appinit.c b/boards/arm/kinetis/teensy-3.x/src/k20_appinit.c deleted file mode 100644 index 03a15c79e6384..0000000000000 --- a/boards/arm/kinetis/teensy-3.x/src/k20_appinit.c +++ /dev/null @@ -1,82 +0,0 @@ -/**************************************************************************** - * boards/arm/kinetis/teensy-3.x/src/k20_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 - -#include -#include - -#include - -#include "kinetis_usbotg.h" -#include "teensy-3x.h" - -/**************************************************************************** - * 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 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) -{ - int ret; - -#ifdef CONFIG_PWM - /* Initialize PWM and register the PWM device. */ - - ret = kinetis_pwm_setup(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: kinetis_pwm_setup() failed: %d\n", ret); - } -#endif - - UNUSED(ret); - return OK; -} diff --git a/boards/arm/kinetis/teensy-3.x/src/k20_boot.c b/boards/arm/kinetis/teensy-3.x/src/k20_boot.c index aeb0592f1f528..e29df37400b16 100644 --- a/boards/arm/kinetis/teensy-3.x/src/k20_boot.c +++ b/boards/arm/kinetis/teensy-3.x/src/k20_boot.c @@ -28,9 +28,14 @@ #include +#include +#include +#include + #include #include +#include "kinetis_usbotg.h" #include "arm_internal.h" #include "teensy-3x.h" @@ -69,11 +74,39 @@ void kinetis_boardinitialize(void) #endif } -#if defined(CONFIG_BOARD_LATE_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_intitialize() 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { + int ret; + #if defined(CONFIG_KINETIS_I2C0) || defined(CONFIG_KINETIS_I2C1) kinetis_i2cdev_initialize(); #endif -} + +#ifdef CONFIG_PWM + /* Initialize PWM and register the PWM device. */ + + ret = kinetis_pwm_setup(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: kinetis_pwm_setup() failed: %d\n", ret); + } #endif + + UNUSED(ret); +} +#endif /* CONFIG_BOARD_LATE_INITIALIZE */ diff --git a/boards/arm/kinetis/twr-k60n512/src/CMakeLists.txt b/boards/arm/kinetis/twr-k60n512/src/CMakeLists.txt index 262855afc8ac8..5d608a1c3bc26 100644 --- a/boards/arm/kinetis/twr-k60n512/src/CMakeLists.txt +++ b/boards/arm/kinetis/twr-k60n512/src/CMakeLists.txt @@ -30,10 +30,6 @@ if(CONFIG_ARCH_BUTTONS) list(APPEND SRCS k60_buttons.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS k60_appinit.c) -endif() - if(CONFIG_USBDEV) list(APPEND SRCS k60_usbdev.c) endif() diff --git a/boards/arm/kinetis/twr-k60n512/src/Makefile b/boards/arm/kinetis/twr-k60n512/src/Makefile index f41ef1a939f38..4e0b7170ee5e5 100644 --- a/boards/arm/kinetis/twr-k60n512/src/Makefile +++ b/boards/arm/kinetis/twr-k60n512/src/Makefile @@ -32,10 +32,6 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += k60_buttons.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += k60_appinit.c -endif - ifeq ($(CONFIG_USBDEV),y) CSRCS += k60_usbdev.c endif diff --git a/boards/arm/kinetis/twr-k60n512/src/k60_appinit.c b/boards/arm/kinetis/twr-k60n512/src/k60_appinit.c deleted file mode 100644 index eaab1f213dc0d..0000000000000 --- a/boards/arm/kinetis/twr-k60n512/src/k60_appinit.c +++ /dev/null @@ -1,266 +0,0 @@ -/**************************************************************************** - * boards/arm/kinetis/twr-k60n512/src/k60_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 - -#include -#include -#include -#include - -#include - -#ifdef CONFIG_KINETIS_SDHC -# include -# include -#endif - -#include "kinetis.h" -#include "twr-k60n512.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Configuration ************************************************************/ - -/* PORT and SLOT number probably depend on the board configuration */ - -#ifdef CONFIG_ARCH_BOARD_TWR_K60N512 -# define NSH_HAVEUSBDEV 1 -# define NSH_HAVEMMCSD 1 -# if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != 0 -# error "Only one MMC/SD slot, slot 0" -# undef CONFIG_NSH_MMCSDSLOTNO -# endif -# ifndef CONFIG_NSH_MMCSDSLOTNO -# define CONFIG_NSH_MMCSDSLOTNO 0 -# endif -#else - /* Add configuration for new Kinetis boards here */ - -# error "Unrecognized Kinetis board" -# undef NSH_HAVEUSBDEV -# undef NSH_HAVEMMCSD -#endif - -/* Can't support USB features if USB is not enabled */ - -#ifndef CONFIG_USBDEV -# undef NSH_HAVEUSBDEV -#endif - -/* Can't support MMC/SD features if mountpoints are disabled or if SDHC - * support is not enabled. - */ - -#if defined(CONFIG_DISABLE_MOUNTPOINT) || !defined(CONFIG_KINETIS_SDHC) -# undef NSH_HAVEMMCSD -#endif - -#ifndef CONFIG_NSH_MMCSDMINOR -# define CONFIG_NSH_MMCSDMINOR 0 -#endif - -/* We expect to receive GPIO interrupts for card insertion events */ - -#ifdef NSH_HAVEMMCSD -# ifndef CONFIG_KINETIS_GPIOIRQ -# error "CONFIG_KINETIS_GPIOIRQ required for card detect interrupt" -# endif - -# ifndef CONFIG_KINETIS_PORTEINTS -# error "CONFIG_KINETIS_PORTEINTS required for card detect interrupt" -# endif -#endif - -/**************************************************************************** - * Private Types - ****************************************************************************/ - -/* This structure encapsulates the global variable used in this file and - * reduces the probability of name collisions. - */ - -#ifdef NSH_HAVEMMCSD -struct kinetis_nsh_s -{ - struct sdio_dev_s *sdhc; /* SDIO driver handle */ - bool inserted; /* True: card is inserted */ -}; -#endif - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -#ifdef NSH_HAVEMMCSD -static struct kinetis_nsh_s g_nsh; -#endif - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: kinetis_mediachange - ****************************************************************************/ - -#ifdef NSH_HAVEMMCSD -static void kinetis_mediachange(void) -{ - bool inserted; - - /* Get the current value of the card detect pin. This pin is pulled up on - * board. So low means that a card is present. - */ - - inserted = !kinetis_gpioread(GPIO_SD_CARDDETECT); - - /* Has the pin changed state? */ - - if (inserted != g_nsh.inserted) - { - /* Yes.. - * perform the appropriate action (this might need some debounce). - */ - - g_nsh.inserted = inserted; - sdhc_mediachange(g_nsh.sdhc, inserted); - - /* If the card has been inserted, then check if it is write protected - * as well. The pin is pulled up, but apparently logic high means - * write protected. - */ - - if (inserted) - { - sdhc_wrprotect(g_nsh.sdhc, kinetis_gpioread(GPIO_SD_WRPROTECT)); - } - } -} -#endif - -/**************************************************************************** - * Name: kinetis_cdinterrupt - ****************************************************************************/ - -#ifdef NSH_HAVEMMCSD -static int kinetis_cdinterrupt(int irq, void *context) -{ - /* All of the work is done by kinetis_mediachange() */ - - kinetis_mediachange(); - return OK; -} -#endif - -/**************************************************************************** - * 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 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 NSH_HAVEMMCSD - int ret; - - /* Configure GPIO pins */ - - /* Attached the card detect interrupt (but don't enable it yet) */ - - kinetis_pinconfig(GPIO_SD_CARDDETECT); - kinetis_pinirqattach(GPIO_SD_CARDDETECT, kinetis_cdinterrupt, NULL); - - /* Configure the write protect GPIO */ - - kinetis_pinconfig(GPIO_SD_WRPROTECT); - - /* Mount the SDHC-based MMC/SD block driver */ - - /* First, get an instance of the SDHC interface */ - - syslog(LOG_INFO, "Initializing SDHC slot %d\n", - CONFIG_NSH_MMCSDSLOTNO); - - g_nsh.sdhc = sdhc_initialize(CONFIG_NSH_MMCSDSLOTNO); - if (!g_nsh.sdhc) - { - syslog(LOG_ERR, "ERROR: Failed to initialize SDHC slot %d\n", - CONFIG_NSH_MMCSDSLOTNO); - return -ENODEV; - } - - /* Now bind the SDHC interface to the MMC/SD driver */ - - syslog(LOG_INFO, "Bind SDHC to the MMC/SD driver, minor=%d\n", - CONFIG_NSH_MMCSDMINOR); - - ret = mmcsd_slotinitialize(CONFIG_NSH_MMCSDMINOR, g_nsh.sdhc); - if (ret != OK) - { - syslog(LOG_ERR, - "ERROR: Failed to bind SDHC to the MMC/SD driver: %d\n", - ret); - return ret; - } - - syslog(LOG_INFO, "Successfully bound SDHC to the MMC/SD driver\n"); - - /* Handle the initial card state */ - - kinetis_mediachange(); - - /* Enable CD interrupts to handle subsequent media changes */ - - kinetis_pinirqenable(GPIO_SD_CARDDETECT); -#endif - return OK; -} diff --git a/boards/arm/kinetis/twr-k60n512/src/k60_boot.c b/boards/arm/kinetis/twr-k60n512/src/k60_boot.c index af711cb756810..b9195d42cb360 100644 --- a/boards/arm/kinetis/twr-k60n512/src/k60_boot.c +++ b/boards/arm/kinetis/twr-k60n512/src/k60_boot.c @@ -28,20 +28,160 @@ #include +#include +#include +#include +#include + #include #include +#ifdef CONFIG_KINETIS_SDHC +# include +# include +#endif + #include "arm_internal.h" +#include "kinetis.h" #include "twr-k60n512.h" /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ +/* Configuration ************************************************************/ + +/* PORT and SLOT number probably depend on the board configuration */ + +#ifdef CONFIG_ARCH_BOARD_TWR_K60N512 +# define NSH_HAVEUSBDEV 1 +# define NSH_HAVEMMCSD 1 +# if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != 0 +# error "Only one MMC/SD slot, slot 0" +# undef CONFIG_NSH_MMCSDSLOTNO +# endif +# ifndef CONFIG_NSH_MMCSDSLOTNO +# define CONFIG_NSH_MMCSDSLOTNO 0 +# endif +#else + /* Add configuration for new Kinetis boards here */ + +# error "Unrecognized Kinetis board" +# undef NSH_HAVEUSBDEV +# undef NSH_HAVEMMCSD +#endif + +/* Can't support USB features if USB is not enabled */ + +#ifndef CONFIG_USBDEV +# undef NSH_HAVEUSBDEV +#endif + +/* Can't support MMC/SD features if mountpoints are disabled or if SDHC + * support is not enabled. + */ + +#if defined(CONFIG_DISABLE_MOUNTPOINT) || !defined(CONFIG_KINETIS_SDHC) +# undef NSH_HAVEMMCSD +#endif + +#ifndef CONFIG_NSH_MMCSDMINOR +# define CONFIG_NSH_MMCSDMINOR 0 +#endif + +/* We expect to receive GPIO interrupts for card insertion events */ + +#ifdef NSH_HAVEMMCSD +# ifndef CONFIG_KINETIS_GPIOIRQ +# error "CONFIG_KINETIS_GPIOIRQ required for card detect interrupt" +# endif + +# ifndef CONFIG_KINETIS_PORTEINTS +# error "CONFIG_KINETIS_PORTEINTS required for card detect interrupt" +# endif +#endif + +/**************************************************************************** + * Private Types + ****************************************************************************/ + +/* This structure encapsulates the global variable used in this file and + * reduces the probability of name collisions. + */ + +#ifdef NSH_HAVEMMCSD +struct kinetis_nsh_s +{ + struct sdio_dev_s *sdhc; /* SDIO driver handle */ + bool inserted; /* True: card is inserted */ +}; +#endif + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +#ifdef NSH_HAVEMMCSD +static struct kinetis_nsh_s g_nsh; +#endif + /**************************************************************************** * Private Functions ****************************************************************************/ +/**************************************************************************** + * Name: kinetis_mediachange + ****************************************************************************/ + +#ifdef NSH_HAVEMMCSD +static void kinetis_mediachange(void) +{ + bool inserted; + + /* Get the current value of the card detect pin. This pin is pulled up on + * board. So low means that a card is present. + */ + + inserted = !kinetis_gpioread(GPIO_SD_CARDDETECT); + + /* Has the pin changed state? */ + + if (inserted != g_nsh.inserted) + { + /* Yes.. + * perform the appropriate action (this might need some debounce). + */ + + g_nsh.inserted = inserted; + sdhc_mediachange(g_nsh.sdhc, inserted); + + /* If the card has been inserted, then check if it is write protected + * as well. The pin is pulled up, but apparently logic high means + * write protected. + */ + + if (inserted) + { + sdhc_wrprotect(g_nsh.sdhc, kinetis_gpioread(GPIO_SD_WRPROTECT)); + } + } +} +#endif + +/**************************************************************************** + * Name: kinetis_cdinterrupt + ****************************************************************************/ + +#ifdef NSH_HAVEMMCSD +static int kinetis_cdinterrupt(int irq, void *context) +{ + /* All of the work is done by kinetis_mediachange() */ + + kinetis_mediachange(); + return OK; +} +#endif + /**************************************************************************** * Public Functions ****************************************************************************/ @@ -88,3 +228,76 @@ void kinetis_boardinitialize(void) board_autoled_initialize(); #endif } + +/**************************************************************************** + * 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_intitialize() 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ +#ifdef NSH_HAVEMMCSD + int ret; + + /* Configure GPIO pins */ + + /* Attached the card detect interrupt (but don't enable it yet) */ + + kinetis_pinconfig(GPIO_SD_CARDDETECT); + kinetis_pinirqattach(GPIO_SD_CARDDETECT, kinetis_cdinterrupt, NULL); + + /* Configure the write protect GPIO */ + + kinetis_pinconfig(GPIO_SD_WRPROTECT); + + /* Mount the SDHC-based MMC/SD block driver */ + + /* First, get an instance of the SDHC interface */ + + syslog(LOG_INFO, "Initializing SDHC slot %d\n", + CONFIG_NSH_MMCSDSLOTNO); + + g_nsh.sdhc = sdhc_initialize(CONFIG_NSH_MMCSDSLOTNO); + if (!g_nsh.sdhc) + { + syslog(LOG_ERR, "ERROR: Failed to initialize SDHC slot %d\n", + CONFIG_NSH_MMCSDSLOTNO); + return; + } + + /* Now bind the SDHC interface to the MMC/SD driver */ + + syslog(LOG_INFO, "Bind SDHC to the MMC/SD driver, minor=%d\n", + CONFIG_NSH_MMCSDMINOR); + + ret = mmcsd_slotinitialize(CONFIG_NSH_MMCSDMINOR, g_nsh.sdhc); + if (ret != OK) + { + syslog(LOG_ERR, + "ERROR: Failed to bind SDHC to the MMC/SD driver: %d\n", + ret); + return; + } + + syslog(LOG_INFO, "Successfully bound SDHC to the MMC/SD driver\n"); + + /* Handle the initial card state */ + + kinetis_mediachange(); + + /* Enable CD interrupts to handle subsequent media changes */ + + kinetis_pinirqenable(GPIO_SD_CARDDETECT); +#endif +} +#endif /* CONFIG_BOARD_LATE_INITIALIZE */ diff --git a/boards/arm/kinetis/twr-k60n512/src/k60_usbmsc.c b/boards/arm/kinetis/twr-k60n512/src/k60_usbmsc.c index dc1fa7e7d8f1e..709ea9f124508 100644 --- a/boards/arm/kinetis/twr-k60n512/src/k60_usbmsc.c +++ b/boards/arm/kinetis/twr-k60n512/src/k60_usbmsc.c @@ -73,8 +73,7 @@ int board_usbmsc_initialize(int port) { /* If system/usbmsc is built as an NSH command, then SD slot should - * already have been initialized in board_app_initialize() - * (see k60_appinit.c). + * already have been initialized. * In this case, there is nothing further to be done here. */ diff --git a/boards/arm/kinetis/twr-k64f120m/configs/netnsh/defconfig b/boards/arm/kinetis/twr-k64f120m/configs/netnsh/defconfig index 25aa923d59333..ad02afb16deb3 100644 --- a/boards/arm/kinetis/twr-k64f120m/configs/netnsh/defconfig +++ b/boards/arm/kinetis/twr-k64f120m/configs/netnsh/defconfig @@ -40,7 +40,6 @@ CONFIG_NET_ICMP_SOCKET=y CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/kinetis/twr-k64f120m/configs/nsh/defconfig b/boards/arm/kinetis/twr-k64f120m/configs/nsh/defconfig index 48e8d6f8dd1b6..2ea47dbcd75a8 100644 --- a/boards/arm/kinetis/twr-k64f120m/configs/nsh/defconfig +++ b/boards/arm/kinetis/twr-k64f120m/configs/nsh/defconfig @@ -28,7 +28,6 @@ CONFIG_KINETIS_UART1=y CONFIG_LINE_MAX=64 CONFIG_MMCSD=y CONFIG_MMCSD_SDIO=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/kinetis/twr-k64f120m/src/CMakeLists.txt b/boards/arm/kinetis/twr-k64f120m/src/CMakeLists.txt index 06cdd7759f194..dfcf968053c0a 100644 --- a/boards/arm/kinetis/twr-k64f120m/src/CMakeLists.txt +++ b/boards/arm/kinetis/twr-k64f120m/src/CMakeLists.txt @@ -26,10 +26,6 @@ if(CONFIG_ARCH_LEDS) list(APPEND SRCS k64_leds.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS k64_appinit.c) -endif() - if(CONFIG_KINETIS_SDHC) list(APPEND SRCS k64_sdhc.c) if(CONFIG_FS_AUTOMOUNTER) diff --git a/boards/arm/kinetis/twr-k64f120m/src/Makefile b/boards/arm/kinetis/twr-k64f120m/src/Makefile index 3c721ecc1d394..f241be632ba18 100644 --- a/boards/arm/kinetis/twr-k64f120m/src/Makefile +++ b/boards/arm/kinetis/twr-k64f120m/src/Makefile @@ -33,10 +33,6 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y) #CSRCS += k64_buttons.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += k64_appinit.c -endif - ifeq ($(CONFIG_KINETIS_SDHC),y) CSRCS += k64_sdhc.c ifeq ($(CONFIG_FS_AUTOMOUNTER),y) diff --git a/boards/arm/kinetis/twr-k64f120m/src/k64_appinit.c b/boards/arm/kinetis/twr-k64f120m/src/k64_appinit.c deleted file mode 100644 index 3077c904d106c..0000000000000 --- a/boards/arm/kinetis/twr-k64f120m/src/k64_appinit.c +++ /dev/null @@ -1,98 +0,0 @@ -/**************************************************************************** - * boards/arm/kinetis/twr-k64f120m/src/k64_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 - -#include -#include -#include -#include - -#include -#include - -#ifdef CONFIG_KINETIS_SDHC -# include -# include -#endif - -#include "kinetis.h" -#include "twrk64.h" - -/**************************************************************************** - * 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 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) -{ - int ret; - -#ifdef HAVE_PROC - /* Mount the proc filesystem */ - - syslog(LOG_INFO, "Mounting procfs to /proc\n"); - - ret = nx_mount(NULL, PROCFS_MOUNTPOUNT, "procfs", 0, NULL); - if (ret < 0) - { - syslog(LOG_ERR, - "ERROR: Failed to mount the PROC filesystem: %d\n", ret); - return ret; - } -#endif - -#ifdef HAVE_MMCSD - /* Initialize the MMC/SD driver and possible automount */ - - return k64_sdhc_initialize(); -#endif - return OK; -} diff --git a/boards/arm/kinetis/twr-k64f120m/src/k64_boot.c b/boards/arm/kinetis/twr-k64f120m/src/k64_boot.c index 76b2112ec8e19..366dff5ef6e49 100644 --- a/boards/arm/kinetis/twr-k64f120m/src/k64_boot.c +++ b/boards/arm/kinetis/twr-k64f120m/src/k64_boot.c @@ -28,9 +28,20 @@ #include +#include +#include +#include +#include + #include #include +#ifdef CONFIG_KINETIS_SDHC +# include +# include +#endif + +#include "kinetis.h" #include "arm_internal.h" #include "twrk64.h" @@ -88,3 +99,44 @@ void kinetis_boardinitialize(void) board_autoled_initialize(); #endif } + +/**************************************************************************** + * 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_intitialize() 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ + int ret; + +#ifdef HAVE_PROC + /* Mount the proc filesystem */ + + syslog(LOG_INFO, "Mounting procfs to /proc\n"); + + ret = nx_mount(NULL, PROCFS_MOUNTPOUNT, "procfs", 0, NULL); + if (ret < 0) + { + syslog(LOG_ERR, + "ERROR: Failed to mount the PROC filesystem: %d\n", ret); + return; + } +#endif + +#ifdef HAVE_MMCSD + /* Initialize the MMC/SD driver and possible automount */ + + k64_sdhc_initialize(); +#endif +} +#endif /* CONFIG_BOARD_LATE_INITIALIZE */ diff --git a/boards/arm/kl/freedom-kl25z/src/CMakeLists.txt b/boards/arm/kl/freedom-kl25z/src/CMakeLists.txt index 19e6395ae9832..ae654689399b1 100644 --- a/boards/arm/kl/freedom-kl25z/src/CMakeLists.txt +++ b/boards/arm/kl/freedom-kl25z/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS kl_boardinitialize.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS kl_appinit.c) -endif() - if(CONFIG_KL_TSI) list(APPEND SRCS kl_tsi.c) endif() diff --git a/boards/arm/kl/freedom-kl25z/src/Makefile b/boards/arm/kl/freedom-kl25z/src/Makefile index b09f8213fe2a0..8a0e18b9d5d01 100644 --- a/boards/arm/kl/freedom-kl25z/src/Makefile +++ b/boards/arm/kl/freedom-kl25z/src/Makefile @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = kl_boardinitialize.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += kl_appinit.c -endif - ifeq ($(CONFIG_KL_TSI),y) CSRCS += kl_tsi.c endif diff --git a/boards/arm/kl/freedom-kl25z/src/kl_appinit.c b/boards/arm/kl/freedom-kl25z/src/kl_appinit.c deleted file mode 100644 index f4ff6b178652d..0000000000000 --- a/boards/arm/kl/freedom-kl25z/src/kl_appinit.c +++ /dev/null @@ -1,92 +0,0 @@ -/**************************************************************************** - * boards/arm/kl/freedom-kl25z/src/kl_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 - -#include -#include -#include - -#include - -#include "freedom-kl25z.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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) -{ - int ret; - - #if defined(CONFIG_SENSORS_ADXL345) - ret = adxl345_archinitialize(0); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: adxl345_archinitialize failed: %d\n", ret); - } -#endif - -#ifdef CONFIG_PWM - /* Initialize PWM and register the PWM device. */ - - ret = kl_pwm_setup(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: k64_pwm_setup() failed: %d\n", ret); - } -#endif - - UNUSED(ret); - return OK; -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/arm/kl/freedom-kl25z/src/kl_boardinitialize.c b/boards/arm/kl/freedom-kl25z/src/kl_boardinitialize.c index 089b199779f55..e14bfeb4ef88b 100644 --- a/boards/arm/kl/freedom-kl25z/src/kl_boardinitialize.c +++ b/boards/arm/kl/freedom-kl25z/src/kl_boardinitialize.c @@ -28,6 +28,10 @@ #include +#include +#include +#include + #include #include @@ -106,13 +110,26 @@ void kl_boardinitialize(void) #ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { - /* Perform NSH initialization here instead of from the NSH. This - * alternative NSH initialization is necessary when NSH is ran in - * user-space but the initialization function must run in kernel space. - */ + int ret; + + #if defined(CONFIG_SENSORS_ADXL345) + ret = adxl345_archinitialize(0); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: adxl345_archinitialize failed: %d\n", ret); + } +#endif + +#ifdef CONFIG_PWM + /* Initialize PWM and register the PWM device. */ -#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_BOARDCTL) - board_app_initialize(0); + ret = kl_pwm_setup(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: k64_pwm_setup() failed: %d\n", ret); + } #endif + + UNUSED(ret); } #endif diff --git a/boards/arm/kl/freedom-kl26z/src/CMakeLists.txt b/boards/arm/kl/freedom-kl26z/src/CMakeLists.txt index 86ab715d90c8c..d9e556a763781 100644 --- a/boards/arm/kl/freedom-kl26z/src/CMakeLists.txt +++ b/boards/arm/kl/freedom-kl26z/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS kl_boardinitialize.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS kl_appinit.c) -endif() - if(CONFIG_KL_TSI) list(APPEND SRCS kl_tsi.c) endif() diff --git a/boards/arm/kl/freedom-kl26z/src/Makefile b/boards/arm/kl/freedom-kl26z/src/Makefile index c09674f31535b..d5e68e860c9ca 100644 --- a/boards/arm/kl/freedom-kl26z/src/Makefile +++ b/boards/arm/kl/freedom-kl26z/src/Makefile @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = kl_boardinitialize.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += kl_appinit.c -endif - ifeq ($(CONFIG_KL_TSI),y) CSRCS += kl_tsi.c endif diff --git a/boards/arm/kl/freedom-kl26z/src/kl_appinit.c b/boards/arm/kl/freedom-kl26z/src/kl_appinit.c deleted file mode 100644 index d4bf50931e6bb..0000000000000 --- a/boards/arm/kl/freedom-kl26z/src/kl_appinit.c +++ /dev/null @@ -1,83 +0,0 @@ -/**************************************************************************** - * boards/arm/kl/freedom-kl26z/src/kl_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 - -#include -#include - -#include - -#include "freedom-kl26z.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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) -{ - int ret; - -#ifdef CONFIG_PWM - /* Initialize PWM and register the PWM device. */ - - ret = kl_pwm_setup(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: kl_pwm_setup() failed: %d\n", ret); - } -#endif - - UNUSED(ret); - return OK; -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/arm/kl/freedom-kl26z/src/kl_boardinitialize.c b/boards/arm/kl/freedom-kl26z/src/kl_boardinitialize.c index 8656ec5f2a8d1..0e8272de479c1 100644 --- a/boards/arm/kl/freedom-kl26z/src/kl_boardinitialize.c +++ b/boards/arm/kl/freedom-kl26z/src/kl_boardinitialize.c @@ -99,13 +99,18 @@ void kl_boardinitialize(void) #ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { - /* Perform NSH initialization here instead of from the NSH. This - * alternative NSH initialization is necessary when NSH is ran in - * user-space but the initialization function must run in kernel space. - */ + int ret; + +#ifdef CONFIG_PWM + /* Initialize PWM and register the PWM device. */ -#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_BOARDCTL) - board_app_initialize(0); + ret = kl_pwm_setup(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: kl_pwm_setup() failed: %d\n", ret); + } #endif + + UNUSED(ret); } #endif diff --git a/boards/arm/kl/teensy-lc/src/CMakeLists.txt b/boards/arm/kl/teensy-lc/src/CMakeLists.txt index bb8e9f955f6c6..420d4977d230c 100644 --- a/boards/arm/kl/teensy-lc/src/CMakeLists.txt +++ b/boards/arm/kl/teensy-lc/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS kl_boardinitialize.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS kl_appinit.c) -endif() - if(CONFIG_KL_SPI0) list(APPEND SRCS kl_spi.c) else() diff --git a/boards/arm/kl/teensy-lc/src/Makefile b/boards/arm/kl/teensy-lc/src/Makefile index 3bb7a3cf82f38..7d6db5066a8b8 100644 --- a/boards/arm/kl/teensy-lc/src/Makefile +++ b/boards/arm/kl/teensy-lc/src/Makefile @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = kl_boardinitialize.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += kl_appinit.c -endif - ifeq ($(CONFIG_KL_SPI0),y) CSRCS += kl_spi.c else diff --git a/boards/arm/kl/teensy-lc/src/kl_appinit.c b/boards/arm/kl/teensy-lc/src/kl_appinit.c deleted file mode 100644 index 479e522957789..0000000000000 --- a/boards/arm/kl/teensy-lc/src/kl_appinit.c +++ /dev/null @@ -1,86 +0,0 @@ -/**************************************************************************** - * boards/arm/kl/teensy-lc/src/kl_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 - -#include -#include -#include - -#include - -#include "teensy-lc.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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 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) -{ - int ret; - -#ifdef CONFIG_PWM - /* Initialize PWM and register the PWM device. */ - - ret = kl_pwm_setup(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: kl_pwm_setup() failed: %d\n", ret); - } -#endif - - UNUSED(ret); - return OK; -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/arm/kl/teensy-lc/src/kl_boardinitialize.c b/boards/arm/kl/teensy-lc/src/kl_boardinitialize.c index 4f8b981035869..172a1dc9fbb96 100644 --- a/boards/arm/kl/teensy-lc/src/kl_boardinitialize.c +++ b/boards/arm/kl/teensy-lc/src/kl_boardinitialize.c @@ -118,13 +118,18 @@ void kl_boardinitialize(void) #ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { - /* Perform NSH initialization here instead of from the NSH. - * This alternative NSH initialization is necessary when NSH is ran in - * user-space but the initialization function must run in kernel space. - */ + int ret; + +#ifdef CONFIG_PWM + /* Initialize PWM and register the PWM device. */ -#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_BOARDCTL) - board_app_initialize(0); + ret = kl_pwm_setup(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: kl_pwm_setup() failed: %d\n", ret); + } #endif + + UNUSED(ret); } #endif diff --git a/boards/arm/lc823450/lc823450-xgevk/configs/audio/defconfig b/boards/arm/lc823450/lc823450-xgevk/configs/audio/defconfig index d6d0ec3cbb137..adf52de04c5af 100644 --- a/boards/arm/lc823450/lc823450-xgevk/configs/audio/defconfig +++ b/boards/arm/lc823450/lc823450-xgevk/configs/audio/defconfig @@ -71,7 +71,6 @@ CONFIG_MQ_MAXMSGSIZE=64 CONFIG_MTD=y CONFIG_NAME_MAX=255 CONFIG_NETUTILS_CODECS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_BASENAME=y CONFIG_NSH_DISABLE_DIRNAME=y diff --git a/boards/arm/lc823450/lc823450-xgevk/configs/bt/defconfig b/boards/arm/lc823450/lc823450-xgevk/configs/bt/defconfig index 17cd3d968bd3e..d81e4268415bf 100644 --- a/boards/arm/lc823450/lc823450-xgevk/configs/bt/defconfig +++ b/boards/arm/lc823450/lc823450-xgevk/configs/bt/defconfig @@ -90,7 +90,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_TCP_KEEPALIVE=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_BASENAME=y CONFIG_NSH_DISABLE_DIRNAME=y diff --git a/boards/arm/lc823450/lc823450-xgevk/configs/elf/defconfig b/boards/arm/lc823450/lc823450-xgevk/configs/elf/defconfig index dd78b9b4ba026..a7f4638a3ea93 100644 --- a/boards/arm/lc823450/lc823450-xgevk/configs/elf/defconfig +++ b/boards/arm/lc823450/lc823450-xgevk/configs/elf/defconfig @@ -16,7 +16,6 @@ CONFIG_ARCH_STDARG_H=y CONFIG_BINFMT_CONSTRUCTORS=y CONFIG_BOARDCTL=y CONFIG_BOARDCTL_ROMDISK=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=12061 CONFIG_CODECS_HASH_MD5=y CONFIG_DEBUG_FULLOPT=y diff --git a/boards/arm/lc823450/lc823450-xgevk/configs/knsh/defconfig b/boards/arm/lc823450/lc823450-xgevk/configs/knsh/defconfig index 81b49373d3dfa..efe67a92d9a00 100644 --- a/boards/arm/lc823450/lc823450-xgevk/configs/knsh/defconfig +++ b/boards/arm/lc823450/lc823450-xgevk/configs/knsh/defconfig @@ -21,6 +21,7 @@ CONFIG_ARCH_CHIP_LC823450=y CONFIG_ARCH_INTERRUPTSTACK=2048 CONFIG_ARCH_STDARG_H=y CONFIG_ARM_MPU=y +CONFIG_BOARDCTL=y CONFIG_BOARDCTL_RESET=y CONFIG_BOARD_LOOPSPERMSEC=12061 CONFIG_BUILD_PROTECTED=y @@ -53,7 +54,6 @@ CONFIG_LIBM=y CONFIG_MQ_MAXMSGSIZE=64 CONFIG_NAME_MAX=255 CONFIG_NETUTILS_CODECS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_DISABLE_BASENAME=y CONFIG_NSH_DISABLE_CP=y CONFIG_NSH_DISABLE_DIRNAME=y diff --git a/boards/arm/lc823450/lc823450-xgevk/configs/krndis/defconfig b/boards/arm/lc823450/lc823450-xgevk/configs/krndis/defconfig index 10f7f954c1c41..8fef690d90b9c 100644 --- a/boards/arm/lc823450/lc823450-xgevk/configs/krndis/defconfig +++ b/boards/arm/lc823450/lc823450-xgevk/configs/krndis/defconfig @@ -104,7 +104,6 @@ CONFIG_NET_ROUTE=y CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_DISABLE_BASENAME=y CONFIG_NSH_DISABLE_DIRNAME=y CONFIG_NSH_DISABLE_EXEC=y diff --git a/boards/arm/lc823450/lc823450-xgevk/configs/nsh/defconfig b/boards/arm/lc823450/lc823450-xgevk/configs/nsh/defconfig index 4e28478c5ef89..f93d8d15c2207 100644 --- a/boards/arm/lc823450/lc823450-xgevk/configs/nsh/defconfig +++ b/boards/arm/lc823450/lc823450-xgevk/configs/nsh/defconfig @@ -58,7 +58,6 @@ CONFIG_LIBM=y CONFIG_MQ_MAXMSGSIZE=64 CONFIG_NAME_MAX=255 CONFIG_NETUTILS_CODECS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_BASENAME=y CONFIG_NSH_DISABLE_CP=y diff --git a/boards/arm/lc823450/lc823450-xgevk/configs/rndis/defconfig b/boards/arm/lc823450/lc823450-xgevk/configs/rndis/defconfig index 856d8874951ff..b8be2a142a9da 100644 --- a/boards/arm/lc823450/lc823450-xgevk/configs/rndis/defconfig +++ b/boards/arm/lc823450/lc823450-xgevk/configs/rndis/defconfig @@ -103,7 +103,6 @@ CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NFS=y CONFIG_NFS_STATISTICS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_BASENAME=y CONFIG_NSH_DISABLE_DIRNAME=y diff --git a/boards/arm/lc823450/lc823450-xgevk/configs/usb/defconfig b/boards/arm/lc823450/lc823450-xgevk/configs/usb/defconfig index 048ab2a3ca960..77b72fd6da3e2 100644 --- a/boards/arm/lc823450/lc823450-xgevk/configs/usb/defconfig +++ b/boards/arm/lc823450/lc823450-xgevk/configs/usb/defconfig @@ -66,7 +66,6 @@ CONFIG_MQ_MAXMSGSIZE=64 CONFIG_MTD=y CONFIG_NAME_MAX=255 CONFIG_NETUTILS_CODECS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_EXEC=y CONFIG_NSH_DISABLE_GET=y diff --git a/boards/arm/lc823450/lc823450-xgevk/src/Makefile b/boards/arm/lc823450/lc823450-xgevk/src/Makefile index 869a73813e909..d128bf06a5ecf 100644 --- a/boards/arm/lc823450/lc823450-xgevk/src/Makefile +++ b/boards/arm/lc823450/lc823450-xgevk/src/Makefile @@ -22,16 +22,11 @@ include $(TOPDIR)/Make.defs -CSRCS = lc823450_boot.c lc823450_mux.c +CSRCS = lc823450_boot.c lc823450_mux.c lc823450_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += lc823450_appinit.c lc823450_bringup.c ifeq ($(CONFIG_BOARDCTL_RESET),y) CSRCS += lc823450_reset.c endif -else ifeq ($(CONFIG_BOARD_LATE_INITIALIZE),y) -CSRCS += lc823450_bringup.c -endif ifeq ($(CONFIG_LC823450_SDIF),y) CSRCS += lc823450_sdif.c diff --git a/boards/arm/lc823450/lc823450-xgevk/src/lc823450_appinit.c b/boards/arm/lc823450/lc823450-xgevk/src/lc823450_appinit.c deleted file mode 100644 index 90836f69010cc..0000000000000 --- a/boards/arm/lc823450/lc823450-xgevk/src/lc823450_appinit.c +++ /dev/null @@ -1,179 +0,0 @@ -/**************************************************************************** - * boards/arm/lc823450/lc823450-xgevk/src/lc823450_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 - -#include -#include - -#include -#include - -#ifdef CONFIG_MTD -# include "lc823450_mtd.h" -#endif - -#include "lc823450_i2c.h" -#include "lc823450-xgevk.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: lc823450_i2c_register - * - * Description: - * Register one I2C drivers for the I2C tool. - * - ****************************************************************************/ - -#ifdef HAVE_I2CTOOL -static void lc823450_i2c_register(int bus) -{ - struct i2c_master_s *i2c; - int ret; - - i2c = lc823450_i2cbus_initialize(bus); - if (i2c == NULL) - { - syslog(LOG_ERR, "ERROR: Failed to get I2C%d interface\n", bus); - } - else - { - ret = i2c_register(i2c, bus); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: Failed to register I2C%d driver: %d\n", - bus, ret); - lc823450_i2cbus_uninitialize(i2c); - } - } -} -#endif - -/**************************************************************************** - * Name: lc823450_i2ctool - * - * Description: - * Register I2C drivers for the I2C tool. - * - ****************************************************************************/ - -#ifdef HAVE_I2CTOOL -static void lc823450_i2ctool(void) -{ -#ifdef CONFIG_LC823450_I2C0 - lc823450_i2c_register(0); -#endif -#ifdef CONFIG_LC823450_I2C1 - lc823450_i2c_register(1); -#endif -} -#else -# define lc823450_i2ctool() -#endif - -/**************************************************************************** - * 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 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) -{ - int ret; - -#ifdef CONFIG_ADC - ret = lc823450_adc_setup(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: lc82450_adc_setup failed: %d\n", ret); - } -#endif - - /* Register I2C drivers on behalf of the I2C tool */ - - lc823450_i2ctool(); - -#ifdef CONFIG_LC823450_MTD - /* Initialize eMMC */ - - ret = lc823450_mtd_initialize(CONFIG_MTD_DEVNO_EMMC); - if (ret != OK) - { - syslog(LOG_ERR, "Failed to initialize eMMC: ret=%d\n", ret); - } - -#ifdef CONFIG_LC823450_SDIF_SDC - /* Initialize uSD */ - - ret = lc823450_mtd_initialize(CONFIG_MTD_DEVNO_SDC); - if (ret != OK) - { - syslog(LOG_ERR, "Failed to initialize uSD: ret=%d\n", ret); - } -#endif /* CONFIG_LC823450_SDIF_SDC */ - -#endif /* CONFIG_LC823450_MTD */ - - UNUSED(ret); /* May not be used */ - -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board initialization */ - - return lc823450_bringup(); -#else - return OK; -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/arm/lc823450/lc823450-xgevk/src/lc823450_boot.c b/boards/arm/lc823450/lc823450-xgevk/src/lc823450_boot.c index 01f39a0773b1a..b4e06b89e9b8b 100644 --- a/boards/arm/lc823450/lc823450-xgevk/src/lc823450_boot.c +++ b/boards/arm/lc823450/lc823450-xgevk/src/lc823450_boot.c @@ -28,10 +28,77 @@ #include +#include +#include + #include +#include + +#ifdef CONFIG_MTD +# include "lc823450_mtd.h" +#endif +#include "lc823450_i2c.h" #include "lc823450-xgevk.h" +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: lc823450_i2c_register + * + * Description: + * Register one I2C drivers for the I2C tool. + * + ****************************************************************************/ + +#ifdef HAVE_I2CTOOL +static void lc823450_i2c_register(int bus) +{ + struct i2c_master_s *i2c; + int ret; + + i2c = lc823450_i2cbus_initialize(bus); + if (i2c == NULL) + { + syslog(LOG_ERR, "ERROR: Failed to get I2C%d interface\n", bus); + } + else + { + ret = i2c_register(i2c, bus); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: Failed to register I2C%d driver: %d\n", + bus, ret); + lc823450_i2cbus_uninitialize(i2c); + } + } +} +#endif + +/**************************************************************************** + * Name: lc823450_i2ctool + * + * Description: + * Register I2C drivers for the I2C tool. + * + ****************************************************************************/ + +#ifdef HAVE_I2CTOOL +static void lc823450_i2ctool(void) +{ +#ifdef CONFIG_LC823450_I2C0 + lc823450_i2c_register(0); +#endif +#ifdef CONFIG_LC823450_I2C1 + lc823450_i2c_register(1); +#endif +} +#else +# define lc823450_i2ctool() +#endif + /**************************************************************************** * Public Functions ****************************************************************************/ @@ -52,7 +119,42 @@ #ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { - /* Perform board initialization */ + int ret; + +#ifdef CONFIG_ADC + ret = lc823450_adc_setup(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: lc82450_adc_setup failed: %d\n", ret); + } +#endif + + /* Register I2C drivers on behalf of the I2C tool */ + + lc823450_i2ctool(); + +#ifdef CONFIG_LC823450_MTD + /* Initialize eMMC */ + + ret = lc823450_mtd_initialize(CONFIG_MTD_DEVNO_EMMC); + if (ret != OK) + { + syslog(LOG_ERR, "Failed to initialize eMMC: ret=%d\n", ret); + } + +#ifdef CONFIG_LC823450_SDIF_SDC + /* Initialize uSD */ + + ret = lc823450_mtd_initialize(CONFIG_MTD_DEVNO_SDC); + if (ret != OK) + { + syslog(LOG_ERR, "Failed to initialize uSD: ret=%d\n", ret); + } +#endif /* CONFIG_LC823450_SDIF_SDC */ + +#endif /* CONFIG_LC823450_MTD */ + + UNUSED(ret); /* May not be used */ lc823450_bringup(); } diff --git a/boards/arm/lpc17xx_40xx/lincoln60/configs/netnsh/defconfig b/boards/arm/lpc17xx_40xx/lincoln60/configs/netnsh/defconfig index e12e29316a98e..152eef5fb7bc2 100644 --- a/boards/arm/lpc17xx_40xx/lincoln60/configs/netnsh/defconfig +++ b/boards/arm/lpc17xx_40xx/lincoln60/configs/netnsh/defconfig @@ -45,7 +45,6 @@ CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/lpc17xx_40xx/lincoln60/configs/nsh/defconfig b/boards/arm/lpc17xx_40xx/lincoln60/configs/nsh/defconfig index 5f4681c0d0579..878e2ae2bb197 100644 --- a/boards/arm/lpc17xx_40xx/lincoln60/configs/nsh/defconfig +++ b/boards/arm/lpc17xx_40xx/lincoln60/configs/nsh/defconfig @@ -21,7 +21,6 @@ CONFIG_LINE_MAX=64 CONFIG_LPC17_40_SSP0=y CONFIG_LPC17_40_UART0=y CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/lpc17xx_40xx/lincoln60/src/CMakeLists.txt b/boards/arm/lpc17xx_40xx/lincoln60/src/CMakeLists.txt index 1e45c09529403..881c35c017a4a 100644 --- a/boards/arm/lpc17xx_40xx/lincoln60/src/CMakeLists.txt +++ b/boards/arm/lpc17xx_40xx/lincoln60/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS lpc17_40_boot.c lpc17_40_leds.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS lpc17_40_appinit.c) -endif() - if(CONFIG_USBMSC) list(APPEND SRCS lpc17_40_usbmsc.c) endif() diff --git a/boards/arm/lpc17xx_40xx/lincoln60/src/Makefile b/boards/arm/lpc17xx_40xx/lincoln60/src/Makefile index d507f2d11c0bd..78cfc32a8bd05 100644 --- a/boards/arm/lpc17xx_40xx/lincoln60/src/Makefile +++ b/boards/arm/lpc17xx_40xx/lincoln60/src/Makefile @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = lpc17_40_boot.c lpc17_40_leds.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += lpc17_40_appinit.c -endif - ifeq ($(CONFIG_USBMSC),y) CSRCS += lpc17_40_usbmsc.c endif diff --git a/boards/arm/lpc17xx_40xx/lincoln60/src/lpc17_40_appinit.c b/boards/arm/lpc17xx_40xx/lincoln60/src/lpc17_40_appinit.c deleted file mode 100644 index bffc5f9bdc864..0000000000000 --- a/boards/arm/lpc17xx_40xx/lincoln60/src/lpc17_40_appinit.c +++ /dev/null @@ -1,67 +0,0 @@ -/**************************************************************************** - * boards/arm/lpc17xx_40xx/lincoln60/src/lpc17_40_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 - -#include -#include -#include - -#include -#include -#include - -/**************************************************************************** - * 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) -{ - return OK; -} diff --git a/boards/arm/lpc17xx_40xx/lincoln60/src/lpc17_40_boot.c b/boards/arm/lpc17xx_40xx/lincoln60/src/lpc17_40_boot.c index 215dd7a10dbc2..56ac60a0c4f2b 100644 --- a/boards/arm/lpc17xx_40xx/lincoln60/src/lpc17_40_boot.c +++ b/boards/arm/lpc17xx_40xx/lincoln60/src/lpc17_40_boot.c @@ -66,3 +66,22 @@ void lpc17_40_boardinitialize(void) board_autoled_initialize(); #endif } + +/**************************************************************************** + * 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ +} +#endif diff --git a/boards/arm/lpc17xx_40xx/lpc4088-devkit/configs/knsh/defconfig b/boards/arm/lpc17xx_40xx/lpc4088-devkit/configs/knsh/defconfig index b884c4520bc4f..752733ec8e3f1 100644 --- a/boards/arm/lpc17xx_40xx/lpc4088-devkit/configs/knsh/defconfig +++ b/boards/arm/lpc17xx_40xx/lpc4088-devkit/configs/knsh/defconfig @@ -18,7 +18,6 @@ CONFIG_ARCH_CHIP_LPC4088=y CONFIG_ARCH_STACKDUMP=y CONFIG_ARM_MPU=y CONFIG_ARM_TOOLCHAIN_BUILDROOT_OABI=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=11934 CONFIG_BUILD_PROTECTED=y CONFIG_DEV_LOOP=y diff --git a/boards/arm/lpc17xx_40xx/lpc4088-devkit/configs/nsh/defconfig b/boards/arm/lpc17xx_40xx/lpc4088-devkit/configs/nsh/defconfig index 3034ef0e30110..b83a2d9fc4cbb 100644 --- a/boards/arm/lpc17xx_40xx/lpc4088-devkit/configs/nsh/defconfig +++ b/boards/arm/lpc17xx_40xx/lpc4088-devkit/configs/nsh/defconfig @@ -54,7 +54,6 @@ CONFIG_NET_TCP=y CONFIG_NET_TCP_NOTIFIER=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y CONFIG_NXFLAT=y diff --git a/boards/arm/lpc17xx_40xx/lpc4088-devkit/src/CMakeLists.txt b/boards/arm/lpc17xx_40xx/lpc4088-devkit/src/CMakeLists.txt index 3c6f6ef316eb6..4ae491bf09dfc 100644 --- a/boards/arm/lpc17xx_40xx/lpc4088-devkit/src/CMakeLists.txt +++ b/boards/arm/lpc17xx_40xx/lpc4088-devkit/src/CMakeLists.txt @@ -40,10 +40,6 @@ if(CONFIG_LPC17_40_LCD) list(APPEND SRCS lpc17_40_lcd.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS lpc17_40_appinit.c) -endif() - if(CONFIG_ARCH_LEDS) list(APPEND SRCS lpc17_40_autoleds.c) else() diff --git a/boards/arm/lpc17xx_40xx/lpc4088-devkit/src/Makefile b/boards/arm/lpc17xx_40xx/lpc4088-devkit/src/Makefile index 015cea6a2f4d7..ff9b430d8c0e3 100644 --- a/boards/arm/lpc17xx_40xx/lpc4088-devkit/src/Makefile +++ b/boards/arm/lpc17xx_40xx/lpc4088-devkit/src/Makefile @@ -42,10 +42,6 @@ ifeq ($(CONFIG_LPC17_40_LCD),y) CSRCS += lpc17_40_lcd.c endif -ifeq ($(CONFIG_BOARDCTL),y) - CSRCS += lpc17_40_appinit.c -endif - ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += lpc17_40_autoleds.c else diff --git a/boards/arm/lpc17xx_40xx/lpc4088-devkit/src/lpc17_40_appinit.c b/boards/arm/lpc17xx_40xx/lpc4088-devkit/src/lpc17_40_appinit.c deleted file mode 100644 index 2827df7b5b861..0000000000000 --- a/boards/arm/lpc17xx_40xx/lpc4088-devkit/src/lpc17_40_appinit.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm/lpc17xx_40xx/lpc4088-devkit/src/lpc17_40_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 - -#include -#include - -#include "lpc4088-devkit.h" - -/**************************************************************************** - * 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 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 lpc4088_devkit_bringup(); -#endif -} diff --git a/boards/arm/lpc17xx_40xx/lpc4088-quickstart/configs/knsh/defconfig b/boards/arm/lpc17xx_40xx/lpc4088-quickstart/configs/knsh/defconfig index 6e8825de6aa52..ae3d4513ed333 100644 --- a/boards/arm/lpc17xx_40xx/lpc4088-quickstart/configs/knsh/defconfig +++ b/boards/arm/lpc17xx_40xx/lpc4088-quickstart/configs/knsh/defconfig @@ -18,7 +18,6 @@ CONFIG_ARCH_CHIP_LPC4088=y CONFIG_ARCH_STACKDUMP=y CONFIG_ARM_MPU=y CONFIG_ARM_TOOLCHAIN_BUILDROOT_OABI=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=11934 CONFIG_BUILD_PROTECTED=y CONFIG_DEV_LOOP=y diff --git a/boards/arm/lpc17xx_40xx/lpc4088-quickstart/configs/nsh/defconfig b/boards/arm/lpc17xx_40xx/lpc4088-quickstart/configs/nsh/defconfig index 05996da2a73d8..7296eb8afdbcc 100644 --- a/boards/arm/lpc17xx_40xx/lpc4088-quickstart/configs/nsh/defconfig +++ b/boards/arm/lpc17xx_40xx/lpc4088-quickstart/configs/nsh/defconfig @@ -28,7 +28,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LPC17_40_GPDMA=y CONFIG_LPC17_40_UART0=y CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/lpc17xx_40xx/lpc4088-quickstart/src/CMakeLists.txt b/boards/arm/lpc17xx_40xx/lpc4088-quickstart/src/CMakeLists.txt index 36c31734aecfe..f6c6a3cceb734 100644 --- a/boards/arm/lpc17xx_40xx/lpc4088-quickstart/src/CMakeLists.txt +++ b/boards/arm/lpc17xx_40xx/lpc4088-quickstart/src/CMakeLists.txt @@ -37,10 +37,6 @@ if(CONFIG_LPC17_40_EXTNAND) list(APPEND SRCS lpc17_40_nandinitialize.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS lpc17_40_appinit.c) -endif() - if(CONFIG_ARCH_LEDS) list(APPEND SRCS lpc17_40_autoleds.c) else() diff --git a/boards/arm/lpc17xx_40xx/lpc4088-quickstart/src/Makefile b/boards/arm/lpc17xx_40xx/lpc4088-quickstart/src/Makefile index 1b04a39fc133b..fefc409e4c5eb 100644 --- a/boards/arm/lpc17xx_40xx/lpc4088-quickstart/src/Makefile +++ b/boards/arm/lpc17xx_40xx/lpc4088-quickstart/src/Makefile @@ -39,10 +39,6 @@ ifeq ($(CONFIG_LPC17_40_EXTNAND),y) CSRCS += lpc17_40_nandinitialize.c endif -ifeq ($(CONFIG_BOARDCTL),y) - CSRCS += lpc17_40_appinit.c -endif - ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += lpc17_40_autoleds.c else diff --git a/boards/arm/lpc17xx_40xx/lpc4088-quickstart/src/lpc17_40_appinit.c b/boards/arm/lpc17xx_40xx/lpc4088-quickstart/src/lpc17_40_appinit.c deleted file mode 100644 index 44dfdd99b8a45..0000000000000 --- a/boards/arm/lpc17xx_40xx/lpc4088-quickstart/src/lpc17_40_appinit.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm/lpc17xx_40xx/lpc4088-quickstart/src/lpc17_40_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 - -#include -#include - -#include "lpc4088-quickstart.h" - -/**************************************************************************** - * 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 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 lpc4088_quickstart_bringup(); -#endif -} diff --git a/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/configs/nsh/defconfig b/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/configs/nsh/defconfig index bb4acc29e0773..0fdd1a5b8ee50 100644 --- a/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/configs/nsh/defconfig +++ b/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/configs/nsh/defconfig @@ -49,7 +49,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_MMCSDSPIPORTNO=1 CONFIG_NSH_READLINE=y diff --git a/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/CMakeLists.txt b/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/CMakeLists.txt index dcfd52a73b3c0..710e053aba4f7 100644 --- a/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/CMakeLists.txt +++ b/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/CMakeLists.txt @@ -30,10 +30,6 @@ if(CONFIG_ADC) list(APPEND SRCS lpc17_40_adc.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS lpc17_40_appinit.c) -endif() - if(CONFIG_NX_LCDDRIVER) list(APPEND SRCS lpc17_40_oled.c) endif() diff --git a/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/Makefile b/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/Makefile index b0f6346c6ffe6..8638b93c04ce9 100644 --- a/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/Makefile +++ b/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/Makefile @@ -32,10 +32,6 @@ ifeq ($(CONFIG_ADC),y) CSRCS += lpc17_40_adc.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += lpc17_40_appinit.c -endif - ifeq ($(CONFIG_NX_LCDDRIVER),y) CSRCS += lpc17_40_oled.c endif diff --git a/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpc17_40_appinit.c b/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpc17_40_appinit.c deleted file mode 100644 index f5b286f3a2410..0000000000000 --- a/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpc17_40_appinit.c +++ /dev/null @@ -1,187 +0,0 @@ -/**************************************************************************** - * boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpc17_40_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 - -#include -#include -#include - -#include -#include -#include - -#include "lpc17_40_ssp.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Configuration ************************************************************/ - -#ifdef CONFIG_BOARDCTL - -/* PORT and SLOT number probably depend on the board configuration */ - -#define NSH_HAVEUSBDEV 1 -#ifdef CONFIG_LPC17_40_SSP1 -# define NSH_HAVEMMCSD 1 -#else -# undef NSH_HAVEMMCSD -#endif - -/* Do we have SPI support for MMC/SD? */ - -#ifdef NSH_HAVEMMCSD -#ifdef CONFIG_NSH_ARCHINIT -# if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 1 -# error "The LPCXpresso MMC/SD is on SSP1" -# undef CONFIG_NSH_MMCSDSPIPORTNO -# define CONFIG_NSH_MMCSDSPIPORTNO 1 -# endif -# if !defined(CONFIG_NSH_MMCSDSLOTNO) || CONFIG_NSH_MMCSDSLOTNO != 0 -# error "The LPCXpresso MMC/SD has only one slot (0)" -# undef CONFIG_NSH_MMCSDSLOTNO -# define CONFIG_NSH_MMCSDSLOTNO 0 -# endif -#else -# undef CONFIG_NSH_MMCSDSPIPORTNO -# define CONFIG_NSH_MMCSDSPIPORTNO 1 -# undef CONFIG_NSH_MMCSDSLOTNO -# define CONFIG_NSH_MMCSDSLOTNO 0 -#endif -#endif - -/* Can't support USB device features if USB device is not enabled */ - -#ifndef CONFIG_USBDEV -# undef NSH_HAVEUSBDEV -#endif - -/* Can't support MMC/SD features if mountpoints are disabled */ - -#if defined(CONFIG_DISABLE_MOUNTPOINT) -# undef NSH_HAVEMMCSD -#endif - -#ifndef CONFIG_NSH_MMCSDMINOR -# define CONFIG_NSH_MMCSDMINOR 0 -#endif - -/* Currnently MMC/SD support is available only for NSH configurations */ - -#else -# undef NSH_HAVEMMCSD -#endif /* CONFIG_BOARDCTL */ - -/**************************************************************************** - * 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 NSH_HAVEMMCSD - struct spi_dev_s *ssp; -#endif - int ret; - -#ifdef NSH_HAVEMMCSD - /* Get the SSP port */ - - ssp = lpc17_40_sspbus_initialize(CONFIG_NSH_MMCSDSPIPORTNO); - if (!ssp) - { - syslog(LOG_ERR, "ERROR: Failed to initialize SSP port %d\n", - CONFIG_NSH_MMCSDSPIPORTNO); - return -ENODEV; - } - - syslog(LOG_INFO, "Successfully initialized SSP port %d\n", - CONFIG_NSH_MMCSDSPIPORTNO); - - /* Bind the SSP port to the slot */ - - ret = mmcsd_spislotinitialize(CONFIG_NSH_MMCSDMINOR, - CONFIG_NSH_MMCSDSLOTNO, ssp); - if (ret < 0) - { - syslog(LOG_ERR, - "ERROR: Failed to bind SSP port %d to MMC/SD slot %d: %d\n", - CONFIG_NSH_MMCSDSPIPORTNO, CONFIG_NSH_MMCSDSLOTNO, ret); - return ret; - } - - syslog(LOG_INFO, - "Successfully bound SSP port %d to MMC/SD slot %d\n", - CONFIG_NSH_MMCSDSPIPORTNO, CONFIG_NSH_MMCSDSLOTNO); -#endif - -#ifdef CONFIG_PWM - /* Initialize PWM and register the PWM device. */ - - ret = lpcexpresso_pwm_setup(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: lpcexpresso_pwm_setup() failed: %d\n", ret); - } -#endif - -#ifdef CONFIG_ADC - /* Initialize ADC and register the ADC driver. */ - - ret = lpcxpresso_adc_setup(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: lpcxpresso_adc_setup failed: %d\n", ret); - } -#endif - - UNUSED(ret); - return OK; -} diff --git a/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpc17_40_boot.c b/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpc17_40_boot.c index c775bd0ed215a..1f5973eedd669 100644 --- a/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpc17_40_boot.c +++ b/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/src/lpc17_40_boot.c @@ -28,7 +28,13 @@ #include +#include +#include +#include + #include +#include +#include #include #include "arm_internal.h" @@ -39,6 +45,50 @@ * Pre-processor Definitions ****************************************************************************/ +/* Configuration ************************************************************/ + +#ifdef CONFIG_BOARDCTL + +/* PORT and SLOT number probably depend on the board configuration */ + +#define NSH_HAVEUSBDEV 1 +#ifdef CONFIG_LPC17_40_SSP1 +# define NSH_HAVEMMCSD 1 +#else +# undef NSH_HAVEMMCSD +#endif + +/* Do we have SPI support for MMC/SD? */ + +#ifdef NSH_HAVEMMCSD +# undef CONFIG_NSH_MMCSDSPIPORTNO +# define CONFIG_NSH_MMCSDSPIPORTNO 1 +# undef CONFIG_NSH_MMCSDSLOTNO +# define CONFIG_NSH_MMCSDSLOTNO 0 +#endif + +/* Can't support USB device features if USB device is not enabled */ + +#ifndef CONFIG_USBDEV +# undef NSH_HAVEUSBDEV +#endif + +/* Can't support MMC/SD features if mountpoints are disabled */ + +#if defined(CONFIG_DISABLE_MOUNTPOINT) +# undef NSH_HAVEMMCSD +#endif + +#ifndef CONFIG_NSH_MMCSDMINOR +# define CONFIG_NSH_MMCSDMINOR 0 +#endif + +/* Currently MMC/SD support is available only for NSH configurations */ + +#else +# undef NSH_HAVEMMCSD +#endif /* CONFIG_BOARDCTL */ + /**************************************************************************** * Private Functions ****************************************************************************/ @@ -79,3 +129,79 @@ void lpc17_40_boardinitialize(void) board_autoled_initialize(); #endif } + +/**************************************************************************** + * 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ +#ifdef NSH_HAVEMMCSD + struct spi_dev_s *ssp; +#endif + int ret; + +#ifdef NSH_HAVEMMCSD + /* Get the SSP port */ + + ssp = lpc17_40_sspbus_initialize(CONFIG_NSH_MMCSDSPIPORTNO); + if (!ssp) + { + syslog(LOG_ERR, "ERROR: Failed to initialize SSP port %d\n", + CONFIG_NSH_MMCSDSPIPORTNO); + return; + } + + syslog(LOG_INFO, "Successfully initialized SSP port %d\n", + CONFIG_NSH_MMCSDSPIPORTNO); + + /* Bind the SSP port to the slot */ + + ret = mmcsd_spislotinitialize(CONFIG_NSH_MMCSDMINOR, + CONFIG_NSH_MMCSDSLOTNO, ssp); + if (ret < 0) + { + syslog(LOG_ERR, + "ERROR: Failed to bind SSP port %d to MMC/SD slot %d: %d\n", + CONFIG_NSH_MMCSDSPIPORTNO, CONFIG_NSH_MMCSDSLOTNO, ret); + return; + } + + syslog(LOG_INFO, + "Successfully bound SSP port %d to MMC/SD slot %d\n", + CONFIG_NSH_MMCSDSPIPORTNO, CONFIG_NSH_MMCSDSLOTNO); +#endif + +#ifdef CONFIG_PWM + /* Initialize PWM and register the PWM device. */ + + ret = lpcexpresso_pwm_setup(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: lpcexpresso_pwm_setup() failed: %d\n", ret); + } +#endif + +#ifdef CONFIG_ADC + /* Initialize ADC and register the ADC driver. */ + + ret = lpcxpresso_adc_setup(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: lpcxpresso_adc_setup failed: %d\n", ret); + } +#endif + + UNUSED(ret); +} +#endif diff --git a/boards/arm/lpc17xx_40xx/lx_cpu/configs/nsh/defconfig b/boards/arm/lpc17xx_40xx/lx_cpu/configs/nsh/defconfig index e79eee28ec595..394cb329a7bd6 100644 --- a/boards/arm/lpc17xx_40xx/lx_cpu/configs/nsh/defconfig +++ b/boards/arm/lpc17xx_40xx/lx_cpu/configs/nsh/defconfig @@ -117,7 +117,6 @@ CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y CONFIG_NFS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_FILE_APPS=y diff --git a/boards/arm/lpc17xx_40xx/lx_cpu/src/Makefile b/boards/arm/lpc17xx_40xx/lx_cpu/src/Makefile index 6f6e2a5ffc0f4..54b4103dc7870 100644 --- a/boards/arm/lpc17xx_40xx/lx_cpu/src/Makefile +++ b/boards/arm/lpc17xx_40xx/lx_cpu/src/Makefile @@ -32,10 +32,6 @@ endif CSRCS += lpc17_40_fpgainitialize.c endif -ifeq ($(CONFIG_BOARDCTL),y) - CSRCS += lpc17_40_appinit.c -endif - ifeq ($(CONFIG_USBDEV_COMPOSITE),y) CSRCS += lpc17_40_composite.c endif diff --git a/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_appinit.c b/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_appinit.c deleted file mode 100644 index c91a1a45e5a4a..0000000000000 --- a/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_appinit.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_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 - -#include -#include - -#include "lx_cpu.h" - -/**************************************************************************** - * 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 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_initialize() */ - - return OK; -#else - /* Perform board-specific initialization */ - - return lx_cpu_bringup(); -#endif -} diff --git a/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_boardinitialize.c b/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_boardinitialize.c index dd88f96e8d965..cdc88d845b99f 100644 --- a/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_boardinitialize.c +++ b/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_boardinitialize.c @@ -115,3 +115,23 @@ void board_initialize(void) lx_cpu_bringup(); } #endif + +/**************************************************************************** + * 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ + lx_cpu_bringup(); +} +#endif diff --git a/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_nsh.c b/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_nsh.c deleted file mode 100644 index f83e9c16c1535..0000000000000 --- a/boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_nsh.c +++ /dev/null @@ -1,388 +0,0 @@ -/**************************************************************************** - * boards/arm/lpc17xx_40xx/lx_cpu/src/lpc17_40_nsh.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 - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include "lpc17_40_gpio.h" -#include "lpc17_40_sdcard.h" -#include "lpc17_40_usbhost.h" -#include "lx_cpu.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Configuration ************************************************************/ - -#define NSH_HAVE_MMCSD 1 -#define NSH_HAVE_USBHOST 1 -#define NSH_HAVE_USBHDEV 1 - -#undef NSH_HAVE_MMCSD_CD -#undef NSH_HAVE_MMCSD_CDINT - -/* MMC/SD support */ - -#if !defined(CONFIG_LPC17_40_SDCARD) || !defined(CONFIG_MMCSD) && \ - !defined(CONFIG_MMCD_SDIO) -# undef NSH_HAVE_MMCSD -#endif - -/* Can't support MMC/SD features if mountpoints are disabled */ - -#if defined(CONFIG_DISABLE_MOUNTPOINT) -# undef NSH_HAVE_MMCSD -#endif - -/* MMC/SD support requires that an SPI support is enabled and an SPI port is - * selected. - */ - -#ifdef NSH_HAVE_MMCSD -# if !defined(CONFIG_NSH_MMCSDSLOTNO) -# warning "Assuming slot MMC/SD slot 0" -# define CONFIG_NSH_MMCSDSLOTNO 0 -# endif -#endif - -#ifdef NSH_HAVE_MMCSD -# if !defined(CONFIG_NSH_MMCSDMINOR) -# warning "Assuming /dev/mmcsd0" -# define CONFIG_NSH_MMCSDMINOR 0 -# endif -#endif - -/* The SD card detect (CD) signal is on P0[13]. This signal is shared. It - * is also used for MOSI1 and USB_UP_LED. The CD pin may be disconnected. - * There is a jumper on board that enables the CD pin. - */ - -#ifdef NSH_HAVE_MMCSD -# ifdef CONFIG_MMCSD_HAVECARDDETECT -# define NSH_HAVE_MMCSD_CD 1 -# ifdef CONFIG_GPIO_IRQ -# define NSH_HAVE_MMCSD_CDINT 1 -# endif -# endif -#endif - -#if defined(NSH_HAVE_MMCSD_CD) && \ - (defined(CONFIG_LPC17_40_SSP1) || defined(CONFIG_LPC17_40_USBDEV)) -# warning "Use of SD Card Detect pin conflicts with SSP1 and/or USB device" -#endif - -/* USB Host */ - -#ifndef CONFIG_USBHOST -# undef NSH_HAVE_USBHOST -#endif - -#ifndef CONFIG_LPC17_40_USBHOST -# undef NSH_HAVE_USBHOST -#endif - -#ifdef NSH_HAVE_USBHOST -# ifndef CONFIG_USBHOST_DEFPRIO -# define CONFIG_USBHOST_DEFPRIO 50 -# endif -# ifndef CONFIG_USBHOST_STACKSIZE -# ifdef CONFIG_USBHOST_HUB -# define CONFIG_USBHOST_STACKSIZE 1536 -# else -# define CONFIG_USBHOST_STACKSIZE 1024 -# endif -# endif -#endif - -/* USB Device */ - -#ifndef CONFIG_USBDEV -# undef NSH_HAVE_USBDEV -#endif - -#ifndef CONFIG_LPC17_40_USBDEV -# undef NSH_HAVE_USBDEV -#endif - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -#ifdef NSH_HAVE_USBHOST -static struct usbhost_connection_s *g_usbconn; -#endif -#ifdef NSH_HAVE_MMCSD -static struct sdio_dev_s *g_sdiodev; -#endif -#ifdef NSH_HAVE_MMCSD_CD -static bool g_sd_inserted; -#endif - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: nsh_waiter - * - * Description: - * Wait for USB devices to be connected. - * - ****************************************************************************/ - -#ifdef NSH_HAVE_USBHOST -static int nsh_waiter(int argc, char *argv[]) -{ - struct usbhost_hubport_s *hport; - - syslog(LOG_INFO, "nsh_waiter: Running\n"); - for (; ; ) - { - /* Wait for the device to change state */ - - DEBUGVERIFY(CONN_WAIT(g_usbconn, &hport)); - syslog(LOG_INFO, "nsh_waiter: %s\n", - hport->connected ? "connected" : "disconnected"); - - /* Did we just become connected? */ - - if (hport->connected) - { - /* Yes.. enumerate the newly connected device */ - - CONN_ENUMERATE(g_usbconn, hport); - } - } - - /* Keep the compiler from complaining */ - - return 0; -} -#endif - -/**************************************************************************** - * Name: nsh_cdinterrupt - * - * Description: - * Card detect interrupt handler. - * - ****************************************************************************/ - -#ifdef NSH_HAVE_MMCSD_CDINT -static int nsh_cdinterrupt(int irq, void *context) -{ - bool present; - - present = !lpc17_40_gpioread(GPIO_SD_CD); - if (present != g_sd_inserted) - { - sdio_mediachange(g_sdiodev, present); - g_sd_inserted = present; - } - - return OK; -} -#endif - -/**************************************************************************** - * Name: nsh_sdinitialize - * - * Description: - * Initialize SPI-based microSD. - * - ****************************************************************************/ - -#ifdef NSH_HAVE_MMCSD -static int nsh_sdinitialize(void) -{ - int ret; - -#ifdef NSH_HAVE_MMCSD_CD - /* Configure the SD card detect GPIO */ - - lpc17_40_configgpio(GPIO_SD_CD); - -#if NSH_HAVE_MMCSD_CDINT - /* Attach an interrupt handler to get notifications when a card is - * inserted or deleted. - */ - - irq_attach(LPC17_40_IRQ_P0p13, nsh_cdinterrupt); - up_enable_irq(LPC17_40_IRQ_P0p13); -#endif -#endif - - /* First, get an instance of the SDIO interface */ - - g_sdiodev = sdio_initialize(CONFIG_NSH_MMCSDSLOTNO); - if (!g_sdiodev) - { - syslog(LOG_ERR, "ERROR: Failed to initialize SDIO slot %d\n", - CONFIG_NSH_MMCSDSLOTNO); - return -ENODEV; - } - - /* Now bind the SDIO interface to the MMC/SD driver */ - - ret = mmcsd_slotinitialize(CONFIG_NSH_MMCSDMINOR, g_sdiodev); - if (ret != OK) - { - syslog(LOG_ERR, - "ERROR: Failed to bind SDIO to the MMC/SD driver: %d\n", - ret); - return ret; - } - - /* Check if there is a card in the slot and inform the SDCARD driver. If - * we do not support the card detect, then let's assume that there is - * one. - */ - -#ifdef NSH_HAVE_MMCSD_CD - g_sd_inserted = !lpc17_40_gpioread(GPIO_SD_CD); - sdio_mediachange(g_sdiodev, g_sd_inserted); -#else - sdio_mediachange(g_sdiodev, true); -#endif - return OK; -} -#else -# define nsh_sdinitialize() (OK) -#endif - -/**************************************************************************** - * Name: nsh_usbhostinitialize - * - * Description: - * Initialize SPI-based microSD. - * - ****************************************************************************/ - -#ifdef NSH_HAVE_USBHOST -static int nsh_usbhostinitialize(void) -{ - int pid; - int ret; - - /* First, register all of the class drivers needed to support the drivers - * that we care about: - */ - - syslog(LOG_INFO, "Register class drivers\n"); - -#ifdef CONFIG_USBHOST_MSC - /* Register the USB host Mass Storage Class */ - - ret = usbhost_msc_initialize(); - if (ret != OK) - { - syslog(LOG_ERR, - "ERROR: Failed to register the mass storage class: %d\n", - ret); - } -#endif - -#ifdef CONFIG_USBHOST_CDCACM - /* Register the CDC/ACM serial class */ - - ret = usbhost_cdcacm_initialize(); - if (ret != OK) - { - syslog(LOG_ERR, - "ERROR: Failed to register the CDC/ACM serial class: %d\n", - ret); - } -#endif - - /* Then get an instance of the USB host interface */ - - syslog(LOG_INFO, "Initialize USB host\n"); - g_usbconn = lpc17_40_usbhost_initialize(0); - if (g_usbconn) - { - /* Start a thread to handle device connection. */ - - syslog(LOG_INFO, "Start nsh_waiter\n"); - - pid = task_create("usbhost", CONFIG_USBHOST_DEFPRIO, - CONFIG_USBHOST_STACKSIZE, - nsh_waiter, NULL); - return pid < 0 ? -ENOEXEC : OK; - } - - return -ENODEV; -} -#else -# define nsh_usbhostinitialize() (OK) -#endif - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: board_app_initialize - * - * Description: - * Perform architecture specific initialization for NSH. - * - * CONFIG_NSH_ARCHINIT=y : - * Called from the NSH library - * - * CONFIG_BOARD_INITIALIZE=y, CONFIG_NSH_LIBRARY=y, && - * CONFIG_NSH_ARCHINIT=n: - * Called from board_initialize(). - * - ****************************************************************************/ - -int board_app_initialize(void) -{ - int ret; - - /* Initialize SPI-based microSD */ - - ret = nsh_sdinitialize(); - if (ret == OK) - { - /* Initialize USB host */ - - ret = nsh_usbhostinitialize(); - } - - return ret; -} diff --git a/boards/arm/lpc17xx_40xx/mbed/configs/nsh/defconfig b/boards/arm/lpc17xx_40xx/mbed/configs/nsh/defconfig index 35818e1a0c593..a520f01a15275 100644 --- a/boards/arm/lpc17xx_40xx/mbed/configs/nsh/defconfig +++ b/boards/arm/lpc17xx_40xx/mbed/configs/nsh/defconfig @@ -29,7 +29,6 @@ CONFIG_MMCSD=y CONFIG_MMCSD_SPICLOCK=12500000 CONFIG_MM_REGIONS=2 CONFIG_MTD=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/lpc17xx_40xx/mbed/configs/userled/defconfig b/boards/arm/lpc17xx_40xx/mbed/configs/userled/defconfig index bd39d0de3af7c..e380ba6668dc4 100644 --- a/boards/arm/lpc17xx_40xx/mbed/configs/userled/defconfig +++ b/boards/arm/lpc17xx_40xx/mbed/configs/userled/defconfig @@ -32,7 +32,6 @@ CONFIG_MMCSD=y CONFIG_MMCSD_SPICLOCK=12500000 CONFIG_MM_REGIONS=2 CONFIG_MTD=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/lpc17xx_40xx/mbed/src/CMakeLists.txt b/boards/arm/lpc17xx_40xx/mbed/src/CMakeLists.txt index d32be9271e3e6..8957423343337 100644 --- a/boards/arm/lpc17xx_40xx/mbed/src/CMakeLists.txt +++ b/boards/arm/lpc17xx_40xx/mbed/src/CMakeLists.txt @@ -26,10 +26,6 @@ if(CONFIG_ARCH_LEDS) list(APPEND SRCS lpc17_40_leds.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS lpc17_40_appinit.c) -endif() - if(CONFIG_USBMSC) list(APPEND SRCS lpc17_40_usbmsc.c) endif() diff --git a/boards/arm/lpc17xx_40xx/mbed/src/Makefile b/boards/arm/lpc17xx_40xx/mbed/src/Makefile index 22cb375f7668a..0e7ec37a34fbb 100644 --- a/boards/arm/lpc17xx_40xx/mbed/src/Makefile +++ b/boards/arm/lpc17xx_40xx/mbed/src/Makefile @@ -28,10 +28,6 @@ ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += lpc17_40_leds.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += lpc17_40_appinit.c -endif - ifeq ($(CONFIG_USBMSC),y) CSRCS += lpc17_40_usbmsc.c endif diff --git a/boards/arm/lpc17xx_40xx/mbed/src/lpc17_40_appinit.c b/boards/arm/lpc17xx_40xx/mbed/src/lpc17_40_appinit.c deleted file mode 100644 index 06eecc94e8c53..0000000000000 --- a/boards/arm/lpc17xx_40xx/mbed/src/lpc17_40_appinit.c +++ /dev/null @@ -1,127 +0,0 @@ -/**************************************************************************** - * boards/arm/lpc17xx_40xx/mbed/src/lpc17_40_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 - -#include -#include -#include - -#include -#include -#include - -#include "mbed.h" - -#ifdef CONFIG_USERLED -#include -#endif - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Configuration ************************************************************/ - -/* PORT and SLOT number probably depend on the board configuration */ - -#ifdef CONFIG_ARCH_BOARD_MBED -# define NSH_HAVEUSBDEV 1 -#else -# error "Unrecognized board" -# undef NSH_HAVEUSBDEV -#endif - -/* Can't support USB features if USB is not enabled */ - -#ifndef CONFIG_USBDEV -# undef NSH_HAVEUSBDEV -#endif - -/**************************************************************************** - * 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) -{ - int ret; - -#ifdef CONFIG_PWM - /* Initialize PWM and register the PWM device. */ - - ret = mbed_pwm_setup(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: mbed_pwm_setup() failed: %d\n", ret); - } -#endif - -#ifdef CONFIG_ADC - /* Initialize ADC and register the ADC driver. */ - - ret = mbed_adc_setup(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: mbed_adc_setup failed: %d\n", ret); - } -#endif - -#ifdef CONFIG_USERLED - /* Register the LED driver */ - - ret = userled_lower_initialize("/dev/userleds"); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: userled_lower_initialize() failed: %d\n", ret); - } -#endif - - UNUSED(ret); - return OK; -} diff --git a/boards/arm/lpc17xx_40xx/mbed/src/lpc17_40_boot.c b/boards/arm/lpc17xx_40xx/mbed/src/lpc17_40_boot.c index 98aa74fd9a284..33f6bbefd5d89 100644 --- a/boards/arm/lpc17xx_40xx/mbed/src/lpc17_40_boot.c +++ b/boards/arm/lpc17xx_40xx/mbed/src/lpc17_40_boot.c @@ -28,16 +28,43 @@ #include +#include +#include +#include + #include +#include +#include #include #include "arm_internal.h" #include "mbed.h" +#ifdef CONFIG_USERLED +#include +#endif + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ +/* Configuration ************************************************************/ + +/* PORT and SLOT number probably depend on the board configuration */ + +#ifdef CONFIG_ARCH_BOARD_MBED +# define NSH_HAVEUSBDEV 1 +#else +# error "Unrecognized board" +# undef NSH_HAVEUSBDEV +#endif + +/* Can't support USB features if USB is not enabled */ + +#ifndef CONFIG_USBDEV +# undef NSH_HAVEUSBDEV +#endif + /**************************************************************************** * Private Functions ****************************************************************************/ @@ -66,3 +93,55 @@ void lpc17_40_boardinitialize(void) board_autoled_initialize(); #endif } + +/**************************************************************************** + * 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ + int ret; + +#ifdef CONFIG_PWM + /* Initialize PWM and register the PWM device. */ + + ret = mbed_pwm_setup(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: mbed_pwm_setup() failed: %d\n", ret); + } +#endif + +#ifdef CONFIG_ADC + /* Initialize ADC and register the ADC driver. */ + + ret = mbed_adc_setup(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: mbed_adc_setup failed: %d\n", ret); + } +#endif + +#ifdef CONFIG_USERLED + /* Register the LED driver */ + + ret = userled_lower_initialize("/dev/userleds"); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: userled_lower_initialize() failed: %d\n", ret); + } +#endif + + UNUSED(ret); +} +#endif diff --git a/boards/arm/lpc17xx_40xx/mcb1700/configs/nsh/defconfig b/boards/arm/lpc17xx_40xx/mcb1700/configs/nsh/defconfig index 4634fd10495ff..6cf277164e137 100644 --- a/boards/arm/lpc17xx_40xx/mcb1700/configs/nsh/defconfig +++ b/boards/arm/lpc17xx_40xx/mcb1700/configs/nsh/defconfig @@ -30,7 +30,6 @@ CONFIG_MMCSD=y CONFIG_MMCSD_SPICLOCK=12500000 CONFIG_MM_REGIONS=2 CONFIG_MTD=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/lpc17xx_40xx/mcb1700/src/CMakeLists.txt b/boards/arm/lpc17xx_40xx/mcb1700/src/CMakeLists.txt index ccfa428c73393..d4dd844c66c19 100644 --- a/boards/arm/lpc17xx_40xx/mcb1700/src/CMakeLists.txt +++ b/boards/arm/lpc17xx_40xx/mcb1700/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS lpc17_40_boot.c lpc17_40_bringup.c lpc17_40_leds.c lpc17_40_dac.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS lpc17_40_appinit.c) -endif() - if(CONFIG_USBMSC) list(APPEND SRCS lpc17_40_usbmsc.c) endif() diff --git a/boards/arm/lpc17xx_40xx/mcb1700/src/Makefile b/boards/arm/lpc17xx_40xx/mcb1700/src/Makefile index 04312418a60be..85583268c6a26 100644 --- a/boards/arm/lpc17xx_40xx/mcb1700/src/Makefile +++ b/boards/arm/lpc17xx_40xx/mcb1700/src/Makefile @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = lpc17_40_boot.c lpc17_40_bringup.c lpc17_40_leds.c lpc17_40_dac.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += lpc17_40_appinit.c -endif - ifeq ($(CONFIG_USBMSC),y) CSRCS += lpc17_40_usbmsc.c endif diff --git a/boards/arm/lpc17xx_40xx/mcb1700/src/lpc17_40_appinit.c b/boards/arm/lpc17xx_40xx/mcb1700/src/lpc17_40_appinit.c deleted file mode 100644 index b8c19bcc50a31..0000000000000 --- a/boards/arm/lpc17xx_40xx/mcb1700/src/lpc17_40_appinit.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm/lpc17xx_40xx/mcb1700/src/lpc17_40_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 - -#include -#include - -#include "mcb1700.h" - -/**************************************************************************** - * 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 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 mcb1700_bringup(); -#endif -} diff --git a/boards/arm/lpc17xx_40xx/mcb1700/src/lpc17_40_bringup.c b/boards/arm/lpc17xx_40xx/mcb1700/src/lpc17_40_bringup.c index 54b811c266d8f..eba34abe754fe 100644 --- a/boards/arm/lpc17xx_40xx/mcb1700/src/lpc17_40_bringup.c +++ b/boards/arm/lpc17xx_40xx/mcb1700/src/lpc17_40_bringup.c @@ -56,29 +56,12 @@ /* MMC/SD is on SSP port 1. There is only a single slot, slot 0 */ -#ifdef CONFIG_NSH_ARCHINIT -# if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 1 -# undef CONFIG_NSH_MMCSDSPIPORTNO -# define CONFIG_NSH_MMCSDSPIPORTNO 1 -# endif - -# if !defined(CONFIG_NSH_MMCSDSLOTNO) || CONFIG_NSH_MMCSDSLOTNO != 0 -# undef CONFIG_NSH_MMCSDSLOTNO -# define CONFIG_NSH_MMCSDSLOTNO 0 -# endif - -# ifndef CONFIG_NSH_MMCSDMINOR -# define CONFIG_NSH_MMCSDMINOR 0 -# endif - -#else # undef CONFIG_NSH_MMCSDSPIPORTNO # define CONFIG_NSH_MMCSDSPIPORTNO 1 # undef CONFIG_NSH_MMCSDSLOTNO # define CONFIG_NSH_MMCSDSLOTNO 0 # undef CONFIG_NSH_MMCSDMINOR # define CONFIG_NSH_MMCSDMINOR 0 -#endif /* Can't support MMC/SD is SSP1 is not enabled */ diff --git a/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/configs/ftpc/defconfig b/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/configs/ftpc/defconfig index 7e0ef0170907f..6c5d97f888ac7 100644 --- a/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/configs/ftpc/defconfig +++ b/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/configs/ftpc/defconfig @@ -47,7 +47,6 @@ CONFIG_NET_TCP=y CONFIG_NET_TCP_PREALLOC_CONNS=16 CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_GET=y CONFIG_NSH_DISABLE_PUT=y diff --git a/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/configs/hidkbd/defconfig b/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/configs/hidkbd/defconfig index 3d610cf14a4f1..27bcff2f8526d 100644 --- a/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/configs/hidkbd/defconfig +++ b/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/configs/hidkbd/defconfig @@ -30,7 +30,6 @@ CONFIG_LPC17_40_UART0=y CONFIG_LPC17_40_USBHOST=y CONFIG_LPC17_40_USBHOST_TDBUFFERS=3 CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/configs/hidmouse/defconfig b/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/configs/hidmouse/defconfig index cb008d271eaad..4f4772f695935 100644 --- a/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/configs/hidmouse/defconfig +++ b/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/configs/hidmouse/defconfig @@ -45,7 +45,6 @@ CONFIG_NET_MAX_LISTENPORTS=8 CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/configs/nsh/defconfig b/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/configs/nsh/defconfig index bef4628793cb5..de409bfc1e409 100644 --- a/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/configs/nsh/defconfig +++ b/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/configs/nsh/defconfig @@ -53,7 +53,6 @@ CONFIG_NET_MAX_LISTENPORTS=8 CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_MMCSDSPIPORTNO=1 diff --git a/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/configs/zmodem/defconfig b/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/configs/zmodem/defconfig index db15c48646713..eaccce023e186 100644 --- a/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/configs/zmodem/defconfig +++ b/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/configs/zmodem/defconfig @@ -51,7 +51,6 @@ CONFIG_NET_MAX_LISTENPORTS=8 CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_MMCSDSPIPORTNO=1 diff --git a/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/src/CMakeLists.txt b/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/src/CMakeLists.txt index b77dca2ee4156..2423e245549ea 100644 --- a/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/src/CMakeLists.txt +++ b/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS lpc17_40_boot.c lpc17_40_bringup.c lpc17_40_leds.c lpc17_40_ssp.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS lpc17_40_appinit.c) -endif() - if(CONFIG_USBMSC) list(APPEND SRCS lpc17_40_usbmsc.c) endif() diff --git a/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/src/Makefile b/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/src/Makefile index 14bf6c3d17dc6..ff0bc295509a9 100644 --- a/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/src/Makefile +++ b/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/src/Makefile @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = lpc17_40_boot.c lpc17_40_bringup.c lpc17_40_leds.c lpc17_40_ssp.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += lpc17_40_appinit.c -endif - ifeq ($(CONFIG_USBMSC),y) CSRCS += lpc17_40_usbmsc.c endif diff --git a/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/src/lpc17_40_appinit.c b/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/src/lpc17_40_appinit.c deleted file mode 100644 index b3b178c4ac588..0000000000000 --- a/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/src/lpc17_40_appinit.c +++ /dev/null @@ -1,85 +0,0 @@ -/**************************************************************************** - * boards/arm/lpc17xx_40xx/olimex-lpc1766stk/src/lpc17_40_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 - -#include -#include - -#include - -#include "lpc1766stk.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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. - * - * CONFIG_BOARDCTL=y : - * Called from the NSH library - * - * CONFIG_BOARD_LATE_INITIALIZE=y, CONFIG_NSH_LIBRARY=y, && - * CONFIG_BOARDCTL=n : - * Called from board_late_initialize(). - * - * 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) -{ - /* Did we already initialize via board_late_initialize()? */ - -#ifndef CONFIG_BOARD_LATE_INITIALIZE - return lpc17_40_bringup(); -#else - return OK; -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/src/lpc17_40_bringup.c b/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/src/lpc17_40_bringup.c index 3e05baa0d5534..24752b8381ac0 100644 --- a/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/src/lpc17_40_bringup.c +++ b/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/src/lpc17_40_bringup.c @@ -55,29 +55,12 @@ /* MMC/SD is on SSP port 1. There is only a single slot, slot 0 */ -#ifdef CONFIG_NSH_ARCHINIT -# if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 1 -# undef CONFIG_NSH_MMCSDSPIPORTNO -# define CONFIG_NSH_MMCSDSPIPORTNO 1 -# endif - -# if !defined(CONFIG_NSH_MMCSDSLOTNO) || CONFIG_NSH_MMCSDSLOTNO != 0 -# undef CONFIG_NSH_MMCSDSLOTNO -# define CONFIG_NSH_MMCSDSLOTNO 0 -# endif - -# ifndef CONFIG_NSH_MMCSDMINOR -# define CONFIG_NSH_MMCSDMINOR 0 -# endif - -#else # undef CONFIG_NSH_MMCSDSPIPORTNO # define CONFIG_NSH_MMCSDSPIPORTNO 1 # undef CONFIG_NSH_MMCSDSLOTNO # define CONFIG_NSH_MMCSDSLOTNO 0 # undef CONFIG_NSH_MMCSDMINOR # define CONFIG_NSH_MMCSDMINOR 0 -#endif /* Can't support MMC/SD is SSP1 is not enabled */ diff --git a/boards/arm/lpc17xx_40xx/open1788/configs/fb/defconfig b/boards/arm/lpc17xx_40xx/open1788/configs/fb/defconfig index 90533f04af175..1914195a63f9f 100644 --- a/boards/arm/lpc17xx_40xx/open1788/configs/fb/defconfig +++ b/boards/arm/lpc17xx_40xx/open1788/configs/fb/defconfig @@ -14,7 +14,6 @@ CONFIG_ARCH_CHIP_LPC1788=y CONFIG_ARCH_CHIP_LPC17XX_40XX=y CONFIG_ARCH_STACKDUMP=y CONFIG_BCH=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=11934 CONFIG_BUILTIN=y CONFIG_DEV_LOOP=y diff --git a/boards/arm/lpc17xx_40xx/open1788/configs/knsh/defconfig b/boards/arm/lpc17xx_40xx/open1788/configs/knsh/defconfig index abf01eefaf7d6..8c760268cb8eb 100644 --- a/boards/arm/lpc17xx_40xx/open1788/configs/knsh/defconfig +++ b/boards/arm/lpc17xx_40xx/open1788/configs/knsh/defconfig @@ -18,7 +18,6 @@ CONFIG_ARCH_CHIP_LPC17XX_40XX=y CONFIG_ARCH_STACKDUMP=y CONFIG_ARM_MPU=y CONFIG_ARM_TOOLCHAIN_BUILDROOT_OABI=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=11934 CONFIG_BUILD_PROTECTED=y CONFIG_DEV_LOOP=y diff --git a/boards/arm/lpc17xx_40xx/open1788/configs/knxterm/defconfig b/boards/arm/lpc17xx_40xx/open1788/configs/knxterm/defconfig index 5f7bf6f0952bc..2e5683e71efbf 100644 --- a/boards/arm/lpc17xx_40xx/open1788/configs/knxterm/defconfig +++ b/boards/arm/lpc17xx_40xx/open1788/configs/knxterm/defconfig @@ -15,7 +15,6 @@ CONFIG_ARCH_CHIP_LPC1788=y CONFIG_ARCH_CHIP_LPC17XX_40XX=y CONFIG_ARCH_STACKDUMP=y CONFIG_ARM_MPU=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=11934 CONFIG_BUILD_PROTECTED=y CONFIG_DEV_LOOP=y diff --git a/boards/arm/lpc17xx_40xx/open1788/configs/nsh/defconfig b/boards/arm/lpc17xx_40xx/open1788/configs/nsh/defconfig index f1b4d722de443..26a519139e090 100644 --- a/boards/arm/lpc17xx_40xx/open1788/configs/nsh/defconfig +++ b/boards/arm/lpc17xx_40xx/open1788/configs/nsh/defconfig @@ -31,7 +31,6 @@ CONFIG_LPC17_40_UART0=y CONFIG_MMCSD=y CONFIG_MMCSD_SDIO=y CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/lpc17xx_40xx/open1788/configs/pdcurses/defconfig b/boards/arm/lpc17xx_40xx/open1788/configs/pdcurses/defconfig index 5dfe3146e5d83..cad20191121de 100644 --- a/boards/arm/lpc17xx_40xx/open1788/configs/pdcurses/defconfig +++ b/boards/arm/lpc17xx_40xx/open1788/configs/pdcurses/defconfig @@ -40,7 +40,6 @@ CONFIG_LPC17_40_UART0=y CONFIG_MMCSD=y CONFIG_MMCSD_SDIO=y CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/lpc17xx_40xx/open1788/configs/pwfb/defconfig b/boards/arm/lpc17xx_40xx/open1788/configs/pwfb/defconfig index 8b003c1b63750..8afcb33c6a527 100644 --- a/boards/arm/lpc17xx_40xx/open1788/configs/pwfb/defconfig +++ b/boards/arm/lpc17xx_40xx/open1788/configs/pwfb/defconfig @@ -18,7 +18,6 @@ CONFIG_ARCH_CHIP_LPC1788=y CONFIG_ARCH_CHIP_LPC17XX_40XX=y CONFIG_ARCH_STACKDUMP=y CONFIG_ARM_MPU=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=11934 CONFIG_EXAMPLES_PWFB=y CONFIG_EXAMPLES_PWFB_BGCOLOR=0x7b5d diff --git a/boards/arm/lpc17xx_40xx/open1788/src/CMakeLists.txt b/boards/arm/lpc17xx_40xx/open1788/src/CMakeLists.txt index 609dfeb6cf69f..ecd0d01e59c5b 100644 --- a/boards/arm/lpc17xx_40xx/open1788/src/CMakeLists.txt +++ b/boards/arm/lpc17xx_40xx/open1788/src/CMakeLists.txt @@ -40,10 +40,6 @@ if(CONFIG_LPC17_40_LCD) list(APPEND SRCS lpc17_40_lcd.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS lpc17_40_appinit.c) -endif() - if(CONFIG_ARCH_LEDS) list(APPEND SRCS lpc17_40_autoleds.c) else() diff --git a/boards/arm/lpc17xx_40xx/open1788/src/Makefile b/boards/arm/lpc17xx_40xx/open1788/src/Makefile index 45daf9e4d9265..4c42d5b6e440f 100644 --- a/boards/arm/lpc17xx_40xx/open1788/src/Makefile +++ b/boards/arm/lpc17xx_40xx/open1788/src/Makefile @@ -42,10 +42,6 @@ ifeq ($(CONFIG_LPC17_40_LCD),y) CSRCS += lpc17_40_lcd.c endif -ifeq ($(CONFIG_BOARDCTL),y) - CSRCS += lpc17_40_appinit.c -endif - ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += lpc17_40_autoleds.c else diff --git a/boards/arm/lpc17xx_40xx/open1788/src/lpc17_40_appinit.c b/boards/arm/lpc17xx_40xx/open1788/src/lpc17_40_appinit.c deleted file mode 100644 index 50141c433a190..0000000000000 --- a/boards/arm/lpc17xx_40xx/open1788/src/lpc17_40_appinit.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm/lpc17xx_40xx/open1788/src/lpc17_40_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 - -#include -#include - -#include "open1788.h" - -/**************************************************************************** - * 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 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 open1788_bringup(); -#endif -} diff --git a/boards/arm/lpc17xx_40xx/pnev5180b/configs/nsh-cdcecm/defconfig b/boards/arm/lpc17xx_40xx/pnev5180b/configs/nsh-cdcecm/defconfig index 5eec8db41a1fe..351203cf74179 100644 --- a/boards/arm/lpc17xx_40xx/pnev5180b/configs/nsh-cdcecm/defconfig +++ b/boards/arm/lpc17xx_40xx/pnev5180b/configs/nsh-cdcecm/defconfig @@ -29,7 +29,6 @@ CONFIG_NET_ICMP_SOCKET=y CONFIG_NET_SOCKOPTS=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_RAM_SIZE=32768 CONFIG_RAM_START=0x10000000 diff --git a/boards/arm/lpc17xx_40xx/pnev5180b/configs/usbnsh-cdcecm/defconfig b/boards/arm/lpc17xx_40xx/pnev5180b/configs/usbnsh-cdcecm/defconfig index f39c3492dfc49..bd00ce3f1ece7 100644 --- a/boards/arm/lpc17xx_40xx/pnev5180b/configs/usbnsh-cdcecm/defconfig +++ b/boards/arm/lpc17xx_40xx/pnev5180b/configs/usbnsh-cdcecm/defconfig @@ -32,7 +32,6 @@ CONFIG_NET_ICMP_SOCKET=y CONFIG_NET_SOCKOPTS=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_USBCONSOLE=y CONFIG_RAM_SIZE=32768 diff --git a/boards/arm/lpc17xx_40xx/pnev5180b/configs/usbnsh/defconfig b/boards/arm/lpc17xx_40xx/pnev5180b/configs/usbnsh/defconfig index 8d8de346dc2e6..de0b67147154d 100644 --- a/boards/arm/lpc17xx_40xx/pnev5180b/configs/usbnsh/defconfig +++ b/boards/arm/lpc17xx_40xx/pnev5180b/configs/usbnsh/defconfig @@ -20,7 +20,6 @@ CONFIG_LPC17_40_UART0=y CONFIG_LPC17_40_USBDEV=y CONFIG_LPC17_40_USBDEV_NOVBUS=y CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_USBCONSOLE=y CONFIG_RAM_SIZE=32768 CONFIG_RAM_START=0x10000000 diff --git a/boards/arm/lpc17xx_40xx/pnev5180b/src/CMakeLists.txt b/boards/arm/lpc17xx_40xx/pnev5180b/src/CMakeLists.txt index 70090743111b9..a0bd10d993bc7 100644 --- a/boards/arm/lpc17xx_40xx/pnev5180b/src/CMakeLists.txt +++ b/boards/arm/lpc17xx_40xx/pnev5180b/src/CMakeLists.txt @@ -26,10 +26,6 @@ if(CONFIG_ARCH_LEDS) list(APPEND SRCS lpc17_40_leds.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS lpc17_40_appinit.c) -endif() - if(CONFIG_USBDEV_COMPOSITE) list(APPEND SRCS lpc17_40_composite.c) endif() diff --git a/boards/arm/lpc17xx_40xx/pnev5180b/src/Makefile b/boards/arm/lpc17xx_40xx/pnev5180b/src/Makefile index 35d429e1eccfd..5895ab828436a 100644 --- a/boards/arm/lpc17xx_40xx/pnev5180b/src/Makefile +++ b/boards/arm/lpc17xx_40xx/pnev5180b/src/Makefile @@ -28,10 +28,6 @@ ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += lpc17_40_leds.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += lpc17_40_appinit.c -endif - ifeq ($(CONFIG_USBDEV_COMPOSITE),y) CSRCS += lpc17_40_composite.c endif diff --git a/boards/arm/lpc17xx_40xx/pnev5180b/src/lpc17_40_appinit.c b/boards/arm/lpc17xx_40xx/pnev5180b/src/lpc17_40_appinit.c deleted file mode 100644 index 474cd4fc6280a..0000000000000 --- a/boards/arm/lpc17xx_40xx/pnev5180b/src/lpc17_40_appinit.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm/lpc17xx_40xx/pnev5180b/src/lpc17_40_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 - -#include -#include - -#include "pnev5180b.h" - -/**************************************************************************** - * 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 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 pnev5180b_bringup(); -#endif -} diff --git a/boards/arm/lpc17xx_40xx/u-blox-c027/configs/nsh/defconfig b/boards/arm/lpc17xx_40xx/u-blox-c027/configs/nsh/defconfig index 39070c7ff3271..a76e33ef2cdc3 100644 --- a/boards/arm/lpc17xx_40xx/u-blox-c027/configs/nsh/defconfig +++ b/boards/arm/lpc17xx_40xx/u-blox-c027/configs/nsh/defconfig @@ -13,7 +13,6 @@ CONFIG_ARCH_CHIP="lpc17xx_40xx" CONFIG_ARCH_CHIP_LPC1768=y CONFIG_ARCH_CHIP_LPC17XX_40XX=y CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=8079 CONFIG_BUILTIN=y CONFIG_DEBUG_FULLOPT=y @@ -72,7 +71,6 @@ CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_NSH_STRERROR=y diff --git a/boards/arm/lpc17xx_40xx/u-blox-c027/src/CMakeLists.txt b/boards/arm/lpc17xx_40xx/u-blox-c027/src/CMakeLists.txt index f9c98b843e93f..5aa5c7476d2e3 100644 --- a/boards/arm/lpc17xx_40xx/u-blox-c027/src/CMakeLists.txt +++ b/boards/arm/lpc17xx_40xx/u-blox-c027/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS lpc17_40_boot.c lpc17_40_leds.c lpc17_40_ssp.c lpc17_40_dac.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS lpc17_40_appinit.c) -endif() - if(CONFIG_PWM) list(APPEND SRCS lpc17_40_pwm.c) endif() diff --git a/boards/arm/lpc17xx_40xx/u-blox-c027/src/Makefile b/boards/arm/lpc17xx_40xx/u-blox-c027/src/Makefile index 7c5f80d84cf13..09296c1af4e7c 100644 --- a/boards/arm/lpc17xx_40xx/u-blox-c027/src/Makefile +++ b/boards/arm/lpc17xx_40xx/u-blox-c027/src/Makefile @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = lpc17_40_boot.c lpc17_40_leds.c lpc17_40_ssp.c lpc17_40_dac.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += lpc17_40_appinit.c -endif - ifeq ($(CONFIG_PWM),y) CSRCS += lpc17_40_pwm.c endif diff --git a/boards/arm/lpc17xx_40xx/u-blox-c027/src/lpc17_40_appinit.c b/boards/arm/lpc17xx_40xx/u-blox-c027/src/lpc17_40_appinit.c deleted file mode 100644 index 6c1dd8fef5c62..0000000000000 --- a/boards/arm/lpc17xx_40xx/u-blox-c027/src/lpc17_40_appinit.c +++ /dev/null @@ -1,209 +0,0 @@ -/**************************************************************************** - * boards/arm/lpc17xx_40xx/u-blox-c027/src/lpc17_40_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 - -#include -#include -#include - -#include -#include -#include -#include - -#include "lpc17_40_ssp.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Configuration ************************************************************/ - -#ifdef CONFIG_BOARDCTL - -/* PORT and SLOT number probably depend on the board configuration */ - -#ifdef CONFIG_ARCH_BOARD_U_BLOX_C027 -# define NSH_HAVEUSBDEV 1 -# ifdef CONFIG_LPC17_40_SSP0 -# define NSH_HAVEMMCSD 1 -# else -# undef NSH_HAVEMMCSD -# endif -#else -# error "Unrecognized board" -# undef NSH_HAVEUSBDEV -# undef NSH_HAVEMMCSD -#endif - -/* Do we have SPI support for MMC/SD? */ - -#ifdef NSH_HAVEMMCSD -# ifdef CONFIG_NSH_ARCHINIT -# if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 0 -# error "External MMC/SD on SSP0" -# undef CONFIG_NSH_MMCSDSPIPORTNO -# define CONFIG_NSH_MMCSDSPIPORTNO 0 -# endif -# if !defined(CONFIG_NSH_MMCSDSLOTNO) -# error "Use MMC/SD slot 0 by default" -# undef CONFIG_NSH_MMCSDSLOTNO -# define CONFIG_NSH_MMCSDSLOTNO 0 -# endif -# else -# undef CONFIG_NSH_MMCSDSPIPORTNO -# define CONFIG_NSH_MMCSDSPIPORTNO 0 -# undef CONFIG_NSH_MMCSDSLOTNO -# define CONFIG_NSH_MMCSDSLOTNO 0 -# endif -#endif - -/* Can't support USB device features if USB device is not enabled */ - -#ifndef CONFIG_USBDEV -# undef NSH_HAVEUSBDEV -#endif - -/* Can't support MMC/SD features if mountpoints are disabled */ - -#if defined(CONFIG_DISABLE_MOUNTPOINT) -# undef NSH_HAVEMMCSD -#endif - -#ifndef CONFIG_NSH_MMCSDMINOR -# define CONFIG_NSH_MMCSDMINOR 0 -#endif - -/* Currnently MMC/SD support is available only for NSH configurations */ - -#else -# undef NSH_HAVEMMCSD -#endif /* CONFIG_BOARDCTL */ - -/**************************************************************************** - * 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 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) -{ - int ret; - -#ifdef CONFIG_FS_PROCFS - /* mount the proc filesystem */ - - syslog(LOG_INFO, "Mounting procfs to /proc\n"); - - ret = nx_mount(NULL, "/proc", "procfs", 0, NULL); - if (ret < 0) - { - syslog(LOG_ERR, - "ERROR: Failed to mount the PROC filesystem: %d\n", ret); - return ret; - } -#endif - -#ifdef NSH_HAVEMMCSD - struct spi_dev_s *ssp; - - /* Get the SSP port */ - - ssp = lpc17_40_sspbus_initialize(CONFIG_NSH_MMCSDSPIPORTNO); - if (!ssp) - { - syslog(LOG_ERR, "ERROR: Failed to initialize SSP port %d\n", - CONFIG_NSH_MMCSDSPIPORTNO); - return -ENODEV; - } - - syslog(LOG_INFO, "Successfully initialized SSP port %d\n", - CONFIG_NSH_MMCSDSPIPORTNO); - - /* Bind the SSP port to the slot */ - - ret = mmcsd_spislotinitialize(CONFIG_NSH_MMCSDMINOR, - CONFIG_NSH_MMCSDSLOTNO, ssp); - if (ret < 0) - { - syslog(LOG_ERR, - "ERROR: Failed to bind SSP port %d to MMC/SD slot %d: %d\n", - CONFIG_NSH_MMCSDSPIPORTNO, CONFIG_NSH_MMCSDSLOTNO, ret); - return ret; - } - - syslog(LOG_INFO, "Successfully bound SSP port %d to MMC/SD slot %d\n", - CONFIG_NSH_MMCSDSPIPORTNO, CONFIG_NSH_MMCSDSLOTNO); -#endif - -#ifdef CONFIG_PWM - /* Initialize PWM and register the PWM device. */ - - ret = lpc17_40_pwm_setup(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: lpc17_40_pwm_setup() failed: %d\n", ret); - return ret; - } -#endif - -#ifdef CONFIG_ADC - /* Initialize ADC and register the ADC driver. */ - - ret = lpc17_40_adc_setup(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: lpc17_40_adc_setup failed: %d\n", ret); - } -#endif - - UNUSED(ret); - return OK; -} diff --git a/boards/arm/lpc17xx_40xx/u-blox-c027/src/lpc17_40_boot.c b/boards/arm/lpc17xx_40xx/u-blox-c027/src/lpc17_40_boot.c index e038c380bea11..885aeb94c92df 100644 --- a/boards/arm/lpc17xx_40xx/u-blox-c027/src/lpc17_40_boot.c +++ b/boards/arm/lpc17xx_40xx/u-blox-c027/src/lpc17_40_boot.c @@ -28,7 +28,14 @@ #include +#include +#include +#include + #include +#include +#include +#include #include #include "arm_internal.h" @@ -36,6 +43,60 @@ #include "lpc17_40_ssp.h" #include "u-blox-c027.h" +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/* Configuration ************************************************************/ + +#ifdef CONFIG_BOARDCTL + +/* PORT and SLOT number probably depend on the board configuration */ + +#ifdef CONFIG_ARCH_BOARD_U_BLOX_C027 +# define NSH_HAVEUSBDEV 1 +# ifdef CONFIG_LPC17_40_SSP0 +# define NSH_HAVEMMCSD 1 +# else +# undef NSH_HAVEMMCSD +# endif +#else +# error "Unrecognized board" +# undef NSH_HAVEUSBDEV +# undef NSH_HAVEMMCSD +#endif + +/* Do we have SPI support for MMC/SD? */ + +#ifdef NSH_HAVEMMCSD +# undef CONFIG_NSH_MMCSDSPIPORTNO +# define CONFIG_NSH_MMCSDSPIPORTNO 0 +# undef CONFIG_NSH_MMCSDSLOTNO +# define CONFIG_NSH_MMCSDSLOTNO 0 +#endif + +/* Can't support USB device features if USB device is not enabled */ + +#ifndef CONFIG_USBDEV +# undef NSH_HAVEUSBDEV +#endif + +/* Can't support MMC/SD features if mountpoints are disabled */ + +#if defined(CONFIG_DISABLE_MOUNTPOINT) +# undef NSH_HAVEMMCSD +#endif + +#ifndef CONFIG_NSH_MMCSDMINOR +# define CONFIG_NSH_MMCSDMINOR 0 +#endif + +/* Currnently MMC/SD support is available only for NSH configurations */ + +#else +# undef NSH_HAVEMMCSD +#endif /* CONFIG_BOARDCTL */ + /**************************************************************************** * Public Functions ****************************************************************************/ @@ -89,19 +150,79 @@ void lpc17_40_boardinitialize(void) #ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { + int ret; + #ifdef CONFIG_MODEM_U_BLOX lpc17_40_ubxmdm_init(false); #endif -#if 0 - lpc17_40_configgpio(C027_MDMEN | GPIO_VALUE_ZERO); /* Modem disabled */ - lpc17_40_configgpio(C027_MDMRST | GPIO_VALUE_ONE); /* Modem reset on */ - lpc17_40_configgpio(C027_MDMPWR | GPIO_VALUE_ONE); /* Modem power off */ - lpc17_40_configgpio(C027_GPSEN | GPIO_VALUE_ZERO); /* GPS disabled */ - lpc17_40_configgpio(C027_GPSRST | GPIO_VALUE_ONE); /* GPS reset on */ - lpc17_40_configgpio(C027_MDMLVLOE | GPIO_VALUE_ONE); /* UART shifter disabled */ - lpc17_40_configgpio(C027_MDMILVLOE | GPIO_VALUE_ZERO); /* I2C shifter disabled */ - lpc17_40_configgpio(C027_MDMUSBDET | GPIO_VALUE_ZERO); /* USB sense off */ +#ifdef CONFIG_FS_PROCFS + /* mount the proc filesystem */ + + syslog(LOG_INFO, "Mounting procfs to /proc\n"); + + ret = nx_mount(NULL, "/proc", "procfs", 0, NULL); + if (ret < 0) + { + syslog(LOG_ERR, + "ERROR: Failed to mount the PROC filesystem: %d\n", ret); + return; + } +#endif + +#ifdef NSH_HAVEMMCSD + struct spi_dev_s *ssp; + + /* Get the SSP port */ + + ssp = lpc17_40_sspbus_initialize(CONFIG_NSH_MMCSDSPIPORTNO); + if (!ssp) + { + syslog(LOG_ERR, "ERROR: Failed to initialize SSP port %d\n", + CONFIG_NSH_MMCSDSPIPORTNO); + return; + } + + syslog(LOG_INFO, "Successfully initialized SSP port %d\n", + CONFIG_NSH_MMCSDSPIPORTNO); + + /* Bind the SSP port to the slot */ + + ret = mmcsd_spislotinitialize(CONFIG_NSH_MMCSDMINOR, + CONFIG_NSH_MMCSDSLOTNO, ssp); + if (ret < 0) + { + syslog(LOG_ERR, + "ERROR: Failed to bind SSP port %d to MMC/SD slot %d: %d\n", + CONFIG_NSH_MMCSDSPIPORTNO, CONFIG_NSH_MMCSDSLOTNO, ret); + return; + } + + syslog(LOG_INFO, "Successfully bound SSP port %d to MMC/SD slot %d\n", + CONFIG_NSH_MMCSDSPIPORTNO, CONFIG_NSH_MMCSDSLOTNO); +#endif + +#ifdef CONFIG_PWM + /* Initialize PWM and register the PWM device. */ + + ret = lpc17_40_pwm_setup(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: lpc17_40_pwm_setup() failed: %d\n", ret); + return; + } #endif + +#ifdef CONFIG_ADC + /* Initialize ADC and register the ADC driver. */ + + ret = lpc17_40_adc_setup(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: lpc17_40_adc_setup failed: %d\n", ret); + } +#endif + + UNUSED(ret); } #endif /* CONFIG_BOARD_LATE_INITIALIZE */ diff --git a/boards/arm/lpc17xx_40xx/zkit-arm-1769/configs/nsh/defconfig b/boards/arm/lpc17xx_40xx/zkit-arm-1769/configs/nsh/defconfig index 94c74b97118cc..50978a463db5d 100644 --- a/boards/arm/lpc17xx_40xx/zkit-arm-1769/configs/nsh/defconfig +++ b/boards/arm/lpc17xx_40xx/zkit-arm-1769/configs/nsh/defconfig @@ -53,7 +53,6 @@ CONFIG_NET_MAX_LISTENPORTS=8 CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/lpc17xx_40xx/zkit-arm-1769/configs/nxhello/defconfig b/boards/arm/lpc17xx_40xx/zkit-arm-1769/configs/nxhello/defconfig index 4b4dc10b80d97..3fdf00042485e 100644 --- a/boards/arm/lpc17xx_40xx/zkit-arm-1769/configs/nxhello/defconfig +++ b/boards/arm/lpc17xx_40xx/zkit-arm-1769/configs/nxhello/defconfig @@ -61,7 +61,6 @@ CONFIG_NET_MAX_LISTENPORTS=8 CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_LIBRARY=y CONFIG_NSH_READLINE=y diff --git a/boards/arm/lpc17xx_40xx/zkit-arm-1769/src/CMakeLists.txt b/boards/arm/lpc17xx_40xx/zkit-arm-1769/src/CMakeLists.txt index 1872d841cfaab..61cf9aab35f86 100644 --- a/boards/arm/lpc17xx_40xx/zkit-arm-1769/src/CMakeLists.txt +++ b/boards/arm/lpc17xx_40xx/zkit-arm-1769/src/CMakeLists.txt @@ -23,10 +23,6 @@ set(SRCS lpc17_40_boot.c lpc17_40_leds.c lpc17_40_ssp.c lpc17_40_buttons.c lpc17_40_lcd.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS lpc17_40_appinit.c) -endif() - if(CONFIG_USBMSC) list(APPEND SRCS lpc17_40_usbmsc.c) endif() diff --git a/boards/arm/lpc17xx_40xx/zkit-arm-1769/src/Makefile b/boards/arm/lpc17xx_40xx/zkit-arm-1769/src/Makefile index 005bf37eef851..aea6afcba12e4 100644 --- a/boards/arm/lpc17xx_40xx/zkit-arm-1769/src/Makefile +++ b/boards/arm/lpc17xx_40xx/zkit-arm-1769/src/Makefile @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = lpc17_40_boot.c lpc17_40_leds.c lpc17_40_ssp.c lpc17_40_buttons.c lpc17_40_lcd.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += lpc17_40_appinit.c -endif - ifeq ($(CONFIG_USBMSC),y) CSRCS += lpc17_40_usbmsc.c endif diff --git a/boards/arm/lpc17xx_40xx/zkit-arm-1769/src/lpc17_40_appinit.c b/boards/arm/lpc17xx_40xx/zkit-arm-1769/src/lpc17_40_appinit.c deleted file mode 100644 index fd64615de15e7..0000000000000 --- a/boards/arm/lpc17xx_40xx/zkit-arm-1769/src/lpc17_40_appinit.c +++ /dev/null @@ -1,194 +0,0 @@ -/**************************************************************************** - * boards/arm/lpc17xx_40xx/zkit-arm-1769/src/lpc17_40_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 - -#include -#include -#include - -#include -#include -#include - -#include "lpc17_40_spi.h" -#include "zkit-arm-1769.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Configuration ************************************************************/ - -/* PORT and SLOT number probably depend on the board configuration */ - -#ifdef CONFIG_ARCH_BOARD_ZKITARM -# define CONFIG_NSH_HAVEUSBDEV 1 -# ifdef CONFIG_LPC17_40_SPI -# define CONFIG_NSH_HAVEMMCSD 1 -# else -# undef CONFIG_NSH_HAVEMMCSD -# endif -#else -# error "Unrecognized board" -# undef CONFIG_NSH_HAVEUSBDEV -# undef CONFIG_NSH_HAVEMMCSD -#endif - -/* Do we have SPI support for MMC/SD? */ - -#ifdef CONFIG_NSH_HAVEMMCSD -# ifdef CONFIG_NSH_ARCHINIT -# if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 0 -# error "The ZKit-arm MMC/SD is on SPI port 0" -# undef CONFIG_NSH_MMCSDSPIPORTNO -# define CONFIG_NSH_MMCSDSPIPORTNO 0 -# endif -# if !defined(CONFIG_NSH_MMCSDSLOTNO) || CONFIG_NSH_MMCSDSLOTNO != 0 -# error "The ZKit-arm MMC/SD has only one slot (0)" -# undef CONFIG_NSH_MMCSDSLOTNO -# define CONFIG_NSH_MMCSDSLOTNO 0 -# endif -# else -# undef CONFIG_NSH_MMCSDSPIPORTNO -# define CONFIG_NSH_MMCSDSPIPORTNO 0 -# undef CONFIG_NSH_MMCSDSLOTNO -# define CONFIG_NSH_MMCSDSLOTNO 0 -# endif -#endif - -/* Can't support USB device features if USB device is not enabled */ - -#ifndef CONFIG_USBDEV -# undef CONFIG_NSH_HAVEUSBDEV -#endif - -/* Can't support MMC/SD features if mountpoints are disabled */ - -#if defined(CONFIG_DISABLE_MOUNTPOINT) -# undef CONFIG_NSH_HAVEMMCSD -#endif - -#ifndef CONFIG_NSH_MMCSDMINOR -# define CONFIG_NSH_MMCSDMINOR 0 -#endif - -/* Debug ********************************************************************/ - -#ifdef CONFIG_DEBUG_INFO -# define message _info -#else -# define message _err -#endif - -/**************************************************************************** - * 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 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_NSH_HAVEMMCSD - struct spi_dev_s *spi; -#endif - int ret; - -#ifdef CONFIG_NSH_HAVEMMCSD - /* Get the SPI port */ - - spi = lpc17_40_spibus_initialize(CONFIG_NSH_MMCSDSPIPORTNO); - if (!spi) - { - message("board_app_initialize: Failed to initialize SPI port %d\n", - CONFIG_NSH_MMCSDSPIPORTNO); - return -ENODEV; - } - - message("Successfully initialized SPI port %d\n", - CONFIG_NSH_MMCSDSPIPORTNO); - - /* Bind the SPI port to the slot */ - - ret = mmcsd_spislotinitialize(CONFIG_NSH_MMCSDMINOR, - CONFIG_NSH_MMCSDSLOTNO, spi); - if (ret < 0) - { - message("Failed to bind SPI port %d to MMC/SD slot %d: %d\n", - CONFIG_NSH_MMCSDSPIPORTNO, CONFIG_NSH_MMCSDSLOTNO, ret); - return ret; - } - - message("Successfully bound SPI port %d to MMC/SD slot %d\n", - CONFIG_NSH_MMCSDSPIPORTNO, CONFIG_NSH_MMCSDSLOTNO); -#endif - -#ifdef CONFIG_ADC - /* Initialize ADC and register the ADC driver. */ - - ret = zkit_adc_setup(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: zkit_adc_setup failed: %d\n", ret); - } -#endif - -#ifdef CONFIG_CAN - /* Initialize CAN and register the CAN driver. */ - - ret = zkit_can_setup(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: zkit_can_setup failed: %d\n", ret); - } -#endif - - UNUSED(ret); - return OK; -} diff --git a/boards/arm/lpc17xx_40xx/zkit-arm-1769/src/lpc17_40_boot.c b/boards/arm/lpc17xx_40xx/zkit-arm-1769/src/lpc17_40_boot.c index 2a2b444d80194..65ed853594290 100644 --- a/boards/arm/lpc17xx_40xx/zkit-arm-1769/src/lpc17_40_boot.c +++ b/boards/arm/lpc17xx_40xx/zkit-arm-1769/src/lpc17_40_boot.c @@ -28,16 +28,72 @@ #include +#include +#include + #include +#include +#include #include #include "arm_internal.h" +#include "lpc17_40_spi.h" #include "zkit-arm-1769.h" /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ +/* Configuration ************************************************************/ + +/* PORT and SLOT number probably depend on the board configuration */ + +#ifdef CONFIG_ARCH_BOARD_ZKITARM +# define CONFIG_NSH_HAVEUSBDEV 1 +# ifdef CONFIG_LPC17_40_SPI +# define CONFIG_NSH_HAVEMMCSD 1 +# else +# undef CONFIG_NSH_HAVEMMCSD +# endif +#else +# error "Unrecognized board" +# undef CONFIG_NSH_HAVEUSBDEV +# undef CONFIG_NSH_HAVEMMCSD +#endif + +/* Do we have SPI support for MMC/SD? */ + +#ifdef CONFIG_NSH_HAVEMMCSD +# undef CONFIG_NSH_MMCSDSPIPORTNO +# define CONFIG_NSH_MMCSDSPIPORTNO 0 +# undef CONFIG_NSH_MMCSDSLOTNO +# define CONFIG_NSH_MMCSDSLOTNO 0 +#endif + +/* Can't support USB device features if USB device is not enabled */ + +#ifndef CONFIG_USBDEV +# undef CONFIG_NSH_HAVEUSBDEV +#endif + +/* Can't support MMC/SD features if mountpoints are disabled */ + +#if defined(CONFIG_DISABLE_MOUNTPOINT) +# undef CONFIG_NSH_HAVEMMCSD +#endif + +#ifndef CONFIG_NSH_MMCSDMINOR +# define CONFIG_NSH_MMCSDMINOR 0 +#endif + +/* Debug ********************************************************************/ + +#ifdef CONFIG_DEBUG_INFO +# define message _info +#else +# define message _err +#endif + /**************************************************************************** * Private Functions ****************************************************************************/ @@ -78,3 +134,77 @@ void lpc17_40_boardinitialize(void) board_autoled_initialize(); #endif } + +/**************************************************************************** + * 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ +#ifdef CONFIG_NSH_HAVEMMCSD + struct spi_dev_s *spi; +#endif + int ret; + +#ifdef CONFIG_NSH_HAVEMMCSD + /* Get the SPI port */ + + spi = lpc17_40_spibus_initialize(CONFIG_NSH_MMCSDSPIPORTNO); + if (!spi) + { + message("Failed to initialize SPI port %d\n", + CONFIG_NSH_MMCSDSPIPORTNO); + return; + } + + message("Successfully initialized SPI port %d\n", + CONFIG_NSH_MMCSDSPIPORTNO); + + /* Bind the SPI port to the slot */ + + ret = mmcsd_spislotinitialize(CONFIG_NSH_MMCSDMINOR, + CONFIG_NSH_MMCSDSLOTNO, spi); + if (ret < 0) + { + message("Failed to bind SPI port %d to MMC/SD slot %d: %d\n", + CONFIG_NSH_MMCSDSPIPORTNO, CONFIG_NSH_MMCSDSLOTNO, ret); + return; + } + + message("Successfully bound SPI port %d to MMC/SD slot %d\n", + CONFIG_NSH_MMCSDSPIPORTNO, CONFIG_NSH_MMCSDSLOTNO); +#endif + +#ifdef CONFIG_ADC + /* Initialize ADC and register the ADC driver. */ + + ret = zkit_adc_setup(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: zkit_adc_setup failed: %d\n", ret); + } +#endif + +#ifdef CONFIG_CAN + /* Initialize CAN and register the CAN driver. */ + + ret = zkit_can_setup(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: zkit_can_setup failed: %d\n", ret); + } +#endif + + UNUSED(ret); +} +#endif diff --git a/boards/arm/lpc214x/mcu123-lpc214x/configs/nsh/defconfig b/boards/arm/lpc214x/mcu123-lpc214x/configs/nsh/defconfig index 0964dbfe92242..5aa15fc7f53aa 100644 --- a/boards/arm/lpc214x/mcu123-lpc214x/configs/nsh/defconfig +++ b/boards/arm/lpc214x/mcu123-lpc214x/configs/nsh/defconfig @@ -24,7 +24,6 @@ CONFIG_IDLETHREAD_STACKSIZE=2048 CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=64 CONFIG_MMCSD=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_MMCSDSPIPORTNO=1 CONFIG_NSH_READLINE=y diff --git a/boards/arm/lpc214x/mcu123-lpc214x/src/Makefile b/boards/arm/lpc214x/mcu123-lpc214x/src/Makefile index 6ed825db26cf3..f6e9dc20d511c 100644 --- a/boards/arm/lpc214x/mcu123-lpc214x/src/Makefile +++ b/boards/arm/lpc214x/mcu123-lpc214x/src/Makefile @@ -22,11 +22,7 @@ include $(TOPDIR)/Make.defs -CSRCS = lpc2148_spi1.c lpc2148_leds.c - -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += lpc2148_appinit.c -endif +CSRCS = lpc2148_spi1.c lpc2148_leds.c lpc2148_boardinit.c ifeq ($(CONFIG_USBMSC),y) CSRCS += lpc2148_usbmsc.c diff --git a/boards/arm/lpc214x/mcu123-lpc214x/src/lpc2148_appinit.c b/boards/arm/lpc214x/mcu123-lpc214x/src/lpc2148_boardinit.c similarity index 69% rename from boards/arm/lpc214x/mcu123-lpc214x/src/lpc2148_appinit.c rename to boards/arm/lpc214x/mcu123-lpc214x/src/lpc2148_boardinit.c index 91ddfab8a52b9..655f2ca2ef92a 100644 --- a/boards/arm/lpc214x/mcu123-lpc214x/src/lpc2148_appinit.c +++ b/boards/arm/lpc214x/mcu123-lpc214x/src/lpc2148_boardinit.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/lpc214x/mcu123-lpc214x/src/lpc2148_appinit.c + * boards/arm/lpc214x/mcu123-lpc214x/src/lpc2148_boardinit.c * * SPDX-License-Identifier: Apache-2.0 * @@ -47,31 +47,12 @@ /* PORT and SLOT number depend on the board configuration */ -#ifdef CONFIG_NSH_ARCHINIT -# if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 1 -# error "The LPC214x MMC/SD is on SPI1" -# undef CONFIG_NSH_MMCSDSPIPORTNO -# define CONFIG_NSH_MMCSDSPIPORTNO 1 -# endif - -# if !defined(CONFIG_NSH_MMCSDSLOTNO) || CONFIG_NSH_MMCSDSLOTNO != 0 -# error "The LPC214x MMC/SD is on SPI1" -# undef CONFIG_NSH_MMCSDSLOTNO -# define CONFIG_NSH_MMCSDSLOTNO 0 -# endif - -# ifndef CONFIG_NSH_MMCSDMINOR -# define CONFIG_NSH_MMCSDMINOR 0 -# endif - -#else # undef CONFIG_NSH_MMCSDSPIPORTNO # define CONFIG_NSH_MMCSDSPIPORTNO 1 # undef CONFIG_NSH_MMCSDSLOTNO # define CONFIG_NSH_MMCSDSLOTNO 0 # undef CONFIG_NSH_MMCSDMINOR # define CONFIG_NSH_MMCSDMINOR 0 -#endif /* Can't support USB features if USB is not enabled */ @@ -90,29 +71,20 @@ ****************************************************************************/ /**************************************************************************** - * Name: board_app_initialize + * Name: board_late_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. + * 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. * ****************************************************************************/ -int board_app_initialize(uintptr_t arg) +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) { #ifdef HAVE_MMCSD struct spi_dev_s *spi; @@ -128,7 +100,7 @@ int board_app_initialize(uintptr_t arg) { syslog(LOG_ERR, "ERROR: Failed to initialize SPI port %d\n", CONFIG_NSH_MMCSDSPIPORTNO); - return -ENODEV; + return; } syslog(LOG_INFO, "Successfully initialized SPI port %d\n", @@ -146,12 +118,11 @@ int board_app_initialize(uintptr_t arg) syslog(LOG_ERR, "ERROR: Failed to bind SPI port %d to MMC/SD slot %d: %d\n", CONFIG_NSH_MMCSDSPIPORTNO, CONFIG_NSH_MMCSDSLOTNO, ret); - return ret; + return; } syslog(LOG_INFO, "Successfully bound SPI port %d to MMC/SD slot %d\n", CONFIG_NSH_MMCSDSPIPORTNO, CONFIG_NSH_MMCSDSLOTNO); #endif - - return OK; } +#endif diff --git a/boards/arm/lpc214x/mcu123-lpc214x/src/lpc2148_composite.c b/boards/arm/lpc214x/mcu123-lpc214x/src/lpc2148_composite.c index b92ed6b3ebaa1..953f17565d2e7 100644 --- a/boards/arm/lpc214x/mcu123-lpc214x/src/lpc2148_composite.c +++ b/boards/arm/lpc214x/mcu123-lpc214x/src/lpc2148_composite.c @@ -337,8 +337,7 @@ static void *board_composite1_connect(int port) int board_composite_initialize(int port) { /* If system/composite is built as an NSH command, then SD slot should - * already have been initialized in board_app_initialize() - * (see lpc2148_appinit.c). + * already have been initialized. * In this case, there is nothing further to be done here. * * NOTE: CONFIG_NSH_BUILTIN_APPS is not a fool-proof indication that NSH diff --git a/boards/arm/lpc214x/zp214xpa/src/Makefile b/boards/arm/lpc214x/zp214xpa/src/Makefile index 32ef274cbc86f..ed9c1ce2d60df 100644 --- a/boards/arm/lpc214x/zp214xpa/src/Makefile +++ b/boards/arm/lpc214x/zp214xpa/src/Makefile @@ -22,12 +22,10 @@ include $(TOPDIR)/Make.defs +CSRCS += lpc2148_boardinit.c + ifeq ($(CONFIG_LCD_UG2864AMBAG01),y) CSRCS += lpc2148_ug2864ambag01.c lpc2148_spi1.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += lpc2148_appinit.c -endif - include $(TOPDIR)/boards/Board.mk diff --git a/boards/arm/lpc214x/zp214xpa/src/lpc2148_appinit.c b/boards/arm/lpc214x/zp214xpa/src/lpc2148_boardinit.c similarity index 63% rename from boards/arm/lpc214x/zp214xpa/src/lpc2148_appinit.c rename to boards/arm/lpc214x/zp214xpa/src/lpc2148_boardinit.c index 1411f4d83dc91..06020ea8e7428 100644 --- a/boards/arm/lpc214x/zp214xpa/src/lpc2148_appinit.c +++ b/boards/arm/lpc214x/zp214xpa/src/lpc2148_boardinit.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/lpc214x/zp214xpa/src/lpc2148_appinit.c + * boards/arm/lpc214x/zp214xpa/src/lpc2148_boardinit.c * * SPDX-License-Identifier: Apache-2.0 * @@ -26,6 +26,10 @@ #include +#include + +#include +#include #include #include @@ -33,38 +37,25 @@ # include #endif -#ifdef CONFIG_BOARDCTL - /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** - * Name: board_app_initialize + * Name: board_late_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 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. + * 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. * ****************************************************************************/ -int board_app_initialize(uintptr_t arg) +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) { int ret; @@ -89,7 +80,5 @@ int board_app_initialize(uintptr_t arg) #endif UNUSED(ret); - return OK; } - -#endif /* CONFIG_BOARDCTL */ +#endif diff --git a/boards/arm/lpc2378/olimex-lpc2378/src/Makefile b/boards/arm/lpc2378/olimex-lpc2378/src/Makefile index 30070b0d14461..8cddb1ec4eab5 100644 --- a/boards/arm/lpc2378/olimex-lpc2378/src/Makefile +++ b/boards/arm/lpc2378/olimex-lpc2378/src/Makefile @@ -24,8 +24,4 @@ include $(TOPDIR)/Make.defs CSRCS = lpc2378_leds.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += lpc2378_appinit.c -endif - include $(TOPDIR)/boards/Board.mk diff --git a/boards/arm/lpc2378/olimex-lpc2378/src/lpc2378_appinit.c b/boards/arm/lpc2378/olimex-lpc2378/src/lpc2378_appinit.c deleted file mode 100644 index acc83eb258003..0000000000000 --- a/boards/arm/lpc2378/olimex-lpc2378/src/lpc2378_appinit.c +++ /dev/null @@ -1,113 +0,0 @@ -/**************************************************************************** - * boards/arm/lpc2378/olimex-lpc2378/src/lpc2378_appinit.c - * - * SPDX-License-Identifier: BSD-3-Clause - * SPDX-FileCopyrightText: 2010 Rommel Marcelo. All rights reserved. - * SPDX-FileCopyrightText: 2010, 2014 Gregory Nutt. All rights reserved. - * SPDX-FileContributor: Gregory Nutt - * SPDX-FileContributor: Rommel Marcelo - * - * 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. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * 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. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include -#include - -#include -#include -#include - -#include -#include -#include - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Configuration ************************************************************/ - -/* PORT and SLOT number probably depend on the board configuration */ - -#undef NSH_HAVEUSBDEV -#undef NSH_HAVEMMCSD - -/* Can't support USB features if USB is not enabled */ - -#ifndef CONFIG_USBDEV -# undef NSH_HAVEUSBDEV -#endif - -/* Can't support MMC/SD features if mountpoints are disabled */ - -#if defined(CONFIG_DISABLE_MOUNTPOINT) -# undef NSH_HAVEMMCSD -#endif - -#ifndef CONFIG_NSH_MMCSDMINOR -# define CONFIG_NSH_MMCSDMINOR 0 -#endif - -/**************************************************************************** - * 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 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) -{ - return OK; -} diff --git a/boards/arm/lpc2378/olimex-lpc2378/src/lpc2378_leds.c b/boards/arm/lpc2378/olimex-lpc2378/src/lpc2378_leds.c index 7dc3d8d193638..41ae3763a8ddf 100644 --- a/boards/arm/lpc2378/olimex-lpc2378/src/lpc2378_leds.c +++ b/boards/arm/lpc2378/olimex-lpc2378/src/lpc2378_leds.c @@ -128,4 +128,23 @@ void lpc2378_statledon(void) putled8(STATLED, FIO1SET2_OFFSET); } +/**************************************************************************** + * 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ +} +#endif /* CONFIG_BOARD_LATE_INITIALIZE */ + #endif /* CONFIG_ARCH_LEDS */ diff --git a/boards/arm/lpc31xx/ea3131/configs/nsh/defconfig b/boards/arm/lpc31xx/ea3131/configs/nsh/defconfig index 25ba942d15deb..40e2b658689f4 100644 --- a/boards/arm/lpc31xx/ea3131/configs/nsh/defconfig +++ b/boards/arm/lpc31xx/ea3131/configs/nsh/defconfig @@ -24,7 +24,6 @@ CONFIG_HOST_WINDOWS=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=64 CONFIG_LPC31_UART=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/lpc31xx/ea3131/configs/pgnsh/defconfig b/boards/arm/lpc31xx/ea3131/configs/pgnsh/defconfig index 0aa1a3e572c51..f027c3841bfc7 100644 --- a/boards/arm/lpc31xx/ea3131/configs/pgnsh/defconfig +++ b/boards/arm/lpc31xx/ea3131/configs/pgnsh/defconfig @@ -29,7 +29,6 @@ CONFIG_M25P_SPIMODE=3 CONFIG_MMCSD=y CONFIG_MTD=y CONFIG_MTD_M25P=y -CONFIG_NSH_ARCHINIT=y CONFIG_PAGING_BLOCKINGFILL=y CONFIG_PAGING_NDATA=32 CONFIG_PAGING_NPPAGED=96 diff --git a/boards/arm/lpc31xx/ea3131/src/Makefile b/boards/arm/lpc31xx/ea3131/src/Makefile index efe2c22936cb1..6e7e97b429d77 100644 --- a/boards/arm/lpc31xx/ea3131/src/Makefile +++ b/boards/arm/lpc31xx/ea3131/src/Makefile @@ -40,10 +40,6 @@ ifeq ($(CONFIG_LPC31_SPI),y) CSRCS += lpc31_spi.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += lpc31_appinit.c -endif - ifeq ($(CONFIG_LEGACY_PAGING),y) CSRCS += lpc31_fillpage.c endif diff --git a/boards/arm/lpc31xx/ea3131/src/lpc31_appinit.c b/boards/arm/lpc31xx/ea3131/src/lpc31_appinit.c deleted file mode 100644 index 1a43cded550d9..0000000000000 --- a/boards/arm/lpc31xx/ea3131/src/lpc31_appinit.c +++ /dev/null @@ -1,156 +0,0 @@ -/**************************************************************************** - * boards/arm/lpc31xx/ea3131/src/lpc31_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 - -#include -#include -#include -#include - -#include - -#ifdef CONFIG_LPC31_MCI -# include -# include -#endif - -#include "lpc31.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Configuration ************************************************************/ - -/* PORT and SLOT number probably depend on the board configuration */ - -#ifdef CONFIG_ARCH_BOARD_EA3131 -# define NSH_HAVEUSBDEV 1 -# define NSH_HAVEMMCSD 1 -# if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != 0 -# error "Only one MMC/SD slot" -# undef CONFIG_NSH_MMCSDSLOTNO -# endif -# ifndef CONFIG_NSH_MMCSDSLOTNO -# define CONFIG_NSH_MMCSDSLOTNO 0 -# endif -#else - /* Add configuration for new LPC31XX boards here */ - -# error "Unrecognized LPC31XX board" -# undef NSH_HAVEUSBDEV -# undef NSH_HAVEMMCSD -#endif - -/* Can't support USB features if USB is not enabled */ - -#ifndef CONFIG_USBDEV -# undef NSH_HAVEUSBDEV -#endif - -/* Can't support MMC/SD features if mountpoints are disabled or if SDIO - * support is not enabled. - */ - -#if defined(CONFIG_DISABLE_MOUNTPOINT) || !defined(CONFIG_LPC31_MCI) -# undef NSH_HAVEMMCSD -#endif - -#ifndef CONFIG_NSH_MMCSDMINOR -# define CONFIG_NSH_MMCSDMINOR 0 -#endif - -/**************************************************************************** - * 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 NSH_HAVEMMCSD - struct sdio_dev_s *sdio; - int ret; - - /* First, get an instance of the SDIO interface */ - - syslog(LOG_INFO, "Initializing SDIO slot %d\n", - CONFIG_NSH_MMCSDSLOTNO); - - sdio = sdio_initialize(CONFIG_NSH_MMCSDSLOTNO); - if (!sdio) - { - syslog(LOG_ERR, "ERROR: Failed to initialize SDIO slot %d\n", - CONFIG_NSH_MMCSDSLOTNO); - return -ENODEV; - } - - /* Now bind the SPI interface to the MMC/SD driver */ - - syslog(LOG_INFO, "Bind SDIO to the MMC/SD driver, minor=%d\n", - CONFIG_NSH_MMCSDMINOR); - - ret = mmcsd_slotinitialize(CONFIG_NSH_MMCSDMINOR, sdio); - if (ret != OK) - { - syslog(LOG_ERR, - "ERROR: Failed to bind SDIO to the MMC/SD driver: %d\n", ret); - return ret; - } - - syslog(LOG_INFO, "Successfully bound SDIO to the MMC/SD driver\n"); - - /* Then let's guess and say that there is a card in the slot. - * I need to check to see if the LPC313X10E-EVAL board supports a GPIO to - * detect if there is a card in the slot. - */ - - sdio_mediachange(sdio, true); -#endif - return OK; -} diff --git a/boards/arm/lpc31xx/ea3131/src/lpc31_boot.c b/boards/arm/lpc31xx/ea3131/src/lpc31_boot.c index 349dfbc5ba59b..d64581e69fb2f 100644 --- a/boards/arm/lpc31xx/ea3131/src/lpc31_boot.c +++ b/boards/arm/lpc31xx/ea3131/src/lpc31_boot.c @@ -28,9 +28,19 @@ #include +#include +#include +#include +#include + #include #include +#ifdef CONFIG_LPC31_MCI +# include +# include +#endif + #include "arm_internal.h" #include "lpc31.h" #include "ea3131.h" @@ -39,6 +49,46 @@ * Pre-processor Definitions ****************************************************************************/ +/* Configuration ************************************************************/ + +/* PORT and SLOT number probably depend on the board configuration */ + +#ifdef CONFIG_ARCH_BOARD_EA3131 +# define NSH_HAVEUSBDEV 1 +# define NSH_HAVEMMCSD 1 +# if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != 0 +# error "Only one MMC/SD slot" +# undef CONFIG_NSH_MMCSDSLOTNO +# endif +# ifndef CONFIG_NSH_MMCSDSLOTNO +# define CONFIG_NSH_MMCSDSLOTNO 0 +# endif +#else + /* Add configuration for new LPC31XX boards here */ + +# error "Unrecognized LPC31XX board" +# undef NSH_HAVEUSBDEV +# undef NSH_HAVEMMCSD +#endif + +/* Can't support USB features if USB is not enabled */ + +#ifndef CONFIG_USBDEV +# undef NSH_HAVEUSBDEV +#endif + +/* Can't support MMC/SD features if mountpoints are disabled or if SDIO + * support is not enabled. + */ + +#if defined(CONFIG_DISABLE_MOUNTPOINT) || !defined(CONFIG_LPC31_MCI) +# undef NSH_HAVEMMCSD +#endif + +#ifndef CONFIG_NSH_MMCSDMINOR +# define CONFIG_NSH_MMCSDMINOR 0 +#endif + /**************************************************************************** * Private Functions ****************************************************************************/ @@ -117,3 +167,61 @@ void lpc31_boardinitialize(void) } #endif } + +/**************************************************************************** + * 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ +#ifdef NSH_HAVEMMCSD + struct sdio_dev_s *sdio; + int ret; + + /* First, get an instance of the SDIO interface */ + + syslog(LOG_INFO, "Initializing SDIO slot %d\n", + CONFIG_NSH_MMCSDSLOTNO); + + sdio = sdio_initialize(CONFIG_NSH_MMCSDSLOTNO); + if (!sdio) + { + syslog(LOG_ERR, "ERROR: Failed to initialize SDIO slot %d\n", + CONFIG_NSH_MMCSDSLOTNO); + return; + } + + /* Now bind the SPI interface to the MMC/SD driver */ + + syslog(LOG_INFO, "Bind SDIO to the MMC/SD driver, minor=%d\n", + CONFIG_NSH_MMCSDMINOR); + + ret = mmcsd_slotinitialize(CONFIG_NSH_MMCSDMINOR, sdio); + if (ret != OK) + { + syslog(LOG_ERR, + "ERROR: Failed to bind SDIO to the MMC/SD driver: %d\n", ret); + return; + } + + syslog(LOG_INFO, "Successfully bound SDIO to the MMC/SD driver\n"); + + /* Then let's guess and say that there is a card in the slot. + * I need to check to see if the LPC313X10E-EVAL board supports a GPIO to + * detect if there is a card in the slot. + */ + + sdio_mediachange(sdio, true); +#endif +} +#endif /* CONFIG_BOARD_LATE_INITIALIZE */ diff --git a/boards/arm/lpc31xx/ea3152/src/Makefile b/boards/arm/lpc31xx/ea3152/src/Makefile index b30ac1953b2c0..426d1031deaf6 100644 --- a/boards/arm/lpc31xx/ea3152/src/Makefile +++ b/boards/arm/lpc31xx/ea3152/src/Makefile @@ -35,9 +35,6 @@ endif ifeq ($(CONFIG_LPC31_SPI),y) CSRCS += lpc31_spi.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += lpc31_appinit.c -endif ifeq ($(CONFIG_LEGACY_PAGING),y) CSRCS += lpc31_fillpage.c endif diff --git a/boards/arm/lpc31xx/ea3152/src/lpc31_appinit.c b/boards/arm/lpc31xx/ea3152/src/lpc31_appinit.c deleted file mode 100644 index fd6d4a2745246..0000000000000 --- a/boards/arm/lpc31xx/ea3152/src/lpc31_appinit.c +++ /dev/null @@ -1,156 +0,0 @@ -/**************************************************************************** - * boards/arm/lpc31xx/ea3152/src/lpc31_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 - -#include -#include -#include -#include - -#include - -#ifdef CONFIG_LPC31_MCI -# include -# include -#endif - -#include "lpc31.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Configuration ************************************************************/ - -/* PORT and SLOT number probably depend on the board configuration */ - -#ifdef CONFIG_ARCH_BOARD_EA3152 -# define NSH_HAVEUSBDEV 1 -# define NSH_HAVEMMCSD 1 -# if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != 0 -# error "Only one MMC/SD slot" -# undef CONFIG_NSH_MMCSDSLOTNO -# endif -# ifndef CONFIG_NSH_MMCSDSLOTNO -# define CONFIG_NSH_MMCSDSLOTNO 0 -# endif -#else - /* Add configuration for new LPC31XX boards here */ - -# error "Unrecognized LPC31XX board" -# undef NSH_HAVEUSBDEV -# undef NSH_HAVEMMCSD -#endif - -/* Can't support USB features if USB is not enabled */ - -#ifndef CONFIG_USBDEV -# undef NSH_HAVEUSBDEV -#endif - -/* Can't support MMC/SD features if mountpoints are disabled or if SDIO - * support is not enabled. - */ - -#if defined(CONFIG_DISABLE_MOUNTPOINT) || !defined(CONFIG_LPC31_MCI) -# undef NSH_HAVEMMCSD -#endif - -#ifndef CONFIG_NSH_MMCSDMINOR -# define CONFIG_NSH_MMCSDMINOR 0 -#endif - -/**************************************************************************** - * 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 NSH_HAVEMMCSD - struct sdio_dev_s *sdio; - int ret; - - /* First, get an instance of the SDIO interface */ - - syslog(LOG_INFO, "Initializing SDIO slot %d\n", - CONFIG_NSH_MMCSDSLOTNO); - - sdio = sdio_initialize(CONFIG_NSH_MMCSDSLOTNO); - if (!sdio) - { - syslog(LOG_ERR, "ERROR: Failed to initialize SDIO slot %d\n", - CONFIG_NSH_MMCSDSLOTNO); - return -ENODEV; - } - - /* Now bind the SPI interface to the MMC/SD driver */ - - syslog(LOG_INFO, "Bind SDIO to the MMC/SD driver, minor=%d\n", - CONFIG_NSH_MMCSDMINOR); - - ret = mmcsd_slotinitialize(CONFIG_NSH_MMCSDMINOR, sdio); - if (ret != OK) - { - syslog(LOG_ERR, - "ERROR: Failed to bind SDIO to the MMC/SD driver: %d\n", ret); - return ret; - } - - syslog(LOG_INFO, "Successfully bound SDIO to the MMC/SD driver\n"); - - /* Then let's guess and say that there is a card in the slot. - * I need to check to see if the LPC313X10E-EVAL board supports a GPIO to - * detect if there is a card in the slot. - */ - - sdio_mediachange(sdio, true); -#endif - return OK; -} diff --git a/boards/arm/lpc31xx/ea3152/src/lpc31_boot.c b/boards/arm/lpc31xx/ea3152/src/lpc31_boot.c index 36dca5b029dbc..a8f5a53efbc0b 100644 --- a/boards/arm/lpc31xx/ea3152/src/lpc31_boot.c +++ b/boards/arm/lpc31xx/ea3152/src/lpc31_boot.c @@ -28,9 +28,19 @@ #include +#include +#include +#include +#include + #include #include +#ifdef CONFIG_LPC31_MCI +# include +# include +#endif + #include "arm_internal.h" #include "lpc31.h" #include "ea3152.h" @@ -39,6 +49,46 @@ * Pre-processor Definitions ****************************************************************************/ +/* Configuration ************************************************************/ + +/* PORT and SLOT number probably depend on the board configuration */ + +#ifdef CONFIG_ARCH_BOARD_EA3152 +# define NSH_HAVEUSBDEV 1 +# define NSH_HAVEMMCSD 1 +# if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != 0 +# error "Only one MMC/SD slot" +# undef CONFIG_NSH_MMCSDSLOTNO +# endif +# ifndef CONFIG_NSH_MMCSDSLOTNO +# define CONFIG_NSH_MMCSDSLOTNO 0 +# endif +#else + /* Add configuration for new LPC31XX boards here */ + +# error "Unrecognized LPC31XX board" +# undef NSH_HAVEUSBDEV +# undef NSH_HAVEMMCSD +#endif + +/* Can't support USB features if USB is not enabled */ + +#ifndef CONFIG_USBDEV +# undef NSH_HAVEUSBDEV +#endif + +/* Can't support MMC/SD features if mountpoints are disabled or if SDIO + * support is not enabled. + */ + +#if defined(CONFIG_DISABLE_MOUNTPOINT) || !defined(CONFIG_LPC31_MCI) +# undef NSH_HAVEMMCSD +#endif + +#ifndef CONFIG_NSH_MMCSDMINOR +# define CONFIG_NSH_MMCSDMINOR 0 +#endif + /**************************************************************************** * Private Functions ****************************************************************************/ @@ -104,3 +154,61 @@ void lpc31_boardinitialize(void) } #endif } + +/**************************************************************************** + * 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ +#ifdef NSH_HAVEMMCSD + struct sdio_dev_s *sdio; + int ret; + + /* First, get an instance of the SDIO interface */ + + syslog(LOG_INFO, "Initializing SDIO slot %d\n", + CONFIG_NSH_MMCSDSLOTNO); + + sdio = sdio_initialize(CONFIG_NSH_MMCSDSLOTNO); + if (!sdio) + { + syslog(LOG_ERR, "ERROR: Failed to initialize SDIO slot %d\n", + CONFIG_NSH_MMCSDSLOTNO); + return; + } + + /* Now bind the SPI interface to the MMC/SD driver */ + + syslog(LOG_INFO, "Bind SDIO to the MMC/SD driver, minor=%d\n", + CONFIG_NSH_MMCSDMINOR); + + ret = mmcsd_slotinitialize(CONFIG_NSH_MMCSDMINOR, sdio); + if (ret != OK) + { + syslog(LOG_ERR, + "ERROR: Failed to bind SDIO to the MMC/SD driver: %d\n", ret); + return; + } + + syslog(LOG_INFO, "Successfully bound SDIO to the MMC/SD driver\n"); + + /* Then let's guess and say that there is a card in the slot. + * I need to check to see if the LPC313X10E-EVAL board supports a GPIO to + * detect if there is a card in the slot. + */ + + sdio_mediachange(sdio, true); +#endif +} +#endif /* CONFIG_BOARD_LATE_INITIALIZE */ diff --git a/boards/arm/lpc31xx/olimex-lpc-h3131/configs/nsh/defconfig b/boards/arm/lpc31xx/olimex-lpc-h3131/configs/nsh/defconfig index 4df803ce23038..bde9c16cdf867 100644 --- a/boards/arm/lpc31xx/olimex-lpc-h3131/configs/nsh/defconfig +++ b/boards/arm/lpc31xx/olimex-lpc-h3131/configs/nsh/defconfig @@ -28,7 +28,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=1536 CONFIG_LINE_MAX=64 CONFIG_LPC31_UART=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y CONFIG_POSIX_SPAWN_DEFAULT_STACKSIZE=1536 diff --git a/boards/arm/lpc31xx/olimex-lpc-h3131/src/Makefile b/boards/arm/lpc31xx/olimex-lpc-h3131/src/Makefile index 984ef980ea1b8..5d0a210b8c582 100644 --- a/boards/arm/lpc31xx/olimex-lpc-h3131/src/Makefile +++ b/boards/arm/lpc31xx/olimex-lpc-h3131/src/Makefile @@ -40,10 +40,6 @@ ifeq ($(CONFIG_LPC31_MCI),y) CSRCS += lpc31_mmcsd.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += lpc31_appinit.c -endif - ifeq ($(CONFIG_LPC31_USBOTG),y) ifeq ($(CONFIG_USBHOST),y) CSRCS += lpc31_usbhost.c diff --git a/boards/arm/lpc31xx/olimex-lpc-h3131/src/lpc31_appinit.c b/boards/arm/lpc31xx/olimex-lpc-h3131/src/lpc31_appinit.c deleted file mode 100644 index 4011683149f64..0000000000000 --- a/boards/arm/lpc31xx/olimex-lpc-h3131/src/lpc31_appinit.c +++ /dev/null @@ -1,136 +0,0 @@ -/**************************************************************************** - * boards/arm/lpc31xx/olimex-lpc-h3131/src/lpc31_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 - -#include -#include -#include -#include - -#include - -#ifdef CONFIG_USBMONITOR -# include -#endif - -#include "lpc31.h" - -#include "lpc_h3131.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Configuration ************************************************************/ - -/* PORT and SLOT number probably depend on the board configuration */ - -#ifdef HAVE_MMCSD -# if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != 0 -# error "Only one MMC/SD slot" -# undef CONFIG_NSH_MMCSDSLOTNO -# endif -# ifndef CONFIG_NSH_MMCSDSLOTNO -# define CONFIG_NSH_MMCSDSLOTNO 0 -# endif -#endif - -/**************************************************************************** - * 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 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) -{ -#if defined(HAVE_MMCSD) || defined(HAVE_USBHOST) - int ret; -#endif - -#ifdef HAVE_MMCSD - /* Create the SDIO-based MMC/SD device */ - - syslog(LOG_INFO, "Create the MMC/SD device\n"); - ret = lpc31_mmcsd_initialize(CONFIG_NSH_MMCSDSLOTNO); - if (!sdio) - { - syslog(LOG_ERR, "ERROR: Failed to initialize SDIO slot %d\n", - CONFIG_NSH_MMCSDSLOTNO, CONFIG_NSH_MMCSDMINOR); - return -ENODEV; - } -#endif - -#ifdef HAVE_USBHOST - /* Initialize USB host operation. lpc31_usbhost_initialize() starts a - * thread will monitor for USB connection and disconnection events. - */ - - syslog(LOG_INFO, "Start USB host services\n"); - ret = lpc31_usbhost_initialize(); - if (ret != OK) - { - syslog(LOG_ERR, "ERROR: Failed to start USB host services: %d\n", ret); - return ret; - } -#endif - -#ifdef HAVE_USBMONITOR - /* Start the USB Monitor */ - - syslog(LOG_ERR, "ERROR: Failed to start the USB monitor\n"); - ret = usbmonitor_start(); - if (ret != OK) - { - syslog(LOG_ERR, "ERROR: Failed to start USB monitor: %d\n", ret); - } -#endif - - return OK; -} diff --git a/boards/arm/lpc31xx/olimex-lpc-h3131/src/lpc31_boot.c b/boards/arm/lpc31xx/olimex-lpc-h3131/src/lpc31_boot.c index b5b7139f1ab12..844ef0c71946a 100644 --- a/boards/arm/lpc31xx/olimex-lpc-h3131/src/lpc31_boot.c +++ b/boards/arm/lpc31xx/olimex-lpc-h3131/src/lpc31_boot.c @@ -28,9 +28,18 @@ #include +#include +#include +#include +#include + #include #include +#ifdef CONFIG_USBMONITOR +# include +#endif + #include "arm_internal.h" #include "lpc31.h" #include "lpc_h3131.h" @@ -39,6 +48,20 @@ * Pre-processor Definitions ****************************************************************************/ +/* Configuration ************************************************************/ + +/* PORT and SLOT number probably depend on the board configuration */ + +#ifdef HAVE_MMCSD +# if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != 0 +# error "Only one MMC/SD slot" +# undef CONFIG_NSH_MMCSDSLOTNO +# endif +# ifndef CONFIG_NSH_MMCSDSLOTNO +# define CONFIG_NSH_MMCSDSLOTNO 0 +# endif +#endif + /**************************************************************************** * Private Functions ****************************************************************************/ @@ -103,3 +126,63 @@ void lpc31_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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ +#if defined(HAVE_MMCSD) || defined(HAVE_USBHOST) + int ret; +#endif + +#ifdef HAVE_MMCSD + /* Create the SDIO-based MMC/SD device */ + + syslog(LOG_INFO, "Create the MMC/SD device\n"); + ret = lpc31_mmcsd_initialize(CONFIG_NSH_MMCSDSLOTNO); + if (!sdio) + { + syslog(LOG_ERR, "ERROR: Failed to initialize SDIO slot %d\n", + CONFIG_NSH_MMCSDSLOTNO, CONFIG_NSH_MMCSDMINOR); + return; + } +#endif + +#ifdef HAVE_USBHOST + /* Initialize USB host operation. lpc31_usbhost_initialize() starts a + * thread will monitor for USB connection and disconnection events. + */ + + syslog(LOG_INFO, "Start USB host services\n"); + ret = lpc31_usbhost_initialize(); + if (ret != OK) + { + syslog(LOG_ERR, "ERROR: Failed to start USB host services: %d\n", ret); + return; + } +#endif + +#ifdef HAVE_USBMONITOR + /* Start the USB Monitor */ + + syslog(LOG_ERR, "ERROR: Failed to start the USB monitor\n"); + ret = usbmonitor_start(); + if (ret != OK) + { + syslog(LOG_ERR, "ERROR: Failed to start USB monitor: %d\n", ret); + } +#endif +} +#endif /* CONFIG_BOARD_LATE_INITIALIZE */ diff --git a/boards/arm/lpc43xx/bambino-200e/configs/knsh/defconfig b/boards/arm/lpc43xx/bambino-200e/configs/knsh/defconfig index 235e7c0c01606..91b3c42cc8e44 100644 --- a/boards/arm/lpc43xx/bambino-200e/configs/knsh/defconfig +++ b/boards/arm/lpc43xx/bambino-200e/configs/knsh/defconfig @@ -32,7 +32,6 @@ CONFIG_LPC43_TMR0=y CONFIG_LPC43_UART1=y CONFIG_LPC43_USB0=y CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y CONFIG_NUTTX_USERSPACE=0x14040000 diff --git a/boards/arm/lpc43xx/bambino-200e/configs/max31855/defconfig b/boards/arm/lpc43xx/bambino-200e/configs/max31855/defconfig index 5d55c23c49437..8784aa5df5de0 100644 --- a/boards/arm/lpc43xx/bambino-200e/configs/max31855/defconfig +++ b/boards/arm/lpc43xx/bambino-200e/configs/max31855/defconfig @@ -16,7 +16,6 @@ CONFIG_ARCH_CHIP_LPC4330FBD144=y CONFIG_ARCH_CHIP_LPC43XX=y CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_STDARG_H=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=18535 CONFIG_BUILTIN=y CONFIG_CDCACM=y @@ -35,7 +34,6 @@ CONFIG_LPC43_TMR0=y CONFIG_LPC43_UART1=y CONFIG_LPC43_USB0=y CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/lpc43xx/bambino-200e/configs/netnsh/defconfig b/boards/arm/lpc43xx/bambino-200e/configs/netnsh/defconfig index 015921471b9bc..4d29541bf900f 100644 --- a/boards/arm/lpc43xx/bambino-200e/configs/netnsh/defconfig +++ b/boards/arm/lpc43xx/bambino-200e/configs/netnsh/defconfig @@ -61,7 +61,6 @@ CONFIG_NET_TCP=y CONFIG_NET_TCP_PREALLOC_CONNS=40 CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/lpc43xx/bambino-200e/configs/nsh/defconfig b/boards/arm/lpc43xx/bambino-200e/configs/nsh/defconfig index bc68e3caed555..bf88f2532641a 100644 --- a/boards/arm/lpc43xx/bambino-200e/configs/nsh/defconfig +++ b/boards/arm/lpc43xx/bambino-200e/configs/nsh/defconfig @@ -31,7 +31,6 @@ CONFIG_LPC43_TMR0=y CONFIG_LPC43_UART1=y CONFIG_LPC43_USB0=y CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/lpc43xx/bambino-200e/configs/usbnsh/defconfig b/boards/arm/lpc43xx/bambino-200e/configs/usbnsh/defconfig index f6ea6b4241aa9..13c0b4953e59c 100644 --- a/boards/arm/lpc43xx/bambino-200e/configs/usbnsh/defconfig +++ b/boards/arm/lpc43xx/bambino-200e/configs/usbnsh/defconfig @@ -29,7 +29,6 @@ CONFIG_LPC43_TMR0=y CONFIG_LPC43_UART1=y CONFIG_LPC43_USB0=y CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/lpc43xx/bambino-200e/src/CMakeLists.txt b/boards/arm/lpc43xx/bambino-200e/src/CMakeLists.txt index 99068b8c63675..563589c289f83 100644 --- a/boards/arm/lpc43xx/bambino-200e/src/CMakeLists.txt +++ b/boards/arm/lpc43xx/bambino-200e/src/CMakeLists.txt @@ -26,10 +26,6 @@ if(CONFIG_SENSORS_MAX31855) list(APPEND SRCS lpc43_max31855.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS lpc43_appinit.c) -endif() - if(CONFIG_ARCH_LEDS) list(APPEND SRCS lpc43_autoleds.c) else() diff --git a/boards/arm/lpc43xx/bambino-200e/src/Makefile b/boards/arm/lpc43xx/bambino-200e/src/Makefile index 23389df441168..f5ac7fd064436 100644 --- a/boards/arm/lpc43xx/bambino-200e/src/Makefile +++ b/boards/arm/lpc43xx/bambino-200e/src/Makefile @@ -28,10 +28,6 @@ ifeq ($(CONFIG_SENSORS_MAX31855),y) CSRCS += lpc43_max31855.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += lpc43_appinit.c -endif - ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += lpc43_autoleds.c else diff --git a/boards/arm/lpc43xx/bambino-200e/src/lpc43_appinit.c b/boards/arm/lpc43xx/bambino-200e/src/lpc43_appinit.c deleted file mode 100644 index 3993589e60954..0000000000000 --- a/boards/arm/lpc43xx/bambino-200e/src/lpc43_appinit.c +++ /dev/null @@ -1,202 +0,0 @@ -/**************************************************************************** - * boards/arm/lpc43xx/bambino-200e/src/lpc43_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 - -#include -#include -#include - -#include - -#include "chip.h" - -#ifdef CONFIG_LPC43_SPIFI -# include -# include "lpc43_spifi.h" - -# ifdef CONFIG_SPFI_NXFFS -# include -# include -# endif -#endif - -#ifdef CONFIG_LPC43_SDMMC -# include -# include -# include "lpc43_sdmmc.h" -#endif - -#include "bambino-200e.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Configuration ************************************************************/ - -#ifndef CONFIG_SPIFI_DEVNO -# define CONFIG_SPIFI_DEVNO 0 -#endif - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: nsh_spifi_initialize - * - * Description: - * Make the SPIFI (or part of it) into a block driver that can hold a - * file system. - * - ****************************************************************************/ - -#ifdef CONFIG_LPC43_SPIFI -static int nsh_spifi_initialize(void) -{ - struct mtd_dev_s *mtd; - int ret; - - /* Initialize the SPIFI interface and create the MTD driver instance */ - - mtd = lpc43_spifi_initialize(); - if (!mtd) - { - ferr("ERROR: lpc43_spifi_initialize failed\n"); - return -ENODEV; - } - -#ifndef CONFIG_SPFI_NXFFS - /* Register the MTD driver */ - - char path[32]; - snprintf(path, sizeof(path), "/dev/mtdblock%d", CONFIG_SPIFI_DEVNO); - ret = register_mtddriver(path, mtd, 0755, NULL); - if (ret < 0) - { - ferr("ERROR: Failed to register the MTD driver %s, ret %d\n", - path, ret); - return ret; - } -#else - /* Initialize to provide NXFFS on the MTD interface */ - - ret = nxffs_initialize(mtd); - if (ret < 0) - { - ferr("ERROR: NXFFS initialization failed: %d\n", ret); - return ret; - } - - /* Mount the file system at /mnt/spifi */ - - ret = nx_mount(NULL, "/mnt/spifi", "nxffs", 0, NULL); - if (ret < 0) - { - ferr("ERROR: Failed to mount the NXFFS volume: %d\n", ret); - return ret; - } -#endif - - return OK; -} -#endif - -/**************************************************************************** - * 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 HAVE_MMCSD - struct sdio_dev_s *sdmmc; -#endif - int ret = 0; - -#ifdef CONFIG_LPC43_SPIFI - /* Initialize the SPIFI block device */ - - ret = nsh_spifi_initialize(); - if (ret != OK) - { - syslog(LOG_ERR, "ERROR: nsh_spifi_initialize() failed: %d\n", ret); - } -#endif - -#ifdef HAVE_MMCSD - /* Get an instance of the SDIO interface */ - - sdmmc = lpc43_sdmmc_initialize(0); - if (!sdmmc) - { - syslog(LOG_ERR, "ERROR: Failed to initialize SD/MMC\n"); - } - else - { - /* Bind the SDIO interface to the MMC/SD driver */ - - ret = mmcsd_slotinitialize(MMCSD_MINOR, sdmmc); - if (ret != OK) - { - syslog(LOG_ERR, - "ERROR: Failed to bind SDIO to the MMC/SD driver: %d\n", - ret); - } - } -#endif - -#ifdef CONFIG_TIMER - /* Registers the timers */ - - lpc43_timerinitialize(); -#endif - - return ret; -} diff --git a/boards/arm/lpc43xx/bambino-200e/src/lpc43_boot.c b/boards/arm/lpc43xx/bambino-200e/src/lpc43_boot.c index e49cd74ad6452..70f95ee2cff36 100644 --- a/boards/arm/lpc43xx/bambino-200e/src/lpc43_boot.c +++ b/boards/arm/lpc43xx/bambino-200e/src/lpc43_boot.c @@ -28,11 +28,42 @@ #include +#include +#include +#include + #include #include +#ifdef CONFIG_LPC43_SPIFI +# include +# include "lpc43_spifi.h" + +# ifdef CONFIG_SPFI_NXFFS +# include +# include +# endif +#endif + +#ifdef CONFIG_LPC43_SDMMC +# include +# include +# include "lpc43_sdmmc.h" +#endif + #include "arm_internal.h" #include "bambino-200e.h" +#include "chip.h" + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/* Configuration ************************************************************/ + +#ifndef CONFIG_SPIFI_DEVNO +# define CONFIG_SPIFI_DEVNO 0 +#endif /**************************************************************************** * Private Types @@ -50,6 +81,70 @@ enum ssp_channel_e SSP1 }; +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: nsh_spifi_initialize + * + * Description: + * Make the SPIFI (or part of it) into a block driver that can hold a + * file system. + * + ****************************************************************************/ + +#ifdef CONFIG_LPC43_SPIFI +static int nsh_spifi_initialize(void) +{ + struct mtd_dev_s *mtd; + int ret; + + /* Initialize the SPIFI interface and create the MTD driver instance */ + + mtd = lpc43_spifi_initialize(); + if (!mtd) + { + ferr("ERROR: lpc43_spifi_initialize failed\n"); + return -ENODEV; + } + +#ifndef CONFIG_SPFI_NXFFS + /* Register the MTD driver */ + + char path[32]; + snprintf(path, sizeof(path), "/dev/mtdblock%d", CONFIG_SPIFI_DEVNO); + ret = register_mtddriver(path, mtd, 0755, NULL); + if (ret < 0) + { + ferr("ERROR: Failed to register the MTD driver %s, ret %d\n", + path, ret); + return ret; + } +#else + /* Initialize to provide NXFFS on the MTD interface */ + + ret = nxffs_initialize(mtd); + if (ret < 0) + { + ferr("ERROR: NXFFS initialization failed: %d\n", ret); + return ret; + } + + /* Mount the file system at /mnt/spifi */ + + ret = nx_mount(NULL, "/mnt/spifi", "nxffs", 0, NULL); + if (ret < 0) + { + ferr("ERROR: Failed to mount the NXFFS volume: %d\n", ret); + return ret; + } +#endif + + return OK; +} +#endif + /**************************************************************************** * Public Functions ****************************************************************************/ @@ -103,10 +198,14 @@ void lpc43_boardinitialize(void) #ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { + int ret = 0; +#ifdef HAVE_MMCSD + struct sdio_dev_s *sdmmc; +#endif + /* Configure max31855 driver for SSP0 or SSP1 */ #if defined(CONFIG_SENSORS_MAX31855) - int ret; #if defined(CONFIG_LPC43_SSP0) ret = lpc43_max31855initialize("/dev/temp0", SSP0, DEVID0); @@ -136,5 +235,45 @@ void board_late_initialize(void) } #endif #endif + +#ifdef CONFIG_LPC43_SPIFI + /* Initialize the SPIFI block device */ + + ret = nsh_spifi_initialize(); + if (ret != OK) + { + syslog(LOG_ERR, "ERROR: nsh_spifi_initialize() failed: %d\n", ret); + } +#endif + +#ifdef HAVE_MMCSD + /* Get an instance of the SDIO interface */ + + sdmmc = lpc43_sdmmc_initialize(0); + if (!sdmmc) + { + syslog(LOG_ERR, "ERROR: Failed to initialize SD/MMC\n"); + } + else + { + /* Bind the SDIO interface to the MMC/SD driver */ + + ret = mmcsd_slotinitialize(MMCSD_MINOR, sdmmc); + if (ret != OK) + { + syslog(LOG_ERR, + "ERROR: Failed to bind SDIO to the MMC/SD driver: %d\n", + ret); + } + } +#endif + +#ifdef CONFIG_TIMER + /* Registers the timers */ + + lpc43_timerinitialize(); +#endif + + UNUSED(ret); } #endif diff --git a/boards/arm/lpc43xx/lpc4330-xplorer/configs/nsh/defconfig b/boards/arm/lpc43xx/lpc4330-xplorer/configs/nsh/defconfig index 2381729c3fd30..c93b4afa24e5b 100644 --- a/boards/arm/lpc43xx/lpc4330-xplorer/configs/nsh/defconfig +++ b/boards/arm/lpc43xx/lpc4330-xplorer/configs/nsh/defconfig @@ -25,7 +25,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=64 CONFIG_LPC43_USART0=y CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/lpc43xx/lpc4330-xplorer/src/CMakeLists.txt b/boards/arm/lpc43xx/lpc4330-xplorer/src/CMakeLists.txt index 1d2f2561dbe83..034d77773d3ed 100644 --- a/boards/arm/lpc43xx/lpc4330-xplorer/src/CMakeLists.txt +++ b/boards/arm/lpc43xx/lpc4330-xplorer/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS lpc43_boot.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS lpc43_appinit.c) -endif() - if(CONFIG_ARCH_LEDS) list(APPEND SRCS lpc43_autoleds.c) else() diff --git a/boards/arm/lpc43xx/lpc4330-xplorer/src/Makefile b/boards/arm/lpc43xx/lpc4330-xplorer/src/Makefile index cbdc736ec360f..5315fbb8d8c01 100644 --- a/boards/arm/lpc43xx/lpc4330-xplorer/src/Makefile +++ b/boards/arm/lpc43xx/lpc4330-xplorer/src/Makefile @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = lpc43_boot.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += lpc43_appinit.c -endif - ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += lpc43_autoleds.c else diff --git a/boards/arm/lpc43xx/lpc4330-xplorer/src/lpc43_appinit.c b/boards/arm/lpc43xx/lpc4330-xplorer/src/lpc43_appinit.c deleted file mode 100644 index 834f9497fb67b..0000000000000 --- a/boards/arm/lpc43xx/lpc4330-xplorer/src/lpc43_appinit.c +++ /dev/null @@ -1,155 +0,0 @@ -/**************************************************************************** - * boards/arm/lpc43xx/lpc4330-xplorer/src/lpc43_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 - -#include -#include -#include - -#include - -#include "chip.h" - -#ifdef CONFIG_LPC43_SPIFI -# include -# include "lpc43_spifi.h" - -# ifdef CONFIG_SPFI_NXFFS -# include -# include -# endif -#endif - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Configuration ************************************************************/ - -#ifndef CONFIG_SPIFI_DEVNO -# define CONFIG_SPIFI_DEVNO 0 -#endif - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: nsh_spifi_initialize - * - * Description: - * Make the SPIFI (or part of it) into a block driver that can hold a - * file system. - * - ****************************************************************************/ - -#ifdef CONFIG_LPC43_SPIFI -static int nsh_spifi_initialize(void) -{ - struct mtd_dev_s *mtd; - int ret; - - /* Initialize the SPIFI interface and create the MTD driver instance */ - - mtd = lpc43_spifi_initialize(); - if (!mtd) - { - ferr("ERROR: lpc43_spifi_initialize failed\n"); - return -ENODEV; - } - -#ifndef CONFIG_SPFI_NXFFS - /* Register the MTD driver */ - - char path[32]; - snprintf(path, sizeof(path), "/dev/mtdblock%d", CONFIG_SPIFI_DEVNO); - ret = register_mtddriver(path, mtd, 0755, NULL); - if (ret < 0) - { - ferr("ERROR: Failed to register the MTD driver %s, ret %d\n", - path, ret); - return ret; - } -#else - /* Initialize to provide NXFFS on the MTD interface */ - - ret = nxffs_initialize(mtd); - if (ret < 0) - { - ferr("ERROR: NXFFS initialization failed: %d\n", ret); - return ret; - } - - /* Mount the file system at /mnt/spifi */ - - ret = nx_mount(NULL, "/mnt/spifi", "nxffs", 0, NULL); - if (ret < 0) - { - ferr("ERROR: Failed to mount the NXFFS volume: %d\n", ret); - return ret; - } -#endif - - return OK; -} -#else -# define nsh_spifi_initialize() (OK) -#endif - -/**************************************************************************** - * 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) -{ - /* Initialize the SPIFI block device */ - - return nsh_spifi_initialize(); -} diff --git a/boards/arm/lpc43xx/lpc4330-xplorer/src/lpc43_boot.c b/boards/arm/lpc43xx/lpc4330-xplorer/src/lpc43_boot.c index 8087ca9c7fd5a..1e33e0c9559f2 100644 --- a/boards/arm/lpc43xx/lpc4330-xplorer/src/lpc43_boot.c +++ b/boards/arm/lpc43xx/lpc4330-xplorer/src/lpc43_boot.c @@ -28,20 +28,104 @@ #include +#include +#include +#include + #include #include #include "arm_internal.h" #include "lpc4330-xplorer.h" +#include "chip.h" + +#ifdef CONFIG_LPC43_SPIFI +# include +# include "lpc43_spifi.h" + +# ifdef CONFIG_SPFI_NXFFS +# include +# include +# endif +#endif + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ +/* Configuration ************************************************************/ + +#ifndef CONFIG_SPIFI_DEVNO +# define CONFIG_SPIFI_DEVNO 0 +#endif + /**************************************************************************** * Private Functions ****************************************************************************/ +/**************************************************************************** + * Name: nsh_spifi_initialize + * + * Description: + * Make the SPIFI (or part of it) into a block driver that can hold a + * file system. + * + ****************************************************************************/ + +#ifdef CONFIG_LPC43_SPIFI +static int nsh_spifi_initialize(void) +{ + struct mtd_dev_s *mtd; + int ret; + + /* Initialize the SPIFI interface and create the MTD driver instance */ + + mtd = lpc43_spifi_initialize(); + if (!mtd) + { + ferr("ERROR: lpc43_spifi_initialize failed\n"); + return -ENODEV; + } + +#ifndef CONFIG_SPFI_NXFFS + /* Register the MTD driver */ + + char path[32]; + snprintf(path, sizeof(path), "/dev/mtdblock%d", CONFIG_SPIFI_DEVNO); + ret = register_mtddriver(path, mtd, 0755, NULL); + if (ret < 0) + { + ferr("ERROR: Failed to register the MTD driver %s, ret %d\n", + path, ret); + return ret; + } +#else + /* Initialize to provide NXFFS on the MTD interface */ + + ret = nxffs_initialize(mtd); + if (ret < 0) + { + ferr("ERROR: NXFFS initialization failed: %d\n", ret); + return ret; + } + + /* Mount the file system at /mnt/spifi */ + + ret = nx_mount(NULL, "/mnt/spifi", "nxffs", 0, NULL); + if (ret < 0) + { + ferr("ERROR: Failed to mount the NXFFS volume: %d\n", ret); + return ret; + } +#endif + + return OK; +} +#else +# define nsh_spifi_initialize() +#endif + /**************************************************************************** * Public Functions ****************************************************************************/ @@ -65,3 +149,26 @@ void lpc43_boardinitialize(void) board_autoled_initialize(); #endif } + +/**************************************************************************** + * 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ + /* Initialize the SPIFI block device */ + + nsh_spifi_initialize(); +} +#endif diff --git a/boards/arm/lpc43xx/lpc4337-ws/configs/nsh/defconfig b/boards/arm/lpc43xx/lpc4337-ws/configs/nsh/defconfig index c14ee9482e905..70005b7277f9f 100644 --- a/boards/arm/lpc43xx/lpc4337-ws/configs/nsh/defconfig +++ b/boards/arm/lpc43xx/lpc4337-ws/configs/nsh/defconfig @@ -45,7 +45,6 @@ CONFIG_LPC43_SSP1=y CONFIG_LPC43_USART2=y CONFIG_LPC43_USB0=y CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/lpc43xx/lpc4337-ws/src/CMakeLists.txt b/boards/arm/lpc43xx/lpc4337-ws/src/CMakeLists.txt index 2ce331a9d83fd..168db0f9b5540 100644 --- a/boards/arm/lpc43xx/lpc4337-ws/src/CMakeLists.txt +++ b/boards/arm/lpc43xx/lpc4337-ws/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS lpc43_boot.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS lpc43_appinit.c) -endif() - if(CONFIG_LPC43_ADC0) list(APPEND SRCS lpc43_adc.c) endif() diff --git a/boards/arm/lpc43xx/lpc4337-ws/src/Makefile b/boards/arm/lpc43xx/lpc4337-ws/src/Makefile index c1a804b79cde5..038e5b07d7662 100644 --- a/boards/arm/lpc43xx/lpc4337-ws/src/Makefile +++ b/boards/arm/lpc43xx/lpc4337-ws/src/Makefile @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = lpc43_boot.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += lpc43_appinit.c -endif - ifeq ($(CONFIG_LPC43_ADC0),y) CSRCS += lpc43_adc.c endif diff --git a/boards/arm/lpc43xx/lpc4337-ws/src/lpc43_appinit.c b/boards/arm/lpc43xx/lpc4337-ws/src/lpc43_appinit.c deleted file mode 100644 index 9c16715e50f68..0000000000000 --- a/boards/arm/lpc43xx/lpc4337-ws/src/lpc43_appinit.c +++ /dev/null @@ -1,144 +0,0 @@ -/**************************************************************************** - * boards/arm/lpc43xx/lpc4337-ws/src/lpc43_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 - -#include -#include -#include - -#include -#include - -#include "chip.h" -#include "lpc43_i2c.h" -#include "lpc4337-ws.h" - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: lpc43_i2c_register - * - * Description: - * Register one I2C drivers for the I2C tool. - * - ****************************************************************************/ - -#ifdef HAVE_I2CTOOL -static void lpc43_i2c_register(int bus) -{ - struct i2c_master_s *i2c; - int ret; - - i2c = lpc43_i2cbus_initialize(bus); - if (i2c == NULL) - { - _err("ERROR: Failed to get I2C%d interface\n", bus); - } - else - { - ret = i2c_register(i2c, bus); - if (ret < 0) - { - _err("ERROR: Failed to register I2C%d driver: %d\n", bus, ret); - lpc43_i2cbus_uninitialize(i2c); - } - } -} -#endif - -/**************************************************************************** - * Name: lpc43_i2ctool - * - * Description: - * Register I2C drivers for the I2C tool. - * - ****************************************************************************/ - -#ifdef HAVE_I2CTOOL -static void lpc43_i2ctool(void) -{ -#ifdef CONFIG_LPC43_I2C0 - lpc43_i2c_register(0); -#endif -#ifdef CONFIG_STM32_I2C1 - lpc43_i2c_register(1); -#endif -} -#else -# define lpc43_i2ctool() -#endif - -/**************************************************************************** - * 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) -{ - int ret; - - /* Register I2C drivers on behalf of the I2C tool */ - - lpc43_i2ctool(); - -#ifdef CONFIG_LPC43_ADC0 - /* Initialize ADC and register the ADC driver. */ - - ret = lpc43_adc_setup(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: lpc43_adc_setup failed: %d\n", ret); - } -#endif - - UNUSED(ret); - return OK; -} diff --git a/boards/arm/lpc43xx/lpc4337-ws/src/lpc43_boot.c b/boards/arm/lpc43xx/lpc4337-ws/src/lpc43_boot.c index 992add3a91da5..fbe13657ba5bd 100644 --- a/boards/arm/lpc43xx/lpc4337-ws/src/lpc43_boot.c +++ b/boards/arm/lpc43xx/lpc4337-ws/src/lpc43_boot.c @@ -28,11 +28,73 @@ #include +#include +#include + #include #include +#include #include "arm_internal.h" #include "lpc4337-ws.h" +#include "lpc43_i2c.h" + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: lpc43_i2c_register + * + * Description: + * Register one I2C drivers for the I2C tool. + * + ****************************************************************************/ + +#ifdef HAVE_I2CTOOL +static void lpc43_i2c_register(int bus) +{ + struct i2c_master_s *i2c; + int ret; + + i2c = lpc43_i2cbus_initialize(bus); + if (i2c == NULL) + { + _err("ERROR: Failed to get I2C%d interface\n", bus); + } + else + { + ret = i2c_register(i2c, bus); + if (ret < 0) + { + _err("ERROR: Failed to register I2C%d driver: %d\n", bus, ret); + lpc43_i2cbus_uninitialize(i2c); + } + } +} +#endif + +/**************************************************************************** + * Name: lpc43_i2ctool + * + * Description: + * Register I2C drivers for the I2C tool. + * + ****************************************************************************/ + +#ifdef HAVE_I2CTOOL +static void lpc43_i2ctool(void) +{ +#ifdef CONFIG_LPC43_I2C0 + lpc43_i2c_register(0); +#endif +#ifdef CONFIG_STM32_I2C1 + lpc43_i2c_register(1); +#endif +} +#else +# define lpc43_i2ctool() +#endif /**************************************************************************** * Public Functions @@ -52,3 +114,40 @@ void lpc43_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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ + int ret; + + /* Register I2C drivers on behalf of the I2C tool */ + + lpc43_i2ctool(); + +#ifdef CONFIG_LPC43_ADC0 + /* Initialize ADC and register the ADC driver. */ + + ret = lpc43_adc_setup(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: lpc43_adc_setup failed: %d\n", ret); + } +#endif + + UNUSED(ret); +} +#endif diff --git a/boards/arm/lpc43xx/lpc4357-evb/configs/nsh/defconfig b/boards/arm/lpc43xx/lpc4357-evb/configs/nsh/defconfig index cf8d800194620..9b539527a96b8 100644 --- a/boards/arm/lpc43xx/lpc4357-evb/configs/nsh/defconfig +++ b/boards/arm/lpc43xx/lpc4357-evb/configs/nsh/defconfig @@ -25,7 +25,6 @@ CONFIG_LINE_MAX=64 CONFIG_LPC43_BOOT_FLASHA=y CONFIG_LPC43_USART0=y CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/lpc43xx/lpc4357-evb/src/CMakeLists.txt b/boards/arm/lpc43xx/lpc4357-evb/src/CMakeLists.txt index 02b9c39a4a748..fafe257adbe97 100644 --- a/boards/arm/lpc43xx/lpc4357-evb/src/CMakeLists.txt +++ b/boards/arm/lpc43xx/lpc4357-evb/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS lpc43_boot.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS lpc43_appinit.c) -endif() - if(CONFIG_ARCH_LEDS) list(APPEND SRCS lpc43_autoleds.c) else() diff --git a/boards/arm/lpc43xx/lpc4357-evb/src/Makefile b/boards/arm/lpc43xx/lpc4357-evb/src/Makefile index 600ca5b5a7ca9..1a77032944de9 100644 --- a/boards/arm/lpc43xx/lpc4357-evb/src/Makefile +++ b/boards/arm/lpc43xx/lpc4357-evb/src/Makefile @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = lpc43_boot.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += lpc43_appinit.c -endif - ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += lpc43_autoleds.c else diff --git a/boards/arm/lpc43xx/lpc4357-evb/src/lpc43_appinit.c b/boards/arm/lpc43xx/lpc4357-evb/src/lpc43_appinit.c deleted file mode 100644 index 7bf5fdb903dab..0000000000000 --- a/boards/arm/lpc43xx/lpc4357-evb/src/lpc43_appinit.c +++ /dev/null @@ -1,155 +0,0 @@ -/**************************************************************************** - * boards/arm/lpc43xx/lpc4357-evb/src/lpc43_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 - -#include -#include -#include - -#include - -#include "chip.h" - -#ifdef CONFIG_LPC43_SPIFI -# include -# include "lpc43_spifi.h" - -# ifdef CONFIG_SPFI_NXFFS -# include -# include -# endif -#endif - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Configuration ************************************************************/ - -#ifndef CONFIG_SPIFI_DEVNO -# define CONFIG_SPIFI_DEVNO 0 -#endif - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: nsh_spifi_initialize - * - * Description: - * Make the SPIFI (or part of it) into a block driver that can hold a - * file system. - * - ****************************************************************************/ - -#ifdef CONFIG_LPC43_SPIFI -static int nsh_spifi_initialize(void) -{ - struct mtd_dev_s *mtd; - int ret; - - /* Initialize the SPIFI interface and create the MTD driver instance */ - - mtd = lpc43_spifi_initialize(); - if (!mtd) - { - ferr("ERROR: lpc43_spifi_initialize failed\n"); - return -ENODEV; - } - -#ifndef CONFIG_SPFI_NXFFS - /* Register the MTD driver */ - - char path[32]; - snprintf(path, sizeof(path), "/dev/mtdblock%d", CONFIG_SPIFI_DEVNO); - ret = register_mtddriver(path, mtd, 0755, NULL); - if (ret < 0) - { - ferr("ERROR: Failed to register the MTD driver %s, ret %d\n", - path, ret); - return ret; - } -#else - /* Initialize to provide NXFFS on the MTD interface */ - - ret = nxffs_initialize(mtd); - if (ret < 0) - { - ferr("ERROR: NXFFS initialization failed: %d\n", ret); - return ret; - } - - /* Mount the file system at /mnt/spifi */ - - ret = nx_mount(NULL, "/mnt/spifi", "nxffs", 0, NULL); - if (ret < 0) - { - ferr("ERROR: Failed to mount the NXFFS volume: %d\n", ret); - return ret; - } -#endif - - return OK; -} -#else -# define nsh_spifi_initialize() (OK) -#endif - -/**************************************************************************** - * 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) -{ - /* Initialize the SPIFI block device */ - - return nsh_spifi_initialize(); -} diff --git a/boards/arm/lpc43xx/lpc4357-evb/src/lpc43_boot.c b/boards/arm/lpc43xx/lpc4357-evb/src/lpc43_boot.c index cffb488910a48..427468167d6eb 100644 --- a/boards/arm/lpc43xx/lpc4357-evb/src/lpc43_boot.c +++ b/boards/arm/lpc43xx/lpc4357-evb/src/lpc43_boot.c @@ -28,20 +28,102 @@ #include +#include +#include + #include #include #include "arm_internal.h" #include "lpc4357-evb.h" +#include "chip.h" + +#ifdef CONFIG_LPC43_SPIFI +# include +# include "lpc43_spifi.h" + +# ifdef CONFIG_SPFI_NXFFS +# include +# include +# endif +#endif /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ +/* Configuration ************************************************************/ + +#ifndef CONFIG_SPIFI_DEVNO +# define CONFIG_SPIFI_DEVNO 0 +#endif + /**************************************************************************** * Private Functions ****************************************************************************/ +/**************************************************************************** + * Name: nsh_spifi_initialize + * + * Description: + * Make the SPIFI (or part of it) into a block driver that can hold a + * file system. + * + ****************************************************************************/ + +#ifdef CONFIG_LPC43_SPIFI +static int nsh_spifi_initialize(void) +{ + struct mtd_dev_s *mtd; + int ret; + + /* Initialize the SPIFI interface and create the MTD driver instance */ + + mtd = lpc43_spifi_initialize(); + if (!mtd) + { + ferr("ERROR: lpc43_spifi_initialize failed\n"); + return -ENODEV; + } + +#ifndef CONFIG_SPFI_NXFFS + /* Register the MTD driver */ + + char path[32]; + snprintf(path, sizeof(path), "/dev/mtdblock%d", CONFIG_SPIFI_DEVNO); + ret = register_mtddriver(path, mtd, 0755, NULL); + if (ret < 0) + { + ferr("ERROR: Failed to register the MTD driver %s, ret %d\n", + path, ret); + return ret; + } +#else + /* Initialize to provide NXFFS on the MTD interface */ + + ret = nxffs_initialize(mtd); + if (ret < 0) + { + ferr("ERROR: NXFFS initialization failed: %d\n", ret); + return ret; + } + + /* Mount the file system at /mnt/spifi */ + + ret = nx_mount(NULL, "/mnt/spifi", "nxffs", 0, NULL); + if (ret < 0) + { + ferr("ERROR: Failed to mount the NXFFS volume: %d\n", ret); + return ret; + } +#endif + + return OK; +} +#else +# define nsh_spifi_initialize() +#endif + /**************************************************************************** * Public Functions ****************************************************************************/ @@ -65,3 +147,26 @@ void lpc43_boardinitialize(void) board_autoled_initialize(); #endif } + +/**************************************************************************** + * 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ + /* Initialize the SPIFI block device */ + + nsh_spifi_initialize(); +} +#endif diff --git a/boards/arm/lpc43xx/lpc4370-link2/configs/nsh/defconfig b/boards/arm/lpc43xx/lpc4370-link2/configs/nsh/defconfig index 550f0a7d1086e..c42de1ef0c949 100644 --- a/boards/arm/lpc43xx/lpc4370-link2/configs/nsh/defconfig +++ b/boards/arm/lpc43xx/lpc4370-link2/configs/nsh/defconfig @@ -42,7 +42,6 @@ CONFIG_LPC43_SSP1=y CONFIG_LPC43_USART2=y CONFIG_LPC43_USB0=y CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/lpc43xx/lpc4370-link2/src/CMakeLists.txt b/boards/arm/lpc43xx/lpc4370-link2/src/CMakeLists.txt index fe6e5d6048962..866a35f00b81a 100644 --- a/boards/arm/lpc43xx/lpc4370-link2/src/CMakeLists.txt +++ b/boards/arm/lpc43xx/lpc4370-link2/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS lpc43_boot.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS lpc43_appinit.c) -endif() - if(CONFIG_ARCH_LEDS) list(APPEND SRCS lpc43_autoleds.c) else() diff --git a/boards/arm/lpc43xx/lpc4370-link2/src/Makefile b/boards/arm/lpc43xx/lpc4370-link2/src/Makefile index d5c93b7aeeafc..2597a600ca105 100644 --- a/boards/arm/lpc43xx/lpc4370-link2/src/Makefile +++ b/boards/arm/lpc43xx/lpc4370-link2/src/Makefile @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = lpc43_boot.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += lpc43_appinit.c -endif - ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += lpc43_autoleds.c else diff --git a/boards/arm/lpc43xx/lpc4370-link2/src/lpc43_appinit.c b/boards/arm/lpc43xx/lpc4370-link2/src/lpc43_appinit.c deleted file mode 100644 index bc4ed6b486aba..0000000000000 --- a/boards/arm/lpc43xx/lpc4370-link2/src/lpc43_appinit.c +++ /dev/null @@ -1,143 +0,0 @@ -/**************************************************************************** - * boards/arm/lpc43xx/lpc4370-link2/src/lpc43_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 - -#include -#include -#include - -#include -#include - -#include "lpc43_i2c.h" -#include "chip.h" - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: lpc43_i2c_register - * - * Description: - * Register one I2C drivers for the I2C tool. - * - ****************************************************************************/ - -#ifdef HAVE_I2CTOOL -static void lpc43_i2c_register(int bus) -{ - struct i2c_master_s *i2c; - int ret; - - i2c = lpc43_i2cbus_initialize(bus); - if (i2c == NULL) - { - _err("ERROR: Failed to get I2C%d interface\n", bus); - } - else - { - ret = i2c_register(i2c, bus); - if (ret < 0) - { - _err("ERROR: Failed to register I2C%d driver: %d\n", bus, ret); - lpc43_i2cbus_uninitialize(i2c); - } - } -} -#endif - -/**************************************************************************** - * Name: lpc43_i2ctool - * - * Description: - * Register I2C drivers for the I2C tool. - * - ****************************************************************************/ - -#ifdef HAVE_I2CTOOL -static void lpc43_i2ctool(void) -{ -#ifdef CONFIG_LPC43_I2C0 - lpc43_i2c_register(0); -#endif -#ifdef CONFIG_STM32_I2C1 - lpc43_i2c_register(1); -#endif -} -#else -# define lpc43_i2ctool() -#endif - -/**************************************************************************** - * 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) -{ - int ret; - - /* Register I2C drivers on behalf of the I2C tool */ - - lpc43_i2ctool(); - -#ifdef CONFIG_ADC - /* Initialize ADC and register the ADC driver. */ - - ret = lpc43_adc_setup(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: lpc43_adc_setup failed: %d\n", ret); - } -#endif - - UNUSED(ret); - return OK; -} diff --git a/boards/arm/lpc43xx/lpc4370-link2/src/lpc43_boot.c b/boards/arm/lpc43xx/lpc4370-link2/src/lpc43_boot.c index 5996b56710413..4752888675c32 100644 --- a/boards/arm/lpc43xx/lpc4370-link2/src/lpc43_boot.c +++ b/boards/arm/lpc43xx/lpc4370-link2/src/lpc43_boot.c @@ -28,11 +28,17 @@ #include +#include +#include + #include +#include #include #include "arm_internal.h" #include "lpc4370-link2.h" +#include "lpc43_i2c.h" +#include "chip.h" /**************************************************************************** * Pre-processor Definitions @@ -42,6 +48,59 @@ * Private Functions ****************************************************************************/ +/**************************************************************************** + * Name: lpc43_i2c_register + * + * Description: + * Register one I2C drivers for the I2C tool. + * + ****************************************************************************/ + +#ifdef HAVE_I2CTOOL +static void lpc43_i2c_register(int bus) +{ + struct i2c_master_s *i2c; + int ret; + + i2c = lpc43_i2cbus_initialize(bus); + if (i2c == NULL) + { + _err("ERROR: Failed to get I2C%d interface\n", bus); + } + else + { + ret = i2c_register(i2c, bus); + if (ret < 0) + { + _err("ERROR: Failed to register I2C%d driver: %d\n", bus, ret); + lpc43_i2cbus_uninitialize(i2c); + } + } +} +#endif + +/**************************************************************************** + * Name: lpc43_i2ctool + * + * Description: + * Register I2C drivers for the I2C tool. + * + ****************************************************************************/ + +#ifdef HAVE_I2CTOOL +static void lpc43_i2ctool(void) +{ +#ifdef CONFIG_LPC43_I2C0 + lpc43_i2c_register(0); +#endif +#ifdef CONFIG_STM32_I2C1 + lpc43_i2c_register(1); +#endif +} +#else +# define lpc43_i2ctool() +#endif + /**************************************************************************** * Public Functions ****************************************************************************/ @@ -69,3 +128,40 @@ void lpc43_boardinitialize(void) board_spifi_initialize(); #endif } + +/**************************************************************************** + * 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ + int ret; + + /* Register I2C drivers on behalf of the I2C tool */ + + lpc43_i2ctool(); + +#ifdef CONFIG_ADC + /* Initialize ADC and register the ADC driver. */ + + ret = lpc43_adc_setup(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: lpc43_adc_setup failed: %d\n", ret); + } +#endif + + UNUSED(ret); +} +#endif diff --git a/boards/arm/lpc54xx/lpcxpresso-lpc54628/configs/fb/defconfig b/boards/arm/lpc54xx/lpcxpresso-lpc54628/configs/fb/defconfig index 31fdf4303fb25..c61000b378a2c 100644 --- a/boards/arm/lpc54xx/lpcxpresso-lpc54628/configs/fb/defconfig +++ b/boards/arm/lpc54xx/lpcxpresso-lpc54628/configs/fb/defconfig @@ -51,7 +51,6 @@ CONFIG_LPC54_LCD_VPULSE=10 CONFIG_LPC54_LCD_VRAMBASE=0xa0000000 CONFIG_LPC54_USART0=y CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/lpc54xx/lpcxpresso-lpc54628/configs/netnsh/defconfig b/boards/arm/lpc54xx/lpcxpresso-lpc54628/configs/netnsh/defconfig index cbba6d078db66..0d5760767fef1 100644 --- a/boards/arm/lpc54xx/lpcxpresso-lpc54628/configs/netnsh/defconfig +++ b/boards/arm/lpc54xx/lpcxpresso-lpc54628/configs/netnsh/defconfig @@ -48,7 +48,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/lpc54xx/lpcxpresso-lpc54628/configs/nsh/defconfig b/boards/arm/lpc54xx/lpcxpresso-lpc54628/configs/nsh/defconfig index 99a78cae36c46..4ddab3e666288 100644 --- a/boards/arm/lpc54xx/lpcxpresso-lpc54628/configs/nsh/defconfig +++ b/boards/arm/lpc54xx/lpcxpresso-lpc54628/configs/nsh/defconfig @@ -37,7 +37,6 @@ CONFIG_LPC54_GPIOIRQ=y CONFIG_LPC54_I2C2_MASTER=y CONFIG_LPC54_RTC=y CONFIG_LPC54_USART0=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/lpc54xx/lpcxpresso-lpc54628/configs/pwfb/defconfig b/boards/arm/lpc54xx/lpcxpresso-lpc54628/configs/pwfb/defconfig index d6f69d51bfb72..2665d783c14b9 100644 --- a/boards/arm/lpc54xx/lpcxpresso-lpc54628/configs/pwfb/defconfig +++ b/boards/arm/lpc54xx/lpcxpresso-lpc54628/configs/pwfb/defconfig @@ -20,7 +20,6 @@ CONFIG_ARCH_CHIP_LPC54XX=y CONFIG_ARCH_INTERRUPTSTACK=2048 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_STDARG_H=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=21082 CONFIG_EXAMPLES_PWFB=y CONFIG_EXAMPLES_PWFB_BGCOLOR=0x7b5d diff --git a/boards/arm/lpc54xx/lpcxpresso-lpc54628/configs/pwlines/defconfig b/boards/arm/lpc54xx/lpcxpresso-lpc54628/configs/pwlines/defconfig index c98010c5e398d..0ead0436bc1aa 100644 --- a/boards/arm/lpc54xx/lpcxpresso-lpc54628/configs/pwlines/defconfig +++ b/boards/arm/lpc54xx/lpcxpresso-lpc54628/configs/pwlines/defconfig @@ -18,7 +18,6 @@ CONFIG_ARCH_CHIP_LPC54XX=y CONFIG_ARCH_INTERRUPTSTACK=2048 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_STDARG_H=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=21082 CONFIG_EXAMPLES_PWLINES=y CONFIG_EXAMPLES_PWLINES_BPP=16 diff --git a/boards/arm/lpc54xx/lpcxpresso-lpc54628/src/CMakeLists.txt b/boards/arm/lpc54xx/lpcxpresso-lpc54628/src/CMakeLists.txt index b932a0b093007..f93328ff05d22 100644 --- a/boards/arm/lpc54xx/lpcxpresso-lpc54628/src/CMakeLists.txt +++ b/boards/arm/lpc54xx/lpcxpresso-lpc54628/src/CMakeLists.txt @@ -30,10 +30,6 @@ if(CONFIG_ARCH_BUTTONS) list(APPEND SRCS lpc54_buttons.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS lpc54_appinit.c) -endif() - if(CONFIG_LPC54_HAVE_I2C_MASTER) list(APPEND SRCS lpc54_i2c.c) endif() diff --git a/boards/arm/lpc54xx/lpcxpresso-lpc54628/src/Makefile b/boards/arm/lpc54xx/lpcxpresso-lpc54628/src/Makefile index 009d42a342f52..14ad685a24da8 100644 --- a/boards/arm/lpc54xx/lpcxpresso-lpc54628/src/Makefile +++ b/boards/arm/lpc54xx/lpcxpresso-lpc54628/src/Makefile @@ -32,10 +32,6 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += lpc54_buttons.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += lpc54_appinit.c -endif - ifeq ($(CONFIG_LPC54_HAVE_I2C_MASTER),y) CSRCS += lpc54_i2c.c endif diff --git a/boards/arm/lpc54xx/lpcxpresso-lpc54628/src/lpc54_appinit.c b/boards/arm/lpc54xx/lpcxpresso-lpc54628/src/lpc54_appinit.c deleted file mode 100644 index bd0bdd14a8f59..0000000000000 --- a/boards/arm/lpc54xx/lpcxpresso-lpc54628/src/lpc54_appinit.c +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** - * boards/arm/lpc54xx/lpcxpresso-lpc54628/src/lpc54_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 - -#include - -#include - -#include "lpcxpresso-lpc54628.h" - -/**************************************************************************** - * 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 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 lpc54_bringup(); -#endif -} diff --git a/boards/arm/max326xx/max32660-evsys/configs/nsh/defconfig b/boards/arm/max326xx/max32660-evsys/configs/nsh/defconfig index 98090d86f37ee..98780313abb0c 100644 --- a/boards/arm/max326xx/max32660-evsys/configs/nsh/defconfig +++ b/boards/arm/max326xx/max32660-evsys/configs/nsh/defconfig @@ -22,7 +22,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MAX326XX_UART1=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/max326xx/max32660-evsys/src/CMakeLists.txt b/boards/arm/max326xx/max32660-evsys/src/CMakeLists.txt index b4f41b01450ab..de109b1b89651 100644 --- a/boards/arm/max326xx/max32660-evsys/src/CMakeLists.txt +++ b/boards/arm/max326xx/max32660-evsys/src/CMakeLists.txt @@ -22,9 +22,7 @@ set(SRCS max326_boot.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS max326_appinit.c max326_bringup.c) -elseif(CONFIG_BOARD_LATE_INITIALIZE) +if(CONFIG_BOARD_LATE_INITIALIZE) list(APPEND SRCS max326_bringup.c) endif() diff --git a/boards/arm/max326xx/max32660-evsys/src/Makefile b/boards/arm/max326xx/max32660-evsys/src/Makefile index 92d9b61070db3..d29c81fdc6a14 100644 --- a/boards/arm/max326xx/max32660-evsys/src/Makefile +++ b/boards/arm/max326xx/max32660-evsys/src/Makefile @@ -22,13 +22,7 @@ include $(TOPDIR)/Make.defs -CSRCS = max326_boot.c - -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += max326_appinit.c max326_bringup.c -else ifeq ($(CONFIG_BOARD_LATE_INITIALIZE),y) -CSRCS += max326_bringup.c -endif +CSRCS = max326_boot.c max326_bringup.c ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += max326_autoleds.c diff --git a/boards/arm/max326xx/max32660-evsys/src/max326_appinit.c b/boards/arm/max326xx/max32660-evsys/src/max326_appinit.c deleted file mode 100644 index 2be1d57aac83b..0000000000000 --- a/boards/arm/max326xx/max32660-evsys/src/max326_appinit.c +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** - * boards/arm/max326xx/max32660-evsys/src/max326_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 - -#include - -#include - -#include "max32660-evsys.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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 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) -{ -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board initialization */ - - return max326_bringup(); -#else - return OK; -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/arm/mcx-nxxx/frdm-mcxn236/configs/nsh/defconfig b/boards/arm/mcx-nxxx/frdm-mcxn236/configs/nsh/defconfig index c0853de9b0771..abe6be3212763 100644 --- a/boards/arm/mcx-nxxx/frdm-mcxn236/configs/nsh/defconfig +++ b/boards/arm/mcx-nxxx/frdm-mcxn236/configs/nsh/defconfig @@ -29,7 +29,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_LOCALTIME=y CONFIG_LPUART4_SERIAL_CONSOLE=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/mcx-nxxx/frdm-mcxn236/src/CMakeLists.txt b/boards/arm/mcx-nxxx/frdm-mcxn236/src/CMakeLists.txt index d48fb5c901d31..1af7cb40be566 100644 --- a/boards/arm/mcx-nxxx/frdm-mcxn236/src/CMakeLists.txt +++ b/boards/arm/mcx-nxxx/frdm-mcxn236/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS n23x_boardinit.c n23x_bringup.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS n23x_appinit.c) -endif() - target_sources(board PRIVATE ${SRCS}) set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/flash.ld") diff --git a/boards/arm/mcx-nxxx/frdm-mcxn236/src/Makefile b/boards/arm/mcx-nxxx/frdm-mcxn236/src/Makefile index b99b5913ff9b1..b8c695ea71ca7 100644 --- a/boards/arm/mcx-nxxx/frdm-mcxn236/src/Makefile +++ b/boards/arm/mcx-nxxx/frdm-mcxn236/src/Makefile @@ -24,8 +24,4 @@ include $(TOPDIR)/Make.defs CSRCS = n23x_boardinit.c n23x_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += n23x_appinit.c -endif - include $(TOPDIR)/boards/Board.mk diff --git a/boards/arm/mcx-nxxx/frdm-mcxn236/src/n23x_appinit.c b/boards/arm/mcx-nxxx/frdm-mcxn236/src/n23x_appinit.c deleted file mode 100644 index c026757f2440a..0000000000000 --- a/boards/arm/mcx-nxxx/frdm-mcxn236/src/n23x_appinit.c +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** - * boards/arm/mcx-nxxx/frdm-mcxn236/src/n23x_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 -#include -#include - -#include "frdm-mcxn236.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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 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) -{ - UNUSED(arg); -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board initialization */ - - return n23x_bringup(); -#else - return OK; -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/arm/moxart/moxa/configs/nsh/defconfig b/boards/arm/moxart/moxa/configs/nsh/defconfig index 16094b2270c43..ec790c1c6cc80 100644 --- a/boards/arm/moxart/moxa/configs/nsh/defconfig +++ b/boards/arm/moxart/moxa/configs/nsh/defconfig @@ -43,7 +43,6 @@ CONFIG_ARCH_INTERRUPTSTACK=1024 CONFIG_ARCH_STACKDUMP=y CONFIG_BOARDCTL_APP_SYMTAB=y CONFIG_BOARDCTL_RESET=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=6965 CONFIG_BOOT_RUNFROMISRAM=y CONFIG_BUILTIN=y diff --git a/boards/arm/moxart/moxa/src/Makefile b/boards/arm/moxart/moxa/src/Makefile index f0fd79de854cd..11ceee4b22b14 100644 --- a/boards/arm/moxart/moxa/src/Makefile +++ b/boards/arm/moxart/moxa/src/Makefile @@ -24,11 +24,8 @@ include $(TOPDIR)/Make.defs CSRCS = moxart_boot.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += moxart_appinit.c ifeq ($(CONFIG_BOARDCTL_RESET),y) CSRCS += moxart_reset.c endif -endif include $(TOPDIR)/boards/Board.mk diff --git a/boards/arm/moxart/moxa/src/moxart_appinit.c b/boards/arm/moxart/moxa/src/moxart_appinit.c deleted file mode 100644 index cf791972ccb29..0000000000000 --- a/boards/arm/moxart/moxa/src/moxart_appinit.c +++ /dev/null @@ -1,90 +0,0 @@ -/**************************************************************************** - * boards/arm/moxart/moxa/src/moxart_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 - -#include -#include -#include -#include - -#include -#include - -#include - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: board_app_initialize - * - * Description: - * Perform architecture specific initialization - * - * CONFIG_BOARDCTL=y : - * Called from the NSH library - * - * CONFIG_BOARD_LATE_INITIALIZE=y, CONFIG_NSH_LIBRARY=y, && - * CONFIG_BOARDCTL=n : - * Called from board_late_initialize(). - * - * 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) -{ -#ifndef CONFIG_BOARD_LATE_INITIALIZE -#ifdef CONFIG_NET_FTMAC100 - /* Perform board-specific initialization */ - - ftintc010_set_trig_mode(CONFIG_FTMAC100_IRQ, 0); - ftintc010_set_trig_level(CONFIG_FTMAC100_IRQ, 0); - - ftmac100_initialize(0); -#endif -#endif - return OK; -} diff --git a/boards/arm/mps/mps2-an500/configs/knsh/defconfig b/boards/arm/mps/mps2-an500/configs/knsh/defconfig index 71da61316550d..8d674e632b7fd 100644 --- a/boards/arm/mps/mps2-an500/configs/knsh/defconfig +++ b/boards/arm/mps/mps2-an500/configs/knsh/defconfig @@ -45,7 +45,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_MEMFD_ERROR=y CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/mps/mps2-an500/configs/nsh/defconfig b/boards/arm/mps/mps2-an500/configs/nsh/defconfig index 22054eee44508..a45442d7a1dde 100644 --- a/boards/arm/mps/mps2-an500/configs/nsh/defconfig +++ b/boards/arm/mps/mps2-an500/configs/nsh/defconfig @@ -50,7 +50,6 @@ CONFIG_IDLETHREAD_STACKSIZE=4096 CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_MEMFD_ERROR=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/mps/mps2-an500/src/mps2_bringup.c b/boards/arm/mps/mps2-an500/src/mps2_bringup.c index 4c3a659cebd2c..8eca057051824 100644 --- a/boards/arm/mps/mps2-an500/src/mps2_bringup.c +++ b/boards/arm/mps/mps2-an500/src/mps2_bringup.c @@ -101,41 +101,3 @@ void board_late_initialize(void) mps2_bringup(); } #endif /* CONFIG_BOARD_LATE_INITIALIZE */ - -/**************************************************************************** - * 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 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) -{ - UNUSED(arg); -#ifndef CONFIG_BOARD_LATE_INITIALIZE - - /* Perform board initialization */ - - return mps2_bringup(); -#else - return OK; -#endif -} diff --git a/boards/arm/mps/mps2-an521/configs/nsh/defconfig b/boards/arm/mps/mps2-an521/configs/nsh/defconfig index 8341a99039875..462c9ed8e1444 100644 --- a/boards/arm/mps/mps2-an521/configs/nsh/defconfig +++ b/boards/arm/mps/mps2-an521/configs/nsh/defconfig @@ -44,7 +44,6 @@ CONFIG_IDLETHREAD_STACKSIZE=4096 CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_MEMFD_ERROR=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/mps/mps2-an521/src/mps2_bringup.c b/boards/arm/mps/mps2-an521/src/mps2_bringup.c index cd2d13710de76..e5bcb5a578087 100644 --- a/boards/arm/mps/mps2-an521/src/mps2_bringup.c +++ b/boards/arm/mps/mps2-an521/src/mps2_bringup.c @@ -101,41 +101,3 @@ void board_late_initialize(void) mps2_bringup(); } #endif /* CONFIG_BOARD_LATE_INITIALIZE */ - -/**************************************************************************** - * 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 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) -{ - UNUSED(arg); -#ifndef CONFIG_BOARD_LATE_INITIALIZE - - /* Perform board initialization */ - - return mps2_bringup(); -#else - return OK; -#endif -} diff --git a/boards/arm/mps/mps3-an547/configs/ap/defconfig b/boards/arm/mps/mps3-an547/configs/ap/defconfig index 55363ba75fe99..b8dc83fabeebe 100644 --- a/boards/arm/mps/mps3-an547/configs/ap/defconfig +++ b/boards/arm/mps/mps3-an547/configs/ap/defconfig @@ -114,7 +114,6 @@ CONFIG_LIBM_TOOLCHAIN=y CONFIG_LINE_MAX=80 CONFIG_MPS3_AN547_AP=y CONFIG_NSH_ALIAS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_ARGCAT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_CMDOPT_HEXDUMP=y diff --git a/boards/arm/mps/mps3-an547/configs/bl/defconfig b/boards/arm/mps/mps3-an547/configs/bl/defconfig index 108804aae12e0..c515fc695af78 100644 --- a/boards/arm/mps/mps3-an547/configs/bl/defconfig +++ b/boards/arm/mps/mps3-an547/configs/bl/defconfig @@ -135,7 +135,6 @@ CONFIG_LIBM_TOOLCHAIN=y CONFIG_LINE_MAX=80 CONFIG_MPS3_AN547_BL=y CONFIG_NSH_ALIAS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_ARGCAT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_CMDOPT_HEXDUMP=y diff --git a/boards/arm/mps/mps3-an547/configs/clang/defconfig b/boards/arm/mps/mps3-an547/configs/clang/defconfig index e1ef03ee4871b..67e117cff3806 100644 --- a/boards/arm/mps/mps3-an547/configs/clang/defconfig +++ b/boards/arm/mps/mps3-an547/configs/clang/defconfig @@ -48,7 +48,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_MEMFD_ERROR=y CONFIG_LIBM=y CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/mps/mps3-an547/configs/gcov/defconfig b/boards/arm/mps/mps3-an547/configs/gcov/defconfig index e5280ff9f516e..58ab3dfec6fd2 100644 --- a/boards/arm/mps/mps3-an547/configs/gcov/defconfig +++ b/boards/arm/mps/mps3-an547/configs/gcov/defconfig @@ -48,7 +48,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_MEMFD_ERROR=y CONFIG_LIBM=y CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/mps/mps3-an547/configs/gdbstub/defconfig b/boards/arm/mps/mps3-an547/configs/gdbstub/defconfig index c998d8cb4d9b2..5084af7dba92c 100644 --- a/boards/arm/mps/mps3-an547/configs/gdbstub/defconfig +++ b/boards/arm/mps/mps3-an547/configs/gdbstub/defconfig @@ -54,7 +54,6 @@ CONFIG_LIBC_MEMFD_ERROR=y CONFIG_LIB_GDBSTUB=y CONFIG_LIB_GDBSTUB_DEBUG=y CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/mps/mps3-an547/configs/knsh/defconfig b/boards/arm/mps/mps3-an547/configs/knsh/defconfig index eca737446b2fe..81f9fe1fd687a 100644 --- a/boards/arm/mps/mps3-an547/configs/knsh/defconfig +++ b/boards/arm/mps/mps3-an547/configs/knsh/defconfig @@ -50,7 +50,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_MEMFD_ERROR=y CONFIG_MM_FILL_ALLOCATIONS=y CONFIG_MM_KERNEL_HEAPSIZE=65535 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y @@ -77,7 +76,6 @@ CONFIG_SYMTAB_ORDEREDBYNAME=y CONFIG_SYSTEM_NSH=y CONFIG_SYSTEM_SYSTEM=y CONFIG_TESTING_GETPRIME=y -CONFIG_TESTING_MM=y CONFIG_TESTING_OSTEST=y CONFIG_TESTING_OSTEST_FPUTESTDISABLE=y CONFIG_TIMER=y diff --git a/boards/arm/mps/mps3-an547/configs/nsh/defconfig b/boards/arm/mps/mps3-an547/configs/nsh/defconfig index 5ffdb8ae4c9a5..5d185b0b6044c 100644 --- a/boards/arm/mps/mps3-an547/configs/nsh/defconfig +++ b/boards/arm/mps/mps3-an547/configs/nsh/defconfig @@ -45,7 +45,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_MEMFD_ERROR=y CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/mps/mps3-an547/configs/picostest/defconfig b/boards/arm/mps/mps3-an547/configs/picostest/defconfig index a7646c4609e5c..62ee8a2857ef9 100644 --- a/boards/arm/mps/mps3-an547/configs/picostest/defconfig +++ b/boards/arm/mps/mps3-an547/configs/picostest/defconfig @@ -49,7 +49,6 @@ CONFIG_LIBC_EXECFUNCS=y CONFIG_LIBC_MEMFD_ERROR=y CONFIG_MM_BACKTRACE=0 CONFIG_MODULE=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_FILE_APPS=y diff --git a/boards/arm/mps/mps3-an547/src/mps3_bringup.c b/boards/arm/mps/mps3-an547/src/mps3_bringup.c index c76695952ad92..5c7edfb523c42 100644 --- a/boards/arm/mps/mps3-an547/src/mps3_bringup.c +++ b/boards/arm/mps/mps3-an547/src/mps3_bringup.c @@ -200,42 +200,3 @@ void board_late_initialize(void) mps3_bringup(); } #endif /* CONFIG_BOARD_LATE_INITIALIZE */ - -/**************************************************************************** - * 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 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) -{ - UNUSED(arg); -#ifndef CONFIG_BOARD_LATE_INITIALIZE - - /* Perform board initialization */ - - return mps3_bringup(); -#else - return OK; -#endif -} - diff --git a/boards/arm/mx8mp/verdin-mx8mp/configs/nsh/defconfig b/boards/arm/mx8mp/verdin-mx8mp/configs/nsh/defconfig index 51d1791edb07a..099c5cc615ef6 100644 --- a/boards/arm/mx8mp/verdin-mx8mp/configs/nsh/defconfig +++ b/boards/arm/mx8mp/verdin-mx8mp/configs/nsh/defconfig @@ -47,7 +47,6 @@ CONFIG_LINE_MAX=64 CONFIG_MX8MP_I2C4=y CONFIG_MX8MP_I2C=y CONFIG_MX8MP_UART4=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/mx8mp/verdin-mx8mp/configs/rpmsg/defconfig b/boards/arm/mx8mp/verdin-mx8mp/configs/rpmsg/defconfig index d118265cd82aa..70bba54e18672 100644 --- a/boards/arm/mx8mp/verdin-mx8mp/configs/rpmsg/defconfig +++ b/boards/arm/mx8mp/verdin-mx8mp/configs/rpmsg/defconfig @@ -43,7 +43,6 @@ CONFIG_MX8MP_I2C4=y CONFIG_MX8MP_I2C=y CONFIG_MX8MP_RUN_FROM_ITCM=y CONFIG_MX8MP_UART4=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFCONFIG=y CONFIG_NSH_DISABLE_IFUPDOWN=y diff --git a/boards/arm/mx8mp/verdin-mx8mp/src/CMakeLists.txt b/boards/arm/mx8mp/verdin-mx8mp/src/CMakeLists.txt index 7f0460c42998e..18e37d3afe61a 100644 --- a/boards/arm/mx8mp/verdin-mx8mp/src/CMakeLists.txt +++ b/boards/arm/mx8mp/verdin-mx8mp/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS mx8mp_boot.c mx8mp_bringup.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS mx8mp_appinit.c) -endif() - if(CONFIG_SENSORS_INA219) list(APPEND SRCS mx8mp_ina219.c) endif() diff --git a/boards/arm/mx8mp/verdin-mx8mp/src/Makefile b/boards/arm/mx8mp/verdin-mx8mp/src/Makefile index 0adcfdbf255ea..5405401e0c09b 100644 --- a/boards/arm/mx8mp/verdin-mx8mp/src/Makefile +++ b/boards/arm/mx8mp/verdin-mx8mp/src/Makefile @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = mx8mp_boot.c mx8mp_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) - CSRCS += mx8mp_appinit.c -endif - ifeq ($(CONFIG_SENSORS_INA219),y) CSRCS += mx8mp_ina219.c endif diff --git a/boards/arm/mx8mp/verdin-mx8mp/src/mx8mp_appinit.c b/boards/arm/mx8mp/verdin-mx8mp/src/mx8mp_appinit.c deleted file mode 100644 index 3b7b4d1f968df..0000000000000 --- a/boards/arm/mx8mp/verdin-mx8mp/src/mx8mp_appinit.c +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** - * boards/arm/mx8mp/verdin-mx8mp/src/mx8mp_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 - -#include - -#include - -#include "verdin-mx8mp.h" - -/**************************************************************************** - * 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 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) -{ -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board initialization */ - - return mx8mp_bringup(); -#else - return OK; -#endif /* CONFIG_BOARD_LATE_INITIALIZE */ -} diff --git a/boards/arm/nrf52/arduino-nano-33ble-rev2/configs/nsh/defconfig b/boards/arm/nrf52/arduino-nano-33ble-rev2/configs/nsh/defconfig index 5f4d285d0ca8b..ae05ffe3aa59b 100644 --- a/boards/arm/nrf52/arduino-nano-33ble-rev2/configs/nsh/defconfig +++ b/boards/arm/nrf52/arduino-nano-33ble-rev2/configs/nsh/defconfig @@ -24,7 +24,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 CONFIG_NRF52_UART0=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/nrf52/arduino-nano-33ble-rev2/configs/usbnsh/defconfig b/boards/arm/nrf52/arduino-nano-33ble-rev2/configs/usbnsh/defconfig index 71b7b85d7bfc0..0ac97e5091a2a 100644 --- a/boards/arm/nrf52/arduino-nano-33ble-rev2/configs/usbnsh/defconfig +++ b/boards/arm/nrf52/arduino-nano-33ble-rev2/configs/usbnsh/defconfig @@ -30,7 +30,6 @@ CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 CONFIG_NRF52_HFCLK_XTAL=y CONFIG_NRF52_USBDEV=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/nrf52/arduino-nano-33ble-rev2/src/CMakeLists.txt b/boards/arm/nrf52/arduino-nano-33ble-rev2/src/CMakeLists.txt index 3f2416725b2a0..2a871feac7b66 100644 --- a/boards/arm/nrf52/arduino-nano-33ble-rev2/src/CMakeLists.txt +++ b/boards/arm/nrf52/arduino-nano-33ble-rev2/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS nrf52_boot.c nrf52_bringup.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS nrf52_appinit.c) -endif() - if(CONFIG_ARCH_LEDS) list(APPEND SRCS nrf52_autoleds.c) else() diff --git a/boards/arm/nrf52/arduino-nano-33ble-rev2/src/Make.defs b/boards/arm/nrf52/arduino-nano-33ble-rev2/src/Make.defs index 34cf5c8e74130..88e0c7d5e4340 100644 --- a/boards/arm/nrf52/arduino-nano-33ble-rev2/src/Make.defs +++ b/boards/arm/nrf52/arduino-nano-33ble-rev2/src/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = nrf52_boot.c nrf52_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += nrf52_appinit.c -endif - ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += nrf52_autoleds.c else diff --git a/boards/arm/nrf52/arduino-nano-33ble-rev2/src/nrf52_appinit.c b/boards/arm/nrf52/arduino-nano-33ble-rev2/src/nrf52_appinit.c deleted file mode 100644 index ed43d5f27e014..0000000000000 --- a/boards/arm/nrf52/arduino-nano-33ble-rev2/src/nrf52_appinit.c +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** - * boards/arm/nrf52/arduino-nano-33ble-rev2/src/nrf52_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 - -#include -#include -#include - -#include - -#include "chip.h" -#include "arduino-nano-33ble.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 nrf52_bringup(); -#endif -} diff --git a/boards/arm/nrf52/arduino-nano-33ble/configs/nsh/defconfig b/boards/arm/nrf52/arduino-nano-33ble/configs/nsh/defconfig index 492e1da9db400..6ea5b0c390b64 100644 --- a/boards/arm/nrf52/arduino-nano-33ble/configs/nsh/defconfig +++ b/boards/arm/nrf52/arduino-nano-33ble/configs/nsh/defconfig @@ -24,7 +24,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 CONFIG_NRF52_UART0=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/nrf52/arduino-nano-33ble/configs/usbnsh/defconfig b/boards/arm/nrf52/arduino-nano-33ble/configs/usbnsh/defconfig index efa9801bb2bbc..2ff44858a8022 100644 --- a/boards/arm/nrf52/arduino-nano-33ble/configs/usbnsh/defconfig +++ b/boards/arm/nrf52/arduino-nano-33ble/configs/usbnsh/defconfig @@ -30,7 +30,6 @@ CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 CONFIG_NRF52_HFCLK_XTAL=y CONFIG_NRF52_USBDEV=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/nrf52/arduino-nano-33ble/src/CMakeLists.txt b/boards/arm/nrf52/arduino-nano-33ble/src/CMakeLists.txt index 7b2c9b748aa9a..7654bc698be01 100644 --- a/boards/arm/nrf52/arduino-nano-33ble/src/CMakeLists.txt +++ b/boards/arm/nrf52/arduino-nano-33ble/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS nrf52_boot.c nrf52_bringup.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS nrf52_appinit.c) -endif() - if(CONFIG_ARCH_LEDS) list(APPEND SRCS nrf52_autoleds.c) else() diff --git a/boards/arm/nrf52/arduino-nano-33ble/src/Make.defs b/boards/arm/nrf52/arduino-nano-33ble/src/Make.defs index b61c4e963cd66..33bc31d992ef4 100644 --- a/boards/arm/nrf52/arduino-nano-33ble/src/Make.defs +++ b/boards/arm/nrf52/arduino-nano-33ble/src/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = nrf52_boot.c nrf52_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += nrf52_appinit.c -endif - ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += nrf52_autoleds.c else diff --git a/boards/arm/nrf52/arduino-nano-33ble/src/nrf52_appinit.c b/boards/arm/nrf52/arduino-nano-33ble/src/nrf52_appinit.c deleted file mode 100644 index 29543e1d81635..0000000000000 --- a/boards/arm/nrf52/arduino-nano-33ble/src/nrf52_appinit.c +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** - * boards/arm/nrf52/arduino-nano-33ble/src/nrf52_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 - -#include -#include -#include - -#include - -#include "chip.h" -#include "arduino-nano-33ble.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 nrf52_bringup(); -#endif -} diff --git a/boards/arm/nrf52/nrf52-feather/configs/i2c/defconfig b/boards/arm/nrf52/nrf52-feather/configs/i2c/defconfig index a9fc291deb1e0..45fa82bd0d48e 100644 --- a/boards/arm/nrf52/nrf52-feather/configs/i2c/defconfig +++ b/boards/arm/nrf52/nrf52-feather/configs/i2c/defconfig @@ -28,7 +28,6 @@ CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 CONFIG_NRF52_I2C0_MASTER=y CONFIG_NRF52_UART0=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/nrf52/nrf52-feather/configs/nsh/defconfig b/boards/arm/nrf52/nrf52-feather/configs/nsh/defconfig index 68a8377ef45e1..4956fd84f04d0 100644 --- a/boards/arm/nrf52/nrf52-feather/configs/nsh/defconfig +++ b/boards/arm/nrf52/nrf52-feather/configs/nsh/defconfig @@ -24,7 +24,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 CONFIG_NRF52_UART0=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/nrf52/nrf52-feather/configs/userleds/defconfig b/boards/arm/nrf52/nrf52-feather/configs/userleds/defconfig index d711930168c86..e2858e4a6db7b 100644 --- a/boards/arm/nrf52/nrf52-feather/configs/userleds/defconfig +++ b/boards/arm/nrf52/nrf52-feather/configs/userleds/defconfig @@ -27,7 +27,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 CONFIG_NRF52_UART0=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/nrf52/nrf52-feather/src/CMakeLists.txt b/boards/arm/nrf52/nrf52-feather/src/CMakeLists.txt index 62b276ebc5807..cac51d999c48d 100644 --- a/boards/arm/nrf52/nrf52-feather/src/CMakeLists.txt +++ b/boards/arm/nrf52/nrf52-feather/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS nrf52_boot.c nrf52_bringup.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS nrf52_appinit.c) -endif() - if(CONFIG_ARCH_LEDS) list(APPEND SRCS nrf52_autoleds.c) else() diff --git a/boards/arm/nrf52/nrf52-feather/src/Make.defs b/boards/arm/nrf52/nrf52-feather/src/Make.defs index 97eec9d9e9237..fb258be567532 100644 --- a/boards/arm/nrf52/nrf52-feather/src/Make.defs +++ b/boards/arm/nrf52/nrf52-feather/src/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = nrf52_boot.c nrf52_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += nrf52_appinit.c -endif - ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += nrf52_autoleds.c else diff --git a/boards/arm/nrf52/nrf52-feather/src/nrf52_appinit.c b/boards/arm/nrf52/nrf52-feather/src/nrf52_appinit.c deleted file mode 100644 index 8ca3fbd21beb9..0000000000000 --- a/boards/arm/nrf52/nrf52-feather/src/nrf52_appinit.c +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** - * boards/arm/nrf52/nrf52-feather/src/nrf52_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 - -#include -#include -#include - -#include - -#include "chip.h" -#include "nrf52-feather.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 nrf52_bringup(); -#endif -} diff --git a/boards/arm/nrf52/nrf52832-dk/configs/jumbo/defconfig b/boards/arm/nrf52/nrf52832-dk/configs/jumbo/defconfig index 8b8c66209b475..b512396f6bc5c 100644 --- a/boards/arm/nrf52/nrf52832-dk/configs/jumbo/defconfig +++ b/boards/arm/nrf52/nrf52832-dk/configs/jumbo/defconfig @@ -32,7 +32,6 @@ CONFIG_MM_REGIONS=2 CONFIG_NRF52_TIMER1=y CONFIG_NRF52_UART0=y CONFIG_NRF52_WDT=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/nrf52/nrf52832-dk/configs/mcuboot_app/defconfig b/boards/arm/nrf52/nrf52832-dk/configs/mcuboot_app/defconfig index d447a973f0c9d..187a0cc04eacf 100644 --- a/boards/arm/nrf52/nrf52832-dk/configs/mcuboot_app/defconfig +++ b/boards/arm/nrf52/nrf52832-dk/configs/mcuboot_app/defconfig @@ -31,7 +31,6 @@ CONFIG_MM_REGIONS=2 CONFIG_NRF52_APP_FORMAT_MCUBOOT=y CONFIG_NRF52_PROGMEM_OTA_PARTITION=y CONFIG_NRF52_UART0=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/nrf52/nrf52832-dk/configs/mrf24j40_6lowpan/defconfig b/boards/arm/nrf52/nrf52832-dk/configs/mrf24j40_6lowpan/defconfig index d1d64311bd90b..764ec4a7746e7 100644 --- a/boards/arm/nrf52/nrf52832-dk/configs/mrf24j40_6lowpan/defconfig +++ b/boards/arm/nrf52/nrf52832-dk/configs/mrf24j40_6lowpan/defconfig @@ -59,7 +59,6 @@ CONFIG_NET_UDP=y CONFIG_NRF52_GPIOTE=y CONFIG_NRF52_SPI0_MASTER=y CONFIG_NRF52_UART0=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_PROMPT_STRING="nsh-mrf> " CONFIG_NSH_READLINE=y diff --git a/boards/arm/nrf52/nrf52832-dk/configs/mrf24j40_mac/defconfig b/boards/arm/nrf52/nrf52832-dk/configs/mrf24j40_mac/defconfig index bb965b987c7df..69c1ae92aa17a 100644 --- a/boards/arm/nrf52/nrf52832-dk/configs/mrf24j40_mac/defconfig +++ b/boards/arm/nrf52/nrf52832-dk/configs/mrf24j40_mac/defconfig @@ -34,7 +34,6 @@ CONFIG_MM_REGIONS=2 CONFIG_NRF52_GPIOTE=y CONFIG_NRF52_SPI0_MASTER=y CONFIG_NRF52_UART0=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_PROMPT_STRING="nsh-mrf> " diff --git a/boards/arm/nrf52/nrf52832-dk/configs/nsh/defconfig b/boards/arm/nrf52/nrf52832-dk/configs/nsh/defconfig index 415f601668ef3..794800d4e9df0 100644 --- a/boards/arm/nrf52/nrf52832-dk/configs/nsh/defconfig +++ b/boards/arm/nrf52/nrf52832-dk/configs/nsh/defconfig @@ -24,7 +24,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 CONFIG_NRF52_UART0=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/nrf52/nrf52832-dk/configs/ostest_tickless/defconfig b/boards/arm/nrf52/nrf52832-dk/configs/ostest_tickless/defconfig index faea128f71b5b..b19bfba73b952 100644 --- a/boards/arm/nrf52/nrf52832-dk/configs/ostest_tickless/defconfig +++ b/boards/arm/nrf52/nrf52832-dk/configs/ostest_tickless/defconfig @@ -28,7 +28,6 @@ CONFIG_MM_REGIONS=2 CONFIG_NRF52_RTC0=y CONFIG_NRF52_SYSTIMER_RTC=y CONFIG_NRF52_UART0=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/nrf52/nrf52832-dk/configs/sdc/defconfig b/boards/arm/nrf52/nrf52832-dk/configs/sdc/defconfig index 45f22a17dde7f..4b76e698dc554 100644 --- a/boards/arm/nrf52/nrf52832-dk/configs/sdc/defconfig +++ b/boards/arm/nrf52/nrf52832-dk/configs/sdc/defconfig @@ -34,7 +34,6 @@ CONFIG_NRF52_SDC_CENTRAL=y CONFIG_NRF52_SDC_PUB_ADDR=0x010203040506 CONFIG_NRF52_SOFTDEVICE_CONTROLLER=y CONFIG_NRF52_UART0=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/nrf52/nrf52832-dk/configs/sdc_nimble/defconfig b/boards/arm/nrf52/nrf52832-dk/configs/sdc_nimble/defconfig index e9ac865f47737..6763f1b7037ef 100644 --- a/boards/arm/nrf52/nrf52832-dk/configs/sdc_nimble/defconfig +++ b/boards/arm/nrf52/nrf52832-dk/configs/sdc_nimble/defconfig @@ -36,7 +36,6 @@ CONFIG_NIMBLE=y CONFIG_NIMBLE_ROLE_PERIPHERAL=y CONFIG_NRF52_SOFTDEVICE_CONTROLLER=y CONFIG_NRF52_UART0=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/nrf52/nrf52832-dk/src/CMakeLists.txt b/boards/arm/nrf52/nrf52832-dk/src/CMakeLists.txt index c2ca172e09d4b..3faab90f6be59 100644 --- a/boards/arm/nrf52/nrf52832-dk/src/CMakeLists.txt +++ b/boards/arm/nrf52/nrf52832-dk/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS nrf52_boot.c nrf52_bringup.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS nrf52_appinit.c) -endif() - if(CONFIG_ARCH_LEDS) list(APPEND SRCS nrf52_autoleds.c) else() diff --git a/boards/arm/nrf52/nrf52832-dk/src/Make.defs b/boards/arm/nrf52/nrf52832-dk/src/Make.defs index e8817659f966b..2b20da6adafcb 100644 --- a/boards/arm/nrf52/nrf52832-dk/src/Make.defs +++ b/boards/arm/nrf52/nrf52832-dk/src/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = nrf52_boot.c nrf52_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += nrf52_appinit.c -endif - ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += nrf52_autoleds.c else diff --git a/boards/arm/nrf52/nrf52832-dk/src/nrf52_appinit.c b/boards/arm/nrf52/nrf52832-dk/src/nrf52_appinit.c deleted file mode 100644 index d3bc29966f199..0000000000000 --- a/boards/arm/nrf52/nrf52832-dk/src/nrf52_appinit.c +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** - * boards/arm/nrf52/nrf52832-dk/src/nrf52_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 - -#include -#include -#include - -#include - -#include "chip.h" -#include "nrf52832-dk.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 nrf52_bringup(); -#endif -} diff --git a/boards/arm/nrf52/nrf52832-mdk/configs/nsh/defconfig b/boards/arm/nrf52/nrf52832-mdk/configs/nsh/defconfig index 928e291313621..f8336d9cd98e3 100644 --- a/boards/arm/nrf52/nrf52832-mdk/configs/nsh/defconfig +++ b/boards/arm/nrf52/nrf52832-mdk/configs/nsh/defconfig @@ -24,7 +24,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 CONFIG_NRF52_UART0=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/nrf52/nrf52832-mdk/src/CMakeLists.txt b/boards/arm/nrf52/nrf52832-mdk/src/CMakeLists.txt index a2ae45718ed34..f015a0996d34d 100644 --- a/boards/arm/nrf52/nrf52832-mdk/src/CMakeLists.txt +++ b/boards/arm/nrf52/nrf52832-mdk/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS nrf52_boot.c nrf52_bringup.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS nrf52_appinit.c) -endif() - if(CONFIG_ARCH_LEDS) list(APPEND SRCS nrf52_autoleds.c) endif() diff --git a/boards/arm/nrf52/nrf52832-mdk/src/Make.defs b/boards/arm/nrf52/nrf52832-mdk/src/Make.defs index c928f6ea0a8e4..2c1d21841ab79 100644 --- a/boards/arm/nrf52/nrf52832-mdk/src/Make.defs +++ b/boards/arm/nrf52/nrf52832-mdk/src/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = nrf52_boot.c nrf52_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += nrf52_appinit.c -endif - ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += nrf52_autoleds.c endif diff --git a/boards/arm/nrf52/nrf52832-mdk/src/nrf52_appinit.c b/boards/arm/nrf52/nrf52832-mdk/src/nrf52_appinit.c deleted file mode 100644 index 24089685944cf..0000000000000 --- a/boards/arm/nrf52/nrf52832-mdk/src/nrf52_appinit.c +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** - * boards/arm/nrf52/nrf52832-mdk/src/nrf52_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 - -#include -#include -#include - -#include - -#include "chip.h" -#include "nrf52832-mdk.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 nrf52_bringup(); -#endif -} diff --git a/boards/arm/nrf52/nrf52832-sparkfun/configs/nsh/defconfig b/boards/arm/nrf52/nrf52832-sparkfun/configs/nsh/defconfig index 6927c8aa234b5..2e6dd4b4d97ed 100644 --- a/boards/arm/nrf52/nrf52832-sparkfun/configs/nsh/defconfig +++ b/boards/arm/nrf52/nrf52832-sparkfun/configs/nsh/defconfig @@ -24,7 +24,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 CONFIG_NRF52_UART0=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/nrf52/nrf52832-sparkfun/src/CMakeLists.txt b/boards/arm/nrf52/nrf52832-sparkfun/src/CMakeLists.txt index 979d808c74e15..c2a5447555496 100644 --- a/boards/arm/nrf52/nrf52832-sparkfun/src/CMakeLists.txt +++ b/boards/arm/nrf52/nrf52832-sparkfun/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS nrf52_boot.c nrf52_bringup.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS nrf52_appinit.c) -endif() - if(CONFIG_ARCH_LEDS) list(APPEND SRCS nrf52_autoleds.c) endif() diff --git a/boards/arm/nrf52/nrf52832-sparkfun/src/Make.defs b/boards/arm/nrf52/nrf52832-sparkfun/src/Make.defs index 9ca77094bb209..fb9c5b4219317 100644 --- a/boards/arm/nrf52/nrf52832-sparkfun/src/Make.defs +++ b/boards/arm/nrf52/nrf52832-sparkfun/src/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = nrf52_boot.c nrf52_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += nrf52_appinit.c -endif - ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += nrf52_autoleds.c endif diff --git a/boards/arm/nrf52/nrf52832-sparkfun/src/nrf52_appinit.c b/boards/arm/nrf52/nrf52832-sparkfun/src/nrf52_appinit.c deleted file mode 100644 index cfa3aa199e8ed..0000000000000 --- a/boards/arm/nrf52/nrf52832-sparkfun/src/nrf52_appinit.c +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** - * boards/arm/nrf52/nrf52832-sparkfun/src/nrf52_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 - -#include -#include -#include - -#include - -#include "chip.h" -#include "nrf52832-sparkfun.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 nrf52_bringup(); -#endif -} diff --git a/boards/arm/nrf52/nrf52840-dk/configs/cdcacm/defconfig b/boards/arm/nrf52/nrf52840-dk/configs/cdcacm/defconfig index 64faa2549cca7..eb2fb7aea60bb 100644 --- a/boards/arm/nrf52/nrf52840-dk/configs/cdcacm/defconfig +++ b/boards/arm/nrf52/nrf52840-dk/configs/cdcacm/defconfig @@ -32,7 +32,6 @@ CONFIG_MM_REGIONS=2 CONFIG_NRF52_HFCLK_XTAL=y CONFIG_NRF52_UART0=y CONFIG_NRF52_USBDEV=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/nrf52/nrf52840-dk/configs/composite/defconfig b/boards/arm/nrf52/nrf52840-dk/configs/composite/defconfig index 617fde68a7cc8..942c1099a4079 100644 --- a/boards/arm/nrf52/nrf52840-dk/configs/composite/defconfig +++ b/boards/arm/nrf52/nrf52840-dk/configs/composite/defconfig @@ -54,7 +54,6 @@ CONFIG_NET_UDP=y CONFIG_NRF52_HFCLK_XTAL=y CONFIG_NRF52_UART0=y CONFIG_NRF52_USBDEV=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/nrf52/nrf52840-dk/configs/highpri/defconfig b/boards/arm/nrf52/nrf52840-dk/configs/highpri/defconfig index a31839d123c7b..41d1d888e09dd 100644 --- a/boards/arm/nrf52/nrf52840-dk/configs/highpri/defconfig +++ b/boards/arm/nrf52/nrf52840-dk/configs/highpri/defconfig @@ -8,6 +8,7 @@ # CONFIG_ARCH_FPU is not set CONFIG_ARCH="arm" CONFIG_ARCH_BOARD="nrf52840-dk" +CONFIG_ARCH_BOARD_COMMON=y CONFIG_ARCH_BOARD_NRF52840_DK=y CONFIG_ARCH_CHIP="nrf52" CONFIG_ARCH_CHIP_NRF52840=y diff --git a/boards/arm/nrf52/nrf52840-dk/configs/ieee802154_6lowpan/defconfig b/boards/arm/nrf52/nrf52840-dk/configs/ieee802154_6lowpan/defconfig index 07a6438fad8bd..bf1d54395dd95 100644 --- a/boards/arm/nrf52/nrf52840-dk/configs/ieee802154_6lowpan/defconfig +++ b/boards/arm/nrf52/nrf52840-dk/configs/ieee802154_6lowpan/defconfig @@ -60,7 +60,6 @@ CONFIG_NRF52_HFCLK_XTAL=y CONFIG_NRF52_RADIO=y CONFIG_NRF52_RADIO_IEEE802154=y CONFIG_NRF52_UART0=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_PROMPT_STRING="nsh-nrf52> " CONFIG_NSH_READLINE=y diff --git a/boards/arm/nrf52/nrf52840-dk/configs/ieee802154_mac/defconfig b/boards/arm/nrf52/nrf52840-dk/configs/ieee802154_mac/defconfig index 4d9a842623e5b..adcd46d786f79 100644 --- a/boards/arm/nrf52/nrf52840-dk/configs/ieee802154_mac/defconfig +++ b/boards/arm/nrf52/nrf52840-dk/configs/ieee802154_mac/defconfig @@ -37,7 +37,6 @@ CONFIG_NRF52_RADIO=y CONFIG_NRF52_RADIO_IEEE802154=y CONFIG_NRF52_TIMER1=y CONFIG_NRF52_UART0=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_PROMPT_STRING="nsh-nrf52> " CONFIG_NSH_READLINE=y diff --git a/boards/arm/nrf52/nrf52840-dk/configs/jumbo/defconfig b/boards/arm/nrf52/nrf52840-dk/configs/jumbo/defconfig index 7ed0451d04bec..84d1d0f3255c1 100644 --- a/boards/arm/nrf52/nrf52840-dk/configs/jumbo/defconfig +++ b/boards/arm/nrf52/nrf52840-dk/configs/jumbo/defconfig @@ -55,7 +55,6 @@ CONFIG_NRF52_SAADC=y CONFIG_NRF52_TIMER2=y CONFIG_NRF52_UART0=y CONFIG_NRF52_WDT=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/nrf52/nrf52840-dk/configs/mcuboot_app/defconfig b/boards/arm/nrf52/nrf52840-dk/configs/mcuboot_app/defconfig index 91ec5f2e315b0..1fcedc108d8b7 100644 --- a/boards/arm/nrf52/nrf52840-dk/configs/mcuboot_app/defconfig +++ b/boards/arm/nrf52/nrf52840-dk/configs/mcuboot_app/defconfig @@ -31,7 +31,6 @@ CONFIG_MM_REGIONS=2 CONFIG_NRF52_APP_FORMAT_MCUBOOT=y CONFIG_NRF52_PROGMEM_OTA_PARTITION=y CONFIG_NRF52_UART0=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/nrf52/nrf52840-dk/configs/nsh/defconfig b/boards/arm/nrf52/nrf52840-dk/configs/nsh/defconfig index bb6f06be291fc..c08d18aac2335 100644 --- a/boards/arm/nrf52/nrf52840-dk/configs/nsh/defconfig +++ b/boards/arm/nrf52/nrf52840-dk/configs/nsh/defconfig @@ -24,7 +24,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 CONFIG_NRF52_UART0=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/nrf52/nrf52840-dk/configs/ostest_tickless/defconfig b/boards/arm/nrf52/nrf52840-dk/configs/ostest_tickless/defconfig index 36205aac38182..32ce40e8dc36a 100644 --- a/boards/arm/nrf52/nrf52840-dk/configs/ostest_tickless/defconfig +++ b/boards/arm/nrf52/nrf52840-dk/configs/ostest_tickless/defconfig @@ -28,7 +28,6 @@ CONFIG_MM_REGIONS=2 CONFIG_NRF52_RTC0=y CONFIG_NRF52_SYSTIMER_RTC=y CONFIG_NRF52_UART0=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/nrf52/nrf52840-dk/configs/rndis/defconfig b/boards/arm/nrf52/nrf52840-dk/configs/rndis/defconfig index 0aed681242c89..1de92433dddbf 100644 --- a/boards/arm/nrf52/nrf52840-dk/configs/rndis/defconfig +++ b/boards/arm/nrf52/nrf52840-dk/configs/rndis/defconfig @@ -50,7 +50,6 @@ CONFIG_NET_UDP=y CONFIG_NRF52_HFCLK_XTAL=y CONFIG_NRF52_UART0=y CONFIG_NRF52_USBDEV=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/nrf52/nrf52840-dk/configs/sdc/defconfig b/boards/arm/nrf52/nrf52840-dk/configs/sdc/defconfig index 3926df30d7f61..e1a6d30664e5f 100644 --- a/boards/arm/nrf52/nrf52840-dk/configs/sdc/defconfig +++ b/boards/arm/nrf52/nrf52840-dk/configs/sdc/defconfig @@ -34,7 +34,6 @@ CONFIG_NRF52_SDC_CENTRAL=y CONFIG_NRF52_SDC_PUB_ADDR=0x010203040506 CONFIG_NRF52_SOFTDEVICE_CONTROLLER=y CONFIG_NRF52_UART0=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/nrf52/nrf52840-dk/configs/sdc_nimble/defconfig b/boards/arm/nrf52/nrf52840-dk/configs/sdc_nimble/defconfig index 81ed7193e282a..b5d9f9999cc99 100644 --- a/boards/arm/nrf52/nrf52840-dk/configs/sdc_nimble/defconfig +++ b/boards/arm/nrf52/nrf52840-dk/configs/sdc_nimble/defconfig @@ -36,7 +36,6 @@ CONFIG_NIMBLE=y CONFIG_NIMBLE_ROLE_PERIPHERAL=y CONFIG_NRF52_SOFTDEVICE_CONTROLLER=y CONFIG_NRF52_UART0=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/nrf52/nrf52840-dk/configs/sx127x/defconfig b/boards/arm/nrf52/nrf52840-dk/configs/sx127x/defconfig index 4dda0fa8797aa..1e6692dfe8b59 100644 --- a/boards/arm/nrf52/nrf52840-dk/configs/sx127x/defconfig +++ b/boards/arm/nrf52/nrf52840-dk/configs/sx127x/defconfig @@ -34,7 +34,6 @@ CONFIG_MM_REGIONS=2 CONFIG_NRF52_GPIOTE=y CONFIG_NRF52_SPI0_MASTER=y CONFIG_NRF52_UART0=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/nrf52/nrf52840-dk/src/CMakeLists.txt b/boards/arm/nrf52/nrf52840-dk/src/CMakeLists.txt index 3c97042488442..15fc550a6184f 100644 --- a/boards/arm/nrf52/nrf52840-dk/src/CMakeLists.txt +++ b/boards/arm/nrf52/nrf52840-dk/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS nrf52_boot.c nrf52_bringup.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS nrf52_appinit.c) -endif() - if(CONFIG_ARCH_LEDS) list(APPEND SRCS nrf52_autoleds.c) else() diff --git a/boards/arm/nrf52/nrf52840-dk/src/Make.defs b/boards/arm/nrf52/nrf52840-dk/src/Make.defs index 2de1ad3164520..b31a20a2534ed 100644 --- a/boards/arm/nrf52/nrf52840-dk/src/Make.defs +++ b/boards/arm/nrf52/nrf52840-dk/src/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = nrf52_boot.c nrf52_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += nrf52_appinit.c -endif - ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += nrf52_autoleds.c else diff --git a/boards/arm/nrf52/nrf52840-dk/src/nrf52_appinit.c b/boards/arm/nrf52/nrf52840-dk/src/nrf52_appinit.c deleted file mode 100644 index e58ea4933ac8b..0000000000000 --- a/boards/arm/nrf52/nrf52840-dk/src/nrf52_appinit.c +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** - * boards/arm/nrf52/nrf52840-dk/src/nrf52_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 - -#include -#include -#include - -#include - -#include "chip.h" -#include "nrf52840-dk.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 nrf52_bringup(); -#endif -} diff --git a/boards/arm/nrf52/nrf52840-dongle/configs/ieee802154_mac/defconfig b/boards/arm/nrf52/nrf52840-dongle/configs/ieee802154_mac/defconfig index 3e3a0a98d22a5..989a2418975c1 100644 --- a/boards/arm/nrf52/nrf52840-dongle/configs/ieee802154_mac/defconfig +++ b/boards/arm/nrf52/nrf52840-dongle/configs/ieee802154_mac/defconfig @@ -42,7 +42,6 @@ CONFIG_NRF52_RADIO=y CONFIG_NRF52_RADIO_IEEE802154=y CONFIG_NRF52_TIMER1=y CONFIG_NRF52_USBDEV=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_PROMPT_STRING="nsh-dongle> " CONFIG_NSH_READLINE=y diff --git a/boards/arm/nrf52/nrf52840-dongle/configs/nsh/defconfig b/boards/arm/nrf52/nrf52840-dongle/configs/nsh/defconfig index 7f20f94027694..23831a509e66c 100644 --- a/boards/arm/nrf52/nrf52840-dongle/configs/nsh/defconfig +++ b/boards/arm/nrf52/nrf52840-dongle/configs/nsh/defconfig @@ -24,7 +24,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 CONFIG_NRF52_UART0=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/nrf52/nrf52840-dongle/configs/usbnsh/defconfig b/boards/arm/nrf52/nrf52840-dongle/configs/usbnsh/defconfig index 0419d6597b1dc..350ebf63850a0 100644 --- a/boards/arm/nrf52/nrf52840-dongle/configs/usbnsh/defconfig +++ b/boards/arm/nrf52/nrf52840-dongle/configs/usbnsh/defconfig @@ -30,7 +30,6 @@ CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 CONFIG_NRF52_HFCLK_XTAL=y CONFIG_NRF52_USBDEV=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/nrf52/nrf52840-dongle/src/CMakeLists.txt b/boards/arm/nrf52/nrf52840-dongle/src/CMakeLists.txt index a927b9548519c..79017024c2e0b 100644 --- a/boards/arm/nrf52/nrf52840-dongle/src/CMakeLists.txt +++ b/boards/arm/nrf52/nrf52840-dongle/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS nrf52_boot.c nrf52_bringup.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS nrf52_appinit.c) -endif() - if(CONFIG_ARCH_LEDS) list(APPEND SRCS nrf52_autoleds.c) else() diff --git a/boards/arm/nrf52/nrf52840-dongle/src/Make.defs b/boards/arm/nrf52/nrf52840-dongle/src/Make.defs index 6f332700ba57f..c202718c5f2ee 100644 --- a/boards/arm/nrf52/nrf52840-dongle/src/Make.defs +++ b/boards/arm/nrf52/nrf52840-dongle/src/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = nrf52_boot.c nrf52_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += nrf52_appinit.c -endif - ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += nrf52_autoleds.c else diff --git a/boards/arm/nrf52/nrf52840-dongle/src/nrf52_appinit.c b/boards/arm/nrf52/nrf52840-dongle/src/nrf52_appinit.c deleted file mode 100644 index 8587c00b05305..0000000000000 --- a/boards/arm/nrf52/nrf52840-dongle/src/nrf52_appinit.c +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** - * boards/arm/nrf52/nrf52840-dongle/src/nrf52_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 - -#include -#include -#include - -#include - -#include "chip.h" -#include "nrf52840-dongle.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 nrf52_bringup(); -#endif -} diff --git a/boards/arm/nrf52/nrf9160-dk-nrf52/configs/ieee802154_6lowpan/defconfig b/boards/arm/nrf52/nrf9160-dk-nrf52/configs/ieee802154_6lowpan/defconfig index 678ef6b3066bf..2f3aafab3b726 100644 --- a/boards/arm/nrf52/nrf9160-dk-nrf52/configs/ieee802154_6lowpan/defconfig +++ b/boards/arm/nrf52/nrf9160-dk-nrf52/configs/ieee802154_6lowpan/defconfig @@ -60,7 +60,6 @@ CONFIG_NRF52_HFCLK_XTAL=y CONFIG_NRF52_RADIO=y CONFIG_NRF52_RADIO_IEEE802154=y CONFIG_NRF52_UART0=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_PROMPT_STRING="nsh-nrf91> " CONFIG_NSH_READLINE=y diff --git a/boards/arm/nrf52/nrf9160-dk-nrf52/configs/ieee802154_mac/defconfig b/boards/arm/nrf52/nrf9160-dk-nrf52/configs/ieee802154_mac/defconfig index 1725e9d4d418b..742cf050328d9 100644 --- a/boards/arm/nrf52/nrf9160-dk-nrf52/configs/ieee802154_mac/defconfig +++ b/boards/arm/nrf52/nrf9160-dk-nrf52/configs/ieee802154_mac/defconfig @@ -36,7 +36,6 @@ CONFIG_NRF52_HFCLK_XTAL=y CONFIG_NRF52_RADIO=y CONFIG_NRF52_RADIO_IEEE802154=y CONFIG_NRF52_UART0=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_PROMPT_STRING="nsh-nrf91> " CONFIG_NSH_READLINE=y diff --git a/boards/arm/nrf52/nrf9160-dk-nrf52/configs/nsh/defconfig b/boards/arm/nrf52/nrf9160-dk-nrf52/configs/nsh/defconfig index 3b418e672394d..052a3794cea21 100644 --- a/boards/arm/nrf52/nrf9160-dk-nrf52/configs/nsh/defconfig +++ b/boards/arm/nrf52/nrf9160-dk-nrf52/configs/nsh/defconfig @@ -21,7 +21,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 CONFIG_NRF52_UART0=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/nrf52/nrf9160-dk-nrf52/src/CMakeLists.txt b/boards/arm/nrf52/nrf9160-dk-nrf52/src/CMakeLists.txt index c9a2a81b5eb69..a8dd50e8a695d 100644 --- a/boards/arm/nrf52/nrf9160-dk-nrf52/src/CMakeLists.txt +++ b/boards/arm/nrf52/nrf9160-dk-nrf52/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS nrf52_boot.c nrf52_bringup.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS nrf52_appinit.c) -endif() - target_sources(board PRIVATE ${SRCS}) if(CONFIG_ARCH_BOARD_COMMON) diff --git a/boards/arm/nrf52/nrf9160-dk-nrf52/src/Make.defs b/boards/arm/nrf52/nrf9160-dk-nrf52/src/Make.defs index 5c72c8e7c136d..d20fb1d48b270 100644 --- a/boards/arm/nrf52/nrf9160-dk-nrf52/src/Make.defs +++ b/boards/arm/nrf52/nrf9160-dk-nrf52/src/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = nrf52_boot.c nrf52_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += nrf52_appinit.c -endif - DEPPATH += --dep-path board VPATH += :board CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board diff --git a/boards/arm/nrf52/nrf9160-dk-nrf52/src/nrf52_appinit.c b/boards/arm/nrf52/nrf9160-dk-nrf52/src/nrf52_appinit.c deleted file mode 100644 index 1c076b0db4ee7..0000000000000 --- a/boards/arm/nrf52/nrf9160-dk-nrf52/src/nrf52_appinit.c +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** - * boards/arm/nrf52/nrf9160-dk-nrf52/src/nrf52_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 - -#include -#include -#include - -#include - -#include "chip.h" -#include "nrf9160-dk-nrf52.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 nrf52_bringup(); -#endif -} diff --git a/boards/arm/nrf52/thingy52/configs/nsh/defconfig b/boards/arm/nrf52/thingy52/configs/nsh/defconfig index 70dd17745e051..a00e8bf53e67c 100644 --- a/boards/arm/nrf52/thingy52/configs/nsh/defconfig +++ b/boards/arm/nrf52/thingy52/configs/nsh/defconfig @@ -20,7 +20,6 @@ CONFIG_BOARD_LOOPSPERMSEC=5500 CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/nrf52/thingy52/src/CMakeLists.txt b/boards/arm/nrf52/thingy52/src/CMakeLists.txt index ee1463d8fd422..97b6c81f684b9 100644 --- a/boards/arm/nrf52/thingy52/src/CMakeLists.txt +++ b/boards/arm/nrf52/thingy52/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS nrf52_boot.c nrf52_bringup.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS nrf52_appinit.c) -endif() - if(CONFIG_ARCH_BUTTONS) list(APPEND SRCS nrf52_buttons.c) endif() diff --git a/boards/arm/nrf52/thingy52/src/Make.defs b/boards/arm/nrf52/thingy52/src/Make.defs index a91cfc3041b13..2028cde2d7ea2 100644 --- a/boards/arm/nrf52/thingy52/src/Make.defs +++ b/boards/arm/nrf52/thingy52/src/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = nrf52_boot.c nrf52_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += nrf52_appinit.c -endif - ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += nrf52_buttons.c endif diff --git a/boards/arm/nrf52/thingy52/src/nrf52_appinit.c b/boards/arm/nrf52/thingy52/src/nrf52_appinit.c deleted file mode 100644 index b646d5baf33ba..0000000000000 --- a/boards/arm/nrf52/thingy52/src/nrf52_appinit.c +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** - * boards/arm/nrf52/thingy52/src/nrf52_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 - -#include -#include -#include - -#include - -#include "chip.h" -#include "thingy52.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 nrf52_bringup(); -#endif -} diff --git a/boards/arm/nrf52/thingy91-nrf52/configs/usbnsh/defconfig b/boards/arm/nrf52/thingy91-nrf52/configs/usbnsh/defconfig index 0fd9929968cba..5e4cc2d8acfc8 100644 --- a/boards/arm/nrf52/thingy91-nrf52/configs/usbnsh/defconfig +++ b/boards/arm/nrf52/thingy91-nrf52/configs/usbnsh/defconfig @@ -31,7 +31,6 @@ CONFIG_MM_REGIONS=2 CONFIG_NRF52_HFCLK_XTAL=y CONFIG_NRF52_UART0=y CONFIG_NRF52_USBDEV=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/nrf52/thingy91-nrf52/src/CMakeLists.txt b/boards/arm/nrf52/thingy91-nrf52/src/CMakeLists.txt index 364a224d0f2bf..14a0efcdd0138 100644 --- a/boards/arm/nrf52/thingy91-nrf52/src/CMakeLists.txt +++ b/boards/arm/nrf52/thingy91-nrf52/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS nrf52_boot.c nrf52_bringup.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS nrf52_appinit.c) -endif() - if(CONFIG_USBDEV) list(APPEND SRCS nrf52_usb.c) endif() diff --git a/boards/arm/nrf52/thingy91-nrf52/src/Make.defs b/boards/arm/nrf52/thingy91-nrf52/src/Make.defs index 0b8a0b5882d18..d8ca53ffb6599 100644 --- a/boards/arm/nrf52/thingy91-nrf52/src/Make.defs +++ b/boards/arm/nrf52/thingy91-nrf52/src/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = nrf52_boot.c nrf52_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += nrf52_appinit.c -endif - ifeq ($(CONFIG_USBDEV),y) CSRCS += nrf52_usb.c endif diff --git a/boards/arm/nrf52/thingy91-nrf52/src/nrf52_appinit.c b/boards/arm/nrf52/thingy91-nrf52/src/nrf52_appinit.c deleted file mode 100644 index c44b81a19daa5..0000000000000 --- a/boards/arm/nrf52/thingy91-nrf52/src/nrf52_appinit.c +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** - * boards/arm/nrf52/thingy91-nrf52/src/nrf52_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 - -#include -#include -#include - -#include - -#include "chip.h" -#include "thingy91-nrf52.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 nrf52_bringup(); -#endif -} diff --git a/boards/arm/nrf52/xiao-nrf52840/configs/jumbo/defconfig b/boards/arm/nrf52/xiao-nrf52840/configs/jumbo/defconfig index 61104066c3f85..82b7c8aaa847d 100644 --- a/boards/arm/nrf52/xiao-nrf52840/configs/jumbo/defconfig +++ b/boards/arm/nrf52/xiao-nrf52840/configs/jumbo/defconfig @@ -36,7 +36,6 @@ CONFIG_MM_REGIONS=2 CONFIG_NRF52_GPIOTE=y CONFIG_NRF52_HFCLK_XTAL=y CONFIG_NRF52_USBDEV=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/nrf52/xiao-nrf52840/configs/nsh/defconfig b/boards/arm/nrf52/xiao-nrf52840/configs/nsh/defconfig index b2300cc92a858..78391a7551f6b 100644 --- a/boards/arm/nrf52/xiao-nrf52840/configs/nsh/defconfig +++ b/boards/arm/nrf52/xiao-nrf52840/configs/nsh/defconfig @@ -25,7 +25,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 CONFIG_NRF52_UART0=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/nrf52/xiao-nrf52840/configs/usbnsh/defconfig b/boards/arm/nrf52/xiao-nrf52840/configs/usbnsh/defconfig index 05399f3969ede..0d4bf7a87e432 100644 --- a/boards/arm/nrf52/xiao-nrf52840/configs/usbnsh/defconfig +++ b/boards/arm/nrf52/xiao-nrf52840/configs/usbnsh/defconfig @@ -31,7 +31,6 @@ CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 CONFIG_NRF52_HFCLK_XTAL=y CONFIG_NRF52_USBDEV=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/nrf52/xiao-nrf52840/src/CMakeLists.txt b/boards/arm/nrf52/xiao-nrf52840/src/CMakeLists.txt index 2c57de4d07b6a..50db1037f7d04 100644 --- a/boards/arm/nrf52/xiao-nrf52840/src/CMakeLists.txt +++ b/boards/arm/nrf52/xiao-nrf52840/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS nrf52_boot.c nrf52_bringup.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS nrf52_appinit.c) -endif() - if(CONFIG_ARCH_LEDS) list(APPEND SRCS nrf52_autoleds.c) else() diff --git a/boards/arm/nrf52/xiao-nrf52840/src/Make.defs b/boards/arm/nrf52/xiao-nrf52840/src/Make.defs index c657eab3d97db..16b5978098bac 100644 --- a/boards/arm/nrf52/xiao-nrf52840/src/Make.defs +++ b/boards/arm/nrf52/xiao-nrf52840/src/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = nrf52_boot.c nrf52_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += nrf52_appinit.c -endif - ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += nrf52_autoleds.c else diff --git a/boards/arm/nrf52/xiao-nrf52840/src/nrf52_appinit.c b/boards/arm/nrf52/xiao-nrf52840/src/nrf52_appinit.c deleted file mode 100644 index f81bbed6162b8..0000000000000 --- a/boards/arm/nrf52/xiao-nrf52840/src/nrf52_appinit.c +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** - * boards/arm/nrf52/xiao-nrf52840/src/nrf52_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 - -#include -#include -#include - -#include - -#include "chip.h" -#include "xiao-nrf52840.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 nrf52_bringup(); -#endif -} diff --git a/boards/arm/nrf53/nrf5340-audio-dk/configs/nsh_cpuapp/defconfig b/boards/arm/nrf53/nrf5340-audio-dk/configs/nsh_cpuapp/defconfig index a4e64dca00cfa..7a5824583d7f1 100644 --- a/boards/arm/nrf53/nrf5340-audio-dk/configs/nsh_cpuapp/defconfig +++ b/boards/arm/nrf53/nrf5340-audio-dk/configs/nsh_cpuapp/defconfig @@ -26,7 +26,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 CONFIG_NRF53_UART0=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/nrf53/nrf5340-audio-dk/src/CMakeLists.txt b/boards/arm/nrf53/nrf5340-audio-dk/src/CMakeLists.txt index c081d74f19e04..5ca668a38071f 100644 --- a/boards/arm/nrf53/nrf5340-audio-dk/src/CMakeLists.txt +++ b/boards/arm/nrf53/nrf5340-audio-dk/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS nrf53_boot.c nrf53_bringup.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS nrf53_appinit.c) -endif() - if(CONFIG_ARCH_LEDS) list(APPEND SRCS nrf53_autoleds.c) else() diff --git a/boards/arm/nrf53/nrf5340-audio-dk/src/Make.defs b/boards/arm/nrf53/nrf5340-audio-dk/src/Make.defs index 99765d4888589..74a7837d9b657 100644 --- a/boards/arm/nrf53/nrf5340-audio-dk/src/Make.defs +++ b/boards/arm/nrf53/nrf5340-audio-dk/src/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = nrf53_boot.c nrf53_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += nrf53_appinit.c -endif - ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += nrf53_autoleds.c else diff --git a/boards/arm/nrf53/nrf5340-audio-dk/src/nrf53_appinit.c b/boards/arm/nrf53/nrf5340-audio-dk/src/nrf53_appinit.c deleted file mode 100644 index aec393e291c46..0000000000000 --- a/boards/arm/nrf53/nrf5340-audio-dk/src/nrf53_appinit.c +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** - * boards/arm/nrf53/nrf5340-audio-dk/src/nrf53_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 - -#include -#include -#include - -#include - -#include "chip.h" -#include "nrf5340-audio-dk.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 nrf53_bringup(); -#endif -} diff --git a/boards/arm/nrf53/nrf5340-dk/configs/adc_cpuapp/defconfig b/boards/arm/nrf53/nrf5340-dk/configs/adc_cpuapp/defconfig index 6b1246a849c92..1d9e1115a2b34 100644 --- a/boards/arm/nrf53/nrf5340-dk/configs/adc_cpuapp/defconfig +++ b/boards/arm/nrf53/nrf5340-dk/configs/adc_cpuapp/defconfig @@ -34,7 +34,6 @@ CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 CONFIG_NRF53_SAADC=y CONFIG_NRF53_UART0=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/nrf53/nrf5340-dk/configs/buttons_cpuapp/defconfig b/boards/arm/nrf53/nrf5340-dk/configs/buttons_cpuapp/defconfig index 8d9982bba3cdd..37c3ed49969d4 100644 --- a/boards/arm/nrf53/nrf5340-dk/configs/buttons_cpuapp/defconfig +++ b/boards/arm/nrf53/nrf5340-dk/configs/buttons_cpuapp/defconfig @@ -33,7 +33,6 @@ CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 CONFIG_NRF53_GPIOTE=y CONFIG_NRF53_UART0=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/nrf53/nrf5340-dk/configs/composite_cpuapp/defconfig b/boards/arm/nrf53/nrf5340-dk/configs/composite_cpuapp/defconfig index ef133ea456a41..72b1c11b8c094 100644 --- a/boards/arm/nrf53/nrf5340-dk/configs/composite_cpuapp/defconfig +++ b/boards/arm/nrf53/nrf5340-dk/configs/composite_cpuapp/defconfig @@ -52,7 +52,6 @@ CONFIG_NET_UDP=y CONFIG_NRF53_HFCLK_XTAL=y CONFIG_NRF53_UART0=y CONFIG_NRF53_USBDEV=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/nrf53/nrf5340-dk/configs/mcuboot_app_cpuapp/defconfig b/boards/arm/nrf53/nrf5340-dk/configs/mcuboot_app_cpuapp/defconfig index e2644f10ad111..60938fa623cde 100644 --- a/boards/arm/nrf53/nrf5340-dk/configs/mcuboot_app_cpuapp/defconfig +++ b/boards/arm/nrf53/nrf5340-dk/configs/mcuboot_app_cpuapp/defconfig @@ -35,7 +35,6 @@ CONFIG_NRF53_APP_FORMAT_MCUBOOT=y CONFIG_NRF53_MCUBOOT_HAVE_SCRACH=y CONFIG_NRF53_PROGMEM_OTA_PARTITION=y CONFIG_NRF53_UART0=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/nrf53/nrf5340-dk/configs/nsh_cpuapp/defconfig b/boards/arm/nrf53/nrf5340-dk/configs/nsh_cpuapp/defconfig index 175fa30f8b5af..4a346dd699347 100644 --- a/boards/arm/nrf53/nrf5340-dk/configs/nsh_cpuapp/defconfig +++ b/boards/arm/nrf53/nrf5340-dk/configs/nsh_cpuapp/defconfig @@ -26,7 +26,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 CONFIG_NRF53_UART0=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/nrf53/nrf5340-dk/configs/nsh_cpunet/defconfig b/boards/arm/nrf53/nrf5340-dk/configs/nsh_cpunet/defconfig index 79b002a4f6f68..82cff3a6bd5da 100644 --- a/boards/arm/nrf53/nrf5340-dk/configs/nsh_cpunet/defconfig +++ b/boards/arm/nrf53/nrf5340-dk/configs/nsh_cpunet/defconfig @@ -27,7 +27,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 CONFIG_NRF53_UART0=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/nrf53/nrf5340-dk/configs/ostest_tickless_cpuapp/defconfig b/boards/arm/nrf53/nrf5340-dk/configs/ostest_tickless_cpuapp/defconfig index 2b22bd5d212f7..8bb1721a03fcf 100644 --- a/boards/arm/nrf53/nrf5340-dk/configs/ostest_tickless_cpuapp/defconfig +++ b/boards/arm/nrf53/nrf5340-dk/configs/ostest_tickless_cpuapp/defconfig @@ -28,7 +28,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 CONFIG_NRF53_UART0=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/nrf53/nrf5340-dk/configs/pwm_cpuapp/defconfig b/boards/arm/nrf53/nrf5340-dk/configs/pwm_cpuapp/defconfig index cc136b31c5482..0a05c8e40a7cd 100644 --- a/boards/arm/nrf53/nrf5340-dk/configs/pwm_cpuapp/defconfig +++ b/boards/arm/nrf53/nrf5340-dk/configs/pwm_cpuapp/defconfig @@ -35,7 +35,6 @@ CONFIG_NRF53_PWM0_CH2=y CONFIG_NRF53_PWM0_CH3=y CONFIG_NRF53_PWM_MULTICHAN=y CONFIG_NRF53_UART0=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/nrf53/nrf5340-dk/configs/qspi_cpuapp/defconfig b/boards/arm/nrf53/nrf5340-dk/configs/qspi_cpuapp/defconfig index 4e6f463aad3cf..13849160fe9e1 100644 --- a/boards/arm/nrf53/nrf5340-dk/configs/qspi_cpuapp/defconfig +++ b/boards/arm/nrf53/nrf5340-dk/configs/qspi_cpuapp/defconfig @@ -33,7 +33,6 @@ CONFIG_NRF53_QSPI=y CONFIG_NRF53_QSPI_RXDELAY=1 CONFIG_NRF53_UART0=y CONFIG_NRF53_USE_HFCLK192M=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/nrf53/nrf5340-dk/configs/rpmsghci_bt_cpuapp/defconfig b/boards/arm/nrf53/nrf5340-dk/configs/rpmsghci_bt_cpuapp/defconfig index 36c6762051fd7..74258d68f7551 100644 --- a/boards/arm/nrf53/nrf5340-dk/configs/rpmsghci_bt_cpuapp/defconfig +++ b/boards/arm/nrf53/nrf5340-dk/configs/rpmsghci_bt_cpuapp/defconfig @@ -38,7 +38,6 @@ CONFIG_NETDEV_LATEINIT=y CONFIG_NET_BLUETOOTH=y CONFIG_NRF53_OSCILLATOR_LFXO=y CONFIG_NRF53_UART0=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/nrf53/nrf5340-dk/configs/rpmsghci_nimble_cpuapp/defconfig b/boards/arm/nrf53/nrf5340-dk/configs/rpmsghci_nimble_cpuapp/defconfig index dd09eb8b62695..11f586205016e 100644 --- a/boards/arm/nrf53/nrf5340-dk/configs/rpmsghci_nimble_cpuapp/defconfig +++ b/boards/arm/nrf53/nrf5340-dk/configs/rpmsghci_nimble_cpuapp/defconfig @@ -44,7 +44,6 @@ CONFIG_NIMBLE=y CONFIG_NIMBLE_ROLE_PERIPHERAL=y CONFIG_NRF53_OSCILLATOR_LFXO=y CONFIG_NRF53_UART0=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/nrf53/nrf5340-dk/configs/rpmsghci_sdc_cpunet/defconfig b/boards/arm/nrf53/nrf5340-dk/configs/rpmsghci_sdc_cpunet/defconfig index 2a6c9fc6a8c43..af982b0f2c93f 100644 --- a/boards/arm/nrf53/nrf5340-dk/configs/rpmsghci_sdc_cpunet/defconfig +++ b/boards/arm/nrf53/nrf5340-dk/configs/rpmsghci_sdc_cpunet/defconfig @@ -20,7 +20,6 @@ CONFIG_ARCH_STDARG_H=y CONFIG_BLUETOOTH_RPMSG_SERVER=y CONFIG_BOARDCTL=y CONFIG_BOARDCTL_MKRD=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=5500 CONFIG_DEV_SIMPLE_ADDRENV=y CONFIG_DRIVERS_BLUETOOTH=y diff --git a/boards/arm/nrf53/nrf5340-dk/configs/rptun_cpuapp/defconfig b/boards/arm/nrf53/nrf5340-dk/configs/rptun_cpuapp/defconfig index 2ad0db905462a..10f64322d7eed 100644 --- a/boards/arm/nrf53/nrf5340-dk/configs/rptun_cpuapp/defconfig +++ b/boards/arm/nrf53/nrf5340-dk/configs/rptun_cpuapp/defconfig @@ -25,7 +25,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 CONFIG_NRF53_UART0=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/nrf53/nrf5340-dk/configs/rptun_cpunet/defconfig b/boards/arm/nrf53/nrf5340-dk/configs/rptun_cpunet/defconfig index efb38e6cfc825..85878012a7152 100644 --- a/boards/arm/nrf53/nrf5340-dk/configs/rptun_cpunet/defconfig +++ b/boards/arm/nrf53/nrf5340-dk/configs/rptun_cpunet/defconfig @@ -25,7 +25,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 CONFIG_NRF53_UART0=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/nrf53/nrf5340-dk/configs/sdc_cpunet/defconfig b/boards/arm/nrf53/nrf5340-dk/configs/sdc_cpunet/defconfig index d1d3fe10bbb79..d74e8473f08c5 100644 --- a/boards/arm/nrf53/nrf5340-dk/configs/sdc_cpunet/defconfig +++ b/boards/arm/nrf53/nrf5340-dk/configs/sdc_cpunet/defconfig @@ -45,7 +45,6 @@ CONFIG_NRF53_SDC_PERIPHERAL_COUNT=0 CONFIG_NRF53_SDC_PUB_ADDR=0x0102030405 CONFIG_NRF53_SOFTDEVICE_CONTROLLER=y CONFIG_NRF53_UART0=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_RAM_SIZE=65535 CONFIG_RAM_START=0x21000000 diff --git a/boards/arm/nrf53/nrf5340-dk/configs/timer_cpuapp/defconfig b/boards/arm/nrf53/nrf5340-dk/configs/timer_cpuapp/defconfig index 53de01ad2bf60..5ba5d99b29228 100644 --- a/boards/arm/nrf53/nrf5340-dk/configs/timer_cpuapp/defconfig +++ b/boards/arm/nrf53/nrf5340-dk/configs/timer_cpuapp/defconfig @@ -31,7 +31,6 @@ CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 CONFIG_NRF53_TIMER0=y CONFIG_NRF53_UART0=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/nrf53/nrf5340-dk/src/CMakeLists.txt b/boards/arm/nrf53/nrf5340-dk/src/CMakeLists.txt index 9955186065b67..8fb097a1d95ef 100644 --- a/boards/arm/nrf53/nrf5340-dk/src/CMakeLists.txt +++ b/boards/arm/nrf53/nrf5340-dk/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS nrf53_boot.c nrf53_bringup.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS nrf53_appinit.c) -endif() - if(CONFIG_NRF53_APPCORE) list(APPEND SRCS nrf53_cpunet_boot.c) endif() diff --git a/boards/arm/nrf53/nrf5340-dk/src/Make.defs b/boards/arm/nrf53/nrf5340-dk/src/Make.defs index 7f9cc96e158b5..6a097f251968a 100644 --- a/boards/arm/nrf53/nrf5340-dk/src/Make.defs +++ b/boards/arm/nrf53/nrf5340-dk/src/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = nrf53_boot.c nrf53_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += nrf53_appinit.c -endif - ifeq ($(CONFIG_NRF53_APPCORE),y) CSRCS += nrf53_cpunet_boot.c endif diff --git a/boards/arm/nrf53/nrf5340-dk/src/nrf53_appinit.c b/boards/arm/nrf53/nrf5340-dk/src/nrf53_appinit.c deleted file mode 100644 index 3ac5970603970..0000000000000 --- a/boards/arm/nrf53/nrf5340-dk/src/nrf53_appinit.c +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** - * boards/arm/nrf53/nrf5340-dk/src/nrf53_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 - -#include -#include -#include - -#include - -#include "chip.h" -#include "nrf5340-dk.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 nrf53_bringup(); -#endif -} diff --git a/boards/arm/nrf53/thingy53/configs/composite_cpuapp/defconfig b/boards/arm/nrf53/thingy53/configs/composite_cpuapp/defconfig index 58af835abb0c8..7294f097867f4 100644 --- a/boards/arm/nrf53/thingy53/configs/composite_cpuapp/defconfig +++ b/boards/arm/nrf53/thingy53/configs/composite_cpuapp/defconfig @@ -52,7 +52,6 @@ CONFIG_NET_UDP=y CONFIG_NRF53_HFCLK_XTAL=y CONFIG_NRF53_UART0=y CONFIG_NRF53_USBDEV=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/nrf53/thingy53/configs/nsh_cpuapp/defconfig b/boards/arm/nrf53/thingy53/configs/nsh_cpuapp/defconfig index 88c78ff50f897..2911a1629614a 100644 --- a/boards/arm/nrf53/thingy53/configs/nsh_cpuapp/defconfig +++ b/boards/arm/nrf53/thingy53/configs/nsh_cpuapp/defconfig @@ -24,7 +24,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 CONFIG_NRF53_UART0=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/nrf53/thingy53/configs/nsh_cpunet/defconfig b/boards/arm/nrf53/thingy53/configs/nsh_cpunet/defconfig index edc0594ae36f9..369b5da603dc2 100644 --- a/boards/arm/nrf53/thingy53/configs/nsh_cpunet/defconfig +++ b/boards/arm/nrf53/thingy53/configs/nsh_cpunet/defconfig @@ -24,7 +24,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 CONFIG_NRF53_UART0=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/nrf53/thingy53/configs/rgbled_cpuapp/defconfig b/boards/arm/nrf53/thingy53/configs/rgbled_cpuapp/defconfig index 2fc02d93f3df9..3367124cab73e 100644 --- a/boards/arm/nrf53/thingy53/configs/rgbled_cpuapp/defconfig +++ b/boards/arm/nrf53/thingy53/configs/rgbled_cpuapp/defconfig @@ -47,7 +47,6 @@ CONFIG_NRF53_PWM_MULTICHAN=y CONFIG_NRF53_SPI1_MASTER=y CONFIG_NRF53_USBDEV=y CONFIG_NRF53_USE_HFCLK192M=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/nrf53/thingy53/configs/rpmsghci_nimble_cpuapp/defconfig b/boards/arm/nrf53/thingy53/configs/rpmsghci_nimble_cpuapp/defconfig index e35f35be4e4aa..323e8dd971535 100644 --- a/boards/arm/nrf53/thingy53/configs/rpmsghci_nimble_cpuapp/defconfig +++ b/boards/arm/nrf53/thingy53/configs/rpmsghci_nimble_cpuapp/defconfig @@ -44,7 +44,6 @@ CONFIG_NIMBLE=y CONFIG_NIMBLE_ROLE_PERIPHERAL=y CONFIG_NRF53_OSCILLATOR_LFXO=y CONFIG_NRF53_UART0=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/nrf53/thingy53/configs/rpmsghci_sdc_cpunet/defconfig b/boards/arm/nrf53/thingy53/configs/rpmsghci_sdc_cpunet/defconfig index eba8f1384f6e0..e18384d28ecd5 100644 --- a/boards/arm/nrf53/thingy53/configs/rpmsghci_sdc_cpunet/defconfig +++ b/boards/arm/nrf53/thingy53/configs/rpmsghci_sdc_cpunet/defconfig @@ -20,7 +20,6 @@ CONFIG_ARCH_STDARG_H=y CONFIG_BLUETOOTH_RPMSG_SERVER=y CONFIG_BOARDCTL=y CONFIG_BOARDCTL_MKRD=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=5500 CONFIG_DEV_SIMPLE_ADDRENV=y CONFIG_DRIVERS_BLUETOOTH=y diff --git a/boards/arm/nrf53/thingy53/src/CMakeLists.txt b/boards/arm/nrf53/thingy53/src/CMakeLists.txt index 629e921214a9e..7d4769cfe4915 100644 --- a/boards/arm/nrf53/thingy53/src/CMakeLists.txt +++ b/boards/arm/nrf53/thingy53/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS nrf53_boot.c nrf53_bringup.c nrf53_sensors.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS nrf53_appinit.c) -endif() - if(CONFIG_NRF53_APPCORE) list(APPEND SRCS nrf53_cpunet_boot.c) endif() diff --git a/boards/arm/nrf53/thingy53/src/Make.defs b/boards/arm/nrf53/thingy53/src/Make.defs index c3e124b8b8bd5..75c4b581370bf 100644 --- a/boards/arm/nrf53/thingy53/src/Make.defs +++ b/boards/arm/nrf53/thingy53/src/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = nrf53_boot.c nrf53_bringup.c nrf53_sensors.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += nrf53_appinit.c -endif - ifeq ($(CONFIG_NRF53_APPCORE),y) CSRCS += nrf53_cpunet_boot.c endif diff --git a/boards/arm/nrf53/thingy53/src/nrf53_appinit.c b/boards/arm/nrf53/thingy53/src/nrf53_appinit.c deleted file mode 100644 index a0273e766c213..0000000000000 --- a/boards/arm/nrf53/thingy53/src/nrf53_appinit.c +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** - * boards/arm/nrf53/thingy53/src/nrf53_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 - -#include -#include -#include - -#include - -#include "chip.h" -#include "thingy53.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 nrf53_bringup(); -#endif -} diff --git a/boards/arm/nrf91/nrf9160-dk/configs/mcuboot_app/defconfig b/boards/arm/nrf91/nrf9160-dk/configs/mcuboot_app/defconfig index d4fb0e386cc9d..1eb472d0b5256 100644 --- a/boards/arm/nrf91/nrf9160-dk/configs/mcuboot_app/defconfig +++ b/boards/arm/nrf91/nrf9160-dk/configs/mcuboot_app/defconfig @@ -35,7 +35,6 @@ CONFIG_NRF91_APP_FORMAT_MCUBOOT=y CONFIG_NRF91_MCUBOOT_HAVE_SCRACH=y CONFIG_NRF91_PROGMEM_OTA_PARTITION=y CONFIG_NRF91_UART0=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/nrf91/nrf9160-dk/configs/modem_ns/defconfig b/boards/arm/nrf91/nrf9160-dk/configs/modem_ns/defconfig index 3c1ab2b372d87..9d7a68d8907b5 100644 --- a/boards/arm/nrf91/nrf9160-dk/configs/modem_ns/defconfig +++ b/boards/arm/nrf91/nrf9160-dk/configs/modem_ns/defconfig @@ -52,7 +52,6 @@ CONFIG_NRF91_APP_FORMAT_MCUBOOT=y CONFIG_NRF91_MODEM=y CONFIG_NRF91_PROGMEM_OTA_PARTITION=y CONFIG_NRF91_UART0=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/nrf91/nrf9160-dk/configs/nsh/defconfig b/boards/arm/nrf91/nrf9160-dk/configs/nsh/defconfig index 61c9f494d43bb..3b41165e8f06d 100644 --- a/boards/arm/nrf91/nrf9160-dk/configs/nsh/defconfig +++ b/boards/arm/nrf91/nrf9160-dk/configs/nsh/defconfig @@ -26,7 +26,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 CONFIG_NRF91_UART0=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/nrf91/nrf9160-dk/configs/ostest_tickless/defconfig b/boards/arm/nrf91/nrf9160-dk/configs/ostest_tickless/defconfig index d3b49b68d653c..6f3231062696f 100644 --- a/boards/arm/nrf91/nrf9160-dk/configs/ostest_tickless/defconfig +++ b/boards/arm/nrf91/nrf9160-dk/configs/ostest_tickless/defconfig @@ -30,7 +30,6 @@ CONFIG_MM_REGIONS=2 CONFIG_NRF91_RTC0=y CONFIG_NRF91_SYSTIMER_RTC=y CONFIG_NRF91_UART0=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/nrf91/nrf9160-dk/src/CMakeLists.txt b/boards/arm/nrf91/nrf9160-dk/src/CMakeLists.txt index 9f2614f121dfa..b5d695e28684c 100644 --- a/boards/arm/nrf91/nrf9160-dk/src/CMakeLists.txt +++ b/boards/arm/nrf91/nrf9160-dk/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS nrf91_boot.c nrf91_bringup.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS nrf91_appinit.c) -endif() - if(CONFIG_ARCH_LEDS) list(APPEND SRCS nrf91_autoleds.c) else() diff --git a/boards/arm/nrf91/nrf9160-dk/src/Make.defs b/boards/arm/nrf91/nrf9160-dk/src/Make.defs index 24deac0e54ea0..aad8f179fb7d7 100644 --- a/boards/arm/nrf91/nrf9160-dk/src/Make.defs +++ b/boards/arm/nrf91/nrf9160-dk/src/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = nrf91_boot.c nrf91_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += nrf91_appinit.c -endif - ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += nrf91_autoleds.c else diff --git a/boards/arm/nrf91/nrf9160-dk/src/nrf91_appinit.c b/boards/arm/nrf91/nrf9160-dk/src/nrf91_appinit.c deleted file mode 100644 index e2924c16db3ce..0000000000000 --- a/boards/arm/nrf91/nrf9160-dk/src/nrf91_appinit.c +++ /dev/null @@ -1,90 +0,0 @@ -/**************************************************************************** - * boards/arm/nrf91/nrf9160-dk/src/nrf91_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 - -#include -#include -#include - -#include - -#include "chip.h" -#include "nrf9160-dk.h" - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: arm_netinitialize - * - * Description: - * Dummy function expected to start-up logic. - * - ****************************************************************************/ - -#if defined(CONFIG_NET) && !defined(CONFIG_NETDEV_LATEINIT) -void arm_netinitialize(void) -{ -} -#endif - -/**************************************************************************** - * 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 nrf91_bringup(); -#endif -} diff --git a/boards/arm/nrf91/nrf9160-dk/src/nrf91_bringup.c b/boards/arm/nrf91/nrf9160-dk/src/nrf91_bringup.c index a5b4b9718274a..08d42c78485e4 100644 --- a/boards/arm/nrf91/nrf9160-dk/src/nrf91_bringup.c +++ b/boards/arm/nrf91/nrf9160-dk/src/nrf91_bringup.c @@ -60,6 +60,7 @@ # include "nrf91_timer.h" #endif +#include "chip.h" #include "nrf9160-dk.h" /**************************************************************************** @@ -77,6 +78,20 @@ * Public Functions ****************************************************************************/ +/**************************************************************************** + * Name: arm_netinitialize + * + * Description: + * Dummy function expected to start-up logic. + * + ****************************************************************************/ + +#if defined(CONFIG_NET) && !defined(CONFIG_NETDEV_LATEINIT) +void arm_netinitialize(void) +{ +} +#endif + /**************************************************************************** * Name: nrf91_bringup * diff --git a/boards/arm/nrf91/thingy91/configs/nsh_nrf52/defconfig b/boards/arm/nrf91/thingy91/configs/nsh_nrf52/defconfig index 28c81bde5f74a..4513b6b0dc9d3 100644 --- a/boards/arm/nrf91/thingy91/configs/nsh_nrf52/defconfig +++ b/boards/arm/nrf91/thingy91/configs/nsh_nrf52/defconfig @@ -26,7 +26,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 CONFIG_NRF91_UART0=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/nrf91/thingy91/configs/nsh_rtt/defconfig b/boards/arm/nrf91/thingy91/configs/nsh_rtt/defconfig index 9c090ce0f5d4a..7d3599cd06e00 100644 --- a/boards/arm/nrf91/thingy91/configs/nsh_rtt/defconfig +++ b/boards/arm/nrf91/thingy91/configs/nsh_rtt/defconfig @@ -24,7 +24,6 @@ CONFIG_EXPERIMENTAL=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/nrf91/thingy91/src/CMakeLists.txt b/boards/arm/nrf91/thingy91/src/CMakeLists.txt index 3917fe8cf1c73..991764c8e7854 100644 --- a/boards/arm/nrf91/thingy91/src/CMakeLists.txt +++ b/boards/arm/nrf91/thingy91/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS nrf91_boot.c nrf91_bringup.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS nrf91_appinit.c) -endif() - if(CONFIG_ARCH_BUTTONS) list(APPEND SRCS nrf91_buttons.c) endif() diff --git a/boards/arm/nrf91/thingy91/src/Make.defs b/boards/arm/nrf91/thingy91/src/Make.defs index 3d3ff590d9616..599f6f5a9b836 100644 --- a/boards/arm/nrf91/thingy91/src/Make.defs +++ b/boards/arm/nrf91/thingy91/src/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = nrf91_boot.c nrf91_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += nrf91_appinit.c -endif - ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += nrf91_buttons.c endif diff --git a/boards/arm/nrf91/thingy91/src/nrf91_appinit.c b/boards/arm/nrf91/thingy91/src/nrf91_appinit.c deleted file mode 100644 index 09337bc5653ea..0000000000000 --- a/boards/arm/nrf91/thingy91/src/nrf91_appinit.c +++ /dev/null @@ -1,90 +0,0 @@ -/**************************************************************************** - * boards/arm/nrf91/thingy91/src/nrf91_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 - -#include -#include -#include - -#include - -#include "chip.h" -#include "thingy91.h" - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: arm_netinitialize - * - * Description: - * Dummy function expected to start-up logic. - * - ****************************************************************************/ - -#if defined(CONFIG_NET) && !defined(CONFIG_NETDEV_LATEINIT) -void arm_netinitialize(void) -{ -} -#endif - -/**************************************************************************** - * 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 nrf91_bringup(); -#endif -} diff --git a/boards/arm/nuc1xx/nutiny-nuc120/src/nuc_boardinitialize.c b/boards/arm/nuc1xx/nutiny-nuc120/src/nuc_boardinitialize.c index fdb63717e22a8..43e55484c2765 100644 --- a/boards/arm/nuc1xx/nutiny-nuc120/src/nuc_boardinitialize.c +++ b/boards/arm/nuc1xx/nutiny-nuc120/src/nuc_boardinitialize.c @@ -88,3 +88,23 @@ void nuc_boardinitialize(void) nuc_led_initialize(); #endif } + +/**************************************************************************** + * 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ +} +#endif diff --git a/boards/arm/phy62xx/phy6222/configs/nsh/defconfig b/boards/arm/phy62xx/phy6222/configs/nsh/defconfig index db3518b29477d..e93a1c143776e 100644 --- a/boards/arm/phy62xx/phy6222/configs/nsh/defconfig +++ b/boards/arm/phy62xx/phy6222/configs/nsh/defconfig @@ -18,7 +18,6 @@ CONFIG_ARCH_BOARD_PHY6222=y CONFIG_ARCH_CHIP="phy62xx" CONFIG_ARCH_CHIP_PHY6222=y CONFIG_ARCH_CHIP_PHY62XX=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=0 CONFIG_DEBUG_FULLOPT=y CONFIG_DEBUG_SYMBOLS=y diff --git a/boards/arm/phy62xx/phy6222/configs/phy_sbp/defconfig b/boards/arm/phy62xx/phy6222/configs/phy_sbp/defconfig index 1924502479e6b..9ed2ec800f381 100644 --- a/boards/arm/phy62xx/phy6222/configs/phy_sbp/defconfig +++ b/boards/arm/phy62xx/phy6222/configs/phy_sbp/defconfig @@ -39,7 +39,6 @@ CONFIG_ARCH_BOARD_PHY6222=y CONFIG_ARCH_CHIP="phy62xx" CONFIG_ARCH_CHIP_PHY6222=y CONFIG_ARCH_CHIP_PHY62XX=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=0 CONFIG_BUILTIN=y CONFIG_DEBUG_FULLOPT=y diff --git a/boards/arm/phy62xx/phy6222/src/Makefile b/boards/arm/phy62xx/phy6222/src/Makefile index acc6499f6cfbc..2127875e556a7 100644 --- a/boards/arm/phy62xx/phy6222/src/Makefile +++ b/boards/arm/phy62xx/phy6222/src/Makefile @@ -27,8 +27,6 @@ CSRCS += userleds.c CSRCS += buttons.c -CSRCS += appinit.c - CSRCS += reset.c ifeq ($(CONFIG_ETC_ROMFS),y) diff --git a/boards/arm/phy62xx/phy6222/src/appinit.c b/boards/arm/phy62xx/phy6222/src/appinit.c deleted file mode 100644 index 60b5decc4136d..0000000000000 --- a/boards/arm/phy62xx/phy6222/src/appinit.c +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** - * boards/arm/phy62xx/phy6222/src/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 - -#include - -#include - -#include "phy6222.h" - -/**************************************************************************** - * 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 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) -{ - /* Did we already initialize via board_late_initialize()? */ - -#ifndef CONFIG_BOARD_LATE_INITIALIZE - return phy62xx_bringup(); -#else - return 0; -#endif -} diff --git a/boards/arm/qemu/qemu-armv7a/configs/full/defconfig b/boards/arm/qemu/qemu-armv7a/configs/full/defconfig index 91bb33a7c592c..72e72c33c470d 100644 --- a/boards/arm/qemu/qemu-armv7a/configs/full/defconfig +++ b/boards/arm/qemu/qemu-armv7a/configs/full/defconfig @@ -20,7 +20,6 @@ CONFIG_ARCH_LOWVECTORS=y CONFIG_ARM_THUMB=y CONFIG_AUDIO=y CONFIG_BATTERY_CHARGER=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=393693 CONFIG_BUILTIN=y CONFIG_CRYPTO=y @@ -98,7 +97,6 @@ CONFIG_NET=y CONFIG_NETDEV_IFINDEX=y CONFIG_NETDEV_LATEINIT=y CONFIG_NET_SOCKOPTS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/qemu/qemu-armv7a/configs/gdbstub/defconfig b/boards/arm/qemu/qemu-armv7a/configs/gdbstub/defconfig index a6030ebaba031..197c37571e303 100644 --- a/boards/arm/qemu/qemu-armv7a/configs/gdbstub/defconfig +++ b/boards/arm/qemu/qemu-armv7a/configs/gdbstub/defconfig @@ -40,7 +40,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_EXECFUNCS=y CONFIG_LIB_GDBSTUB=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/qemu/qemu-armv7a/configs/knsh/defconfig b/boards/arm/qemu/qemu-armv7a/configs/knsh/defconfig index 345cb577a9b7f..18b086834cf36 100644 --- a/boards/arm/qemu/qemu-armv7a/configs/knsh/defconfig +++ b/boards/arm/qemu/qemu-armv7a/configs/knsh/defconfig @@ -61,7 +61,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_ENVPATH=y CONFIG_LIBC_EXECFUNCS=y CONFIG_MM_PGALLOC=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/arm/qemu/qemu-armv7a/configs/knsh_smp/defconfig b/boards/arm/qemu/qemu-armv7a/configs/knsh_smp/defconfig index 99fad1fe7d61e..40de9786bc436 100644 --- a/boards/arm/qemu/qemu-armv7a/configs/knsh_smp/defconfig +++ b/boards/arm/qemu/qemu-armv7a/configs/knsh_smp/defconfig @@ -61,7 +61,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_ENVPATH=y CONFIG_LIBC_EXECFUNCS=y CONFIG_MM_PGALLOC=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/arm/qemu/qemu-armv7a/configs/nsh/defconfig b/boards/arm/qemu/qemu-armv7a/configs/nsh/defconfig index 9f4fa9c16c932..425d4c9ca3ddb 100644 --- a/boards/arm/qemu/qemu-armv7a/configs/nsh/defconfig +++ b/boards/arm/qemu/qemu-armv7a/configs/nsh/defconfig @@ -39,7 +39,6 @@ CONFIG_HAVE_CXXINITIALIZE=y CONFIG_IDLETHREAD_STACKSIZE=4096 CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_MODULE=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/qemu/qemu-armv7a/configs/rpproxy/defconfig b/boards/arm/qemu/qemu-armv7a/configs/rpproxy/defconfig index 097ed6bf21ae8..f387ad8f73db7 100644 --- a/boards/arm/qemu/qemu-armv7a/configs/rpproxy/defconfig +++ b/boards/arm/qemu/qemu-armv7a/configs/rpproxy/defconfig @@ -31,7 +31,6 @@ CONFIG_ARM_SEMIHOSTING_HOSTFS=y CONFIG_ARM_THUMB=y CONFIG_BCH=y CONFIG_BOARDCTL_POWEROFF=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=393693 CONFIG_BUILTIN=y CONFIG_DEBUG_ASSERTIONS=y @@ -76,7 +75,6 @@ CONFIG_MTD=y CONFIG_NET=y CONFIG_NETDEV_LATEINIT=y CONFIG_NET_RPMSG=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_PROMPT_STRING="proxy> " diff --git a/boards/arm/qemu/qemu-armv7a/configs/rpserver/defconfig b/boards/arm/qemu/qemu-armv7a/configs/rpserver/defconfig index f0ea57ee9382c..91551876a521e 100644 --- a/boards/arm/qemu/qemu-armv7a/configs/rpserver/defconfig +++ b/boards/arm/qemu/qemu-armv7a/configs/rpserver/defconfig @@ -31,7 +31,6 @@ CONFIG_ARM_THUMB=y CONFIG_BCH=y CONFIG_BLK_RPMSG_SERVER=y CONFIG_BOARDCTL_POWEROFF=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=393693 CONFIG_BUILTIN=y CONFIG_DEBUG_ASSERTIONS=y @@ -77,7 +76,6 @@ CONFIG_LIBC_ZONEINFO=y CONFIG_NET=y CONFIG_NETDEV_LATEINIT=y CONFIG_NET_RPMSG=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_PROMPT_STRING="server> " diff --git a/boards/arm/qemu/qemu-armv7a/configs/smp/defconfig b/boards/arm/qemu/qemu-armv7a/configs/smp/defconfig index c8a12f25216ed..e361061edaaa7 100644 --- a/boards/arm/qemu/qemu-armv7a/configs/smp/defconfig +++ b/boards/arm/qemu/qemu-armv7a/configs/smp/defconfig @@ -37,7 +37,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_EXECFUNCS=y CONFIG_MM_KASAN=y CONFIG_MM_KASAN_GLOBAL=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/qemu/qemu-armv7a/src/CMakeLists.txt b/boards/arm/qemu/qemu-armv7a/src/CMakeLists.txt index f6c3b148d43fc..dbf972c8e156d 100644 --- a/boards/arm/qemu/qemu-armv7a/src/CMakeLists.txt +++ b/boards/arm/qemu/qemu-armv7a/src/CMakeLists.txt @@ -21,10 +21,6 @@ # ############################################################################## set(SRCS qemu_boardinit.c qemu_bringup.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS qemu_appinit.c) -endif() - if(CONFIG_LIBC_FDT) target_include_directories(board PRIVATE ${NUTTX_DIR}/libs/libc/fdt/dtc/libfdt) diff --git a/boards/arm/qemu/qemu-armv7a/src/Makefile b/boards/arm/qemu/qemu-armv7a/src/Makefile index 7cd9e834967cb..d4e6c4e35957d 100644 --- a/boards/arm/qemu/qemu-armv7a/src/Makefile +++ b/boards/arm/qemu/qemu-armv7a/src/Makefile @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = qemu_boardinit.c qemu_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += qemu_appinit.c -endif - ifeq ($(CONFIG_LIBC_FDT),y) CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)libs$(DELIM)libc$(DELIM)fdt$(DELIM)dtc$(DELIM)libfdt endif diff --git a/boards/arm/qemu/qemu-armv7a/src/qemu_appinit.c b/boards/arm/qemu/qemu-armv7a/src/qemu_appinit.c deleted file mode 100644 index b8ffbb116d34f..0000000000000 --- a/boards/arm/qemu/qemu-armv7a/src/qemu_appinit.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm/qemu/qemu-armv7a/src/qemu_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 - -#include - -#include - -#include "qemu-armv7a.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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 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) -{ - UNUSED(arg); -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board initialization */ - - return qemu_bringup(); -#else - return OK; -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/arm/qemu/qemu-armv7r/configs/nsh/defconfig b/boards/arm/qemu/qemu-armv7r/configs/nsh/defconfig index 9181fbaa11731..a7913c212aaa0 100644 --- a/boards/arm/qemu/qemu-armv7r/configs/nsh/defconfig +++ b/boards/arm/qemu/qemu-armv7r/configs/nsh/defconfig @@ -30,7 +30,6 @@ CONFIG_HAVE_CXXINITIALIZE=y CONFIG_IDLETHREAD_STACKSIZE=4096 CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/qemu/qemu-armv7r/configs/pnsh/defconfig b/boards/arm/qemu/qemu-armv7r/configs/pnsh/defconfig index 7fd499a902820..8b11f540c5b14 100644 --- a/boards/arm/qemu/qemu-armv7r/configs/pnsh/defconfig +++ b/boards/arm/qemu/qemu-armv7r/configs/pnsh/defconfig @@ -32,7 +32,6 @@ CONFIG_HAVE_CXX=y CONFIG_HAVE_CXXINITIALIZE=y CONFIG_IDLETHREAD_STACKSIZE=4096 CONFIG_INIT_ENTRYPOINT="nsh_main" -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/qemu/qemu-armv7r/src/CMakeLists.txt b/boards/arm/qemu/qemu-armv7r/src/CMakeLists.txt index 8226e6beff17c..278adf8e87930 100644 --- a/boards/arm/qemu/qemu-armv7r/src/CMakeLists.txt +++ b/boards/arm/qemu/qemu-armv7r/src/CMakeLists.txt @@ -21,10 +21,6 @@ # ############################################################################## set(SRCS qemu_boardinit.c qemu_bringup.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS qemu_appinit.c) -endif() - if(CONFIG_LIBC_FDT) target_include_directories(board PRIVATE ${NUTTX_DIR}/libs/libc/fdt/dtc/libfdt) diff --git a/boards/arm/qemu/qemu-armv7r/src/Makefile b/boards/arm/qemu/qemu-armv7r/src/Makefile index 45c0664d6b8b9..012409219b251 100644 --- a/boards/arm/qemu/qemu-armv7r/src/Makefile +++ b/boards/arm/qemu/qemu-armv7r/src/Makefile @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = qemu_boardinit.c qemu_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += qemu_appinit.c -endif - ifeq ($(CONFIG_LIBC_FDT),y) CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)libs$(DELIM)libc$(DELIM)fdt$(DELIM)dtc$(DELIM)libfdt endif diff --git a/boards/arm/qemu/qemu-armv7r/src/qemu_appinit.c b/boards/arm/qemu/qemu-armv7r/src/qemu_appinit.c deleted file mode 100644 index fe229524a795d..0000000000000 --- a/boards/arm/qemu/qemu-armv7r/src/qemu_appinit.c +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** - * boards/arm/qemu/qemu-armv7r/src/qemu_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 -#include -#include -#include "qemu-armv7r.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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 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) -{ - UNUSED(arg); -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board initialization */ - - return qemu_bringup(); -#else - return OK; -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/arm/ra4/arduino-r4-minima/configs/nsh-leds/defconfig b/boards/arm/ra4/arduino-r4-minima/configs/nsh-leds/defconfig index 329eeae53abe9..be1f1f3ddf731 100644 --- a/boards/arm/ra4/arduino-r4-minima/configs/nsh-leds/defconfig +++ b/boards/arm/ra4/arduino-r4-minima/configs/nsh-leds/defconfig @@ -21,7 +21,6 @@ CONFIG_HAVE_CXX=y CONFIG_HAVE_CXXINITIALIZE=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/ra4/arduino-r4-minima/configs/nsh/defconfig b/boards/arm/ra4/arduino-r4-minima/configs/nsh/defconfig index 7ec30433017cd..9530b8752862e 100644 --- a/boards/arm/ra4/arduino-r4-minima/configs/nsh/defconfig +++ b/boards/arm/ra4/arduino-r4-minima/configs/nsh/defconfig @@ -19,7 +19,6 @@ CONFIG_HAVE_CXX=y CONFIG_HAVE_CXXINITIALIZE=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/ra4/arduino-r4-minima/configs/pwm/defconfig b/boards/arm/ra4/arduino-r4-minima/configs/pwm/defconfig index e229e0f15ef24..60d0f9d34c6cc 100644 --- a/boards/arm/ra4/arduino-r4-minima/configs/pwm/defconfig +++ b/boards/arm/ra4/arduino-r4-minima/configs/pwm/defconfig @@ -20,7 +20,6 @@ CONFIG_HAVE_CXX=y CONFIG_HAVE_CXXINITIALIZE=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/ra4/arduino-r4-minima/src/CMakeLists.txt b/boards/arm/ra4/arduino-r4-minima/src/CMakeLists.txt index bf7885da011f9..a7f01a256caec 100644 --- a/boards/arm/ra4/arduino-r4-minima/src/CMakeLists.txt +++ b/boards/arm/ra4/arduino-r4-minima/src/CMakeLists.txt @@ -18,7 +18,7 @@ # # ############################################################################## -set(SRCS ra4m1_boot.c ra4m1_bringup.c ra4m1_appinit.c) +set(SRCS ra4m1_boot.c ra4m1_bringup.c) if(CONFIG_ARCH_LEDS) list(APPEND SRCS ra4m1_autoleds.c) diff --git a/boards/arm/ra4/arduino-r4-minima/src/Makefile b/boards/arm/ra4/arduino-r4-minima/src/Makefile index 2f1ed2581f2d4..97875297aa4df 100644 --- a/boards/arm/ra4/arduino-r4-minima/src/Makefile +++ b/boards/arm/ra4/arduino-r4-minima/src/Makefile @@ -28,10 +28,6 @@ else CSRCS += ra4m1_userleds.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += ra4m1_appinit.c -endif - ifeq ($(CONFIG_PWM),y) CSRCS += ra4m1_pwm.c endif diff --git a/boards/arm/ra4/arduino-r4-minima/src/ra4m1_appinit.c b/boards/arm/ra4/arduino-r4-minima/src/ra4m1_appinit.c deleted file mode 100644 index 13e39f6aec6fa..0000000000000 --- a/boards/arm/ra4/arduino-r4-minima/src/ra4m1_appinit.c +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** - * boards/arm/ra4/arduino-r4-minima/src/ra4m1_appinit.c - * - * 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 - -#include -#include - -#include "arduino-r4-minima.h" - -/**************************************************************************** - * 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 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 ra4m1_bringup(); -#endif -} diff --git a/boards/arm/ra4/xiao-ra4m1/configs/combo/defconfig b/boards/arm/ra4/xiao-ra4m1/configs/combo/defconfig index b4d2645a5fc29..528533230d402 100644 --- a/boards/arm/ra4/xiao-ra4m1/configs/combo/defconfig +++ b/boards/arm/ra4/xiao-ra4m1/configs/combo/defconfig @@ -23,7 +23,6 @@ CONFIG_HAVE_CXX=y CONFIG_HAVE_CXXINITIALIZE=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/ra4/xiao-ra4m1/configs/nsh/defconfig b/boards/arm/ra4/xiao-ra4m1/configs/nsh/defconfig index a4c469b6803f9..2ffa9ca6b40df 100644 --- a/boards/arm/ra4/xiao-ra4m1/configs/nsh/defconfig +++ b/boards/arm/ra4/xiao-ra4m1/configs/nsh/defconfig @@ -19,7 +19,6 @@ CONFIG_HAVE_CXX=y CONFIG_HAVE_CXXINITIALIZE=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/ra4/xiao-ra4m1/src/CMakeLists.txt b/boards/arm/ra4/xiao-ra4m1/src/CMakeLists.txt index cfa891f1f1c18..e782b1720b5c2 100644 --- a/boards/arm/ra4/xiao-ra4m1/src/CMakeLists.txt +++ b/boards/arm/ra4/xiao-ra4m1/src/CMakeLists.txt @@ -18,7 +18,7 @@ # # ############################################################################## -set(SRCS ra4m1_boot.c ra4m1_bringup.c ra4m1_appinit.c) +set(SRCS ra4m1_boot.c ra4m1_bringup.c) if(CONFIG_ARCH_LEDS) list(APPEND SRCS ra4m1_autoleds.c) diff --git a/boards/arm/ra4/xiao-ra4m1/src/Makefile b/boards/arm/ra4/xiao-ra4m1/src/Makefile index 395c11cb88919..c1c0822e94ab7 100644 --- a/boards/arm/ra4/xiao-ra4m1/src/Makefile +++ b/boards/arm/ra4/xiao-ra4m1/src/Makefile @@ -28,10 +28,6 @@ else CSRCS += ra4m1_userleds.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += ra4m1_appinit.c -endif - ifeq ($(CONFIG_DEV_GPIO),y) CSRCS += ra4m1_gpio.c endif diff --git a/boards/arm/ra4/xiao-ra4m1/src/ra4m1_appinit.c b/boards/arm/ra4/xiao-ra4m1/src/ra4m1_appinit.c deleted file mode 100644 index d2544fb08717d..0000000000000 --- a/boards/arm/ra4/xiao-ra4m1/src/ra4m1_appinit.c +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** - * boards/arm/ra4/xiao-ra4m1/src/ra4m1_appinit.c - * - * 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 - -#include -#include - -#include "xiao-ra4m1.h" - -/**************************************************************************** - * 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 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 ra4m1_bringup(); -#endif -} diff --git a/boards/arm/rp2040/adafruit-feather-rp2040/configs/audiopack/defconfig b/boards/arm/rp2040/adafruit-feather-rp2040/configs/audiopack/defconfig index f345be5d16367..c19a5000ad7d1 100644 --- a/boards/arm/rp2040/adafruit-feather-rp2040/configs/audiopack/defconfig +++ b/boards/arm/rp2040/adafruit-feather-rp2040/configs/audiopack/defconfig @@ -44,7 +44,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_MMCSD=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_NXPLAYER_DEFAULT_MEDIADIR="/mnt/sd0" diff --git a/boards/arm/rp2040/adafruit-feather-rp2040/configs/composite/defconfig b/boards/arm/rp2040/adafruit-feather-rp2040/configs/composite/defconfig index 3033a4bf07206..4a560a5ea7715 100644 --- a/boards/arm/rp2040/adafruit-feather-rp2040/configs/composite/defconfig +++ b/boards/arm/rp2040/adafruit-feather-rp2040/configs/composite/defconfig @@ -45,7 +45,6 @@ CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_MMCSD=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/adafruit-feather-rp2040/configs/displaypack/defconfig b/boards/arm/rp2040/adafruit-feather-rp2040/configs/displaypack/defconfig index 19740fe2f90a9..d25ac469e766b 100644 --- a/boards/arm/rp2040/adafruit-feather-rp2040/configs/displaypack/defconfig +++ b/boards/arm/rp2040/adafruit-feather-rp2040/configs/displaypack/defconfig @@ -68,7 +68,6 @@ CONFIG_LCD_ST7789_YOFFSET=40 CONFIG_LCD_ST7789_YRES=240 CONFIG_MQ_MAXMSGSIZE=64 CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_NSH_USBCONSOLE=y diff --git a/boards/arm/rp2040/adafruit-feather-rp2040/configs/enc28j60/defconfig b/boards/arm/rp2040/adafruit-feather-rp2040/configs/enc28j60/defconfig index 37582c2d2082b..0bcd6e6a43534 100644 --- a/boards/arm/rp2040/adafruit-feather-rp2040/configs/enc28j60/defconfig +++ b/boards/arm/rp2040/adafruit-feather-rp2040/configs/enc28j60/defconfig @@ -46,7 +46,6 @@ CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/adafruit-feather-rp2040/configs/lcd1602/defconfig b/boards/arm/rp2040/adafruit-feather-rp2040/configs/lcd1602/defconfig index 464d9af07d5cc..e1423c093a207 100644 --- a/boards/arm/rp2040/adafruit-feather-rp2040/configs/lcd1602/defconfig +++ b/boards/arm/rp2040/adafruit-feather-rp2040/configs/lcd1602/defconfig @@ -33,7 +33,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LCD_BACKPACK=y CONFIG_LCD_LCD1602=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/adafruit-feather-rp2040/configs/nsh-flash/defconfig b/boards/arm/rp2040/adafruit-feather-rp2040/configs/nsh-flash/defconfig index b88a341652c7b..32dff8bed3a37 100644 --- a/boards/arm/rp2040/adafruit-feather-rp2040/configs/nsh-flash/defconfig +++ b/boards/arm/rp2040/adafruit-feather-rp2040/configs/nsh-flash/defconfig @@ -29,7 +29,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/adafruit-feather-rp2040/configs/nsh/defconfig b/boards/arm/rp2040/adafruit-feather-rp2040/configs/nsh/defconfig index 253291b7d3ce0..f9b6e45314c78 100644 --- a/boards/arm/rp2040/adafruit-feather-rp2040/configs/nsh/defconfig +++ b/boards/arm/rp2040/adafruit-feather-rp2040/configs/nsh/defconfig @@ -30,7 +30,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/adafruit-feather-rp2040/configs/nshsram/defconfig b/boards/arm/rp2040/adafruit-feather-rp2040/configs/nshsram/defconfig index 35e110e8dfc13..9e68d954b9036 100644 --- a/boards/arm/rp2040/adafruit-feather-rp2040/configs/nshsram/defconfig +++ b/boards/arm/rp2040/adafruit-feather-rp2040/configs/nshsram/defconfig @@ -31,7 +31,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/adafruit-feather-rp2040/configs/smp/defconfig b/boards/arm/rp2040/adafruit-feather-rp2040/configs/smp/defconfig index 42f5e4622ee2e..6d8d248160233 100644 --- a/boards/arm/rp2040/adafruit-feather-rp2040/configs/smp/defconfig +++ b/boards/arm/rp2040/adafruit-feather-rp2040/configs/smp/defconfig @@ -31,7 +31,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/adafruit-feather-rp2040/configs/spisd/defconfig b/boards/arm/rp2040/adafruit-feather-rp2040/configs/spisd/defconfig index d2243aea6ce75..dbd78159b6d47 100644 --- a/boards/arm/rp2040/adafruit-feather-rp2040/configs/spisd/defconfig +++ b/boards/arm/rp2040/adafruit-feather-rp2040/configs/spisd/defconfig @@ -37,7 +37,6 @@ CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_MMCSD=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/adafruit-feather-rp2040/configs/ssd1306/defconfig b/boards/arm/rp2040/adafruit-feather-rp2040/configs/ssd1306/defconfig index 93548bc998b70..344331aeca883 100644 --- a/boards/arm/rp2040/adafruit-feather-rp2040/configs/ssd1306/defconfig +++ b/boards/arm/rp2040/adafruit-feather-rp2040/configs/ssd1306/defconfig @@ -48,7 +48,6 @@ CONFIG_LCD_SH1106_OLED_132=y CONFIG_LCD_SSD1306_I2C=y CONFIG_MQ_MAXMSGSIZE=64 CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_NX=y diff --git a/boards/arm/rp2040/adafruit-feather-rp2040/configs/st7735/defconfig b/boards/arm/rp2040/adafruit-feather-rp2040/configs/st7735/defconfig index a6d928154169b..0594a90fc5b5c 100644 --- a/boards/arm/rp2040/adafruit-feather-rp2040/configs/st7735/defconfig +++ b/boards/arm/rp2040/adafruit-feather-rp2040/configs/st7735/defconfig @@ -36,7 +36,6 @@ CONFIG_LCD_FRAMEBUFFER=y CONFIG_LCD_PORTRAIT=y CONFIG_LCD_ST7735=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/adafruit-feather-rp2040/configs/usbmsc/defconfig b/boards/arm/rp2040/adafruit-feather-rp2040/configs/usbmsc/defconfig index c9a76814713e0..749b43b3e28d6 100644 --- a/boards/arm/rp2040/adafruit-feather-rp2040/configs/usbmsc/defconfig +++ b/boards/arm/rp2040/adafruit-feather-rp2040/configs/usbmsc/defconfig @@ -39,7 +39,6 @@ CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_MMCSD=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/adafruit-feather-rp2040/configs/usbnsh/defconfig b/boards/arm/rp2040/adafruit-feather-rp2040/configs/usbnsh/defconfig index 89b5d74ff555c..92701a33da5ae 100644 --- a/boards/arm/rp2040/adafruit-feather-rp2040/configs/usbnsh/defconfig +++ b/boards/arm/rp2040/adafruit-feather-rp2040/configs/usbnsh/defconfig @@ -33,7 +33,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_NSH_USBCONSOLE=y diff --git a/boards/arm/rp2040/adafruit-feather-rp2040/configs/waveshare-lcd-1.14/defconfig b/boards/arm/rp2040/adafruit-feather-rp2040/configs/waveshare-lcd-1.14/defconfig index 3d84e60604102..c8eeaa213c9a2 100644 --- a/boards/arm/rp2040/adafruit-feather-rp2040/configs/waveshare-lcd-1.14/defconfig +++ b/boards/arm/rp2040/adafruit-feather-rp2040/configs/waveshare-lcd-1.14/defconfig @@ -65,7 +65,6 @@ CONFIG_LCD_ST7789_YOFFSET=40 CONFIG_LCD_ST7789_YRES=240 CONFIG_MQ_MAXMSGSIZE=64 CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_NX=y diff --git a/boards/arm/rp2040/adafruit-feather-rp2040/configs/waveshare-lcd-1.3/defconfig b/boards/arm/rp2040/adafruit-feather-rp2040/configs/waveshare-lcd-1.3/defconfig index 114db3fe868f4..082d4f1cd7561 100644 --- a/boards/arm/rp2040/adafruit-feather-rp2040/configs/waveshare-lcd-1.3/defconfig +++ b/boards/arm/rp2040/adafruit-feather-rp2040/configs/waveshare-lcd-1.3/defconfig @@ -62,7 +62,6 @@ CONFIG_LCD_ST7789_FREQUENCY=64000000 CONFIG_LCD_ST7789_YRES=240 CONFIG_MQ_MAXMSGSIZE=64 CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_NX=y diff --git a/boards/arm/rp2040/adafruit-feather-rp2040/src/CMakeLists.txt b/boards/arm/rp2040/adafruit-feather-rp2040/src/CMakeLists.txt index 0995d58e66cb1..c46f5eeb601c6 100644 --- a/boards/arm/rp2040/adafruit-feather-rp2040/src/CMakeLists.txt +++ b/boards/arm/rp2040/adafruit-feather-rp2040/src/CMakeLists.txt @@ -26,10 +26,6 @@ if(CONFIG_DEV_GPIO) list(APPEND SRCS rp2040_gpio.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS rp2040_appinit.c) -endif() - target_sources(board PRIVATE ${SRCS}) if(CONFIG_RP2040_FLASH_BOOT) diff --git a/boards/arm/rp2040/adafruit-feather-rp2040/src/Make.defs b/boards/arm/rp2040/adafruit-feather-rp2040/src/Make.defs index a4cbf5ad79656..c5f16f2cfe60e 100644 --- a/boards/arm/rp2040/adafruit-feather-rp2040/src/Make.defs +++ b/boards/arm/rp2040/adafruit-feather-rp2040/src/Make.defs @@ -23,7 +23,6 @@ include $(TOPDIR)/Make.defs CSRCS = rp2040_boardinitialize.c -CSRCS += rp2040_appinit.c CSRCS += rp2040_bringup.c ifeq ($(CONFIG_DEV_GPIO),y) diff --git a/boards/arm/rp2040/adafruit-feather-rp2040/src/rp2040_appinit.c b/boards/arm/rp2040/adafruit-feather-rp2040/src/rp2040_appinit.c deleted file mode 100644 index e4142e2422c55..0000000000000 --- a/boards/arm/rp2040/adafruit-feather-rp2040/src/rp2040_appinit.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm/rp2040/adafruit-feather-rp2040/src/rp2040_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 -#include - -#include - -#include "rp2040_pico.h" - -/**************************************************************************** - * 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 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 rp2040_bringup(); -#endif -} diff --git a/boards/arm/rp2040/adafruit-feather-rp2040/src/rp2040_boardinitialize.c b/boards/arm/rp2040/adafruit-feather-rp2040/src/rp2040_boardinitialize.c index 9412ea1d61e97..fbc4bde86bc50 100644 --- a/boards/arm/rp2040/adafruit-feather-rp2040/src/rp2040_boardinitialize.c +++ b/boards/arm/rp2040/adafruit-feather-rp2040/src/rp2040_boardinitialize.c @@ -38,6 +38,8 @@ #include "rp2040_common_initialize.h" #endif /* CONFIG_ARCH_BOARD_COMMON */ +#include "rp2040_pico.h" + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -87,3 +89,29 @@ void rp2040_boardinitialize(void) /* --- Place any board specific initialization here --- */ } + +/**************************************************************************** + * 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 after up_initialize() and board_early_initialize() and just + * before the initial application is started. This additional + * initialization phase may be used, for example, to initialize board- + * specific device drivers for which board_early_initialize() is not + * suitable. + * + * Waiting for events, use of I2C, SPI, etc are permissible in the context + * of board_late_initialize(). That is because board_late_initialize() + * will run on a temporary, internal kernel thread. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ + rp2040_bringup(); +} +#endif diff --git a/boards/arm/rp2040/adafruit-kb2040/configs/audiopack/defconfig b/boards/arm/rp2040/adafruit-kb2040/configs/audiopack/defconfig index a7aabca10158f..8e27d58c14998 100644 --- a/boards/arm/rp2040/adafruit-kb2040/configs/audiopack/defconfig +++ b/boards/arm/rp2040/adafruit-kb2040/configs/audiopack/defconfig @@ -44,7 +44,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_MMCSD=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_NXPLAYER_DEFAULT_MEDIADIR="/mnt/sd0" diff --git a/boards/arm/rp2040/adafruit-kb2040/configs/composite/defconfig b/boards/arm/rp2040/adafruit-kb2040/configs/composite/defconfig index 1948c507aa304..a06e3bb3d0716 100644 --- a/boards/arm/rp2040/adafruit-kb2040/configs/composite/defconfig +++ b/boards/arm/rp2040/adafruit-kb2040/configs/composite/defconfig @@ -45,7 +45,6 @@ CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_MMCSD=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/adafruit-kb2040/configs/displaypack/defconfig b/boards/arm/rp2040/adafruit-kb2040/configs/displaypack/defconfig index d88289a235569..774d8232c1945 100644 --- a/boards/arm/rp2040/adafruit-kb2040/configs/displaypack/defconfig +++ b/boards/arm/rp2040/adafruit-kb2040/configs/displaypack/defconfig @@ -68,7 +68,6 @@ CONFIG_LCD_ST7789_YOFFSET=40 CONFIG_LCD_ST7789_YRES=240 CONFIG_MQ_MAXMSGSIZE=64 CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_NSH_USBCONSOLE=y diff --git a/boards/arm/rp2040/adafruit-kb2040/configs/enc28j60/defconfig b/boards/arm/rp2040/adafruit-kb2040/configs/enc28j60/defconfig index ca47ae9b3c731..a915db7c2b3a9 100644 --- a/boards/arm/rp2040/adafruit-kb2040/configs/enc28j60/defconfig +++ b/boards/arm/rp2040/adafruit-kb2040/configs/enc28j60/defconfig @@ -46,7 +46,6 @@ CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/adafruit-kb2040/configs/lcd1602/defconfig b/boards/arm/rp2040/adafruit-kb2040/configs/lcd1602/defconfig index c0d7c01af3ffe..2a88c020c2090 100644 --- a/boards/arm/rp2040/adafruit-kb2040/configs/lcd1602/defconfig +++ b/boards/arm/rp2040/adafruit-kb2040/configs/lcd1602/defconfig @@ -33,7 +33,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LCD_BACKPACK=y CONFIG_LCD_LCD1602=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/adafruit-kb2040/configs/nsh-flash/defconfig b/boards/arm/rp2040/adafruit-kb2040/configs/nsh-flash/defconfig index abb6cf87b6eb0..c3345f0e91b79 100644 --- a/boards/arm/rp2040/adafruit-kb2040/configs/nsh-flash/defconfig +++ b/boards/arm/rp2040/adafruit-kb2040/configs/nsh-flash/defconfig @@ -29,7 +29,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/adafruit-kb2040/configs/nsh/defconfig b/boards/arm/rp2040/adafruit-kb2040/configs/nsh/defconfig index 6cbea1e7afa27..4e7272da41dad 100644 --- a/boards/arm/rp2040/adafruit-kb2040/configs/nsh/defconfig +++ b/boards/arm/rp2040/adafruit-kb2040/configs/nsh/defconfig @@ -30,7 +30,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/adafruit-kb2040/configs/nshsram/defconfig b/boards/arm/rp2040/adafruit-kb2040/configs/nshsram/defconfig index 17911fd856c34..340b88957bcca 100644 --- a/boards/arm/rp2040/adafruit-kb2040/configs/nshsram/defconfig +++ b/boards/arm/rp2040/adafruit-kb2040/configs/nshsram/defconfig @@ -31,7 +31,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/adafruit-kb2040/configs/smp/defconfig b/boards/arm/rp2040/adafruit-kb2040/configs/smp/defconfig index 98e23f52af08d..9cb641d965bf7 100644 --- a/boards/arm/rp2040/adafruit-kb2040/configs/smp/defconfig +++ b/boards/arm/rp2040/adafruit-kb2040/configs/smp/defconfig @@ -31,7 +31,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/adafruit-kb2040/configs/spisd/defconfig b/boards/arm/rp2040/adafruit-kb2040/configs/spisd/defconfig index db07f34325fd3..f3a8dd42ef599 100644 --- a/boards/arm/rp2040/adafruit-kb2040/configs/spisd/defconfig +++ b/boards/arm/rp2040/adafruit-kb2040/configs/spisd/defconfig @@ -37,7 +37,6 @@ CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_MMCSD=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/adafruit-kb2040/configs/ssd1306/defconfig b/boards/arm/rp2040/adafruit-kb2040/configs/ssd1306/defconfig index 809fd357e188e..926e0a012e6f4 100644 --- a/boards/arm/rp2040/adafruit-kb2040/configs/ssd1306/defconfig +++ b/boards/arm/rp2040/adafruit-kb2040/configs/ssd1306/defconfig @@ -48,7 +48,6 @@ CONFIG_LCD_SH1106_OLED_132=y CONFIG_LCD_SSD1306_I2C=y CONFIG_MQ_MAXMSGSIZE=64 CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_NX=y diff --git a/boards/arm/rp2040/adafruit-kb2040/configs/st7735/defconfig b/boards/arm/rp2040/adafruit-kb2040/configs/st7735/defconfig index a0252b64cf07f..c7b2c7c489c04 100644 --- a/boards/arm/rp2040/adafruit-kb2040/configs/st7735/defconfig +++ b/boards/arm/rp2040/adafruit-kb2040/configs/st7735/defconfig @@ -36,7 +36,6 @@ CONFIG_LCD_FRAMEBUFFER=y CONFIG_LCD_PORTRAIT=y CONFIG_LCD_ST7735=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/adafruit-kb2040/configs/usbmsc/defconfig b/boards/arm/rp2040/adafruit-kb2040/configs/usbmsc/defconfig index 5bd4384977e3a..e81e2f16c82e7 100644 --- a/boards/arm/rp2040/adafruit-kb2040/configs/usbmsc/defconfig +++ b/boards/arm/rp2040/adafruit-kb2040/configs/usbmsc/defconfig @@ -39,7 +39,6 @@ CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_MMCSD=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/adafruit-kb2040/configs/usbnsh/defconfig b/boards/arm/rp2040/adafruit-kb2040/configs/usbnsh/defconfig index da9402d906b37..c6bbfb2456e31 100644 --- a/boards/arm/rp2040/adafruit-kb2040/configs/usbnsh/defconfig +++ b/boards/arm/rp2040/adafruit-kb2040/configs/usbnsh/defconfig @@ -33,7 +33,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_NSH_USBCONSOLE=y diff --git a/boards/arm/rp2040/adafruit-kb2040/configs/waveshare-lcd-1.14/defconfig b/boards/arm/rp2040/adafruit-kb2040/configs/waveshare-lcd-1.14/defconfig index 98dc17ebb8325..013bf812c7e08 100644 --- a/boards/arm/rp2040/adafruit-kb2040/configs/waveshare-lcd-1.14/defconfig +++ b/boards/arm/rp2040/adafruit-kb2040/configs/waveshare-lcd-1.14/defconfig @@ -65,7 +65,6 @@ CONFIG_LCD_ST7789_YOFFSET=40 CONFIG_LCD_ST7789_YRES=240 CONFIG_MQ_MAXMSGSIZE=64 CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_NX=y diff --git a/boards/arm/rp2040/adafruit-kb2040/configs/waveshare-lcd-1.3/defconfig b/boards/arm/rp2040/adafruit-kb2040/configs/waveshare-lcd-1.3/defconfig index 1b2a6ffb34568..8c013eece566d 100644 --- a/boards/arm/rp2040/adafruit-kb2040/configs/waveshare-lcd-1.3/defconfig +++ b/boards/arm/rp2040/adafruit-kb2040/configs/waveshare-lcd-1.3/defconfig @@ -62,7 +62,6 @@ CONFIG_LCD_ST7789_FREQUENCY=64000000 CONFIG_LCD_ST7789_YRES=240 CONFIG_MQ_MAXMSGSIZE=64 CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_NX=y diff --git a/boards/arm/rp2040/adafruit-kb2040/src/CMakeLists.txt b/boards/arm/rp2040/adafruit-kb2040/src/CMakeLists.txt index 0cf33ce1678db..1566b4a0391e2 100644 --- a/boards/arm/rp2040/adafruit-kb2040/src/CMakeLists.txt +++ b/boards/arm/rp2040/adafruit-kb2040/src/CMakeLists.txt @@ -26,10 +26,6 @@ if(CONFIG_DEV_GPIO) list(APPEND SRCS rp2040_gpio.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS rp2040_appinit.c) -endif() - target_sources(board PRIVATE ${SRCS}) if(CONFIG_RP2040_FLASH_BOOT) diff --git a/boards/arm/rp2040/adafruit-kb2040/src/Make.defs b/boards/arm/rp2040/adafruit-kb2040/src/Make.defs index abad5b865c5db..79756ce6bca88 100644 --- a/boards/arm/rp2040/adafruit-kb2040/src/Make.defs +++ b/boards/arm/rp2040/adafruit-kb2040/src/Make.defs @@ -23,7 +23,6 @@ include $(TOPDIR)/Make.defs CSRCS = rp2040_boardinitialize.c -CSRCS += rp2040_appinit.c CSRCS += rp2040_bringup.c ifeq ($(CONFIG_DEV_GPIO),y) diff --git a/boards/arm/rp2040/adafruit-kb2040/src/rp2040_appinit.c b/boards/arm/rp2040/adafruit-kb2040/src/rp2040_appinit.c deleted file mode 100644 index 41f041a5c5a34..0000000000000 --- a/boards/arm/rp2040/adafruit-kb2040/src/rp2040_appinit.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm/rp2040/adafruit-kb2040/src/rp2040_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 -#include - -#include - -#include "rp2040_pico.h" - -/**************************************************************************** - * 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 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 rp2040_bringup(); -#endif -} diff --git a/boards/arm/rp2040/adafruit-kb2040/src/rp2040_boardinitialize.c b/boards/arm/rp2040/adafruit-kb2040/src/rp2040_boardinitialize.c index e953cf4b51e04..0dfe6ca3eaf91 100644 --- a/boards/arm/rp2040/adafruit-kb2040/src/rp2040_boardinitialize.c +++ b/boards/arm/rp2040/adafruit-kb2040/src/rp2040_boardinitialize.c @@ -38,6 +38,8 @@ #include "rp2040_common_initialize.h" #endif /* CONFIG_ARCH_BOARD_COMMON */ +#include "rp2040_pico.h" + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -81,3 +83,29 @@ void rp2040_boardinitialize(void) /* --- Place any board specific initialization here --- */ } + +/**************************************************************************** + * 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 after up_initialize() and board_early_initialize() and just + * before the initial application is started. This additional + * initialization phase may be used, for example, to initialize board- + * specific device drivers for which board_early_initialize() is not + * suitable. + * + * Waiting for events, use of I2C, SPI, etc are permissible in the context + * of board_late_initialize(). That is because board_late_initialize() + * will run on a temporary, internal kernel thread. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ + rp2040_bringup(); +} +#endif diff --git a/boards/arm/rp2040/adafruit-qt-py-rp2040/configs/gpio/defconfig b/boards/arm/rp2040/adafruit-qt-py-rp2040/configs/gpio/defconfig index 7cdb75c0b763b..2764cb8541187 100644 --- a/boards/arm/rp2040/adafruit-qt-py-rp2040/configs/gpio/defconfig +++ b/boards/arm/rp2040/adafruit-qt-py-rp2040/configs/gpio/defconfig @@ -32,7 +32,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/adafruit-qt-py-rp2040/configs/nsh-flash/defconfig b/boards/arm/rp2040/adafruit-qt-py-rp2040/configs/nsh-flash/defconfig index a9e1abb3b3a23..1196b7e672d94 100644 --- a/boards/arm/rp2040/adafruit-qt-py-rp2040/configs/nsh-flash/defconfig +++ b/boards/arm/rp2040/adafruit-qt-py-rp2040/configs/nsh-flash/defconfig @@ -29,7 +29,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/adafruit-qt-py-rp2040/configs/nsh/defconfig b/boards/arm/rp2040/adafruit-qt-py-rp2040/configs/nsh/defconfig index db8bf2a63a474..6ecd120ef8fa1 100644 --- a/boards/arm/rp2040/adafruit-qt-py-rp2040/configs/nsh/defconfig +++ b/boards/arm/rp2040/adafruit-qt-py-rp2040/configs/nsh/defconfig @@ -30,7 +30,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/adafruit-qt-py-rp2040/configs/nshsram/defconfig b/boards/arm/rp2040/adafruit-qt-py-rp2040/configs/nshsram/defconfig index 60b9bfd595f38..52309a732749a 100644 --- a/boards/arm/rp2040/adafruit-qt-py-rp2040/configs/nshsram/defconfig +++ b/boards/arm/rp2040/adafruit-qt-py-rp2040/configs/nshsram/defconfig @@ -29,7 +29,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/adafruit-qt-py-rp2040/configs/smp/defconfig b/boards/arm/rp2040/adafruit-qt-py-rp2040/configs/smp/defconfig index 7fefeb4b8616d..340eaf08a518d 100644 --- a/boards/arm/rp2040/adafruit-qt-py-rp2040/configs/smp/defconfig +++ b/boards/arm/rp2040/adafruit-qt-py-rp2040/configs/smp/defconfig @@ -31,7 +31,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/adafruit-qt-py-rp2040/configs/usbnsh/defconfig b/boards/arm/rp2040/adafruit-qt-py-rp2040/configs/usbnsh/defconfig index 05e9c8d79b610..3dca08bcaaa52 100644 --- a/boards/arm/rp2040/adafruit-qt-py-rp2040/configs/usbnsh/defconfig +++ b/boards/arm/rp2040/adafruit-qt-py-rp2040/configs/usbnsh/defconfig @@ -32,7 +32,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_NSH_USBCONSOLE=y diff --git a/boards/arm/rp2040/adafruit-qt-py-rp2040/src/CMakeLists.txt b/boards/arm/rp2040/adafruit-qt-py-rp2040/src/CMakeLists.txt index 3c8f641313b05..76adaa882bec5 100644 --- a/boards/arm/rp2040/adafruit-qt-py-rp2040/src/CMakeLists.txt +++ b/boards/arm/rp2040/adafruit-qt-py-rp2040/src/CMakeLists.txt @@ -26,10 +26,6 @@ if(CONFIG_DEV_GPIO) list(APPEND SRCS rp2040_gpio.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS rp2040_appinit.c) -endif() - target_sources(board PRIVATE ${SRCS}) if(CONFIG_RP2040_FLASH_BOOT) diff --git a/boards/arm/rp2040/adafruit-qt-py-rp2040/src/Make.defs b/boards/arm/rp2040/adafruit-qt-py-rp2040/src/Make.defs index 808257774c0ac..0c9f8f1840cfd 100644 --- a/boards/arm/rp2040/adafruit-qt-py-rp2040/src/Make.defs +++ b/boards/arm/rp2040/adafruit-qt-py-rp2040/src/Make.defs @@ -23,7 +23,6 @@ include $(TOPDIR)/Make.defs CSRCS = rp2040_boardinitialize.c -CSRCS += rp2040_appinit.c CSRCS += rp2040_bringup.c ifeq ($(CONFIG_DEV_GPIO),y) diff --git a/boards/arm/rp2040/adafruit-qt-py-rp2040/src/rp2040_appinit.c b/boards/arm/rp2040/adafruit-qt-py-rp2040/src/rp2040_appinit.c deleted file mode 100644 index 57cc75cbd75b8..0000000000000 --- a/boards/arm/rp2040/adafruit-qt-py-rp2040/src/rp2040_appinit.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm/rp2040/adafruit-qt-py-rp2040/src/rp2040_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 -#include - -#include - -#include "rp2040_pico.h" - -/**************************************************************************** - * 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 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 rp2040_bringup(); -#endif -} diff --git a/boards/arm/rp2040/adafruit-qt-py-rp2040/src/rp2040_boardinitialize.c b/boards/arm/rp2040/adafruit-qt-py-rp2040/src/rp2040_boardinitialize.c index 1538645a44588..244ec491e0101 100644 --- a/boards/arm/rp2040/adafruit-qt-py-rp2040/src/rp2040_boardinitialize.c +++ b/boards/arm/rp2040/adafruit-qt-py-rp2040/src/rp2040_boardinitialize.c @@ -38,6 +38,8 @@ #include "rp2040_common_initialize.h" #endif /* CONFIG_ARCH_BOARD_COMMON */ +#include "rp2040_pico.h" + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -81,3 +83,29 @@ void rp2040_boardinitialize(void) /* --- Place any board specific initialization here --- */ } + +/**************************************************************************** + * 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 after up_initialize() and board_early_initialize() and just + * before the initial application is started. This additional + * initialization phase may be used, for example, to initialize board- + * specific device drivers for which board_early_initialize() is not + * suitable. + * + * Waiting for events, use of I2C, SPI, etc are permissible in the context + * of board_late_initialize(). That is because board_late_initialize() + * will run on a temporary, internal kernel thread. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ + rp2040_bringup(); +} +#endif diff --git a/boards/arm/rp2040/common/src/rp2040_usbmsc.c b/boards/arm/rp2040/common/src/rp2040_usbmsc.c index c49bb11615c6b..ce5fc7668c97c 100644 --- a/boards/arm/rp2040/common/src/rp2040_usbmsc.c +++ b/boards/arm/rp2040/common/src/rp2040_usbmsc.c @@ -54,8 +54,7 @@ int board_usbmsc_initialize(int port) { /* If system/usbmsc is built as an NSH command, then SD slot should - * already have been initialized in board_app_initialize() - * (see stm32_appinit.c). + * already have been initialized. * In this case, there is nothing further to be done here. */ diff --git a/boards/arm/rp2040/pimoroni-tiny2040/configs/composite/defconfig b/boards/arm/rp2040/pimoroni-tiny2040/configs/composite/defconfig index de3bfff9c766e..15bc5aeb5be4d 100644 --- a/boards/arm/rp2040/pimoroni-tiny2040/configs/composite/defconfig +++ b/boards/arm/rp2040/pimoroni-tiny2040/configs/composite/defconfig @@ -45,7 +45,6 @@ CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_MMCSD=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/pimoroni-tiny2040/configs/gpio/defconfig b/boards/arm/rp2040/pimoroni-tiny2040/configs/gpio/defconfig index 959dd9fc29665..6633a9e4e424d 100644 --- a/boards/arm/rp2040/pimoroni-tiny2040/configs/gpio/defconfig +++ b/boards/arm/rp2040/pimoroni-tiny2040/configs/gpio/defconfig @@ -32,7 +32,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/pimoroni-tiny2040/configs/nsh-flash/defconfig b/boards/arm/rp2040/pimoroni-tiny2040/configs/nsh-flash/defconfig index d588acb36b3f2..f3e309fbdb9a3 100644 --- a/boards/arm/rp2040/pimoroni-tiny2040/configs/nsh-flash/defconfig +++ b/boards/arm/rp2040/pimoroni-tiny2040/configs/nsh-flash/defconfig @@ -29,7 +29,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/pimoroni-tiny2040/configs/nsh/defconfig b/boards/arm/rp2040/pimoroni-tiny2040/configs/nsh/defconfig index 3e2e2316fad74..24c16ede087e6 100644 --- a/boards/arm/rp2040/pimoroni-tiny2040/configs/nsh/defconfig +++ b/boards/arm/rp2040/pimoroni-tiny2040/configs/nsh/defconfig @@ -30,7 +30,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/pimoroni-tiny2040/configs/nshsram/defconfig b/boards/arm/rp2040/pimoroni-tiny2040/configs/nshsram/defconfig index 9d647cbaa9883..46024c97ca067 100644 --- a/boards/arm/rp2040/pimoroni-tiny2040/configs/nshsram/defconfig +++ b/boards/arm/rp2040/pimoroni-tiny2040/configs/nshsram/defconfig @@ -31,7 +31,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/pimoroni-tiny2040/configs/smp/defconfig b/boards/arm/rp2040/pimoroni-tiny2040/configs/smp/defconfig index dac724bfe5018..87c94b07e6d51 100644 --- a/boards/arm/rp2040/pimoroni-tiny2040/configs/smp/defconfig +++ b/boards/arm/rp2040/pimoroni-tiny2040/configs/smp/defconfig @@ -31,7 +31,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/pimoroni-tiny2040/configs/spisd/defconfig b/boards/arm/rp2040/pimoroni-tiny2040/configs/spisd/defconfig index 8a66fa585c524..04bdc2cfe257a 100644 --- a/boards/arm/rp2040/pimoroni-tiny2040/configs/spisd/defconfig +++ b/boards/arm/rp2040/pimoroni-tiny2040/configs/spisd/defconfig @@ -37,7 +37,6 @@ CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_MMCSD=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/pimoroni-tiny2040/configs/usbmsc/defconfig b/boards/arm/rp2040/pimoroni-tiny2040/configs/usbmsc/defconfig index 60b689f77f72b..a517a21f79feb 100644 --- a/boards/arm/rp2040/pimoroni-tiny2040/configs/usbmsc/defconfig +++ b/boards/arm/rp2040/pimoroni-tiny2040/configs/usbmsc/defconfig @@ -39,7 +39,6 @@ CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_MMCSD=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/pimoroni-tiny2040/configs/usbnsh/defconfig b/boards/arm/rp2040/pimoroni-tiny2040/configs/usbnsh/defconfig index a1b3be8520e26..4c0982dec6041 100644 --- a/boards/arm/rp2040/pimoroni-tiny2040/configs/usbnsh/defconfig +++ b/boards/arm/rp2040/pimoroni-tiny2040/configs/usbnsh/defconfig @@ -33,7 +33,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_NSH_USBCONSOLE=y diff --git a/boards/arm/rp2040/pimoroni-tiny2040/src/CMakeLists.txt b/boards/arm/rp2040/pimoroni-tiny2040/src/CMakeLists.txt index d927fbcb9c4f9..1a6dd5d73df0f 100644 --- a/boards/arm/rp2040/pimoroni-tiny2040/src/CMakeLists.txt +++ b/boards/arm/rp2040/pimoroni-tiny2040/src/CMakeLists.txt @@ -26,10 +26,6 @@ if(CONFIG_DEV_GPIO) list(APPEND SRCS rp2040_gpio.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS rp2040_appinit.c) -endif() - target_sources(board PRIVATE ${SRCS}) if(CONFIG_RP2040_FLASH_BOOT) diff --git a/boards/arm/rp2040/pimoroni-tiny2040/src/Make.defs b/boards/arm/rp2040/pimoroni-tiny2040/src/Make.defs index c8868476808f0..bfbbe16f031a8 100644 --- a/boards/arm/rp2040/pimoroni-tiny2040/src/Make.defs +++ b/boards/arm/rp2040/pimoroni-tiny2040/src/Make.defs @@ -23,7 +23,6 @@ include $(TOPDIR)/Make.defs CSRCS = rp2040_boardinitialize.c -CSRCS += rp2040_appinit.c CSRCS += rp2040_bringup.c ifeq ($(CONFIG_DEV_GPIO),y) diff --git a/boards/arm/rp2040/pimoroni-tiny2040/src/rp2040_appinit.c b/boards/arm/rp2040/pimoroni-tiny2040/src/rp2040_appinit.c deleted file mode 100644 index ec21692bcaa9c..0000000000000 --- a/boards/arm/rp2040/pimoroni-tiny2040/src/rp2040_appinit.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm/rp2040/pimoroni-tiny2040/src/rp2040_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 - -#include -#include - -#include "rp2040_pico.h" - -/**************************************************************************** - * 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 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 rp2040_bringup(); -#endif -} diff --git a/boards/arm/rp2040/pimoroni-tiny2040/src/rp2040_boardinitialize.c b/boards/arm/rp2040/pimoroni-tiny2040/src/rp2040_boardinitialize.c index d756a4d64528b..9c6652fa02278 100644 --- a/boards/arm/rp2040/pimoroni-tiny2040/src/rp2040_boardinitialize.c +++ b/boards/arm/rp2040/pimoroni-tiny2040/src/rp2040_boardinitialize.c @@ -38,6 +38,8 @@ #include "rp2040_common_initialize.h" #endif /* CONFIG_ARCH_BOARD_COMMON */ +#include "rp2040_pico.h" + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -97,3 +99,29 @@ void rp2040_boardinitialize(void) /* --- Place any board specific initialization here --- */ } + +/**************************************************************************** + * 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 after up_initialize() and board_early_initialize() and just + * before the initial application is started. This additional + * initialization phase may be used, for example, to initialize board- + * specific device drivers for which board_early_initialize() is not + * suitable. + * + * Waiting for events, use of I2C, SPI, etc are permissible in the context + * of board_late_initialize(). That is because board_late_initialize() + * will run on a temporary, internal kernel thread. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ + rp2040_bringup(); +} +#endif diff --git a/boards/arm/rp2040/raspberrypi-pico-w/configs/audiopack/defconfig b/boards/arm/rp2040/raspberrypi-pico-w/configs/audiopack/defconfig index 88ca5b0035bb0..a9f4798e112f8 100644 --- a/boards/arm/rp2040/raspberrypi-pico-w/configs/audiopack/defconfig +++ b/boards/arm/rp2040/raspberrypi-pico-w/configs/audiopack/defconfig @@ -44,7 +44,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_MMCSD=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_NXPLAYER_DEFAULT_MEDIADIR="/mnt/sd0" diff --git a/boards/arm/rp2040/raspberrypi-pico-w/configs/composite/defconfig b/boards/arm/rp2040/raspberrypi-pico-w/configs/composite/defconfig index 9c4782b3c91a9..3c08ab566dbe4 100644 --- a/boards/arm/rp2040/raspberrypi-pico-w/configs/composite/defconfig +++ b/boards/arm/rp2040/raspberrypi-pico-w/configs/composite/defconfig @@ -45,7 +45,6 @@ CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_MMCSD=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/raspberrypi-pico-w/configs/displaypack/defconfig b/boards/arm/rp2040/raspberrypi-pico-w/configs/displaypack/defconfig index 1368e826f3ed7..c6dbff874c692 100644 --- a/boards/arm/rp2040/raspberrypi-pico-w/configs/displaypack/defconfig +++ b/boards/arm/rp2040/raspberrypi-pico-w/configs/displaypack/defconfig @@ -68,7 +68,6 @@ CONFIG_LCD_ST7789_YOFFSET=40 CONFIG_LCD_ST7789_YRES=240 CONFIG_MQ_MAXMSGSIZE=64 CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_NSH_USBCONSOLE=y diff --git a/boards/arm/rp2040/raspberrypi-pico-w/configs/enc28j60/defconfig b/boards/arm/rp2040/raspberrypi-pico-w/configs/enc28j60/defconfig index 7c5492356eb76..39696f5e3c9ac 100644 --- a/boards/arm/rp2040/raspberrypi-pico-w/configs/enc28j60/defconfig +++ b/boards/arm/rp2040/raspberrypi-pico-w/configs/enc28j60/defconfig @@ -46,7 +46,6 @@ CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/raspberrypi-pico-w/configs/lcd1602/defconfig b/boards/arm/rp2040/raspberrypi-pico-w/configs/lcd1602/defconfig index 99ca60de65728..4d3fb66bc7f2b 100644 --- a/boards/arm/rp2040/raspberrypi-pico-w/configs/lcd1602/defconfig +++ b/boards/arm/rp2040/raspberrypi-pico-w/configs/lcd1602/defconfig @@ -33,7 +33,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LCD_BACKPACK=y CONFIG_LCD_LCD1602=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/raspberrypi-pico-w/configs/nsh-flash/defconfig b/boards/arm/rp2040/raspberrypi-pico-w/configs/nsh-flash/defconfig index a6d99fb95c42f..9e139d4d067a7 100644 --- a/boards/arm/rp2040/raspberrypi-pico-w/configs/nsh-flash/defconfig +++ b/boards/arm/rp2040/raspberrypi-pico-w/configs/nsh-flash/defconfig @@ -29,7 +29,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/raspberrypi-pico-w/configs/nsh/defconfig b/boards/arm/rp2040/raspberrypi-pico-w/configs/nsh/defconfig index edee77db7a834..259c36077be32 100644 --- a/boards/arm/rp2040/raspberrypi-pico-w/configs/nsh/defconfig +++ b/boards/arm/rp2040/raspberrypi-pico-w/configs/nsh/defconfig @@ -30,7 +30,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/raspberrypi-pico-w/configs/nshsram/defconfig b/boards/arm/rp2040/raspberrypi-pico-w/configs/nshsram/defconfig index c83b1d8cc0f2d..fdc56d8cfff09 100644 --- a/boards/arm/rp2040/raspberrypi-pico-w/configs/nshsram/defconfig +++ b/boards/arm/rp2040/raspberrypi-pico-w/configs/nshsram/defconfig @@ -31,7 +31,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/raspberrypi-pico-w/configs/smp/defconfig b/boards/arm/rp2040/raspberrypi-pico-w/configs/smp/defconfig index 443e6d0bed93f..ad1f5c735d654 100644 --- a/boards/arm/rp2040/raspberrypi-pico-w/configs/smp/defconfig +++ b/boards/arm/rp2040/raspberrypi-pico-w/configs/smp/defconfig @@ -31,7 +31,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/raspberrypi-pico-w/configs/spisd/defconfig b/boards/arm/rp2040/raspberrypi-pico-w/configs/spisd/defconfig index 3410e029b86a3..3cf23240542d6 100644 --- a/boards/arm/rp2040/raspberrypi-pico-w/configs/spisd/defconfig +++ b/boards/arm/rp2040/raspberrypi-pico-w/configs/spisd/defconfig @@ -37,7 +37,6 @@ CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_MMCSD=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/raspberrypi-pico-w/configs/ssd1306/defconfig b/boards/arm/rp2040/raspberrypi-pico-w/configs/ssd1306/defconfig index bfbcb9eac42fc..a322724b5d0c1 100644 --- a/boards/arm/rp2040/raspberrypi-pico-w/configs/ssd1306/defconfig +++ b/boards/arm/rp2040/raspberrypi-pico-w/configs/ssd1306/defconfig @@ -48,7 +48,6 @@ CONFIG_LCD_SH1106_OLED_132=y CONFIG_LCD_SSD1306_I2C=y CONFIG_MQ_MAXMSGSIZE=64 CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_NX=y diff --git a/boards/arm/rp2040/raspberrypi-pico-w/configs/st7735/defconfig b/boards/arm/rp2040/raspberrypi-pico-w/configs/st7735/defconfig index df354dcf70225..dc082600ad13f 100644 --- a/boards/arm/rp2040/raspberrypi-pico-w/configs/st7735/defconfig +++ b/boards/arm/rp2040/raspberrypi-pico-w/configs/st7735/defconfig @@ -36,7 +36,6 @@ CONFIG_LCD_FRAMEBUFFER=y CONFIG_LCD_PORTRAIT=y CONFIG_LCD_ST7735=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/raspberrypi-pico-w/configs/telnet/defconfig b/boards/arm/rp2040/raspberrypi-pico-w/configs/telnet/defconfig index 22ac074f20c1c..ec0cc39fe2909 100644 --- a/boards/arm/rp2040/raspberrypi-pico-w/configs/telnet/defconfig +++ b/boards/arm/rp2040/raspberrypi-pico-w/configs/telnet/defconfig @@ -63,7 +63,6 @@ CONFIG_NET_LOOPBACK_PKTSIZE=1024 CONFIG_NET_TCP=y CONFIG_NET_TCP_DELAYED_ACK=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/raspberrypi-pico-w/configs/usbmsc/defconfig b/boards/arm/rp2040/raspberrypi-pico-w/configs/usbmsc/defconfig index 136aa8e784ac1..20ed10c0a3ba9 100644 --- a/boards/arm/rp2040/raspberrypi-pico-w/configs/usbmsc/defconfig +++ b/boards/arm/rp2040/raspberrypi-pico-w/configs/usbmsc/defconfig @@ -39,7 +39,6 @@ CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_MMCSD=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/raspberrypi-pico-w/configs/usbnsh/defconfig b/boards/arm/rp2040/raspberrypi-pico-w/configs/usbnsh/defconfig index d57b025aeb22e..385f5e2eb4747 100644 --- a/boards/arm/rp2040/raspberrypi-pico-w/configs/usbnsh/defconfig +++ b/boards/arm/rp2040/raspberrypi-pico-w/configs/usbnsh/defconfig @@ -33,7 +33,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_NSH_USBCONSOLE=y diff --git a/boards/arm/rp2040/raspberrypi-pico-w/configs/waveshare-lcd-1.14/defconfig b/boards/arm/rp2040/raspberrypi-pico-w/configs/waveshare-lcd-1.14/defconfig index 90618b17c8084..aa098fd6ceb22 100644 --- a/boards/arm/rp2040/raspberrypi-pico-w/configs/waveshare-lcd-1.14/defconfig +++ b/boards/arm/rp2040/raspberrypi-pico-w/configs/waveshare-lcd-1.14/defconfig @@ -65,7 +65,6 @@ CONFIG_LCD_ST7789_YOFFSET=40 CONFIG_LCD_ST7789_YRES=240 CONFIG_MQ_MAXMSGSIZE=64 CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_NX=y diff --git a/boards/arm/rp2040/raspberrypi-pico-w/configs/waveshare-lcd-1.3/defconfig b/boards/arm/rp2040/raspberrypi-pico-w/configs/waveshare-lcd-1.3/defconfig index 7e10b6389d4cf..31e64d1d14939 100644 --- a/boards/arm/rp2040/raspberrypi-pico-w/configs/waveshare-lcd-1.3/defconfig +++ b/boards/arm/rp2040/raspberrypi-pico-w/configs/waveshare-lcd-1.3/defconfig @@ -62,7 +62,6 @@ CONFIG_LCD_ST7789_FREQUENCY=64000000 CONFIG_LCD_ST7789_YRES=240 CONFIG_MQ_MAXMSGSIZE=64 CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_NX=y diff --git a/boards/arm/rp2040/raspberrypi-pico-w/src/CMakeLists.txt b/boards/arm/rp2040/raspberrypi-pico-w/src/CMakeLists.txt index e0d3c69767d71..4eb6344d4c689 100644 --- a/boards/arm/rp2040/raspberrypi-pico-w/src/CMakeLists.txt +++ b/boards/arm/rp2040/raspberrypi-pico-w/src/CMakeLists.txt @@ -26,10 +26,6 @@ if(CONFIG_DEV_GPIO) list(APPEND SRCS rp2040_gpio.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS rp2040_appinit.c) -endif() - target_sources(board PRIVATE ${SRCS}) if(CONFIG_RP2040_FLASH_BOOT) diff --git a/boards/arm/rp2040/raspberrypi-pico-w/src/Make.defs b/boards/arm/rp2040/raspberrypi-pico-w/src/Make.defs index bbab94c03f64e..7b992afb05a31 100644 --- a/boards/arm/rp2040/raspberrypi-pico-w/src/Make.defs +++ b/boards/arm/rp2040/raspberrypi-pico-w/src/Make.defs @@ -23,7 +23,6 @@ include $(TOPDIR)/Make.defs CSRCS = rp2040_boardinitialize.c -CSRCS += rp2040_appinit.c CSRCS += rp2040_bringup.c ifeq ($(CONFIG_DEV_GPIO),y) diff --git a/boards/arm/rp2040/raspberrypi-pico-w/src/rp2040_appinit.c b/boards/arm/rp2040/raspberrypi-pico-w/src/rp2040_appinit.c deleted file mode 100644 index 41635194a6357..0000000000000 --- a/boards/arm/rp2040/raspberrypi-pico-w/src/rp2040_appinit.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm/rp2040/raspberrypi-pico-w/src/rp2040_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 - -#include -#include - -#include "rp2040_pico.h" - -/**************************************************************************** - * 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 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 rp2040_bringup(); -#endif -} diff --git a/boards/arm/rp2040/raspberrypi-pico-w/src/rp2040_boardinitialize.c b/boards/arm/rp2040/raspberrypi-pico-w/src/rp2040_boardinitialize.c index fd866465134ec..e1f50f8af04a0 100644 --- a/boards/arm/rp2040/raspberrypi-pico-w/src/rp2040_boardinitialize.c +++ b/boards/arm/rp2040/raspberrypi-pico-w/src/rp2040_boardinitialize.c @@ -38,6 +38,8 @@ #include "rp2040_common_initialize.h" #endif /* CONFIG_ARCH_BOARD_COMMON */ +#include "rp2040_pico.h" + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -81,3 +83,29 @@ void rp2040_boardinitialize(void) /* --- Place any board specific initialization here --- */ } + +/**************************************************************************** + * 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 after up_initialize() and board_early_initialize() and just + * before the initial application is started. This additional + * initialization phase may be used, for example, to initialize board- + * specific device drivers for which board_early_initialize() is not + * suitable. + * + * Waiting for events, use of I2C, SPI, etc are permissible in the context + * of board_late_initialize(). That is because board_late_initialize() + * will run on a temporary, internal kernel thread. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ + rp2040_bringup(); +} +#endif diff --git a/boards/arm/rp2040/raspberrypi-pico/configs/ads7046/defconfig b/boards/arm/rp2040/raspberrypi-pico/configs/ads7046/defconfig index a77ff1cad99ae..1407d6138e521 100644 --- a/boards/arm/rp2040/raspberrypi-pico/configs/ads7046/defconfig +++ b/boards/arm/rp2040/raspberrypi-pico/configs/ads7046/defconfig @@ -37,7 +37,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_NSH_USBCONSOLE=y diff --git a/boards/arm/rp2040/raspberrypi-pico/configs/audiopack/defconfig b/boards/arm/rp2040/raspberrypi-pico/configs/audiopack/defconfig index 171e78f18bcac..130889eb4a8c2 100644 --- a/boards/arm/rp2040/raspberrypi-pico/configs/audiopack/defconfig +++ b/boards/arm/rp2040/raspberrypi-pico/configs/audiopack/defconfig @@ -44,7 +44,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_MMCSD=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_NXPLAYER_DEFAULT_MEDIADIR="/mnt/sd0" diff --git a/boards/arm/rp2040/raspberrypi-pico/configs/bmp280/defconfig b/boards/arm/rp2040/raspberrypi-pico/configs/bmp280/defconfig index c5835a1528aef..e18fe74f06527 100644 --- a/boards/arm/rp2040/raspberrypi-pico/configs/bmp280/defconfig +++ b/boards/arm/rp2040/raspberrypi-pico/configs/bmp280/defconfig @@ -35,7 +35,6 @@ CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LIBC_FLOATINGPOINT=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_NSH_USBCONSOLE=y diff --git a/boards/arm/rp2040/raspberrypi-pico/configs/composite/defconfig b/boards/arm/rp2040/raspberrypi-pico/configs/composite/defconfig index bedf0599cdeb4..26f52539e2348 100644 --- a/boards/arm/rp2040/raspberrypi-pico/configs/composite/defconfig +++ b/boards/arm/rp2040/raspberrypi-pico/configs/composite/defconfig @@ -45,7 +45,6 @@ CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_MMCSD=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/raspberrypi-pico/configs/displaypack/defconfig b/boards/arm/rp2040/raspberrypi-pico/configs/displaypack/defconfig index b8514779dd0f3..f81ffb552c295 100644 --- a/boards/arm/rp2040/raspberrypi-pico/configs/displaypack/defconfig +++ b/boards/arm/rp2040/raspberrypi-pico/configs/displaypack/defconfig @@ -68,7 +68,6 @@ CONFIG_LCD_ST7789_YOFFSET=40 CONFIG_LCD_ST7789_YRES=240 CONFIG_MQ_MAXMSGSIZE=64 CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_NSH_USBCONSOLE=y diff --git a/boards/arm/rp2040/raspberrypi-pico/configs/enc28j60/defconfig b/boards/arm/rp2040/raspberrypi-pico/configs/enc28j60/defconfig index 41424d99b85f5..b2e16372ee484 100644 --- a/boards/arm/rp2040/raspberrypi-pico/configs/enc28j60/defconfig +++ b/boards/arm/rp2040/raspberrypi-pico/configs/enc28j60/defconfig @@ -46,7 +46,6 @@ CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/raspberrypi-pico/configs/lcd1602/defconfig b/boards/arm/rp2040/raspberrypi-pico/configs/lcd1602/defconfig index 03b6fa4d907cf..e04dad8adc20f 100644 --- a/boards/arm/rp2040/raspberrypi-pico/configs/lcd1602/defconfig +++ b/boards/arm/rp2040/raspberrypi-pico/configs/lcd1602/defconfig @@ -33,7 +33,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LCD_BACKPACK=y CONFIG_LCD_LCD1602=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/raspberrypi-pico/configs/nsh-flash/defconfig b/boards/arm/rp2040/raspberrypi-pico/configs/nsh-flash/defconfig index 48fd1f9bc864a..f0fcde2f1a87b 100644 --- a/boards/arm/rp2040/raspberrypi-pico/configs/nsh-flash/defconfig +++ b/boards/arm/rp2040/raspberrypi-pico/configs/nsh-flash/defconfig @@ -29,7 +29,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/raspberrypi-pico/configs/nsh/defconfig b/boards/arm/rp2040/raspberrypi-pico/configs/nsh/defconfig index 55fbefec83ef5..fe798c8004b97 100644 --- a/boards/arm/rp2040/raspberrypi-pico/configs/nsh/defconfig +++ b/boards/arm/rp2040/raspberrypi-pico/configs/nsh/defconfig @@ -30,7 +30,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/raspberrypi-pico/configs/nshsram/defconfig b/boards/arm/rp2040/raspberrypi-pico/configs/nshsram/defconfig index 9648d6cafa01e..133f7f08522ff 100644 --- a/boards/arm/rp2040/raspberrypi-pico/configs/nshsram/defconfig +++ b/boards/arm/rp2040/raspberrypi-pico/configs/nshsram/defconfig @@ -31,7 +31,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/raspberrypi-pico/configs/pico-restouch-lcd-2.8/defconfig b/boards/arm/rp2040/raspberrypi-pico/configs/pico-restouch-lcd-2.8/defconfig index 44378af2c0d45..2279b4a0d2801 100644 --- a/boards/arm/rp2040/raspberrypi-pico/configs/pico-restouch-lcd-2.8/defconfig +++ b/boards/arm/rp2040/raspberrypi-pico/configs/pico-restouch-lcd-2.8/defconfig @@ -67,7 +67,6 @@ CONFIG_LCD_ST7789_FREQUENCY=64000000 CONFIG_LCD_ST7789_RST_GPIO=15 CONFIG_MQ_MAXMSGSIZE=64 CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_NSH_USBCONSOLE=y diff --git a/boards/arm/rp2040/raspberrypi-pico/configs/smp/defconfig b/boards/arm/rp2040/raspberrypi-pico/configs/smp/defconfig index d240ff35b6004..b776c472bfe08 100644 --- a/boards/arm/rp2040/raspberrypi-pico/configs/smp/defconfig +++ b/boards/arm/rp2040/raspberrypi-pico/configs/smp/defconfig @@ -31,7 +31,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/raspberrypi-pico/configs/spisd/defconfig b/boards/arm/rp2040/raspberrypi-pico/configs/spisd/defconfig index a5f4dc1f35949..ae640b2867ec2 100644 --- a/boards/arm/rp2040/raspberrypi-pico/configs/spisd/defconfig +++ b/boards/arm/rp2040/raspberrypi-pico/configs/spisd/defconfig @@ -37,7 +37,6 @@ CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_MMCSD=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/raspberrypi-pico/configs/ssd1306/defconfig b/boards/arm/rp2040/raspberrypi-pico/configs/ssd1306/defconfig index 904ff683cefa3..c63446f7c7eb5 100644 --- a/boards/arm/rp2040/raspberrypi-pico/configs/ssd1306/defconfig +++ b/boards/arm/rp2040/raspberrypi-pico/configs/ssd1306/defconfig @@ -48,7 +48,6 @@ CONFIG_LCD_SH1106_OLED_132=y CONFIG_LCD_SSD1306_I2C=y CONFIG_MQ_MAXMSGSIZE=64 CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_NX=y diff --git a/boards/arm/rp2040/raspberrypi-pico/configs/st7735/defconfig b/boards/arm/rp2040/raspberrypi-pico/configs/st7735/defconfig index 68a77d278ffad..2e1e41acc70e7 100644 --- a/boards/arm/rp2040/raspberrypi-pico/configs/st7735/defconfig +++ b/boards/arm/rp2040/raspberrypi-pico/configs/st7735/defconfig @@ -36,7 +36,6 @@ CONFIG_LCD_FRAMEBUFFER=y CONFIG_LCD_PORTRAIT=y CONFIG_LCD_ST7735=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/raspberrypi-pico/configs/tmp112/defconfig b/boards/arm/rp2040/raspberrypi-pico/configs/tmp112/defconfig index 06db48e6e5e91..6930508543ada 100644 --- a/boards/arm/rp2040/raspberrypi-pico/configs/tmp112/defconfig +++ b/boards/arm/rp2040/raspberrypi-pico/configs/tmp112/defconfig @@ -35,7 +35,6 @@ CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LIBC_FLOATINGPOINT=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_NSH_USBCONSOLE=y diff --git a/boards/arm/rp2040/raspberrypi-pico/configs/usbmsc/defconfig b/boards/arm/rp2040/raspberrypi-pico/configs/usbmsc/defconfig index 6da3b949fdea1..f3f93a7efae96 100644 --- a/boards/arm/rp2040/raspberrypi-pico/configs/usbmsc/defconfig +++ b/boards/arm/rp2040/raspberrypi-pico/configs/usbmsc/defconfig @@ -39,7 +39,6 @@ CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_MMCSD=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/raspberrypi-pico/configs/usbnsh/defconfig b/boards/arm/rp2040/raspberrypi-pico/configs/usbnsh/defconfig index 58a1106ad52e4..45594b766fa96 100644 --- a/boards/arm/rp2040/raspberrypi-pico/configs/usbnsh/defconfig +++ b/boards/arm/rp2040/raspberrypi-pico/configs/usbnsh/defconfig @@ -33,7 +33,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_NSH_USBCONSOLE=y diff --git a/boards/arm/rp2040/raspberrypi-pico/configs/waveshare-lcd-1.14/defconfig b/boards/arm/rp2040/raspberrypi-pico/configs/waveshare-lcd-1.14/defconfig index 79ce28c2b00a8..f5240453ba84f 100644 --- a/boards/arm/rp2040/raspberrypi-pico/configs/waveshare-lcd-1.14/defconfig +++ b/boards/arm/rp2040/raspberrypi-pico/configs/waveshare-lcd-1.14/defconfig @@ -65,7 +65,6 @@ CONFIG_LCD_ST7789_YOFFSET=40 CONFIG_LCD_ST7789_YRES=240 CONFIG_MQ_MAXMSGSIZE=64 CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_NX=y diff --git a/boards/arm/rp2040/raspberrypi-pico/configs/waveshare-lcd-1.3/defconfig b/boards/arm/rp2040/raspberrypi-pico/configs/waveshare-lcd-1.3/defconfig index bfabd860e24a8..57a7218599c2a 100644 --- a/boards/arm/rp2040/raspberrypi-pico/configs/waveshare-lcd-1.3/defconfig +++ b/boards/arm/rp2040/raspberrypi-pico/configs/waveshare-lcd-1.3/defconfig @@ -62,7 +62,6 @@ CONFIG_LCD_ST7789_FREQUENCY=64000000 CONFIG_LCD_ST7789_YRES=240 CONFIG_MQ_MAXMSGSIZE=64 CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_NX=y diff --git a/boards/arm/rp2040/raspberrypi-pico/src/CMakeLists.txt b/boards/arm/rp2040/raspberrypi-pico/src/CMakeLists.txt index d332a5eb90213..833d7c5be10e3 100644 --- a/boards/arm/rp2040/raspberrypi-pico/src/CMakeLists.txt +++ b/boards/arm/rp2040/raspberrypi-pico/src/CMakeLists.txt @@ -36,10 +36,6 @@ if(CONFIG_ARCH_BUTTONS) list(APPEND SRCS rp2040_buttons.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS rp2040_appinit.c) -endif() - target_sources(board PRIVATE ${SRCS}) if(CONFIG_RP2040_FLASH_BOOT) diff --git a/boards/arm/rp2040/raspberrypi-pico/src/Make.defs b/boards/arm/rp2040/raspberrypi-pico/src/Make.defs index 98c78e43f5078..752122e6ce12a 100644 --- a/boards/arm/rp2040/raspberrypi-pico/src/Make.defs +++ b/boards/arm/rp2040/raspberrypi-pico/src/Make.defs @@ -23,7 +23,6 @@ include $(TOPDIR)/Make.defs CSRCS = rp2040_boardinitialize.c -CSRCS += rp2040_appinit.c CSRCS += rp2040_bringup.c ifeq ($(CONFIG_DEV_GPIO),y) diff --git a/boards/arm/rp2040/raspberrypi-pico/src/rp2040_appinit.c b/boards/arm/rp2040/raspberrypi-pico/src/rp2040_appinit.c deleted file mode 100644 index d22e8a3f4a8ef..0000000000000 --- a/boards/arm/rp2040/raspberrypi-pico/src/rp2040_appinit.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm/rp2040/raspberrypi-pico/src/rp2040_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 - -#include -#include - -#include "rp2040_pico.h" - -/**************************************************************************** - * 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 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 rp2040_bringup(); -#endif -} diff --git a/boards/arm/rp2040/raspberrypi-pico/src/rp2040_boardinitialize.c b/boards/arm/rp2040/raspberrypi-pico/src/rp2040_boardinitialize.c index 6b321c98fe8b7..37572cb75064f 100644 --- a/boards/arm/rp2040/raspberrypi-pico/src/rp2040_boardinitialize.c +++ b/boards/arm/rp2040/raspberrypi-pico/src/rp2040_boardinitialize.c @@ -38,6 +38,8 @@ #include "rp2040_common_initialize.h" #endif /* CONFIG_ARCH_BOARD_COMMON */ +#include "rp2040_pico.h" + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -87,3 +89,29 @@ void rp2040_boardinitialize(void) /* --- Place any board specific initialization here --- */ } + +/**************************************************************************** + * 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 after up_initialize() and board_early_initialize() and just + * before the initial application is started. This additional + * initialization phase may be used, for example, to initialize board- + * specific device drivers for which board_early_initialize() is not + * suitable. + * + * Waiting for events, use of I2C, SPI, etc are permissible in the context + * of board_late_initialize(). That is because board_late_initialize() + * will run on a temporary, internal kernel thread. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ + rp2040_bringup(); +} +#endif diff --git a/boards/arm/rp2040/seeed-xiao-rp2040/configs/gpio/defconfig b/boards/arm/rp2040/seeed-xiao-rp2040/configs/gpio/defconfig index e5ba06b12b7c5..f25eae2f64cd9 100644 --- a/boards/arm/rp2040/seeed-xiao-rp2040/configs/gpio/defconfig +++ b/boards/arm/rp2040/seeed-xiao-rp2040/configs/gpio/defconfig @@ -35,7 +35,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_NSH_USBCONSOLE=y diff --git a/boards/arm/rp2040/seeed-xiao-rp2040/configs/nsh/defconfig b/boards/arm/rp2040/seeed-xiao-rp2040/configs/nsh/defconfig index 1ddc652e48dfe..f2b3c60739a77 100644 --- a/boards/arm/rp2040/seeed-xiao-rp2040/configs/nsh/defconfig +++ b/boards/arm/rp2040/seeed-xiao-rp2040/configs/nsh/defconfig @@ -30,7 +30,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/seeed-xiao-rp2040/configs/usbnsh/defconfig b/boards/arm/rp2040/seeed-xiao-rp2040/configs/usbnsh/defconfig index 867147e298c02..b617867bca39d 100644 --- a/boards/arm/rp2040/seeed-xiao-rp2040/configs/usbnsh/defconfig +++ b/boards/arm/rp2040/seeed-xiao-rp2040/configs/usbnsh/defconfig @@ -33,7 +33,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_NSH_USBCONSOLE=y diff --git a/boards/arm/rp2040/seeed-xiao-rp2040/configs/userleds/defconfig b/boards/arm/rp2040/seeed-xiao-rp2040/configs/userleds/defconfig index eb1d98a291ae1..17cacbb5680d3 100644 --- a/boards/arm/rp2040/seeed-xiao-rp2040/configs/userleds/defconfig +++ b/boards/arm/rp2040/seeed-xiao-rp2040/configs/userleds/defconfig @@ -35,7 +35,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_NSH_USBCONSOLE=y diff --git a/boards/arm/rp2040/seeed-xiao-rp2040/configs/ws2812/defconfig b/boards/arm/rp2040/seeed-xiao-rp2040/configs/ws2812/defconfig index 041903a61c861..3980339d14877 100644 --- a/boards/arm/rp2040/seeed-xiao-rp2040/configs/ws2812/defconfig +++ b/boards/arm/rp2040/seeed-xiao-rp2040/configs/ws2812/defconfig @@ -27,7 +27,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_NSH_USBCONSOLE=y diff --git a/boards/arm/rp2040/seeed-xiao-rp2040/src/CMakeLists.txt b/boards/arm/rp2040/seeed-xiao-rp2040/src/CMakeLists.txt index 8eee9ffef6f00..e1a6fb92192b5 100644 --- a/boards/arm/rp2040/seeed-xiao-rp2040/src/CMakeLists.txt +++ b/boards/arm/rp2040/seeed-xiao-rp2040/src/CMakeLists.txt @@ -32,10 +32,6 @@ else() list(APPEND SRCS rp2040_userleds.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS rp2040_appinit.c) -endif() - target_sources(board PRIVATE ${SRCS}) if(CONFIG_RP2040_FLASH_BOOT) diff --git a/boards/arm/rp2040/seeed-xiao-rp2040/src/Make.defs b/boards/arm/rp2040/seeed-xiao-rp2040/src/Make.defs index 94fb827eb98f2..4bace7adb8b59 100644 --- a/boards/arm/rp2040/seeed-xiao-rp2040/src/Make.defs +++ b/boards/arm/rp2040/seeed-xiao-rp2040/src/Make.defs @@ -23,7 +23,6 @@ include $(TOPDIR)/Make.defs CSRCS = rp2040_boardinitialize.c -CSRCS += rp2040_appinit.c CSRCS += rp2040_bringup.c ifeq ($(CONFIG_DEV_GPIO),y) diff --git a/boards/arm/rp2040/seeed-xiao-rp2040/src/rp2040_appinit.c b/boards/arm/rp2040/seeed-xiao-rp2040/src/rp2040_appinit.c deleted file mode 100644 index f352631a02238..0000000000000 --- a/boards/arm/rp2040/seeed-xiao-rp2040/src/rp2040_appinit.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm/rp2040/seeed-xiao-rp2040/src/rp2040_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 - -#include -#include - -#include "rp2040_pico.h" - -/**************************************************************************** - * 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 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 rp2040_bringup(); -#endif -} diff --git a/boards/arm/rp2040/seeed-xiao-rp2040/src/rp2040_boardinitialize.c b/boards/arm/rp2040/seeed-xiao-rp2040/src/rp2040_boardinitialize.c index 5a4a9b927b100..149f3ab0ff14a 100644 --- a/boards/arm/rp2040/seeed-xiao-rp2040/src/rp2040_boardinitialize.c +++ b/boards/arm/rp2040/seeed-xiao-rp2040/src/rp2040_boardinitialize.c @@ -38,6 +38,8 @@ #include "rp2040_common_initialize.h" #endif /* CONFIG_ARCH_BOARD_COMMON */ +#include "rp2040_pico.h" + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -95,3 +97,29 @@ void rp2040_boardinitialize(void) /* --- Place any board specific initialization here --- */ } + +/**************************************************************************** + * 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 after up_initialize() and board_early_initialize() and just + * before the initial application is started. This additional + * initialization phase may be used, for example, to initialize board- + * specific device drivers for which board_early_initialize() is not + * suitable. + * + * Waiting for events, use of I2C, SPI, etc are permissible in the context + * of board_late_initialize(). That is because board_late_initialize() + * will run on a temporary, internal kernel thread. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ + rp2040_bringup(); +} +#endif diff --git a/boards/arm/rp2040/w5500-evb-pico/configs/usbnsh/defconfig b/boards/arm/rp2040/w5500-evb-pico/configs/usbnsh/defconfig index e684f1f21d848..903a28422c161 100644 --- a/boards/arm/rp2040/w5500-evb-pico/configs/usbnsh/defconfig +++ b/boards/arm/rp2040/w5500-evb-pico/configs/usbnsh/defconfig @@ -47,7 +47,6 @@ CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NET_W5500=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_NSH_USBCONSOLE=y diff --git a/boards/arm/rp2040/w5500-evb-pico/src/CMakeLists.txt b/boards/arm/rp2040/w5500-evb-pico/src/CMakeLists.txt index 718b5adbc524e..4e4c11b0ef642 100644 --- a/boards/arm/rp2040/w5500-evb-pico/src/CMakeLists.txt +++ b/boards/arm/rp2040/w5500-evb-pico/src/CMakeLists.txt @@ -36,10 +36,6 @@ if(CONFIG_ARCH_BUTTONS) list(APPEND SRCS rp2040_buttons.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS rp2040_appinit.c) -endif() - target_sources(board PRIVATE ${SRCS}) if(CONFIG_RP2040_FLASH_BOOT) diff --git a/boards/arm/rp2040/w5500-evb-pico/src/Make.defs b/boards/arm/rp2040/w5500-evb-pico/src/Make.defs index 7e03991e293d2..056abad6ae417 100644 --- a/boards/arm/rp2040/w5500-evb-pico/src/Make.defs +++ b/boards/arm/rp2040/w5500-evb-pico/src/Make.defs @@ -23,7 +23,6 @@ include $(TOPDIR)/Make.defs CSRCS = rp2040_boardinitialize.c -CSRCS += rp2040_appinit.c CSRCS += rp2040_bringup.c ifeq ($(CONFIG_DEV_GPIO),y) diff --git a/boards/arm/rp2040/w5500-evb-pico/src/rp2040_appinit.c b/boards/arm/rp2040/w5500-evb-pico/src/rp2040_appinit.c deleted file mode 100644 index ea71928c6a2e7..0000000000000 --- a/boards/arm/rp2040/w5500-evb-pico/src/rp2040_appinit.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm/rp2040/w5500-evb-pico/src/rp2040_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 - -#include -#include - -#include "rp2040_pico.h" - -/**************************************************************************** - * 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 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 rp2040_bringup(); -#endif -} diff --git a/boards/arm/rp2040/w5500-evb-pico/src/rp2040_boardinitialize.c b/boards/arm/rp2040/w5500-evb-pico/src/rp2040_boardinitialize.c index b483bf15b81b3..67b85cc16be89 100644 --- a/boards/arm/rp2040/w5500-evb-pico/src/rp2040_boardinitialize.c +++ b/boards/arm/rp2040/w5500-evb-pico/src/rp2040_boardinitialize.c @@ -38,6 +38,8 @@ #include "rp2040_common_initialize.h" #endif /* CONFIG_ARCH_BOARD_COMMON */ +#include "rp2040_pico.h" + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -87,3 +89,29 @@ void rp2040_boardinitialize(void) /* --- Place any board specific initialization here --- */ } + +/**************************************************************************** + * 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 after up_initialize() and board_early_initialize() and just + * before the initial application is started. This additional + * initialization phase may be used, for example, to initialize board- + * specific device drivers for which board_early_initialize() is not + * suitable. + * + * Waiting for events, use of I2C, SPI, etc are permissible in the context + * of board_late_initialize(). That is because board_late_initialize() + * will run on a temporary, internal kernel thread. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ + rp2040_bringup(); +} +#endif diff --git a/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/configs/composite/defconfig b/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/configs/composite/defconfig index 865fdceacd9f8..f9d160c523d7e 100644 --- a/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/configs/composite/defconfig +++ b/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/configs/composite/defconfig @@ -45,7 +45,6 @@ CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_MMCSD=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/configs/fb/defconfig b/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/configs/fb/defconfig index b5680f1521628..a48ca78bca8c8 100644 --- a/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/configs/fb/defconfig +++ b/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/configs/fb/defconfig @@ -40,7 +40,6 @@ CONFIG_LCD_GC9A01=y CONFIG_LCD_GC9A01_BGR=y CONFIG_LCD_GC9A01_FREQUENCY=50000000 CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_NSH_USBCONSOLE=y diff --git a/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/configs/lvgl/defconfig b/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/configs/lvgl/defconfig index fd1f0a7b942e0..e82356b4ba84b 100644 --- a/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/configs/lvgl/defconfig +++ b/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/configs/lvgl/defconfig @@ -47,7 +47,6 @@ CONFIG_LV_USE_NUTTX=y CONFIG_LV_USE_NUTTX_LCD=y CONFIG_LV_USE_NUTTX_TOUCHSCREEN=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_NSH_USBCONSOLE=y diff --git a/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/configs/nsh-flash/defconfig b/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/configs/nsh-flash/defconfig index acaff59b8651a..e2e0a86052c26 100644 --- a/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/configs/nsh-flash/defconfig +++ b/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/configs/nsh-flash/defconfig @@ -29,7 +29,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/configs/nsh/defconfig b/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/configs/nsh/defconfig index 938cbb28aa33f..eeb0c35ccc54e 100644 --- a/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/configs/nsh/defconfig +++ b/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/configs/nsh/defconfig @@ -30,7 +30,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/configs/nshsram/defconfig b/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/configs/nshsram/defconfig index b81d6aa19baa7..2d9c31a9d3481 100644 --- a/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/configs/nshsram/defconfig +++ b/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/configs/nshsram/defconfig @@ -31,7 +31,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/configs/smp/defconfig b/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/configs/smp/defconfig index 28951115f56b2..406a22828efc0 100644 --- a/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/configs/smp/defconfig +++ b/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/configs/smp/defconfig @@ -31,7 +31,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/configs/spisd/defconfig b/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/configs/spisd/defconfig index 2fa16a303de54..7f76216453862 100644 --- a/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/configs/spisd/defconfig +++ b/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/configs/spisd/defconfig @@ -37,7 +37,6 @@ CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_MMCSD=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/configs/usbmsc/defconfig b/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/configs/usbmsc/defconfig index 7b8a89f2e432e..08cde18d71d47 100644 --- a/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/configs/usbmsc/defconfig +++ b/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/configs/usbmsc/defconfig @@ -39,7 +39,6 @@ CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_MMCSD=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/configs/usbnsh/defconfig b/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/configs/usbnsh/defconfig index 0682de4e098c0..acf7e8615275d 100644 --- a/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/configs/usbnsh/defconfig +++ b/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/configs/usbnsh/defconfig @@ -33,7 +33,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_NSH_USBCONSOLE=y diff --git a/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/src/CMakeLists.txt b/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/src/CMakeLists.txt index ecf7f07357aa5..58962075b21c9 100644 --- a/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/src/CMakeLists.txt +++ b/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/src/CMakeLists.txt @@ -26,10 +26,6 @@ if(CONFIG_DEV_GPIO) list(APPEND SRCS rp2040_gpio.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS rp2040_appinit.c) -endif() - target_sources(board PRIVATE ${SRCS}) if(CONFIG_RP2040_FLASH_BOOT) diff --git a/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/src/Make.defs b/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/src/Make.defs index 4a80b4b94fe3a..a094f2af7c59c 100644 --- a/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/src/Make.defs +++ b/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/src/Make.defs @@ -23,7 +23,6 @@ include $(TOPDIR)/Make.defs CSRCS = rp2040_boardinitialize.c -CSRCS += rp2040_appinit.c CSRCS += rp2040_bringup.c ifeq ($(CONFIG_DEV_GPIO),y) diff --git a/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/src/rp2040_appinit.c b/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/src/rp2040_appinit.c deleted file mode 100644 index 11c40ba8ae343..0000000000000 --- a/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/src/rp2040_appinit.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm/rp2040/waveshare-rp2040-lcd-1.28/src/rp2040_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 - -#include -#include - -#include "rp2040_pico.h" - -/**************************************************************************** - * 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 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 rp2040_bringup(); -#endif -} diff --git a/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/src/rp2040_boardinitialize.c b/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/src/rp2040_boardinitialize.c index e29e731c325c5..cccde2d4cef63 100644 --- a/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/src/rp2040_boardinitialize.c +++ b/boards/arm/rp2040/waveshare-rp2040-lcd-1.28/src/rp2040_boardinitialize.c @@ -38,6 +38,8 @@ #include "rp2040_common_initialize.h" #endif /* CONFIG_ARCH_BOARD_COMMON */ +#include "rp2040_pico.h" + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -87,3 +89,29 @@ void rp2040_boardinitialize(void) /* --- Place any board specific initialization here --- */ } + +/**************************************************************************** + * 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 after up_initialize() and board_early_initialize() and just + * before the initial application is started. This additional + * initialization phase may be used, for example, to initialize board- + * specific device drivers for which board_early_initialize() is not + * suitable. + * + * Waiting for events, use of I2C, SPI, etc are permissible in the context + * of board_late_initialize(). That is because board_late_initialize() + * will run on a temporary, internal kernel thread. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ + rp2040_bringup(); +} +#endif diff --git a/boards/arm/rp2040/waveshare-rp2040-zero/configs/gpio/defconfig b/boards/arm/rp2040/waveshare-rp2040-zero/configs/gpio/defconfig index 0939fb669eeaa..cc9ab24dd4c6c 100644 --- a/boards/arm/rp2040/waveshare-rp2040-zero/configs/gpio/defconfig +++ b/boards/arm/rp2040/waveshare-rp2040-zero/configs/gpio/defconfig @@ -35,7 +35,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_NSH_USBCONSOLE=y diff --git a/boards/arm/rp2040/waveshare-rp2040-zero/configs/nsh/defconfig b/boards/arm/rp2040/waveshare-rp2040-zero/configs/nsh/defconfig index e430afd42c6aa..7dc648dd5b96f 100644 --- a/boards/arm/rp2040/waveshare-rp2040-zero/configs/nsh/defconfig +++ b/boards/arm/rp2040/waveshare-rp2040-zero/configs/nsh/defconfig @@ -30,7 +30,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=270336 diff --git a/boards/arm/rp2040/waveshare-rp2040-zero/configs/usbnsh/defconfig b/boards/arm/rp2040/waveshare-rp2040-zero/configs/usbnsh/defconfig index 49383e82efc2b..2a57de58c984c 100644 --- a/boards/arm/rp2040/waveshare-rp2040-zero/configs/usbnsh/defconfig +++ b/boards/arm/rp2040/waveshare-rp2040-zero/configs/usbnsh/defconfig @@ -33,7 +33,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_NSH_USBCONSOLE=y diff --git a/boards/arm/rp2040/waveshare-rp2040-zero/configs/ws2812/defconfig b/boards/arm/rp2040/waveshare-rp2040-zero/configs/ws2812/defconfig index 0227c4a3ce355..a23ea36ed3796 100644 --- a/boards/arm/rp2040/waveshare-rp2040-zero/configs/ws2812/defconfig +++ b/boards/arm/rp2040/waveshare-rp2040-zero/configs/ws2812/defconfig @@ -27,7 +27,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_NSH_USBCONSOLE=y diff --git a/boards/arm/rp2040/waveshare-rp2040-zero/src/CMakeLists.txt b/boards/arm/rp2040/waveshare-rp2040-zero/src/CMakeLists.txt index fbaa24b8dfdf4..7be4051ef6343 100644 --- a/boards/arm/rp2040/waveshare-rp2040-zero/src/CMakeLists.txt +++ b/boards/arm/rp2040/waveshare-rp2040-zero/src/CMakeLists.txt @@ -26,10 +26,6 @@ if(CONFIG_DEV_GPIO) list(APPEND SRCS rp2040_gpio.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS rp2040_appinit.c) -endif() - target_sources(board PRIVATE ${SRCS}) if(CONFIG_RP2040_FLASH_BOOT) diff --git a/boards/arm/rp2040/waveshare-rp2040-zero/src/Make.defs b/boards/arm/rp2040/waveshare-rp2040-zero/src/Make.defs index edb7516262df7..f2a92e8ceda4c 100644 --- a/boards/arm/rp2040/waveshare-rp2040-zero/src/Make.defs +++ b/boards/arm/rp2040/waveshare-rp2040-zero/src/Make.defs @@ -21,7 +21,6 @@ include $(TOPDIR)/Make.defs CSRCS = rp2040_boardinitialize.c -CSRCS += rp2040_appinit.c CSRCS += rp2040_bringup.c ifeq ($(CONFIG_DEV_GPIO),y) diff --git a/boards/arm/rp2040/waveshare-rp2040-zero/src/rp2040_appinit.c b/boards/arm/rp2040/waveshare-rp2040-zero/src/rp2040_appinit.c deleted file mode 100644 index 6e89de01f1be1..0000000000000 --- a/boards/arm/rp2040/waveshare-rp2040-zero/src/rp2040_appinit.c +++ /dev/null @@ -1,100 +0,0 @@ -/**************************************************************************** - * boards/arm/rp2040/waveshare-rp2040-zero/src/rp2040_appinit.c - * - * 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 -#include - -#include - -#include "rp2040_pico.h" - -/**************************************************************************** - * 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 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 rp2040_bringup(); -#endif -} - -/**************************************************************************** - * 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 after up_initialize() and board_early_initialize() and just - * before the initial application is started. This additional - * initialization phase may be used, for example, to initialize board- - * specific device drivers for which board_early_initialize() is not - * suitable. - * - * Waiting for events, use of I2C, SPI, etc are permissible in the context - * of board_late_initialize(). That is because board_late_initialize() - * will run on a temporary, internal kernel thread. - * - ****************************************************************************/ - -void board_late_initialize(void) -{ - rp2040_bringup(); -} diff --git a/boards/arm/rp2040/waveshare-rp2040-zero/src/rp2040_boardinitialize.c b/boards/arm/rp2040/waveshare-rp2040-zero/src/rp2040_boardinitialize.c index 14bfe7d8a113f..ec10864091e04 100644 --- a/boards/arm/rp2040/waveshare-rp2040-zero/src/rp2040_boardinitialize.c +++ b/boards/arm/rp2040/waveshare-rp2040-zero/src/rp2040_boardinitialize.c @@ -36,6 +36,8 @@ #include "rp2040_common_initialize.h" #endif /* CONFIG_ARCH_BOARD_COMMON */ +#include "rp2040_pico.h" + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -79,3 +81,29 @@ void rp2040_boardinitialize(void) /* --- Place any board specific initialization here --- */ } + +/**************************************************************************** + * 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 after up_initialize() and board_early_initialize() and just + * before the initial application is started. This additional + * initialization phase may be used, for example, to initialize board- + * specific device drivers for which board_early_initialize() is not + * suitable. + * + * Waiting for events, use of I2C, SPI, etc are permissible in the context + * of board_late_initialize(). That is because board_late_initialize() + * will run on a temporary, internal kernel thread. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ + rp2040_bringup(); +} +#endif diff --git a/boards/arm/rp23xx/common/src/rp23xx_usbmsc.c b/boards/arm/rp23xx/common/src/rp23xx_usbmsc.c index 4bbc6af2aa98f..4f3ef71bbb485 100644 --- a/boards/arm/rp23xx/common/src/rp23xx_usbmsc.c +++ b/boards/arm/rp23xx/common/src/rp23xx_usbmsc.c @@ -52,8 +52,7 @@ int board_usbmsc_initialize(int port) { /* If system/usbmsc is built as an NSH command, then SD slot should - * already have been initialized in board_app_initialize() - * (see stm32_appinit.c). + * already have been initialized. * In this case, there is nothing further to be done here. */ diff --git a/boards/arm/rp23xx/pimoroni-pico-2-plus/configs/audiopack/defconfig b/boards/arm/rp23xx/pimoroni-pico-2-plus/configs/audiopack/defconfig index b4abc805a139a..756263d7a98f5 100644 --- a/boards/arm/rp23xx/pimoroni-pico-2-plus/configs/audiopack/defconfig +++ b/boards/arm/rp23xx/pimoroni-pico-2-plus/configs/audiopack/defconfig @@ -44,7 +44,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_MMCSD=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_NXPLAYER_DEFAULT_MEDIADIR="/mnt/sd0" diff --git a/boards/arm/rp23xx/pimoroni-pico-2-plus/configs/composite/defconfig b/boards/arm/rp23xx/pimoroni-pico-2-plus/configs/composite/defconfig index 5aa3824e3a286..bb95c5aa0d166 100644 --- a/boards/arm/rp23xx/pimoroni-pico-2-plus/configs/composite/defconfig +++ b/boards/arm/rp23xx/pimoroni-pico-2-plus/configs/composite/defconfig @@ -45,7 +45,6 @@ CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_MMCSD=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=532480 diff --git a/boards/arm/rp23xx/pimoroni-pico-2-plus/configs/nsh/defconfig b/boards/arm/rp23xx/pimoroni-pico-2-plus/configs/nsh/defconfig index dda6b8d95bb21..b4144dcb1dab9 100644 --- a/boards/arm/rp23xx/pimoroni-pico-2-plus/configs/nsh/defconfig +++ b/boards/arm/rp23xx/pimoroni-pico-2-plus/configs/nsh/defconfig @@ -30,7 +30,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=532480 diff --git a/boards/arm/rp23xx/pimoroni-pico-2-plus/configs/nshsram/defconfig b/boards/arm/rp23xx/pimoroni-pico-2-plus/configs/nshsram/defconfig index cf18b4d1083cf..6620b983c879a 100644 --- a/boards/arm/rp23xx/pimoroni-pico-2-plus/configs/nshsram/defconfig +++ b/boards/arm/rp23xx/pimoroni-pico-2-plus/configs/nshsram/defconfig @@ -30,7 +30,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=532480 diff --git a/boards/arm/rp23xx/pimoroni-pico-2-plus/configs/smp/defconfig b/boards/arm/rp23xx/pimoroni-pico-2-plus/configs/smp/defconfig index 8a622620736c2..a363b10433afa 100644 --- a/boards/arm/rp23xx/pimoroni-pico-2-plus/configs/smp/defconfig +++ b/boards/arm/rp23xx/pimoroni-pico-2-plus/configs/smp/defconfig @@ -31,7 +31,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=532480 diff --git a/boards/arm/rp23xx/pimoroni-pico-2-plus/configs/usbmsc/defconfig b/boards/arm/rp23xx/pimoroni-pico-2-plus/configs/usbmsc/defconfig index 19b8598035620..4f04df4a4b579 100644 --- a/boards/arm/rp23xx/pimoroni-pico-2-plus/configs/usbmsc/defconfig +++ b/boards/arm/rp23xx/pimoroni-pico-2-plus/configs/usbmsc/defconfig @@ -39,7 +39,6 @@ CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_MMCSD=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=532480 diff --git a/boards/arm/rp23xx/pimoroni-pico-2-plus/configs/usbnsh/defconfig b/boards/arm/rp23xx/pimoroni-pico-2-plus/configs/usbnsh/defconfig index 1f2ee6df3a0bd..e5ede45c01813 100644 --- a/boards/arm/rp23xx/pimoroni-pico-2-plus/configs/usbnsh/defconfig +++ b/boards/arm/rp23xx/pimoroni-pico-2-plus/configs/usbnsh/defconfig @@ -33,7 +33,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_NSH_USBCONSOLE=y diff --git a/boards/arm/rp23xx/pimoroni-pico-2-plus/configs/userled/defconfig b/boards/arm/rp23xx/pimoroni-pico-2-plus/configs/userled/defconfig index a44cc901ef254..1e8184574e9f8 100644 --- a/boards/arm/rp23xx/pimoroni-pico-2-plus/configs/userled/defconfig +++ b/boards/arm/rp23xx/pimoroni-pico-2-plus/configs/userled/defconfig @@ -32,7 +32,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=532480 diff --git a/boards/arm/rp23xx/pimoroni-pico-2-plus/src/CMakeLists.txt b/boards/arm/rp23xx/pimoroni-pico-2-plus/src/CMakeLists.txt index e90e561904162..74bce2000b09d 100644 --- a/boards/arm/rp23xx/pimoroni-pico-2-plus/src/CMakeLists.txt +++ b/boards/arm/rp23xx/pimoroni-pico-2-plus/src/CMakeLists.txt @@ -36,10 +36,6 @@ if(CONFIG_ARCH_BUTTONS) list(APPEND SRCS rp23xx_buttons.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS rp23xx_appinit.c) -endif() - target_sources(board PRIVATE ${SRCS}) if(CONFIG_BOOT_RUNFROMFLASH) diff --git a/boards/arm/rp23xx/pimoroni-pico-2-plus/src/Make.defs b/boards/arm/rp23xx/pimoroni-pico-2-plus/src/Make.defs index 175ee9577b0b7..3da52c53f3f4e 100644 --- a/boards/arm/rp23xx/pimoroni-pico-2-plus/src/Make.defs +++ b/boards/arm/rp23xx/pimoroni-pico-2-plus/src/Make.defs @@ -21,7 +21,6 @@ include $(TOPDIR)/Make.defs CSRCS = rp23xx_boardinitialize.c -CSRCS += rp23xx_appinit.c CSRCS += rp23xx_bringup.c ifeq ($(CONFIG_DEV_GPIO),y) diff --git a/boards/arm/rp23xx/pimoroni-pico-2-plus/src/rp23xx_appinit.c b/boards/arm/rp23xx/pimoroni-pico-2-plus/src/rp23xx_appinit.c deleted file mode 100644 index 950224adeae6a..0000000000000 --- a/boards/arm/rp23xx/pimoroni-pico-2-plus/src/rp23xx_appinit.c +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** - * boards/arm/rp23xx/pimoroni-pico-2-plus/src/rp23xx_appinit.c - * - * 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 - -#include -#include - -#include "rp23xx_pico.h" - -/**************************************************************************** - * 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 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 rp23xx_bringup(); -#endif -} diff --git a/boards/arm/rp23xx/pimoroni-pico-2-plus/src/rp23xx_boardinitialize.c b/boards/arm/rp23xx/pimoroni-pico-2-plus/src/rp23xx_boardinitialize.c index 8a3a683e1c05f..9f215113b447c 100644 --- a/boards/arm/rp23xx/pimoroni-pico-2-plus/src/rp23xx_boardinitialize.c +++ b/boards/arm/rp23xx/pimoroni-pico-2-plus/src/rp23xx_boardinitialize.c @@ -39,6 +39,8 @@ #include "rp23xx_common_initialize.h" #endif /* CONFIG_ARCH_BOARD_COMMON */ +#include "rp23xx_pico.h" + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -92,3 +94,23 @@ void rp23xx_boardinitialize(void) /* --- Place any board specific initialization here --- */ } + +/**************************************************************************** + * 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ + rp23xx_bringup(); +} +#endif diff --git a/boards/arm/rp23xx/raspberrypi-pico-2/configs/nsh/defconfig b/boards/arm/rp23xx/raspberrypi-pico-2/configs/nsh/defconfig index d1b5c36e0273f..a1c05e37ce46d 100644 --- a/boards/arm/rp23xx/raspberrypi-pico-2/configs/nsh/defconfig +++ b/boards/arm/rp23xx/raspberrypi-pico-2/configs/nsh/defconfig @@ -30,7 +30,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=532480 diff --git a/boards/arm/rp23xx/raspberrypi-pico-2/configs/smp/defconfig b/boards/arm/rp23xx/raspberrypi-pico-2/configs/smp/defconfig index f500b55eb6138..9fb71a5868c6f 100644 --- a/boards/arm/rp23xx/raspberrypi-pico-2/configs/smp/defconfig +++ b/boards/arm/rp23xx/raspberrypi-pico-2/configs/smp/defconfig @@ -31,7 +31,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=532480 diff --git a/boards/arm/rp23xx/raspberrypi-pico-2/configs/spisd/defconfig b/boards/arm/rp23xx/raspberrypi-pico-2/configs/spisd/defconfig index 77c5cda0374a0..bcba5d22c6231 100644 --- a/boards/arm/rp23xx/raspberrypi-pico-2/configs/spisd/defconfig +++ b/boards/arm/rp23xx/raspberrypi-pico-2/configs/spisd/defconfig @@ -48,7 +48,6 @@ CONFIG_LIBC_MEMFD_ERROR=y CONFIG_MMCSD=y CONFIG_MMCSD_PROCFS=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=532480 diff --git a/boards/arm/rp23xx/raspberrypi-pico-2/configs/usbnsh/defconfig b/boards/arm/rp23xx/raspberrypi-pico-2/configs/usbnsh/defconfig index bdd3beccadccf..eeab2e4674620 100644 --- a/boards/arm/rp23xx/raspberrypi-pico-2/configs/usbnsh/defconfig +++ b/boards/arm/rp23xx/raspberrypi-pico-2/configs/usbnsh/defconfig @@ -33,7 +33,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_NSH_USBCONSOLE=y diff --git a/boards/arm/rp23xx/raspberrypi-pico-2/configs/userled/defconfig b/boards/arm/rp23xx/raspberrypi-pico-2/configs/userled/defconfig index bb025a5f139e4..a7cd663df31fb 100644 --- a/boards/arm/rp23xx/raspberrypi-pico-2/configs/userled/defconfig +++ b/boards/arm/rp23xx/raspberrypi-pico-2/configs/userled/defconfig @@ -32,7 +32,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=532480 diff --git a/boards/arm/rp23xx/raspberrypi-pico-2/src/CMakeLists.txt b/boards/arm/rp23xx/raspberrypi-pico-2/src/CMakeLists.txt index dea2301354397..c93fc059e4284 100644 --- a/boards/arm/rp23xx/raspberrypi-pico-2/src/CMakeLists.txt +++ b/boards/arm/rp23xx/raspberrypi-pico-2/src/CMakeLists.txt @@ -34,10 +34,6 @@ if(CONFIG_ARCH_BUTTONS) list(APPEND SRCS rp23xx_buttons.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS rp23xx_appinit.c) -endif() - target_sources(board PRIVATE ${SRCS}) if(CONFIG_BOOT_RUNFROMFLASH) diff --git a/boards/arm/rp23xx/raspberrypi-pico-2/src/Make.defs b/boards/arm/rp23xx/raspberrypi-pico-2/src/Make.defs index bae9125fd7970..bde8c6216a252 100644 --- a/boards/arm/rp23xx/raspberrypi-pico-2/src/Make.defs +++ b/boards/arm/rp23xx/raspberrypi-pico-2/src/Make.defs @@ -21,7 +21,6 @@ include $(TOPDIR)/Make.defs CSRCS = rp23xx_boardinitialize.c -CSRCS += rp23xx_appinit.c CSRCS += rp23xx_bringup.c ifeq ($(CONFIG_DEV_GPIO),y) diff --git a/boards/arm/rp23xx/raspberrypi-pico-2/src/rp23xx_appinit.c b/boards/arm/rp23xx/raspberrypi-pico-2/src/rp23xx_appinit.c deleted file mode 100644 index 491d6f46044f4..0000000000000 --- a/boards/arm/rp23xx/raspberrypi-pico-2/src/rp23xx_appinit.c +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** - * boards/arm/rp23xx/raspberrypi-pico-2/src/rp23xx_appinit.c - * - * 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 - -#include -#include - -#include "rp23xx_pico.h" - -/**************************************************************************** - * 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 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 rp23xx_bringup(); -#endif -} diff --git a/boards/arm/rp23xx/raspberrypi-pico-2/src/rp23xx_boardinitialize.c b/boards/arm/rp23xx/raspberrypi-pico-2/src/rp23xx_boardinitialize.c index 61d8d5dbd3b40..274767b5cf8f1 100644 --- a/boards/arm/rp23xx/raspberrypi-pico-2/src/rp23xx_boardinitialize.c +++ b/boards/arm/rp23xx/raspberrypi-pico-2/src/rp23xx_boardinitialize.c @@ -39,6 +39,8 @@ #include "rp23xx_common_initialize.h" #endif /* CONFIG_ARCH_BOARD_COMMON */ +#include "rp23xx_pico.h" + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -92,3 +94,23 @@ void rp23xx_boardinitialize(void) /* --- Place any board specific initialization here --- */ } + +/**************************************************************************** + * 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ + rp23xx_bringup(); +} +#endif diff --git a/boards/arm/rp23xx/xiao-rp2350/configs/combo/defconfig b/boards/arm/rp23xx/xiao-rp2350/configs/combo/defconfig index 1356b60434d13..8313fd8e2bc49 100644 --- a/boards/arm/rp23xx/xiao-rp2350/configs/combo/defconfig +++ b/boards/arm/rp23xx/xiao-rp2350/configs/combo/defconfig @@ -33,7 +33,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=532480 diff --git a/boards/arm/rp23xx/xiao-rp2350/configs/nsh/defconfig b/boards/arm/rp23xx/xiao-rp2350/configs/nsh/defconfig index 74d2d9c3ba32d..0d4e4750c84de 100644 --- a/boards/arm/rp23xx/xiao-rp2350/configs/nsh/defconfig +++ b/boards/arm/rp23xx/xiao-rp2350/configs/nsh/defconfig @@ -30,7 +30,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=532480 diff --git a/boards/arm/rp23xx/xiao-rp2350/configs/usbnsh/defconfig b/boards/arm/rp23xx/xiao-rp2350/configs/usbnsh/defconfig index fe1069ed99b54..b00a4bc44744b 100644 --- a/boards/arm/rp23xx/xiao-rp2350/configs/usbnsh/defconfig +++ b/boards/arm/rp23xx/xiao-rp2350/configs/usbnsh/defconfig @@ -33,7 +33,6 @@ CONFIG_FS_PROCFS=y CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_NSH_USBCONSOLE=y diff --git a/boards/arm/rp23xx/xiao-rp2350/src/CMakeLists.txt b/boards/arm/rp23xx/xiao-rp2350/src/CMakeLists.txt index 8abdb1c0febfe..ae1c0b947db5a 100644 --- a/boards/arm/rp23xx/xiao-rp2350/src/CMakeLists.txt +++ b/boards/arm/rp23xx/xiao-rp2350/src/CMakeLists.txt @@ -34,10 +34,6 @@ if(CONFIG_ARCH_BUTTONS) list(APPEND SRCS rp23xx_buttons.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS rp23xx_appinit.c) -endif() - target_sources(board PRIVATE ${SRCS}) if(CONFIG_BOOT_RUNFROMFLASH) diff --git a/boards/arm/rp23xx/xiao-rp2350/src/Make.defs b/boards/arm/rp23xx/xiao-rp2350/src/Make.defs index f1ab8b40fece8..eb07ce8c7d2b6 100644 --- a/boards/arm/rp23xx/xiao-rp2350/src/Make.defs +++ b/boards/arm/rp23xx/xiao-rp2350/src/Make.defs @@ -21,7 +21,6 @@ include $(TOPDIR)/Make.defs CSRCS = rp23xx_boardinitialize.c -CSRCS += rp23xx_appinit.c CSRCS += rp23xx_bringup.c ifeq ($(CONFIG_DEV_GPIO),y) diff --git a/boards/arm/rp23xx/xiao-rp2350/src/rp23xx_appinit.c b/boards/arm/rp23xx/xiao-rp2350/src/rp23xx_appinit.c deleted file mode 100644 index 9eb1060ce21c3..0000000000000 --- a/boards/arm/rp23xx/xiao-rp2350/src/rp23xx_appinit.c +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** - * boards/arm/rp23xx/xiao-rp2350/src/rp23xx_appinit.c - * - * 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 - -#include -#include - -#include "rp23xx_pico.h" - -/**************************************************************************** - * 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 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 rp23xx_bringup(); -#endif -} diff --git a/boards/arm/rp23xx/xiao-rp2350/src/rp23xx_boardinitialize.c b/boards/arm/rp23xx/xiao-rp2350/src/rp23xx_boardinitialize.c index 108e4f69d52ea..41e231a6103b7 100644 --- a/boards/arm/rp23xx/xiao-rp2350/src/rp23xx_boardinitialize.c +++ b/boards/arm/rp23xx/xiao-rp2350/src/rp23xx_boardinitialize.c @@ -39,6 +39,8 @@ #include "rp23xx_common_initialize.h" #endif /* CONFIG_ARCH_BOARD_COMMON */ +#include "rp23xx_pico.h" + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -92,3 +94,23 @@ void rp23xx_boardinitialize(void) /* --- Place any board specific initialization here --- */ } + +/**************************************************************************** + * 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ + rp23xx_bringup(); +} +#endif diff --git a/boards/arm/s32k1xx/rddrone-bms772/configs/nsh/defconfig b/boards/arm/s32k1xx/rddrone-bms772/configs/nsh/defconfig index 3b2465a937040..e0736f7f3957d 100644 --- a/boards/arm/s32k1xx/rddrone-bms772/configs/nsh/defconfig +++ b/boards/arm/s32k1xx/rddrone-bms772/configs/nsh/defconfig @@ -24,7 +24,6 @@ CONFIG_HAVE_CXX=y CONFIG_HAVE_CXXINITIALIZE=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LPUART1_SERIAL_CONSOLE=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/s32k1xx/rddrone-bms772/src/Makefile b/boards/arm/s32k1xx/rddrone-bms772/src/Makefile index a2655e2ca35dd..77b2d200f6aa0 100644 --- a/boards/arm/s32k1xx/rddrone-bms772/src/Makefile +++ b/boards/arm/s32k1xx/rddrone-bms772/src/Makefile @@ -33,10 +33,6 @@ else CSRCS += s32k1xx_userleds.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += s32k1xx_appinit.c -endif - ifeq ($(CONFIG_BOARDCTL_RESET),y) CSRCS += s32k1xx_reset.c endif diff --git a/boards/arm/s32k1xx/rddrone-bms772/src/s32k1xx_appinit.c b/boards/arm/s32k1xx/rddrone-bms772/src/s32k1xx_appinit.c deleted file mode 100644 index d7f61f760417e..0000000000000 --- a/boards/arm/s32k1xx/rddrone-bms772/src/s32k1xx_appinit.c +++ /dev/null @@ -1,81 +0,0 @@ -/**************************************************************************** - * boards/arm/s32k1xx/rddrone-bms772/src/s32k1xx_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. - * - ****************************************************************************/ - -/* Copyright 2022 NXP */ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include -#include - -#include -#include - -#include "rddrone-bms772.h" - -/**************************************************************************** - * 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 s32k1xx_bringup(); -#endif -} diff --git a/boards/arm/s32k1xx/s32k118evb/configs/nsh/defconfig b/boards/arm/s32k1xx/s32k118evb/configs/nsh/defconfig index 953856d4adb35..cadf6c0f8e2ad 100644 --- a/boards/arm/s32k1xx/s32k118evb/configs/nsh/defconfig +++ b/boards/arm/s32k1xx/s32k118evb/configs/nsh/defconfig @@ -31,7 +31,6 @@ CONFIG_LPUART0_TXBUFSIZE=64 CONFIG_MM_SMALL=y CONFIG_MOTOROLA_SREC=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=64 CONFIG_NUNGET_CHARS=0 CONFIG_POSIX_SPAWN_DEFAULT_STACKSIZE=1536 diff --git a/boards/arm/s32k1xx/s32k118evb/src/CMakeLists.txt b/boards/arm/s32k1xx/s32k118evb/src/CMakeLists.txt index a90d36a7adda9..8b180264800d9 100644 --- a/boards/arm/s32k1xx/s32k118evb/src/CMakeLists.txt +++ b/boards/arm/s32k1xx/s32k118evb/src/CMakeLists.txt @@ -33,10 +33,6 @@ else() list(APPEND SRCS s32k1xx_userleds.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS s32k1xx_appinit.c) -endif() - if(CONFIG_S32K1XX_LPI2C) list(APPEND SRCS s32k1xx_i2c.c) endif() diff --git a/boards/arm/s32k1xx/s32k118evb/src/Makefile b/boards/arm/s32k1xx/s32k118evb/src/Makefile index cc3a1362b0f85..9e567f2fe8f99 100644 --- a/boards/arm/s32k1xx/s32k118evb/src/Makefile +++ b/boards/arm/s32k1xx/s32k118evb/src/Makefile @@ -35,10 +35,6 @@ else CSRCS += s32k1xx_userleds.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += s32k1xx_appinit.c -endif - ifeq ($(CONFIG_S32K1XX_LPI2C),y) CSRCS += s32k1xx_i2c.c endif diff --git a/boards/arm/s32k1xx/s32k118evb/src/s32k1xx_appinit.c b/boards/arm/s32k1xx/s32k118evb/src/s32k1xx_appinit.c deleted file mode 100644 index 0f05471074e57..0000000000000 --- a/boards/arm/s32k1xx/s32k118evb/src/s32k1xx_appinit.c +++ /dev/null @@ -1,79 +0,0 @@ -/**************************************************************************** - * boards/arm/s32k1xx/s32k118evb/src/s32k1xx_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 -#include - -#include -#include - -#include "s32k118evb.h" - -/**************************************************************************** - * 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 s32k1xx_bringup(); -#endif -} diff --git a/boards/arm/s32k1xx/s32k144evb/configs/nsh/defconfig b/boards/arm/s32k1xx/s32k144evb/configs/nsh/defconfig index fd0e35e47a740..358725b1241b9 100644 --- a/boards/arm/s32k1xx/s32k144evb/configs/nsh/defconfig +++ b/boards/arm/s32k1xx/s32k144evb/configs/nsh/defconfig @@ -25,7 +25,6 @@ CONFIG_HAVE_CXXINITIALIZE=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LPUART1_SERIAL_CONSOLE=y CONFIG_MOTOROLA_SREC=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/s32k1xx/s32k144evb/src/CMakeLists.txt b/boards/arm/s32k1xx/s32k144evb/src/CMakeLists.txt index fc12ef0613248..c7e23d3027f0b 100644 --- a/boards/arm/s32k1xx/s32k144evb/src/CMakeLists.txt +++ b/boards/arm/s32k1xx/s32k144evb/src/CMakeLists.txt @@ -33,10 +33,6 @@ else() list(APPEND SRCS s32k1xx_userleds.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS s32k1xx_appinit.c) -endif() - if(CONFIG_BOARDCTL_UNIQUEID) list(APPEND SRCS s32k1xx_uid.c) endif() diff --git a/boards/arm/s32k1xx/s32k144evb/src/Makefile b/boards/arm/s32k1xx/s32k144evb/src/Makefile index 3b364f45b77ca..14436bd46dde8 100644 --- a/boards/arm/s32k1xx/s32k144evb/src/Makefile +++ b/boards/arm/s32k1xx/s32k144evb/src/Makefile @@ -35,10 +35,6 @@ else CSRCS += s32k1xx_userleds.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += s32k1xx_appinit.c -endif - ifeq ($(CONFIG_BOARDCTL_UNIQUEID),y) CSRCS += s32k1xx_uid.c endif diff --git a/boards/arm/s32k1xx/s32k144evb/src/s32k1xx_appinit.c b/boards/arm/s32k1xx/s32k144evb/src/s32k1xx_appinit.c deleted file mode 100644 index b928067dabb96..0000000000000 --- a/boards/arm/s32k1xx/s32k144evb/src/s32k1xx_appinit.c +++ /dev/null @@ -1,79 +0,0 @@ -/**************************************************************************** - * boards/arm/s32k1xx/s32k144evb/src/s32k1xx_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 -#include - -#include -#include - -#include "s32k144evb.h" - -/**************************************************************************** - * 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 s32k1xx_bringup(); -#endif -} diff --git a/boards/arm/s32k1xx/s32k146evb/configs/nsh/defconfig b/boards/arm/s32k1xx/s32k146evb/configs/nsh/defconfig index 0276c00b0afca..764944a53fd78 100644 --- a/boards/arm/s32k1xx/s32k146evb/configs/nsh/defconfig +++ b/boards/arm/s32k1xx/s32k146evb/configs/nsh/defconfig @@ -25,7 +25,6 @@ CONFIG_HAVE_CXXINITIALIZE=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LPUART1_SERIAL_CONSOLE=y CONFIG_MOTOROLA_SREC=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/s32k1xx/s32k146evb/src/CMakeLists.txt b/boards/arm/s32k1xx/s32k146evb/src/CMakeLists.txt index b1be587fc9d5e..536d7b9906969 100644 --- a/boards/arm/s32k1xx/s32k146evb/src/CMakeLists.txt +++ b/boards/arm/s32k1xx/s32k146evb/src/CMakeLists.txt @@ -33,10 +33,6 @@ else() list(APPEND SRCS s32k1xx_userleds.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS s32k1xx_appinit.c) -endif() - if(CONFIG_S32K1XX_LPI2C) list(APPEND SRCS s32k1xx_i2c.c) endif() diff --git a/boards/arm/s32k1xx/s32k146evb/src/Makefile b/boards/arm/s32k1xx/s32k146evb/src/Makefile index 890e8c068c177..536f51627cf3e 100644 --- a/boards/arm/s32k1xx/s32k146evb/src/Makefile +++ b/boards/arm/s32k1xx/s32k146evb/src/Makefile @@ -35,10 +35,6 @@ else CSRCS += s32k1xx_userleds.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += s32k1xx_appinit.c -endif - ifeq ($(CONFIG_S32K1XX_LPI2C),y) CSRCS += s32k1xx_i2c.c endif diff --git a/boards/arm/s32k1xx/s32k146evb/src/s32k1xx_appinit.c b/boards/arm/s32k1xx/s32k146evb/src/s32k1xx_appinit.c deleted file mode 100644 index fb18b57f35adf..0000000000000 --- a/boards/arm/s32k1xx/s32k146evb/src/s32k1xx_appinit.c +++ /dev/null @@ -1,79 +0,0 @@ -/**************************************************************************** - * boards/arm/s32k1xx/s32k146evb/src/s32k1xx_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 -#include - -#include -#include - -#include "s32k146evb.h" - -/**************************************************************************** - * 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 s32k1xx_bringup(); -#endif -} diff --git a/boards/arm/s32k1xx/s32k148evb/configs/nsh/defconfig b/boards/arm/s32k1xx/s32k148evb/configs/nsh/defconfig index c8ba9f305f58d..3aaeabcabbd41 100644 --- a/boards/arm/s32k1xx/s32k148evb/configs/nsh/defconfig +++ b/boards/arm/s32k1xx/s32k148evb/configs/nsh/defconfig @@ -25,7 +25,6 @@ CONFIG_HAVE_CXXINITIALIZE=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LPUART1_SERIAL_CONSOLE=y CONFIG_MOTOROLA_SREC=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/s32k1xx/s32k148evb/src/CMakeLists.txt b/boards/arm/s32k1xx/s32k148evb/src/CMakeLists.txt index c714e6f1a83f2..37fc12917ca19 100644 --- a/boards/arm/s32k1xx/s32k148evb/src/CMakeLists.txt +++ b/boards/arm/s32k1xx/s32k148evb/src/CMakeLists.txt @@ -33,10 +33,6 @@ else() list(APPEND SRCS s32k1xx_userleds.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS s32k1xx_appinit.c) -endif() - if(CONFIG_S32K1XX_LPI2C) list(APPEND SRCS s32k1xx_i2c.c) endif() diff --git a/boards/arm/s32k1xx/s32k148evb/src/Makefile b/boards/arm/s32k1xx/s32k148evb/src/Makefile index 20c230cea6785..32b0126d656e9 100644 --- a/boards/arm/s32k1xx/s32k148evb/src/Makefile +++ b/boards/arm/s32k1xx/s32k148evb/src/Makefile @@ -35,10 +35,6 @@ else CSRCS += s32k1xx_userleds.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += s32k1xx_appinit.c -endif - ifeq ($(CONFIG_S32K1XX_LPI2C),y) CSRCS += s32k1xx_i2c.c endif diff --git a/boards/arm/s32k1xx/s32k148evb/src/s32k1xx_appinit.c b/boards/arm/s32k1xx/s32k148evb/src/s32k1xx_appinit.c deleted file mode 100644 index 147cf7423c1ef..0000000000000 --- a/boards/arm/s32k1xx/s32k148evb/src/s32k1xx_appinit.c +++ /dev/null @@ -1,79 +0,0 @@ -/**************************************************************************** - * boards/arm/s32k1xx/s32k148evb/src/s32k1xx_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 -#include - -#include -#include - -#include "s32k148evb.h" - -/**************************************************************************** - * 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 s32k1xx_bringup(); -#endif -} diff --git a/boards/arm/s32k1xx/ucans32k146/configs/can/defconfig b/boards/arm/s32k1xx/ucans32k146/configs/can/defconfig index 2571f01c038c1..8882188490ead 100644 --- a/boards/arm/s32k1xx/ucans32k146/configs/can/defconfig +++ b/boards/arm/s32k1xx/ucans32k146/configs/can/defconfig @@ -42,7 +42,6 @@ CONFIG_NETDEV_IFINDEX=y CONFIG_NET_CAN=y CONFIG_NET_CAN_SOCK_OPTS=y CONFIG_NET_TIMESTAMP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/s32k1xx/ucans32k146/configs/nsh/defconfig b/boards/arm/s32k1xx/ucans32k146/configs/nsh/defconfig index 558103cd2bb54..1c5c385244414 100644 --- a/boards/arm/s32k1xx/ucans32k146/configs/nsh/defconfig +++ b/boards/arm/s32k1xx/ucans32k146/configs/nsh/defconfig @@ -24,7 +24,6 @@ CONFIG_HAVE_CXX=y CONFIG_HAVE_CXXINITIALIZE=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LPUART1_SERIAL_CONSOLE=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/s32k1xx/ucans32k146/configs/se05x/defconfig b/boards/arm/s32k1xx/ucans32k146/configs/se05x/defconfig index a6ba699d9ba78..320b17b47cd70 100644 --- a/boards/arm/s32k1xx/ucans32k146/configs/se05x/defconfig +++ b/boards/arm/s32k1xx/ucans32k146/configs/se05x/defconfig @@ -32,7 +32,6 @@ CONFIG_HAVE_CXXINITIALIZE=y CONFIG_I2C=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LPUART1_SERIAL_CONSOLE=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/s32k1xx/ucans32k146/src/CMakeLists.txt b/boards/arm/s32k1xx/ucans32k146/src/CMakeLists.txt index fda3e69bbb67e..f1be68c82c960 100644 --- a/boards/arm/s32k1xx/ucans32k146/src/CMakeLists.txt +++ b/boards/arm/s32k1xx/ucans32k146/src/CMakeLists.txt @@ -33,10 +33,6 @@ else() list(APPEND SRCS s32k1xx_userleds.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS s32k1xx_appinit.c) -endif() - if(CONFIG_I2C_DRIVER) list(APPEND SRCS s32k1xx_i2c.c) endif() diff --git a/boards/arm/s32k1xx/ucans32k146/src/Makefile b/boards/arm/s32k1xx/ucans32k146/src/Makefile index 3ce33a327218b..72cf943a3417e 100644 --- a/boards/arm/s32k1xx/ucans32k146/src/Makefile +++ b/boards/arm/s32k1xx/ucans32k146/src/Makefile @@ -35,10 +35,6 @@ else CSRCS += s32k1xx_userleds.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += s32k1xx_appinit.c -endif - ifeq ($(CONFIG_I2C_DRIVER),y) CSRCS += s32k1xx_i2c.c endif diff --git a/boards/arm/s32k1xx/ucans32k146/src/s32k1xx_appinit.c b/boards/arm/s32k1xx/ucans32k146/src/s32k1xx_appinit.c deleted file mode 100644 index 42b6ec7975c3c..0000000000000 --- a/boards/arm/s32k1xx/ucans32k146/src/s32k1xx_appinit.c +++ /dev/null @@ -1,79 +0,0 @@ -/**************************************************************************** - * boards/arm/s32k1xx/ucans32k146/src/s32k1xx_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 -#include - -#include -#include - -#include "ucans32k146.h" - -/**************************************************************************** - * 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 s32k1xx_bringup(); -#endif -} diff --git a/boards/arm/s32k3xx/mr-canhubk3/configs/knsh/defconfig b/boards/arm/s32k3xx/mr-canhubk3/configs/knsh/defconfig index 6b93525b6845f..19be6ee24f241 100644 --- a/boards/arm/s32k3xx/mr-canhubk3/configs/knsh/defconfig +++ b/boards/arm/s32k3xx/mr-canhubk3/configs/knsh/defconfig @@ -71,7 +71,6 @@ CONFIG_NET_CAN_SOCK_OPTS=y CONFIG_NET_TCP=y CONFIG_NET_TIMESTAMP=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/s32k3xx/mr-canhubk3/configs/net/defconfig b/boards/arm/s32k3xx/mr-canhubk3/configs/net/defconfig index 7247309fe0e3e..d11f1afd482a3 100644 --- a/boards/arm/s32k3xx/mr-canhubk3/configs/net/defconfig +++ b/boards/arm/s32k3xx/mr-canhubk3/configs/net/defconfig @@ -72,7 +72,6 @@ CONFIG_NET_CAN_SOCK_OPTS=y CONFIG_NET_TCP=y CONFIG_NET_TIMESTAMP=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/s32k3xx/mr-canhubk3/configs/nsh/defconfig b/boards/arm/s32k3xx/mr-canhubk3/configs/nsh/defconfig index 88c54427eb01e..d7b094be4a6e5 100644 --- a/boards/arm/s32k3xx/mr-canhubk3/configs/nsh/defconfig +++ b/boards/arm/s32k3xx/mr-canhubk3/configs/nsh/defconfig @@ -28,7 +28,6 @@ CONFIG_HAVE_CXXINITIALIZE=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LPUART2_SERIAL_CONSOLE=y CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/s32k3xx/mr-canhubk3/src/CMakeLists.txt b/boards/arm/s32k3xx/mr-canhubk3/src/CMakeLists.txt index 8fd5d762ddce4..57d9107fb95b4 100644 --- a/boards/arm/s32k3xx/mr-canhubk3/src/CMakeLists.txt +++ b/boards/arm/s32k3xx/mr-canhubk3/src/CMakeLists.txt @@ -33,10 +33,6 @@ else() list(APPEND SRCS s32k3xx_userleds.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS s32k3xx_appinit.c) -endif() - if(CONFIG_FAT_DMAMEMORY) list(APPEND SRCS s32k3xx_dma_alloc.c) endif() diff --git a/boards/arm/s32k3xx/mr-canhubk3/src/Makefile b/boards/arm/s32k3xx/mr-canhubk3/src/Makefile index 78a95dd706c5f..62e37ef5dfcad 100644 --- a/boards/arm/s32k3xx/mr-canhubk3/src/Makefile +++ b/boards/arm/s32k3xx/mr-canhubk3/src/Makefile @@ -35,10 +35,6 @@ else CSRCS += s32k3xx_userleds.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += s32k3xx_appinit.c -endif - ifeq ($(CONFIG_FAT_DMAMEMORY),y) CSRCS += s32k3xx_dma_alloc.c endif diff --git a/boards/arm/s32k3xx/mr-canhubk3/src/s32k3xx_appinit.c b/boards/arm/s32k3xx/mr-canhubk3/src/s32k3xx_appinit.c deleted file mode 100644 index 82a872cb12463..0000000000000 --- a/boards/arm/s32k3xx/mr-canhubk3/src/s32k3xx_appinit.c +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** - * boards/arm/s32k3xx/mr-canhubk3/src/s32k3xx_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. - * - ****************************************************************************/ - -/* Copyright 2022 NXP */ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include -#include - -#include - -#include "mr-canhubk3.h" - -/**************************************************************************** - * 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 s32k3xx_bringup(); -#endif -} diff --git a/boards/arm/s32k3xx/s32k344evb/configs/nsh/defconfig b/boards/arm/s32k3xx/s32k344evb/configs/nsh/defconfig index 180aaf5ab97a3..25b8292af1de8 100644 --- a/boards/arm/s32k3xx/s32k344evb/configs/nsh/defconfig +++ b/boards/arm/s32k3xx/s32k344evb/configs/nsh/defconfig @@ -25,7 +25,6 @@ CONFIG_HAVE_CXXINITIALIZE=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LPUART13_SERIAL_CONSOLE=y CONFIG_MOTOROLA_SREC=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/s32k3xx/s32k344evb/src/CMakeLists.txt b/boards/arm/s32k3xx/s32k344evb/src/CMakeLists.txt index bcfe68442c71c..c53340ff90703 100644 --- a/boards/arm/s32k3xx/s32k344evb/src/CMakeLists.txt +++ b/boards/arm/s32k3xx/s32k344evb/src/CMakeLists.txt @@ -33,10 +33,6 @@ else() list(APPEND SRCS s32k3xx_userleds.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS s32k3xx_appinit.c) -endif() - if(CONFIG_S32K3XX_LPI2C) list(APPEND SRCS s32k3xx_i2c.c) endif() diff --git a/boards/arm/s32k3xx/s32k344evb/src/Makefile b/boards/arm/s32k3xx/s32k344evb/src/Makefile index 620e02abc8c03..bbb72cd73ce9f 100644 --- a/boards/arm/s32k3xx/s32k344evb/src/Makefile +++ b/boards/arm/s32k3xx/s32k344evb/src/Makefile @@ -37,10 +37,6 @@ else CSRCS += s32k3xx_userleds.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += s32k3xx_appinit.c -endif - ifeq ($(CONFIG_S32K3XX_LPI2C),y) CSRCS += s32k3xx_i2c.c endif diff --git a/boards/arm/s32k3xx/s32k344evb/src/s32k3xx_appinit.c b/boards/arm/s32k3xx/s32k344evb/src/s32k3xx_appinit.c deleted file mode 100644 index 4e5d0cd6319df..0000000000000 --- a/boards/arm/s32k3xx/s32k344evb/src/s32k3xx_appinit.c +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** - * boards/arm/s32k3xx/s32k344evb/src/s32k3xx_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. - * - ****************************************************************************/ - -/* Copyright 2022 NXP */ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include -#include - -#include - -#include "s32k344evb.h" - -/**************************************************************************** - * 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 s32k3xx_bringup(); -#endif -} diff --git a/boards/arm/sam34/arduino-due/configs/nsh-leds/defconfig b/boards/arm/sam34/arduino-due/configs/nsh-leds/defconfig index 43f03f5b6e40b..2f63c9a985881 100644 --- a/boards/arm/sam34/arduino-due/configs/nsh-leds/defconfig +++ b/boards/arm/sam34/arduino-due/configs/nsh-leds/defconfig @@ -16,7 +16,6 @@ CONFIG_ARCH_CHIP_ATSAM3X8E=y CONFIG_ARCH_CHIP_SAM34=y CONFIG_ARCH_CHIP_SAM3X=y CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=6965 CONFIG_BUILTIN=y CONFIG_EXAMPLES_LEDS=y @@ -25,7 +24,6 @@ CONFIG_HAVE_CXX=y CONFIG_HAVE_CXXINITIALIZE=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/sam34/arduino-due/configs/nsh/defconfig b/boards/arm/sam34/arduino-due/configs/nsh/defconfig index 2431622b6230f..10b8fdf22b194 100644 --- a/boards/arm/sam34/arduino-due/configs/nsh/defconfig +++ b/boards/arm/sam34/arduino-due/configs/nsh/defconfig @@ -21,7 +21,6 @@ CONFIG_HAVE_CXX=y CONFIG_HAVE_CXXINITIALIZE=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/sam34/arduino-due/src/CMakeLists.txt b/boards/arm/sam34/arduino-due/src/CMakeLists.txt index f2dc821be843b..6cbaca9a587c8 100644 --- a/boards/arm/sam34/arduino-due/src/CMakeLists.txt +++ b/boards/arm/sam34/arduino-due/src/CMakeLists.txt @@ -45,10 +45,6 @@ if(CONFIG_ARDUINO_ITHEAD_TFT) endif() endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS sam_appinit.c) -endif() - if(CONFIG_SAM34_SPI0) list(APPEND SRCS sam_spidev.c) endif() diff --git a/boards/arm/sam34/arduino-due/src/Makefile b/boards/arm/sam34/arduino-due/src/Makefile index f30690d0f0d41..175c06ded76b9 100644 --- a/boards/arm/sam34/arduino-due/src/Makefile +++ b/boards/arm/sam34/arduino-due/src/Makefile @@ -47,10 +47,6 @@ CSRCS += sam_lcd.c endif endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += sam_appinit.c -endif - ifeq ($(CONFIG_SAM34_SPI0),y) CSRCS += sam_spidev.c endif diff --git a/boards/arm/sam34/arduino-due/src/sam_appinit.c b/boards/arm/sam34/arduino-due/src/sam_appinit.c deleted file mode 100644 index c0797d02357ac..0000000000000 --- a/boards/arm/sam34/arduino-due/src/sam_appinit.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm/sam34/arduino-due/src/sam_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 - -#include -#include - -#include "arduino-due.h" - -/**************************************************************************** - * 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 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 sam_bringup(); -#endif -} diff --git a/boards/arm/sam34/arduino-due/src/sam_bringup.c b/boards/arm/sam34/arduino-due/src/sam_bringup.c index e250294a1f26b..f8ab5ba24e59b 100644 --- a/boards/arm/sam34/arduino-due/src/sam_bringup.c +++ b/boards/arm/sam34/arduino-due/src/sam_bringup.c @@ -111,9 +111,7 @@ int sam_bringup(void) int ret = sam_sdinitialize(CONFIG_NSH_MMCSDMINOR); if (ret < 0) { - syslog(LOG_ERR, - "board_app_initialize: Failed to initialize MMC/SD slot: %d\n", - ret); + syslog(LOG_ERR, "Failed to initialize MMC/SD slot: %d\n", ret); return ret; } #endif diff --git a/boards/arm/sam34/flipnclick-sam3x/configs/nsh/defconfig b/boards/arm/sam34/flipnclick-sam3x/configs/nsh/defconfig index 6f2dace136e55..cc87841f918dc 100644 --- a/boards/arm/sam34/flipnclick-sam3x/configs/nsh/defconfig +++ b/boards/arm/sam34/flipnclick-sam3x/configs/nsh/defconfig @@ -23,7 +23,6 @@ CONFIG_HAVE_CXXINITIALIZE=y CONFIG_HOST_WINDOWS=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/sam34/flipnclick-sam3x/configs/nxlines/defconfig b/boards/arm/sam34/flipnclick-sam3x/configs/nxlines/defconfig index 6d3f302894e49..63d5ca76e14ad 100644 --- a/boards/arm/sam34/flipnclick-sam3x/configs/nxlines/defconfig +++ b/boards/arm/sam34/flipnclick-sam3x/configs/nxlines/defconfig @@ -34,7 +34,6 @@ CONFIG_LCD_HILETGO=y CONFIG_LCD_MAXCONTRAST=255 CONFIG_MM_REGIONS=3 CONFIG_MQ_MAXMSGSIZE=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/sam34/flipnclick-sam3x/src/CMakeLists.txt b/boards/arm/sam34/flipnclick-sam3x/src/CMakeLists.txt index 9be0481a15274..c9c615bf06ca4 100644 --- a/boards/arm/sam34/flipnclick-sam3x/src/CMakeLists.txt +++ b/boards/arm/sam34/flipnclick-sam3x/src/CMakeLists.txt @@ -28,10 +28,6 @@ else() list(APPEND SRCS sam_userleds.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS sam_appinit.c) -endif() - if(CONFIG_SAM34_SPI0) list(APPEND SRCS sam_spi0.c) endif() diff --git a/boards/arm/sam34/flipnclick-sam3x/src/Makefile b/boards/arm/sam34/flipnclick-sam3x/src/Makefile index eeffe1bb5aa8e..4cfc218ab8c78 100644 --- a/boards/arm/sam34/flipnclick-sam3x/src/Makefile +++ b/boards/arm/sam34/flipnclick-sam3x/src/Makefile @@ -30,10 +30,6 @@ else CSRCS += sam_userleds.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += sam_appinit.c -endif - ifeq ($(CONFIG_SAM34_SPI0),y) CSRCS += sam_spi0.c endif diff --git a/boards/arm/sam34/flipnclick-sam3x/src/sam_appinit.c b/boards/arm/sam34/flipnclick-sam3x/src/sam_appinit.c deleted file mode 100644 index c70c7aea3a31d..0000000000000 --- a/boards/arm/sam34/flipnclick-sam3x/src/sam_appinit.c +++ /dev/null @@ -1,80 +0,0 @@ -/**************************************************************************** - * boards/arm/sam34/flipnclick-sam3x/src/sam_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 - -#include -#include - -#include "flipnclick-sam3x.h" - -/**************************************************************************** - * 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 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 sam_bringup(); -#endif -} diff --git a/boards/arm/sam34/sam3u-ek/configs/nsh/defconfig b/boards/arm/sam34/sam3u-ek/configs/nsh/defconfig index 8226b0515d18c..77f68d45c5467 100644 --- a/boards/arm/sam34/sam3u-ek/configs/nsh/defconfig +++ b/boards/arm/sam34/sam3u-ek/configs/nsh/defconfig @@ -24,7 +24,6 @@ CONFIG_FS_FAT=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/sam34/sam3u-ek/configs/nxwm/defconfig b/boards/arm/sam34/sam3u-ek/configs/nxwm/defconfig index 53a65ed3aef8f..4588dd333e9c8 100644 --- a/boards/arm/sam34/sam3u-ek/configs/nxwm/defconfig +++ b/boards/arm/sam34/sam3u-ek/configs/nxwm/defconfig @@ -39,7 +39,6 @@ CONFIG_LIBC_MAX_EXITFUNS=1 CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 CONFIG_MQ_MAXMSGSIZE=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_LIBRARY=y CONFIG_NSH_READLINE=y diff --git a/boards/arm/sam34/sam3u-ek/src/CMakeLists.txt b/boards/arm/sam34/sam3u-ek/src/CMakeLists.txt index d1f04aa144881..1f85e6a52210d 100644 --- a/boards/arm/sam34/sam3u-ek/src/CMakeLists.txt +++ b/boards/arm/sam34/sam3u-ek/src/CMakeLists.txt @@ -26,10 +26,6 @@ if(CONFIG_LCD) list(APPEND SRCS sam_lcd.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS sam_appinit.c) -endif() - if(CONFIG_SAM34_HSMCI) list(APPEND SRCS sam_mmcsd.c) endif() diff --git a/boards/arm/sam34/sam3u-ek/src/Makefile b/boards/arm/sam34/sam3u-ek/src/Makefile index 77c0d92157481..d9f2bd8955879 100644 --- a/boards/arm/sam34/sam3u-ek/src/Makefile +++ b/boards/arm/sam34/sam3u-ek/src/Makefile @@ -28,10 +28,6 @@ ifeq ($(CONFIG_LCD),y) CSRCS += sam_lcd.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += sam_appinit.c -endif - ifeq ($(CONFIG_SAM34_HSMCI),y) CSRCS += sam_mmcsd.c endif diff --git a/boards/arm/sam34/sam3u-ek/src/sam_appinit.c b/boards/arm/sam34/sam3u-ek/src/sam_appinit.c deleted file mode 100644 index f62e23ff42072..0000000000000 --- a/boards/arm/sam34/sam3u-ek/src/sam_appinit.c +++ /dev/null @@ -1,170 +0,0 @@ -/**************************************************************************** - * boards/arm/sam34/sam3u-ek/src/sam_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 - -#include -#include -#include -#include - -#include -#include -#include - -#include "sam_hsmci.h" -#include "sam3u-ek.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Configuration ************************************************************/ - -/* PORT and SLOT number probably depend on the board configuration */ - -#define NSH_HAVE_USBDEV 1 -#define NSH_HAVE_MMCSD 1 - -/* Can't support MMC/SD if the card interface is not enable */ - -#ifndef CONFIG_SAM34_HSMCI -# undef NSH_HAVE_MMCSD -#endif - -/* Can't support MMC/SD features if mountpoints are disabled or if SDIO - * support is not enabled. - */ - -#if defined(CONFIG_DISABLE_MOUNTPOINT) || !defined(CONFIG_SAM34_HSMCI) -# undef NSH_HAVE_MMCSD -#endif - -#ifdef NSH_HAVE_MMCSD -# if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != 0 -# error "Only one MMC/SD slot" -# undef CONFIG_NSH_MMCSDSLOTNO -# endif - -# ifndef CONFIG_NSH_MMCSDMINOR -# define CONFIG_NSH_MMCSDMINOR 0 -# endif - -# ifndef CONFIG_NSH_MMCSDSLOTNO -# define CONFIG_NSH_MMCSDSLOTNO 0 -# endif -#endif - -/* Can't support USB features if USB is not enabled */ - -#ifndef CONFIG_USBDEV -# undef NSH_HAVE_USBDEV -#endif - -/**************************************************************************** - * 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 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) -{ - int ret; - -#ifdef NSH_HAVE_MMCSD - struct sdio_dev_s *sdio; - - /* Mount the SDIO-based MMC/SD block driver */ - - /* First, get an instance of the SDIO interface */ - - syslog(LOG_INFO, "Initializing SDIO slot %d\n", - CONFIG_NSH_MMCSDSLOTNO); - - sdio = sdio_initialize(CONFIG_NSH_MMCSDSLOTNO); - if (!sdio) - { - syslog(LOG_ERR, "ERROR: Failed to initialize SDIO slot %d\n", - CONFIG_NSH_MMCSDSLOTNO); - return -ENODEV; - } - - /* Now bind the SDIO interface to the MMC/SD driver */ - - syslog(LOG_INFO, "Bind SDIO to the MMC/SD driver, minor=%d\n", - CONFIG_NSH_MMCSDMINOR); - - ret = mmcsd_slotinitialize(CONFIG_NSH_MMCSDMINOR, sdio); - if (ret != OK) - { - syslog(LOG_ERR, - "ERROR: Failed to bind SDIO to the MMC/SD driver: %d\n", ret); - return ret; - } - - syslog(LOG_INFO, "Successfully bound SDIO to the MMC/SD driver\n"); - - /* Then inform the HSMCI driver if there is or is not a card in the slot. */ - - sdio_mediachange(sdio, sam_cardinserted(0)); -#endif - -#ifdef CONFIG_INPUT - /* Initialize the touchscreen */ - - ret = sam_tsc_setup(0); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: sam_tsc_setup failed: %d\n", ret); - } -#endif - - UNUSED(ret); - return OK; -} diff --git a/boards/arm/sam34/sam3u-ek/src/sam_boot.c b/boards/arm/sam34/sam3u-ek/src/sam_boot.c index e327e565cdb41..340eaf370306d 100644 --- a/boards/arm/sam34/sam3u-ek/src/sam_boot.c +++ b/boards/arm/sam34/sam3u-ek/src/sam_boot.c @@ -28,16 +28,66 @@ #include +#include +#include +#include +#include + #include #include +#include +#include #include "arm_internal.h" +#include "sam_hsmci.h" #include "sam3u-ek.h" /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ +/* Configuration ************************************************************/ + +/* PORT and SLOT number probably depend on the board configuration */ + +#define NSH_HAVE_USBDEV 1 +#define NSH_HAVE_MMCSD 1 + +/* Can't support MMC/SD if the card interface is not enable */ + +#ifndef CONFIG_SAM34_HSMCI +# undef NSH_HAVE_MMCSD +#endif + +/* Can't support MMC/SD features if mountpoints are disabled or if SDIO + * support is not enabled. + */ + +#if defined(CONFIG_DISABLE_MOUNTPOINT) || !defined(CONFIG_SAM34_HSMCI) +# undef NSH_HAVE_MMCSD +#endif + +#ifdef NSH_HAVE_MMCSD +# if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != 0 +# error "Only one MMC/SD slot" +# undef CONFIG_NSH_MMCSDSLOTNO +# endif + +# ifndef CONFIG_NSH_MMCSDMINOR +# define CONFIG_NSH_MMCSDMINOR 0 +# endif + +# ifndef CONFIG_NSH_MMCSDSLOTNO +# define CONFIG_NSH_MMCSDSLOTNO 0 +# endif +#endif + +/* Can't support USB features if USB is not enabled */ + +#ifndef CONFIG_USBDEV +# undef NSH_HAVE_USBDEV +#endif + /**************************************************************************** * Private Functions ****************************************************************************/ @@ -87,3 +137,73 @@ void sam_boardinitialize(void) } #endif } + +/**************************************************************************** + * 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ + int ret; + +#ifdef NSH_HAVE_MMCSD + struct sdio_dev_s *sdio; + + /* Mount the SDIO-based MMC/SD block driver */ + + /* First, get an instance of the SDIO interface */ + + syslog(LOG_INFO, "Initializing SDIO slot %d\n", + CONFIG_NSH_MMCSDSLOTNO); + + sdio = sdio_initialize(CONFIG_NSH_MMCSDSLOTNO); + if (!sdio) + { + syslog(LOG_ERR, "ERROR: Failed to initialize SDIO slot %d\n", + CONFIG_NSH_MMCSDSLOTNO); + return; + } + + /* Now bind the SDIO interface to the MMC/SD driver */ + + syslog(LOG_INFO, "Bind SDIO to the MMC/SD driver, minor=%d\n", + CONFIG_NSH_MMCSDMINOR); + + ret = mmcsd_slotinitialize(CONFIG_NSH_MMCSDMINOR, sdio); + if (ret != OK) + { + syslog(LOG_ERR, + "ERROR: Failed to bind SDIO to the MMC/SD driver: %d\n", ret); + return; + } + + syslog(LOG_INFO, "Successfully bound SDIO to the MMC/SD driver\n"); + + /* Then inform the HSMCI driver if there is or is not a card in the slot. */ + + sdio_mediachange(sdio, sam_cardinserted(0)); +#endif + +#ifdef CONFIG_INPUT + /* Initialize the touchscreen */ + + ret = sam_tsc_setup(0); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: sam_tsc_setup failed: %d\n", ret); + } +#endif + + UNUSED(ret); +} +#endif diff --git a/boards/arm/sam34/sam4cmp-db/configs/nsh/defconfig b/boards/arm/sam34/sam4cmp-db/configs/nsh/defconfig index dfd4dd66453dc..9e97d13228dff 100644 --- a/boards/arm/sam34/sam4cmp-db/configs/nsh/defconfig +++ b/boards/arm/sam34/sam4cmp-db/configs/nsh/defconfig @@ -19,7 +19,6 @@ CONFIG_DEBUG_SYMBOLS=y CONFIG_DISABLE_ENVIRON=y CONFIG_FS_PROCFS=y CONFIG_INIT_ENTRYPOINT="nsh_main" -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/sam34/sam4cmp-db/src/CMakeLists.txt b/boards/arm/sam34/sam4cmp-db/src/CMakeLists.txt index 7b04707c27d7f..8e3cf7ced488c 100644 --- a/boards/arm/sam34/sam4cmp-db/src/CMakeLists.txt +++ b/boards/arm/sam34/sam4cmp-db/src/CMakeLists.txt @@ -20,13 +20,7 @@ # # ############################################################################## -set(SRCS sam_boot.c) - -if(CONFIG_BOARDCTL) - list(APPEND SRCS sam_appinit.c sam_bringup.c) -elseif(CONFIG_BOARD_LATE_INITIALIZE) - list(APPEND SRCS sam_bringup.c) -endif() +set(SRCS sam_boot.c sam_bringup.c) target_sources(board PRIVATE ${SRCS}) diff --git a/boards/arm/sam34/sam4cmp-db/src/Makefile b/boards/arm/sam34/sam4cmp-db/src/Makefile index 60c251a3c27a0..0bf1cae39ef03 100644 --- a/boards/arm/sam34/sam4cmp-db/src/Makefile +++ b/boards/arm/sam34/sam4cmp-db/src/Makefile @@ -22,12 +22,6 @@ include $(TOPDIR)/Make.defs -CSRCS = sam_boot.c - -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += sam_appinit.c sam_bringup.c -else ifeq ($(CONFIG_BOARD_LATE_INITIALIZE),y) -CSRCS += sam_bringup.c -endif +CSRCS = sam_boot.c sam_bringup.c include $(TOPDIR)/boards/Board.mk diff --git a/boards/arm/sam34/sam4cmp-db/src/sam_appinit.c b/boards/arm/sam34/sam4cmp-db/src/sam_appinit.c deleted file mode 100644 index 12dd442304d53..0000000000000 --- a/boards/arm/sam34/sam4cmp-db/src/sam_appinit.c +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** - * boards/arm/sam34/sam4cmp-db/src/sam_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 - -#include - -#include "sam4cmp-db.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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 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) -{ -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board initialization */ - - return sam_bringup(); -#else - return OK; -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/arm/sam34/sam4e-ek/configs/nsh/defconfig b/boards/arm/sam34/sam4e-ek/configs/nsh/defconfig index 38f4af5ed514a..9f387912a0b84 100644 --- a/boards/arm/sam34/sam4e-ek/configs/nsh/defconfig +++ b/boards/arm/sam34/sam4e-ek/configs/nsh/defconfig @@ -45,7 +45,6 @@ CONFIG_NET_TCP_PREALLOC_CONNS=16 CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/sam34/sam4e-ek/configs/nxwm/defconfig b/boards/arm/sam34/sam4e-ek/configs/nxwm/defconfig index 146cb737791b1..9ba1dc81f218d 100644 --- a/boards/arm/sam34/sam4e-ek/configs/nxwm/defconfig +++ b/boards/arm/sam34/sam4e-ek/configs/nxwm/defconfig @@ -62,7 +62,6 @@ CONFIG_NET_TCP=y CONFIG_NET_TCP_PREALLOC_CONNS=16 CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_LIBRARY=y diff --git a/boards/arm/sam34/sam4e-ek/configs/usbnsh/defconfig b/boards/arm/sam34/sam4e-ek/configs/usbnsh/defconfig index 71c26f3c09911..32c82f9cbbaa6 100644 --- a/boards/arm/sam34/sam4e-ek/configs/usbnsh/defconfig +++ b/boards/arm/sam34/sam4e-ek/configs/usbnsh/defconfig @@ -53,7 +53,6 @@ CONFIG_NET_TCP=y CONFIG_NET_TCP_PREALLOC_CONNS=16 CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/sam34/sam4e-ek/src/CMakeLists.txt b/boards/arm/sam34/sam4e-ek/src/CMakeLists.txt index 4f076e6ba3c79..32db279ddea83 100644 --- a/boards/arm/sam34/sam4e-ek/src/CMakeLists.txt +++ b/boards/arm/sam34/sam4e-ek/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS sam_boot.c sam_leds.c sam_buttons.c sam_udp.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS sam_appinit.c) -endif() - if(CONFIG_SAM34_HSMCI) list(APPEND SRCS sam_hsmci.c) endif() diff --git a/boards/arm/sam34/sam4e-ek/src/Makefile b/boards/arm/sam34/sam4e-ek/src/Makefile index 8eb4a01fc2c0c..3ac9e9a94641e 100644 --- a/boards/arm/sam34/sam4e-ek/src/Makefile +++ b/boards/arm/sam34/sam4e-ek/src/Makefile @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = sam_boot.c sam_leds.c sam_buttons.c sam_udp.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += sam_appinit.c -endif - ifeq ($(CONFIG_SAM34_HSMCI),y) CSRCS += sam_hsmci.c endif diff --git a/boards/arm/sam34/sam4e-ek/src/sam_appinit.c b/boards/arm/sam34/sam4e-ek/src/sam_appinit.c deleted file mode 100644 index 3724ef938dcef..0000000000000 --- a/boards/arm/sam34/sam4e-ek/src/sam_appinit.c +++ /dev/null @@ -1,124 +0,0 @@ -/**************************************************************************** - * boards/arm/sam34/sam4e-ek/src/sam_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 - -#include -#include -#include -#include - -#include - -#ifdef CONFIG_USBMONITOR -# include -#endif - -#include "sam4e-ek.h" - -/**************************************************************************** - * 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 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) -{ - int ret; - -#ifdef HAVE_AT25 - /* Initialize the AT25 driver */ - - ret = sam_at25_automount(0); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: sam_at25_automount() failed: %d\n", ret); - return ret; - } -#endif - -#ifdef HAVE_HSMCI - /* Initialize the HSMCI driver */ - - ret = sam_hsmci_initialize(0); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: sam_hsmci_initialize(0) failed: %d\n", ret); - return ret; - } -#endif - -#ifdef CONFIG_INPUT_ADS7843E - /* Initialize the touchscreen */ - - ret = sam_tsc_setup(0); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: sam_tsc_setup failed: %d\n", ret); - } -#endif - -#ifdef HAVE_USBMONITOR - /* Start the USB Monitor */ - - ret = usbmonitor_start(); - if (ret != OK) - { - syslog(LOG_ERR, "ERROR: Failed to start USB monitor: %d\n", ret); - return ret; - } -#endif - - UNUSED(ret); - return OK; -} diff --git a/boards/arm/sam34/sam4e-ek/src/sam_boot.c b/boards/arm/sam34/sam4e-ek/src/sam_boot.c index d388a4a9155e6..b27d3dbc6b89b 100644 --- a/boards/arm/sam34/sam4e-ek/src/sam_boot.c +++ b/boards/arm/sam34/sam4e-ek/src/sam_boot.c @@ -28,9 +28,18 @@ #include +#include +#include +#include +#include + #include #include +#ifdef CONFIG_USBMONITOR +# include +#endif + #include "arm_internal.h" #include "sam4e-ek.h" @@ -130,13 +139,49 @@ void sam_boardinitialize(void) #ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { - /* Perform NSH initialization here instead of from the NSH. - * This alternative NSH initialization is necessary when NSH is ran in - * user-space but the initialization function must run in kernel space. - */ + int ret; + +#ifdef HAVE_AT25 + /* Initialize the AT25 driver */ + + ret = sam_at25_automount(0); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: sam_at25_automount() failed: %d\n", ret); + return; + } +#endif + +#ifdef HAVE_HSMCI + /* Initialize the HSMCI driver */ + + ret = sam_hsmci_initialize(0); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: sam_hsmci_initialize(0) failed: %d\n", ret); + return; + } +#endif -#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_BOARDCTL) - board_app_initialize(0); +#ifdef CONFIG_INPUT_ADS7843E + /* Initialize the touchscreen */ + + ret = sam_tsc_setup(0); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: sam_tsc_setup failed: %d\n", ret); + } +#endif + +#ifdef HAVE_USBMONITOR + /* Start the USB Monitor */ + + ret = usbmonitor_start(); + if (ret != OK) + { + syslog(LOG_ERR, "ERROR: Failed to start USB monitor: %d\n", ret); + return; + } #endif } #endif /* CONFIG_BOARD_LATE_INITIALIZE */ diff --git a/boards/arm/sam34/sam4l-xplained/src/CMakeLists.txt b/boards/arm/sam34/sam4l-xplained/src/CMakeLists.txt index df6ab88bdcad4..2cbd47916db6b 100644 --- a/boards/arm/sam34/sam4l-xplained/src/CMakeLists.txt +++ b/boards/arm/sam34/sam4l-xplained/src/CMakeLists.txt @@ -36,10 +36,6 @@ if(CONFIG_ARCH_BUTTONS) list(APPEND SRCS sam_buttons.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS sam_appinit.c) -endif() - if(CONFIG_SAM34_LCDCA) if(CONFIG_SAM4L_XPLAINED_SLCD1MODULE) list(APPEND SRCS sam_slcd.c) diff --git a/boards/arm/sam34/sam4l-xplained/src/Makefile b/boards/arm/sam34/sam4l-xplained/src/Makefile index 527ca0f45b55e..714792ee51916 100644 --- a/boards/arm/sam34/sam4l-xplained/src/Makefile +++ b/boards/arm/sam34/sam4l-xplained/src/Makefile @@ -38,10 +38,6 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += sam_buttons.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += sam_appinit.c -endif - ifeq ($(CONFIG_SAM34_LCDCA),y) ifeq ($(CONFIG_SAM4L_XPLAINED_SLCD1MODULE),y) CSRCS += sam_slcd.c diff --git a/boards/arm/sam34/sam4l-xplained/src/sam_appinit.c b/boards/arm/sam34/sam4l-xplained/src/sam_appinit.c deleted file mode 100644 index b13b37c1b5fa8..0000000000000 --- a/boards/arm/sam34/sam4l-xplained/src/sam_appinit.c +++ /dev/null @@ -1,118 +0,0 @@ -/**************************************************************************** - * boards/arm/sam34/sam4l-xplained/src/sam_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 - -#include -#include - -#include - -#include "sam4l-xplained.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -#ifdef CONFIG_SAM4L_XPLAINED_IOMODULE -/* Support for the SD card slot on the I/O1 module */ - -/* Verify NSH PORT and SLOT settings */ - -# define SAM34_MMCSDSLOTNO 0 /* There is only one slot */ - -# if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != SAM34_MMCSDSLOTNO -# error Only one MMC/SD slot: Slot 0 (CONFIG_NSH_MMCSDSLOTNO) -# endif - -# if defined(CONFIG_NSH_MMCSDSPIPORTNO) && CONFIG_NSH_MMCSDSPIPORTNO != SD_CSNO -# error CONFIG_NSH_MMCSDSPIPORTNO must have the same value as SD_CSNO -# endif - -/* Default MMC/SD minor number */ - -# ifndef CONFIG_NSH_MMCSDMINOR -# define CONFIG_NSH_MMCSDMINOR 0 -# endif -#endif - -/**************************************************************************** - * 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 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) -{ -#if defined(CONFIG_SAM34_LCDCA) && defined(CONFIG_SAM4L_XPLAINED_SLCD1MODULE) - /* Initialize the SLCD and register the SLCD device as /dev/slcd0 */ - - int ret = sam_slcd_initialize(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: Failed to initialize the LCD: %d\n", - ret); - return ret; - } -#endif -#if defined(CONFIG_SAM34_SPI0) && defined(CONFIG_SAM4L_XPLAINED_IOMODULE) - - /* Initialize the SPI-based MMC/SD slot */ - - int ret = sam_sdinitialize(CONFIG_NSH_MMCSDMINOR); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: Failed to initialize MMC/SD slot: %d\n", - ret); - return ret; - } -#endif - - return OK; -} diff --git a/boards/arm/sam34/sam4l-xplained/src/sam_boot.c b/boards/arm/sam34/sam4l-xplained/src/sam_boot.c index 0a55ded38fbd6..9ef93db9ed6a7 100644 --- a/boards/arm/sam34/sam4l-xplained/src/sam_boot.c +++ b/boards/arm/sam34/sam4l-xplained/src/sam_boot.c @@ -28,6 +28,9 @@ #include +#include +#include + #include #include "sam4l-xplained.h" @@ -36,6 +39,28 @@ * Pre-processor Definitions ****************************************************************************/ +#ifdef CONFIG_SAM4L_XPLAINED_IOMODULE +/* Support for the SD card slot on the I/O1 module */ + +/* Verify NSH PORT and SLOT settings */ + +# define SAM34_MMCSDSLOTNO 0 /* There is only one slot */ + +# if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != SAM34_MMCSDSLOTNO +# error Only one MMC/SD slot: Slot 0 (CONFIG_NSH_MMCSDSLOTNO) +# endif + +# if defined(CONFIG_NSH_MMCSDSPIPORTNO) && CONFIG_NSH_MMCSDSPIPORTNO != SD_CSNO +# error CONFIG_NSH_MMCSDSPIPORTNO must have the same value as SD_CSNO +# endif + +/* Default MMC/SD minor number */ + +# ifndef CONFIG_NSH_MMCSDMINOR +# define CONFIG_NSH_MMCSDMINOR 0 +# endif +#endif + /**************************************************************************** * Private Functions ****************************************************************************/ @@ -74,3 +99,45 @@ void sam_boardinitialize(void) board_autoled_initialize(); #endif } + +/**************************************************************************** + * 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ +#if defined(CONFIG_SAM34_LCDCA) && defined(CONFIG_SAM4L_XPLAINED_SLCD1MODULE) + /* Initialize the SLCD and register the SLCD device as /dev/slcd0 */ + + int ret = sam_slcd_initialize(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: Failed to initialize the LCD: %d\n", + ret); + return; + } +#endif +#if defined(CONFIG_SAM34_SPI0) && defined(CONFIG_SAM4L_XPLAINED_IOMODULE) + + /* Initialize the SPI-based MMC/SD slot */ + + int ret = sam_sdinitialize(CONFIG_NSH_MMCSDMINOR); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: Failed to initialize MMC/SD slot: %d\n", + ret); + return; + } +#endif +} +#endif diff --git a/boards/arm/sam34/sam4s-xplained-pro/Kconfig b/boards/arm/sam34/sam4s-xplained-pro/Kconfig index c087aa791be4b..9b4d5b340648c 100644 --- a/boards/arm/sam34/sam4s-xplained-pro/Kconfig +++ b/boards/arm/sam34/sam4s-xplained-pro/Kconfig @@ -23,7 +23,7 @@ config SAM4S_XPLAINED_PRO_CPULOAD_TIMER_DEVPATH config SAM34_NAND_BLOCKMOUNT bool "NAND FLASH auto-mount" default n - depends on NSH_ARCHINIT && SAM34_EXTNAND + depends on BOARD_LATE_INITIALIZE && SAM34_EXTNAND ---help--- Automatically initialize the NAND FLASH driver when NSH starts. diff --git a/boards/arm/sam34/sam4s-xplained-pro/configs/fs/defconfig b/boards/arm/sam34/sam4s-xplained-pro/configs/fs/defconfig index 04a7b1c23af2a..d698c97d2d38b 100644 --- a/boards/arm/sam34/sam4s-xplained-pro/configs/fs/defconfig +++ b/boards/arm/sam34/sam4s-xplained-pro/configs/fs/defconfig @@ -20,7 +20,6 @@ CONFIG_ARCH_INTERRUPTSTACK=1024 CONFIG_ARCH_STACKDUMP=y CONFIG_ARM_MPU=y CONFIG_BOARDCTL_USBDEVCTRL=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=11401 CONFIG_BUILTIN=y CONFIG_CDCACM=y @@ -49,7 +48,6 @@ CONFIG_MTD_NAND_MAXNUMPAGESPERBLOCK=64 CONFIG_MTD_NAND_MAXPAGEDATASIZE=2048 CONFIG_MTD_NAND_MAXPAGESPARESIZE=64 CONFIG_MTD_NAND_MAXSPAREECCBYTES=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFCONFIG=y CONFIG_NSH_DISABLE_LOSETUP=y diff --git a/boards/arm/sam34/sam4s-xplained-pro/configs/nsh/defconfig b/boards/arm/sam34/sam4s-xplained-pro/configs/nsh/defconfig index 433440c4837fd..fb80049749f1d 100644 --- a/boards/arm/sam34/sam4s-xplained-pro/configs/nsh/defconfig +++ b/boards/arm/sam34/sam4s-xplained-pro/configs/nsh/defconfig @@ -17,7 +17,6 @@ CONFIG_ARCH_INTERRUPTSTACK=1024 CONFIG_ARCH_STACKDUMP=y CONFIG_ARM_MPU=y CONFIG_BOARDCTL_USBDEVCTRL=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=11401 CONFIG_BUILTIN=y CONFIG_CDCACM=y @@ -43,7 +42,6 @@ CONFIG_JULIAN_TIME=y CONFIG_LIBC_STRERROR=y CONFIG_LIBC_STRERROR_SHORT=y CONFIG_MMCSD_SDIO=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFCONFIG=y CONFIG_NSH_DISABLE_LOSETUP=y diff --git a/boards/arm/sam34/sam4s-xplained-pro/src/Makefile b/boards/arm/sam34/sam4s-xplained-pro/src/Makefile index 33c990d6bb990..f87e78bbed64c 100644 --- a/boards/arm/sam34/sam4s-xplained-pro/src/Makefile +++ b/boards/arm/sam34/sam4s-xplained-pro/src/Makefile @@ -28,10 +28,6 @@ ifeq ($(CONFIG_MMCSD_SPI),y) CSRCS += sam_spi.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += sam_appinit.c -endif - ifeq ($(CONFIG_SAM34_EXTNAND),y) ifeq ($(CONFIG_MTD_NAND),y) CSRCS += sam_nandflash.c diff --git a/boards/arm/sam34/sam4s-xplained-pro/src/sam_appinit.c b/boards/arm/sam34/sam4s-xplained-pro/src/sam_appinit.c deleted file mode 100644 index 1b448b48a2423..0000000000000 --- a/boards/arm/sam34/sam4s-xplained-pro/src/sam_appinit.c +++ /dev/null @@ -1,173 +0,0 @@ -/**************************************************************************** - * boards/arm/sam34/sam4s-xplained-pro/src/sam_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 - -#include -#include -#include -#include -#include - -#include -#include -#include - -#ifdef CONFIG_CDCACM -# include -#endif - -#ifdef CONFIG_PL2303 -# include -#endif - -#ifdef CONFIG_USBMONITOR -# include -#endif - -#include "sam4s-xplained-pro.h" - -/**************************************************************************** - * 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 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) -{ -#if defined (HAVE_USBDEV) || defined(HAVE_HSMCI) || defined (HAVE_PROC) || \ - defined(HAVE_USBMONITOR) - int ret; -#endif - -#ifdef HAVE_USBDEV - syslog(LOG_INFO, "Registering CDC/ACM serial driver\n"); - - ret = cdcacm_initialize(CONFIG_SAM4S_XPLAINED_PRO_CDCACM_DEVMINOR, NULL); - if (ret < 0) - { - syslog(LOG_ERR, - "ERROR: Failed to create the CDC/ACM serial device: %d\n", ret); - return ret; - } -#endif - -#ifdef HAVE_NAND - ret = sam_nand_automount(SAM_SMC_CS0); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: Failed to initialize the NAND: %d\n", ret); - return ret; - } -#endif - -#ifdef HAVE_HSMCI - /* Initialize the HSMCI driver */ - - syslog(LOG_INFO, "initializing HSMCI\n"); - - ret = sam_hsmci_initialize(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: sam_hsmci_initialize() failed: %d\n", ret); - return ret; - } -#endif - -#ifdef HAVE_PROC - /* mount the proc filesystem */ - - syslog(LOG_INFO, "Mounting procfs to /proc\n"); - - ret = nx_mount(NULL, "/proc", "procfs", 0, NULL); - if (ret < 0) - { - syslog(LOG_ERR, - "ERROR: Failed to mount the PROC filesystem: %d\n", ret); - return ret; - } -#endif - -#if HAVE_HSMCI - syslog(LOG_INFO, "Mounting /dev/mmcsd0 to /fat\n"); - - ret = nx_mount("/dev/mmcsd0", "/fat", "vfat", 0, NULL); - if (ret < 0) - { - syslog(LOG_ERR, - "ERROR: Failed to mount the FAT filesystem: %d\n", ret); - return ret; - } -#endif - - /* SPI */ - -#ifdef HAVE_MMCSD_SPI - ret = sam_sdinitialize(0, 0); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: Failed to initialize MMC/SD slot: %d\n", ret); - return ret; - } -#endif - -#ifdef HAVE_USBMONITOR - /* Start the USB Monitor */ - - syslog(LOG_INFO, "Starting USB Monitor\n"); - ret = usbmonitor_start(); - if (ret != OK) - { - syslog(LOG_ERR, "ERROR: Failed to start USB monitor: %d\n", ret); - return ret; - } -#endif - - return OK; -} diff --git a/boards/arm/sam34/sam4s-xplained-pro/src/sam_boot.c b/boards/arm/sam34/sam4s-xplained-pro/src/sam_boot.c index 73c34283828e3..b38f75e081406 100644 --- a/boards/arm/sam34/sam4s-xplained-pro/src/sam_boot.c +++ b/boards/arm/sam34/sam4s-xplained-pro/src/sam_boot.c @@ -27,10 +27,31 @@ #include #include + #include +#include +#include +#include +#include +#include + #include #include +#include +#include + +#ifdef CONFIG_CDCACM +# include +#endif + +#ifdef CONFIG_PL2303 +# include +#endif + +#ifdef CONFIG_USBMONITOR +# include +#endif #include "sam4s-xplained-pro.h" @@ -75,6 +96,11 @@ void sam_boardinitialize(void) #ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { +#if defined (HAVE_USBDEV) || defined(HAVE_HSMCI) || defined (HAVE_PROC) || \ + defined(HAVE_USBMONITOR) + int ret; +#endif + #if (defined(CONFIG_SAM34_WDT) && !defined(CONFIG_WDT_DISABLE_ON_RESET)) /* Configure watchdog timer and enable kicker kernel thread. */ @@ -88,5 +114,88 @@ void board_late_initialize(void) sam_led_initialize(); #endif + +#ifdef HAVE_USBDEV + syslog(LOG_INFO, "Registering CDC/ACM serial driver\n"); + + ret = cdcacm_initialize(CONFIG_SAM4S_XPLAINED_PRO_CDCACM_DEVMINOR, NULL); + if (ret < 0) + { + syslog(LOG_ERR, + "ERROR: Failed to create the CDC/ACM serial device: %d\n", ret); + return; + } +#endif + +#ifdef HAVE_NAND + ret = sam_nand_automount(SAM_SMC_CS0); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: Failed to initialize the NAND: %d\n", ret); + return; + } +#endif + +#ifdef HAVE_HSMCI + /* Initialize the HSMCI driver */ + + syslog(LOG_INFO, "initializing HSMCI\n"); + + ret = sam_hsmci_initialize(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: sam_hsmci_initialize() failed: %d\n", ret); + return; + } +#endif + +#ifdef HAVE_PROC + /* mount the proc filesystem */ + + syslog(LOG_INFO, "Mounting procfs to /proc\n"); + + ret = nx_mount(NULL, "/proc", "procfs", 0, NULL); + if (ret < 0) + { + syslog(LOG_ERR, + "ERROR: Failed to mount the PROC filesystem: %d\n", ret); + return; + } +#endif + +#if HAVE_HSMCI + syslog(LOG_INFO, "Mounting /dev/mmcsd0 to /fat\n"); + + ret = nx_mount("/dev/mmcsd0", "/fat", "vfat", 0, NULL); + if (ret < 0) + { + syslog(LOG_ERR, + "ERROR: Failed to mount the FAT filesystem: %d\n", ret); + return; + } +#endif + + /* SPI */ + +#ifdef HAVE_MMCSD_SPI + ret = sam_sdinitialize(0, 0); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: Failed to initialize MMC/SD slot: %d\n", ret); + return; + } +#endif + +#ifdef HAVE_USBMONITOR + /* Start the USB Monitor */ + + syslog(LOG_INFO, "Starting USB Monitor\n"); + ret = usbmonitor_start(); + if (ret != OK) + { + syslog(LOG_ERR, "ERROR: Failed to start USB monitor: %d\n", ret); + return; + } +#endif } #endif /* CONFIG_BOARD_LATE_INITIALIZE */ diff --git a/boards/arm/sam34/sam4s-xplained/src/sam_boot.c b/boards/arm/sam34/sam4s-xplained/src/sam_boot.c index 21dd4d23cf36b..e2bef2f525338 100644 --- a/boards/arm/sam34/sam4s-xplained/src/sam_boot.c +++ b/boards/arm/sam34/sam4s-xplained/src/sam_boot.c @@ -69,3 +69,23 @@ void sam_boardinitialize(void) board_autoled_initialize(); #endif } + +/**************************************************************************** + * 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ +} +#endif diff --git a/boards/arm/sama5/giant-board/configs/netnsh/defconfig b/boards/arm/sama5/giant-board/configs/netnsh/defconfig index 2302b7355dc48..04e9537335a23 100644 --- a/boards/arm/sama5/giant-board/configs/netnsh/defconfig +++ b/boards/arm/sama5/giant-board/configs/netnsh/defconfig @@ -60,7 +60,6 @@ CONFIG_NET_TCP_KEEPALIVE=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_WRITE_BUFFERS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/sama5/giant-board/configs/nsh/defconfig b/boards/arm/sama5/giant-board/configs/nsh/defconfig index 1ae299ba76765..0179d96ea8816 100644 --- a/boards/arm/sama5/giant-board/configs/nsh/defconfig +++ b/boards/arm/sama5/giant-board/configs/nsh/defconfig @@ -35,7 +35,6 @@ CONFIG_HIDKBD_POLLUSEC=80000 CONFIG_I2S=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/sama5/giant-board/configs/sdmmc-net-nsh/defconfig b/boards/arm/sama5/giant-board/configs/sdmmc-net-nsh/defconfig index 6b9056385069a..49c38886fdc88 100644 --- a/boards/arm/sama5/giant-board/configs/sdmmc-net-nsh/defconfig +++ b/boards/arm/sama5/giant-board/configs/sdmmc-net-nsh/defconfig @@ -72,7 +72,6 @@ CONFIG_NET_TCP_KEEPALIVE=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_WRITE_BUFFERS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_PROMPT_STRING="nsh> " diff --git a/boards/arm/sama5/giant-board/configs/sdmmcnsh/defconfig b/boards/arm/sama5/giant-board/configs/sdmmcnsh/defconfig index a79eac51e061c..6cffbff1f4cba 100644 --- a/boards/arm/sama5/giant-board/configs/sdmmcnsh/defconfig +++ b/boards/arm/sama5/giant-board/configs/sdmmcnsh/defconfig @@ -65,7 +65,6 @@ CONFIG_NET_TCP=y CONFIG_NET_TCP_NOTIFIER=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_PROMPT_STRING="nsh> " diff --git a/boards/arm/sama5/giant-board/src/Makefile b/boards/arm/sama5/giant-board/src/Makefile index 4d593b3715cf7..d49a8d831e774 100644 --- a/boards/arm/sama5/giant-board/src/Makefile +++ b/boards/arm/sama5/giant-board/src/Makefile @@ -22,7 +22,7 @@ include $(TOPDIR)/Make.defs -CSRCS = sam_boot.c +CSRCS = sam_boot.c sam_bringup.c ifeq ($(CONFIG_SAMA5_SPI0),y) CSRCS += sam_spi.c @@ -60,11 +60,6 @@ CSRCS += sam_usb.c endif endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += sam_appinit.c -CSRCS += sam_bringup.c -endif - ifeq ($(CONFIG_ADC),y) CSRCS += sam_adc.c ifeq ($(CONFIG_INPUT_AJOYSTICK),y) diff --git a/boards/arm/sama5/giant-board/src/sam_appinit.c b/boards/arm/sama5/giant-board/src/sam_appinit.c deleted file mode 100644 index a24d4714d5bdd..0000000000000 --- a/boards/arm/sama5/giant-board/src/sam_appinit.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm/sama5/giant-board/src/sam_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 -#include -#include - -#include - -#include "giant-board.h" - -#ifndef CONFIG_BUILD_KERNEL - -/**************************************************************************** - * 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 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) -{ -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board initialization */ - - mcinfo("Entry\n"); - return sam_bringup(); -#else - return OK; -#endif -} - -#endif /* CONFIG_BUILD_KERNEL */ diff --git a/boards/arm/sama5/jupiter-nano/configs/netnsh/defconfig b/boards/arm/sama5/jupiter-nano/configs/netnsh/defconfig index c6d29de05eea5..d58b258b73e19 100644 --- a/boards/arm/sama5/jupiter-nano/configs/netnsh/defconfig +++ b/boards/arm/sama5/jupiter-nano/configs/netnsh/defconfig @@ -62,7 +62,6 @@ CONFIG_NET_TCP_KEEPALIVE=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_WRITE_BUFFERS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/sama5/jupiter-nano/configs/nsh/defconfig b/boards/arm/sama5/jupiter-nano/configs/nsh/defconfig index 0b3f77f66da82..c0464c855c15b 100644 --- a/boards/arm/sama5/jupiter-nano/configs/nsh/defconfig +++ b/boards/arm/sama5/jupiter-nano/configs/nsh/defconfig @@ -37,7 +37,6 @@ CONFIG_HIDKBD_POLLUSEC=80000 CONFIG_I2S=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/sama5/jupiter-nano/configs/sdmmc-nsh-net-resolvconf/defconfig b/boards/arm/sama5/jupiter-nano/configs/sdmmc-nsh-net-resolvconf/defconfig index d92f25ac1e524..51144d96934c1 100644 --- a/boards/arm/sama5/jupiter-nano/configs/sdmmc-nsh-net-resolvconf/defconfig +++ b/boards/arm/sama5/jupiter-nano/configs/sdmmc-nsh-net-resolvconf/defconfig @@ -70,7 +70,6 @@ CONFIG_NET_TCP=y CONFIG_NET_TCP_NOTIFIER=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_PROMPT_STRING="nsh> " diff --git a/boards/arm/sama5/jupiter-nano/configs/sdmmcnsh/defconfig b/boards/arm/sama5/jupiter-nano/configs/sdmmcnsh/defconfig index 42359b3c8c2a2..55e741c439497 100644 --- a/boards/arm/sama5/jupiter-nano/configs/sdmmcnsh/defconfig +++ b/boards/arm/sama5/jupiter-nano/configs/sdmmcnsh/defconfig @@ -66,7 +66,6 @@ CONFIG_NET_TCP=y CONFIG_NET_TCP_NOTIFIER=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_PROMPT_STRING="nsh> " diff --git a/boards/arm/sama5/jupiter-nano/src/Makefile b/boards/arm/sama5/jupiter-nano/src/Makefile index 8c4cba5b314d4..66f33d56e5fba 100644 --- a/boards/arm/sama5/jupiter-nano/src/Makefile +++ b/boards/arm/sama5/jupiter-nano/src/Makefile @@ -22,7 +22,7 @@ include $(TOPDIR)/Make.defs -CSRCS = sam_boot.c +CSRCS = sam_boot.c sam_bringup.c ifeq ($(CONFIG_SAMA5_SPI0),y) CSRCS += sam_spi.c @@ -78,11 +78,6 @@ CSRCS += sam_ethernet.c endif endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += sam_appinit.c -CSRCS += sam_bringup.c -endif - ifeq ($(CONFIG_ADC),y) CSRCS += sam_adc.c ifeq ($(CONFIG_INPUT_AJOYSTICK),y) diff --git a/boards/arm/sama5/jupiter-nano/src/sam_appinit.c b/boards/arm/sama5/jupiter-nano/src/sam_appinit.c deleted file mode 100644 index 4ba39ccc35eb0..0000000000000 --- a/boards/arm/sama5/jupiter-nano/src/sam_appinit.c +++ /dev/null @@ -1,82 +0,0 @@ -/**************************************************************************** - * boards/arm/sama5/jupiter-nano/src/sam_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 -#include -#include - -#include - -#include "jupiter-nano.h" - -#ifndef CONFIG_BUILD_KERNEL - -/**************************************************************************** - * 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 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) -{ -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board initialization */ - - mcinfo("Entry\n"); - return sam_bringup(); -#else - return OK; -#endif -} - -#endif /* CONFIG_BUILD_KERNEL */ diff --git a/boards/arm/sama5/sama5d2-xult/configs/netnsh/defconfig b/boards/arm/sama5/sama5d2-xult/configs/netnsh/defconfig index 2e7f7e0278ebd..4551b81e9e032 100644 --- a/boards/arm/sama5/sama5d2-xult/configs/netnsh/defconfig +++ b/boards/arm/sama5/sama5d2-xult/configs/netnsh/defconfig @@ -60,7 +60,6 @@ CONFIG_NET_TCP_KEEPALIVE=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_WRITE_BUFFERS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/sama5/sama5d2-xult/configs/nsh/defconfig b/boards/arm/sama5/sama5d2-xult/configs/nsh/defconfig index 0aa9cd6edef19..8ad7cb75f8150 100644 --- a/boards/arm/sama5/sama5d2-xult/configs/nsh/defconfig +++ b/boards/arm/sama5/sama5d2-xult/configs/nsh/defconfig @@ -37,7 +37,6 @@ CONFIG_HIDKBD_POLLUSEC=80000 CONFIG_I2S=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/sama5/sama5d2-xult/configs/sdmmcnsh/defconfig b/boards/arm/sama5/sama5d2-xult/configs/sdmmcnsh/defconfig index 3466ae8b778c9..169588a1dd433 100644 --- a/boards/arm/sama5/sama5d2-xult/configs/sdmmcnsh/defconfig +++ b/boards/arm/sama5/sama5d2-xult/configs/sdmmcnsh/defconfig @@ -68,7 +68,6 @@ CONFIG_NET_TCP=y CONFIG_NET_TCP_NOTIFIER=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_PROMPT_STRING="nsh> " diff --git a/boards/arm/sama5/sama5d2-xult/src/Makefile b/boards/arm/sama5/sama5d2-xult/src/Makefile index 5067d286ad279..bf6252bc7326a 100644 --- a/boards/arm/sama5/sama5d2-xult/src/Makefile +++ b/boards/arm/sama5/sama5d2-xult/src/Makefile @@ -22,7 +22,7 @@ include $(TOPDIR)/Make.defs -CSRCS = sam_boot.c +CSRCS = sam_boot.c sam_bringup.c ifeq ($(CONFIG_SAMA5_SPI0),y) CSRCS += sam_spi.c @@ -78,11 +78,6 @@ CSRCS += sam_ethernet.c endif endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += sam_appinit.c -CSRCS += sam_bringup.c -endif - ifeq ($(CONFIG_ADC),y) CSRCS += sam_adc.c ifeq ($(CONFIG_INPUT_AJOYSTICK),y) diff --git a/boards/arm/sama5/sama5d2-xult/src/sam_appinit.c b/boards/arm/sama5/sama5d2-xult/src/sam_appinit.c deleted file mode 100644 index 6480aaae07549..0000000000000 --- a/boards/arm/sama5/sama5d2-xult/src/sam_appinit.c +++ /dev/null @@ -1,82 +0,0 @@ -/**************************************************************************** - * boards/arm/sama5/sama5d2-xult/src/sam_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 -#include -#include - -#include - -#include "sama5d2-xult.h" - -#ifndef CONFIG_BUILD_KERNEL - -/**************************************************************************** - * 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 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) -{ -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board initialization */ - - mcinfo("Entry\n"); - return sam_bringup(); -#else - return OK; -#endif -} - -#endif /* CONFIG_BUILD_KERNEL */ diff --git a/boards/arm/sama5/sama5d3-xplained/Kconfig b/boards/arm/sama5/sama5d3-xplained/Kconfig index 506223386ae4c..297d2c40eec66 100644 --- a/boards/arm/sama5/sama5d3-xplained/Kconfig +++ b/boards/arm/sama5/sama5d3-xplained/Kconfig @@ -44,7 +44,7 @@ endchoice # SAMA5D3-Xplained DRAM Type config SAMA5D3XPLAINED_NAND_BLOCKMOUNT bool "NAND FLASH auto-mount" default n - depends on NSH_ARCHINIT && SAMA5_EBICS3_NAND + depends on BOARD_LATE_INITIALIZE && SAMA5_EBICS3_NAND ---help--- Automatically initialize the NAND FLASH driver when NSH starts. @@ -83,7 +83,7 @@ endchoice # NAND FLASH configuration config SAMA5D3XPLAINED_AT25_AUTOMOUNT bool "AT25 serial FLASH auto-mount" default n - depends on NSH_ARCHINIT && SAMA5_SPI0 && MTD_AT25 + depends on BOARD_LATE_INITIALIZE && SAMA5_SPI0 && MTD_AT25 ---help--- Automatically initialize the AT25 SPI FLASH driver when NSH starts. diff --git a/boards/arm/sama5/sama5d3-xplained/configs/bluetooth/defconfig b/boards/arm/sama5/sama5d3-xplained/configs/bluetooth/defconfig index b4439e18dcf25..9eee086e35779 100644 --- a/boards/arm/sama5/sama5d3-xplained/configs/bluetooth/defconfig +++ b/boards/arm/sama5/sama5d3-xplained/configs/bluetooth/defconfig @@ -59,7 +59,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_NET=y CONFIG_NET_BLUETOOTH=y CONFIG_NET_LL_GUARDSIZE=14 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/sama5/sama5d3-xplained/configs/ethernet-over-usb-2-high-speed/defconfig b/boards/arm/sama5/sama5d3-xplained/configs/ethernet-over-usb-2-high-speed/defconfig index d5cd8aaa68046..19f747dcd2544 100644 --- a/boards/arm/sama5/sama5d3-xplained/configs/ethernet-over-usb-2-high-speed/defconfig +++ b/boards/arm/sama5/sama5d3-xplained/configs/ethernet-over-usb-2-high-speed/defconfig @@ -59,7 +59,6 @@ CONFIG_NET_TCP=y CONFIG_NET_TCP_NOTIFIER=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_PROMPT_STRING="nsh> " diff --git a/boards/arm/sama5/sama5d3-xplained/configs/knsh/defconfig b/boards/arm/sama5/sama5d3-xplained/configs/knsh/defconfig index 7260b057aa8e6..a04dd8ac9dec8 100644 --- a/boards/arm/sama5/sama5d3-xplained/configs/knsh/defconfig +++ b/boards/arm/sama5/sama5d3-xplained/configs/knsh/defconfig @@ -30,7 +30,6 @@ CONFIG_ARCH_TEXT_NPAGES=256 CONFIG_ARCH_TEXT_VBASE=0x80000000 CONFIG_ARM_THUMB=y CONFIG_BOARDCTL_RESET=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=65775 CONFIG_BOOT_RUNFROMSDRAM=y CONFIG_BUILD_KERNEL=y diff --git a/boards/arm/sama5/sama5d3-xplained/configs/nsh/defconfig b/boards/arm/sama5/sama5d3-xplained/configs/nsh/defconfig index 2b72e0dfd54d6..86223da7bf7e8 100644 --- a/boards/arm/sama5/sama5d3-xplained/configs/nsh/defconfig +++ b/boards/arm/sama5/sama5d3-xplained/configs/nsh/defconfig @@ -18,7 +18,6 @@ CONFIG_ARCH_CHIP_SAMA5D3=y CONFIG_ARCH_INTERRUPTSTACK=2048 CONFIG_ARCH_LOWVECTORS=y CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=65775 CONFIG_BOOT_RUNFROMSDRAM=y CONFIG_BUILTIN=y diff --git a/boards/arm/sama5/sama5d3-xplained/src/CMakeLists.txt b/boards/arm/sama5/sama5d3-xplained/src/CMakeLists.txt index 264a89dee99d4..e2d57f3b36fd5 100644 --- a/boards/arm/sama5/sama5d3-xplained/src/CMakeLists.txt +++ b/boards/arm/sama5/sama5d3-xplained/src/CMakeLists.txt @@ -20,7 +20,7 @@ # # ############################################################################## -set(SRCS sam_boot.c) +set(SRCS sam_boot.c sam_bringup.c) if(CONFIG_SAMA5_SPI0) list(APPEND SRCS sam_spi.c) @@ -68,11 +68,6 @@ else() endif() endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS sam_appinit.c) - list(APPEND SRCS sam_bringup.c) -endif() - if(CONFIG_ADC) list(APPEND SRCS sam_adc.c) if(CONFIG_INPUT_AJOYSTICK) diff --git a/boards/arm/sama5/sama5d3-xplained/src/Makefile b/boards/arm/sama5/sama5d3-xplained/src/Makefile index c540745024244..4b7a7008301f3 100644 --- a/boards/arm/sama5/sama5d3-xplained/src/Makefile +++ b/boards/arm/sama5/sama5d3-xplained/src/Makefile @@ -22,7 +22,7 @@ include $(TOPDIR)/Make.defs -CSRCS = sam_boot.c +CSRCS = sam_boot.c sam_bringup.c ifeq ($(CONFIG_SAMA5_SPI0),y) CSRCS += sam_spi.c @@ -70,11 +70,6 @@ CSRCS += sam_ethernet.c endif endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += sam_appinit.c -CSRCS += sam_bringup.c -endif - ifeq ($(CONFIG_ADC),y) CSRCS += sam_adc.c ifeq ($(CONFIG_INPUT_AJOYSTICK),y) diff --git a/boards/arm/sama5/sama5d3-xplained/src/sam_appinit.c b/boards/arm/sama5/sama5d3-xplained/src/sam_appinit.c deleted file mode 100644 index 4339b5f01c5ab..0000000000000 --- a/boards/arm/sama5/sama5d3-xplained/src/sam_appinit.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm/sama5/sama5d3-xplained/src/sam_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 - -#include -#include -#include -#include - -#include - -#ifdef CONFIG_USBMONITOR -# include -#endif - -#include "sama5d3-xplained.h" - -/**************************************************************************** - * 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. - * This function is also called by board_late_initialize if - * CONFIG_BOARD_LATE_INITIALIZE is defined. - * - * 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) -{ - /* Perform board initialization */ - - return sam_bringup(); -} diff --git a/boards/arm/sama5/sama5d3-xplained/src/sam_boot.c b/boards/arm/sama5/sama5d3-xplained/src/sam_boot.c index 7ff223a19e6c9..d81269be5555f 100644 --- a/boards/arm/sama5/sama5d3-xplained/src/sam_boot.c +++ b/boards/arm/sama5/sama5d3-xplained/src/sam_boot.c @@ -28,8 +28,17 @@ #include +#include +#include +#include +#include + #include +#ifdef CONFIG_USBMONITOR +# include +#endif + #include "sam_sckc.h" #include "sama5d3-xplained.h" @@ -135,15 +144,6 @@ void sam_boardinitialize(void) #ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { - /* Perform NSH initialization here instead of from the NSH. - * This alternative NSH initialization is necessary when NSH is ran in - * user-space but the initialization function must run in kernel space. - */ -#if defined(CONFIG_NSH_ARCHINIT) -# error Both BOARD_LATE_INITIALIZE and NSH_ARCHINIT enabled -#elif defined(CONFIG_NSH_LIBRARY) - - board_app_initialize(0); -#endif + sam_bringup(); } #endif /* CONFIG_BOARD_LATE_INITIALIZE */ diff --git a/boards/arm/sama5/sama5d3x-ek/Kconfig b/boards/arm/sama5/sama5d3x-ek/Kconfig index c33fd2eba930d..cd280088ab4d3 100644 --- a/boards/arm/sama5/sama5d3x-ek/Kconfig +++ b/boards/arm/sama5/sama5d3x-ek/Kconfig @@ -71,7 +71,7 @@ config SAMA5D3XEK_NOR_START config SAMA5D3XEK_NAND_BLOCKMOUNT bool "NAND FLASH auto-mount" default n - depends on NSH_ARCHINIT && SAMA5_EBICS3_NAND + depends on BOARD_LATE_INITIALIZE && SAMA5_EBICS3_NAND ---help--- Automatically initialize the NAND FLASH driver when NSH starts. @@ -110,7 +110,7 @@ endchoice # NAND FLASH configuration config SAMA5D3XEK_AT25_BLOCKMOUNT bool "AT25 serial FLASH auto-mount" default n - depends on NSH_ARCHINIT && SAMA5_SPI0 && MTD_AT25 + depends on BOARD_LATE_INITIALIZE && SAMA5_SPI0 && MTD_AT25 ---help--- Automatically initialize the AT25 SPI FLASH driver when NSH starts. @@ -140,7 +140,7 @@ endchoice # AT25 serial FLASH configuration config SAMA5D3XEK_AT24_BLOCKMOUNT bool "AT24 Serial EEPROM auto-mount" default n - depends on NSH_ARCHINIT && SAMA5_TWI0 && MTD_AT24XX + depends on BOARD_LATE_INITIALIZE && SAMA5_TWI0 && MTD_AT24XX ---help--- Automatically initialize the AT24 SPI EEPROM driver when NSH starts. diff --git a/boards/arm/sama5/sama5d3x-ek/configs/demo/defconfig b/boards/arm/sama5/sama5d3x-ek/configs/demo/defconfig index 52e1b9586fb09..2d81b6c08e904 100644 --- a/boards/arm/sama5/sama5d3x-ek/configs/demo/defconfig +++ b/boards/arm/sama5/sama5d3x-ek/configs/demo/defconfig @@ -39,7 +39,6 @@ CONFIG_MMCSD_SDIO=y CONFIG_MM_REGIONS=2 CONFIG_MTD=y CONFIG_MTD_AT25=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/sama5/sama5d3x-ek/configs/nxplayer/defconfig b/boards/arm/sama5/sama5d3x-ek/configs/nxplayer/defconfig index 4973fb2da24e8..ff19b258f2ea7 100644 --- a/boards/arm/sama5/sama5d3x-ek/configs/nxplayer/defconfig +++ b/boards/arm/sama5/sama5d3x-ek/configs/nxplayer/defconfig @@ -43,7 +43,6 @@ CONFIG_MMCSD=y CONFIG_MMCSD_MULTIBLOCK_LIMIT=1 CONFIG_MMCSD_SDIO=y CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/sama5/sama5d3x-ek/configs/nxwm/defconfig b/boards/arm/sama5/sama5d3x-ek/configs/nxwm/defconfig index 6dd7097af679c..fa863fe52c5ee 100644 --- a/boards/arm/sama5/sama5d3x-ek/configs/nxwm/defconfig +++ b/boards/arm/sama5/sama5d3x-ek/configs/nxwm/defconfig @@ -36,7 +36,6 @@ CONFIG_LIBM=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 CONFIG_MQ_MAXMSGSIZE=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_LIBRARY=y CONFIG_NSH_READLINE=y diff --git a/boards/arm/sama5/sama5d3x-ek/src/CMakeLists.txt b/boards/arm/sama5/sama5d3x-ek/src/CMakeLists.txt index 5e38173c13564..2f4abafdb2d44 100644 --- a/boards/arm/sama5/sama5d3x-ek/src/CMakeLists.txt +++ b/boards/arm/sama5/sama5d3x-ek/src/CMakeLists.txt @@ -90,10 +90,6 @@ if(CONFIG_AUDIO_WM8904) endif() endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS sam_appinit.c) -endif() - if(CONFIG_ADC) list(APPEND SRCS sam_adc.c) endif() diff --git a/boards/arm/sama5/sama5d3x-ek/src/Makefile b/boards/arm/sama5/sama5d3x-ek/src/Makefile index 989c2261f35f6..fd422e0fad6e9 100644 --- a/boards/arm/sama5/sama5d3x-ek/src/Makefile +++ b/boards/arm/sama5/sama5d3x-ek/src/Makefile @@ -92,10 +92,6 @@ endif endif endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += sam_appinit.c -endif - ifeq ($(CONFIG_ADC),y) CSRCS += sam_adc.c endif diff --git a/boards/arm/sama5/sama5d3x-ek/src/sam_appinit.c b/boards/arm/sama5/sama5d3x-ek/src/sam_appinit.c deleted file mode 100644 index e474d39cd9e75..0000000000000 --- a/boards/arm/sama5/sama5d3x-ek/src/sam_appinit.c +++ /dev/null @@ -1,226 +0,0 @@ -/**************************************************************************** - * boards/arm/sama5/sama5d3x-ek/src/sam_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 - -#include -#include -#include -#include - -#include -#include - -#ifdef CONFIG_USBMONITOR -# include -#endif - -#include "sama5d3x-ek.h" - -/**************************************************************************** - * 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 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) -{ - int ret; - -#ifdef HAVE_NAND - /* Initialize the NAND driver */ - - ret = sam_nand_automount(NAND_MINOR); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: sam_nand_automount failed: %d\n", ret); - return ret; - } -#endif - -#ifdef HAVE_AT25 - /* Initialize the AT25 driver */ - - ret = sam_at25_automount(AT25_MINOR); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: sam_at25_automount failed: %d\n", ret); - return ret; - } -#endif - -#ifdef HAVE_AT24 - /* Initialize the AT24 driver */ - - ret = sam_at24_automount(AT24_MINOR); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: sam_at24_automount failed: %d\n", ret); - return ret; - } -#endif - -#ifdef HAVE_HSMCI -#ifdef CONFIG_SAMA5_HSMCI0 - /* Initialize the HSMCI0 driver */ - - ret = sam_hsmci_initialize(HSMCI0_SLOTNO, HSMCI0_MINOR); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: sam_hsmci_initialize(%d,%d) failed: %d\n", - HSMCI0_SLOTNO, HSMCI0_MINOR, ret); - return ret; - } -#endif - -#ifdef CONFIG_SAMA5_HSMCI1 - /* Initialize the HSMCI1 driver */ - - ret = sam_hsmci_initialize(HSMCI1_SLOTNO, HSMCI1_MINOR); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: sam_hsmci_initialize(%d,%d) failed: %d\n", - HSMCI1_SLOTNO, HSMCI1_MINOR, ret); - return ret; - } -#endif -#endif - -#ifdef HAVE_USBHOST - /* Initialize USB host operation. sam_usbhost_initialize() starts a thread - * will monitor for USB connection and disconnection events. - */ - - ret = sam_usbhost_initialize(); - if (ret != OK) - { - syslog(LOG_ERR, "ERROR: Failed to initialize USB host: %d\n", ret); - return ret; - } -#endif - -#ifdef HAVE_USBMONITOR - /* Start the USB Monitor */ - - ret = usbmonitor_start(); - if (ret != OK) - { - syslog(LOG_ERR, "ERROR: Start USB monitor: %d\n", ret); - } -#endif - -#ifdef CONFIG_SAMA5_TSD - /* Initialize the touchscreen */ - - ret = sam_tsc_setup(0); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: sam_tsc_setup failed: %d\n", ret); - } -#endif - -#ifdef HAVE_WM8904 - /* Configure WM8904 audio */ - - ret = sam_wm8904_initialize(0); - if (ret != OK) - { - syslog(LOG_ERR, "ERROR: Failed to initialize WM8904 audio: %d\n", - ret); - } -#endif - -#ifdef CONFIG_PWM - /* Initialize PWM and register the PWM device. */ - - ret = sam_pwm_setup(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: sam_pwm_setup() failed: %d\n", ret); - } -#endif - -#ifdef CONFIG_ADC - /* Initialize ADC and register the ADC driver. */ - - ret = sam_adc_setup(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: sam_adc_setup failed: %d\n", ret); - } -#endif - -#ifdef CONFIG_CAN - /* Initialize CAN and register the CAN driver. */ - - ret = sam_can_setup(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: sam_can_setup failed: %d\n", ret); - } -#endif - -#ifdef CONFIG_FS_PROCFS - /* Mount the procfs file system */ - - ret = nx_mount(NULL, SAMA5_PROCFS_MOUNTPOINT, "procfs", 0, NULL); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: Failed to mount procfs at %s: %d\n", - SAMA5_PROCFS_MOUNTPOINT, ret); - } -#endif - - UNUSED(ret); - return OK; -} diff --git a/boards/arm/sama5/sama5d3x-ek/src/sam_boot.c b/boards/arm/sama5/sama5d3x-ek/src/sam_boot.c index b4639b1f73beb..4e25212bf306e 100644 --- a/boards/arm/sama5/sama5d3x-ek/src/sam_boot.c +++ b/boards/arm/sama5/sama5d3x-ek/src/sam_boot.c @@ -28,7 +28,17 @@ #include +#include +#include +#include +#include + #include +#include + +#ifdef CONFIG_USBMONITOR +# include +#endif #include "sam_sckc.h" #include "sama5d3x-ek.h" @@ -139,13 +149,152 @@ void sam_boardinitialize(void) #ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { - /* Perform NSH initialization here instead of from the NSH. - * This alternative NSH initialization is necessary when NSH is ran in - * user-space but the initialization function must run in kernel space. + int ret; + +#ifdef HAVE_NAND + /* Initialize the NAND driver */ + + ret = sam_nand_automount(NAND_MINOR); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: sam_nand_automount failed: %d\n", ret); + return; + } +#endif + +#ifdef HAVE_AT25 + /* Initialize the AT25 driver */ + + ret = sam_at25_automount(AT25_MINOR); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: sam_at25_automount failed: %d\n", ret); + return; + } +#endif + +#ifdef HAVE_AT24 + /* Initialize the AT24 driver */ + + ret = sam_at24_automount(AT24_MINOR); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: sam_at24_automount failed: %d\n", ret); + return ret; + } +#endif + +#ifdef HAVE_HSMCI +#ifdef CONFIG_SAMA5_HSMCI0 + /* Initialize the HSMCI0 driver */ + + ret = sam_hsmci_initialize(HSMCI0_SLOTNO, HSMCI0_MINOR); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: sam_hsmci_initialize(%d,%d) failed: %d\n", + HSMCI0_SLOTNO, HSMCI0_MINOR, ret); + return; + } +#endif + +#ifdef CONFIG_SAMA5_HSMCI1 + /* Initialize the HSMCI1 driver */ + + ret = sam_hsmci_initialize(HSMCI1_SLOTNO, HSMCI1_MINOR); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: sam_hsmci_initialize(%d,%d) failed: %d\n", + HSMCI1_SLOTNO, HSMCI1_MINOR, ret); + return; + } +#endif +#endif + +#ifdef HAVE_USBHOST + /* Initialize USB host operation. sam_usbhost_initialize() starts a thread + * will monitor for USB connection and disconnection events. */ -#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_BOARDCTL) - board_app_initialize(0); + ret = sam_usbhost_initialize(); + if (ret != OK) + { + syslog(LOG_ERR, "ERROR: Failed to initialize USB host: %d\n", ret); + return; + } +#endif + +#ifdef HAVE_USBMONITOR + /* Start the USB Monitor */ + + ret = usbmonitor_start(); + if (ret != OK) + { + syslog(LOG_ERR, "ERROR: Start USB monitor: %d\n", ret); + } +#endif + +#ifdef CONFIG_SAMA5_TSD + /* Initialize the touchscreen */ + + ret = sam_tsc_setup(0); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: sam_tsc_setup failed: %d\n", ret); + } +#endif + +#ifdef HAVE_WM8904 + /* Configure WM8904 audio */ + + ret = sam_wm8904_initialize(0); + if (ret != OK) + { + syslog(LOG_ERR, "ERROR: Failed to initialize WM8904 audio: %d\n", + ret); + } +#endif + +#ifdef CONFIG_PWM + /* Initialize PWM and register the PWM device. */ + + ret = sam_pwm_setup(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: sam_pwm_setup() failed: %d\n", ret); + } #endif + +#ifdef CONFIG_ADC + /* Initialize ADC and register the ADC driver. */ + + ret = sam_adc_setup(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: sam_adc_setup failed: %d\n", ret); + } +#endif + +#ifdef CONFIG_CAN + /* Initialize CAN and register the CAN driver. */ + + ret = sam_can_setup(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: sam_can_setup failed: %d\n", ret); + } +#endif + +#ifdef CONFIG_FS_PROCFS + /* Mount the procfs file system */ + + ret = nx_mount(NULL, SAMA5_PROCFS_MOUNTPOINT, "procfs", 0, NULL); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: Failed to mount procfs at %s: %d\n", + SAMA5_PROCFS_MOUNTPOINT, ret); + } +#endif + + UNUSED(ret); } #endif /* CONFIG_BOARD_LATE_INITIALIZE */ diff --git a/boards/arm/sama5/sama5d4-ek/Kconfig b/boards/arm/sama5/sama5d4-ek/Kconfig index 13fb229e86a0e..2336dcbb23186 100644 --- a/boards/arm/sama5/sama5d4-ek/Kconfig +++ b/boards/arm/sama5/sama5d4-ek/Kconfig @@ -112,7 +112,7 @@ config SAMA5D4EK_DRAM_BOOT config SAMA5D4EK_NAND_BLOCKMOUNT bool "NAND FLASH auto-mount" default n - depends on NSH_ARCHINIT && SAMA5_EBICS3_NAND + depends on BOARD_LATE_INITIALIZE && SAMA5_EBICS3_NAND ---help--- Automatically initialize the NAND FLASH driver when NSH starts. @@ -151,7 +151,7 @@ endchoice # NAND FLASH configuration config SAMA5D4EK_AT25_BLOCKMOUNT bool "AT25 serial FLASH auto-mount" default n - depends on (NSH_ARCHINIT || SAMA5D4EK_AT25_MAIN) && SAMA5_SPI0 && MTD_AT25 + depends on (BOARD_LATE_INITIALIZE || SAMA5D4EK_AT25_MAIN) && SAMA5_SPI0 && MTD_AT25 ---help--- Automatically initialize the AT25 SPI FLASH driver when NSH starts. diff --git a/boards/arm/sama5/sama5d4-ek/configs/elf/defconfig b/boards/arm/sama5/sama5d4-ek/configs/elf/defconfig index faa017e9423a9..40793b5c25d3f 100644 --- a/boards/arm/sama5/sama5d4-ek/configs/elf/defconfig +++ b/boards/arm/sama5/sama5d4-ek/configs/elf/defconfig @@ -32,7 +32,6 @@ CONFIG_ARCH_TEXT_VBASE=0x80000000 CONFIG_ARCH_TRUSTZONE_SECURE=y CONFIG_BOARDCTL=y CONFIG_BOARDCTL_ROMDISK=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=65775 CONFIG_BOOT_RUNFROMSDRAM=y CONFIG_BUILTIN=y diff --git a/boards/arm/sama5/sama5d4-ek/configs/ipv6/defconfig b/boards/arm/sama5/sama5d4-ek/configs/ipv6/defconfig index cec96883eeed5..77c9cab0aad69 100644 --- a/boards/arm/sama5/sama5d4-ek/configs/ipv6/defconfig +++ b/boards/arm/sama5/sama5d4-ek/configs/ipv6/defconfig @@ -73,7 +73,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/sama5/sama5d4-ek/configs/knsh/defconfig b/boards/arm/sama5/sama5d4-ek/configs/knsh/defconfig index 3673bf3ec45b2..4b40c3af7336f 100644 --- a/boards/arm/sama5/sama5d4-ek/configs/knsh/defconfig +++ b/boards/arm/sama5/sama5d4-ek/configs/knsh/defconfig @@ -31,7 +31,6 @@ CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_TEXT_NPAGES=256 CONFIG_ARCH_TEXT_VBASE=0x80000000 CONFIG_ARCH_TRUSTZONE_SECURE=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=65775 CONFIG_BOOT_RUNFROMSDRAM=y CONFIG_BUILD_KERNEL=y diff --git a/boards/arm/sama5/sama5d4-ek/configs/nsh/defconfig b/boards/arm/sama5/sama5d4-ek/configs/nsh/defconfig index 8510bf3cf9594..51d4baa5a44b9 100644 --- a/boards/arm/sama5/sama5d4-ek/configs/nsh/defconfig +++ b/boards/arm/sama5/sama5d4-ek/configs/nsh/defconfig @@ -73,7 +73,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/sama5/sama5d4-ek/configs/nxwm/defconfig b/boards/arm/sama5/sama5d4-ek/configs/nxwm/defconfig index 10c057d3d3696..a1e68c316beab 100644 --- a/boards/arm/sama5/sama5d4-ek/configs/nxwm/defconfig +++ b/boards/arm/sama5/sama5d4-ek/configs/nxwm/defconfig @@ -77,7 +77,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_LIBRARY=y diff --git a/boards/arm/sama5/sama5d4-ek/configs/ramtest/defconfig b/boards/arm/sama5/sama5d4-ek/configs/ramtest/defconfig index d285f07a50caf..521f78fc8d580 100644 --- a/boards/arm/sama5/sama5d4-ek/configs/ramtest/defconfig +++ b/boards/arm/sama5/sama5d4-ek/configs/ramtest/defconfig @@ -25,10 +25,8 @@ CONFIG_DISABLE_ENVIRON=y CONFIG_FAT_LCNAMES=y CONFIG_FAT_LFN=y CONFIG_FS_FAT=y -CONFIG_FS_PROCFS=y CONFIG_HAVE_CXX=y CONFIG_HAVE_CXXINITIALIZE=y -CONFIG_HOST_WINDOWS=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 @@ -40,19 +38,23 @@ CONFIG_NSH_DISABLE_CD=y CONFIG_NSH_DISABLE_CMP=y CONFIG_NSH_DISABLE_CP=y CONFIG_NSH_DISABLE_DF=y +CONFIG_NSH_DISABLE_DMESG=y CONFIG_NSH_DISABLE_ECHO=y +CONFIG_NSH_DISABLE_ENV=y CONFIG_NSH_DISABLE_EXEC=y CONFIG_NSH_DISABLE_EXIT=y +CONFIG_NSH_DISABLE_EXPORT=y +CONFIG_NSH_DISABLE_EXPR=y +CONFIG_NSH_DISABLE_FREE=y CONFIG_NSH_DISABLE_GET=y CONFIG_NSH_DISABLE_HEXDUMP=y -CONFIG_NSH_DISABLE_IFCONFIG=y CONFIG_NSH_DISABLE_KILL=y CONFIG_NSH_DISABLE_LOSETUP=y CONFIG_NSH_DISABLE_LS=y CONFIG_NSH_DISABLE_MKDIR=y CONFIG_NSH_DISABLE_MKRD=y CONFIG_NSH_DISABLE_MOUNT=y -CONFIG_NSH_DISABLE_PS=y +CONFIG_NSH_DISABLE_MV=y CONFIG_NSH_DISABLE_PUT=y CONFIG_NSH_DISABLE_PWD=y CONFIG_NSH_DISABLE_RM=y @@ -61,9 +63,11 @@ CONFIG_NSH_DISABLE_SET=y CONFIG_NSH_DISABLE_SLEEP=y CONFIG_NSH_DISABLE_SOURCE=y CONFIG_NSH_DISABLE_TEST=y +CONFIG_NSH_DISABLE_TRUNCATE=y CONFIG_NSH_DISABLE_UMOUNT=y CONFIG_NSH_DISABLE_UNSET=y CONFIG_NSH_DISABLE_USLEEP=y +CONFIG_NSH_DISABLE_WATCH=y CONFIG_NSH_DISABLE_WGET=y CONFIG_NSH_DISABLE_XD=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/sama5/sama5d4-ek/src/Makefile b/boards/arm/sama5/sama5d4-ek/src/Makefile index fcf53d8172221..1705067c351ca 100644 --- a/boards/arm/sama5/sama5d4-ek/src/Makefile +++ b/boards/arm/sama5/sama5d4-ek/src/Makefile @@ -22,7 +22,7 @@ include $(TOPDIR)/Make.defs -CSRCS = sam_boot.c +CSRCS = sam_boot.c sam_bringup.c ifeq ($(CONFIG_SAMA5_SPI0),y) CSRCS += sam_spi.c @@ -98,14 +98,6 @@ ifeq ($(CONFIG_INPUT_MXT),y) CSRCS += sam_maxtouch.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += sam_appinit.c sam_bringup.c -else -ifeq ($(CONFIG_BOARD_LATE_INITIALIZE),y) -CSRCS += sam_bringup.c -endif -endif - ifeq ($(CONFIG_ADC),y) CSRCS += sam_adc.c endif diff --git a/boards/arm/sama5/sama5d4-ek/src/sam_appinit.c b/boards/arm/sama5/sama5d4-ek/src/sam_appinit.c deleted file mode 100644 index 8e031ea458049..0000000000000 --- a/boards/arm/sama5/sama5d4-ek/src/sam_appinit.c +++ /dev/null @@ -1,79 +0,0 @@ -/**************************************************************************** - * boards/arm/sama5/sama5d4-ek/src/sam_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 - -#include - -#include "sama5d4-ek.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 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) -{ -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board initialization */ - - return sam_bringup(); -#else - return OK; -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/arm/samd2l2/arduino-m0/src/CMakeLists.txt b/boards/arm/samd2l2/arduino-m0/src/CMakeLists.txt index 8923933158848..0853eb2172a63 100644 --- a/boards/arm/samd2l2/arduino-m0/src/CMakeLists.txt +++ b/boards/arm/samd2l2/arduino-m0/src/CMakeLists.txt @@ -40,10 +40,6 @@ if(CONFIG_SAMD2L2_ADC) list(APPEND SRCS sam_adc.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS sam_appinit.c) -endif() - if(CONFIG_USBDEV) list(APPEND SRCS sam_usb.c) endif() diff --git a/boards/arm/samd2l2/arduino-m0/src/Makefile b/boards/arm/samd2l2/arduino-m0/src/Makefile index 589a77a2e66e4..353c3f02a21ef 100644 --- a/boards/arm/samd2l2/arduino-m0/src/Makefile +++ b/boards/arm/samd2l2/arduino-m0/src/Makefile @@ -42,10 +42,6 @@ ifeq ($(CONFIG_SAMD2L2_ADC),y) CSRCS += sam_adc.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += sam_appinit.c -endif - ifeq ($(CONFIG_USBDEV),y) CSRCS += sam_usb.c endif diff --git a/boards/arm/samd2l2/arduino-m0/src/sam_appinit.c b/boards/arm/samd2l2/arduino-m0/src/sam_appinit.c deleted file mode 100644 index 0c0b0ad0c5314..0000000000000 --- a/boards/arm/samd2l2/arduino-m0/src/sam_appinit.c +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** - * boards/arm/samd2l2/arduino-m0/src/sam_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 - -#include -#include - -#include - -#include "sam_config.h" -#include "arduino_m0.h" - -/**************************************************************************** - * 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 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) -{ - return OK; -} diff --git a/boards/arm/samd2l2/circuit-express/src/CMakeLists.txt b/boards/arm/samd2l2/circuit-express/src/CMakeLists.txt index 9cb752dde4a0b..4a9ee83e10a7c 100644 --- a/boards/arm/samd2l2/circuit-express/src/CMakeLists.txt +++ b/boards/arm/samd2l2/circuit-express/src/CMakeLists.txt @@ -30,10 +30,6 @@ if(CONFIG_ARCH_BUTTONS) list(APPEND SRCS sam_buttons.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS sam_appinit.c) -endif() - if(CONFIG_USBDEV) list(APPEND SRCS sam_usb.c) endif() diff --git a/boards/arm/samd2l2/circuit-express/src/Makefile b/boards/arm/samd2l2/circuit-express/src/Makefile index 4c90077863379..4358cafdba011 100644 --- a/boards/arm/samd2l2/circuit-express/src/Makefile +++ b/boards/arm/samd2l2/circuit-express/src/Makefile @@ -32,10 +32,6 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += sam_buttons.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += sam_appinit.c -endif - ifeq ($(CONFIG_USBDEV),y) CSRCS += sam_usb.c endif diff --git a/boards/arm/samd2l2/circuit-express/src/sam_appinit.c b/boards/arm/samd2l2/circuit-express/src/sam_appinit.c deleted file mode 100644 index 3ed179cde26dd..0000000000000 --- a/boards/arm/samd2l2/circuit-express/src/sam_appinit.c +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** - * boards/arm/samd2l2/circuit-express/src/sam_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 - -#include -#include - -#include - -#include "sam_config.h" -#include "circuit_express.h" - -/**************************************************************************** - * 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 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) -{ - return OK; -} diff --git a/boards/arm/samd2l2/samd20-xplained/src/CMakeLists.txt b/boards/arm/samd2l2/samd20-xplained/src/CMakeLists.txt index a44b6acffab64..b0b8bf4fd1a99 100644 --- a/boards/arm/samd2l2/samd20-xplained/src/CMakeLists.txt +++ b/boards/arm/samd2l2/samd20-xplained/src/CMakeLists.txt @@ -36,10 +36,6 @@ if(CONFIG_ARCH_BUTTONS) list(APPEND SRCS sam_buttons.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS sam_appinit.c) -endif() - if(CONFIG_SAMD20_XPLAINED_IOMODULE) list(APPEND SRCS sam_mmcsd.c) endif() diff --git a/boards/arm/samd2l2/samd20-xplained/src/Makefile b/boards/arm/samd2l2/samd20-xplained/src/Makefile index 689ba85d40d17..989bc90eb35f8 100644 --- a/boards/arm/samd2l2/samd20-xplained/src/Makefile +++ b/boards/arm/samd2l2/samd20-xplained/src/Makefile @@ -38,10 +38,6 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += sam_buttons.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += sam_appinit.c -endif - ifeq ($(CONFIG_SAMD20_XPLAINED_IOMODULE),y) CSRCS += sam_mmcsd.c endif diff --git a/boards/arm/samd2l2/samd20-xplained/src/sam_appinit.c b/boards/arm/samd2l2/samd20-xplained/src/sam_appinit.c deleted file mode 100644 index a6253c78497b6..0000000000000 --- a/boards/arm/samd2l2/samd20-xplained/src/sam_appinit.c +++ /dev/null @@ -1,125 +0,0 @@ -/**************************************************************************** - * boards/arm/samd2l2/samd20-xplained/src/sam_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 - -#include -#include - -#include - -#include "sam_config.h" -#include "samd20-xplained.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Some configuration checks */ - -#ifdef CONFIG_SAMD20_XPLAINED_IOMODULE_EXT1 -# ifndef SAMD2L2_HAVE_SPI0 -# error I/O1 module on EXT1 requires SERCOM SPI0 -# undef CONFIG_SAMD20_XPLAINED_IOMODULE -# endif -# define SPI_PORTNO 0 -#endif - -#ifdef CONFIG_SAMD20_XPLAINED_IOMODULE_EXT2 -# ifndef SAMD2L2_HAVE_SPI1 -# error I/O1 module on EXT2 requires SERCOM SPI1 -# undef CONFIG_SAMD20_XPLAINED_IOMODULE -# endif -# define SPI_PORTNO 1 -#endif - -#ifdef CONFIG_SAMD20_XPLAINED_IOMODULE -/* Support for the SD card slot on the I/O1 module */ - -/* Verify NSH PORT and SLOT settings */ - -# define SAMD2L2_MMCSDSLOTNO 0 /* There is only one slot */ - -# if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != SAMD2L2_MMCSDSLOTNO -# error Only one MMC/SD slot: Slot 0 (CONFIG_NSH_MMCSDSLOTNO) -# endif - -# if defined(CONFIG_NSH_MMCSDSPIPORTNO) && CONFIG_NSH_MMCSDSPIPORTNO != SPI_PORTNO -# error CONFIG_NSH_MMCSDSPIPORTNO must have the same value as SPI_PORTNO -# endif - -/* Default MMC/SD minor number */ - -# ifndef CONFIG_NSH_MMCSDMINOR -# define CONFIG_NSH_MMCSDMINOR 0 -# endif -#endif - -/**************************************************************************** - * 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 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) -{ -#if defined(SAMD2L2_HAVE_SPI0) && defined(CONFIG_SAMD20_XPLAINED_IOMODULE) - /* Initialize the SPI-based MMC/SD slot */ - - int ret = sam_sdinitialize(SPI_PORTNO, CONFIG_NSH_MMCSDMINOR); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: Failed to initialize MMC/SD slot: %d\n", - ret); - return ret; - } -#endif - - return OK; -} diff --git a/boards/arm/samd2l2/samd20-xplained/src/sam_boot.c b/boards/arm/samd2l2/samd20-xplained/src/sam_boot.c index 9e895df2a61be..0c46f02937d7d 100644 --- a/boards/arm/samd2l2/samd20-xplained/src/sam_boot.c +++ b/boards/arm/samd2l2/samd20-xplained/src/sam_boot.c @@ -28,6 +28,9 @@ #include +#include +#include + #include #include "sam_config.h" @@ -37,6 +40,46 @@ * Pre-processor Definitions ****************************************************************************/ +/* Some configuration checks */ + +#ifdef CONFIG_SAMD20_XPLAINED_IOMODULE_EXT1 +# ifndef SAMD2L2_HAVE_SPI0 +# error I/O1 module on EXT1 requires SERCOM SPI0 +# undef CONFIG_SAMD20_XPLAINED_IOMODULE +# endif +# define SPI_PORTNO 0 +#endif + +#ifdef CONFIG_SAMD20_XPLAINED_IOMODULE_EXT2 +# ifndef SAMD2L2_HAVE_SPI1 +# error I/O1 module on EXT2 requires SERCOM SPI1 +# undef CONFIG_SAMD20_XPLAINED_IOMODULE +# endif +# define SPI_PORTNO 1 +#endif + +#ifdef CONFIG_SAMD20_XPLAINED_IOMODULE +/* Support for the SD card slot on the I/O1 module */ + +/* Verify NSH PORT and SLOT settings */ + +# define SAMD2L2_MMCSDSLOTNO 0 /* There is only one slot */ + +# if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != SAMD2L2_MMCSDSLOTNO +# error Only one MMC/SD slot: Slot 0 (CONFIG_NSH_MMCSDSLOTNO) +# endif + +# if defined(CONFIG_NSH_MMCSDSPIPORTNO) && CONFIG_NSH_MMCSDSPIPORTNO != SPI_PORTNO +# error CONFIG_NSH_MMCSDSPIPORTNO must have the same value as SPI_PORTNO +# endif + +/* Default MMC/SD minor number */ + +# ifndef CONFIG_NSH_MMCSDMINOR +# define CONFIG_NSH_MMCSDMINOR 0 +# endif +#endif + /**************************************************************************** * Private Functions ****************************************************************************/ @@ -76,3 +119,33 @@ void sam_boardinitialize(void) board_autoled_initialize(); #endif } + +/**************************************************************************** + * 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_intitialize() 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ +#if defined(SAMD2L2_HAVE_SPI0) && defined(CONFIG_SAMD20_XPLAINED_IOMODULE) + /* Initialize the SPI-based MMC/SD slot */ + + int ret = sam_sdinitialize(SPI_PORTNO, CONFIG_NSH_MMCSDMINOR); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: Failed to initialize MMC/SD slot: %d\n", + ret); + return; + } +#endif +} +#endif /* CONFIG_BOARD_LATE_INITIALIZE */ diff --git a/boards/arm/samd2l2/samd21-xplained/src/CMakeLists.txt b/boards/arm/samd2l2/samd21-xplained/src/CMakeLists.txt index 9a63d81bbc9a0..b10b38f564a9c 100644 --- a/boards/arm/samd2l2/samd21-xplained/src/CMakeLists.txt +++ b/boards/arm/samd2l2/samd21-xplained/src/CMakeLists.txt @@ -36,10 +36,6 @@ if(CONFIG_ARCH_BUTTONS) list(APPEND SRCS sam_buttons.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS sam_appinit.c) -endif() - if(CONFIG_SAMD21_XPLAINED_IOMODULE) list(APPEND SRCS sam_mmcsd.c) endif() diff --git a/boards/arm/samd2l2/samd21-xplained/src/Makefile b/boards/arm/samd2l2/samd21-xplained/src/Makefile index cb5b4d63f3b31..4a5056cedaa7f 100644 --- a/boards/arm/samd2l2/samd21-xplained/src/Makefile +++ b/boards/arm/samd2l2/samd21-xplained/src/Makefile @@ -38,10 +38,6 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += sam_buttons.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += sam_appinit.c -endif - ifeq ($(CONFIG_SAMD21_XPLAINED_IOMODULE),y) CSRCS += sam_mmcsd.c endif diff --git a/boards/arm/samd2l2/samd21-xplained/src/sam_appinit.c b/boards/arm/samd2l2/samd21-xplained/src/sam_appinit.c deleted file mode 100644 index 48db7a3097ee5..0000000000000 --- a/boards/arm/samd2l2/samd21-xplained/src/sam_appinit.c +++ /dev/null @@ -1,125 +0,0 @@ -/**************************************************************************** - * boards/arm/samd2l2/samd21-xplained/src/sam_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 - -#include -#include - -#include - -#include "sam_config.h" -#include "samd21-xplained.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Some configuration checks */ - -#ifdef CONFIG_SAMD21_XPLAINED_IOMODULE_EXT1 -# ifndef SAMD2L2_HAVE_SPI0 -# error I/O1 module on EXT1 requires SERCOM SPI0 -# undef CONFIG_SAMD21_XPLAINED_IOMODULE -# endif -# define SPI_PORTNO 0 -#endif - -#ifdef CONFIG_SAMD21_XPLAINED_IOMODULE_EXT2 -# ifndef SAMD2L2_HAVE_SPI1 -# error I/O1 module on EXT2 requires SERCOM SPI1 -# undef CONFIG_SAMD21_XPLAINED_IOMODULE -# endif -# define SPI_PORTNO 1 -#endif - -#ifdef CONFIG_SAMD21_XPLAINED_IOMODULE -/* Support for the SD card slot on the I/O1 module */ - -/* Verify NSH PORT and SLOT settings */ - -# define SAMD2L2_MMCSDSLOTNO 0 /* There is only one slot */ - -# if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != SAMD2L2_MMCSDSLOTNO -# error Only one MMC/SD slot: Slot 0 (CONFIG_NSH_MMCSDSLOTNO) -# endif - -# if defined(CONFIG_NSH_MMCSDSPIPORTNO) && CONFIG_NSH_MMCSDSPIPORTNO != SPI_PORTNO -# error CONFIG_NSH_MMCSDSPIPORTNO must have the same value as SPI_PORTNO -# endif - -/* Default MMC/SD minor number */ - -# ifndef CONFIG_NSH_MMCSDMINOR -# define CONFIG_NSH_MMCSDMINOR 0 -# endif -#endif - -/**************************************************************************** - * 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 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) -{ -#if defined(SAMD2L2_HAVE_SPI0) && defined(CONFIG_SAMD21_XPLAINED_IOMODULE) - /* Initialize the SPI-based MMC/SD slot */ - - int ret = sam_sdinitialize(SPI_PORTNO, CONFIG_NSH_MMCSDMINOR); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: Failed to initialize MMC/SD slot: %d\n", - ret); - return ret; - } -#endif - - return OK; -} diff --git a/boards/arm/samd2l2/samd21-xplained/src/sam_boot.c b/boards/arm/samd2l2/samd21-xplained/src/sam_boot.c index 96db7e21c1739..c309ae771c7d3 100644 --- a/boards/arm/samd2l2/samd21-xplained/src/sam_boot.c +++ b/boards/arm/samd2l2/samd21-xplained/src/sam_boot.c @@ -28,6 +28,9 @@ #include +#include +#include + #include #include "sam_config.h" @@ -37,6 +40,46 @@ * Pre-processor Definitions ****************************************************************************/ +/* Some configuration checks */ + +#ifdef CONFIG_SAMD21_XPLAINED_IOMODULE_EXT1 +# ifndef SAMD2L2_HAVE_SPI0 +# error I/O1 module on EXT1 requires SERCOM SPI0 +# undef CONFIG_SAMD21_XPLAINED_IOMODULE +# endif +# define SPI_PORTNO 0 +#endif + +#ifdef CONFIG_SAMD21_XPLAINED_IOMODULE_EXT2 +# ifndef SAMD2L2_HAVE_SPI1 +# error I/O1 module on EXT2 requires SERCOM SPI1 +# undef CONFIG_SAMD21_XPLAINED_IOMODULE +# endif +# define SPI_PORTNO 1 +#endif + +#ifdef CONFIG_SAMD21_XPLAINED_IOMODULE +/* Support for the SD card slot on the I/O1 module */ + +/* Verify NSH PORT and SLOT settings */ + +# define SAMD2L2_MMCSDSLOTNO 0 /* There is only one slot */ + +# if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != SAMD2L2_MMCSDSLOTNO +# error Only one MMC/SD slot: Slot 0 (CONFIG_NSH_MMCSDSLOTNO) +# endif + +# if defined(CONFIG_NSH_MMCSDSPIPORTNO) && CONFIG_NSH_MMCSDSPIPORTNO != SPI_PORTNO +# error CONFIG_NSH_MMCSDSPIPORTNO must have the same value as SPI_PORTNO +# endif + +/* Default MMC/SD minor number */ + +# ifndef CONFIG_NSH_MMCSDMINOR +# define CONFIG_NSH_MMCSDMINOR 0 +# endif +#endif + /**************************************************************************** * Private Functions ****************************************************************************/ @@ -77,3 +120,33 @@ void sam_boardinitialize(void) board_autoled_initialize(); #endif } + +/**************************************************************************** + * 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_intitialize() 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ +#if defined(SAMD2L2_HAVE_SPI0) && defined(CONFIG_SAMD21_XPLAINED_IOMODULE) + /* Initialize the SPI-based MMC/SD slot */ + + int ret = sam_sdinitialize(SPI_PORTNO, CONFIG_NSH_MMCSDMINOR); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: Failed to initialize MMC/SD slot: %d\n", + ret); + return; + } +#endif +} +#endif /* CONFIG_BOARD_LATE_INITIALIZE */ diff --git a/boards/arm/samd2l2/saml21-xplained/src/CMakeLists.txt b/boards/arm/samd2l2/saml21-xplained/src/CMakeLists.txt index 7395e6f3a0337..49fc9ccc2702f 100644 --- a/boards/arm/samd2l2/saml21-xplained/src/CMakeLists.txt +++ b/boards/arm/samd2l2/saml21-xplained/src/CMakeLists.txt @@ -36,10 +36,6 @@ if(CONFIG_ARCH_BUTTONS) list(APPEND SRCS sam_buttons.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS sam_appinit.c) -endif() - if(CONFIG_SAML21_XPLAINED_IOMODULE) list(APPEND SRCS sam_mmcsd.c) endif() diff --git a/boards/arm/samd2l2/saml21-xplained/src/Makefile b/boards/arm/samd2l2/saml21-xplained/src/Makefile index 0ec3b38d432e4..672ca0a11e72c 100644 --- a/boards/arm/samd2l2/saml21-xplained/src/Makefile +++ b/boards/arm/samd2l2/saml21-xplained/src/Makefile @@ -38,10 +38,6 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += sam_buttons.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += sam_appinit.c -endif - ifeq ($(CONFIG_SAML21_XPLAINED_IOMODULE),y) CSRCS += sam_mmcsd.c endif diff --git a/boards/arm/samd2l2/saml21-xplained/src/sam_appinit.c b/boards/arm/samd2l2/saml21-xplained/src/sam_appinit.c deleted file mode 100644 index 9983d79e8ecf0..0000000000000 --- a/boards/arm/samd2l2/saml21-xplained/src/sam_appinit.c +++ /dev/null @@ -1,125 +0,0 @@ -/**************************************************************************** - * boards/arm/samd2l2/saml21-xplained/src/sam_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 - -#include -#include - -#include - -#include "sam_config.h" -#include "saml21-xplained.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Some configuration checks */ - -#ifdef CONFIG_SAML21_XPLAINED_IOMODULE_EXT1 -# ifndef SAMD2L2_HAVE_SPI0 -# error I/O1 module on EXT1 requires SERCOM SPI0 -# undef CONFIG_SAML21_XPLAINED_IOMODULE -# endif -# define SPI_PORTNO 0 -#endif - -#ifdef CONFIG_SAML21_XPLAINED_IOMODULE_EXT2 -# ifndef SAMD2L2_HAVE_SPI1 -# error I/O1 module on EXT2 requires SERCOM SPI1 -# undef CONFIG_SAML21_XPLAINED_IOMODULE -# endif -# define SPI_PORTNO 1 -#endif - -#ifdef CONFIG_SAML21_XPLAINED_IOMODULE -/* Support for the SD card slot on the I/O1 module */ - -/* Verify NSH PORT and SLOT settings */ - -# define SAMD2L2_MMCSDSLOTNO 0 /* There is only one slot */ - -# if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != SAMD2L2_MMCSDSLOTNO -# error Only one MMC/SD slot: Slot 0 (CONFIG_NSH_MMCSDSLOTNO) -# endif - -# if defined(CONFIG_NSH_MMCSDSPIPORTNO) && CONFIG_NSH_MMCSDSPIPORTNO != SPI_PORTNO -# error CONFIG_NSH_MMCSDSPIPORTNO must have the same value as SPI_PORTNO -# endif - -/* Default MMC/SD minor number */ - -# ifndef CONFIG_NSH_MMCSDMINOR -# define CONFIG_NSH_MMCSDMINOR 0 -# endif -#endif - -/**************************************************************************** - * 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 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) -{ -#if defined(SAMD2L2_HAVE_SPI0) && defined(CONFIG_SAML21_XPLAINED_IOMODULE) - /* Initialize the SPI-based MMC/SD slot */ - - int ret = sam_sdinitialize(SPI_PORTNO, CONFIG_NSH_MMCSDMINOR); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: Failed to initialize MMC/SD slot: %d\n", - ret); - return ret; - } -#endif - - return OK; -} diff --git a/boards/arm/samd2l2/saml21-xplained/src/sam_boot.c b/boards/arm/samd2l2/saml21-xplained/src/sam_boot.c index c5578e6bab4b2..35739bcf0dadc 100644 --- a/boards/arm/samd2l2/saml21-xplained/src/sam_boot.c +++ b/boards/arm/samd2l2/saml21-xplained/src/sam_boot.c @@ -28,6 +28,9 @@ #include +#include +#include + #include #include "sam_config.h" @@ -37,6 +40,46 @@ * Pre-processor Definitions ****************************************************************************/ +/* Some configuration checks */ + +#ifdef CONFIG_SAML21_XPLAINED_IOMODULE_EXT1 +# ifndef SAMD2L2_HAVE_SPI0 +# error I/O1 module on EXT1 requires SERCOM SPI0 +# undef CONFIG_SAML21_XPLAINED_IOMODULE +# endif +# define SPI_PORTNO 0 +#endif + +#ifdef CONFIG_SAML21_XPLAINED_IOMODULE_EXT2 +# ifndef SAMD2L2_HAVE_SPI1 +# error I/O1 module on EXT2 requires SERCOM SPI1 +# undef CONFIG_SAML21_XPLAINED_IOMODULE +# endif +# define SPI_PORTNO 1 +#endif + +#ifdef CONFIG_SAML21_XPLAINED_IOMODULE +/* Support for the SD card slot on the I/O1 module */ + +/* Verify NSH PORT and SLOT settings */ + +# define SAMD2L2_MMCSDSLOTNO 0 /* There is only one slot */ + +# if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != SAMD2L2_MMCSDSLOTNO +# error Only one MMC/SD slot: Slot 0 (CONFIG_NSH_MMCSDSLOTNO) +# endif + +# if defined(CONFIG_NSH_MMCSDSPIPORTNO) && CONFIG_NSH_MMCSDSPIPORTNO != SPI_PORTNO +# error CONFIG_NSH_MMCSDSPIPORTNO must have the same value as SPI_PORTNO +# endif + +/* Default MMC/SD minor number */ + +# ifndef CONFIG_NSH_MMCSDMINOR +# define CONFIG_NSH_MMCSDMINOR 0 +# endif +#endif + /**************************************************************************** * Private Functions ****************************************************************************/ @@ -77,3 +120,32 @@ void sam_boardinitialize(void) board_autoled_initialize(); #endif } + +/**************************************************************************** + * 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_intitialize() 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ +#if defined(SAMD2L2_HAVE_SPI0) && defined(CONFIG_SAML21_XPLAINED_IOMODULE) + /* Initialize the SPI-based MMC/SD slot */ + + int ret = sam_sdinitialize(SPI_PORTNO, CONFIG_NSH_MMCSDMINOR); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: Failed to initialize MMC/SD slot: %d\n", + ret); + } +#endif +} +#endif /* CONFIG_BOARD_LATE_INITIALIZE */ diff --git a/boards/arm/samd2l2/xiao-seeeduino/src/CMakeLists.txt b/boards/arm/samd2l2/xiao-seeeduino/src/CMakeLists.txt index 2d255c5acbfd7..41e865ce67596 100644 --- a/boards/arm/samd2l2/xiao-seeeduino/src/CMakeLists.txt +++ b/boards/arm/samd2l2/xiao-seeeduino/src/CMakeLists.txt @@ -26,10 +26,6 @@ if(CONFIG_ARCH_LEDS) list(APPEND SRCS sam_autoleds.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS sam_appinit.c) -endif() - target_sources(board PRIVATE ${SRCS}) set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/flash.ld") diff --git a/boards/arm/samd2l2/xiao-seeeduino/src/Makefile b/boards/arm/samd2l2/xiao-seeeduino/src/Makefile index 846040a6777a0..b7269c5f1c1c7 100644 --- a/boards/arm/samd2l2/xiao-seeeduino/src/Makefile +++ b/boards/arm/samd2l2/xiao-seeeduino/src/Makefile @@ -28,8 +28,4 @@ ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += sam_autoleds.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += sam_appinit.c -endif - include $(TOPDIR)/boards/Board.mk diff --git a/boards/arm/samd2l2/xiao-seeeduino/src/sam_appinit.c b/boards/arm/samd2l2/xiao-seeeduino/src/sam_appinit.c deleted file mode 100644 index d4560785af4c1..0000000000000 --- a/boards/arm/samd2l2/xiao-seeeduino/src/sam_appinit.c +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** - * boards/arm/samd2l2/xiao-seeeduino/src/sam_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 - -#include -#include - -#include - -#include "sam_config.h" -#include "xiao-seeeduino.h" - -/**************************************************************************** - * 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 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) -{ - return OK; -} diff --git a/boards/arm/samd2l2/xiao-seeeduino/src/sam_boot.c b/boards/arm/samd2l2/xiao-seeeduino/src/sam_boot.c index f9d90e579b0a0..00d75745ebb85 100644 --- a/boards/arm/samd2l2/xiao-seeeduino/src/sam_boot.c +++ b/boards/arm/samd2l2/xiao-seeeduino/src/sam_boot.c @@ -64,3 +64,23 @@ void sam_boardinitialize(void) board_autoled_initialize(); #endif } + +/**************************************************************************** + * 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ +} +#endif diff --git a/boards/arm/samd5e5/metro-m4/src/CMakeLists.txt b/boards/arm/samd5e5/metro-m4/src/CMakeLists.txt index a5fbd6fc02a30..142f6d03fe429 100644 --- a/boards/arm/samd5e5/metro-m4/src/CMakeLists.txt +++ b/boards/arm/samd5e5/metro-m4/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS sam_boot.c sam_bringup.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS sam_appinit.c) -endif() - if(CONFIG_ARCH_LEDS) list(APPEND SRCS sam_autoleds.c) else() diff --git a/boards/arm/samd5e5/metro-m4/src/Makefile b/boards/arm/samd5e5/metro-m4/src/Makefile index 3fdbb2738dca0..24c5e9a4c8f79 100644 --- a/boards/arm/samd5e5/metro-m4/src/Makefile +++ b/boards/arm/samd5e5/metro-m4/src/Makefile @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = sam_boot.c sam_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += sam_appinit.c -endif - ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += sam_autoleds.c else diff --git a/boards/arm/samd5e5/metro-m4/src/sam_appinit.c b/boards/arm/samd5e5/metro-m4/src/sam_appinit.c deleted file mode 100644 index a1b33869e14da..0000000000000 --- a/boards/arm/samd5e5/metro-m4/src/sam_appinit.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm/samd5e5/metro-m4/src/sam_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 - -#include -#include - -#include "metro-m4.h" - -/**************************************************************************** - * 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 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 sam_bringup(); -#endif -} diff --git a/boards/arm/samd5e5/same54-xplained-pro/src/CMakeLists.txt b/boards/arm/samd5e5/same54-xplained-pro/src/CMakeLists.txt index 4b45fadadf5bc..52b25265666de 100644 --- a/boards/arm/samd5e5/same54-xplained-pro/src/CMakeLists.txt +++ b/boards/arm/samd5e5/same54-xplained-pro/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS sam_boot.c sam_bringup.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS sam_appinit.c) -endif() - if(CONFIG_ARCH_LEDS) list(APPEND SRCS sam_autoleds.c) else() diff --git a/boards/arm/samd5e5/same54-xplained-pro/src/Makefile b/boards/arm/samd5e5/same54-xplained-pro/src/Makefile index f84d4e763c2ed..d82c6b1d64d7a 100644 --- a/boards/arm/samd5e5/same54-xplained-pro/src/Makefile +++ b/boards/arm/samd5e5/same54-xplained-pro/src/Makefile @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = sam_boot.c sam_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += sam_appinit.c -endif - ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += sam_autoleds.c else diff --git a/boards/arm/samd5e5/same54-xplained-pro/src/sam_appinit.c b/boards/arm/samd5e5/same54-xplained-pro/src/sam_appinit.c deleted file mode 100644 index 01300a0c4cceb..0000000000000 --- a/boards/arm/samd5e5/same54-xplained-pro/src/sam_appinit.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm/samd5e5/same54-xplained-pro/src/sam_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 - -#include -#include - -#include "same54-xplained-pro.h" - -/**************************************************************************** - * 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 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 sam_bringup(); -#endif -} diff --git a/boards/arm/samv7/pic32czca70-curiosity/configs/max/defconfig b/boards/arm/samv7/pic32czca70-curiosity/configs/max/defconfig index 0ac2d1e7a378c..c69bebd2863ab 100644 --- a/boards/arm/samv7/pic32czca70-curiosity/configs/max/defconfig +++ b/boards/arm/samv7/pic32czca70-curiosity/configs/max/defconfig @@ -49,7 +49,6 @@ CONFIG_MTD=y CONFIG_MTD_PARTITION=y CONFIG_MTD_PARTITION_NAMES=y CONFIG_MTD_PROGMEM=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/samv7/pic32czca70-curiosity/configs/nsh/defconfig b/boards/arm/samv7/pic32czca70-curiosity/configs/nsh/defconfig index d6f8858f23041..e2dda7b1e5b8a 100644 --- a/boards/arm/samv7/pic32czca70-curiosity/configs/nsh/defconfig +++ b/boards/arm/samv7/pic32czca70-curiosity/configs/nsh/defconfig @@ -33,7 +33,6 @@ CONFIG_FS_FAT=y CONFIG_FS_PROCFS=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/samv7/pic32czca70-curiosity/src/Make.defs b/boards/arm/samv7/pic32czca70-curiosity/src/Make.defs index 05abb52b1f140..d823ee6b9c141 100644 --- a/boards/arm/samv7/pic32czca70-curiosity/src/Make.defs +++ b/boards/arm/samv7/pic32czca70-curiosity/src/Make.defs @@ -22,12 +22,10 @@ include $(TOPDIR)/Make.defs -CSRCS = sam_boot.c +CSRCS = sam_boot.c sam_bringup.c ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += sam_appinit.c sam_bringup.c -else ifeq ($(CONFIG_BOARD_LATE_INITIALIZE),y) -CSRCS += sam_bringup.c +CSRCS += sam_boardctl.c endif ifeq ($(CONFIG_ARCH_LEDS),y) diff --git a/boards/arm/samv7/pic32czca70-curiosity/src/sam_appinit.c b/boards/arm/samv7/pic32czca70-curiosity/src/sam_boardctl.c similarity index 57% rename from boards/arm/samv7/pic32czca70-curiosity/src/sam_appinit.c rename to boards/arm/samv7/pic32czca70-curiosity/src/sam_boardctl.c index d75e50d732807..589f2b9899f6c 100644 --- a/boards/arm/samv7/pic32czca70-curiosity/src/sam_appinit.c +++ b/boards/arm/samv7/pic32czca70-curiosity/src/sam_boardctl.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/samv7/pic32czca70-curiosity/src/sam_appinit.c + * boards/arm/samv7/pic32czca70-curiosity/src/sam_boardctl.c * * SPDX-License-Identifier: Apache-2.0 * @@ -41,42 +41,6 @@ * 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 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) -{ -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board initialization */ - - return sam_bringup(); -#else - return OK; -#endif -} - #ifdef CONFIG_BOARDCTL_IOCTL int board_ioctl(unsigned int cmd, uintptr_t arg) { diff --git a/boards/arm/samv7/same70-qmtech/configs/mcuboot-loader/defconfig b/boards/arm/samv7/same70-qmtech/configs/mcuboot-loader/defconfig index 5aba06d6d31fb..45910222b1ab6 100644 --- a/boards/arm/samv7/same70-qmtech/configs/mcuboot-loader/defconfig +++ b/boards/arm/samv7/same70-qmtech/configs/mcuboot-loader/defconfig @@ -25,7 +25,6 @@ CONFIG_ARCH_INTERRUPTSTACK=2048 CONFIG_ARCH_STACKDUMP=y CONFIG_ARMV7M_DCACHE=y CONFIG_ARMV7M_ICACHE=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=51262 CONFIG_BOOT_MCUBOOT=y CONFIG_BUILTIN=y @@ -44,7 +43,6 @@ CONFIG_MCUBOOT_BOOTLOADER=y CONFIG_MCUBOOT_ENABLE_LOGGING=y CONFIG_MMCSD_MULTIBLOCK_LIMIT=1 CONFIG_MMCSD_SDIO=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/samv7/same70-qmtech/configs/mcuboot-slot-confirm/defconfig b/boards/arm/samv7/same70-qmtech/configs/mcuboot-slot-confirm/defconfig index 1c017fae4b956..1925083f9509b 100644 --- a/boards/arm/samv7/same70-qmtech/configs/mcuboot-slot-confirm/defconfig +++ b/boards/arm/samv7/same70-qmtech/configs/mcuboot-slot-confirm/defconfig @@ -23,7 +23,6 @@ CONFIG_ARCH_INTERRUPTSTACK=2048 CONFIG_ARCH_STACKDUMP=y CONFIG_ARMV7M_DCACHE=y CONFIG_ARMV7M_ICACHE=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=51262 CONFIG_BUILTIN=y CONFIG_EXAMPLES_MCUBOOT_SLOT_CONFIRM=y @@ -35,7 +34,6 @@ CONFIG_INIT_ENTRYPOINT="mcuboot_confirm_main" CONFIG_LINE_MAX=64 CONFIG_MMCSD_MULTIBLOCK_LIMIT=1 CONFIG_MMCSD_SDIO=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/samv7/same70-qmtech/configs/nsh/defconfig b/boards/arm/samv7/same70-qmtech/configs/nsh/defconfig index b6235edf99229..21138ab3171bf 100644 --- a/boards/arm/samv7/same70-qmtech/configs/nsh/defconfig +++ b/boards/arm/samv7/same70-qmtech/configs/nsh/defconfig @@ -36,7 +36,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=64 CONFIG_MMCSD_MULTIBLOCK_LIMIT=1 CONFIG_MMCSD_SDIO=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/samv7/same70-qmtech/src/Make.defs b/boards/arm/samv7/same70-qmtech/src/Make.defs index 642b01626a6de..01bf7306774a6 100644 --- a/boards/arm/samv7/same70-qmtech/src/Make.defs +++ b/boards/arm/samv7/same70-qmtech/src/Make.defs @@ -22,12 +22,10 @@ include $(TOPDIR)/Make.defs -CSRCS = sam_boot.c +CSRCS = sam_boot.c sam_bringup.c ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += sam_appinit.c sam_bringup.c -else ifeq ($(CONFIG_BOARD_LATE_INITIALIZE),y) -CSRCS += sam_bringup.c +CSRCS += sam_boardctl.c endif ifeq ($(CONFIG_ARCH_LEDS),y) diff --git a/boards/arm/samv7/same70-qmtech/src/sam_appinit.c b/boards/arm/samv7/same70-qmtech/src/sam_boardctl.c similarity index 57% rename from boards/arm/samv7/same70-qmtech/src/sam_appinit.c rename to boards/arm/samv7/same70-qmtech/src/sam_boardctl.c index 4031d5a615c16..d480307bdf3d0 100644 --- a/boards/arm/samv7/same70-qmtech/src/sam_appinit.c +++ b/boards/arm/samv7/same70-qmtech/src/sam_boardctl.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/samv7/same70-qmtech/src/sam_appinit.c + * boards/arm/samv7/same70-qmtech/src/sam_boardctl.c * * SPDX-License-Identifier: Apache-2.0 * @@ -41,42 +41,6 @@ * 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 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) -{ -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board initialization */ - - return sam_bringup(); -#else - return OK; -#endif -} - #ifdef CONFIG_BOARDCTL_IOCTL int board_ioctl(unsigned int cmd, uintptr_t arg) { diff --git a/boards/arm/samv7/same70-xplained/configs/adc/defconfig b/boards/arm/samv7/same70-xplained/configs/adc/defconfig index f96b0c7d32c51..b92c4e1c27280 100644 --- a/boards/arm/samv7/same70-xplained/configs/adc/defconfig +++ b/boards/arm/samv7/same70-xplained/configs/adc/defconfig @@ -53,7 +53,6 @@ CONFIG_MTD=y CONFIG_MTD_AT24XX=y CONFIG_MTD_AT25=y CONFIG_MTD_CONFIG=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/samv7/same70-xplained/configs/can/defconfig b/boards/arm/samv7/same70-xplained/configs/can/defconfig index 0a7a3c3dc7dbc..c4b17906eeb00 100644 --- a/boards/arm/samv7/same70-xplained/configs/can/defconfig +++ b/boards/arm/samv7/same70-xplained/configs/can/defconfig @@ -49,7 +49,6 @@ CONFIG_MTD=y CONFIG_MTD_AT24XX=y CONFIG_MTD_AT25=y CONFIG_MTD_CONFIG=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/samv7/same70-xplained/configs/mcuboot-loader/defconfig b/boards/arm/samv7/same70-xplained/configs/mcuboot-loader/defconfig index afae0b32709cf..22ae3fa296477 100644 --- a/boards/arm/samv7/same70-xplained/configs/mcuboot-loader/defconfig +++ b/boards/arm/samv7/same70-xplained/configs/mcuboot-loader/defconfig @@ -32,7 +32,6 @@ CONFIG_AT24XX_ADDR=0x57 CONFIG_AT24XX_EXTENDED=y CONFIG_AT24XX_EXTSIZE=160 CONFIG_AT24XX_SIZE=2 -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=51262 CONFIG_BOOT_MCUBOOT=y CONFIG_BUILTIN=y @@ -49,7 +48,6 @@ CONFIG_MMCSD_MULTIBLOCK_LIMIT=1 CONFIG_MMCSD_SDIO=y CONFIG_MTD_AT24XX=y CONFIG_MTD_AT25=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_RAM_SIZE=393216 CONFIG_RAM_START=0x20400000 diff --git a/boards/arm/samv7/same70-xplained/configs/mcuboot-slot-confirm/defconfig b/boards/arm/samv7/same70-xplained/configs/mcuboot-slot-confirm/defconfig index 0475ae7e4d437..13349d2e87cc9 100644 --- a/boards/arm/samv7/same70-xplained/configs/mcuboot-slot-confirm/defconfig +++ b/boards/arm/samv7/same70-xplained/configs/mcuboot-slot-confirm/defconfig @@ -32,7 +32,6 @@ CONFIG_AT24XX_ADDR=0x57 CONFIG_AT24XX_EXTENDED=y CONFIG_AT24XX_EXTSIZE=160 CONFIG_AT24XX_SIZE=2 -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=51262 CONFIG_BUILTIN=y CONFIG_EXAMPLES_MCUBOOT_SLOT_CONFIRM=y @@ -47,7 +46,6 @@ CONFIG_MMCSD_MULTIBLOCK_LIMIT=1 CONFIG_MMCSD_SDIO=y CONFIG_MTD_AT24XX=y CONFIG_MTD_AT25=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/samv7/same70-xplained/configs/mrf24j40-starhub/defconfig b/boards/arm/samv7/same70-xplained/configs/mrf24j40-starhub/defconfig index da2bba6826bc4..b2217c49d47a3 100644 --- a/boards/arm/samv7/same70-xplained/configs/mrf24j40-starhub/defconfig +++ b/boards/arm/samv7/same70-xplained/configs/mrf24j40-starhub/defconfig @@ -81,7 +81,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_GET=y CONFIG_NSH_DISABLE_PUT=y diff --git a/boards/arm/samv7/same70-xplained/configs/netnsh/defconfig b/boards/arm/samv7/same70-xplained/configs/netnsh/defconfig index 1da22f3f6f7c3..8d0987d0af09f 100644 --- a/boards/arm/samv7/same70-xplained/configs/netnsh/defconfig +++ b/boards/arm/samv7/same70-xplained/configs/netnsh/defconfig @@ -67,7 +67,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/samv7/same70-xplained/configs/nsh/defconfig b/boards/arm/samv7/same70-xplained/configs/nsh/defconfig index 14fcb81c0da39..050011a92a3b5 100644 --- a/boards/arm/samv7/same70-xplained/configs/nsh/defconfig +++ b/boards/arm/samv7/same70-xplained/configs/nsh/defconfig @@ -49,7 +49,6 @@ CONFIG_MTD=y CONFIG_MTD_AT24XX=y CONFIG_MTD_AT25=y CONFIG_MTD_CONFIG=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/samv7/same70-xplained/configs/pwm/defconfig b/boards/arm/samv7/same70-xplained/configs/pwm/defconfig index 3fb860637f3ac..8f16621e1ba6a 100644 --- a/boards/arm/samv7/same70-xplained/configs/pwm/defconfig +++ b/boards/arm/samv7/same70-xplained/configs/pwm/defconfig @@ -51,7 +51,6 @@ CONFIG_MTD=y CONFIG_MTD_AT24XX=y CONFIG_MTD_AT25=y CONFIG_MTD_CONFIG=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/samv7/same70-xplained/configs/pysim/defconfig b/boards/arm/samv7/same70-xplained/configs/pysim/defconfig index c13ca4804b793..9da1ba1c280b1 100644 --- a/boards/arm/samv7/same70-xplained/configs/pysim/defconfig +++ b/boards/arm/samv7/same70-xplained/configs/pysim/defconfig @@ -90,7 +90,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_FILE_APPS=y diff --git a/boards/arm/samv7/same70-xplained/src/Make.defs b/boards/arm/samv7/same70-xplained/src/Make.defs index fd88fa181bfc9..41aec8068d175 100644 --- a/boards/arm/samv7/same70-xplained/src/Make.defs +++ b/boards/arm/samv7/same70-xplained/src/Make.defs @@ -22,16 +22,14 @@ include $(TOPDIR)/Make.defs -CSRCS = sam_boot.c +CSRCS = sam_boot.c sam_bringup.c ifeq ($(CONFIG_SAMV7_SDRAMC),y) CSRCS += sam_sdram.c endif ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += sam_appinit.c sam_bringup.c -else ifeq ($(CONFIG_BOARD_LATE_INITIALIZE),y) -CSRCS += sam_bringup.c +CSRCS += sam_boardctl.c endif ifeq ($(CONFIG_ARCH_LEDS),y) diff --git a/boards/arm/samv7/same70-xplained/src/sam_appinit.c b/boards/arm/samv7/same70-xplained/src/sam_boardctl.c similarity index 57% rename from boards/arm/samv7/same70-xplained/src/sam_appinit.c rename to boards/arm/samv7/same70-xplained/src/sam_boardctl.c index b9e392bd29719..d1571c84546a9 100644 --- a/boards/arm/samv7/same70-xplained/src/sam_appinit.c +++ b/boards/arm/samv7/same70-xplained/src/sam_boardctl.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/samv7/same70-xplained/src/sam_appinit.c + * boards/arm/samv7/same70-xplained/src/sam_boardctl.c * * SPDX-License-Identifier: Apache-2.0 * @@ -41,42 +41,6 @@ * 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 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) -{ -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board initialization */ - - return sam_bringup(); -#else - return OK; -#endif -} - #ifdef CONFIG_BOARDCTL_IOCTL int board_ioctl(unsigned int cmd, uintptr_t arg) { diff --git a/boards/arm/samv7/samv71-xult/configs/knsh/defconfig b/boards/arm/samv7/samv71-xult/configs/knsh/defconfig index 15ff3cd5414e4..efa73b6c6a0ea 100644 --- a/boards/arm/samv7/samv71-xult/configs/knsh/defconfig +++ b/boards/arm/samv7/samv71-xult/configs/knsh/defconfig @@ -52,7 +52,6 @@ CONFIG_MTD=y CONFIG_MTD_AT24XX=y CONFIG_MTD_AT25=y CONFIG_MTD_CONFIG=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_DISABLE_MKRD=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/samv7/samv71-xult/configs/mcuboot-loader/defconfig b/boards/arm/samv7/samv71-xult/configs/mcuboot-loader/defconfig index e8ef14addad25..d910ef4ab1ac4 100644 --- a/boards/arm/samv7/samv71-xult/configs/mcuboot-loader/defconfig +++ b/boards/arm/samv7/samv71-xult/configs/mcuboot-loader/defconfig @@ -28,7 +28,6 @@ CONFIG_ARCH_STACKDUMP=y CONFIG_ARMV7M_DCACHE=y CONFIG_ARMV7M_ICACHE=y CONFIG_BOARDCTL_RESET=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=51262 CONFIG_BOOT_MCUBOOT=y CONFIG_BUILTIN=y @@ -41,7 +40,6 @@ CONFIG_INIT_ENTRYPOINT="mcuboot_loader_main" CONFIG_LIBM_NONE=y CONFIG_LINE_MAX=64 CONFIG_MCUBOOT_BOOTLOADER=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/samv7/samv71-xult/configs/mcuboot-slot-confirm/defconfig b/boards/arm/samv7/samv71-xult/configs/mcuboot-slot-confirm/defconfig index 25db6f64a1c28..881aa7b12f390 100644 --- a/boards/arm/samv7/samv71-xult/configs/mcuboot-slot-confirm/defconfig +++ b/boards/arm/samv7/samv71-xult/configs/mcuboot-slot-confirm/defconfig @@ -26,14 +26,12 @@ CONFIG_ARCH_STACKDUMP=y CONFIG_ARMV7M_DCACHE=y CONFIG_ARMV7M_ICACHE=y CONFIG_BOARDCTL_RESET=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=51262 CONFIG_BUILTIN=y CONFIG_EXAMPLES_MCUBOOT_SLOT_CONFIRM=y CONFIG_FS_PROCFS=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/samv7/samv71-xult/configs/mcuboot-swap-test/defconfig b/boards/arm/samv7/samv71-xult/configs/mcuboot-swap-test/defconfig index 61793a1fc343e..f386d5289fccb 100644 --- a/boards/arm/samv7/samv71-xult/configs/mcuboot-swap-test/defconfig +++ b/boards/arm/samv7/samv71-xult/configs/mcuboot-swap-test/defconfig @@ -26,14 +26,12 @@ CONFIG_ARCH_STACKDUMP=y CONFIG_ARMV7M_DCACHE=y CONFIG_ARMV7M_ICACHE=y CONFIG_BOARDCTL_RESET=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=51262 CONFIG_BUILTIN=y CONFIG_EXAMPLES_MCUBOOT_SWAP_TEST=y CONFIG_FS_PROCFS=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/samv7/samv71-xult/configs/mcuboot-update-agent/defconfig b/boards/arm/samv7/samv71-xult/configs/mcuboot-update-agent/defconfig index b7656aef21fe0..8f2d5a6dc0a6e 100644 --- a/boards/arm/samv7/samv71-xult/configs/mcuboot-update-agent/defconfig +++ b/boards/arm/samv7/samv71-xult/configs/mcuboot-update-agent/defconfig @@ -73,7 +73,6 @@ CONFIG_NET_TCP=y CONFIG_NET_TCP_KEEPALIVE=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/samv7/samv71-xult/configs/module/defconfig b/boards/arm/samv7/samv71-xult/configs/module/defconfig index 509134bcf6cfd..ff8948265e249 100644 --- a/boards/arm/samv7/samv71-xult/configs/module/defconfig +++ b/boards/arm/samv7/samv71-xult/configs/module/defconfig @@ -39,7 +39,6 @@ CONFIG_HOST_WINDOWS=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=64 CONFIG_MODULE=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/samv7/samv71-xult/configs/mrf24j40-starhub/defconfig b/boards/arm/samv7/samv71-xult/configs/mrf24j40-starhub/defconfig index b47d10dcab41b..f6553ac4c333a 100644 --- a/boards/arm/samv7/samv71-xult/configs/mrf24j40-starhub/defconfig +++ b/boards/arm/samv7/samv71-xult/configs/mrf24j40-starhub/defconfig @@ -85,7 +85,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_GET=y CONFIG_NSH_DISABLE_PUT=y diff --git a/boards/arm/samv7/samv71-xult/configs/mxtxplnd/defconfig b/boards/arm/samv7/samv71-xult/configs/mxtxplnd/defconfig index d47b175756fd3..c8dd737599c37 100644 --- a/boards/arm/samv7/samv71-xult/configs/mxtxplnd/defconfig +++ b/boards/arm/samv7/samv71-xult/configs/mxtxplnd/defconfig @@ -57,7 +57,6 @@ CONFIG_MTD=y CONFIG_MTD_AT24XX=y CONFIG_MTD_AT25=y CONFIG_MTD_CONFIG=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/samv7/samv71-xult/configs/netnsh/defconfig b/boards/arm/samv7/samv71-xult/configs/netnsh/defconfig index f358493c1cc9f..056b8c5df801a 100644 --- a/boards/arm/samv7/samv71-xult/configs/netnsh/defconfig +++ b/boards/arm/samv7/samv71-xult/configs/netnsh/defconfig @@ -66,7 +66,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/samv7/samv71-xult/configs/nsh/defconfig b/boards/arm/samv7/samv71-xult/configs/nsh/defconfig index eb6338d8840c1..075ff35429f0f 100644 --- a/boards/arm/samv7/samv71-xult/configs/nsh/defconfig +++ b/boards/arm/samv7/samv71-xult/configs/nsh/defconfig @@ -50,7 +50,6 @@ CONFIG_MTD=y CONFIG_MTD_AT24XX=y CONFIG_MTD_AT25=y CONFIG_MTD_CONFIG=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/samv7/samv71-xult/configs/nxwm/defconfig b/boards/arm/samv7/samv71-xult/configs/nxwm/defconfig index b866a2ce09dbf..166ac5ee07c11 100644 --- a/boards/arm/samv7/samv71-xult/configs/nxwm/defconfig +++ b/boards/arm/samv7/samv71-xult/configs/nxwm/defconfig @@ -61,7 +61,6 @@ CONFIG_MTD=y CONFIG_MTD_AT24XX=y CONFIG_MTD_AT25=y CONFIG_MTD_CONFIG=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_LIBRARY=y diff --git a/boards/arm/samv7/samv71-xult/configs/oa_tc6/defconfig b/boards/arm/samv7/samv71-xult/configs/oa_tc6/defconfig index b3cbee8b4af1c..13e42b3f5c208 100644 --- a/boards/arm/samv7/samv71-xult/configs/oa_tc6/defconfig +++ b/boards/arm/samv7/samv71-xult/configs/oa_tc6/defconfig @@ -59,7 +59,6 @@ CONFIG_NET_TCP_DELAYED_ACK=y CONFIG_NET_TCP_KEEPALIVE=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/samv7/samv71-xult/configs/vnc/defconfig b/boards/arm/samv7/samv71-xult/configs/vnc/defconfig index 0cf67b74c6aee..ec2063cf278bc 100644 --- a/boards/arm/samv7/samv71-xult/configs/vnc/defconfig +++ b/boards/arm/samv7/samv71-xult/configs/vnc/defconfig @@ -69,7 +69,6 @@ CONFIG_NET_ICMP_SOCKET=y CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_MOTD=y diff --git a/boards/arm/samv7/samv71-xult/configs/vnxwm/defconfig b/boards/arm/samv7/samv71-xult/configs/vnxwm/defconfig index a85607125787d..5f67b317f1913 100644 --- a/boards/arm/samv7/samv71-xult/configs/vnxwm/defconfig +++ b/boards/arm/samv7/samv71-xult/configs/vnxwm/defconfig @@ -72,7 +72,6 @@ CONFIG_NET_ICMP_SOCKET=y CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_LIBRARY=y diff --git a/boards/arm/samv7/samv71-xult/src/Make.defs b/boards/arm/samv7/samv71-xult/src/Make.defs index 0a7984b2f9357..d201ceb5f4567 100644 --- a/boards/arm/samv7/samv71-xult/src/Make.defs +++ b/boards/arm/samv7/samv71-xult/src/Make.defs @@ -22,16 +22,14 @@ include $(TOPDIR)/Make.defs -CSRCS = sam_boot.c +CSRCS = sam_boot.c sam_bringup.c ifeq ($(CONFIG_SAMV7_SDRAMC),y) CSRCS += sam_sdram.c endif ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += sam_appinit.c sam_bringup.c -else ifeq ($(CONFIG_BOARD_LATE_INITIALIZE),y) -CSRCS += sam_bringup.c +CSRCS += sam_boardctl.c endif ifeq ($(CONFIG_ARCH_LEDS),y) diff --git a/boards/arm/samv7/samv71-xult/src/sam_appinit.c b/boards/arm/samv7/samv71-xult/src/sam_boardctl.c similarity index 57% rename from boards/arm/samv7/samv71-xult/src/sam_appinit.c rename to boards/arm/samv7/samv71-xult/src/sam_boardctl.c index 801a8adfe2895..e3d662c731eab 100644 --- a/boards/arm/samv7/samv71-xult/src/sam_appinit.c +++ b/boards/arm/samv7/samv71-xult/src/sam_boardctl.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/samv7/samv71-xult/src/sam_appinit.c + * boards/arm/samv7/samv71-xult/src/sam_boardctl.c * * SPDX-License-Identifier: Apache-2.0 * @@ -41,42 +41,6 @@ * 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 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) -{ -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board initialization */ - - return sam_bringup(); -#else - return OK; -#endif -} - #ifdef CONFIG_BOARDCTL_IOCTL int board_ioctl(unsigned int cmd, uintptr_t arg) { diff --git a/boards/arm/stm32/axoloti/configs/nsh/defconfig b/boards/arm/stm32/axoloti/configs/nsh/defconfig index 95cfae216f6cd..1d43644ebd105 100644 --- a/boards/arm/stm32/axoloti/configs/nsh/defconfig +++ b/boards/arm/stm32/axoloti/configs/nsh/defconfig @@ -24,7 +24,6 @@ CONFIG_INPUT_BUTTONS=y CONFIG_INPUT_BUTTONS_LOWER=y CONFIG_LIBC_FLOATINGPOINT=y CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_RAW_BINARY=y CONFIG_STM32_CCMEXCLUDE=y CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y diff --git a/boards/arm/stm32/axoloti/src/CMakeLists.txt b/boards/arm/stm32/axoloti/src/CMakeLists.txt index bf86fbd0f4c8a..c232216905b87 100644 --- a/boards/arm/stm32/axoloti/src/CMakeLists.txt +++ b/boards/arm/stm32/axoloti/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS stm32_boot.c stm32_bringup.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - if(CONFIG_STM32_FMC) list(APPEND SRCS stm32_extmem.c) endif() diff --git a/boards/arm/stm32/axoloti/src/Make.defs b/boards/arm/stm32/axoloti/src/Make.defs index ea5c39e7625d3..e13a8e8280230 100644 --- a/boards/arm/stm32/axoloti/src/Make.defs +++ b/boards/arm/stm32/axoloti/src/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = stm32_boot.c stm32_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - ifeq ($(CONFIG_STM32_FMC),y) CSRCS += stm32_extmem.c endif diff --git a/boards/arm/stm32/axoloti/src/stm32_appinit.c b/boards/arm/stm32/axoloti/src/stm32_appinit.c deleted file mode 100644 index 46dc37e6a2973..0000000000000 --- a/boards/arm/stm32/axoloti/src/stm32_appinit.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32/axoloti/src/stm32_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 - -#include -#include - -#include "axoloti.h" - -/**************************************************************************** - * 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 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 stm32_bringup(); -#endif -} diff --git a/boards/arm/stm32/b-g431b-esc1/configs/can/defconfig b/boards/arm/stm32/b-g431b-esc1/configs/can/defconfig index fd5e5f817e6cd..422834639e29b 100644 --- a/boards/arm/stm32/b-g431b-esc1/configs/can/defconfig +++ b/boards/arm/stm32/b-g431b-esc1/configs/can/defconfig @@ -31,7 +31,6 @@ CONFIG_EXAMPLES_CAN=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/b-g431b-esc1/configs/cansock/defconfig b/boards/arm/stm32/b-g431b-esc1/configs/cansock/defconfig index c340c31d4da32..5d31263194733 100644 --- a/boards/arm/stm32/b-g431b-esc1/configs/cansock/defconfig +++ b/boards/arm/stm32/b-g431b-esc1/configs/cansock/defconfig @@ -18,7 +18,6 @@ CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32G431C=y CONFIG_ARCH_INTERRUPTSTACK=1024 CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=8499 CONFIG_BOARD_STM32_BG431BESC1_USE_HSE=y CONFIG_BUILTIN=y diff --git a/boards/arm/stm32/b-g431b-esc1/configs/foc_b16/defconfig b/boards/arm/stm32/b-g431b-esc1/configs/foc_b16/defconfig index affc3a0acf65a..ef76a8a7c932b 100644 --- a/boards/arm/stm32/b-g431b-esc1/configs/foc_b16/defconfig +++ b/boards/arm/stm32/b-g431b-esc1/configs/foc_b16/defconfig @@ -21,6 +21,7 @@ CONFIG_ARCH_CHIP_STM32G431C=y CONFIG_ARCH_INTERRUPTSTACK=1024 CONFIG_ARCH_IRQBUTTONS=y CONFIG_ARMV7M_LIBM=y +CONFIG_BOARDCTL=y CONFIG_BOARD_LOOPSPERMSEC=8499 CONFIG_BOARD_STM32_BG431BESC1_FOC_POT=y CONFIG_BOARD_STM32_BG431BESC1_FOC_VBUS=y @@ -55,7 +56,6 @@ CONFIG_MOTOR=y CONFIG_MOTOR_FOC=y CONFIG_MOTOR_FOC_SHUNTS=2 CONFIG_MQ_MAXMSGSIZE=5 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_RAM_SIZE=22528 CONFIG_RAM_START=0x20000000 diff --git a/boards/arm/stm32/b-g431b-esc1/configs/foc_f32/defconfig b/boards/arm/stm32/b-g431b-esc1/configs/foc_f32/defconfig index e51554b431917..5cf5e5d1f5995 100644 --- a/boards/arm/stm32/b-g431b-esc1/configs/foc_f32/defconfig +++ b/boards/arm/stm32/b-g431b-esc1/configs/foc_f32/defconfig @@ -21,6 +21,7 @@ CONFIG_ARCH_CHIP_STM32G431C=y CONFIG_ARCH_INTERRUPTSTACK=1024 CONFIG_ARCH_IRQBUTTONS=y CONFIG_ARMV7M_LIBM=y +CONFIG_BOARDCTL=y CONFIG_BOARD_LOOPSPERMSEC=8499 CONFIG_BOARD_STM32_BG431BESC1_FOC_POT=y CONFIG_BOARD_STM32_BG431BESC1_FOC_VBUS=y @@ -56,7 +57,6 @@ CONFIG_MOTOR=y CONFIG_MOTOR_FOC=y CONFIG_MOTOR_FOC_SHUNTS=2 CONFIG_MQ_MAXMSGSIZE=5 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_RAM_SIZE=22528 CONFIG_RAM_START=0x20000000 diff --git a/boards/arm/stm32/b-g431b-esc1/src/CMakeLists.txt b/boards/arm/stm32/b-g431b-esc1/src/CMakeLists.txt index f50a5838b73ef..76a72b59c7a86 100644 --- a/boards/arm/stm32/b-g431b-esc1/src/CMakeLists.txt +++ b/boards/arm/stm32/b-g431b-esc1/src/CMakeLists.txt @@ -32,10 +32,6 @@ if(CONFIG_ARCH_BUTTONS) list(APPEND SRCS stm32_buttons.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - if(CONFIG_STM32_FOC) list(APPEND SRCS stm32_foc.c) endif() diff --git a/boards/arm/stm32/b-g431b-esc1/src/Make.defs b/boards/arm/stm32/b-g431b-esc1/src/Make.defs index 2347000e544d6..2d49b9a66c91e 100644 --- a/boards/arm/stm32/b-g431b-esc1/src/Make.defs +++ b/boards/arm/stm32/b-g431b-esc1/src/Make.defs @@ -35,10 +35,6 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += stm32_buttons.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - ifeq ($(CONFIG_STM32_FOC),y) CSRCS += stm32_foc.c endif diff --git a/boards/arm/stm32/b-g431b-esc1/src/b-g431b-esc1.h b/boards/arm/stm32/b-g431b-esc1/src/b-g431b-esc1.h index bf580140367ce..40e7863bd06f5 100644 --- a/boards/arm/stm32/b-g431b-esc1/src/b-g431b-esc1.h +++ b/boards/arm/stm32/b-g431b-esc1/src/b-g431b-esc1.h @@ -124,12 +124,7 @@ * Description: * Perform architecture specific initialization * - * CONFIG_BOARDCTL=y: - * If CONFIG_NSH_ARCHINITIALIZE=y: - * Called from the NSH library (or other application) - * Otherwise, assumed to be called from some other application. - * - * Otherwise CONFIG_BOARD_LATE_INITIALIZE=y: + * CONFIG_BOARD_LATE_INITIALIZE=y: * Called from board_late_initialize(). * * Otherwise, bad news: Never called diff --git a/boards/arm/stm32/b-g431b-esc1/src/stm32_appinit.c b/boards/arm/stm32/b-g431b-esc1/src/stm32_appinit.c deleted file mode 100644 index 650cc5753f11b..0000000000000 --- a/boards/arm/stm32/b-g431b-esc1/src/stm32_appinit.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32/b-g431b-esc1/src/stm32_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 - -#include -#include - -#include "b-g431b-esc1.h" - -/**************************************************************************** - * 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 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 stm32_bringup(); -#endif -} diff --git a/boards/arm/stm32/b-g431b-esc1/src/stm32_foc.c b/boards/arm/stm32/b-g431b-esc1/src/stm32_foc.c index 80ddc034ebae4..6b22e655b382b 100644 --- a/boards/arm/stm32/b-g431b-esc1/src/stm32_foc.c +++ b/boards/arm/stm32/b-g431b-esc1/src/stm32_foc.c @@ -653,8 +653,6 @@ static void board_foc_trace(struct foc_dev_s *dev, int type, bool state) * Description: * Initialize FOC driver. * - * This function should be call by board_app_initialize(). - * * Returned Value: * 0 on success, a negated errno value on failure * diff --git a/boards/arm/stm32/b-g474e-dpow1/configs/buckboost/defconfig b/boards/arm/stm32/b-g474e-dpow1/configs/buckboost/defconfig index a05d45e4a2554..596754b12a1c8 100644 --- a/boards/arm/stm32/b-g474e-dpow1/configs/buckboost/defconfig +++ b/boards/arm/stm32/b-g474e-dpow1/configs/buckboost/defconfig @@ -43,7 +43,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBDSP=y CONFIG_LIBM=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=256 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/b-g474e-dpow1/configs/nsh/defconfig b/boards/arm/stm32/b-g474e-dpow1/configs/nsh/defconfig index f21f315c9bbb2..99a320f63f7f7 100644 --- a/boards/arm/stm32/b-g474e-dpow1/configs/nsh/defconfig +++ b/boards/arm/stm32/b-g474e-dpow1/configs/nsh/defconfig @@ -26,7 +26,6 @@ CONFIG_DEBUG_SYMBOLS=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LIBM=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y CONFIG_PRIORITY_INHERITANCE=y diff --git a/boards/arm/stm32/b-g474e-dpow1/configs/ostest/defconfig b/boards/arm/stm32/b-g474e-dpow1/configs/ostest/defconfig index e2559af6cb53a..c540b685a9b70 100644 --- a/boards/arm/stm32/b-g474e-dpow1/configs/ostest/defconfig +++ b/boards/arm/stm32/b-g474e-dpow1/configs/ostest/defconfig @@ -27,7 +27,6 @@ CONFIG_DEBUG_SYMBOLS=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LIBM=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/b-g474e-dpow1/src/CMakeLists.txt b/boards/arm/stm32/b-g474e-dpow1/src/CMakeLists.txt index f979686c1e1db..87e3c2b6ee9b7 100644 --- a/boards/arm/stm32/b-g474e-dpow1/src/CMakeLists.txt +++ b/boards/arm/stm32/b-g474e-dpow1/src/CMakeLists.txt @@ -28,10 +28,6 @@ else() list(APPEND SRCS stm32_userleds.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - if(CONFIG_DRIVERS_SMPS) list(APPEND SRCS stm32_smps.c) endif() diff --git a/boards/arm/stm32/b-g474e-dpow1/src/Make.defs b/boards/arm/stm32/b-g474e-dpow1/src/Make.defs index 66d12c6a7eb65..e91f93fd7a573 100644 --- a/boards/arm/stm32/b-g474e-dpow1/src/Make.defs +++ b/boards/arm/stm32/b-g474e-dpow1/src/Make.defs @@ -31,10 +31,6 @@ else CSRCS += stm32_userleds.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - ifeq ($(CONFIG_DRIVERS_SMPS),y) CSRCS += stm32_smps.c endif diff --git a/boards/arm/stm32/b-g474e-dpow1/src/stm32_appinit.c b/boards/arm/stm32/b-g474e-dpow1/src/stm32_appinit.c deleted file mode 100644 index a23020483b6f3..0000000000000 --- a/boards/arm/stm32/b-g474e-dpow1/src/stm32_appinit.c +++ /dev/null @@ -1,103 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32/b-g474e-dpow1/src/stm32_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 - -#include -#include - -#include -#include - -#include "b-g474e-dpow1.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -#undef HAVE_LEDS - -#if !defined(CONFIG_ARCH_LEDS) && defined(CONFIG_USERLED_LOWER) -# define HAVE_LEDS 1 -#endif - -/**************************************************************************** - * 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) -{ - int ret; - -#if defined(HAVE_LEDS) - /* Register the LED driver */ - - ret = userled_lower_initialize(LED_DRIVER_PATH); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: userled_lower_initialize() failed: %d\n", ret); - return ret; - } -#endif - -#ifdef CONFIG_DRIVERS_SMPS - /* Initialize smps and register the smps driver */ - - ret = stm32_smps_setup(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: stm32_smps_setup failed: %d\n", ret); - } -#endif - - UNUSED(ret); - return OK; -} diff --git a/boards/arm/stm32/b-g474e-dpow1/src/stm32_boot.c b/boards/arm/stm32/b-g474e-dpow1/src/stm32_boot.c index 84d04c8b616e9..f901b448b028d 100644 --- a/boards/arm/stm32/b-g474e-dpow1/src/stm32_boot.c +++ b/boards/arm/stm32/b-g474e-dpow1/src/stm32_boot.c @@ -26,8 +26,12 @@ #include +#include +#include + #include #include +#include #include "b-g474e-dpow1.h" @@ -35,6 +39,12 @@ * Pre-processor Definitions ****************************************************************************/ +#undef HAVE_LEDS + +#if !defined(CONFIG_ARCH_LEDS) && defined(CONFIG_USERLED_LOWER) +# define HAVE_LEDS 1 +#endif + /**************************************************************************** * Private Function Prototypes ****************************************************************************/ @@ -70,3 +80,46 @@ void stm32_boardinitialize(void) board_autoled_initialize(); #endif } + +/**************************************************************************** + * 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ + int ret; + +#if defined(HAVE_LEDS) + /* Register the LED driver */ + + ret = userled_lower_initialize(LED_DRIVER_PATH); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: userled_lower_initialize() failed: %d\n", ret); + return; + } +#endif + +#ifdef CONFIG_DRIVERS_SMPS + /* Initialize smps and register the smps driver */ + + ret = stm32_smps_setup(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: stm32_smps_setup failed: %d\n", ret); + } +#endif + + UNUSED(ret); +} +#endif diff --git a/boards/arm/stm32/b-g474e-dpow1/src/stm32_smps.c b/boards/arm/stm32/b-g474e-dpow1/src/stm32_smps.c index 3b8f492a8958d..9d06a98c8b673 100644 --- a/boards/arm/stm32/b-g474e-dpow1/src/stm32_smps.c +++ b/boards/arm/stm32/b-g474e-dpow1/src/stm32_smps.c @@ -1164,8 +1164,6 @@ static void adc12_handler(void) * Description: * Initialize SMPS driver. * - * This function should be call by board_app_initialize(). - * * Returned Value: * 0 on success, a negated errno value on failure * diff --git a/boards/arm/stm32/clicker2-stm32/configs/knsh/defconfig b/boards/arm/stm32/clicker2-stm32/configs/knsh/defconfig index 03905d24b4c19..b44ea5be1a4b9 100644 --- a/boards/arm/stm32/clicker2-stm32/configs/knsh/defconfig +++ b/boards/arm/stm32/clicker2-stm32/configs/knsh/defconfig @@ -17,7 +17,6 @@ CONFIG_ARCH_IRQBUTTONS=y CONFIG_ARCH_STACKDUMP=y CONFIG_ARM_MPU=y CONFIG_BOARDCTL=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILD_PROTECTED=y CONFIG_FS_PROCFS=y diff --git a/boards/arm/stm32/clicker2-stm32/configs/mrf24j40-6lowpan/defconfig b/boards/arm/stm32/clicker2-stm32/configs/mrf24j40-6lowpan/defconfig index 67ab60d399f57..67b83406eb150 100644 --- a/boards/arm/stm32/clicker2-stm32/configs/mrf24j40-6lowpan/defconfig +++ b/boards/arm/stm32/clicker2-stm32/configs/mrf24j40-6lowpan/defconfig @@ -18,7 +18,6 @@ CONFIG_ARCH_CHIP_STM32F407VG=y CONFIG_ARCH_IRQBUTTONS=y CONFIG_ARCH_STACKDUMP=y CONFIG_BOARDCTL_USBDEVCTRL=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y CONFIG_CDCACM=y @@ -78,7 +77,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_GET=y CONFIG_NSH_DISABLE_PUT=y diff --git a/boards/arm/stm32/clicker2-stm32/configs/mrf24j40-mac/defconfig b/boards/arm/stm32/clicker2-stm32/configs/mrf24j40-mac/defconfig index 7cd334a33a9fa..bb355e1aeb496 100644 --- a/boards/arm/stm32/clicker2-stm32/configs/mrf24j40-mac/defconfig +++ b/boards/arm/stm32/clicker2-stm32/configs/mrf24j40-mac/defconfig @@ -14,7 +14,6 @@ CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F407VG=y CONFIG_ARCH_IRQBUTTONS=y CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y CONFIG_DRIVERS_IEEE802154=y @@ -30,7 +29,6 @@ CONFIG_IEEE802154_MRF24J40=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_GET=y CONFIG_NSH_DISABLE_IFUPDOWN=y diff --git a/boards/arm/stm32/clicker2-stm32/configs/mrf24j40-starhub/defconfig b/boards/arm/stm32/clicker2-stm32/configs/mrf24j40-starhub/defconfig index e1ef142038ba7..1d2e6c692f546 100644 --- a/boards/arm/stm32/clicker2-stm32/configs/mrf24j40-starhub/defconfig +++ b/boards/arm/stm32/clicker2-stm32/configs/mrf24j40-starhub/defconfig @@ -18,7 +18,6 @@ CONFIG_ARCH_CHIP_STM32F407VG=y CONFIG_ARCH_IRQBUTTONS=y CONFIG_ARCH_STACKDUMP=y CONFIG_BOARDCTL_USBDEVCTRL=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y CONFIG_CDCACM=y @@ -63,7 +62,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_GET=y CONFIG_NSH_DISABLE_PUT=y diff --git a/boards/arm/stm32/clicker2-stm32/configs/mrf24j40-starpoint/defconfig b/boards/arm/stm32/clicker2-stm32/configs/mrf24j40-starpoint/defconfig index bcf0a9488d484..d49e01b2da3c0 100644 --- a/boards/arm/stm32/clicker2-stm32/configs/mrf24j40-starpoint/defconfig +++ b/boards/arm/stm32/clicker2-stm32/configs/mrf24j40-starpoint/defconfig @@ -18,7 +18,6 @@ CONFIG_ARCH_CHIP_STM32F407VG=y CONFIG_ARCH_IRQBUTTONS=y CONFIG_ARCH_STACKDUMP=y CONFIG_BOARDCTL_USBDEVCTRL=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y CONFIG_CDCACM=y @@ -80,7 +79,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_GET=y CONFIG_NSH_DISABLE_PUT=y diff --git a/boards/arm/stm32/clicker2-stm32/configs/nsh/defconfig b/boards/arm/stm32/clicker2-stm32/configs/nsh/defconfig index 14aec806d9c4c..8d0945efcca12 100644 --- a/boards/arm/stm32/clicker2-stm32/configs/nsh/defconfig +++ b/boards/arm/stm32/clicker2-stm32/configs/nsh/defconfig @@ -14,7 +14,6 @@ CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F407VG=y CONFIG_ARCH_IRQBUTTONS=y CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y CONFIG_FS_PROCFS=y diff --git a/boards/arm/stm32/clicker2-stm32/configs/usbnsh/defconfig b/boards/arm/stm32/clicker2-stm32/configs/usbnsh/defconfig index d9f59c0230a39..48aee341fff70 100644 --- a/boards/arm/stm32/clicker2-stm32/configs/usbnsh/defconfig +++ b/boards/arm/stm32/clicker2-stm32/configs/usbnsh/defconfig @@ -16,7 +16,6 @@ CONFIG_ARCH_CHIP_STM32F407VG=y CONFIG_ARCH_IRQBUTTONS=y CONFIG_ARCH_STACKDUMP=y CONFIG_BOARDCTL_USBDEVCTRL=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y CONFIG_CDCACM=y @@ -32,7 +31,6 @@ CONFIG_HAVE_CXXINITIALIZE=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_GET=y CONFIG_NSH_DISABLE_IFUPDOWN=y diff --git a/boards/arm/stm32/clicker2-stm32/configs/xbee-6lowpan/defconfig b/boards/arm/stm32/clicker2-stm32/configs/xbee-6lowpan/defconfig index 49f6d164081cd..4f4c219be01c2 100644 --- a/boards/arm/stm32/clicker2-stm32/configs/xbee-6lowpan/defconfig +++ b/boards/arm/stm32/clicker2-stm32/configs/xbee-6lowpan/defconfig @@ -18,7 +18,6 @@ CONFIG_ARCH_CHIP_STM32F407VG=y CONFIG_ARCH_IRQBUTTONS=y CONFIG_ARCH_STACKDUMP=y CONFIG_BOARDCTL_USBDEVCTRL=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y CONFIG_CDCACM=y @@ -74,7 +73,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_GET=y CONFIG_NSH_DISABLE_PUT=y diff --git a/boards/arm/stm32/clicker2-stm32/src/CMakeLists.txt b/boards/arm/stm32/clicker2-stm32/src/CMakeLists.txt index 9c14e3f4e8d32..cb3d46c6c34a6 100644 --- a/boards/arm/stm32/clicker2-stm32/src/CMakeLists.txt +++ b/boards/arm/stm32/clicker2-stm32/src/CMakeLists.txt @@ -36,10 +36,6 @@ if(CONFIG_STM32_OTGFS) list(APPEND SRCS stm32_usb.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - if(CONFIG_IEEE802154_MRF24J40) list(APPEND SRCS stm32_mrf24j40.c) endif() diff --git a/boards/arm/stm32/clicker2-stm32/src/Make.defs b/boards/arm/stm32/clicker2-stm32/src/Make.defs index 0552e97d45f57..6079d7268eae5 100644 --- a/boards/arm/stm32/clicker2-stm32/src/Make.defs +++ b/boards/arm/stm32/clicker2-stm32/src/Make.defs @@ -38,10 +38,6 @@ ifeq ($(CONFIG_STM32_OTGFS),y) CSRCS += stm32_usb.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - ifeq ($(CONFIG_IEEE802154_MRF24J40),y) CSRCS += stm32_mrf24j40.c endif diff --git a/boards/arm/stm32/clicker2-stm32/src/stm32_appinit.c b/boards/arm/stm32/clicker2-stm32/src/stm32_appinit.c deleted file mode 100644 index 5d2f5e624e48f..0000000000000 --- a/boards/arm/stm32/clicker2-stm32/src/stm32_appinit.c +++ /dev/null @@ -1,114 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32/clicker2-stm32/src/stm32_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 - -#include -#include -#include -#include - -#include -#include -#include - -#include "clicker2-stm32.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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. - * - * CONFIG_BOARDCTL=y : - * Called from the NSH library - * - * CONFIG_BOARD_LATE_INITIALIZE=y, CONFIG_NSH_LIBRARY=y, && - * CONFIG_BOARDCTL=n : - * Called from board_late_initialize(). - * - * 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) -{ - int ret; - - /* Did we already initialize via board_late_initialize()? */ - -#ifndef CONFIG_BOARD_LATE_INITIALIZE - ret = stm32_bringup(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: stm32_bringup() failed: %d\n", ret); - return ret; - } -#endif - -#ifdef CONFIG_CLICKER2_STM32_SYSLOG_FILE - - /* Delay some time for the automounter to finish mounting before - * bringing up file syslog. - */ - - nxsched_usleep(CONFIG_CLICKER2_STM32_SYSLOG_FILE_DELAY * 1000); - - syslog_channel_t *channel; - channel = syslog_file_channel(CONFIG_CLICKER2_STM32_SYSLOG_FILE_PATH); - if (channel == NULL) - { - syslog(LOG_ERR, "ERROR: syslog_file_channel() failed\n"); - return -EINVAL; - } -#endif - - UNUSED(ret); - return OK; -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/arm/stm32/clicker2-stm32/src/stm32_boot.c b/boards/arm/stm32/clicker2-stm32/src/stm32_boot.c index de2d8d1f82072..7c6c0bd27c793 100644 --- a/boards/arm/stm32/clicker2-stm32/src/stm32_boot.c +++ b/boards/arm/stm32/clicker2-stm32/src/stm32_boot.c @@ -28,8 +28,15 @@ #include +#include +#include +#include +#include + #include #include +#include +#include #include #include "clicker2-stm32.h" @@ -101,8 +108,32 @@ void stm32_boardinitialize(void) #ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { - /* Perform board-specific initialization here if so configured */ + int ret; + + ret = stm32_bringup(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: stm32_bringup() failed: %d\n", ret); + return; + } + +#ifdef CONFIG_CLICKER2_STM32_SYSLOG_FILE + + /* Delay some time for the automounter to finish mounting before + * bringing up file syslog. + */ + + nxsched_usleep(CONFIG_CLICKER2_STM32_SYSLOG_FILE_DELAY * 1000); + + syslog_channel_t *channel; + channel = syslog_file_channel(CONFIG_CLICKER2_STM32_SYSLOG_FILE_PATH); + if (channel == NULL) + { + syslog(LOG_ERR, "ERROR: syslog_file_channel() failed\n"); + return; + } +#endif - stm32_bringup(); + UNUSED(ret); } #endif diff --git a/boards/arm/stm32/cloudctrl/configs/nsh/defconfig b/boards/arm/stm32/cloudctrl/configs/nsh/defconfig index 95e29f5dff2ab..be4882c81d088 100644 --- a/boards/arm/stm32/cloudctrl/configs/nsh/defconfig +++ b/boards/arm/stm32/cloudctrl/configs/nsh/defconfig @@ -42,7 +42,6 @@ CONFIG_NET_TCP=y CONFIG_NET_TCP_PREALLOC_CONNS=40 CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_MMCSDSPIPORTNO=1 diff --git a/boards/arm/stm32/cloudctrl/src/CMakeLists.txt b/boards/arm/stm32/cloudctrl/src/CMakeLists.txt index c0d9f8dd4e2be..2c62ad02c35df 100644 --- a/boards/arm/stm32/cloudctrl/src/CMakeLists.txt +++ b/boards/arm/stm32/cloudctrl/src/CMakeLists.txt @@ -40,10 +40,6 @@ if(CONFIG_STM32_OTGFS) list(APPEND SRCS stm32_usb.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - if(CONFIG_MTD_W25) list(APPEND SRCS stm32_w25.c) endif() diff --git a/boards/arm/stm32/cloudctrl/src/Make.defs b/boards/arm/stm32/cloudctrl/src/Make.defs index 14617e65f1217..746c1618cf64c 100644 --- a/boards/arm/stm32/cloudctrl/src/Make.defs +++ b/boards/arm/stm32/cloudctrl/src/Make.defs @@ -42,10 +42,6 @@ ifeq ($(CONFIG_STM32_OTGFS),y) CSRCS += stm32_usb.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - ifeq ($(CONFIG_MTD_W25),y) CSRCS += stm32_w25.c endif diff --git a/boards/arm/stm32/cloudctrl/src/stm32_appinit.c b/boards/arm/stm32/cloudctrl/src/stm32_appinit.c deleted file mode 100644 index 82d98ca45a521..0000000000000 --- a/boards/arm/stm32/cloudctrl/src/stm32_appinit.c +++ /dev/null @@ -1,157 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32/cloudctrl/src/stm32_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 - -#include -#include -#include -#include - -#include - -#include "stm32.h" -#include "cloudctrl.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Configuration ************************************************************/ - -/* Assume that we support everything until convinced otherwise */ - -#define HAVE_USBDEV 1 -#define HAVE_USBHOST 1 -#define HAVE_W25 1 - -/* Can't support the W25 device if it SPI1 or W25 support is not enabled */ - -#if !defined(CONFIG_STM32_SPI1) || !defined(CONFIG_MTD_W25) -# undef HAVE_W25 -#endif - -/* Can't support W25 features if mountpoints are disabled */ - -#ifdef CONFIG_DISABLE_MOUNTPOINT -# undef HAVE_W25 -#endif - -/* Default W25 minor number */ - -#if defined(HAVE_W25) && !defined(CONFIG_NSH_W25MINOR) -# define CONFIG_NSH_W25MINOR 0 -#endif - -/* Can't support USB host or device features if USB OTG FS is not enabled */ - -#ifndef CONFIG_STM32_OTGFS -# undef HAVE_USBDEV -# undef HAVE_USBHOST -#endif - -/* Can't support USB device is USB device is not enabled */ - -#ifndef CONFIG_USBDEV -# undef HAVE_USBDEV -#endif - -/* Can't support USB host is USB host is not enabled */ - -#ifndef CONFIG_USBHOST -# undef HAVE_USBHOST -#endif - -/**************************************************************************** - * 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) -{ - int ret; - - /* Initialize and register the W25 FLASH file system. */ - -#ifdef HAVE_W25 - ret = stm32_w25initialize(CONFIG_NSH_W25MINOR); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: Failed to initialize W25 minor %d: %d\n", - CONFIG_NSH_W25MINOR, ret); - return ret; - } -#endif - - /* Initialize USB host operation. stm32_usbhost_initialize() starts a - * thread will monitor for USB connection and disconnection events. - */ - -#ifdef HAVE_USBHOST - ret = stm32_usbhost_initialize(); - if (ret != OK) - { - syslog(LOG_ERR, "ERROR: Failed to initialize USB host: %d\n", ret); - return ret; - } -#endif - -#ifdef CONFIG_ADC - /* Initialize ADC and register the ADC driver. */ - - ret = stm32_adc_setup(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: stm32_adc_setup failed: %d\n", ret); - return ret; - } -#endif - - UNUSED(ret); - return OK; -} diff --git a/boards/arm/stm32/cloudctrl/src/stm32_boot.c b/boards/arm/stm32/cloudctrl/src/stm32_boot.c index b5dddfd0791a1..cd489c2ae3deb 100644 --- a/boards/arm/stm32/cloudctrl/src/stm32_boot.c +++ b/boards/arm/stm32/cloudctrl/src/stm32_boot.c @@ -28,16 +28,67 @@ #include +#include +#include +#include +#include + #include #include #include "arm_internal.h" +#include "stm32.h" #include "cloudctrl.h" /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ +/* Configuration ************************************************************/ + +/* Assume that we support everything until convinced otherwise */ + +#define HAVE_USBDEV 1 +#define HAVE_USBHOST 1 +#define HAVE_W25 1 + +/* Can't support the W25 device if it SPI1 or W25 support is not enabled */ + +#if !defined(CONFIG_STM32_SPI1) || !defined(CONFIG_MTD_W25) +# undef HAVE_W25 +#endif + +/* Can't support W25 features if mountpoints are disabled */ + +#ifdef CONFIG_DISABLE_MOUNTPOINT +# undef HAVE_W25 +#endif + +/* Default W25 minor number */ + +#if defined(HAVE_W25) && !defined(CONFIG_NSH_W25MINOR) +# define CONFIG_NSH_W25MINOR 0 +#endif + +/* Can't support USB host or device features if USB OTG FS is not enabled */ + +#ifndef CONFIG_STM32_OTGFS +# undef HAVE_USBDEV +# undef HAVE_USBHOST +#endif + +/* Can't support USB device is USB device is not enabled */ + +#ifndef CONFIG_USBDEV +# undef HAVE_USBDEV +#endif + +/* Can't support USB host is USB host is not enabled */ + +#ifndef CONFIG_USBHOST +# undef HAVE_USBHOST +#endif + /**************************************************************************** * Private Functions ****************************************************************************/ @@ -88,3 +139,62 @@ void stm32_boardinitialize(void) board_autoled_initialize(); #endif } + +/**************************************************************************** + * 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ + int ret; + + /* Initialize and register the W25 FLASH file system. */ + +#ifdef HAVE_W25 + ret = stm32_w25initialize(CONFIG_NSH_W25MINOR); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: Failed to initialize W25 minor %d: %d\n", + CONFIG_NSH_W25MINOR, ret); + return; + } +#endif + + /* Initialize USB host operation. stm32_usbhost_initialize() starts a + * thread will monitor for USB connection and disconnection events. + */ + +#ifdef HAVE_USBHOST + ret = stm32_usbhost_initialize(); + if (ret != OK) + { + syslog(LOG_ERR, "ERROR: Failed to initialize USB host: %d\n", ret); + return; + } +#endif + +#ifdef CONFIG_ADC + /* Initialize ADC and register the ADC driver. */ + + ret = stm32_adc_setup(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: stm32_adc_setup failed: %d\n", ret); + return; + } +#endif + + UNUSED(ret); +} +#endif diff --git a/boards/arm/stm32/cloudctrl/src/stm32_usbmsc.c b/boards/arm/stm32/cloudctrl/src/stm32_usbmsc.c index 282fc28161fe9..ab372b7c35533 100644 --- a/boards/arm/stm32/cloudctrl/src/stm32_usbmsc.c +++ b/boards/arm/stm32/cloudctrl/src/stm32_usbmsc.c @@ -59,8 +59,7 @@ int board_usbmsc_initialize(int port) { /* If system/usbmsc is built as an NSH command, then SD slot should - * already have been initized in board_app_initialize() - * (see stm32_appinit.c). + * already have been initialized. * In this case, there is nothing further to be done here. */ diff --git a/boards/arm/stm32/emw3162/configs/nsh/defconfig b/boards/arm/stm32/emw3162/configs/nsh/defconfig index 456c762433a84..9688757eaf295 100644 --- a/boards/arm/stm32/emw3162/configs/nsh/defconfig +++ b/boards/arm/stm32/emw3162/configs/nsh/defconfig @@ -23,7 +23,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/emw3162/configs/wlan/defconfig b/boards/arm/stm32/emw3162/configs/wlan/defconfig index 6bc4ebfbd389a..ceeedd6a6b56f 100644 --- a/boards/arm/stm32/emw3162/configs/wlan/defconfig +++ b/boards/arm/stm32/emw3162/configs/wlan/defconfig @@ -50,7 +50,6 @@ CONFIG_NET_ICMP_SOCKET=y CONFIG_NET_PKT=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/emw3162/src/CMakeLists.txt b/boards/arm/stm32/emw3162/src/CMakeLists.txt index f589f7990272e..8c94250123d10 100644 --- a/boards/arm/stm32/emw3162/src/CMakeLists.txt +++ b/boards/arm/stm32/emw3162/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS stm32_boot.c stm32_bringup.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - if(CONFIG_ARCH_LEDS) list(APPEND SRCS stm32_autoleds.c) else() diff --git a/boards/arm/stm32/emw3162/src/Make.defs b/boards/arm/stm32/emw3162/src/Make.defs index 3c90404805662..f397baef02ba8 100644 --- a/boards/arm/stm32/emw3162/src/Make.defs +++ b/boards/arm/stm32/emw3162/src/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = stm32_boot.c stm32_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += stm32_autoleds.c else diff --git a/boards/arm/stm32/emw3162/src/emw3162.h b/boards/arm/stm32/emw3162/src/emw3162.h index 6400db057e7ec..6142ab2310eed 100644 --- a/boards/arm/stm32/emw3162/src/emw3162.h +++ b/boards/arm/stm32/emw3162/src/emw3162.h @@ -75,16 +75,12 @@ * Name: stm32_bringup * * Description: - * Called either by board_initialize() if CONFIG_BOARD_LATE_INITIALIZE or - * by board_app_initialize if CONFIG_BOARDCTL is selected. This - * function initializes and configures all on-board features appropriate - * for the selected configuration. + * This function initializes and configures all on-board features + * appropriate for the selected configuration. * ****************************************************************************/ -#if defined(CONFIG_BOARDCTL) || defined(CONFIG_BOARD_LATE_INITIALIZE) int stm32_bringup(void); -#endif /**************************************************************************** * Name: emw3162_wlan_initialize diff --git a/boards/arm/stm32/emw3162/src/stm32_appinit.c b/boards/arm/stm32/emw3162/src/stm32_appinit.c deleted file mode 100644 index 9609c639803c3..0000000000000 --- a/boards/arm/stm32/emw3162/src/stm32_appinit.c +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32/emw3162/src/stm32_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 - -#include - -#include - -#include "emw3162.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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 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) -{ -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board initialization */ - - return stm32_bringup(); -#else - return OK; -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/arm/stm32/emw3162/src/stm32_bringup.c b/boards/arm/stm32/emw3162/src/stm32_bringup.c index 4fcbdfed26e83..0ffd40553fca8 100644 --- a/boards/arm/stm32/emw3162/src/stm32_bringup.c +++ b/boards/arm/stm32/emw3162/src/stm32_bringup.c @@ -45,8 +45,6 @@ * Name: stm32_bringup * * Description: - * Called either by board_initialize() if CONFIG_BOARD_LATE_INITIALIZE or - * by board_app_initialize if CONFIG_BOARDCTL is selected. * This function initializes and configures all on-board features * appropriate for the selected configuration. * diff --git a/boards/arm/stm32/et-stm32-stamp/src/CMakeLists.txt b/boards/arm/stm32/et-stm32-stamp/src/CMakeLists.txt index 4e33c6c91c836..3aa3d6093c62e 100644 --- a/boards/arm/stm32/et-stm32-stamp/src/CMakeLists.txt +++ b/boards/arm/stm32/et-stm32-stamp/src/CMakeLists.txt @@ -22,22 +22,6 @@ set(SRCS stm32_boot.c) -if(CONFIG_BOARDCTL) - -endif() - -if(CONFIG_INPUT) - -endif() - -if(CONFIG_USBMSC) - -endif() - -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - target_sources(board PRIVATE ${SRCS}) set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/ld.script") diff --git a/boards/arm/stm32/et-stm32-stamp/src/Make.defs b/boards/arm/stm32/et-stm32-stamp/src/Make.defs index ae14d9ec8907e..009c8104955d9 100644 --- a/boards/arm/stm32/et-stm32-stamp/src/Make.defs +++ b/boards/arm/stm32/et-stm32-stamp/src/Make.defs @@ -24,19 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = stm32_boot.c -ifeq ($(CONFIG_BOARDCTL),y) -endif - -ifeq ($(CONFIG_INPUT),y) -endif - -ifeq ($(CONFIG_USBMSC),y) -endif - -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - DEPPATH += --dep-path board VPATH += :board CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board diff --git a/boards/arm/stm32/et-stm32-stamp/src/stm32_appinit.c b/boards/arm/stm32/et-stm32-stamp/src/stm32_appinit.c deleted file mode 100644 index 2957d9615445e..0000000000000 --- a/boards/arm/stm32/et-stm32-stamp/src/stm32_appinit.c +++ /dev/null @@ -1,65 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32/et-stm32-stamp/src/stm32_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 - -#include - -#include - -#include "et-stm32-stamp.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) -{ - return OK; -} diff --git a/boards/arm/stm32/et-stm32-stamp/src/stm32_boot.c b/boards/arm/stm32/et-stm32-stamp/src/stm32_boot.c index 557a8f0ddded8..b56fe99ba7168 100644 --- a/boards/arm/stm32/et-stm32-stamp/src/stm32_boot.c +++ b/boards/arm/stm32/et-stm32-stamp/src/stm32_boot.c @@ -61,3 +61,23 @@ void stm32_boardinitialize(void) { /* Empty for now. */ } + +/**************************************************************************** + * 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ +} +#endif diff --git a/boards/arm/stm32/fire-stm32v2/configs/nsh/defconfig b/boards/arm/stm32/fire-stm32v2/configs/nsh/defconfig index 2338bcd179789..334352f98536b 100644 --- a/boards/arm/stm32/fire-stm32v2/configs/nsh/defconfig +++ b/boards/arm/stm32/fire-stm32v2/configs/nsh/defconfig @@ -49,7 +49,6 @@ CONFIG_NET_TCP=y CONFIG_NET_TCP_PREALLOC_CONNS=16 CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/fire-stm32v2/src/CMakeLists.txt b/boards/arm/stm32/fire-stm32v2/src/CMakeLists.txt index 3c81948903958..8d9a77eabc3ec 100644 --- a/boards/arm/stm32/fire-stm32v2/src/CMakeLists.txt +++ b/boards/arm/stm32/fire-stm32v2/src/CMakeLists.txt @@ -36,10 +36,6 @@ if(CONFIG_ARCH_BUTTONS) list(APPEND SRCS stm32_buttons.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - if(CONFIG_ENC28J60) list(APPEND SRCS stm32_enc28j60.c) endif() diff --git a/boards/arm/stm32/fire-stm32v2/src/Make.defs b/boards/arm/stm32/fire-stm32v2/src/Make.defs index 6dca9019802eb..fdfe1aaa4b39a 100644 --- a/boards/arm/stm32/fire-stm32v2/src/Make.defs +++ b/boards/arm/stm32/fire-stm32v2/src/Make.defs @@ -38,10 +38,6 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += stm32_buttons.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - ifeq ($(CONFIG_ENC28J60),y) CSRCS += stm32_enc28j60.c endif diff --git a/boards/arm/stm32/fire-stm32v2/src/stm32_appinit.c b/boards/arm/stm32/fire-stm32v2/src/stm32_appinit.c deleted file mode 100644 index de7e0a22052b2..0000000000000 --- a/boards/arm/stm32/fire-stm32v2/src/stm32_appinit.c +++ /dev/null @@ -1,240 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32/fire-stm32v2/src/stm32_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 - -#include -#include -#include -#include - -#include -#include - -#include "stm32.h" -#include "stm32_i2c.h" -#include "fire-stm32v2.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Configuration ************************************************************/ - -/* Assume that we support everything until convinced otherwise */ - -#define HAVE_MMCSD 1 -#define HAVE_USBDEV 1 -#define HAVE_W25 1 - -/* Configuration ************************************************************/ - -/* SPI1 connects to the SD CARD (and to the SPI FLASH) */ - -#define STM32_MMCSDSPIPORTNO 1 /* SPI1 */ -#define STM32_MMCSDSLOTNO 0 /* Only one slot */ - -/* Can't support MMC/SD features if the SDIO peripheral is disabled */ - -#ifndef CONFIG_STM32_SDIO -# undef HAVE_MMCSD -#endif - -/* Can't support MMC/SD features if mountpoints are disabled */ - -#ifdef CONFIG_DISABLE_MOUNTPOINT -# undef HAVE_MMCSD -#endif - -/* Default MMC/SD minor number */ - -#ifdef HAVE_MMCSD -# ifndef CONFIG_NSH_MMCSDMINOR -# define CONFIG_NSH_MMCSDMINOR 0 -# endif - -/* Default MMC/SD SLOT number */ - -# if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != STM32_MMCSDSLOTNO -# error "Only one MMC/SD slot: Slot 0" -# undef CONFIG_NSH_MMCSDSLOTNO -# define CONFIG_NSH_MMCSDSLOTNO STM32_MMCSDSLOTNO -# endif - -# ifndef CONFIG_NSH_MMCSDSLOTNO -# define CONFIG_NSH_MMCSDSLOTNO STM32_MMCSDSLOTNO -# endif -#endif - -/* Can't support the W25 device if it SPI1 or W25 support is not enabled */ - -#if !defined(CONFIG_STM32_SPI1) || !defined(CONFIG_MTD_W25) -# undef HAVE_W25 -#endif - -/* Can't support W25 features if mountpoints are disabled */ - -#if defined(CONFIG_DISABLE_MOUNTPOINT) -# undef HAVE_W25 -#endif - -/* Default W25 minor number */ - -#if defined(HAVE_W25) && !defined(CONFIG_NSH_W25MINOR) -# define CONFIG_NSH_W25MINOR 0 -#endif - -/* Can't support USB host or device features if the USB peripheral or the USB - * device infrastructure is not enabled - */ - -#if !defined(CONFIG_STM32_USB) || !defined(CONFIG_USBDEV) -# undef HAVE_USBDEV -#endif - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: stm32_i2c_register - * - * Description: - * Register one I2C drivers for the I2C tool. - * - ****************************************************************************/ - -#ifdef HAVE_I2CTOOL -static void stm32_i2c_register(int bus) -{ - struct i2c_master_s *i2c; - int ret; - - i2c = stm32_i2cbus_initialize(bus); - if (i2c == NULL) - { - _err("ERROR: Failed to get I2C%d interface\n", bus); - } - else - { - ret = i2c_register(i2c, bus); - if (ret < 0) - { - _err("ERROR: Failed to register I2C%d driver: %d\n", bus, ret); - stm32_i2cbus_uninitialize(i2c); - } - } -} -#endif - -/**************************************************************************** - * Name: stm32_i2ctool - * - * Description: - * Register I2C drivers for the I2C tool. - * - ****************************************************************************/ - -#ifdef HAVE_I2CTOOL -static void stm32_i2ctool(void) -{ -#ifdef CONFIG_STM32_I2C1 - stm32_i2c_register(1); -#endif -#ifdef CONFIG_STM32_I2C2 - stm32_i2c_register(2); -#endif -#ifdef CONFIG_STM32_I2C3 - stm32_i2c_register(3); -#endif -} -#else -# define stm32_i2ctool() -#endif - -/**************************************************************************** - * 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) -{ -#if defined(HAVE_MMCSD) || defined(HAVE_W25) - int ret; -#endif - - /* Register I2C drivers on behalf of the I2C tool */ - - stm32_i2ctool(); - -#ifdef HAVE_W25 - /* Initialize and register the W25 FLASH file system. */ - - ret = stm32_w25initialize(CONFIG_NSH_W25MINOR); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: Failed to initialize W25 minor %d: %d\n", - CONFIG_NSH_W25MINOR, ret); - return ret; - } -#endif - -#ifdef HAVE_MMCSD - /* Initialize the SDIO-based MMC/SD slot */ - - ret = stm32_sdinitialize(CONFIG_NSH_MMCSDMINOR); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: Failed to initialize MMC/SD slot %d: %d\n", - CONFIG_NSH_MMCSDSLOTNO, ret); - return ret; - } -#endif - - return OK; -} diff --git a/boards/arm/stm32/fire-stm32v2/src/stm32_boot.c b/boards/arm/stm32/fire-stm32v2/src/stm32_boot.c index 1502c1cfe3d1e..9ee669b3fbc53 100644 --- a/boards/arm/stm32/fire-stm32v2/src/stm32_boot.c +++ b/boards/arm/stm32/fire-stm32v2/src/stm32_boot.c @@ -28,9 +28,16 @@ #include +#include +#include +#include + #include +#include #include +#include "stm32.h" +#include "stm32_i2c.h" #include "arm_internal.h" #include "fire-stm32v2.h" @@ -38,10 +45,139 @@ * Pre-processor Definitions ****************************************************************************/ +/* Configuration ************************************************************/ + +/* Assume that we support everything until convinced otherwise */ + +#define HAVE_MMCSD 1 +#define HAVE_USBDEV 1 +#define HAVE_W25 1 + +/* Configuration ************************************************************/ + +/* SPI1 connects to the SD CARD (and to the SPI FLASH) */ + +#define STM32_MMCSDSPIPORTNO 1 /* SPI1 */ +#define STM32_MMCSDSLOTNO 0 /* Only one slot */ + +/* Can't support MMC/SD features if the SDIO peripheral is disabled */ + +#ifndef CONFIG_STM32_SDIO +# undef HAVE_MMCSD +#endif + +/* Can't support MMC/SD features if mountpoints are disabled */ + +#ifdef CONFIG_DISABLE_MOUNTPOINT +# undef HAVE_MMCSD +#endif + +/* Default MMC/SD minor number */ + +#ifdef HAVE_MMCSD +# ifndef CONFIG_NSH_MMCSDMINOR +# define CONFIG_NSH_MMCSDMINOR 0 +# endif + +/* Default MMC/SD SLOT number */ + +# if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != STM32_MMCSDSLOTNO +# error "Only one MMC/SD slot: Slot 0" +# undef CONFIG_NSH_MMCSDSLOTNO +# define CONFIG_NSH_MMCSDSLOTNO STM32_MMCSDSLOTNO +# endif + +# ifndef CONFIG_NSH_MMCSDSLOTNO +# define CONFIG_NSH_MMCSDSLOTNO STM32_MMCSDSLOTNO +# endif +#endif + +/* Can't support the W25 device if it SPI1 or W25 support is not enabled */ + +#if !defined(CONFIG_STM32_SPI1) || !defined(CONFIG_MTD_W25) +# undef HAVE_W25 +#endif + +/* Can't support W25 features if mountpoints are disabled */ + +#if defined(CONFIG_DISABLE_MOUNTPOINT) +# undef HAVE_W25 +#endif + +/* Default W25 minor number */ + +#if defined(HAVE_W25) && !defined(CONFIG_NSH_W25MINOR) +# define CONFIG_NSH_W25MINOR 0 +#endif + +/* Can't support USB host or device features if the USB peripheral or the USB + * device infrastructure is not enabled + */ + +#if !defined(CONFIG_STM32_USB) || !defined(CONFIG_USBDEV) +# undef HAVE_USBDEV +#endif + /**************************************************************************** * Private Functions ****************************************************************************/ +/**************************************************************************** + * Name: stm32_i2c_register + * + * Description: + * Register one I2C drivers for the I2C tool. + * + ****************************************************************************/ + +#ifdef HAVE_I2CTOOL +static void stm32_i2c_register(int bus) +{ + struct i2c_master_s *i2c; + int ret; + + i2c = stm32_i2cbus_initialize(bus); + if (i2c == NULL) + { + _err("ERROR: Failed to get I2C%d interface\n", bus); + } + else + { + ret = i2c_register(i2c, bus); + if (ret < 0) + { + _err("ERROR: Failed to register I2C%d driver: %d\n", bus, ret); + stm32_i2cbus_uninitialize(i2c); + } + } +} +#endif + +/**************************************************************************** + * Name: stm32_i2ctool + * + * Description: + * Register I2C drivers for the I2C tool. + * + ****************************************************************************/ + +#ifdef HAVE_I2CTOOL +static void stm32_i2ctool(void) +{ +#ifdef CONFIG_STM32_I2C1 + stm32_i2c_register(1); +#endif +#ifdef CONFIG_STM32_I2C2 + stm32_i2c_register(2); +#endif +#ifdef CONFIG_STM32_I2C3 + stm32_i2c_register(3); +#endif +} +#else +# define stm32_i2ctool() +#endif + /**************************************************************************** * Public Functions ****************************************************************************/ @@ -88,3 +224,54 @@ void stm32_boardinitialize(void) board_autoled_initialize(); #endif } + +/**************************************************************************** + * 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ +#if defined(HAVE_MMCSD) || defined(HAVE_W25) + int ret; +#endif + + /* Register I2C drivers on behalf of the I2C tool */ + + stm32_i2ctool(); + +#ifdef HAVE_W25 + /* Initialize and register the W25 FLASH file system. */ + + ret = stm32_w25initialize(CONFIG_NSH_W25MINOR); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: Failed to initialize W25 minor %d: %d\n", + CONFIG_NSH_W25MINOR, ret); + return; + } +#endif + +#ifdef HAVE_MMCSD + /* Initialize the SDIO-based MMC/SD slot */ + + ret = stm32_sdinitialize(CONFIG_NSH_MMCSDMINOR); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: Failed to initialize MMC/SD slot %d: %d\n", + CONFIG_NSH_MMCSDSLOTNO, ret); + return; + } +#endif +} +#endif diff --git a/boards/arm/stm32/fire-stm32v2/src/stm32_usbmsc.c b/boards/arm/stm32/fire-stm32v2/src/stm32_usbmsc.c index b5b8f4471e088..dd87c605e78da 100644 --- a/boards/arm/stm32/fire-stm32v2/src/stm32_usbmsc.c +++ b/boards/arm/stm32/fire-stm32v2/src/stm32_usbmsc.c @@ -59,8 +59,7 @@ int board_usbmsc_initialize(int port) { /* If system/usbmsc is built as an NSH command, then SD slot should - * already have been initialized in board_app_initialize() - * (see stm32_appinit.c). + * already have been initialized. * In this case, there is nothing further to be done here. */ diff --git a/boards/arm/stm32/hymini-stm32v/configs/nsh/defconfig b/boards/arm/stm32/hymini-stm32v/configs/nsh/defconfig index 00c1bafcb693f..46a47095c31e1 100644 --- a/boards/arm/stm32/hymini-stm32v/configs/nsh/defconfig +++ b/boards/arm/stm32/hymini-stm32v/configs/nsh/defconfig @@ -23,7 +23,6 @@ CONFIG_FS_FAT=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_MMCSD=y CONFIG_MMCSD_SDIO=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 CONFIG_RAM_SIZE=49152 diff --git a/boards/arm/stm32/hymini-stm32v/configs/nsh2/defconfig b/boards/arm/stm32/hymini-stm32v/configs/nsh2/defconfig index ecdb6ef01ffda..07770b9836be2 100644 --- a/boards/arm/stm32/hymini-stm32v/configs/nsh2/defconfig +++ b/boards/arm/stm32/hymini-stm32v/configs/nsh2/defconfig @@ -45,7 +45,6 @@ CONFIG_LCD_SSD1289=y CONFIG_MMCSD=y CONFIG_MMCSD_SDIO=y CONFIG_MQ_MAXMSGSIZE=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_NX=y diff --git a/boards/arm/stm32/hymini-stm32v/src/CMakeLists.txt b/boards/arm/stm32/hymini-stm32v/src/CMakeLists.txt index 548a99a4ed9d4..e31d5a0ca4c72 100644 --- a/boards/arm/stm32/hymini-stm32v/src/CMakeLists.txt +++ b/boards/arm/stm32/hymini-stm32v/src/CMakeLists.txt @@ -30,10 +30,6 @@ else() endif() endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - if(CONFIG_INPUT) list(APPEND SRCS stm32_ts.c) endif() diff --git a/boards/arm/stm32/hymini-stm32v/src/Make.defs b/boards/arm/stm32/hymini-stm32v/src/Make.defs index 7bbf03e3b2850..d96eeceb4ada9 100644 --- a/boards/arm/stm32/hymini-stm32v/src/Make.defs +++ b/boards/arm/stm32/hymini-stm32v/src/Make.defs @@ -32,10 +32,6 @@ CSRCS += stm32_r61505u.c endif endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - ifeq ($(CONFIG_INPUT),y) CSRCS += stm32_ts.c endif diff --git a/boards/arm/stm32/hymini-stm32v/src/stm32_appinit.c b/boards/arm/stm32/hymini-stm32v/src/stm32_appinit.c deleted file mode 100644 index f0de5f9e85734..0000000000000 --- a/boards/arm/stm32/hymini-stm32v/src/stm32_appinit.c +++ /dev/null @@ -1,222 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32/hymini-stm32v/src/stm32_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 - -#include -#include -#include -#include - -#include - -#ifdef CONFIG_STM32_SPI1 -# include -# include -#endif - -#ifdef CONFIG_STM32_SDIO -# include -# include -#endif - -#include "stm32.h" -#include "hymini-stm32v.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Configuration ************************************************************/ - -/* For now, don't build in any SPI1 support -- NSH is not using it */ - -#undef CONFIG_STM32_SPI1 - -/* Check if we can have USB device in NSH */ - -#define NSH_HAVEUSBDEV 1 - -/* Can't support USB features if USB is not enabled */ - -#ifndef CONFIG_USBDEV -# undef NSH_HAVEUSBDEV -#endif - -/* Check if we can have MMC/SD slot support in NSH */ - -#define NSH_HAVEMMCSD 1 - -/* Can't support MMC/SD features if mountpoints are disabled or if SDIO - * support is not enabled. - */ - -#if defined(CONFIG_DISABLE_MOUNTPOINT) || !defined(CONFIG_STM32_SDIO) -# undef NSH_HAVEMMCSD -#endif - -#ifdef NSH_HAVEMMCSD -# ifndef CONFIG_NSH_MMCSDMINOR -# define CONFIG_NSH_MMCSDMINOR 0 -# endif -# if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != 0 -# error "Only one MMC/SD slot" -# undef CONFIG_NSH_MMCSDSLOTNO -# endif -# ifndef CONFIG_NSH_MMCSDSLOTNO -# define CONFIG_NSH_MMCSDSLOTNO 0 -# endif -#endif - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -#ifdef CONFIG_MMCSD -static struct sdio_dev_s *g_sdiodev; -static bool g_sd_inserted; -#endif - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: nsh_cdinterrupt - * - * Description: - * Card detect interrupt handler. - * - ****************************************************************************/ - -#ifdef NSH_HAVEMMCSD -static int nsh_cdinterrupt(int irq, void *context, void *arg) -{ - bool present; - - present = !stm32_gpioread(GPIO_SD_CD); - if (present != g_sd_inserted) - { - sdio_mediachange(g_sdiodev, present); - g_sd_inserted = present; - } - - return OK; -} -#endif - -/**************************************************************************** - * 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) -{ - int ret; - -#ifdef NSH_HAVEMMCSD - /* Configure the card detect GPIO */ - - stm32_configgpio(GPIO_SD_CD); - - /* Register an interrupt handler for the card detect pin */ - - stm32_gpiosetevent(GPIO_SD_CD, true, true, true, nsh_cdinterrupt, NULL); - - /* Mount the SDIO-based MMC/SD block driver */ - - /* First, get an instance of the SDIO interface */ - - syslog(LOG_INFO, "Initializing SDIO slot %d\n", - CONFIG_NSH_MMCSDSLOTNO); - - g_sdiodev = sdio_initialize(CONFIG_NSH_MMCSDSLOTNO); - if (!g_sdiodev) - { - syslog(LOG_ERR, "ERROR: Failed to initialize SDIO slot %d\n", - CONFIG_NSH_MMCSDSLOTNO); - return -ENODEV; - } - - /* Now bind the SDIO interface to the MMC/SD driver */ - - syslog(LOG_INFO, "Bind SDIO to the MMC/SD driver, minor=%d\n", - CONFIG_NSH_MMCSDMINOR); - - ret = mmcsd_slotinitialize(CONFIG_NSH_MMCSDMINOR, g_sdiodev); - if (ret != OK) - { - syslog(LOG_ERR, - "ERROR: Failed to bind SDIO to the MMC/SD driver: %d\n", - ret); - return ret; - } - - syslog(LOG_INFO, "Successfully bound SDIO to the MMC/SD driver\n"); - - /* Use SD card detect pin to check if a card is inserted */ - - g_sd_inserted = !stm32_gpioread(GPIO_SD_CD); - _info("Card detect : %hhu\n", g_sd_inserted); - - sdio_mediachange(g_sdiodev, g_sd_inserted); -#endif - -#ifdef CONFIG_INPUT - /* Initialize the touchscreen */ - - ret = stm32_tsc_setup(0); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: stm32_tsc_setup failed: %d\n", ret); - } -#endif - - UNUSED(ret); - return OK; -} diff --git a/boards/arm/stm32/hymini-stm32v/src/stm32_boot.c b/boards/arm/stm32/hymini-stm32v/src/stm32_boot.c index dcb4a17287c7c..755f41cf03999 100644 --- a/boards/arm/stm32/hymini-stm32v/src/stm32_boot.c +++ b/boards/arm/stm32/hymini-stm32v/src/stm32_boot.c @@ -26,15 +26,113 @@ #include #include + #include +#include +#include +#include + #include +#ifdef CONFIG_STM32_SPI1 +# include +# include +#endif + +#ifdef CONFIG_STM32_SDIO +# include +# include +#endif + #include "arm_internal.h" +#include "stm32.h" #include "hymini-stm32v.h" #include /* Should always be included last due to dependencies */ +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/* Configuration ************************************************************/ + +/* For now, don't build in any SPI1 support -- NSH is not using it */ + +#undef CONFIG_STM32_SPI1 + +/* Check if we can have USB device in NSH */ + +#define NSH_HAVEUSBDEV 1 + +/* Can't support USB features if USB is not enabled */ + +#ifndef CONFIG_USBDEV +# undef NSH_HAVEUSBDEV +#endif + +/* Check if we can have MMC/SD slot support in NSH */ + +#define NSH_HAVEMMCSD 1 + +/* Can't support MMC/SD features if mountpoints are disabled or if SDIO + * support is not enabled. + */ + +#if defined(CONFIG_DISABLE_MOUNTPOINT) || !defined(CONFIG_STM32_SDIO) +# undef NSH_HAVEMMCSD +#endif + +#ifdef NSH_HAVEMMCSD +# ifndef CONFIG_NSH_MMCSDMINOR +# define CONFIG_NSH_MMCSDMINOR 0 +# endif +# if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != 0 +# error "Only one MMC/SD slot" +# undef CONFIG_NSH_MMCSDSLOTNO +# endif +# ifndef CONFIG_NSH_MMCSDSLOTNO +# define CONFIG_NSH_MMCSDSLOTNO 0 +# endif +#endif + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +#ifdef CONFIG_MMCSD +static struct sdio_dev_s *g_sdiodev; +static bool g_sd_inserted; +#endif + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: nsh_cdinterrupt + * + * Description: + * Card detect interrupt handler. + * + ****************************************************************************/ + +#ifdef NSH_HAVEMMCSD +static int nsh_cdinterrupt(int irq, void *context, void *arg) +{ + bool present; + + present = !stm32_gpioread(GPIO_SD_CD); + if (present != g_sd_inserted) + { + sdio_mediachange(g_sdiodev, present); + g_sd_inserted = present; + } + + return OK; +} +#endif + /**************************************************************************** * Public Functions ****************************************************************************/ @@ -83,3 +181,84 @@ void stm32_boardinitialize(void) board_autoled_initialize(); #endif } + +/**************************************************************************** + * 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ + int ret; + +#ifdef NSH_HAVEMMCSD + /* Configure the card detect GPIO */ + + stm32_configgpio(GPIO_SD_CD); + + /* Register an interrupt handler for the card detect pin */ + + stm32_gpiosetevent(GPIO_SD_CD, true, true, true, nsh_cdinterrupt, NULL); + + /* Mount the SDIO-based MMC/SD block driver */ + + /* First, get an instance of the SDIO interface */ + + syslog(LOG_INFO, "Initializing SDIO slot %d\n", + CONFIG_NSH_MMCSDSLOTNO); + + g_sdiodev = sdio_initialize(CONFIG_NSH_MMCSDSLOTNO); + if (!g_sdiodev) + { + syslog(LOG_ERR, "ERROR: Failed to initialize SDIO slot %d\n", + CONFIG_NSH_MMCSDSLOTNO); + return; + } + + /* Now bind the SDIO interface to the MMC/SD driver */ + + syslog(LOG_INFO, "Bind SDIO to the MMC/SD driver, minor=%d\n", + CONFIG_NSH_MMCSDMINOR); + + ret = mmcsd_slotinitialize(CONFIG_NSH_MMCSDMINOR, g_sdiodev); + if (ret != OK) + { + syslog(LOG_ERR, + "ERROR: Failed to bind SDIO to the MMC/SD driver: %d\n", + ret); + return; + } + + syslog(LOG_INFO, "Successfully bound SDIO to the MMC/SD driver\n"); + + /* Use SD card detect pin to check if a card is inserted */ + + g_sd_inserted = !stm32_gpioread(GPIO_SD_CD); + _info("Card detect : %hhu\n", g_sd_inserted); + + sdio_mediachange(g_sdiodev, g_sd_inserted); +#endif + +#ifdef CONFIG_INPUT + /* Initialize the touchscreen */ + + ret = stm32_tsc_setup(0); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: stm32_tsc_setup failed: %d\n", ret); + } +#endif + + UNUSED(ret); +} +#endif diff --git a/boards/arm/stm32/hymini-stm32v/src/stm32_usbmsc.c b/boards/arm/stm32/hymini-stm32v/src/stm32_usbmsc.c index 75bba9a9514c0..5072bc4531f2b 100644 --- a/boards/arm/stm32/hymini-stm32v/src/stm32_usbmsc.c +++ b/boards/arm/stm32/hymini-stm32v/src/stm32_usbmsc.c @@ -76,8 +76,7 @@ int board_usbmsc_initialize(int port) { /* If system/usbmsc is built as an NSH command, then SD slot should - * already have been initialized in board_app_initialize() - * (see stm32_appinit.c). + * already have been initialized. * In this case, there is nothing further to be done here. */ diff --git a/boards/arm/stm32/maple/src/CMakeLists.txt b/boards/arm/stm32/maple/src/CMakeLists.txt index af62be236d59d..9eec7a7387bb1 100644 --- a/boards/arm/stm32/maple/src/CMakeLists.txt +++ b/boards/arm/stm32/maple/src/CMakeLists.txt @@ -38,10 +38,6 @@ if(CONFIG_USBMSC) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - target_sources(board PRIVATE ${SRCS}) set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/ld.script") diff --git a/boards/arm/stm32/maple/src/Make.defs b/boards/arm/stm32/maple/src/Make.defs index b0aa728a66ba1..90ae23399e304 100644 --- a/boards/arm/stm32/maple/src/Make.defs +++ b/boards/arm/stm32/maple/src/Make.defs @@ -37,10 +37,6 @@ endif ifeq ($(CONFIG_USBMSC),y) endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - DEPPATH += --dep-path board VPATH += :board CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board diff --git a/boards/arm/stm32/maple/src/stm32_appinit.c b/boards/arm/stm32/maple/src/stm32_appinit.c deleted file mode 100644 index 88be3e3d0c8ae..0000000000000 --- a/boards/arm/stm32/maple/src/stm32_appinit.c +++ /dev/null @@ -1,65 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32/maple/src/stm32_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 - -#include - -#include - -#include "maple.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) -{ - return OK; -} diff --git a/boards/arm/stm32/maple/src/stm32_boot.c b/boards/arm/stm32/maple/src/stm32_boot.c index 58b9d682aed3f..56d8a61eb6d35 100644 --- a/boards/arm/stm32/maple/src/stm32_boot.c +++ b/boards/arm/stm32/maple/src/stm32_boot.c @@ -82,3 +82,28 @@ void stm32_boardinitialize(void) stm32_usbinitialize(); #endif } + +/**************************************************************************** + * 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 after up_initialize() and board_early_initialize() and just + * before the initial application is started. This additional + * initialization phase may be used, for example, to initialize board- + * specific device drivers for which board_early_initialize() is not + * suitable. + * + * Waiting for events, use of I2C, SPI, etc are permissible in the context + * of board_late_initialize(). That is because board_late_initialize() + * will run on a temporary, internal kernel thread. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ +} +#endif diff --git a/boards/arm/stm32/mikroe-stm32f4/configs/fulldemo/defconfig b/boards/arm/stm32/mikroe-stm32f4/configs/fulldemo/defconfig index b27924316fcc3..7413ebbd7f9db 100644 --- a/boards/arm/stm32/mikroe-stm32f4/configs/fulldemo/defconfig +++ b/boards/arm/stm32/mikroe-stm32f4/configs/fulldemo/defconfig @@ -68,7 +68,6 @@ CONFIG_MQ_MAXMSGSIZE=64 CONFIG_MTD_CONFIG=y CONFIG_MTD_PARTITION=y CONFIG_MTD_SMART_SECTOR_SIZE=512 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/mikroe-stm32f4/configs/kostest/defconfig b/boards/arm/stm32/mikroe-stm32f4/configs/kostest/defconfig index 123372c145be6..e89262a68b986 100644 --- a/boards/arm/stm32/mikroe-stm32f4/configs/kostest/defconfig +++ b/boards/arm/stm32/mikroe-stm32f4/configs/kostest/defconfig @@ -48,7 +48,6 @@ CONFIG_MMCSD=y CONFIG_MM_REGIONS=2 CONFIG_MTD_PARTITION=y CONFIG_MTD_SMART_SECTOR_SIZE=512 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y CONFIG_NSH_STRERROR=y diff --git a/boards/arm/stm32/mikroe-stm32f4/configs/nsh/defconfig b/boards/arm/stm32/mikroe-stm32f4/configs/nsh/defconfig index 89cba91a9437a..78dfe980601ea 100644 --- a/boards/arm/stm32/mikroe-stm32f4/configs/nsh/defconfig +++ b/boards/arm/stm32/mikroe-stm32f4/configs/nsh/defconfig @@ -42,7 +42,6 @@ CONFIG_MMCSD=y CONFIG_MM_REGIONS=2 CONFIG_MTD_PARTITION=y CONFIG_MTD_SMART_SECTOR_SIZE=512 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/mikroe-stm32f4/configs/nx/defconfig b/boards/arm/stm32/mikroe-stm32f4/configs/nx/defconfig index 6fc3b91fb12f9..c8b0ef583d7e5 100644 --- a/boards/arm/stm32/mikroe-stm32f4/configs/nx/defconfig +++ b/boards/arm/stm32/mikroe-stm32f4/configs/nx/defconfig @@ -37,7 +37,6 @@ CONFIG_LIBC_STRERROR=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 CONFIG_MQ_MAXMSGSIZE=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_LIBRARY=y diff --git a/boards/arm/stm32/mikroe-stm32f4/configs/nxlines/defconfig b/boards/arm/stm32/mikroe-stm32f4/configs/nxlines/defconfig index 275c444304cd4..9245c04e424dd 100644 --- a/boards/arm/stm32/mikroe-stm32f4/configs/nxlines/defconfig +++ b/boards/arm/stm32/mikroe-stm32f4/configs/nxlines/defconfig @@ -42,7 +42,6 @@ CONFIG_LCD_NOGETRUN=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 CONFIG_MQ_MAXMSGSIZE=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_LIBRARY=y diff --git a/boards/arm/stm32/mikroe-stm32f4/configs/nxtext/defconfig b/boards/arm/stm32/mikroe-stm32f4/configs/nxtext/defconfig index 6322a4572d7f8..7959ef4608663 100644 --- a/boards/arm/stm32/mikroe-stm32f4/configs/nxtext/defconfig +++ b/boards/arm/stm32/mikroe-stm32f4/configs/nxtext/defconfig @@ -36,7 +36,6 @@ CONFIG_LCD_MIO283QT2=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 CONFIG_MQ_MAXMSGSIZE=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_LIBRARY=y diff --git a/boards/arm/stm32/mikroe-stm32f4/configs/usbnsh/defconfig b/boards/arm/stm32/mikroe-stm32f4/configs/usbnsh/defconfig index 0f6b6d8ef073f..c011fdde8bb9b 100644 --- a/boards/arm/stm32/mikroe-stm32f4/configs/usbnsh/defconfig +++ b/boards/arm/stm32/mikroe-stm32f4/configs/usbnsh/defconfig @@ -47,7 +47,6 @@ CONFIG_MMCSD=y CONFIG_MM_REGIONS=2 CONFIG_MTD_PARTITION=y CONFIG_MTD_SMART_SECTOR_SIZE=512 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/mikroe-stm32f4/src/CMakeLists.txt b/boards/arm/stm32/mikroe-stm32f4/src/CMakeLists.txt index 7ff8c5d4a901a..ccadb52a73910 100644 --- a/boards/arm/stm32/mikroe-stm32f4/src/CMakeLists.txt +++ b/boards/arm/stm32/mikroe-stm32f4/src/CMakeLists.txt @@ -34,10 +34,6 @@ if(CONFIG_PWM) list(APPEND SRCS stm32_pwm.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - if(CONFIG_ARCH_CUSTOM_PMINIT) list(APPEND SRCS stm32_pm.c) endif() diff --git a/boards/arm/stm32/mikroe-stm32f4/src/Make.defs b/boards/arm/stm32/mikroe-stm32f4/src/Make.defs index 423a62548c2a4..4d1e116adb868 100644 --- a/boards/arm/stm32/mikroe-stm32f4/src/Make.defs +++ b/boards/arm/stm32/mikroe-stm32f4/src/Make.defs @@ -36,10 +36,6 @@ ifeq ($(CONFIG_PWM),y) CSRCS += stm32_pwm.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - ifeq ($(CONFIG_ARCH_CUSTOM_PMINIT),y) CSRCS += stm32_pm.c endif diff --git a/boards/arm/stm32/mikroe-stm32f4/src/stm32_appinit.c b/boards/arm/stm32/mikroe-stm32f4/src/stm32_appinit.c deleted file mode 100644 index c7c84e78e071c..0000000000000 --- a/boards/arm/stm32/mikroe-stm32f4/src/stm32_appinit.c +++ /dev/null @@ -1,416 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32/mikroe-stm32f4/src/stm32_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 - -#include -#include -#include -#include - -#include -#include - -#ifdef CONFIG_STM32_SPI3 -# include -#endif - -#ifdef CONFIG_MTD_M25P -# include -#endif - -#ifdef CONFIG_USBMONITOR -# include -#endif - -#ifdef CONFIG_MIKROE_FLASH_CONFIG_PART -#ifdef CONFIG_PLATFORM_CONFIGDATA -# include -#endif -#endif - -#ifdef CONFIG_AUDIO -# include -#endif - -#ifdef CONFIG_STM32_OTGFS -# include "stm32_usbhost.h" -#endif - -#include "stm32.h" -#include "mikroe-stm32f4.h" - -#ifdef CONFIG_SENSORS_QENCODER -#include "board_qencoder.h" -#endif - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Configuration ************************************************************/ - -#define HAVE_USBDEV 1 -#define HAVE_USBHOST 1 -#define HAVE_USBMONITOR 1 -#define NSH_HAVEMMCSD 1 - -/* Can't support USB host or device features if USB OTG FS is not enabled */ - -#ifndef CONFIG_STM32_OTGFS -# undef HAVE_USBDEV -# undef HAVE_USBHOST -#endif - -/* Can't support USB device is USB device is not enabled */ - -#ifndef CONFIG_USBDEV -# undef HAVE_USBDEV -#endif - -/* Can't support USB host is USB host is not enabled */ - -#ifndef CONFIG_USBHOST -# undef HAVE_USBHOST -#endif - -/* Check if we should enable the USB monitor before starting NSH */ - -#ifndef CONFIG_USBMONITOR -# undef HAVE_USBMONITOR -#endif - -#ifndef HAVE_USBDEV -# undef CONFIG_USBDEV_TRACE -#endif - -#ifndef HAVE_USBHOST -# undef CONFIG_USBHOST_TRACE -#endif - -#if !defined(CONFIG_USBDEV_TRACE) && !defined(CONFIG_USBHOST_TRACE) -# undef HAVE_USBMONITOR -#endif - -/* Can't support MMC/SD features if mountpoints are disabled or if SDIO - * support is not enabled. - */ - -#if defined(CONFIG_DISABLE_MOUNTPOINT) || !defined(CONFIG_STM32_SPI3) -# undef NSH_HAVEMMCSD -#endif - -#ifndef CONFIG_NSH_MMCSDMINOR -# define CONFIG_NSH_MMCSDMINOR 0 -#endif - -# ifndef CONFIG_RAMMTD_BLOCKSIZE -# define CONFIG_RAMMTD_BLOCKSIZE 512 -# endif - -# ifndef CONFIG_RAMMTD_ERASESIZE -# define CONFIG_RAMMTD_ERASESIZE 4096 -# endif - -# ifndef CONFIG_TESTING_SMART_NEBLOCKS -# define CONFIG_TESTING_SMART_NEBLOCKS (22) -# endif - -#ifdef CONFIG_MIKROE_RAMMTD -# ifndef CONFIG_MIKROE_RAMMTD_MINOR -# define CONFIG_MIKROE_RAMMTD_MINOR 1 -# endif -# ifndef CONFIG_MIKROE_RAMMTD_SIZE -# define CONFIG_MIKROE_RAMMTD_SIZE 32 -# endif -#endif - -/**************************************************************************** - * 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_STM32_SPI3 - struct spi_dev_s *spi; - struct mtd_dev_s *mtd; -#endif - int ret = OK; - - /* Configure SPI-based devices */ - -#ifdef CONFIG_STM32_SPI3 - /* Get the SPI port */ - - syslog(LOG_INFO, "Initializing SPI port 3\n"); - spi = stm32_spibus_initialize(3); - if (!spi) - { - syslog(LOG_ERR, "ERROR: Failed to initialize SPI port 3\n"); - return -ENODEV; - } - - syslog(LOG_INFO, "Successfully initialized SPI port 3\n"); - - /* Now bind the SPI interface to the M25P8 SPI FLASH driver */ - -#if defined(CONFIG_MTD) && defined(CONFIG_MIKROE_FLASH) - syslog(LOG_INFO, "Bind SPI to the SPI flash driver\n"); - - mtd = m25p_initialize(spi); - if (!mtd) - { - syslog(LOG_ERR, "ERROR: Failed to bind SPI port 3 to the SPI" - " FLASH driver\n"); - } - else - { - syslog(LOG_INFO, "Successfully bound SPI port 3 to the SPI" - " FLASH driver\n"); - -#ifdef CONFIG_MIKROE_FLASH_PART - { - int partno; - int partsize; - int partoffset; - const char *partstring = CONFIG_MIKROE_FLASH_PART_LIST; - const char *ptr; - struct mtd_dev_s *mtd_part; - char partname[16]; - - /* Now create a partition on the FLASH device */ - - partno = 0; - ptr = partstring; - partoffset = 0; - - while (*ptr != '\0') - { - /* Get the partition size */ - - partsize = atoi(ptr); - mtd_part = mtd_partition(mtd, partoffset, - (partsize >> 2) * 16); - partoffset += (partsize >> 2) * 16; - -#ifdef CONFIG_MIKROE_FLASH_CONFIG_PART - /* Test if this is the config partition */ - - if (CONFIG_MIKROE_FLASH_CONFIG_PART_NUMBER == partno) - { - /* Register the partition as the config device */ - - mtdconfig_register(mtd_part); - } - else -#endif - { - /* Now initialize a SMART Flash block device and bind it - * to the MTD device. - */ - - #if defined(CONFIG_MTD_SMART) && defined(CONFIG_FS_SMARTFS) - snprintf(partname, sizeof(partname), "p%d", partno); - smart_initialize(CONFIG_MIKROE_FLASH_MINOR, mtd_part, - partname); -#endif - } - - /* Update the pointer to point to the next size in the list */ - - while ((*ptr >= '0') && (*ptr <= '9')) - { - ptr++; - } - - if (*ptr == ',') - { - ptr++; - } - - /* Increment the part number */ - - partno++; - } - } -#else /* CONFIG_MIKROE_FLASH_PART */ - - /* Configure the device with no partition support */ - - smart_initialize(CONFIG_MIKROE_FLASH_MINOR, mtd, NULL); - -#endif /* CONFIG_MIKROE_FLASH_PART */ - } - - /* Create a RAM MTD device if configured */ - -#if defined(CONFIG_RAMMTD) && defined(CONFIG_MIKROE_RAMMTD) - { - uint8_t *start = - kmm_malloc(CONFIG_MIKROE_RAMMTD_SIZE * 1024); - mtd = rammtd_initialize(start, CONFIG_MIKROE_RAMMTD_SIZE * 1024); - mtd->ioctl(mtd, MTDIOC_BULKERASE, 0); - - /* Now initialize a SMART Flash block device and bind it to the - * MTD device - */ - -#if defined(CONFIG_MTD_SMART) && defined(CONFIG_FS_SMARTFS) - smart_initialize(CONFIG_MIKROE_RAMMTD_MINOR, mtd, NULL); -#endif - } - -#endif /* CONFIG_RAMMTD && CONFIG_MIKROE_RAMMTD */ - -#endif /* CONFIG_MTD */ -#endif /* CONFIG_STM32_SPI3 */ - - /* Create the SPI FLASH MTD instance */ - - /* The M25Pxx is not a good media to implement a file system.. - * its block sizes are too large - */ - - /* Mount the SDIO-based MMC/SD block driver */ - -#ifdef NSH_HAVEMMCSD - /* Bind the spi interface to the MMC/SD driver */ - - syslog(LOG_INFO, "Bind SDIO to the MMC/SD driver, minor=%d\n", - CONFIG_NSH_MMCSDMINOR); - - ret = mmcsd_spislotinitialize(CONFIG_NSH_MMCSDMINOR, - CONFIG_NSH_MMCSDSLOTNO, spi); - if (ret != OK) - { - syslog(LOG_ERR, "ERROR: Failed to bind SPI to the MMC/SD driver:" - " %d\n", ret); - } - else - { - syslog(LOG_INFO, "Successfully bound SPI to the MMC/SD driver\n"); - } -#endif - -#ifdef HAVE_USBHOST - /* Initialize USB host operation. stm32_usbhost_initialize() starts a - * thread will monitor for USB connection and disconnection events. - */ - - ret = stm32_usbhost_initialize(); - if (ret != OK) - { - syslog(LOG_ERR, "ERROR: Failed to initialize USB host: %d\n", ret); - return ret; - } -#endif - -#ifdef HAVE_USBMONITOR - /* Start the USB Monitor */ - - ret = usbmonitor_start(); - if (ret != OK) - { - syslog(LOG_ERR, "ERROR: Failed to start USB monitor: %d\n", ret); - } -#endif - -#ifdef CONFIG_INPUT - /* Initialize the touchscreen */ - - ret = stm32_tsc_setup(0); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: stm32_tsc_setup failed: %d\n", ret); - } -#endif - -#ifdef CONFIG_PWM - /* Initialize PWM and register the PWM device. */ - - ret = stm32_pwm_setup(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: stm32_pwm_setup() failed: %d\n", ret); - } -#endif - -#if defined(CONFIG_LCD_MIO283QT2) || defined(CONFIG_LCD_MIO283QT9A) - /* Configure the TFT LCD module */ - - syslog(LOG_INFO, "Initializing TFT LCD module\n"); - - ret = board_lcd_initialize(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: Failed to initialize TFT LCD module\n"); - } -#endif - -#ifdef CONFIG_SENSORS_QENCODER - /* Initialize and register the qencoder driver */ - - ret = board_qencoder_initialize(0, CONFIG_MIKROE_QETIMER); - if (ret != OK) - { - syslog(LOG_ERR, - "ERROR: Failed to register the qencoder: %d\n", - ret); - return ret; - } -#endif - -#ifdef CONFIG_AUDIO - /* Configure the Audio sub-system if enabled and bind it to SPI 3 */ - - up_vs1053initialize(spi); -#endif - - return ret; -} diff --git a/boards/arm/stm32/mikroe-stm32f4/src/stm32_boot.c b/boards/arm/stm32/mikroe-stm32f4/src/stm32_boot.c index 971f8ec1cece8..aa2a1c87b0965 100644 --- a/boards/arm/stm32/mikroe-stm32f4/src/stm32_boot.c +++ b/boards/arm/stm32/mikroe-stm32f4/src/stm32_boot.c @@ -28,15 +28,130 @@ #include +#include +#include +#include +#include + #include +#include +#include + +#ifdef CONFIG_STM32_SPI3 +# include +#endif + +#ifdef CONFIG_MTD_M25P +# include +#endif + +#ifdef CONFIG_USBMONITOR +# include +#endif + +#ifdef CONFIG_MIKROE_FLASH_CONFIG_PART +#ifdef CONFIG_PLATFORM_CONFIGDATA +# include +#endif +#endif +#ifdef CONFIG_AUDIO +# include +#endif + +#ifdef CONFIG_STM32_OTGFS +# include "stm32_usbhost.h" +#endif + +#include "stm32.h" #include "arm_internal.h" #include "mikroe-stm32f4.h" +#ifdef CONFIG_SENSORS_QENCODER +#include "board_qencoder.h" +#endif + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ +/* Configuration ************************************************************/ + +#define HAVE_USBDEV 1 +#define HAVE_USBHOST 1 +#define HAVE_USBMONITOR 1 +#define NSH_HAVEMMCSD 1 + +/* Can't support USB host or device features if USB OTG FS is not enabled */ + +#ifndef CONFIG_STM32_OTGFS +# undef HAVE_USBDEV +# undef HAVE_USBHOST +#endif + +/* Can't support USB device is USB device is not enabled */ + +#ifndef CONFIG_USBDEV +# undef HAVE_USBDEV +#endif + +/* Can't support USB host is USB host is not enabled */ + +#ifndef CONFIG_USBHOST +# undef HAVE_USBHOST +#endif + +/* Check if we should enable the USB monitor before starting NSH */ + +#ifndef CONFIG_USBMONITOR +# undef HAVE_USBMONITOR +#endif + +#ifndef HAVE_USBDEV +# undef CONFIG_USBDEV_TRACE +#endif + +#ifndef HAVE_USBHOST +# undef CONFIG_USBHOST_TRACE +#endif + +#if !defined(CONFIG_USBDEV_TRACE) && !defined(CONFIG_USBHOST_TRACE) +# undef HAVE_USBMONITOR +#endif + +/* Can't support MMC/SD features if mountpoints are disabled or if SDIO + * support is not enabled. + */ + +#if defined(CONFIG_DISABLE_MOUNTPOINT) || !defined(CONFIG_STM32_SPI3) +# undef NSH_HAVEMMCSD +#endif + +#ifndef CONFIG_NSH_MMCSDMINOR +# define CONFIG_NSH_MMCSDMINOR 0 +#endif + +# ifndef CONFIG_RAMMTD_BLOCKSIZE +# define CONFIG_RAMMTD_BLOCKSIZE 512 +# endif + +# ifndef CONFIG_RAMMTD_ERASESIZE +# define CONFIG_RAMMTD_ERASESIZE 4096 +# endif + +# ifndef CONFIG_TESTING_SMART_NEBLOCKS +# define CONFIG_TESTING_SMART_NEBLOCKS (22) +# endif + +#ifdef CONFIG_MIKROE_RAMMTD +# ifndef CONFIG_MIKROE_RAMMTD_MINOR +# define CONFIG_MIKROE_RAMMTD_MINOR 1 +# endif +# ifndef CONFIG_MIKROE_RAMMTD_SIZE +# define CONFIG_MIKROE_RAMMTD_SIZE 32 +# endif +#endif + /**************************************************************************** * Private Functions ****************************************************************************/ @@ -96,3 +211,257 @@ void stm32_boardinitialize(void) } #endif } + +/**************************************************************************** + * 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ +#ifdef CONFIG_STM32_SPI3 + struct spi_dev_s *spi; + struct mtd_dev_s *mtd; +#endif + int ret = OK; + + /* Configure SPI-based devices */ + +#ifdef CONFIG_STM32_SPI3 + /* Get the SPI port */ + + syslog(LOG_INFO, "Initializing SPI port 3\n"); + spi = stm32_spibus_initialize(3); + if (!spi) + { + syslog(LOG_ERR, "ERROR: Failed to initialize SPI port 3\n"); + return; + } + + syslog(LOG_INFO, "Successfully initialized SPI port 3\n"); + + /* Now bind the SPI interface to the M25P8 SPI FLASH driver */ + +#if defined(CONFIG_MTD) && defined(CONFIG_MIKROE_FLASH) + syslog(LOG_INFO, "Bind SPI to the SPI flash driver\n"); + + mtd = m25p_initialize(spi); + if (!mtd) + { + syslog(LOG_ERR, "ERROR: Failed to bind SPI port 3 to the SPI" + " FLASH driver\n"); + } + else + { + syslog(LOG_INFO, "Successfully bound SPI port 3 to the SPI" + " FLASH driver\n"); + +#ifdef CONFIG_MIKROE_FLASH_PART + { + int partno; + int partsize; + int partoffset; + const char *partstring = CONFIG_MIKROE_FLASH_PART_LIST; + const char *ptr; + struct mtd_dev_s *mtd_part; + char partname[16]; + + /* Now create a partition on the FLASH device */ + + partno = 0; + ptr = partstring; + partoffset = 0; + + while (*ptr != '\0') + { + /* Get the partition size */ + + partsize = atoi(ptr); + mtd_part = mtd_partition(mtd, partoffset, + (partsize >> 2) * 16); + partoffset += (partsize >> 2) * 16; + +#ifdef CONFIG_MIKROE_FLASH_CONFIG_PART + /* Test if this is the config partition */ + + if (CONFIG_MIKROE_FLASH_CONFIG_PART_NUMBER == partno) + { + /* Register the partition as the config device */ + + mtdconfig_register(mtd_part); + } + else +#endif + { + /* Now initialize a SMART Flash block device and bind it + * to the MTD device. + */ + + #if defined(CONFIG_MTD_SMART) && defined(CONFIG_FS_SMARTFS) + snprintf(partname, sizeof(partname), "p%d", partno); + smart_initialize(CONFIG_MIKROE_FLASH_MINOR, mtd_part, + partname); +#endif + } + + /* Update the pointer to point to the next size in the list */ + + while ((*ptr >= '0') && (*ptr <= '9')) + { + ptr++; + } + + if (*ptr == ',') + { + ptr++; + } + + /* Increment the part number */ + + partno++; + } + } +#else /* CONFIG_MIKROE_FLASH_PART */ + + /* Configure the device with no partition support */ + + smart_initialize(CONFIG_MIKROE_FLASH_MINOR, mtd, NULL); + +#endif /* CONFIG_MIKROE_FLASH_PART */ + } + + /* Create a RAM MTD device if configured */ + +#if defined(CONFIG_RAMMTD) && defined(CONFIG_MIKROE_RAMMTD) + { + uint8_t *start = + kmm_malloc(CONFIG_MIKROE_RAMMTD_SIZE * 1024); + mtd = rammtd_initialize(start, CONFIG_MIKROE_RAMMTD_SIZE * 1024); + mtd->ioctl(mtd, MTDIOC_BULKERASE, 0); + + /* Now initialize a SMART Flash block device and bind it to the + * MTD device + */ + +#if defined(CONFIG_MTD_SMART) && defined(CONFIG_FS_SMARTFS) + smart_initialize(CONFIG_MIKROE_RAMMTD_MINOR, mtd, NULL); +#endif + } + +#endif /* CONFIG_RAMMTD && CONFIG_MIKROE_RAMMTD */ + +#endif /* CONFIG_MTD */ +#endif /* CONFIG_STM32_SPI3 */ + + /* Create the SPI FLASH MTD instance */ + + /* The M25Pxx is not a good media to implement a file system.. + * its block sizes are too large + */ + + /* Mount the SDIO-based MMC/SD block driver */ + +#ifdef NSH_HAVEMMCSD + /* Bind the spi interface to the MMC/SD driver */ + + syslog(LOG_INFO, "Bind SDIO to the MMC/SD driver, minor=%d\n", + CONFIG_NSH_MMCSDMINOR); + + ret = mmcsd_spislotinitialize(CONFIG_NSH_MMCSDMINOR, + CONFIG_NSH_MMCSDSLOTNO, spi); + if (ret != OK) + { + syslog(LOG_ERR, "ERROR: Failed to bind SPI to the MMC/SD driver:" + " %d\n", ret); + } + else + { + syslog(LOG_INFO, "Successfully bound SPI to the MMC/SD driver\n"); + } +#endif + +#ifdef HAVE_USBHOST + /* Initialize USB host operation. stm32_usbhost_initialize() starts a + * thread will monitor for USB connection and disconnection events. + */ + + ret = stm32_usbhost_initialize(); + if (ret != OK) + { + syslog(LOG_ERR, "ERROR: Failed to initialize USB host: %d\n", ret); + return; + } +#endif + +#ifdef HAVE_USBMONITOR + /* Start the USB Monitor */ + + ret = usbmonitor_start(); + if (ret != OK) + { + syslog(LOG_ERR, "ERROR: Failed to start USB monitor: %d\n", ret); + } +#endif + +#ifdef CONFIG_INPUT + /* Initialize the touchscreen */ + + ret = stm32_tsc_setup(0); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: stm32_tsc_setup failed: %d\n", ret); + } +#endif + +#ifdef CONFIG_PWM + /* Initialize PWM and register the PWM device. */ + + ret = stm32_pwm_setup(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: stm32_pwm_setup() failed: %d\n", ret); + } +#endif + +#if defined(CONFIG_LCD_MIO283QT2) || defined(CONFIG_LCD_MIO283QT9A) + /* Configure the TFT LCD module */ + + syslog(LOG_INFO, "Initializing TFT LCD module\n"); + + ret = board_lcd_initialize(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: Failed to initialize TFT LCD module\n"); + } +#endif + +#ifdef CONFIG_SENSORS_QENCODER + /* Initialize and register the qencoder driver */ + + ret = board_qencoder_initialize(0, CONFIG_MIKROE_QETIMER); + if (ret != OK) + { + syslog(LOG_ERR, + "ERROR: Failed to register the qencoder: %d\n", + ret); + return; + } +#endif + +#ifdef CONFIG_AUDIO + /* Configure the Audio sub-system if enabled and bind it to SPI 3 */ + + up_vs1053initialize(spi); +#endif +} +#endif diff --git a/boards/arm/stm32/nucleo-f103rb/configs/adc/defconfig b/boards/arm/stm32/nucleo-f103rb/configs/adc/defconfig index 7f4f31b8a57a1..46570b4a60830 100644 --- a/boards/arm/stm32/nucleo-f103rb/configs/adc/defconfig +++ b/boards/arm/stm32/nucleo-f103rb/configs/adc/defconfig @@ -20,13 +20,10 @@ CONFIG_BUILTIN=y CONFIG_DEBUG_FULLOPT=y CONFIG_DEBUG_SYMBOLS=y CONFIG_DEFAULT_SMALL=y -CONFIG_EXAMPLES_ADC=y -CONFIG_EXAMPLES_ADC_GROUPSIZE=3 CONFIG_FILE_STREAM=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=80 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=1024 CONFIG_RAM_SIZE=20480 diff --git a/boards/arm/stm32/nucleo-f103rb/configs/ihm07m1_b16/defconfig b/boards/arm/stm32/nucleo-f103rb/configs/ihm07m1_b16/defconfig index 9754a5ea696c3..e8185cb780297 100644 --- a/boards/arm/stm32/nucleo-f103rb/configs/ihm07m1_b16/defconfig +++ b/boards/arm/stm32/nucleo-f103rb/configs/ihm07m1_b16/defconfig @@ -20,6 +20,7 @@ CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F103RB=y CONFIG_ARCH_INTERRUPTSTACK=1024 CONFIG_ARCH_IRQBUTTONS=y +CONFIG_BOARDCTL=y CONFIG_BOARD_LOOPSPERMSEC=8499 CONFIG_BOARD_STM32_IHM07M1=y CONFIG_BOARD_STM32_IHM07M1_POT=y @@ -55,7 +56,6 @@ CONFIG_MOTOR=y CONFIG_MOTOR_FOC=y CONFIG_MOTOR_FOC_TRACE=y CONFIG_MQ_MAXMSGSIZE=5 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_RAM_SIZE=16386 CONFIG_RAM_START=0x20000000 diff --git a/boards/arm/stm32/nucleo-f103rb/configs/nsh/defconfig b/boards/arm/stm32/nucleo-f103rb/configs/nsh/defconfig index e03e218977058..2be574f9f8662 100644 --- a/boards/arm/stm32/nucleo-f103rb/configs/nsh/defconfig +++ b/boards/arm/stm32/nucleo-f103rb/configs/nsh/defconfig @@ -20,7 +20,6 @@ CONFIG_DEFAULT_SMALL=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=80 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=1024 CONFIG_RAM_SIZE=20480 diff --git a/boards/arm/stm32/nucleo-f103rb/configs/pwm/defconfig b/boards/arm/stm32/nucleo-f103rb/configs/pwm/defconfig index 372c73fff59c3..1fd7b4dd5e8c9 100644 --- a/boards/arm/stm32/nucleo-f103rb/configs/pwm/defconfig +++ b/boards/arm/stm32/nucleo-f103rb/configs/pwm/defconfig @@ -22,7 +22,6 @@ CONFIG_FILE_STREAM=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=80 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=1024 CONFIG_PWM=y diff --git a/boards/arm/stm32/nucleo-f103rb/configs/qenco/defconfig b/boards/arm/stm32/nucleo-f103rb/configs/qenco/defconfig index 6b0f2bce0deb1..df060b58063de 100644 --- a/boards/arm/stm32/nucleo-f103rb/configs/qenco/defconfig +++ b/boards/arm/stm32/nucleo-f103rb/configs/qenco/defconfig @@ -25,7 +25,6 @@ CONFIG_FILE_STREAM=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=80 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=1024 CONFIG_RAM_SIZE=20480 diff --git a/boards/arm/stm32/nucleo-f103rb/src/CMakeLists.txt b/boards/arm/stm32/nucleo-f103rb/src/CMakeLists.txt index 38aa9f27b32aa..513418e9419d8 100644 --- a/boards/arm/stm32/nucleo-f103rb/src/CMakeLists.txt +++ b/boards/arm/stm32/nucleo-f103rb/src/CMakeLists.txt @@ -32,10 +32,6 @@ if(CONFIG_ARCH_BUTTONS) list(APPEND SRCS stm32_buttons.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - if(NOT CONFIG_STM32_FOC) if(CONFIG_ADC) list(APPEND SRCS stm32_adc.c) diff --git a/boards/arm/stm32/nucleo-f103rb/src/Make.defs b/boards/arm/stm32/nucleo-f103rb/src/Make.defs index db43563066f27..fa7a6e9872078 100644 --- a/boards/arm/stm32/nucleo-f103rb/src/Make.defs +++ b/boards/arm/stm32/nucleo-f103rb/src/Make.defs @@ -34,10 +34,6 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += stm32_buttons.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - ifneq ($(CONFIG_STM32_FOC),y) ifeq ($(CONFIG_ADC),y) CSRCS += stm32_adc.c diff --git a/boards/arm/stm32/nucleo-f103rb/src/nucleo-f103rb.h b/boards/arm/stm32/nucleo-f103rb/src/nucleo-f103rb.h index 5a5e4bc83681f..d4cb2b2383add 100644 --- a/boards/arm/stm32/nucleo-f103rb/src/nucleo-f103rb.h +++ b/boards/arm/stm32/nucleo-f103rb/src/nucleo-f103rb.h @@ -89,12 +89,7 @@ * Description: * Perform architecture specific initialization * - * CONFIG_BOARDCTL=y: - * If CONFIG_NSH_ARCHINITIALIZE=y: - * Called from the NSH library (or other application) - * Otherwise, assumed to be called from some other application. - * - * Otherwise CONFIG_BOARD_LATE_INITIALIZE=y: + * CONFIG_BOARD_LATE_INITIALIZE=y: * Called from board_late_initialize(). * * Otherwise, bad news: Never called diff --git a/boards/arm/stm32/nucleo-f103rb/src/stm32_appinit.c b/boards/arm/stm32/nucleo-f103rb/src/stm32_appinit.c deleted file mode 100644 index 546cc9704a7ca..0000000000000 --- a/boards/arm/stm32/nucleo-f103rb/src/stm32_appinit.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32/nucleo-f103rb/src/stm32_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 - -#include -#include - -#include "nucleo-f103rb.h" - -/**************************************************************************** - * 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 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 stm32_bringup(); -#endif -} diff --git a/boards/arm/stm32/nucleo-f103rb/src/stm32_foc_ihm07m1.c b/boards/arm/stm32/nucleo-f103rb/src/stm32_foc_ihm07m1.c index 6c850c7e62f6d..d584691bd536f 100644 --- a/boards/arm/stm32/nucleo-f103rb/src/stm32_foc_ihm07m1.c +++ b/boards/arm/stm32/nucleo-f103rb/src/stm32_foc_ihm07m1.c @@ -174,8 +174,6 @@ static struct stm32_foc_adc_s g_adc_cfg = * Description: * Initialize FOC driver. * - * This function should be call by board_app_initialize(). - * * Returned Value: * 0 on success, a negated errno value on failure * diff --git a/boards/arm/stm32/nucleo-f207zg/configs/adc/defconfig b/boards/arm/stm32/nucleo-f207zg/configs/adc/defconfig index 02334841a1a2d..2615e630e80d0 100644 --- a/boards/arm/stm32/nucleo-f207zg/configs/adc/defconfig +++ b/boards/arm/stm32/nucleo-f207zg/configs/adc/defconfig @@ -25,7 +25,6 @@ CONFIG_IDLETHREAD_STACKSIZE=2048 CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_PREALLOC_TIMERS=4 CONFIG_RAM_SIZE=114688 diff --git a/boards/arm/stm32/nucleo-f207zg/configs/pwm/defconfig b/boards/arm/stm32/nucleo-f207zg/configs/pwm/defconfig index 13bdb7fe43285..03abe05bec910 100644 --- a/boards/arm/stm32/nucleo-f207zg/configs/pwm/defconfig +++ b/boards/arm/stm32/nucleo-f207zg/configs/pwm/defconfig @@ -21,7 +21,6 @@ CONFIG_IDLETHREAD_STACKSIZE=2048 CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_PREALLOC_TIMERS=4 CONFIG_PWM=y diff --git a/boards/arm/stm32/nucleo-f207zg/src/CMakeLists.txt b/boards/arm/stm32/nucleo-f207zg/src/CMakeLists.txt index 06b6a2f3d531f..5ca78ff3da4ae 100644 --- a/boards/arm/stm32/nucleo-f207zg/src/CMakeLists.txt +++ b/boards/arm/stm32/nucleo-f207zg/src/CMakeLists.txt @@ -36,10 +36,6 @@ if(CONFIG_STM32_OTGFS) list(APPEND SRCS stm32_usb.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinitialize.c) -endif() - if(CONFIG_ADC) list(APPEND SRCS stm32_adc.c) endif() diff --git a/boards/arm/stm32/nucleo-f207zg/src/Make.defs b/boards/arm/stm32/nucleo-f207zg/src/Make.defs index f0324ad40bd8f..3962a5368fde3 100644 --- a/boards/arm/stm32/nucleo-f207zg/src/Make.defs +++ b/boards/arm/stm32/nucleo-f207zg/src/Make.defs @@ -38,10 +38,6 @@ ifeq ($(CONFIG_STM32_OTGFS),y) CSRCS += stm32_usb.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinitialize.c -endif - ifeq ($(CONFIG_ADC),y) CSRCS += stm32_adc.c endif diff --git a/boards/arm/stm32/nucleo-f207zg/src/stm32_appinitialize.c b/boards/arm/stm32/nucleo-f207zg/src/stm32_appinitialize.c deleted file mode 100644 index 6eb5d0915bf9e..0000000000000 --- a/boards/arm/stm32/nucleo-f207zg/src/stm32_appinitialize.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32/nucleo-f207zg/src/stm32_appinitialize.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 - -#include -#include - -#include "nucleo-f207zg.h" - -/**************************************************************************** - * 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 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 stm32_bringup(); -#endif -} diff --git a/boards/arm/stm32/nucleo-f207zg/src/stm32_boot.c b/boards/arm/stm32/nucleo-f207zg/src/stm32_boot.c index f15f770d8ab7a..3f7ae0c33c105 100644 --- a/boards/arm/stm32/nucleo-f207zg/src/stm32_boot.c +++ b/boards/arm/stm32/nucleo-f207zg/src/stm32_boot.c @@ -82,12 +82,6 @@ void stm32_boardinitialize(void) #ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { -#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_BOARDCTL) - /* Perform board bring-up here instead of from the - * board_app_initialize(). - */ - stm32_bringup(); -#endif } #endif diff --git a/boards/arm/stm32/nucleo-f207zg/src/stm32_bringup.c b/boards/arm/stm32/nucleo-f207zg/src/stm32_bringup.c index f0d98f187e9b8..149f1cc0930e1 100644 --- a/boards/arm/stm32/nucleo-f207zg/src/stm32_bringup.c +++ b/boards/arm/stm32/nucleo-f207zg/src/stm32_bringup.c @@ -49,10 +49,6 @@ * CONFIG_BOARD_LATE_INITIALIZE=y : * Called from board_late_initialize(). * - * CONFIG_BOARD_LATE_INITIALIZE=n && CONFIG_BOARDCTL=y && - * CONFIG_NSH_ARCHINIT: - * Called from the NSH library - * ****************************************************************************/ int stm32_bringup(void) diff --git a/boards/arm/stm32/nucleo-f302r8/configs/can/defconfig b/boards/arm/stm32/nucleo-f302r8/configs/can/defconfig index e4e646fb3c984..aef827a25b355 100644 --- a/boards/arm/stm32/nucleo-f302r8/configs/can/defconfig +++ b/boards/arm/stm32/nucleo-f302r8/configs/can/defconfig @@ -29,7 +29,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=1024 CONFIG_INTELHEX_BINARY=y CONFIG_NAME_MAX=16 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_ARGCAT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=256 diff --git a/boards/arm/stm32/nucleo-f302r8/configs/cansock/defconfig b/boards/arm/stm32/nucleo-f302r8/configs/cansock/defconfig index 211723ccd330d..701e71056cc6d 100644 --- a/boards/arm/stm32/nucleo-f302r8/configs/cansock/defconfig +++ b/boards/arm/stm32/nucleo-f302r8/configs/cansock/defconfig @@ -19,7 +19,6 @@ CONFIG_ARCH_CHIP_STM32F302R8=y CONFIG_ARCH_INTERRUPTSTACK=1024 CONFIG_ARCH_STACKDUMP=y CONFIG_BOARD_INITTHREAD_STACKSIZE=1024 -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=8499 CONFIG_BUILTIN=y CONFIG_CANUTILS_CANDUMP=y diff --git a/boards/arm/stm32/nucleo-f302r8/configs/ihm07m1_b16/defconfig b/boards/arm/stm32/nucleo-f302r8/configs/ihm07m1_b16/defconfig index 4ea22faa3f61b..39910fedf6952 100644 --- a/boards/arm/stm32/nucleo-f302r8/configs/ihm07m1_b16/defconfig +++ b/boards/arm/stm32/nucleo-f302r8/configs/ihm07m1_b16/defconfig @@ -21,6 +21,7 @@ CONFIG_ARCH_CHIP_STM32F302R8=y CONFIG_ARCH_INTERRUPTSTACK=1024 CONFIG_ARCH_IRQBUTTONS=y CONFIG_ARMV7M_LIBM=y +CONFIG_BOARDCTL=y CONFIG_BOARD_LOOPSPERMSEC=8499 CONFIG_BOARD_STM32_IHM07M1=y CONFIG_BOARD_STM32_IHM07M1_POT=y @@ -56,7 +57,6 @@ CONFIG_MOTOR=y CONFIG_MOTOR_FOC=y CONFIG_MOTOR_FOC_TRACE=y CONFIG_MQ_MAXMSGSIZE=5 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_HELP=y CONFIG_RAM_SIZE=16386 diff --git a/boards/arm/stm32/nucleo-f302r8/configs/ihm07m1_f32/defconfig b/boards/arm/stm32/nucleo-f302r8/configs/ihm07m1_f32/defconfig index 9ec29b0f64bc5..c3c5fc1ce3430 100644 --- a/boards/arm/stm32/nucleo-f302r8/configs/ihm07m1_f32/defconfig +++ b/boards/arm/stm32/nucleo-f302r8/configs/ihm07m1_f32/defconfig @@ -21,6 +21,7 @@ CONFIG_ARCH_CHIP_STM32F302R8=y CONFIG_ARCH_INTERRUPTSTACK=1024 CONFIG_ARCH_IRQBUTTONS=y CONFIG_ARMV7M_LIBM=y +CONFIG_BOARDCTL=y CONFIG_BOARD_LOOPSPERMSEC=8499 CONFIG_BOARD_STM32_IHM07M1=y CONFIG_BOARD_STM32_IHM07M1_POT=y @@ -56,7 +57,6 @@ CONFIG_MOTOR=y CONFIG_MOTOR_FOC=y CONFIG_MOTOR_FOC_TRACE=y CONFIG_MQ_MAXMSGSIZE=5 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_RAM_SIZE=16386 CONFIG_RAM_START=0x20000000 diff --git a/boards/arm/stm32/nucleo-f302r8/configs/qenco/defconfig b/boards/arm/stm32/nucleo-f302r8/configs/qenco/defconfig index df8d8de61fd80..399e8177a463d 100644 --- a/boards/arm/stm32/nucleo-f302r8/configs/qenco/defconfig +++ b/boards/arm/stm32/nucleo-f302r8/configs/qenco/defconfig @@ -82,7 +82,6 @@ CONFIG_LIBC_LONG_LONG=y CONFIG_LIBM_TOOLCHAIN=y CONFIG_LINE_MAX=80 CONFIG_MQ_MAXMSGSIZE=5 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_ARGCAT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_CLE=y diff --git a/boards/arm/stm32/nucleo-f302r8/src/CMakeLists.txt b/boards/arm/stm32/nucleo-f302r8/src/CMakeLists.txt index b57f7b41cd043..e5e905b763f6d 100644 --- a/boards/arm/stm32/nucleo-f302r8/src/CMakeLists.txt +++ b/boards/arm/stm32/nucleo-f302r8/src/CMakeLists.txt @@ -32,10 +32,6 @@ if(CONFIG_ARCH_BUTTONS) list(APPEND SRCS stm32_buttons.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - if(CONFIG_PWM) list(APPEND SRCS stm32_pwm.c) endif() diff --git a/boards/arm/stm32/nucleo-f302r8/src/Make.defs b/boards/arm/stm32/nucleo-f302r8/src/Make.defs index 1af494745a8ee..7c9ce0e0b1fe8 100644 --- a/boards/arm/stm32/nucleo-f302r8/src/Make.defs +++ b/boards/arm/stm32/nucleo-f302r8/src/Make.defs @@ -34,10 +34,6 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += stm32_buttons.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - ifeq ($(CONFIG_PWM),y) CSRCS += stm32_pwm.c endif diff --git a/boards/arm/stm32/nucleo-f302r8/src/nucleo-f302r8.h b/boards/arm/stm32/nucleo-f302r8/src/nucleo-f302r8.h index 2348c4ed19799..6c3c83d04a00a 100644 --- a/boards/arm/stm32/nucleo-f302r8/src/nucleo-f302r8.h +++ b/boards/arm/stm32/nucleo-f302r8/src/nucleo-f302r8.h @@ -104,12 +104,7 @@ * Description: * Perform architecture specific initialization * - * CONFIG_BOARDCTL=y: - * If CONFIG_NSH_ARCHINITIALIZE=y: - * Called from the NSH library (or other application) - * Otherwise, assumed to be called from some other application. - * - * Otherwise CONFIG_BOARD_LATE_INITIALIZE=y: + * CONFIG_BOARD_LATE_INITIALIZE=y: * Called from board_late_initialize(). * * Otherwise, bad news: Never called diff --git a/boards/arm/stm32/nucleo-f302r8/src/stm32_appinit.c b/boards/arm/stm32/nucleo-f302r8/src/stm32_appinit.c deleted file mode 100644 index 93fb0ebd63347..0000000000000 --- a/boards/arm/stm32/nucleo-f302r8/src/stm32_appinit.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32/nucleo-f302r8/src/stm32_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 - -#include -#include - -#include "nucleo-f302r8.h" - -/**************************************************************************** - * 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 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 stm32_bringup(); -#endif -} diff --git a/boards/arm/stm32/nucleo-f302r8/src/stm32_foc_ihm07m1.c b/boards/arm/stm32/nucleo-f302r8/src/stm32_foc_ihm07m1.c index e89f0333a586f..60471ed2ae3b2 100644 --- a/boards/arm/stm32/nucleo-f302r8/src/stm32_foc_ihm07m1.c +++ b/boards/arm/stm32/nucleo-f302r8/src/stm32_foc_ihm07m1.c @@ -172,8 +172,6 @@ static struct stm32_foc_adc_s g_adc_cfg = * Description: * Initialize FOC driver. * - * This function should be call by board_app_initialize(). - * * Returned Value: * 0 on success, a negated errno value on failure * diff --git a/boards/arm/stm32/nucleo-f303re/configs/adc/defconfig b/boards/arm/stm32/nucleo-f303re/configs/adc/defconfig index 273e810526d8d..ea4831dc3fd30 100644 --- a/boards/arm/stm32/nucleo-f303re/configs/adc/defconfig +++ b/boards/arm/stm32/nucleo-f303re/configs/adc/defconfig @@ -24,7 +24,6 @@ CONFIG_EXAMPLES_ADC_SWTRIG=y CONFIG_IDLETHREAD_STACKSIZE=2048 CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_PREALLOC_TIMERS=4 CONFIG_RAM_SIZE=65536 diff --git a/boards/arm/stm32/nucleo-f303re/configs/pwm/defconfig b/boards/arm/stm32/nucleo-f303re/configs/pwm/defconfig index cd9e2b6a18bb9..ae10fd15e4c48 100644 --- a/boards/arm/stm32/nucleo-f303re/configs/pwm/defconfig +++ b/boards/arm/stm32/nucleo-f303re/configs/pwm/defconfig @@ -21,7 +21,6 @@ CONFIG_IDLETHREAD_STACKSIZE=2048 CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_PREALLOC_TIMERS=4 CONFIG_PWM=y diff --git a/boards/arm/stm32/nucleo-f303re/configs/serialrx/defconfig b/boards/arm/stm32/nucleo-f303re/configs/serialrx/defconfig index ab06349767288..16397524983bf 100644 --- a/boards/arm/stm32/nucleo-f303re/configs/serialrx/defconfig +++ b/boards/arm/stm32/nucleo-f303re/configs/serialrx/defconfig @@ -7,7 +7,6 @@ # # CONFIG_ARCH_FPU is not set # CONFIG_DEV_CONSOLE is not set -CONFIG_ADC=y CONFIG_ANALOG=y CONFIG_ARCH="arm" CONFIG_ARCH_BOARD="nucleo-f303re" diff --git a/boards/arm/stm32/nucleo-f303re/src/CMakeLists.txt b/boards/arm/stm32/nucleo-f303re/src/CMakeLists.txt index d52e454b8ce89..bcc8d69e66ca3 100644 --- a/boards/arm/stm32/nucleo-f303re/src/CMakeLists.txt +++ b/boards/arm/stm32/nucleo-f303re/src/CMakeLists.txt @@ -32,10 +32,6 @@ if(CONFIG_ARCH_BUTTONS) list(APPEND SRCS stm32_buttons.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinitialize.c) -endif() - if(CONFIG_ADC) list(APPEND SRCS stm32_adc.c) endif() diff --git a/boards/arm/stm32/nucleo-f303re/src/Make.defs b/boards/arm/stm32/nucleo-f303re/src/Make.defs index 73afdd9775b55..08749d74cd058 100644 --- a/boards/arm/stm32/nucleo-f303re/src/Make.defs +++ b/boards/arm/stm32/nucleo-f303re/src/Make.defs @@ -34,10 +34,6 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += stm32_buttons.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinitialize.c -endif - ifeq ($(CONFIG_ADC),y) CSRCS += stm32_adc.c endif diff --git a/boards/arm/stm32/nucleo-f303re/src/stm32_appinitialize.c b/boards/arm/stm32/nucleo-f303re/src/stm32_appinitialize.c deleted file mode 100644 index b1eac2bbc2fb2..0000000000000 --- a/boards/arm/stm32/nucleo-f303re/src/stm32_appinitialize.c +++ /dev/null @@ -1,141 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32/nucleo-f303re/src/stm32_appinitialize.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 - -#include -#include - -#include -#include - -#include "nucleo-f303re.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -#undef HAVE_LEDS -#undef HAVE_DAC - -#if !defined(CONFIG_ARCH_LEDS) && defined(CONFIG_USERLED_LOWER) -# define HAVE_LEDS 1 -#endif - -#if defined(CONFIG_DAC) -# define HAVE_DAC 1 -#endif - -/**************************************************************************** - * 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 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) -{ - int ret; - -#ifdef HAVE_LEDS - /* Register the LED driver */ - - ret = userled_lower_initialize(LED_DRIVER_PATH); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: userled_lower_initialize() failed: %d\n", ret); - return ret; - } -#endif - -#ifdef CONFIG_PWM - /* Initialize PWM and register the PWM device. */ - - ret = stm32_pwm_setup(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: stm32_pwm_setup() failed: %d\n", ret); - } -#endif - - /* Contrairement à l'ADC, il n'y a pas de BOARDIOC_DAC_SETUP spécifique. - * Il faut le faire ici - */ - -#ifdef HAVE_DAC - ret = board_dac_setup(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: board_dac_setup() failed: %d\n", ret); - return ret; - } -#endif - -#ifdef CONFIG_ADC - /* Initialize ADC and register the ADC driver. */ - - ret = stm32_adc_setup(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: stm32_adc_setup failed: %d\n", ret); - } -#endif - -#ifdef CONFIG_STM32_CAN_CHARDRIVER - /* Initialize CAN and register the CAN driver. */ - - ret = stm32_can_setup(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: stm32_can_setup failed: %d\n", ret); - } -#endif - - UNUSED(ret); - return OK; -} diff --git a/boards/arm/stm32/nucleo-f303re/src/stm32_boot.c b/boards/arm/stm32/nucleo-f303re/src/stm32_boot.c index 8bd52fcfb376c..6231f8b5f59c0 100644 --- a/boards/arm/stm32/nucleo-f303re/src/stm32_boot.c +++ b/boards/arm/stm32/nucleo-f303re/src/stm32_boot.c @@ -26,8 +26,12 @@ #include +#include +#include + #include #include +#include #include "nucleo-f303re.h" @@ -35,6 +39,17 @@ * Pre-processor Definitions ****************************************************************************/ +#undef HAVE_LEDS +#undef HAVE_DAC + +#if !defined(CONFIG_ARCH_LEDS) && defined(CONFIG_USERLED_LOWER) +# define HAVE_LEDS 1 +#endif + +#if defined(CONFIG_DAC) +# define HAVE_DAC 1 +#endif + /**************************************************************************** * Private Function Prototypes ****************************************************************************/ @@ -77,3 +92,80 @@ void stm32_boardinitialize(void) board_autoled_initialize(); #endif } + +/**************************************************************************** + * 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_intitialize() 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ + int ret; + +#ifdef HAVE_LEDS + /* Register the LED driver */ + + ret = userled_lower_initialize(LED_DRIVER_PATH); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: userled_lower_initialize() failed: %d\n", ret); + return ret; + } +#endif + +#ifdef CONFIG_PWM + /* Initialize PWM and register the PWM device. */ + + ret = stm32_pwm_setup(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: stm32_pwm_setup() failed: %d\n", ret); + } +#endif + + /* Contrairement à l'ADC, il n'y a pas de BOARDIOC_DAC_SETUP spécifique. + * Il faut le faire ici + */ + +#ifdef HAVE_DAC + ret = board_dac_setup(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: board_dac_setup() failed: %d\n", ret); + return; + } +#endif + +#ifdef CONFIG_ADC + /* Initialize ADC and register the ADC driver. */ + + ret = stm32_adc_setup(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: stm32_adc_setup failed: %d\n", ret); + } +#endif + +#ifdef CONFIG_STM32_CAN_CHARDRIVER + /* Initialize CAN and register the CAN driver. */ + + ret = stm32_can_setup(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: stm32_can_setup failed: %d\n", ret); + } +#endif + + UNUSED(ret); +} +#endif /* CONFIG_BOARD_LATE_INITIALIZE */ diff --git a/boards/arm/stm32/nucleo-f303ze/configs/adc/defconfig b/boards/arm/stm32/nucleo-f303ze/configs/adc/defconfig index a9efebaebfdb3..b90be268b186f 100644 --- a/boards/arm/stm32/nucleo-f303ze/configs/adc/defconfig +++ b/boards/arm/stm32/nucleo-f303ze/configs/adc/defconfig @@ -27,7 +27,6 @@ CONFIG_IDLETHREAD_STACKSIZE=2048 CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_PREALLOC_TIMERS=4 CONFIG_RAM_SIZE=65536 diff --git a/boards/arm/stm32/nucleo-f303ze/src/CMakeLists.txt b/boards/arm/stm32/nucleo-f303ze/src/CMakeLists.txt index 623d086de4f04..5c6e0c74cb3cf 100644 --- a/boards/arm/stm32/nucleo-f303ze/src/CMakeLists.txt +++ b/boards/arm/stm32/nucleo-f303ze/src/CMakeLists.txt @@ -32,10 +32,6 @@ if(CONFIG_ARCH_BUTTONS) list(APPEND SRCS stm32_buttons.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinitialize.c) -endif() - if(CONFIG_ADC) list(APPEND SRCS stm32_adc.c) endif() diff --git a/boards/arm/stm32/nucleo-f303ze/src/Make.defs b/boards/arm/stm32/nucleo-f303ze/src/Make.defs index 983e35383fe61..099d67193b38b 100644 --- a/boards/arm/stm32/nucleo-f303ze/src/Make.defs +++ b/boards/arm/stm32/nucleo-f303ze/src/Make.defs @@ -34,10 +34,6 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += stm32_buttons.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinitialize.c -endif - ifeq ($(CONFIG_ADC),y) CSRCS += stm32_adc.c endif diff --git a/boards/arm/stm32/nucleo-f303ze/src/stm32_appinitialize.c b/boards/arm/stm32/nucleo-f303ze/src/stm32_appinitialize.c deleted file mode 100644 index b09706aff0511..0000000000000 --- a/boards/arm/stm32/nucleo-f303ze/src/stm32_appinitialize.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32/nucleo-f303ze/src/stm32_appinitialize.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 - -#include -#include - -#include "nucleo-f303ze.h" - -/**************************************************************************** - * 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 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 stm32_bringup(); -#endif -} diff --git a/boards/arm/stm32/nucleo-f303ze/src/stm32_boot.c b/boards/arm/stm32/nucleo-f303ze/src/stm32_boot.c index bb71110be887f..f2c54d36d4e31 100644 --- a/boards/arm/stm32/nucleo-f303ze/src/stm32_boot.c +++ b/boards/arm/stm32/nucleo-f303ze/src/stm32_boot.c @@ -76,12 +76,6 @@ void stm32_boardinitialize(void) #ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { -#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_BOARDCTL) - /* Perform board bring-up here instead of from the - * board_app_initialize(). - */ - stm32_bringup(); -#endif } #endif diff --git a/boards/arm/stm32/nucleo-f303ze/src/stm32_bringup.c b/boards/arm/stm32/nucleo-f303ze/src/stm32_bringup.c index 0afd939a921ba..697969eec6678 100644 --- a/boards/arm/stm32/nucleo-f303ze/src/stm32_bringup.c +++ b/boards/arm/stm32/nucleo-f303ze/src/stm32_bringup.c @@ -49,10 +49,6 @@ * CONFIG_BOARD_LATE_INITIALIZE=y : * Called from board_late_initialize(). * - * CONFIG_BOARD_LATE_INITIALIZE=n && CONFIG_BOARDCTL=y && - * CONFIG_NSH_ARCHINIT: - * Called from the NSH library - * ****************************************************************************/ int stm32_bringup(void) diff --git a/boards/arm/stm32/nucleo-f334r8/configs/adc/defconfig b/boards/arm/stm32/nucleo-f334r8/configs/adc/defconfig index df8f646bdc5f9..d79086661b110 100644 --- a/boards/arm/stm32/nucleo-f334r8/configs/adc/defconfig +++ b/boards/arm/stm32/nucleo-f334r8/configs/adc/defconfig @@ -18,6 +18,7 @@ CONFIG_ARCH_CHIP="stm32" CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F334R8=y CONFIG_ARCH_STACKDUMP=y +CONFIG_BOARDCTL=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y CONFIG_DISABLE_ENVIRON=y @@ -33,7 +34,6 @@ CONFIG_INIT_STACKSIZE=1024 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_NAME_MAX=16 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_BASENAME=y CONFIG_NSH_DISABLE_CAT=y diff --git a/boards/arm/stm32/nucleo-f334r8/src/CMakeLists.txt b/boards/arm/stm32/nucleo-f334r8/src/CMakeLists.txt index 49780b06c08fb..30f5bccef47a4 100644 --- a/boards/arm/stm32/nucleo-f334r8/src/CMakeLists.txt +++ b/boards/arm/stm32/nucleo-f334r8/src/CMakeLists.txt @@ -26,10 +26,6 @@ if(CONFIG_ARCH_LEDS) list(APPEND SRCS stm32_autoleds.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - if(CONFIG_ADC) list(APPEND SRCS stm32_adc.c) endif() diff --git a/boards/arm/stm32/nucleo-f334r8/src/Make.defs b/boards/arm/stm32/nucleo-f334r8/src/Make.defs index c0d906bd7ad6d..97dbc7a0f51fd 100644 --- a/boards/arm/stm32/nucleo-f334r8/src/Make.defs +++ b/boards/arm/stm32/nucleo-f334r8/src/Make.defs @@ -28,10 +28,6 @@ ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += stm32_autoleds.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - ifeq ($(CONFIG_ADC),y) CSRCS += stm32_adc.c endif diff --git a/boards/arm/stm32/nucleo-f334r8/src/stm32_appinit.c b/boards/arm/stm32/nucleo-f334r8/src/stm32_appinit.c deleted file mode 100644 index 80fc69e84c5b2..0000000000000 --- a/boards/arm/stm32/nucleo-f334r8/src/stm32_appinit.c +++ /dev/null @@ -1,139 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32/nucleo-f334r8/src/stm32_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 - -#include -#include - -#include -#include - -#include "nucleo-f334r8.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -#undef HAVE_LEDS -#undef HAVE_DAC - -#if !defined(CONFIG_ARCH_LEDS) && defined(CONFIG_USERLED_LOWER) -# define HAVE_LEDS 1 -#endif - -#if defined(CONFIG_DAC) -# define HAVE_DAC1 1 -# define HAVE_DAC2 1 -#endif - -/**************************************************************************** - * 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 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) -{ - int ret; - -#ifdef HAVE_LEDS - /* Register the LED driver */ - - ret = userled_lower_initialize(LED_DRIVER_PATH); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: userled_lower_initialize() failed: %d\n", ret); - return ret; - } -#endif - -#ifdef CONFIG_ADC - /* Initialize ADC and register the ADC driver. */ - - ret = stm32_adc_setup(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: stm32_adc_setup failed: %d\n", ret); - } -#endif - -#ifdef CONFIG_DAC - /* Initialize DAC and register the DAC driver. */ - - ret = stm32_dac_setup(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: stm32_dac_setup failed: %d\n", ret); - } -#endif - -#ifdef CONFIG_COMP - /* Initialize COMP and register the COMP driver. */ - - ret = stm32_comp_setup(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: stm32_comp_setup failed: %d\n", ret); - } -#endif - -#ifdef CONFIG_OPAMP - /* Initialize OPAMP and register the OPAMP driver. */ - - ret = stm32_opamp_setup(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: stm32_opamp_setup failed: %d\n", ret); - } -#endif - - UNUSED(ret); - return OK; -} diff --git a/boards/arm/stm32/nucleo-f334r8/src/stm32_boot.c b/boards/arm/stm32/nucleo-f334r8/src/stm32_boot.c index a2962485bb585..6387f93c8a38c 100644 --- a/boards/arm/stm32/nucleo-f334r8/src/stm32_boot.c +++ b/boards/arm/stm32/nucleo-f334r8/src/stm32_boot.c @@ -26,8 +26,12 @@ #include +#include +#include + #include #include +#include #include "nucleo-f334r8.h" @@ -35,6 +39,18 @@ * Pre-processor Definitions ****************************************************************************/ +#undef HAVE_LEDS +#undef HAVE_DAC + +#if !defined(CONFIG_ARCH_LEDS) && defined(CONFIG_USERLED_LOWER) +# define HAVE_LEDS 1 +#endif + +#if defined(CONFIG_DAC) +# define HAVE_DAC1 1 +# define HAVE_DAC2 1 +#endif + /**************************************************************************** * Private Function Prototypes ****************************************************************************/ @@ -70,3 +86,77 @@ void stm32_boardinitialize(void) board_autoled_initialize(); #endif } + +/**************************************************************************** + * 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ + int ret; + +#ifdef HAVE_LEDS + /* Register the LED driver */ + + ret = userled_lower_initialize(LED_DRIVER_PATH); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: userled_lower_initialize() failed: %d\n", ret); + return; + } +#endif + +#ifdef CONFIG_ADC + /* Initialize ADC and register the ADC driver. */ + + ret = stm32_adc_setup(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: stm32_adc_setup failed: %d\n", ret); + } +#endif + +#ifdef CONFIG_DAC + /* Initialize DAC and register the DAC driver. */ + + ret = stm32_dac_setup(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: stm32_dac_setup failed: %d\n", ret); + } +#endif + +#ifdef CONFIG_COMP + /* Initialize COMP and register the COMP driver. */ + + ret = stm32_comp_setup(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: stm32_comp_setup failed: %d\n", ret); + } +#endif + +#ifdef CONFIG_OPAMP + /* Initialize OPAMP and register the OPAMP driver. */ + + ret = stm32_opamp_setup(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: stm32_opamp_setup failed: %d\n", ret); + } +#endif + + UNUSED(ret); +} +#endif diff --git a/boards/arm/stm32/nucleo-f401re/configs/fb/defconfig b/boards/arm/stm32/nucleo-f401re/configs/fb/defconfig index 1c9cf7c067604..88504078e4d20 100644 --- a/boards/arm/stm32/nucleo-f401re/configs/fb/defconfig +++ b/boards/arm/stm32/nucleo-f401re/configs/fb/defconfig @@ -21,7 +21,6 @@ CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F401RE=y CONFIG_ARCH_INTERRUPTSTACK=2048 CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=8499 CONFIG_BUILTIN=y CONFIG_DRIVERS_VIDEO=y diff --git a/boards/arm/stm32/nucleo-f401re/src/CMakeLists.txt b/boards/arm/stm32/nucleo-f401re/src/CMakeLists.txt index 804ea88612de0..d1e694f440518 100644 --- a/boards/arm/stm32/nucleo-f401re/src/CMakeLists.txt +++ b/boards/arm/stm32/nucleo-f401re/src/CMakeLists.txt @@ -49,10 +49,6 @@ if(CONFIG_CAN_MCP2515) list(APPEND SRCS stm32_mcp2515.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - target_sources(board PRIVATE ${SRCS}) set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/flash.ld") diff --git a/boards/arm/stm32/nucleo-f401re/src/Make.defs b/boards/arm/stm32/nucleo-f401re/src/Make.defs index 372f00f24830c..45725b5052ed6 100644 --- a/boards/arm/stm32/nucleo-f401re/src/Make.defs +++ b/boards/arm/stm32/nucleo-f401re/src/Make.defs @@ -51,10 +51,6 @@ ifeq ($(CONFIG_CAN_MCP2515),y) CSRCS += stm32_mcp2515.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - DEPPATH += --dep-path board VPATH += :board CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board diff --git a/boards/arm/stm32/nucleo-f401re/src/nucleo-f401re.h b/boards/arm/stm32/nucleo-f401re/src/nucleo-f401re.h index 976fca4a406b0..09a0d7af69a92 100644 --- a/boards/arm/stm32/nucleo-f401re/src/nucleo-f401re.h +++ b/boards/arm/stm32/nucleo-f401re/src/nucleo-f401re.h @@ -238,12 +238,7 @@ extern struct sdio_dev_s *g_sdio; * Description: * Perform architecture specific initialization * - * CONFIG_BOARDCTL=y: - * If CONFIG_NSH_ARCHINITIALIZE=y: - * Called from the NSH library (or other application) - * Otherwise, assumed to be called from some other application. - * - * Otherwise CONFIG_BOARD_LATE_INITIALIZE=y: + * CONFIG_BOARD_LATE_INITIALIZE=y: * Called from board_late_initialize(). * * Otherwise, bad news: Never called diff --git a/boards/arm/stm32/nucleo-f401re/src/stm32_appinit.c b/boards/arm/stm32/nucleo-f401re/src/stm32_appinit.c deleted file mode 100644 index b1562d2d4af63..0000000000000 --- a/boards/arm/stm32/nucleo-f401re/src/stm32_appinit.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32/nucleo-f401re/src/stm32_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 - -#include -#include - -#include "nucleo-f401re.h" - -#include - -/**************************************************************************** - * 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 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 - return OK; -#else - /* Perform board initialization here */ - - return stm32_bringup(); -#endif -} diff --git a/boards/arm/stm32/nucleo-f401re/src/stm32_boot.c b/boards/arm/stm32/nucleo-f401re/src/stm32_boot.c index 73ed43ea85b24..66eb41c6066f8 100644 --- a/boards/arm/stm32/nucleo-f401re/src/stm32_boot.c +++ b/boards/arm/stm32/nucleo-f401re/src/stm32_boot.c @@ -96,10 +96,6 @@ void stm32_boardinitialize(void) #ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { - /* Perform board initialization here instead of from the - * board_app_initialize(). - */ - stm32_bringup(); } #endif diff --git a/boards/arm/stm32/nucleo-f410rb/configs/nsh/defconfig b/boards/arm/stm32/nucleo-f410rb/configs/nsh/defconfig index 493576dbaede0..58fb8efa0e53d 100644 --- a/boards/arm/stm32/nucleo-f410rb/configs/nsh/defconfig +++ b/boards/arm/stm32/nucleo-f410rb/configs/nsh/defconfig @@ -20,7 +20,6 @@ CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F410RB=y CONFIG_ARCH_INTERRUPTSTACK=2048 CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=8499 CONFIG_BUILTIN=y CONFIG_EXAMPLES_HELLO=y diff --git a/boards/arm/stm32/nucleo-f410rb/src/CMakeLists.txt b/boards/arm/stm32/nucleo-f410rb/src/CMakeLists.txt index fb6e6231e4a44..df15551bccbbe 100644 --- a/boards/arm/stm32/nucleo-f410rb/src/CMakeLists.txt +++ b/boards/arm/stm32/nucleo-f410rb/src/CMakeLists.txt @@ -36,10 +36,6 @@ if(CONFIG_ADC) list(APPEND SRCS stm32_adc.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - target_sources(board PRIVATE ${SRCS}) set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/f410rb.ld") diff --git a/boards/arm/stm32/nucleo-f410rb/src/Make.defs b/boards/arm/stm32/nucleo-f410rb/src/Make.defs index db1644aec4241..abd7559d83199 100644 --- a/boards/arm/stm32/nucleo-f410rb/src/Make.defs +++ b/boards/arm/stm32/nucleo-f410rb/src/Make.defs @@ -38,10 +38,6 @@ ifeq ($(CONFIG_ADC),y) CSRCS += stm32_adc.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - DEPPATH += --dep-path board VPATH += :board CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board diff --git a/boards/arm/stm32/nucleo-f410rb/src/stm32_appinit.c b/boards/arm/stm32/nucleo-f410rb/src/stm32_appinit.c deleted file mode 100644 index e38385f205c97..0000000000000 --- a/boards/arm/stm32/nucleo-f410rb/src/stm32_appinit.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32/nucleo-f410rb/src/stm32_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 - -#include -#include - -#include "nucleo-f410rb.h" - -/**************************************************************************** - * 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 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 stm32_bringup(); -#endif -} diff --git a/boards/arm/stm32/nucleo-f410rb/src/stm32_boot.c b/boards/arm/stm32/nucleo-f410rb/src/stm32_boot.c index b4c6108b7283a..d85baaa2d49d3 100644 --- a/boards/arm/stm32/nucleo-f410rb/src/stm32_boot.c +++ b/boards/arm/stm32/nucleo-f410rb/src/stm32_boot.c @@ -90,10 +90,6 @@ void stm32_boardinitialize(void) #ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { -#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_BOARDCTL) - /* Perform board-specific initialization */ - stm32_bringup(); -#endif } #endif diff --git a/boards/arm/stm32/nucleo-f411re/configs/mcp2515-extid/defconfig b/boards/arm/stm32/nucleo-f411re/configs/mcp2515-extid/defconfig index ae918a1619ba9..78f646b76fe3c 100644 --- a/boards/arm/stm32/nucleo-f411re/configs/mcp2515-extid/defconfig +++ b/boards/arm/stm32/nucleo-f411re/configs/mcp2515-extid/defconfig @@ -19,7 +19,6 @@ CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F411RE=y CONFIG_ARCH_INTERRUPTSTACK=2048 CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=8499 CONFIG_BUILTIN=y CONFIG_CAN=y diff --git a/boards/arm/stm32/nucleo-f411re/src/CMakeLists.txt b/boards/arm/stm32/nucleo-f411re/src/CMakeLists.txt index 112eee3d55e3e..9339106e5ded2 100644 --- a/boards/arm/stm32/nucleo-f411re/src/CMakeLists.txt +++ b/boards/arm/stm32/nucleo-f411re/src/CMakeLists.txt @@ -49,10 +49,6 @@ if(CONFIG_CAN_MCP2515) list(APPEND SRCS stm32_mcp2515.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - target_sources(board PRIVATE ${SRCS}) set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/flash.ld") diff --git a/boards/arm/stm32/nucleo-f411re/src/Make.defs b/boards/arm/stm32/nucleo-f411re/src/Make.defs index 20c1fcb2be2ad..0bab56576f560 100644 --- a/boards/arm/stm32/nucleo-f411re/src/Make.defs +++ b/boards/arm/stm32/nucleo-f411re/src/Make.defs @@ -51,10 +51,6 @@ ifeq ($(CONFIG_CAN_MCP2515),y) CSRCS += stm32_mcp2515.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - DEPPATH += --dep-path board VPATH += :board CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board diff --git a/boards/arm/stm32/nucleo-f411re/src/nucleo-f411re.h b/boards/arm/stm32/nucleo-f411re/src/nucleo-f411re.h index 88f6fdce853b6..036d7b73c37de 100644 --- a/boards/arm/stm32/nucleo-f411re/src/nucleo-f411re.h +++ b/boards/arm/stm32/nucleo-f411re/src/nucleo-f411re.h @@ -238,12 +238,7 @@ extern struct sdio_dev_s *g_sdio; * Description: * Perform architecture specific initialization * - * CONFIG_BOARDCTL=y: - * If CONFIG_NSH_ARCHINITIALIZE=y: - * Called from the NSH library (or other application) - * Otherwise, assumed to be called from some other application. - * - * Otherwise CONFIG_BOARD_LATE_INITIALIZE=y: + * CONFIG_BOARD_LATE_INITIALIZE=y: * Called from board_late_initialize(). * * Otherwise, bad news: Never called diff --git a/boards/arm/stm32/nucleo-f411re/src/stm32_appinit.c b/boards/arm/stm32/nucleo-f411re/src/stm32_appinit.c deleted file mode 100644 index c2b6d362bed92..0000000000000 --- a/boards/arm/stm32/nucleo-f411re/src/stm32_appinit.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32/nucleo-f411re/src/stm32_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 - -#include -#include - -#include "nucleo-f411re.h" - -#include - -/**************************************************************************** - * 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 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 - return OK; -#else - /* Perform board initialization here */ - - return stm32_bringup(); -#endif -} diff --git a/boards/arm/stm32/nucleo-f411re/src/stm32_boot.c b/boards/arm/stm32/nucleo-f411re/src/stm32_boot.c index 595f0d2043c26..88b543398badf 100644 --- a/boards/arm/stm32/nucleo-f411re/src/stm32_boot.c +++ b/boards/arm/stm32/nucleo-f411re/src/stm32_boot.c @@ -96,10 +96,6 @@ void stm32_boardinitialize(void) #ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { - /* Perform board initialization here instead of from the - * board_app_initialize(). - */ - stm32_bringup(); } #endif diff --git a/boards/arm/stm32/nucleo-f412zg/src/CMakeLists.txt b/boards/arm/stm32/nucleo-f412zg/src/CMakeLists.txt index 9ffcb4bb3903a..b3cae915b2537 100644 --- a/boards/arm/stm32/nucleo-f412zg/src/CMakeLists.txt +++ b/boards/arm/stm32/nucleo-f412zg/src/CMakeLists.txt @@ -26,10 +26,6 @@ if(CONFIG_ARCH_LEDS) list(APPEND SRCS stm32_autoleds.c) endif() -if(CONFIG_NSH_LIBRARY) - list(APPEND SRCS stm32_appinit.c) -endif() - if(CONFIG_STM32_OTGFS) list(APPEND SRCS stm32_usb.c) endif() diff --git a/boards/arm/stm32/nucleo-f412zg/src/Make.defs b/boards/arm/stm32/nucleo-f412zg/src/Make.defs index dd20e668bb4a2..d437533fd2453 100644 --- a/boards/arm/stm32/nucleo-f412zg/src/Make.defs +++ b/boards/arm/stm32/nucleo-f412zg/src/Make.defs @@ -29,10 +29,6 @@ ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += stm32_autoleds.c endif -ifeq ($(CONFIG_NSH_LIBRARY),y) -CSRCS += stm32_appinit.c -endif - ifeq ($(CONFIG_STM32_OTGFS),y) CSRCS += stm32_usb.c endif diff --git a/boards/arm/stm32/nucleo-f412zg/src/stm32_appinit.c b/boards/arm/stm32/nucleo-f412zg/src/stm32_appinit.c deleted file mode 100644 index 40c40fb45a741..0000000000000 --- a/boards/arm/stm32/nucleo-f412zg/src/stm32_appinit.c +++ /dev/null @@ -1,80 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32/nucleo-f412zg/src/stm32_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 - -#include -#include -#include - -#include -#include - -#include -#include - -#include -#include "nucleo-f412zg.h" - -/**************************************************************************** - * 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 cold 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) -{ -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board-specific initialization */ - - return stm32_bringup(); -#else - return OK; -#endif -} diff --git a/boards/arm/stm32/nucleo-f429zi/src/CMakeLists.txt b/boards/arm/stm32/nucleo-f429zi/src/CMakeLists.txt index 4e16a74e01a24..cfcef00556c11 100644 --- a/boards/arm/stm32/nucleo-f429zi/src/CMakeLists.txt +++ b/boards/arm/stm32/nucleo-f429zi/src/CMakeLists.txt @@ -32,10 +32,6 @@ if(CONFIG_ARCH_BUTTONS) list(APPEND SRCS stm32_buttons.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinitialize.c) -endif() - if(CONFIG_DEV_GPIO) list(APPEND SRCS stm32_gpio.c) endif() diff --git a/boards/arm/stm32/nucleo-f429zi/src/Make.defs b/boards/arm/stm32/nucleo-f429zi/src/Make.defs index 72c22ff63d23b..2824447d2d6c8 100644 --- a/boards/arm/stm32/nucleo-f429zi/src/Make.defs +++ b/boards/arm/stm32/nucleo-f429zi/src/Make.defs @@ -34,10 +34,6 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += stm32_buttons.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinitialize.c -endif - ifeq ($(CONFIG_DEV_GPIO),y) CSRCS += stm32_gpio.c endif diff --git a/boards/arm/stm32/nucleo-f429zi/src/stm32_appinitialize.c b/boards/arm/stm32/nucleo-f429zi/src/stm32_appinitialize.c deleted file mode 100644 index 3928e4469ce7b..0000000000000 --- a/boards/arm/stm32/nucleo-f429zi/src/stm32_appinitialize.c +++ /dev/null @@ -1,226 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32/nucleo-f429zi/src/stm32_appinitialize.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 - -#include -#include -#include - -#include "nucleo-144.h" -#include -#include -#ifdef CONFIG_STM32_ROMFS -#include "stm32_romfs.h" -#endif - -#ifdef CONFIG_SENSORS_AMG88XX -#include "stm32_amg88xx.h" -#endif - -#if defined(CONFIG_I2C) && defined(CONFIG_SYSTEM_I2CTOOL) -# include "stm32_i2c.h" -#endif - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: stm32_i2c_register - * - * Description: - * Register one I2C drivers for the I2C tool. - * - ****************************************************************************/ - -#if defined(CONFIG_I2C) && defined(CONFIG_SYSTEM_I2CTOOL) -static void stm32_i2c_register(int bus) -{ - struct i2c_master_s *i2c; - int ret; - - i2c = stm32_i2cbus_initialize(bus); - if (i2c == NULL) - { - syslog(LOG_ERR, "ERROR: Failed to get I2C%d interface\n", bus); - } - else - { - ret = i2c_register(i2c, bus); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: Failed to register I2C%d driver: %d\n", - bus, ret); - stm32_i2cbus_uninitialize(i2c); - } - } -} -#endif - -/**************************************************************************** - * 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 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) -{ - int ret; - -#ifdef CONFIG_FS_PROCFS - /* Mount the procfs file system */ - - ret = nx_mount(NULL, STM32_PROCFS_MOUNTPOINT, "procfs", 0, NULL); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: Failed to mount procfs at %s: %d\n", - STM32_PROCFS_MOUNTPOINT, ret); - } -#endif - -#ifdef CONFIG_STM32_ROMFS - /* Mount the romfs partition */ - - ret = stm32_romfs_initialize(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: Failed to mount romfs at %s: %d\n", - CONFIG_STM32_ROMFS_MOUNTPOINT, ret); - } -#endif - -#ifdef CONFIG_DEV_GPIO - /* Register the GPIO driver */ - - ret = stm32_gpio_initialize(); - if (ret < 0) - { - syslog(LOG_ERR, "Failed to initialize GPIO Driver: %d\n", ret); - return ret; - } -#endif - -#if !defined(CONFIG_ARCH_LEDS) && defined(CONFIG_USERLED_LOWER) - /* Register the LED driver */ - - ret = userled_lower_initialize(LED_DRIVER_PATH); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: userled_lower_initialize() failed: %d\n", ret); - } -#endif - -#ifdef CONFIG_ADC - /* Initialize ADC and register the ADC driver. */ - - ret = stm32_adc_setup(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: stm32_adc_setup failed: %d\n", ret); - } -#endif - -#ifdef CONFIG_STM32_BBSRAM - /* Initialize battery-backed RAM */ - - stm32_bbsram_int(); -#endif - -#if defined(CONFIG_FAT_DMAMEMORY) - if (stm32_dma_alloc_init() < 0) - { - syslog(LOG_ERR, "DMA alloc FAILED"); - } -#endif - -#if defined(CONFIG_NUCLEO_SPI_TEST) - /* Create SPI interfaces */ - - ret = stm32_spidev_bus_test(); - if (ret != OK) - { - syslog(LOG_ERR, "ERROR: Failed to initialize SPI interfaces: %d\n", - ret); - return ret; - } -#endif - -#if defined(CONFIG_MMCSD) - /* Initialize the SDIO block driver */ - - ret = stm32_sdio_initialize(); - if (ret != OK) - { - ferr("ERROR: Failed to initialize MMC/SD driver: %d\n", ret); - return ret; - } -#endif - -#if defined(CONFIG_PWM) - /* Initialize PWM and register the PWM device */ - - ret = stm32_pwm_setup(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: stm32_pwm_setup() failed: %d\n", ret); - } -#endif - -#if defined(CONFIG_I2C) && defined(CONFIG_SYSTEM_I2CTOOL) - stm32_i2c_register(1); -#endif - -#ifdef CONFIG_SENSORS_AMG88XX - board_amg88xx_initialize(1); -#endif - - UNUSED(ret); - return OK; -} diff --git a/boards/arm/stm32/nucleo-f429zi/src/stm32_boot.c b/boards/arm/stm32/nucleo-f429zi/src/stm32_boot.c index 81996d6e206b2..f6131a8308b42 100644 --- a/boards/arm/stm32/nucleo-f429zi/src/stm32_boot.c +++ b/boards/arm/stm32/nucleo-f429zi/src/stm32_boot.c @@ -28,12 +28,65 @@ #include +#include +#include + #include +#include +#include #include #include "arm_internal.h" #include "nucleo-144.h" +#ifdef CONFIG_STM32_ROMFS +#include "stm32_romfs.h" +#endif + +#ifdef CONFIG_SENSORS_AMG88XX +#include "stm32_amg88xx.h" +#endif + +#if defined(CONFIG_I2C) && defined(CONFIG_SYSTEM_I2CTOOL) +# include "stm32_i2c.h" +#endif + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: stm32_i2c_register + * + * Description: + * Register one I2C drivers for the I2C tool. + * + ****************************************************************************/ + +#if defined(CONFIG_I2C) && defined(CONFIG_SYSTEM_I2CTOOL) +static void stm32_i2c_register(int bus) +{ + struct i2c_master_s *i2c; + int ret; + + i2c = stm32_i2cbus_initialize(bus); + if (i2c == NULL) + { + syslog(LOG_ERR, "ERROR: Failed to get I2C%d interface\n", bus); + } + else + { + ret = i2c_register(i2c, bus); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: Failed to register I2C%d driver: %d\n", + bus, ret); + stm32_i2cbus_uninitialize(i2c); + } + } +} +#endif + /**************************************************************************** * Public Functions ****************************************************************************/ @@ -85,13 +138,115 @@ void stm32_boardinitialize(void) #ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { -#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_BOARDCTL) - /* Perform NSH initialization here instead of from the NSH. This - * alternative NSH initialization is necessary when NSH is ran in - * user-space but the initialization function must run in kernel space. - */ + int ret; - board_app_initialize(0); +#ifdef CONFIG_FS_PROCFS + /* Mount the procfs file system */ + + ret = nx_mount(NULL, STM32_PROCFS_MOUNTPOINT, "procfs", 0, NULL); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: Failed to mount procfs at %s: %d\n", + STM32_PROCFS_MOUNTPOINT, ret); + } +#endif + +#ifdef CONFIG_STM32_ROMFS + /* Mount the romfs partition */ + + ret = stm32_romfs_initialize(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: Failed to mount romfs at %s: %d\n", + CONFIG_STM32_ROMFS_MOUNTPOINT, ret); + } #endif + +#ifdef CONFIG_DEV_GPIO + /* Register the GPIO driver */ + + ret = stm32_gpio_initialize(); + if (ret < 0) + { + syslog(LOG_ERR, "Failed to initialize GPIO Driver: %d\n", ret); + return; + } +#endif + +#if !defined(CONFIG_ARCH_LEDS) && defined(CONFIG_USERLED_LOWER) + /* Register the LED driver */ + + ret = userled_lower_initialize(LED_DRIVER_PATH); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: userled_lower_initialize() failed: %d\n", ret); + } +#endif + +#ifdef CONFIG_ADC + /* Initialize ADC and register the ADC driver. */ + + ret = stm32_adc_setup(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: stm32_adc_setup failed: %d\n", ret); + } +#endif + +#ifdef CONFIG_STM32_BBSRAM + /* Initialize battery-backed RAM */ + + stm32_bbsram_int(); +#endif + +#if defined(CONFIG_FAT_DMAMEMORY) + if (stm32_dma_alloc_init() < 0) + { + syslog(LOG_ERR, "DMA alloc FAILED"); + } +#endif + +#if defined(CONFIG_NUCLEO_SPI_TEST) + /* Create SPI interfaces */ + + ret = stm32_spidev_bus_test(); + if (ret != OK) + { + syslog(LOG_ERR, "ERROR: Failed to initialize SPI interfaces: %d\n", + ret); + return; + } +#endif + +#if defined(CONFIG_MMCSD) + /* Initialize the SDIO block driver */ + + ret = stm32_sdio_initialize(); + if (ret != OK) + { + ferr("ERROR: Failed to initialize MMC/SD driver: %d\n", ret); + return; + } +#endif + +#if defined(CONFIG_PWM) + /* Initialize PWM and register the PWM device */ + + ret = stm32_pwm_setup(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: stm32_pwm_setup() failed: %d\n", ret); + } +#endif + +#if defined(CONFIG_I2C) && defined(CONFIG_SYSTEM_I2CTOOL) + stm32_i2c_register(1); +#endif + +#ifdef CONFIG_SENSORS_AMG88XX + board_amg88xx_initialize(1); +#endif + + UNUSED(ret); } #endif diff --git a/boards/arm/stm32/nucleo-f446re/configs/adc/defconfig b/boards/arm/stm32/nucleo-f446re/configs/adc/defconfig index 4af6275c0ee08..20fde7d94c882 100644 --- a/boards/arm/stm32/nucleo-f446re/configs/adc/defconfig +++ b/boards/arm/stm32/nucleo-f446re/configs/adc/defconfig @@ -31,7 +31,6 @@ CONFIG_HAVE_CXXINITIALIZE=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/nucleo-f446re/configs/can/defconfig b/boards/arm/stm32/nucleo-f446re/configs/can/defconfig index 1e8762e99bb2d..f699366f92dc5 100644 --- a/boards/arm/stm32/nucleo-f446re/configs/can/defconfig +++ b/boards/arm/stm32/nucleo-f446re/configs/can/defconfig @@ -20,7 +20,6 @@ CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F446R=y CONFIG_ARCH_INTERRUPTSTACK=2048 CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=8499 CONFIG_BUILTIN=y CONFIG_EXAMPLES_CAN=y diff --git a/boards/arm/stm32/nucleo-f446re/configs/cansock/defconfig b/boards/arm/stm32/nucleo-f446re/configs/cansock/defconfig index 5e5b228b16a6f..1ed153216c627 100644 --- a/boards/arm/stm32/nucleo-f446re/configs/cansock/defconfig +++ b/boards/arm/stm32/nucleo-f446re/configs/cansock/defconfig @@ -21,7 +21,6 @@ CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F446R=y CONFIG_ARCH_INTERRUPTSTACK=2048 CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=8499 CONFIG_BUILTIN=y CONFIG_CANUTILS_CANDUMP=y diff --git a/boards/arm/stm32/nucleo-f446re/configs/dac/defconfig b/boards/arm/stm32/nucleo-f446re/configs/dac/defconfig index 219c638ce8021..8b4215f22ec5d 100644 --- a/boards/arm/stm32/nucleo-f446re/configs/dac/defconfig +++ b/boards/arm/stm32/nucleo-f446re/configs/dac/defconfig @@ -21,7 +21,6 @@ CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F446R=y CONFIG_ARCH_INTERRUPTSTACK=2048 CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=8499 CONFIG_BUILTIN=y CONFIG_DAC=y diff --git a/boards/arm/stm32/nucleo-f446re/configs/gpio/defconfig b/boards/arm/stm32/nucleo-f446re/configs/gpio/defconfig index eb53d2b195f2f..7436007b48370 100644 --- a/boards/arm/stm32/nucleo-f446re/configs/gpio/defconfig +++ b/boards/arm/stm32/nucleo-f446re/configs/gpio/defconfig @@ -20,7 +20,6 @@ CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F446R=y CONFIG_ARCH_INTERRUPTSTACK=2048 CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=8499 CONFIG_BUILTIN=y CONFIG_DEV_GPIO=y diff --git a/boards/arm/stm32/nucleo-f446re/configs/ihm08m1_b16/defconfig b/boards/arm/stm32/nucleo-f446re/configs/ihm08m1_b16/defconfig index 6ed91656bee41..2c152f31e767a 100644 --- a/boards/arm/stm32/nucleo-f446re/configs/ihm08m1_b16/defconfig +++ b/boards/arm/stm32/nucleo-f446re/configs/ihm08m1_b16/defconfig @@ -21,6 +21,7 @@ CONFIG_ARCH_CHIP_STM32F446R=y CONFIG_ARCH_INTERRUPTSTACK=1024 CONFIG_ARCH_IRQBUTTONS=y CONFIG_ARMV7M_LIBM=y +CONFIG_BOARDCTL=y CONFIG_BOARD_LOOPSPERMSEC=8499 CONFIG_BOARD_STM32_IHM08M1=y CONFIG_BOARD_STM32_IHM08M1_POT=y @@ -55,7 +56,6 @@ CONFIG_MOTOR=y CONFIG_MOTOR_FOC=y CONFIG_MOTOR_FOC_TRACE=y CONFIG_MQ_MAXMSGSIZE=5 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_RAM_SIZE=16386 CONFIG_RAM_START=0x20000000 diff --git a/boards/arm/stm32/nucleo-f446re/configs/ihm08m1_f32/defconfig b/boards/arm/stm32/nucleo-f446re/configs/ihm08m1_f32/defconfig index 7779285646dd6..5b3e84da6ad8a 100644 --- a/boards/arm/stm32/nucleo-f446re/configs/ihm08m1_f32/defconfig +++ b/boards/arm/stm32/nucleo-f446re/configs/ihm08m1_f32/defconfig @@ -21,6 +21,7 @@ CONFIG_ARCH_CHIP_STM32F446R=y CONFIG_ARCH_INTERRUPTSTACK=1024 CONFIG_ARCH_IRQBUTTONS=y CONFIG_ARMV7M_LIBM=y +CONFIG_BOARDCTL=y CONFIG_BOARD_LOOPSPERMSEC=8499 CONFIG_BOARD_STM32_IHM08M1=y CONFIG_BOARD_STM32_IHM08M1_POT=y @@ -55,7 +56,6 @@ CONFIG_MOTOR=y CONFIG_MOTOR_FOC=y CONFIG_MOTOR_FOC_TRACE=y CONFIG_MQ_MAXMSGSIZE=5 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_RAM_SIZE=16386 CONFIG_RAM_START=0x20000000 diff --git a/boards/arm/stm32/nucleo-f446re/configs/lcd/defconfig b/boards/arm/stm32/nucleo-f446re/configs/lcd/defconfig index 301a6929b42ba..2c85afecb9f49 100644 --- a/boards/arm/stm32/nucleo-f446re/configs/lcd/defconfig +++ b/boards/arm/stm32/nucleo-f446re/configs/lcd/defconfig @@ -20,7 +20,6 @@ CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F446R=y CONFIG_ARCH_INTERRUPTSTACK=2048 CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=8499 CONFIG_BUILTIN=y CONFIG_DRIVERS_VIDEO=y diff --git a/boards/arm/stm32/nucleo-f446re/configs/pwm/defconfig b/boards/arm/stm32/nucleo-f446re/configs/pwm/defconfig index 1a341aeeb8ad5..64d5b681a44e8 100644 --- a/boards/arm/stm32/nucleo-f446re/configs/pwm/defconfig +++ b/boards/arm/stm32/nucleo-f446re/configs/pwm/defconfig @@ -20,7 +20,6 @@ CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F446R=y CONFIG_ARCH_INTERRUPTSTACK=2048 CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=8499 CONFIG_BUILTIN=y CONFIG_EXAMPLES_PWM=y diff --git a/boards/arm/stm32/nucleo-f446re/configs/qenco/defconfig b/boards/arm/stm32/nucleo-f446re/configs/qenco/defconfig index fdf0171833183..d0da232ae1bc8 100644 --- a/boards/arm/stm32/nucleo-f446re/configs/qenco/defconfig +++ b/boards/arm/stm32/nucleo-f446re/configs/qenco/defconfig @@ -24,7 +24,6 @@ CONFIG_EXAMPLES_QENCODER_MAXPOS=8192 CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_MQ_MAXMSGSIZE=5 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NUCLEO_F446RE_QETIMER=2 CONFIG_NUCLEO_F446RE_QETIMER_TIM2_IHM08M1_MAP=y diff --git a/boards/arm/stm32/nucleo-f446re/src/CMakeLists.txt b/boards/arm/stm32/nucleo-f446re/src/CMakeLists.txt index 3b4ebe0a2e4c8..f9d569a51e955 100644 --- a/boards/arm/stm32/nucleo-f446re/src/CMakeLists.txt +++ b/boards/arm/stm32/nucleo-f446re/src/CMakeLists.txt @@ -66,10 +66,6 @@ if(CONFIG_DAC) list(APPEND SRCS stm32_dac.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - if(CONFIG_BOARD_STM32_IHM08M1) list(APPEND SRCS stm32_foc_ihm08m1.c) endif() diff --git a/boards/arm/stm32/nucleo-f446re/src/Make.defs b/boards/arm/stm32/nucleo-f446re/src/Make.defs index 34e905cd1836b..968930b97673e 100644 --- a/boards/arm/stm32/nucleo-f446re/src/Make.defs +++ b/boards/arm/stm32/nucleo-f446re/src/Make.defs @@ -68,10 +68,6 @@ ifeq ($(CONFIG_DAC),y) CSRCS += stm32_dac.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - ifeq ($(CONFIG_BOARD_STM32_IHM08M1),y) CSRCS += stm32_foc_ihm08m1.c endif diff --git a/boards/arm/stm32/nucleo-f446re/src/nucleo-f446re.h b/boards/arm/stm32/nucleo-f446re/src/nucleo-f446re.h index 00d8318d399b6..9510bade876e0 100644 --- a/boards/arm/stm32/nucleo-f446re/src/nucleo-f446re.h +++ b/boards/arm/stm32/nucleo-f446re/src/nucleo-f446re.h @@ -270,12 +270,7 @@ extern struct sdio_dev_s *g_sdio; * Description: * Perform architecture specific initialization * - * CONFIG_BOARDCTL=y: - * If CONFIG_NSH_ARCHINITIALIZE=y: - * Called from the NSH library (or other application) - * Otherwise, assumed to be called from some other application. - * - * Otherwise CONFIG_BOARD_LATE_INITIALIZE=y: + * CONFIG_BOARD_LATE_INITIALIZE=y: * Called from board_late_initialize(). * * Otherwise, bad news: Never called diff --git a/boards/arm/stm32/nucleo-f446re/src/stm32_appinit.c b/boards/arm/stm32/nucleo-f446re/src/stm32_appinit.c deleted file mode 100644 index 0c7bd5d1cbbe5..0000000000000 --- a/boards/arm/stm32/nucleo-f446re/src/stm32_appinit.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32/nucleo-f446re/src/stm32_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 - -#include -#include - -#include "nucleo-f446re.h" - -/**************************************************************************** - * 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 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 stm32_bringup(); -#endif -} diff --git a/boards/arm/stm32/nucleo-f446re/src/stm32_foc_ihm08m1.c b/boards/arm/stm32/nucleo-f446re/src/stm32_foc_ihm08m1.c index 9b71f0a53648c..b8d484361170f 100644 --- a/boards/arm/stm32/nucleo-f446re/src/stm32_foc_ihm08m1.c +++ b/boards/arm/stm32/nucleo-f446re/src/stm32_foc_ihm08m1.c @@ -177,8 +177,6 @@ static struct stm32_foc_adc_s g_adc_cfg = * Description: * Initialize FOC driver. * - * This function should be call by board_app_initialize(). - * * Returned Value: * 0 on success, a negated errno value on failure * diff --git a/boards/arm/stm32/nucleo-g431kb/configs/comp/defconfig b/boards/arm/stm32/nucleo-g431kb/configs/comp/defconfig index 2c4172a3ebc08..e8920793d3846 100644 --- a/boards/arm/stm32/nucleo-g431kb/configs/comp/defconfig +++ b/boards/arm/stm32/nucleo-g431kb/configs/comp/defconfig @@ -24,7 +24,6 @@ CONFIG_EXAMPLES_DAC_DEVPATH="/dev/dac5" CONFIG_FILE_STREAM=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_RAM_SIZE=22528 CONFIG_RAM_START=0x20000000 diff --git a/boards/arm/stm32/nucleo-g431kb/configs/pwm/defconfig b/boards/arm/stm32/nucleo-g431kb/configs/pwm/defconfig index c68b66945338c..0b2da0d811347 100644 --- a/boards/arm/stm32/nucleo-g431kb/configs/pwm/defconfig +++ b/boards/arm/stm32/nucleo-g431kb/configs/pwm/defconfig @@ -20,7 +20,6 @@ CONFIG_EXAMPLES_PWM=y CONFIG_FILE_STREAM=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_PWM=y CONFIG_RAM_SIZE=22528 diff --git a/boards/arm/stm32/nucleo-g431kb/src/CMakeLists.txt b/boards/arm/stm32/nucleo-g431kb/src/CMakeLists.txt index 78450b1fcb9ba..e45962dfe2070 100644 --- a/boards/arm/stm32/nucleo-g431kb/src/CMakeLists.txt +++ b/boards/arm/stm32/nucleo-g431kb/src/CMakeLists.txt @@ -32,10 +32,6 @@ if(CONFIG_PWM) list(APPEND SRCS stm32_pwm.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - if(CONFIG_STM32_COMP) list(APPEND SRCS stm32_comp.c) endif() diff --git a/boards/arm/stm32/nucleo-g431kb/src/Make.defs b/boards/arm/stm32/nucleo-g431kb/src/Make.defs index a366373e9a0de..7aa1045c6a8c3 100644 --- a/boards/arm/stm32/nucleo-g431kb/src/Make.defs +++ b/boards/arm/stm32/nucleo-g431kb/src/Make.defs @@ -35,10 +35,6 @@ ifeq ($(CONFIG_PWM),y) CSRCS += stm32_pwm.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - ifeq ($(CONFIG_STM32_COMP),y) CSRCS += stm32_comp.c endif diff --git a/boards/arm/stm32/nucleo-g431kb/src/nucleo-g431kb.h b/boards/arm/stm32/nucleo-g431kb/src/nucleo-g431kb.h index f4ba5640df278..147f4c3479d1f 100644 --- a/boards/arm/stm32/nucleo-g431kb/src/nucleo-g431kb.h +++ b/boards/arm/stm32/nucleo-g431kb/src/nucleo-g431kb.h @@ -78,16 +78,9 @@ * Description: * Perform architecture specific initialization * - * CONFIG_BOARDCTL=y: - * If CONFIG_NSH_ARCHINITIALIZE=y: - * Called from the NSH library (or other application) - * Otherwise, assumed to be called from some other application. - * - * Otherwise CONFIG_BOARD_LATE_INITIALIZE=y: + * CONFIG_BOARD_LATE_INITIALIZE=y: * Called from board_late_initialize(). * - * Otherwise, bad news: Never called - * ****************************************************************************/ int stm32_bringup(void); diff --git a/boards/arm/stm32/nucleo-g431kb/src/stm32_appinit.c b/boards/arm/stm32/nucleo-g431kb/src/stm32_appinit.c deleted file mode 100644 index 613b989581c86..0000000000000 --- a/boards/arm/stm32/nucleo-g431kb/src/stm32_appinit.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32/nucleo-g431kb/src/stm32_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 - -#include -#include - -#include "nucleo-g431kb.h" - -/**************************************************************************** - * 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 stm32_bringup(); -#endif -} diff --git a/boards/arm/stm32/nucleo-g431rb/configs/adc/defconfig b/boards/arm/stm32/nucleo-g431rb/configs/adc/defconfig index 8b824a0bb970c..b7fba87168cff 100644 --- a/boards/arm/stm32/nucleo-g431rb/configs/adc/defconfig +++ b/boards/arm/stm32/nucleo-g431rb/configs/adc/defconfig @@ -25,16 +25,12 @@ CONFIG_DISABLE_ENVIRON=y CONFIG_DISABLE_MQUEUE=y CONFIG_DISABLE_POSIX_TIMERS=y CONFIG_DISABLE_PTHREAD=y -CONFIG_EXAMPLES_ADC=y -CONFIG_EXAMPLES_ADC_GROUPSIZE=3 -CONFIG_EXAMPLES_ADC_SWTRIG=y CONFIG_FDCLONE_STDIO=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=1024 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_NAME_MAX=16 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_BASENAME=y CONFIG_NSH_DISABLE_CAT=y diff --git a/boards/arm/stm32/nucleo-g431rb/configs/can/defconfig b/boards/arm/stm32/nucleo-g431rb/configs/can/defconfig index e8dc81283f555..8b9deb029cca2 100644 --- a/boards/arm/stm32/nucleo-g431rb/configs/can/defconfig +++ b/boards/arm/stm32/nucleo-g431rb/configs/can/defconfig @@ -31,7 +31,6 @@ CONFIG_EXAMPLES_CAN=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/nucleo-g431rb/configs/cansock/defconfig b/boards/arm/stm32/nucleo-g431rb/configs/cansock/defconfig index e0d9a634a3322..934b41419ba95 100644 --- a/boards/arm/stm32/nucleo-g431rb/configs/cansock/defconfig +++ b/boards/arm/stm32/nucleo-g431rb/configs/cansock/defconfig @@ -18,7 +18,6 @@ CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32G431R=y CONFIG_ARCH_INTERRUPTSTACK=1024 CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=8499 CONFIG_BOARD_NUCLEO_G431RB_USE_HSE=y CONFIG_BUILTIN=y diff --git a/boards/arm/stm32/nucleo-g431rb/configs/cordic/defconfig b/boards/arm/stm32/nucleo-g431rb/configs/cordic/defconfig index ead5e4e83f669..c9f307a26b81a 100644 --- a/boards/arm/stm32/nucleo-g431rb/configs/cordic/defconfig +++ b/boards/arm/stm32/nucleo-g431rb/configs/cordic/defconfig @@ -32,7 +32,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_FLOATINGPOINT=y CONFIG_LINE_MAX=64 CONFIG_MATH_CORDIC=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/nucleo-g431rb/configs/ihm16m1_b16/defconfig b/boards/arm/stm32/nucleo-g431rb/configs/ihm16m1_b16/defconfig index b417c73167448..b356e09803124 100644 --- a/boards/arm/stm32/nucleo-g431rb/configs/ihm16m1_b16/defconfig +++ b/boards/arm/stm32/nucleo-g431rb/configs/ihm16m1_b16/defconfig @@ -22,6 +22,7 @@ CONFIG_ARCH_CHIP_STM32G431R=y CONFIG_ARCH_INTERRUPTSTACK=1024 CONFIG_ARCH_IRQBUTTONS=y CONFIG_ARMV7M_LIBM=y +CONFIG_BOARDCTL=y CONFIG_BOARD_LOOPSPERMSEC=8499 CONFIG_BOARD_STM32_IHM16M1=y CONFIG_BOARD_STM32_IHM16M1_POT=y @@ -57,7 +58,6 @@ CONFIG_MOTOR=y CONFIG_MOTOR_FOC=y CONFIG_MOTOR_FOC_TRACE=y CONFIG_MQ_MAXMSGSIZE=5 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_RAM_SIZE=22528 CONFIG_RAM_START=0x20000000 diff --git a/boards/arm/stm32/nucleo-g431rb/configs/ihm16m1_f32/defconfig b/boards/arm/stm32/nucleo-g431rb/configs/ihm16m1_f32/defconfig index ebee546e5a75e..9f92e6d439374 100644 --- a/boards/arm/stm32/nucleo-g431rb/configs/ihm16m1_f32/defconfig +++ b/boards/arm/stm32/nucleo-g431rb/configs/ihm16m1_f32/defconfig @@ -22,6 +22,7 @@ CONFIG_ARCH_CHIP_STM32G431R=y CONFIG_ARCH_INTERRUPTSTACK=1024 CONFIG_ARCH_IRQBUTTONS=y CONFIG_ARMV7M_LIBM=y +CONFIG_BOARDCTL=y CONFIG_BOARD_LOOPSPERMSEC=8499 CONFIG_BOARD_STM32_IHM16M1=y CONFIG_BOARD_STM32_IHM16M1_POT=y @@ -57,7 +58,6 @@ CONFIG_MOTOR=y CONFIG_MOTOR_FOC=y CONFIG_MOTOR_FOC_TRACE=y CONFIG_MQ_MAXMSGSIZE=5 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_RAM_SIZE=22528 CONFIG_RAM_START=0x20000000 diff --git a/boards/arm/stm32/nucleo-g431rb/configs/pwm/defconfig b/boards/arm/stm32/nucleo-g431rb/configs/pwm/defconfig index b3e2f85e2fad5..f5f8cceccf220 100644 --- a/boards/arm/stm32/nucleo-g431rb/configs/pwm/defconfig +++ b/boards/arm/stm32/nucleo-g431rb/configs/pwm/defconfig @@ -23,7 +23,6 @@ CONFIG_FILE_STREAM=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=80 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=1024 CONFIG_PWM=y diff --git a/boards/arm/stm32/nucleo-g431rb/configs/qenco/defconfig b/boards/arm/stm32/nucleo-g431rb/configs/qenco/defconfig index 7f5474f7ce48b..d28ba012df2b2 100644 --- a/boards/arm/stm32/nucleo-g431rb/configs/qenco/defconfig +++ b/boards/arm/stm32/nucleo-g431rb/configs/qenco/defconfig @@ -31,7 +31,6 @@ CONFIG_HAVE_CXXINITIALIZE=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/nucleo-g431rb/src/CMakeLists.txt b/boards/arm/stm32/nucleo-g431rb/src/CMakeLists.txt index 67ad9875838df..f25dfbffa4954 100644 --- a/boards/arm/stm32/nucleo-g431rb/src/CMakeLists.txt +++ b/boards/arm/stm32/nucleo-g431rb/src/CMakeLists.txt @@ -32,10 +32,6 @@ if(CONFIG_ARCH_BUTTONS) list(APPEND SRCS stm32_buttons.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - if(NOT CONFIG_STM32_FOC) if(CONFIG_PWM) list(APPEND SRCS stm32_pwm.c) diff --git a/boards/arm/stm32/nucleo-g431rb/src/Make.defs b/boards/arm/stm32/nucleo-g431rb/src/Make.defs index 47de6b5d7482f..14403c2270048 100644 --- a/boards/arm/stm32/nucleo-g431rb/src/Make.defs +++ b/boards/arm/stm32/nucleo-g431rb/src/Make.defs @@ -35,10 +35,6 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += stm32_buttons.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - ifneq ($(CONFIG_STM32_FOC),y) ifeq ($(CONFIG_PWM),y) CSRCS += stm32_pwm.c diff --git a/boards/arm/stm32/nucleo-g431rb/src/nucleo-g431rb.h b/boards/arm/stm32/nucleo-g431rb/src/nucleo-g431rb.h index 6676cf3293975..a00571f7c2ead 100644 --- a/boards/arm/stm32/nucleo-g431rb/src/nucleo-g431rb.h +++ b/boards/arm/stm32/nucleo-g431rb/src/nucleo-g431rb.h @@ -105,12 +105,7 @@ * Description: * Perform architecture specific initialization * - * CONFIG_BOARDCTL=y: - * If CONFIG_NSH_ARCHINITIALIZE=y: - * Called from the NSH library (or other application) - * Otherwise, assumed to be called from some other application. - * - * Otherwise CONFIG_BOARD_LATE_INITIALIZE=y: + * CONFIG_BOARD_LATE_INITIALIZE=y: * Called from board_late_initialize(). * * Otherwise, bad news: Never called diff --git a/boards/arm/stm32/nucleo-g431rb/src/stm32_appinit.c b/boards/arm/stm32/nucleo-g431rb/src/stm32_appinit.c deleted file mode 100644 index 30bd426d71caf..0000000000000 --- a/boards/arm/stm32/nucleo-g431rb/src/stm32_appinit.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32/nucleo-g431rb/src/stm32_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 - -#include -#include - -#include "nucleo-g431rb.h" - -/**************************************************************************** - * 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 stm32_bringup(); -#endif -} diff --git a/boards/arm/stm32/nucleo-g431rb/src/stm32_foc_ihm16m1.c b/boards/arm/stm32/nucleo-g431rb/src/stm32_foc_ihm16m1.c index 290c97f82ad4c..73316003dd0e7 100644 --- a/boards/arm/stm32/nucleo-g431rb/src/stm32_foc_ihm16m1.c +++ b/boards/arm/stm32/nucleo-g431rb/src/stm32_foc_ihm16m1.c @@ -172,8 +172,6 @@ static struct stm32_foc_adc_s g_adc_cfg = * Description: * Initialize FOC driver. * - * This function should be call by board_app_initialize(). - * * Returned Value: * 0 on success, a negated errno value on failure * diff --git a/boards/arm/stm32/nucleo-g474re/configs/lpuartnsh/defconfig b/boards/arm/stm32/nucleo-g474re/configs/lpuartnsh/defconfig index dd4c068237739..60b34cb04d958 100644 --- a/boards/arm/stm32/nucleo-g474re/configs/lpuartnsh/defconfig +++ b/boards/arm/stm32/nucleo-g474re/configs/lpuartnsh/defconfig @@ -27,7 +27,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LIBM=y CONFIG_LINE_MAX=64 CONFIG_LPUART1_SERIAL_CONSOLE=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y CONFIG_PRIORITY_INHERITANCE=y diff --git a/boards/arm/stm32/nucleo-g474re/configs/nsh/defconfig b/boards/arm/stm32/nucleo-g474re/configs/nsh/defconfig index f9cd22cc6476e..5833a67f87735 100644 --- a/boards/arm/stm32/nucleo-g474re/configs/nsh/defconfig +++ b/boards/arm/stm32/nucleo-g474re/configs/nsh/defconfig @@ -26,7 +26,6 @@ CONFIG_DEBUG_SYMBOLS=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LIBM=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y CONFIG_PRIORITY_INHERITANCE=y diff --git a/boards/arm/stm32/nucleo-g474re/configs/usbserial/defconfig b/boards/arm/stm32/nucleo-g474re/configs/usbserial/defconfig index 9c0705079c711..12bfadd6f7369 100644 --- a/boards/arm/stm32/nucleo-g474re/configs/usbserial/defconfig +++ b/boards/arm/stm32/nucleo-g474re/configs/usbserial/defconfig @@ -31,7 +31,6 @@ CONFIG_DEBUG_USB_WARN=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LIBM=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y CONFIG_PRIORITY_INHERITANCE=y diff --git a/boards/arm/stm32/nucleo-g474re/src/CMakeLists.txt b/boards/arm/stm32/nucleo-g474re/src/CMakeLists.txt index 7d019ead78018..53f5643fc8bab 100644 --- a/boards/arm/stm32/nucleo-g474re/src/CMakeLists.txt +++ b/boards/arm/stm32/nucleo-g474re/src/CMakeLists.txt @@ -28,10 +28,6 @@ else() list(APPEND SRCS stm32_userleds.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - if(CONFIG_USBDEV) list(APPEND SRCS stm32_usbdev.c) endif() diff --git a/boards/arm/stm32/nucleo-g474re/src/Make.defs b/boards/arm/stm32/nucleo-g474re/src/Make.defs index 50c7a8306039b..b27f9af351497 100644 --- a/boards/arm/stm32/nucleo-g474re/src/Make.defs +++ b/boards/arm/stm32/nucleo-g474re/src/Make.defs @@ -31,10 +31,6 @@ else CSRCS += stm32_userleds.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - ifeq ($(CONFIG_USBDEV),y) CSRCS += stm32_usbdev.c endif diff --git a/boards/arm/stm32/nucleo-g474re/src/stm32_appinit.c b/boards/arm/stm32/nucleo-g474re/src/stm32_appinit.c deleted file mode 100644 index 6f67fe4291f80..0000000000000 --- a/boards/arm/stm32/nucleo-g474re/src/stm32_appinit.c +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32/nucleo-g474re/src/stm32_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 - -#include - -#include "nucleo-g474re.h" - -/**************************************************************************** - * 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 stm32_bringup(); -#endif -} diff --git a/boards/arm/stm32/nucleo-g474re/src/stm32_boot.c b/boards/arm/stm32/nucleo-g474re/src/stm32_boot.c index 4df30c0015062..8f134c1cd9efa 100644 --- a/boards/arm/stm32/nucleo-g474re/src/stm32_boot.c +++ b/boards/arm/stm32/nucleo-g474re/src/stm32_boot.c @@ -88,13 +88,6 @@ void stm32_boardinitialize(void) #ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { - arm_lowputs("board_late_initialize()\r\n"); -#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_BOARDCTL) - /* Perform board bring-up here instead of from the - * board_app_initialize(). - */ - stm32_bringup(); -#endif } #endif diff --git a/boards/arm/stm32/nucleo-l152re/src/CMakeLists.txt b/boards/arm/stm32/nucleo-l152re/src/CMakeLists.txt index 99f3dc5ed3b9c..c8bbc27e2fe41 100644 --- a/boards/arm/stm32/nucleo-l152re/src/CMakeLists.txt +++ b/boards/arm/stm32/nucleo-l152re/src/CMakeLists.txt @@ -32,10 +32,6 @@ if(CONFIG_ARCH_BUTTONS) list(APPEND SRCS stm32_buttons.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinitialize.c) -endif() - if(CONFIG_LCD_ILI9341) list(APPEND SRCS stm32_ili93418b.c) endif() diff --git a/boards/arm/stm32/nucleo-l152re/src/Make.defs b/boards/arm/stm32/nucleo-l152re/src/Make.defs index f1660ef6c6bb0..3eafd51d2e9c2 100644 --- a/boards/arm/stm32/nucleo-l152re/src/Make.defs +++ b/boards/arm/stm32/nucleo-l152re/src/Make.defs @@ -34,10 +34,6 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += stm32_buttons.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinitialize.c -endif - ifeq ($(CONFIG_LCD_ILI9341),y) CSRCS += stm32_ili93418b.c endif diff --git a/boards/arm/stm32/nucleo-l152re/src/stm32_appinitialize.c b/boards/arm/stm32/nucleo-l152re/src/stm32_appinitialize.c deleted file mode 100644 index a50a55fa7642f..0000000000000 --- a/boards/arm/stm32/nucleo-l152re/src/stm32_appinitialize.c +++ /dev/null @@ -1,175 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32/nucleo-l152re/src/stm32_appinitialize.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 - -#include -#include -#include - -#include -#include -#include - -#include "stm32_i2c.h" - -#include "nucleo-l152re.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -#undef HAVE_LEDS -#undef HAVE_DAC - -#if !defined(CONFIG_ARCH_LEDS) && defined(CONFIG_USERLED_LOWER) -# define HAVE_LEDS 1 -#endif - -#if defined(CONFIG_DAC) -# define HAVE_DAC 1 -#endif - -/**************************************************************************** - * 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 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) -{ - int ret; -#ifdef CONFIG_STM32_I2C1 - struct i2c_master_s *i2c1; -#endif -#ifdef CONFIG_STM32_I2C2 - struct i2c_master_s *i2c2; -#endif - -#ifdef CONFIG_STM32_I2C1 - /* Get the I2C lower half instance */ - - i2c1 = stm32_i2cbus_initialize(1); - if (i2c1 == NULL) - { - i2cerr("ERROR: Initialize I2C1: %d\n", ret); - } - else - { - /* Register the I2C character driver */ - - ret = i2c_register(i2c1, 1); - if (ret < 0) - { - i2cerr("ERROR: Failed to register I2C1 device: %d\n", ret); - } - } -#endif - -#ifdef CONFIG_STM32_I2C2 - /* Get the I2C lower half instance */ - - i2c2 = stm32_i2cbus_initialize(2); - if (i2c2 == NULL) - { - i2cerr("ERROR: Initialize I2C2: %d\n", ret); - } - else - { - /* Register the I2C character driver */ - - ret = i2c_register(i2c2, 2); - if (ret < 0) - { - i2cerr("ERROR: Failed to register I2C2 device: %d\n", ret); - } - } -#endif - -#ifdef CONFIG_STM32_SPI - stm32_spiinitialize(); -#endif - -#ifdef HAVE_LEDS - /* Register the LED driver */ - - ret = userled_lower_initialize(LED_DRIVER_PATH); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: userled_lower_initialize() failed: %d\n", ret); - return ret; - } -#endif - -#ifdef CONFIG_FS_PROCFS - /* Mount the procfs file system */ - - ret = nx_mount(0, STM32_PROCFS_MOUNTPOINT, "procfs", 0, 0); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: Failed to mount procfs at %s: %d\n", - STM32_PROCFS_MOUNTPOINT, ret); - } -#endif - -#ifdef CONFIG_MMCSD_SPI - - /* Initialize the MMC/SD SPI driver (SPI1 is used) */ - - ret = stm32_spisd_initialize(1, CONFIG_NSH_MMCSDMINOR); - if (ret < 0) - { - syslog(LOG_ERR, "Failed to initialize SD slot %d: %d\n", - CONFIG_NSH_MMCSDMINOR, ret); - } -#endif - - UNUSED(ret); - return OK; -} diff --git a/boards/arm/stm32/nucleo-l152re/src/stm32_boot.c b/boards/arm/stm32/nucleo-l152re/src/stm32_boot.c index 7d575cf857ac8..f9b3cd5843394 100644 --- a/boards/arm/stm32/nucleo-l152re/src/stm32_boot.c +++ b/boards/arm/stm32/nucleo-l152re/src/stm32_boot.c @@ -26,15 +26,34 @@ #include +#include +#include +#include + #include +#include +#include #include +#include "stm32_i2c.h" + #include "nucleo-l152re.h" /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ +#undef HAVE_LEDS +#undef HAVE_DAC + +#if !defined(CONFIG_ARCH_LEDS) && defined(CONFIG_USERLED_LOWER) +# define HAVE_LEDS 1 +#endif + +#if defined(CONFIG_DAC) +# define HAVE_DAC 1 +#endif + /**************************************************************************** * Private Function Prototypes ****************************************************************************/ @@ -87,8 +106,92 @@ void stm32_boardinitialize(void) #ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { - /* Perform board-specific initialization */ + int ret; +#ifdef CONFIG_STM32_I2C1 + struct i2c_master_s *i2c1; +#endif +#ifdef CONFIG_STM32_I2C2 + struct i2c_master_s *i2c2; +#endif + +#ifdef CONFIG_STM32_I2C1 + /* Get the I2C lower half instance */ + + i2c1 = stm32_i2cbus_initialize(1); + if (i2c1 == NULL) + { + i2cerr("ERROR: Initialize I2C1: %d\n", ret); + } + else + { + /* Register the I2C character driver */ + + ret = i2c_register(i2c1, 1); + if (ret < 0) + { + i2cerr("ERROR: Failed to register I2C1 device: %d\n", ret); + } + } +#endif + +#ifdef CONFIG_STM32_I2C2 + /* Get the I2C lower half instance */ + + i2c2 = stm32_i2cbus_initialize(2); + if (i2c2 == NULL) + { + i2cerr("ERROR: Initialize I2C2: %d\n", ret); + } + else + { + /* Register the I2C character driver */ + + ret = i2c_register(i2c2, 2); + if (ret < 0) + { + i2cerr("ERROR: Failed to register I2C2 device: %d\n", ret); + } + } +#endif + +#ifdef CONFIG_STM32_SPI + stm32_spiinitialize(); +#endif + +#ifdef HAVE_LEDS + /* Register the LED driver */ + + ret = userled_lower_initialize(LED_DRIVER_PATH); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: userled_lower_initialize() failed: %d\n", ret); + return; + } +#endif + +#ifdef CONFIG_FS_PROCFS + /* Mount the procfs file system */ + + ret = nx_mount(0, STM32_PROCFS_MOUNTPOINT, "procfs", 0, 0); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: Failed to mount procfs at %s: %d\n", + STM32_PROCFS_MOUNTPOINT, ret); + } +#endif + +#ifdef CONFIG_MMCSD_SPI + + /* Initialize the MMC/SD SPI driver (SPI1 is used) */ + + ret = stm32_spisd_initialize(1, CONFIG_NSH_MMCSDMINOR); + if (ret < 0) + { + syslog(LOG_ERR, "Failed to initialize SD slot %d: %d\n", + CONFIG_NSH_MMCSDMINOR, ret); + } +#endif - board_app_initialize(0); + UNUSED(ret); } #endif diff --git a/boards/arm/stm32/odrive36/configs/nsh/defconfig b/boards/arm/stm32/odrive36/configs/nsh/defconfig index e53109c556071..30bdad6478136 100644 --- a/boards/arm/stm32/odrive36/configs/nsh/defconfig +++ b/boards/arm/stm32/odrive36/configs/nsh/defconfig @@ -16,7 +16,6 @@ CONFIG_ARCH_CHIP="stm32" CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F405RG=y CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=15272 CONFIG_BUILTIN=y CONFIG_EXAMPLES_HELLO=y diff --git a/boards/arm/stm32/odrive36/configs/usbnsh/defconfig b/boards/arm/stm32/odrive36/configs/usbnsh/defconfig index e629f11fff7db..2ee96e9d5ac40 100644 --- a/boards/arm/stm32/odrive36/configs/usbnsh/defconfig +++ b/boards/arm/stm32/odrive36/configs/usbnsh/defconfig @@ -32,7 +32,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/odrive36/src/CMakeLists.txt b/boards/arm/stm32/odrive36/src/CMakeLists.txt index 1f15c408a0381..fb8dbb343df0c 100644 --- a/boards/arm/stm32/odrive36/src/CMakeLists.txt +++ b/boards/arm/stm32/odrive36/src/CMakeLists.txt @@ -26,10 +26,6 @@ if(CONFIG_STM32_SPI) list(APPEND SRCS stm32_spi.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - if(CONFIG_STM32_FOC) list(APPEND SRCS stm32_foc.c) endif() diff --git a/boards/arm/stm32/odrive36/src/Make.defs b/boards/arm/stm32/odrive36/src/Make.defs index c9263a688bf6f..4074cab81c508 100644 --- a/boards/arm/stm32/odrive36/src/Make.defs +++ b/boards/arm/stm32/odrive36/src/Make.defs @@ -28,10 +28,6 @@ ifeq ($(CONFIG_STM32_SPI),y) CSRCS += stm32_spi.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - ifeq ($(CONFIG_STM32_FOC),y) CSRCS += stm32_foc.c endif diff --git a/boards/arm/stm32/odrive36/src/odrive.h b/boards/arm/stm32/odrive36/src/odrive.h index 6a51ee7e7d77a..c8de89d3b2a99 100644 --- a/boards/arm/stm32/odrive36/src/odrive.h +++ b/boards/arm/stm32/odrive36/src/odrive.h @@ -81,12 +81,7 @@ * Description: * Perform architecture specific initialization * - * CONFIG_LIB_BOARDCTL=y: - * If CONFIG_NSH_ARCHINITIALIZE=y: - * Called from the NSH library (or other application) - * Otherwise, assumed to be called from some other application. - * - * Otherwise CONFIG_BOARD_LATE_INITIALIZE=y: + * CONFIG_BOARD_LATE_INITIALIZE=y: * Called from board_late_initialize(). * * Otherwise, bad news: Never called diff --git a/boards/arm/stm32/odrive36/src/stm32_appinit.c b/boards/arm/stm32/odrive36/src/stm32_appinit.c deleted file mode 100644 index 2fb263fe27179..0000000000000 --- a/boards/arm/stm32/odrive36/src/stm32_appinit.c +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32/odrive36/src/stm32_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 - -#include - -#include "odrive.h" - -/**************************************************************************** - * 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 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 stm32_bringup(); -#endif -} diff --git a/boards/arm/stm32/odrive36/src/stm32_foc.c b/boards/arm/stm32/odrive36/src/stm32_foc.c index a5cfa3f4e1e60..7107a31b61a55 100644 --- a/boards/arm/stm32/odrive36/src/stm32_foc.c +++ b/boards/arm/stm32/odrive36/src/stm32_foc.c @@ -859,8 +859,6 @@ static int stm32_focdev_setup(int devno, int spino, * Description: * Setup FOC devices * - * This function should be call by board_app_initialize(). - * * Returned Value: * 0 on success, a negated errno value on failure * diff --git a/boards/arm/stm32/olimex-stm32-e407/configs/bmp180/defconfig b/boards/arm/stm32/olimex-stm32-e407/configs/bmp180/defconfig index 0f5d9042e0f80..d5df1ff53bac9 100644 --- a/boards/arm/stm32/olimex-stm32-e407/configs/bmp180/defconfig +++ b/boards/arm/stm32/olimex-stm32-e407/configs/bmp180/defconfig @@ -18,7 +18,6 @@ CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F407ZG=y CONFIG_ARCH_STACKDUMP=y CONFIG_BOARDCTL_USBDEVCTRL=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y CONFIG_CDCACM=y diff --git a/boards/arm/stm32/olimex-stm32-e407/configs/dac/defconfig b/boards/arm/stm32/olimex-stm32-e407/configs/dac/defconfig index 68e37bb9f8d22..19fe331945263 100644 --- a/boards/arm/stm32/olimex-stm32-e407/configs/dac/defconfig +++ b/boards/arm/stm32/olimex-stm32-e407/configs/dac/defconfig @@ -18,7 +18,6 @@ CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F407ZG=y CONFIG_ARCH_STACKDUMP=y CONFIG_BOARDCTL_USBDEVCTRL=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y CONFIG_CDCACM=y diff --git a/boards/arm/stm32/olimex-stm32-e407/configs/ina219/defconfig b/boards/arm/stm32/olimex-stm32-e407/configs/ina219/defconfig index 36709e1ddbe71..e406cc5fb0235 100644 --- a/boards/arm/stm32/olimex-stm32-e407/configs/ina219/defconfig +++ b/boards/arm/stm32/olimex-stm32-e407/configs/ina219/defconfig @@ -17,7 +17,6 @@ CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F407ZG=y CONFIG_ARCH_STACKDUMP=y CONFIG_BOARDCTL_USBDEVCTRL=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y CONFIG_CDCACM=y @@ -34,7 +33,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/olimex-stm32-e407/configs/mrf24j40-6lowpan/defconfig b/boards/arm/stm32/olimex-stm32-e407/configs/mrf24j40-6lowpan/defconfig index a7d143975bcc7..c0f90c9741115 100644 --- a/boards/arm/stm32/olimex-stm32-e407/configs/mrf24j40-6lowpan/defconfig +++ b/boards/arm/stm32/olimex-stm32-e407/configs/mrf24j40-6lowpan/defconfig @@ -19,7 +19,6 @@ CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F407ZG=y CONFIG_ARCH_STACKDUMP=y CONFIG_BOARDCTL_USBDEVCTRL=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y CONFIG_CDCACM=y diff --git a/boards/arm/stm32/olimex-stm32-e407/configs/mrf24j40-mac/defconfig b/boards/arm/stm32/olimex-stm32-e407/configs/mrf24j40-mac/defconfig index 4c6ba41d29d7b..a9221bfba48c3 100644 --- a/boards/arm/stm32/olimex-stm32-e407/configs/mrf24j40-mac/defconfig +++ b/boards/arm/stm32/olimex-stm32-e407/configs/mrf24j40-mac/defconfig @@ -16,7 +16,6 @@ CONFIG_ARCH_CHIP="stm32" CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F407ZG=y CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y CONFIG_DEBUG_FEATURES=y diff --git a/boards/arm/stm32/olimex-stm32-e407/configs/timer/defconfig b/boards/arm/stm32/olimex-stm32-e407/configs/timer/defconfig index d75f40bb535fb..98aa59ace4cd6 100644 --- a/boards/arm/stm32/olimex-stm32-e407/configs/timer/defconfig +++ b/boards/arm/stm32/olimex-stm32-e407/configs/timer/defconfig @@ -17,7 +17,6 @@ CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F407ZG=y CONFIG_ARCH_STACKDUMP=y CONFIG_BOARDCTL_USBDEVCTRL=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y CONFIG_CDCACM=y diff --git a/boards/arm/stm32/olimex-stm32-e407/configs/usbnsh/defconfig b/boards/arm/stm32/olimex-stm32-e407/configs/usbnsh/defconfig index 2cb88d4421d71..93de54935666f 100644 --- a/boards/arm/stm32/olimex-stm32-e407/configs/usbnsh/defconfig +++ b/boards/arm/stm32/olimex-stm32-e407/configs/usbnsh/defconfig @@ -32,7 +32,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/olimex-stm32-e407/src/CMakeLists.txt b/boards/arm/stm32/olimex-stm32-e407/src/CMakeLists.txt index ab064f703b165..152d38216dde5 100644 --- a/boards/arm/stm32/olimex-stm32-e407/src/CMakeLists.txt +++ b/boards/arm/stm32/olimex-stm32-e407/src/CMakeLists.txt @@ -32,10 +32,6 @@ if(CONFIG_ARCH_BUTTONS) list(APPEND SRCS stm32_buttons.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - if(CONFIG_ARCH_IDLE_CUSTOM) list(APPEND SRCS stm32_idle.c) endif() diff --git a/boards/arm/stm32/olimex-stm32-e407/src/Make.defs b/boards/arm/stm32/olimex-stm32-e407/src/Make.defs index 33cd11558a9a9..e5b1f17edc3de 100644 --- a/boards/arm/stm32/olimex-stm32-e407/src/Make.defs +++ b/boards/arm/stm32/olimex-stm32-e407/src/Make.defs @@ -34,10 +34,6 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += stm32_buttons.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - ifeq ($(CONFIG_ARCH_IDLE_CUSTOM),y) CSRCS += stm32_idle.c endif diff --git a/boards/arm/stm32/olimex-stm32-e407/src/stm32_appinit.c b/boards/arm/stm32/olimex-stm32-e407/src/stm32_appinit.c deleted file mode 100644 index b3b0b333a02ef..0000000000000 --- a/boards/arm/stm32/olimex-stm32-e407/src/stm32_appinit.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32/olimex-stm32-e407/src/stm32_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 - -#include -#include - -#include "olimex-stm32-e407.h" - -/**************************************************************************** - * 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 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 stm32_bringup(); -#endif -} diff --git a/boards/arm/stm32/olimex-stm32-h405/configs/usbnsh/defconfig b/boards/arm/stm32/olimex-stm32-h405/configs/usbnsh/defconfig index db21eea8b938f..302f0bd148fb0 100644 --- a/boards/arm/stm32/olimex-stm32-h405/configs/usbnsh/defconfig +++ b/boards/arm/stm32/olimex-stm32-h405/configs/usbnsh/defconfig @@ -22,7 +22,6 @@ CONFIG_ARCH_IRQBUTTONS=y CONFIG_ARCH_STACKDUMP=y CONFIG_ARM_TOOLCHAIN_BUILDROOT=y CONFIG_BOARDCTL_USBDEVCTRL=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y CONFIG_CDCACM=y diff --git a/boards/arm/stm32/olimex-stm32-h405/src/CMakeLists.txt b/boards/arm/stm32/olimex-stm32-h405/src/CMakeLists.txt index e54f21890ba3a..0fb338eadb597 100644 --- a/boards/arm/stm32/olimex-stm32-h405/src/CMakeLists.txt +++ b/boards/arm/stm32/olimex-stm32-h405/src/CMakeLists.txt @@ -36,10 +36,6 @@ if(CONFIG_STM32_OTGFS) list(APPEND SRCS stm32_usb.c) endif() -if(CONFIG_NSH_LIBRARY) - list(APPEND SRCS stm32_appinit.c) -endif() - if(CONFIG_ADC) list(APPEND SRCS stm32_adc.c) endif() diff --git a/boards/arm/stm32/olimex-stm32-h405/src/Make.defs b/boards/arm/stm32/olimex-stm32-h405/src/Make.defs index 148d40274c898..82df67a1c2ddd 100644 --- a/boards/arm/stm32/olimex-stm32-h405/src/Make.defs +++ b/boards/arm/stm32/olimex-stm32-h405/src/Make.defs @@ -38,10 +38,6 @@ ifeq ($(CONFIG_STM32_OTGFS),y) CSRCS += stm32_usb.c endif -ifeq ($(CONFIG_NSH_LIBRARY),y) -CSRCS += stm32_appinit.c -endif - ifeq ($(CONFIG_ADC),y) CSRCS += stm32_adc.c endif diff --git a/boards/arm/stm32/olimex-stm32-h405/src/stm32_appinit.c b/boards/arm/stm32/olimex-stm32-h405/src/stm32_appinit.c deleted file mode 100644 index 4afae2ca7a09c..0000000000000 --- a/boards/arm/stm32/olimex-stm32-h405/src/stm32_appinit.c +++ /dev/null @@ -1,117 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32/olimex-stm32-h405/src/stm32_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 - -#include -#include -#include -#include - -#include - -#ifdef CONFIG_USBMONITOR -# include -#endif - -#ifdef CONFIG_STM32_OTGFS -# include "stm32_usbhost.h" -#endif - -#include "stm32.h" -#include "olimex-stm32-h405.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -#if !defined(CONFIG_STM32_CAN1) && !defined(CONFIG_STM32_CAN2) -# undef CONFIG_CAN -#endif - -/**************************************************************************** - * 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. - * - * CONFIG_BOARDCTL=y : - * Called from the NSH library - * - * CONFIG_BOARD_LATE_INITIALIZE=y, CONFIG_NSH_LIBRARY=y, && - * CONFIG_BOARDCTL=n : - * Called from board_late_initialize(). - * - * 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) -{ - int ret; - -#ifdef CONFIG_ADC - /* Initialize ADC and register the ADC driver. */ - - ret = stm32_adc_setup(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: stm32_adc_setup failed: %d\n", ret); - } -#endif - -#ifdef CONFIG_STM32_CAN_CHARDRIVER - /* Initialize CAN and register the CAN driver. */ - - ret = stm32_can_setup(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: stm32_can_setup failed: %d\n", ret); - } -#endif - - UNUSED(ret); - return OK; -} diff --git a/boards/arm/stm32/olimex-stm32-h405/src/stm32_boot.c b/boards/arm/stm32/olimex-stm32-h405/src/stm32_boot.c index f371c9ce7ea3e..f7b9a5410e369 100644 --- a/boards/arm/stm32/olimex-stm32-h405/src/stm32_boot.c +++ b/boards/arm/stm32/olimex-stm32-h405/src/stm32_boot.c @@ -28,12 +28,34 @@ #include +#include +#include +#include +#include + #include #include #include +#ifdef CONFIG_USBMONITOR +# include +#endif + +#ifdef CONFIG_STM32_OTGFS +# include "stm32_usbhost.h" +#endif + +#include "stm32.h" #include "olimex-stm32-h405.h" +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +#if !defined(CONFIG_STM32_CAN1) && !defined(CONFIG_STM32_CAN2) +# undef CONFIG_CAN +#endif + /**************************************************************************** * Public Functions ****************************************************************************/ @@ -93,13 +115,28 @@ void stm32_boardinitialize(void) #ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { - /* Perform NSH initialization here instead of from the NSH. This - * alternative NSH initialization is necessary when NSH is ran in - * user-space but the initialization function must run in kernel space. - */ + int ret; + +#ifdef CONFIG_ADC + /* Initialize ADC and register the ADC driver. */ + + ret = stm32_adc_setup(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: stm32_adc_setup failed: %d\n", ret); + } +#endif + +#ifdef CONFIG_STM32_CAN_CHARDRIVER + /* Initialize CAN and register the CAN driver. */ -#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_BOARDCTL) - board_app_initialize(0); + ret = stm32_can_setup(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: stm32_can_setup failed: %d\n", ret); + } #endif + + UNUSED(ret); } #endif diff --git a/boards/arm/stm32/olimex-stm32-h407/src/CMakeLists.txt b/boards/arm/stm32/olimex-stm32-h407/src/CMakeLists.txt index e0745bb04c42e..4f687f840f77a 100644 --- a/boards/arm/stm32/olimex-stm32-h407/src/CMakeLists.txt +++ b/boards/arm/stm32/olimex-stm32-h407/src/CMakeLists.txt @@ -32,10 +32,6 @@ if(CONFIG_ARCH_BUTTONS) list(APPEND SRCS stm32_buttons.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - if(CONFIG_ARCH_IDLE_CUSTOM) list(APPEND SRCS stm32_idle.c) endif() diff --git a/boards/arm/stm32/olimex-stm32-h407/src/Make.defs b/boards/arm/stm32/olimex-stm32-h407/src/Make.defs index 2b074cdc9f586..9e3959c58c9d8 100644 --- a/boards/arm/stm32/olimex-stm32-h407/src/Make.defs +++ b/boards/arm/stm32/olimex-stm32-h407/src/Make.defs @@ -34,10 +34,6 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += stm32_buttons.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - ifeq ($(CONFIG_ARCH_IDLE_CUSTOM),y) CSRCS += stm32_idle.c endif diff --git a/boards/arm/stm32/olimex-stm32-h407/src/olimex-stm32-h407.h b/boards/arm/stm32/olimex-stm32-h407/src/olimex-stm32-h407.h index 298fba692e8c3..5fe28b34fab4a 100644 --- a/boards/arm/stm32/olimex-stm32-h407/src/olimex-stm32-h407.h +++ b/boards/arm/stm32/olimex-stm32-h407/src/olimex-stm32-h407.h @@ -199,12 +199,7 @@ * Description: * Perform architecture specific initialization * - * CONFIG_BOARDCTL=y: - * If CONFIG_NSH_ARCHINITIALIZE=y: - * Called from the NSH library (or other application) - * Otherse, assumed to be called from some other application. - * - * Otherwise CONFIG_BOARD_LATE_INITIALIZE=y: + * CONFIG_BOARD_LATE_INITIALIZE=y: * Called from board_late_initialize(). * * Otherwise, bad news: Never called diff --git a/boards/arm/stm32/olimex-stm32-h407/src/stm32_appinit.c b/boards/arm/stm32/olimex-stm32-h407/src/stm32_appinit.c deleted file mode 100644 index 4d96d6ca771ac..0000000000000 --- a/boards/arm/stm32/olimex-stm32-h407/src/stm32_appinit.c +++ /dev/null @@ -1,88 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32/olimex-stm32-h407/src/stm32_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 - -#include -#include -#include -#include - -#include - -#ifdef CONFIG_USBMONITOR -# include -#endif - -#ifdef CONFIG_STM32_OTGFS -# include "stm32_usbhost.h" -#endif - -#include "stm32.h" -#include "olimex-stm32-h407.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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. - * - * CONFIG_BOARDCTL=y: - * If CONFIG_NSH_ARCHINITIALIZE=y: - * Called from the NSH library (or other application) - * Otherse, assumed to be called from some other application. - * - * 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) -{ - return stm32_bringup(); -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/arm/stm32/olimex-stm32-h407/src/stm32_boot.c b/boards/arm/stm32/olimex-stm32-h407/src/stm32_boot.c index d8305aaa19e9e..a2f2c02ed66f9 100644 --- a/boards/arm/stm32/olimex-stm32-h407/src/stm32_boot.c +++ b/boards/arm/stm32/olimex-stm32-h407/src/stm32_boot.c @@ -95,15 +95,6 @@ void stm32_boardinitialize(void) #ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { -#ifndef CONFIG_BOARDCTL - /* Perform NSH initialization here instead of from the - * board_app_initialize. - * If CONFIG_BOARDCTL=y we assume that come application will perform - * the initialization by calling board_app_initialize indirectly through - * boardctl(). - */ - stm32_bringup(); -#endif } #endif diff --git a/boards/arm/stm32/olimex-stm32-h407/src/stm32_bringup.c b/boards/arm/stm32/olimex-stm32-h407/src/stm32_bringup.c index 6aaa41f9e614c..7a4e99655bdab 100644 --- a/boards/arm/stm32/olimex-stm32-h407/src/stm32_bringup.c +++ b/boards/arm/stm32/olimex-stm32-h407/src/stm32_bringup.c @@ -65,12 +65,7 @@ * Description: * Perform architecture specific initialization * - * CONFIG_BOARDCTL=y: - * If CONFIG_NSH_ARCHINITIALIZE=y: - * Called from the NSH library (or other application) - * Otherse, assumed to be called from some other application. - * - * Otherwise CONFIG_BOARD_LATE_INITIALIZE=y: + * CONFIG_BOARD_LATE_INITIALIZE=y: * Called from board_late_initialize(). * * Otherwise, bad news: Never called diff --git a/boards/arm/stm32/olimex-stm32-p107/src/CMakeLists.txt b/boards/arm/stm32/olimex-stm32-p107/src/CMakeLists.txt index 67a505c6f6f98..0e5286c799dbe 100644 --- a/boards/arm/stm32/olimex-stm32-p107/src/CMakeLists.txt +++ b/boards/arm/stm32/olimex-stm32-p107/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS stm32_boot.c stm32_spi.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - if(CONFIG_STM32_CAN_CHARDRIVER) list(APPEND SRCS stm32_can.c) endif() diff --git a/boards/arm/stm32/olimex-stm32-p107/src/Make.defs b/boards/arm/stm32/olimex-stm32-p107/src/Make.defs index e51a52fd296c0..d7aa1806f7391 100644 --- a/boards/arm/stm32/olimex-stm32-p107/src/Make.defs +++ b/boards/arm/stm32/olimex-stm32-p107/src/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = stm32_boot.c stm32_spi.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - ifeq ($(CONFIG_STM32_CAN_CHARDRIVER),y) CSRCS += stm32_can.c endif diff --git a/boards/arm/stm32/olimex-stm32-p107/src/stm32_appinit.c b/boards/arm/stm32/olimex-stm32-p107/src/stm32_appinit.c deleted file mode 100644 index ccb2afa522c73..0000000000000 --- a/boards/arm/stm32/olimex-stm32-p107/src/stm32_appinit.c +++ /dev/null @@ -1,92 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32/olimex-stm32-p107/src/stm32_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 - -#include -#include -#include - -#include - -#include "stm32.h" -#include "olimex-stm32-p107.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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. - * - * CONFIG_BOARDCTL=y: - * If CONFIG_NSH_ARCHINITIALIZE=y: - * Called from the NSH library (or other application) - * Otherse, assumed to be called from some other application. - * - * 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) -{ - int ret; - -#ifdef CONFIG_STM32_CAN_CHARDRIVER - /* Initialize CAN and register the CAN driver. */ - - ret = stm32_can_setup(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: stm32_can_setup failed: %d\n", ret); - } -#endif - - UNUSED(ret); - return OK; -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/arm/stm32/olimex-stm32-p107/src/stm32_boot.c b/boards/arm/stm32/olimex-stm32-p107/src/stm32_boot.c index 38212606f239a..729ccbe7e16eb 100644 --- a/boards/arm/stm32/olimex-stm32-p107/src/stm32_boot.c +++ b/boards/arm/stm32/olimex-stm32-p107/src/stm32_boot.c @@ -28,6 +28,11 @@ #include #include +#include +#include +#include + +#include "stm32.h" #include "arm_internal.h" #include "olimex-stm32-p107.h" @@ -59,3 +64,36 @@ void stm32_boardinitialize(void) } #endif } + +/**************************************************************************** + * 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ + int ret; + +#ifdef CONFIG_STM32_CAN_CHARDRIVER + /* Initialize CAN and register the CAN driver. */ + + ret = stm32_can_setup(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: stm32_can_setup failed: %d\n", ret); + } +#endif + + UNUSED(ret); +} +#endif diff --git a/boards/arm/stm32/olimex-stm32-p207/configs/nsh/defconfig b/boards/arm/stm32/olimex-stm32-p207/configs/nsh/defconfig index 368ac378ec672..4e50e59cce329 100644 --- a/boards/arm/stm32/olimex-stm32-p207/configs/nsh/defconfig +++ b/boards/arm/stm32/olimex-stm32-p207/configs/nsh/defconfig @@ -19,7 +19,6 @@ CONFIG_ARCH_CHIP_STM32F207ZE=y CONFIG_ARCH_IRQBUTTONS=y CONFIG_ARCH_STACKDUMP=y CONFIG_ARM_TOOLCHAIN_BUILDROOT=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y CONFIG_DEBUG_SYMBOLS=y diff --git a/boards/arm/stm32/olimex-stm32-p207/src/CMakeLists.txt b/boards/arm/stm32/olimex-stm32-p207/src/CMakeLists.txt index a0d740836ee79..98fcae67692dc 100644 --- a/boards/arm/stm32/olimex-stm32-p207/src/CMakeLists.txt +++ b/boards/arm/stm32/olimex-stm32-p207/src/CMakeLists.txt @@ -36,10 +36,6 @@ if(CONFIG_STM32_OTGFS) list(APPEND SRCS stm32_usb.c) endif() -if(CONFIG_NSH_LIBRARY) - list(APPEND SRCS stm32_appinit.c) -endif() - if(CONFIG_ADC) list(APPEND SRCS stm32_adc.c) endif() diff --git a/boards/arm/stm32/olimex-stm32-p207/src/Make.defs b/boards/arm/stm32/olimex-stm32-p207/src/Make.defs index dc34765b890f3..42ceed74368d7 100644 --- a/boards/arm/stm32/olimex-stm32-p207/src/Make.defs +++ b/boards/arm/stm32/olimex-stm32-p207/src/Make.defs @@ -38,10 +38,6 @@ ifeq ($(CONFIG_STM32_OTGFS),y) CSRCS += stm32_usb.c endif -ifeq ($(CONFIG_NSH_LIBRARY),y) -CSRCS += stm32_appinit.c -endif - ifeq ($(CONFIG_ADC),y) CSRCS += stm32_adc.c endif diff --git a/boards/arm/stm32/olimex-stm32-p207/src/stm32_appinit.c b/boards/arm/stm32/olimex-stm32-p207/src/stm32_appinit.c deleted file mode 100644 index 8e7a97925ad5e..0000000000000 --- a/boards/arm/stm32/olimex-stm32-p207/src/stm32_appinit.c +++ /dev/null @@ -1,180 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32/olimex-stm32-p207/src/stm32_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 - -#include -#include -#include -#include - -#include - -#ifdef CONFIG_USBMONITOR -# include -#endif - -#ifdef CONFIG_STM32_OTGFS -# include "stm32_usbhost.h" -#endif - -#include "stm32.h" -#include "olimex-stm32-p207.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Configuration ************************************************************/ - -#define HAVE_USBDEV 1 -#define HAVE_USBHOST 1 -#define HAVE_USBMONITOR 1 - -/* Can't support USB host or device features if USB OTG FS is not enabled */ - -#ifndef CONFIG_STM32_OTGFS -# undef HAVE_USBDEV -# undef HAVE_USBHOST -#endif - -/* Can't support USB device if USB device is not enabled */ - -#ifndef CONFIG_USBDEV -# undef HAVE_USBDEV -#endif - -/* Can't support USB host is USB host is not enabled */ - -#ifndef CONFIG_STM32_USBHOST -# undef CONFIG_USBHOST -# undef HAVE_USBHOST -#endif - -/* Check if we should enable the USB monitor before starting NSH */ - -#ifndef CONFIG_USBMONITOR -# undef HAVE_USBMONITOR -#endif - -#ifndef HAVE_USBDEV -# undef CONFIG_USBDEV_TRACE -#endif - -#ifndef HAVE_USBHOST -# undef CONFIG_USBHOST_TRACE -#endif - -#if !defined(CONFIG_USBDEV_TRACE) && !defined(CONFIG_USBHOST_TRACE) -# undef HAVE_USBMONITOR -#endif - -/**************************************************************************** - * 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. - * - * CONFIG_BOARDCTL=y : - * Called from the NSH library - * - * CONFIG_BOARD_LATE_INITIALIZE=y, CONFIG_NSH_LIBRARY=y, && - * CONFIG_BOARDCTL=n : - * Called from board_late_initialize(). - * - * 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) -{ - int ret; - -#ifdef CONFIG_STM32_CAN_CHARDRIVER - /* Initialize CAN and register the CAN driver. */ - - ret = stm32_can_setup(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: stm32_can_setup failed: %d\n", ret); - } -#endif - -#ifdef CONFIG_ADC - /* Initialize ADC and register the ADC driver. */ - - ret = stm32_adc_setup(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: stm32_adc_setup failed: %d\n", ret); - } -#endif - -#ifdef HAVE_USBHOST - /* Initialize USB host operation. stm32_usbhost_initialize() starts a - * thread will monitor for USB connection and disconnection events. - */ - - ret = stm32_usbhost_initialize(); - if (ret != OK) - { - syslog(LOG_ERR, "ERROR: Failed to initialize USB host: %d\n", ret); - return ret; - } -#endif - -#ifdef HAVE_USBMONITOR - /* Start the USB Monitor */ - - ret = usbmonitor_start(); - if (ret != OK) - { - syslog(LOG_ERR, "ERROR: Failed to start USB monitor: %d\n", ret); - } -#endif - - UNUSED(ret); - return OK; -} diff --git a/boards/arm/stm32/olimex-stm32-p207/src/stm32_boot.c b/boards/arm/stm32/olimex-stm32-p207/src/stm32_boot.c index f87f57b0dcbb0..3ce6df06ea461 100644 --- a/boards/arm/stm32/olimex-stm32-p207/src/stm32_boot.c +++ b/boards/arm/stm32/olimex-stm32-p207/src/stm32_boot.c @@ -28,12 +28,74 @@ #include +#include +#include +#include +#include + #include #include #include +#ifdef CONFIG_USBMONITOR +# include +#endif + +#ifdef CONFIG_STM32_OTGFS +# include "stm32_usbhost.h" +#endif + +#include "stm32.h" #include "olimex-stm32-p207.h" +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/* Configuration ************************************************************/ + +#define HAVE_USBDEV 1 +#define HAVE_USBHOST 1 +#define HAVE_USBMONITOR 1 + +/* Can't support USB host or device features if USB OTG FS is not enabled */ + +#ifndef CONFIG_STM32_OTGFS +# undef HAVE_USBDEV +# undef HAVE_USBHOST +#endif + +/* Can't support USB device if USB device is not enabled */ + +#ifndef CONFIG_USBDEV +# undef HAVE_USBDEV +#endif + +/* Can't support USB host is USB host is not enabled */ + +#ifndef CONFIG_STM32_USBHOST +# undef CONFIG_USBHOST +# undef HAVE_USBHOST +#endif + +/* Check if we should enable the USB monitor before starting NSH */ + +#ifndef CONFIG_USBMONITOR +# undef HAVE_USBMONITOR +#endif + +#ifndef HAVE_USBDEV +# undef CONFIG_USBDEV_TRACE +#endif + +#ifndef HAVE_USBHOST +# undef CONFIG_USBHOST_TRACE +#endif + +#if !defined(CONFIG_USBDEV_TRACE) && !defined(CONFIG_USBHOST_TRACE) +# undef HAVE_USBMONITOR +#endif + /**************************************************************************** * Public Functions ****************************************************************************/ @@ -93,13 +155,51 @@ void stm32_boardinitialize(void) #ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { - /* Perform NSH initialization here instead of from the NSH. This - * alternative NSH initialization is necessary when NSH is ran in - * user-space but the initialization function must run in kernel space. + int ret; + +#ifdef CONFIG_STM32_CAN_CHARDRIVER + /* Initialize CAN and register the CAN driver. */ + + ret = stm32_can_setup(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: stm32_can_setup failed: %d\n", ret); + } +#endif + +#ifdef CONFIG_ADC + /* Initialize ADC and register the ADC driver. */ + + ret = stm32_adc_setup(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: stm32_adc_setup failed: %d\n", ret); + } +#endif + +#ifdef HAVE_USBHOST + /* Initialize USB host operation. stm32_usbhost_initialize() starts a + * thread will monitor for USB connection and disconnection events. */ -#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_BOARDCTL) - board_app_initialize(0); + ret = stm32_usbhost_initialize(); + if (ret != OK) + { + syslog(LOG_ERR, "ERROR: Failed to initialize USB host: %d\n", ret); + return; + } +#endif + +#ifdef HAVE_USBMONITOR + /* Start the USB Monitor */ + + ret = usbmonitor_start(); + if (ret != OK) + { + syslog(LOG_ERR, "ERROR: Failed to start USB monitor: %d\n", ret); + } #endif + + UNUSED(ret); } #endif diff --git a/boards/arm/stm32/olimex-stm32-p407/configs/audio/defconfig b/boards/arm/stm32/olimex-stm32-p407/configs/audio/defconfig index d0455ad270751..1d4015c480202 100644 --- a/boards/arm/stm32/olimex-stm32-p407/configs/audio/defconfig +++ b/boards/arm/stm32/olimex-stm32-p407/configs/audio/defconfig @@ -19,7 +19,6 @@ CONFIG_AUDIO_CS4344=y CONFIG_AUDIO_EXCLUDE_TONE=y CONFIG_AUDIO_EXCLUDE_VOLUME=y CONFIG_AUDIO_I2S=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y CONFIG_DRIVERS_AUDIO=y diff --git a/boards/arm/stm32/olimex-stm32-p407/configs/dhtxx/defconfig b/boards/arm/stm32/olimex-stm32-p407/configs/dhtxx/defconfig index af3f02f4e52c5..1ec9ec6df1f4e 100644 --- a/boards/arm/stm32/olimex-stm32-p407/configs/dhtxx/defconfig +++ b/boards/arm/stm32/olimex-stm32-p407/configs/dhtxx/defconfig @@ -16,7 +16,6 @@ CONFIG_ARCH_CHIP_STM32F407ZG=y CONFIG_ARCH_IRQBUTTONS=y CONFIG_ARCH_STACKDUMP=y CONFIG_BOARDCTL_USBDEVCTRL=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y CONFIG_CDCACM=y diff --git a/boards/arm/stm32/olimex-stm32-p407/configs/hidkbd/defconfig b/boards/arm/stm32/olimex-stm32-p407/configs/hidkbd/defconfig index e5e2e9af1c4ef..ed45a26523b3c 100644 --- a/boards/arm/stm32/olimex-stm32-p407/configs/hidkbd/defconfig +++ b/boards/arm/stm32/olimex-stm32-p407/configs/hidkbd/defconfig @@ -14,7 +14,6 @@ CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F407ZG=y CONFIG_ARCH_IRQBUTTONS=y CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y CONFIG_EXAMPLES_HIDKBD=y @@ -27,7 +26,6 @@ CONFIG_HAVE_CXXINITIALIZE=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_GET=y CONFIG_NSH_DISABLE_IFUPDOWN=y diff --git a/boards/arm/stm32/olimex-stm32-p407/configs/kelf/defconfig b/boards/arm/stm32/olimex-stm32-p407/configs/kelf/defconfig index 88e6e2feeff7e..bb4a056ff466a 100644 --- a/boards/arm/stm32/olimex-stm32-p407/configs/kelf/defconfig +++ b/boards/arm/stm32/olimex-stm32-p407/configs/kelf/defconfig @@ -17,7 +17,6 @@ CONFIG_ARM_MPU=y CONFIG_BINFMT_CONSTRUCTORS=y CONFIG_BOARDCTL=y CONFIG_BOARDCTL_ROMDISK=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILD_PROTECTED=y CONFIG_CONSOLE_SYSLOG=y diff --git a/boards/arm/stm32/olimex-stm32-p407/configs/kmodule/defconfig b/boards/arm/stm32/olimex-stm32-p407/configs/kmodule/defconfig index 69c2d52b2de27..cde47ac79db37 100644 --- a/boards/arm/stm32/olimex-stm32-p407/configs/kmodule/defconfig +++ b/boards/arm/stm32/olimex-stm32-p407/configs/kmodule/defconfig @@ -18,7 +18,6 @@ CONFIG_ARCH_STACKDUMP=y CONFIG_ARM_MPU=y CONFIG_BOARDCTL=y CONFIG_BOARDCTL_ROMDISK=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILD_PROTECTED=y CONFIG_EXAMPLES_MODULE=y diff --git a/boards/arm/stm32/olimex-stm32-p407/configs/knsh/defconfig b/boards/arm/stm32/olimex-stm32-p407/configs/knsh/defconfig index 0f4f89a961db9..7be5a978eda06 100644 --- a/boards/arm/stm32/olimex-stm32-p407/configs/knsh/defconfig +++ b/boards/arm/stm32/olimex-stm32-p407/configs/knsh/defconfig @@ -17,7 +17,6 @@ CONFIG_ARCH_IRQBUTTONS=y CONFIG_ARCH_STACKDUMP=y CONFIG_ARM_MPU=y CONFIG_BOARDCTL=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILD_PROTECTED=y CONFIG_FS_PROCFS=y diff --git a/boards/arm/stm32/olimex-stm32-p407/configs/module/defconfig b/boards/arm/stm32/olimex-stm32-p407/configs/module/defconfig index b9fdbe7bbd3a8..7157051491cb3 100644 --- a/boards/arm/stm32/olimex-stm32-p407/configs/module/defconfig +++ b/boards/arm/stm32/olimex-stm32-p407/configs/module/defconfig @@ -28,7 +28,6 @@ CONFIG_HOST_WINDOWS=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=64 CONFIG_MODULE=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32/olimex-stm32-p407/configs/mqttc/defconfig b/boards/arm/stm32/olimex-stm32-p407/configs/mqttc/defconfig index 5a456f1a41457..76e96ce5920c8 100644 --- a/boards/arm/stm32/olimex-stm32-p407/configs/mqttc/defconfig +++ b/boards/arm/stm32/olimex-stm32-p407/configs/mqttc/defconfig @@ -15,7 +15,6 @@ CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F407ZG=y CONFIG_ARCH_IRQBUTTONS=y CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y CONFIG_ETH0_PHY_KS8721=y diff --git a/boards/arm/stm32/olimex-stm32-p407/configs/nsh/defconfig b/boards/arm/stm32/olimex-stm32-p407/configs/nsh/defconfig index e6daf168b0f98..bb3cbd8e78037 100644 --- a/boards/arm/stm32/olimex-stm32-p407/configs/nsh/defconfig +++ b/boards/arm/stm32/olimex-stm32-p407/configs/nsh/defconfig @@ -14,7 +14,6 @@ CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F407ZG=y CONFIG_ARCH_IRQBUTTONS=y CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y CONFIG_FAT_LCNAMES=y diff --git a/boards/arm/stm32/olimex-stm32-p407/configs/zmodem/defconfig b/boards/arm/stm32/olimex-stm32-p407/configs/zmodem/defconfig index a035b8cb6de04..7c2ccb8cb1f0d 100644 --- a/boards/arm/stm32/olimex-stm32-p407/configs/zmodem/defconfig +++ b/boards/arm/stm32/olimex-stm32-p407/configs/zmodem/defconfig @@ -31,7 +31,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/olimex-stm32-p407/src/CMakeLists.txt b/boards/arm/stm32/olimex-stm32-p407/src/CMakeLists.txt index 06810c07c528d..f10df30fa1f73 100644 --- a/boards/arm/stm32/olimex-stm32-p407/src/CMakeLists.txt +++ b/boards/arm/stm32/olimex-stm32-p407/src/CMakeLists.txt @@ -40,10 +40,6 @@ if(CONFIG_STM32_OTGFS) list(APPEND SRCS stm32_usb.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - if(CONFIG_ADC) list(APPEND SRCS stm32_adc.c) endif() diff --git a/boards/arm/stm32/olimex-stm32-p407/src/Make.defs b/boards/arm/stm32/olimex-stm32-p407/src/Make.defs index 29b75144b322f..8d0d261b5fb06 100644 --- a/boards/arm/stm32/olimex-stm32-p407/src/Make.defs +++ b/boards/arm/stm32/olimex-stm32-p407/src/Make.defs @@ -42,10 +42,6 @@ ifeq ($(CONFIG_STM32_OTGFS),y) CSRCS += stm32_usb.c endif -ifeq ($(CONFIG_BOARDCTL),y) - CSRCS += stm32_appinit.c -endif - ifeq ($(CONFIG_ADC),y) CSRCS += stm32_adc.c endif diff --git a/boards/arm/stm32/olimex-stm32-p407/src/stm32_appinit.c b/boards/arm/stm32/olimex-stm32-p407/src/stm32_appinit.c deleted file mode 100644 index 78e34047c4b1e..0000000000000 --- a/boards/arm/stm32/olimex-stm32-p407/src/stm32_appinit.c +++ /dev/null @@ -1,85 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32/olimex-stm32-p407/src/stm32_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 - -#include -#include - -#include - -#include "olimex-stm32-p407.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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. - * - * CONFIG_BOARDCTL=y : - * Called from the NSH library - * - * CONFIG_BOARD_LATE_INITIALIZE=y, CONFIG_NSH_LIBRARY=y, && - * CONFIG_BOARDCTL=n : - * Called from board_late_initialize(). - * - * 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) -{ - /* Did we already initialize via board_late_initialize()? */ - -#ifndef CONFIG_BOARD_LATE_INITIALIZE - return stm32_bringup(); -#else - return OK; -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/arm/stm32/olimexino-stm32/configs/can/defconfig b/boards/arm/stm32/olimexino-stm32/configs/can/defconfig index 320f6bda9586c..dd374ca310061 100644 --- a/boards/arm/stm32/olimexino-stm32/configs/can/defconfig +++ b/boards/arm/stm32/olimexino-stm32/configs/can/defconfig @@ -28,7 +28,6 @@ CONFIG_ARCH_HIPRI_INTERRUPT=y CONFIG_ARCH_INTERRUPTSTACK=340 CONFIG_ARCH_IRQBUTTONS=y CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=5483 CONFIG_BUILTIN=y CONFIG_CAN_EXTID=y @@ -57,7 +56,6 @@ CONFIG_LINE_MAX=40 CONFIG_MM_SMALL=y CONFIG_NAME_MAX=8 CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=5 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_CODECS_BUFSIZE=0 CONFIG_NSH_FILEIOSIZE=128 diff --git a/boards/arm/stm32/olimexino-stm32/configs/composite/defconfig b/boards/arm/stm32/olimexino-stm32/configs/composite/defconfig index c687d5581e907..0c04817207f45 100644 --- a/boards/arm/stm32/olimexino-stm32/configs/composite/defconfig +++ b/boards/arm/stm32/olimexino-stm32/configs/composite/defconfig @@ -40,7 +40,6 @@ CONFIG_ARCH_HIPRI_INTERRUPT=y CONFIG_ARCH_INTERRUPTSTACK=340 CONFIG_ARCH_IRQBUTTONS=y CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=5483 CONFIG_BUILTIN=y CONFIG_CDCACM=y @@ -75,7 +74,6 @@ CONFIG_MMCSD=y CONFIG_MM_SMALL=y CONFIG_NAME_MAX=8 CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=5 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_CODECS_BUFSIZE=0 CONFIG_NSH_FILEIOSIZE=128 diff --git a/boards/arm/stm32/olimexino-stm32/configs/nsh/defconfig b/boards/arm/stm32/olimexino-stm32/configs/nsh/defconfig index 1539d2c5fd78e..5aba8329aea6f 100644 --- a/boards/arm/stm32/olimexino-stm32/configs/nsh/defconfig +++ b/boards/arm/stm32/olimexino-stm32/configs/nsh/defconfig @@ -40,7 +40,6 @@ CONFIG_ARCH_HIPRI_INTERRUPT=y CONFIG_ARCH_INTERRUPTSTACK=340 CONFIG_ARCH_IRQBUTTONS=y CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=5483 CONFIG_BUILTIN=y CONFIG_DEBUG_FULLOPT=y @@ -65,7 +64,6 @@ CONFIG_MMCSD=y CONFIG_MM_SMALL=y CONFIG_NAME_MAX=8 CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=5 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_CODECS_BUFSIZE=0 CONFIG_NSH_FILEIOSIZE=128 diff --git a/boards/arm/stm32/olimexino-stm32/configs/smallnsh/defconfig b/boards/arm/stm32/olimexino-stm32/configs/smallnsh/defconfig index 63768a62583bd..2d986d4457cf2 100644 --- a/boards/arm/stm32/olimexino-stm32/configs/smallnsh/defconfig +++ b/boards/arm/stm32/olimexino-stm32/configs/smallnsh/defconfig @@ -20,7 +20,6 @@ CONFIG_ARCH_CHIP_STM32F103RB=y CONFIG_ARCH_HIPRI_INTERRUPT=y CONFIG_ARCH_INTERRUPTSTACK=340 CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=5483 CONFIG_BUILTIN=y CONFIG_CAN_EXTID=y @@ -41,7 +40,6 @@ CONFIG_LINE_MAX=40 CONFIG_MM_SMALL=y CONFIG_NAME_MAX=8 CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=5 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_CODECS_BUFSIZE=0 CONFIG_NSH_FILEIOSIZE=128 diff --git a/boards/arm/stm32/olimexino-stm32/configs/tiny/defconfig b/boards/arm/stm32/olimexino-stm32/configs/tiny/defconfig index f9d791e68f7ce..782dc9ff3063b 100644 --- a/boards/arm/stm32/olimexino-stm32/configs/tiny/defconfig +++ b/boards/arm/stm32/olimexino-stm32/configs/tiny/defconfig @@ -18,7 +18,6 @@ CONFIG_ARCH_HIPRI_INTERRUPT=y CONFIG_ARCH_INTERRUPTSTACK=340 CONFIG_ARCH_STACKDUMP=y CONFIG_BOARDCTL=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=5483 CONFIG_BUILTIN=y CONFIG_CAN_EXTID=y diff --git a/boards/arm/stm32/olimexino-stm32/src/CMakeLists.txt b/boards/arm/stm32/olimexino-stm32/src/CMakeLists.txt index 6abf53777ff93..9457b7258b78a 100644 --- a/boards/arm/stm32/olimexino-stm32/src/CMakeLists.txt +++ b/boards/arm/stm32/olimexino-stm32/src/CMakeLists.txt @@ -26,10 +26,6 @@ if(CONFIG_STM32_CAN_CHARDRIVER) list(APPEND SRCS stm32_can.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - if(CONFIG_USBMSC) list(APPEND SRCS stm32_usbmsc.c) endif() diff --git a/boards/arm/stm32/olimexino-stm32/src/Make.defs b/boards/arm/stm32/olimexino-stm32/src/Make.defs index 0b1f25a07a2e0..65205d7152800 100644 --- a/boards/arm/stm32/olimexino-stm32/src/Make.defs +++ b/boards/arm/stm32/olimexino-stm32/src/Make.defs @@ -28,10 +28,6 @@ ifeq ($(CONFIG_STM32_CAN_CHARDRIVER),y) CSRCS += stm32_can.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - ifeq ($(CONFIG_USBMSC),y) CSRCS += stm32_usbmsc.c endif diff --git a/boards/arm/stm32/olimexino-stm32/src/stm32_appinit.c b/boards/arm/stm32/olimexino-stm32/src/stm32_appinit.c deleted file mode 100644 index deeee12bd88a9..0000000000000 --- a/boards/arm/stm32/olimexino-stm32/src/stm32_appinit.c +++ /dev/null @@ -1,104 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32/olimexino-stm32/src/stm32_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 - -#include -#include -#include -#include - -#include -#include -#include - -#ifdef CONFIG_USBMONITOR -# include -#endif - -#ifdef CONFIG_USBDEV -# include "stm32_usbdev.h" -#endif - -#include "stm32.h" -#include "olimexino-stm32.h" - -/**************************************************************************** - * 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 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) -{ - int ret = OK; - -#ifdef CONFIG_USBMSC -#if !defined(CONFIG_NSH_BUILTIN_APPS) && !defined(CONFIG_SYSTEM_USBMSC) - ret = board_usbmsc_initialize(0); -#endif -#endif - -#if !defined(CONFIG_NSH_BUILTIN_APPS) && defined(CONFIG_USBDEV_COMPOSITE) - ret = board_composite_initialize(0); -#endif - -#ifdef CONFIG_STM32_CAN_CHARDRIVER - /* Initialize CAN and register the CAN driver. */ - - ret = stm32_can_setup(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: stm32_can_setup failed: %d\n", ret); - } -#endif - - UNUSED(ret); - return ret; -} diff --git a/boards/arm/stm32/olimexino-stm32/src/stm32_boot.c b/boards/arm/stm32/olimexino-stm32/src/stm32_boot.c index b61d3c7cf1162..b4d93ced9dc22 100644 --- a/boards/arm/stm32/olimexino-stm32/src/stm32_boot.c +++ b/boards/arm/stm32/olimexino-stm32/src/stm32_boot.c @@ -25,10 +25,28 @@ ****************************************************************************/ #include + #include -#include +#include +#include +#include +#include + +#include #include +#include +#include + +#ifdef CONFIG_USBMONITOR +# include +#endif + +#ifdef CONFIG_USBDEV +# include "stm32_usbdev.h" +#endif + +#include "stm32.h" #include "olimexino-stm32.h" /**************************************************************************** @@ -117,14 +135,29 @@ void stm32_boardinitialize(void) #ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { -#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_BOARDCTL) - /* Perform NSH initialization here instead of from the NSH. This - * alternative NSH initialization is necessary when NSH is ran in user- - * space but the initialization function must run in kernel space. - */ + int ret = OK; - board_app_initialize(0); +#ifdef CONFIG_USBMSC +#if !defined(CONFIG_NSH_BUILTIN_APPS) && !defined(CONFIG_SYSTEM_USBMSC) + ret = board_usbmsc_initialize(0); #endif +#endif + +#if !defined(CONFIG_NSH_BUILTIN_APPS) && defined(CONFIG_USBDEV_COMPOSITE) + ret = board_composite_initialize(0); +#endif + +#ifdef CONFIG_STM32_CAN_CHARDRIVER + /* Initialize CAN and register the CAN driver. */ + + ret = stm32_can_setup(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: stm32_can_setup failed: %d\n", ret); + } +#endif + + UNUSED(ret); #if defined(CONFIG_USBDEV) stm32_usb_set_pwr_callback(vbus_handler); diff --git a/boards/arm/stm32/olimexino-stm32/src/stm32_composite.c b/boards/arm/stm32/olimexino-stm32/src/stm32_composite.c index bf95a10cfe4f7..dbc418009f57f 100644 --- a/boards/arm/stm32/olimexino-stm32/src/stm32_composite.c +++ b/boards/arm/stm32/olimexino-stm32/src/stm32_composite.c @@ -364,8 +364,7 @@ static void *board_composite1_connect(int port) int board_composite_initialize(int port) { /* If system/composite is built as an NSH command, then SD slot should - * already have been initialized in board_app_initialize() - * (see stm32_appinit.c). + * already have been initialized. * In this case, there is nothing further to be done here. */ diff --git a/boards/arm/stm32/olimexino-stm32/src/stm32_usbmsc.c b/boards/arm/stm32/olimexino-stm32/src/stm32_usbmsc.c index f6ae6e7da2e5c..8af999fdb60fb 100644 --- a/boards/arm/stm32/olimexino-stm32/src/stm32_usbmsc.c +++ b/boards/arm/stm32/olimexino-stm32/src/stm32_usbmsc.c @@ -79,8 +79,7 @@ int board_usbmsc_initialize(int port) { /* If system/usbmsc is built as an NSH command, then SD slot should - * already have been initialized in board_app_initialize() - * (see stm32_appinit.c). + * already have been initialized. * In this case, there is nothing further to be done here. */ diff --git a/boards/arm/stm32/omnibusf4/configs/nsh/defconfig b/boards/arm/stm32/omnibusf4/configs/nsh/defconfig index e670abcc1ffcb..42a7c2d4868c8 100644 --- a/boards/arm/stm32/omnibusf4/configs/nsh/defconfig +++ b/boards/arm/stm32/omnibusf4/configs/nsh/defconfig @@ -56,7 +56,6 @@ CONFIG_MPU60X0_EXTI=y CONFIG_MTD=y CONFIG_MTD_M25P=y CONFIG_MTD_SECT512=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_MMCSDSPIPORTNO=2 diff --git a/boards/arm/stm32/omnibusf4/src/CMakeLists.txt b/boards/arm/stm32/omnibusf4/src/CMakeLists.txt index d250cab6e5ce6..9be173575b5ee 100644 --- a/boards/arm/stm32/omnibusf4/src/CMakeLists.txt +++ b/boards/arm/stm32/omnibusf4/src/CMakeLists.txt @@ -42,14 +42,12 @@ if(CONFIG_PWM) list(APPEND SRCS stm32_pwm.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) - if(CONFIG_BOARDCTL_RESET) - list(APPEND SRCS stm32_reset.c) - endif() - if(CONFIG_BOARDCTL_IOCTL) - list(APPEND SRCS stm32_ioctl.c) - endif() +if(CONFIG_BOARDCTL_RESET) + list(APPEND SRCS stm32_reset.c) +endif() + +if(CONFIG_BOARDCTL_IOCTL) + list(APPEND SRCS stm32_ioctl.c) endif() if(CONFIG_ARCH_CUSTOM_PMINIT) diff --git a/boards/arm/stm32/omnibusf4/src/Make.defs b/boards/arm/stm32/omnibusf4/src/Make.defs index 5b33eee4333fa..6fa1d9b08b85a 100644 --- a/boards/arm/stm32/omnibusf4/src/Make.defs +++ b/boards/arm/stm32/omnibusf4/src/Make.defs @@ -44,15 +44,12 @@ ifeq ($(CONFIG_PWM),y) CSRCS += stm32_pwm.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c ifeq ($(CONFIG_BOARDCTL_RESET),y) CSRCS += stm32_reset.c endif ifeq ($(CONFIG_BOARDCTL_IOCTL),y) CSRCS += stm32_ioctl.c endif -endif ifeq ($(CONFIG_ARCH_CUSTOM_PMINIT),y) CSRCS += stm32_pm.c diff --git a/boards/arm/stm32/omnibusf4/src/stm32_appinit.c b/boards/arm/stm32/omnibusf4/src/stm32_appinit.c deleted file mode 100644 index 50d68f6b51b1a..0000000000000 --- a/boards/arm/stm32/omnibusf4/src/stm32_appinit.c +++ /dev/null @@ -1,80 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32/omnibusf4/src/stm32_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 - -#include -#include - -#include "omnibusf4.h" - -/**************************************************************************** - * 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 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_INITIALIZE - - /* Board initialization already performed by board_initialize() */ - - return OK; -#else - - /* Perform board-specific initialization */ - - return stm32_bringup(); -#endif -} diff --git a/boards/arm/stm32/omnibusf4/src/stm32_boot.c b/boards/arm/stm32/omnibusf4/src/stm32_boot.c index 1168a703d4477..651df187d8134 100644 --- a/boards/arm/stm32/omnibusf4/src/stm32_boot.c +++ b/boards/arm/stm32/omnibusf4/src/stm32_boot.c @@ -104,20 +104,21 @@ void stm32_boardinitialize(void) } /**************************************************************************** - * Name: board_initialize + * Name: board_late_initialize * * Description: - * If CONFIG_BOARD_INITIALIZE is selected, then an additional + * 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_initialize(). board_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. + * 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. * ****************************************************************************/ -#ifdef CONFIG_BOARD_INITIALIZE -void board_initialize(void) +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) { /* Perform board-specific initialization */ diff --git a/boards/arm/stm32/omnibusf4/src/stm32_usbmsc.c b/boards/arm/stm32/omnibusf4/src/stm32_usbmsc.c index 49239282a0fe5..b3c093ab6a166 100644 --- a/boards/arm/stm32/omnibusf4/src/stm32_usbmsc.c +++ b/boards/arm/stm32/omnibusf4/src/stm32_usbmsc.c @@ -59,9 +59,8 @@ int board_usbmsc_initialize(int port) { /* If system/usbmsc is built as an NSH command, then SD slot should - * already have been initialized in board_app_initialize() (see - * stm32_appinit.c). In this case, there is nothing further to be done - * here. + * already have been initialized. + * In this case, there is nothing further to be done here. */ #ifndef CONFIG_NSH_BUILTIN_APPS diff --git a/boards/arm/stm32/photon/configs/adb/defconfig b/boards/arm/stm32/photon/configs/adb/defconfig index 50ac42afe4467..1cd0b1d4e0f8e 100644 --- a/boards/arm/stm32/photon/configs/adb/defconfig +++ b/boards/arm/stm32/photon/configs/adb/defconfig @@ -10,7 +10,6 @@ # CONFIG_NSH_CMDOPT_HEXDUMP is not set CONFIG_ADBD_AUTHENTICATION=y CONFIG_ADBD_AUTH_PUBKEY=y -CONFIG_ADBD_BOARD_INIT=y CONFIG_ADBD_DEVICE_ID="serialno" CONFIG_ADBD_FILE_SERVICE=y CONFIG_ADBD_LOGCAT_SERVICE=y diff --git a/boards/arm/stm32/photon/configs/nsh/defconfig b/boards/arm/stm32/photon/configs/nsh/defconfig index e18e6fc6c0c8d..e0e25c7c346f3 100644 --- a/boards/arm/stm32/photon/configs/nsh/defconfig +++ b/boards/arm/stm32/photon/configs/nsh/defconfig @@ -24,7 +24,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/photon/configs/rgbled/defconfig b/boards/arm/stm32/photon/configs/rgbled/defconfig index 5f7bf954a514b..ca84d052dd346 100644 --- a/boards/arm/stm32/photon/configs/rgbled/defconfig +++ b/boards/arm/stm32/photon/configs/rgbled/defconfig @@ -29,7 +29,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/photon/configs/usbnsh/defconfig b/boards/arm/stm32/photon/configs/usbnsh/defconfig index a29da72279ec9..860b33017022a 100644 --- a/boards/arm/stm32/photon/configs/usbnsh/defconfig +++ b/boards/arm/stm32/photon/configs/usbnsh/defconfig @@ -27,7 +27,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/photon/configs/wlan-perf/defconfig b/boards/arm/stm32/photon/configs/wlan-perf/defconfig index 964c8cafdae21..d6a02110e3b7c 100644 --- a/boards/arm/stm32/photon/configs/wlan-perf/defconfig +++ b/boards/arm/stm32/photon/configs/wlan-perf/defconfig @@ -55,7 +55,6 @@ CONFIG_NET_ICMP_SOCKET=y CONFIG_NET_PKT=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/photon/configs/wlan/defconfig b/boards/arm/stm32/photon/configs/wlan/defconfig index 88612b53c0e70..c2cf5294c3b44 100644 --- a/boards/arm/stm32/photon/configs/wlan/defconfig +++ b/boards/arm/stm32/photon/configs/wlan/defconfig @@ -61,7 +61,6 @@ CONFIG_NET_ICMP_SOCKET=y CONFIG_NET_PKT=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/photon/src/CMakeLists.txt b/boards/arm/stm32/photon/src/CMakeLists.txt index 7fabce6ade483..e6e55c00a003c 100644 --- a/boards/arm/stm32/photon/src/CMakeLists.txt +++ b/boards/arm/stm32/photon/src/CMakeLists.txt @@ -26,10 +26,6 @@ if(CONFIG_PHOTON_DFU_BOOTLOADER) list(APPEND SRCS dfu_signature.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - if(CONFIG_INPUT_BUTTONS) list(APPEND SRCS stm32_buttons.c) endif() diff --git a/boards/arm/stm32/photon/src/Make.defs b/boards/arm/stm32/photon/src/Make.defs index 2741307f5a7f3..6edf5dce2d9a9 100644 --- a/boards/arm/stm32/photon/src/Make.defs +++ b/boards/arm/stm32/photon/src/Make.defs @@ -28,10 +28,6 @@ ifeq ($(CONFIG_PHOTON_DFU_BOOTLOADER),y) CSRCS += dfu_signature.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - ifeq ($(CONFIG_INPUT_BUTTONS),y) CSRCS += stm32_buttons.c endif diff --git a/boards/arm/stm32/photon/src/photon.h b/boards/arm/stm32/photon/src/photon.h index 3631c04262215..299fe0294ecd0 100644 --- a/boards/arm/stm32/photon/src/photon.h +++ b/boards/arm/stm32/photon/src/photon.h @@ -80,16 +80,12 @@ * Name: stm32_bringup * * Description: - * Called either by board_initialize() if CONFIG_BOARD_LATE_INITIALIZE or - * by board_app_initialize if CONFIG_BOARDCTL is selected. This - * function initializes and configures all on-board features appropriate - * for the selected configuration. + * This function initializes and configures all on-board features + * appropriate for the selected configuration. * ****************************************************************************/ -#if defined(CONFIG_BOARDCTL) || defined(CONFIG_BOARD_LATE_INITIALIZE) int stm32_bringup(void); -#endif /**************************************************************************** * Name: stm32_spidev_initialize diff --git a/boards/arm/stm32/photon/src/stm32_appinit.c b/boards/arm/stm32/photon/src/stm32_appinit.c deleted file mode 100644 index dfc5b90f3928f..0000000000000 --- a/boards/arm/stm32/photon/src/stm32_appinit.c +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32/photon/src/stm32_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 - -#include - -#include - -#include "photon.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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 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) -{ -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board initialization */ - - return stm32_bringup(); -#else - return OK; -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/arm/stm32/photon/src/stm32_bringup.c b/boards/arm/stm32/photon/src/stm32_bringup.c index 23673484fc79c..5096dad8d0b5b 100644 --- a/boards/arm/stm32/photon/src/stm32_bringup.c +++ b/boards/arm/stm32/photon/src/stm32_bringup.c @@ -51,8 +51,6 @@ * Name: stm32_bringup * * Description: - * Called either by board_initialize() if CONFIG_BOARD_LATE_INITIALIZE or - * by board_app_initialize if CONFIG_BOARDCTL is selected. * This function initializes and configures all on-board features * appropriate for the selected configuration. * diff --git a/boards/arm/stm32/shenzhou/configs/nsh/defconfig b/boards/arm/stm32/shenzhou/configs/nsh/defconfig index d119a8d3e04ae..3cad521d66645 100644 --- a/boards/arm/stm32/shenzhou/configs/nsh/defconfig +++ b/boards/arm/stm32/shenzhou/configs/nsh/defconfig @@ -41,7 +41,6 @@ CONFIG_NET_TCP=y CONFIG_NET_TCP_PREALLOC_CONNS=40 CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_MMCSDSPIPORTNO=1 diff --git a/boards/arm/stm32/shenzhou/configs/nxwm/defconfig b/boards/arm/stm32/shenzhou/configs/nxwm/defconfig index 069c2919b41df..815572c9038c3 100644 --- a/boards/arm/stm32/shenzhou/configs/nxwm/defconfig +++ b/boards/arm/stm32/shenzhou/configs/nxwm/defconfig @@ -55,7 +55,6 @@ CONFIG_NET_TCP=y CONFIG_NET_TCP_PREALLOC_CONNS=16 CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_LIBRARY=y CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/shenzhou/configs/thttpd/defconfig b/boards/arm/stm32/shenzhou/configs/thttpd/defconfig index 0f6407eb756d4..7a6bad14a95a7 100644 --- a/boards/arm/stm32/shenzhou/configs/thttpd/defconfig +++ b/boards/arm/stm32/shenzhou/configs/thttpd/defconfig @@ -48,7 +48,6 @@ CONFIG_NET_TCP=y CONFIG_NET_TCP_PREALLOC_CONNS=40 CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/shenzhou/src/CMakeLists.txt b/boards/arm/stm32/shenzhou/src/CMakeLists.txt index 8a62068f63676..fe1037ab0f8d4 100644 --- a/boards/arm/stm32/shenzhou/src/CMakeLists.txt +++ b/boards/arm/stm32/shenzhou/src/CMakeLists.txt @@ -40,10 +40,6 @@ if(CONFIG_STM32_OTGFS) list(APPEND SRCS stm32_usb.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - if(CONFIG_MTD_W25) list(APPEND SRCS stm32_w25.c) endif() diff --git a/boards/arm/stm32/shenzhou/src/Make.defs b/boards/arm/stm32/shenzhou/src/Make.defs index ff4d00f0f8e62..86db238f76e14 100644 --- a/boards/arm/stm32/shenzhou/src/Make.defs +++ b/boards/arm/stm32/shenzhou/src/Make.defs @@ -42,10 +42,6 @@ ifeq ($(CONFIG_STM32_OTGFS),y) CSRCS += stm32_usb.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - ifeq ($(CONFIG_MTD_W25),y) CSRCS += stm32_w25.c endif diff --git a/boards/arm/stm32/shenzhou/src/stm32_appinit.c b/boards/arm/stm32/shenzhou/src/stm32_appinit.c deleted file mode 100644 index dc4c6b656bfec..0000000000000 --- a/boards/arm/stm32/shenzhou/src/stm32_appinit.c +++ /dev/null @@ -1,229 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32/shenzhou/src/stm32_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 - -#include -#include -#include -#include - -#include - -#include "stm32.h" -#include "shenzhou.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Configuration ************************************************************/ - -/* Assume that we support everything until convinced otherwise */ - -#define HAVE_MMCSD 1 -#define HAVE_USBDEV 1 -#define HAVE_USBHOST 1 -#define HAVE_W25 1 - -/* Configuration ************************************************************/ - -/* SPI1 connects to the SD CARD (and to the SPI FLASH) */ - -#define STM32_MMCSDSPIPORTNO 1 /* SPI1 */ -#define STM32_MMCSDSLOTNO 0 /* Only one slot */ - -#ifndef CONFIG_STM32_SPI1 -# undef HAVE_MMCSD -#endif - -/* Can't support MMC/SD features if mountpoints are disabled */ - -#ifdef CONFIG_DISABLE_MOUNTPOINT -# undef HAVE_MMCSD -#endif - -/* Default MMC/SD minor number */ - -#ifdef HAVE_MMCSD -# ifndef CONFIG_NSH_MMCSDMINOR -# define CONFIG_NSH_MMCSDMINOR 0 -# endif - -/* Default MMC/SD SLOT number */ - -# if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != STM32_MMCSDSLOTNO -# error "Only one MMC/SD slot: Slot 0" -# endif - -/* Verify configured SPI port number */ - -# if defined(CONFIG_NSH_MMCSDSPIPORTNO) && CONFIG_NSH_MMCSDSPIPORTNO != STM32_MMCSDSPIPORTNO -# error "Only one MMC/SD port: SPI1" -# endif -#endif - -/* Can't support the W25 device if it SPI1 or W25 support is not enabled */ - -#if !defined(CONFIG_STM32_SPI1) || !defined(CONFIG_MTD_W25) -# undef HAVE_W25 -#endif - -/* Can't support W25 features if mountpoints are disabled */ - -#ifdef CONFIG_DISABLE_MOUNTPOINT -# undef HAVE_W25 -#endif - -/* Default W25 minor number */ - -#if defined(HAVE_W25) && !defined(CONFIG_NSH_W25MINOR) -# define CONFIG_NSH_W25MINOR 0 -#endif - -/* Can't support USB host or device features if USB OTG FS is not enabled */ - -#ifndef CONFIG_STM32_OTGFS -# undef HAVE_USBDEV -# undef HAVE_USBHOST -#endif - -/* Can't support USB device is USB device is not enabled */ - -#ifndef CONFIG_USBDEV -# undef HAVE_USBDEV -#endif - -/* Can't support USB host is USB host is not enabled */ - -#ifndef CONFIG_USBHOST -# undef HAVE_USBHOST -#endif - -/**************************************************************************** - * 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 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) -{ - int ret; - -#ifdef HAVE_W25 - /* Initialize and register the W25 FLASH file system. */ - - ret = stm32_w25initialize(CONFIG_NSH_W25MINOR); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: Failed to initialize W25 minor %d: %d\n", - CONFIG_NSH_W25MINOR, ret); - return ret; - } -#endif - -#ifdef HAVE_MMCSD - /* Initialize the SPI-based MMC/SD slot */ - - ret = stm32_sdinitialize(CONFIG_NSH_MMCSDMINOR); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: Failed to initialize MMC/SD slot %d: %d\n", - STM32_MMCSDSLOTNO, ret); - return ret; - } -#endif - -#ifdef HAVE_USBHOST - /* Initialize USB host operation. - * stm32_usbhost_initialize() starts a thread will monitor - * for USB connection and disconnection events. - */ - - ret = stm32_usbhost_initialize(); - if (ret != OK) - { - syslog(LOG_ERR, "ERROR: Failed to initialize USB host: %d\n", ret); - return ret; - } -#endif - -#ifdef CONFIG_INPUT_ADS7843E - /* Initialize the touchscreen */ - - ret = stm32_tsc_setup(0); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: stm32_tsc_setup failed: %d\n", ret); - } -#endif - -#ifdef CONFIG_ADC - /* Initialize ADC and register the ADC driver. */ - - ret = stm32_adc_setup(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: stm32_adc_setup failed: %d\n", ret); - } -#endif - -#ifdef CONFIG_STM32_CAN_CHARDRIVER - /* Initialize CAN and register the CAN driver. */ - - ret = stm32_can_setup(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: stm32_can_setup failed: %d\n", ret); - } -#endif - - UNUSED(ret); - return OK; -} diff --git a/boards/arm/stm32/shenzhou/src/stm32_boot.c b/boards/arm/stm32/shenzhou/src/stm32_boot.c index 7d4e70f42e612..b4aa743dcb07b 100644 --- a/boards/arm/stm32/shenzhou/src/stm32_boot.c +++ b/boards/arm/stm32/shenzhou/src/stm32_boot.c @@ -28,16 +28,105 @@ #include +#include +#include +#include +#include + #include #include #include "arm_internal.h" +#include "stm32.h" #include "shenzhou.h" /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ +/* Configuration ************************************************************/ + +/* Assume that we support everything until convinced otherwise */ + +#define HAVE_MMCSD 1 +#define HAVE_USBDEV 1 +#define HAVE_USBHOST 1 +#define HAVE_W25 1 + +/* Configuration ************************************************************/ + +/* SPI1 connects to the SD CARD (and to the SPI FLASH) */ + +#define STM32_MMCSDSPIPORTNO 1 /* SPI1 */ +#define STM32_MMCSDSLOTNO 0 /* Only one slot */ + +#ifndef CONFIG_STM32_SPI1 +# undef HAVE_MMCSD +#endif + +/* Can't support MMC/SD features if mountpoints are disabled */ + +#ifdef CONFIG_DISABLE_MOUNTPOINT +# undef HAVE_MMCSD +#endif + +/* Default MMC/SD minor number */ + +#ifdef HAVE_MMCSD +# ifndef CONFIG_NSH_MMCSDMINOR +# define CONFIG_NSH_MMCSDMINOR 0 +# endif + +/* Default MMC/SD SLOT number */ + +# if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != STM32_MMCSDSLOTNO +# error "Only one MMC/SD slot: Slot 0" +# endif + +/* Verify configured SPI port number */ + +# if defined(CONFIG_NSH_MMCSDSPIPORTNO) && CONFIG_NSH_MMCSDSPIPORTNO != STM32_MMCSDSPIPORTNO +# error "Only one MMC/SD port: SPI1" +# endif +#endif + +/* Can't support the W25 device if it SPI1 or W25 support is not enabled */ + +#if !defined(CONFIG_STM32_SPI1) || !defined(CONFIG_MTD_W25) +# undef HAVE_W25 +#endif + +/* Can't support W25 features if mountpoints are disabled */ + +#ifdef CONFIG_DISABLE_MOUNTPOINT +# undef HAVE_W25 +#endif + +/* Default W25 minor number */ + +#if defined(HAVE_W25) && !defined(CONFIG_NSH_W25MINOR) +# define CONFIG_NSH_W25MINOR 0 +#endif + +/* Can't support USB host or device features if USB OTG FS is not enabled */ + +#ifndef CONFIG_STM32_OTGFS +# undef HAVE_USBDEV +# undef HAVE_USBHOST +#endif + +/* Can't support USB device is USB device is not enabled */ + +#ifndef CONFIG_USBDEV +# undef HAVE_USBDEV +#endif + +/* Can't support USB host is USB host is not enabled */ + +#ifndef CONFIG_USBHOST +# undef HAVE_USBHOST +#endif + /**************************************************************************** * Private Functions ****************************************************************************/ @@ -88,3 +177,94 @@ void stm32_boardinitialize(void) board_autoled_initialize(); #endif } + +/**************************************************************************** + * 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ + int ret; + +#ifdef HAVE_W25 + /* Initialize and register the W25 FLASH file system. */ + + ret = stm32_w25initialize(CONFIG_NSH_W25MINOR); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: Failed to initialize W25 minor %d: %d\n", + CONFIG_NSH_W25MINOR, ret); + return; + } +#endif + +#ifdef HAVE_MMCSD + /* Initialize the SPI-based MMC/SD slot */ + + ret = stm32_sdinitialize(CONFIG_NSH_MMCSDMINOR); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: Failed to initialize MMC/SD slot %d: %d\n", + STM32_MMCSDSLOTNO, ret); + return; + } +#endif + +#ifdef HAVE_USBHOST + /* Initialize USB host operation. + * stm32_usbhost_initialize() starts a thread will monitor + * for USB connection and disconnection events. + */ + + ret = stm32_usbhost_initialize(); + if (ret != OK) + { + syslog(LOG_ERR, "ERROR: Failed to initialize USB host: %d\n", ret); + return; + } +#endif + +#ifdef CONFIG_INPUT_ADS7843E + /* Initialize the touchscreen */ + + ret = stm32_tsc_setup(0); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: stm32_tsc_setup failed: %d\n", ret); + } +#endif + +#ifdef CONFIG_ADC + /* Initialize ADC and register the ADC driver. */ + + ret = stm32_adc_setup(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: stm32_adc_setup failed: %d\n", ret); + } +#endif + +#ifdef CONFIG_STM32_CAN_CHARDRIVER + /* Initialize CAN and register the CAN driver. */ + + ret = stm32_can_setup(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: stm32_can_setup failed: %d\n", ret); + } +#endif + + UNUSED(ret); +} +#endif diff --git a/boards/arm/stm32/shenzhou/src/stm32_usbmsc.c b/boards/arm/stm32/shenzhou/src/stm32_usbmsc.c index aff6d4f96717f..4e9f496f1320a 100644 --- a/boards/arm/stm32/shenzhou/src/stm32_usbmsc.c +++ b/boards/arm/stm32/shenzhou/src/stm32_usbmsc.c @@ -60,8 +60,7 @@ int board_usbmsc_initialize(int port) { /* If system/usbmsc is built as an NSH command, then SD slot should - * already have been initialized in board_app_initialize() (see - * stm32_appinit.c). + * already have been initialized. * In this case, there is nothing further to be done here. */ diff --git a/boards/arm/stm32/stm3210e-eval/configs/nsh/defconfig b/boards/arm/stm32/stm3210e-eval/configs/nsh/defconfig index 5c1b6fc09c095..315e9136cf1a8 100644 --- a/boards/arm/stm32/stm3210e-eval/configs/nsh/defconfig +++ b/boards/arm/stm32/stm3210e-eval/configs/nsh/defconfig @@ -27,7 +27,6 @@ CONFIG_LINE_MAX=64 CONFIG_MMCSD=y CONFIG_MMCSD_SDIO=y CONFIG_MTD=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/stm32/stm3210e-eval/configs/nsh2/defconfig b/boards/arm/stm32/stm3210e-eval/configs/nsh2/defconfig index 36405c5962db8..0f9b059c5d238 100644 --- a/boards/arm/stm32/stm3210e-eval/configs/nsh2/defconfig +++ b/boards/arm/stm32/stm3210e-eval/configs/nsh2/defconfig @@ -59,7 +59,6 @@ CONFIG_MMCSD=y CONFIG_MMCSD_SDIO=y CONFIG_MQ_MAXMSGSIZE=64 CONFIG_MTD=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/stm3210e-eval/configs/nxterm/defconfig b/boards/arm/stm32/stm3210e-eval/configs/nxterm/defconfig index 46521cfdfc7fc..395633cb5f030 100644 --- a/boards/arm/stm32/stm3210e-eval/configs/nxterm/defconfig +++ b/boards/arm/stm32/stm3210e-eval/configs/nxterm/defconfig @@ -29,7 +29,6 @@ CONFIG_LCD_MAXCONTRAST=1 CONFIG_LCD_NOGETRUN=y CONFIG_LINE_MAX=64 CONFIG_MQ_MAXMSGSIZE=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_LIBRARY=y diff --git a/boards/arm/stm32/stm3210e-eval/configs/pm/defconfig b/boards/arm/stm32/stm3210e-eval/configs/pm/defconfig index 5beb8b4a8b5a3..4fd1d15afc423 100644 --- a/boards/arm/stm32/stm3210e-eval/configs/pm/defconfig +++ b/boards/arm/stm32/stm3210e-eval/configs/pm/defconfig @@ -51,7 +51,6 @@ CONFIG_LCD_NOGETRUN=y CONFIG_LCD_RPORTRAIT=y CONFIG_LINE_MAX=64 CONFIG_MQ_MAXMSGSIZE=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/stm3210e-eval/src/CMakeLists.txt b/boards/arm/stm32/stm3210e-eval/src/CMakeLists.txt index 98cbdb0b90d10..b870c533c1ce4 100644 --- a/boards/arm/stm32/stm3210e-eval/src/CMakeLists.txt +++ b/boards/arm/stm32/stm3210e-eval/src/CMakeLists.txt @@ -29,10 +29,6 @@ if(CONFIG_STM32_FSMC) list(APPEND SRCS stm32_selectlcd.c stm32_deselectlcd.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - if(CONFIG_ADC) list(APPEND SRCS stm32_adc.c) endif() diff --git a/boards/arm/stm32/stm3210e-eval/src/Make.defs b/boards/arm/stm32/stm3210e-eval/src/Make.defs index d618974f4b666..9815a6acb2d43 100644 --- a/boards/arm/stm32/stm3210e-eval/src/Make.defs +++ b/boards/arm/stm32/stm3210e-eval/src/Make.defs @@ -30,10 +30,6 @@ CSRCS += stm32_deselectnor.c stm32_selectsram.c stm32_deselectsram.c CSRCS += stm32_selectlcd.c stm32_deselectlcd.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - ifeq ($(CONFIG_ADC),y) CSRCS += stm32_adc.c endif diff --git a/boards/arm/stm32/stm3210e-eval/src/stm32_appinit.c b/boards/arm/stm32/stm3210e-eval/src/stm32_appinit.c deleted file mode 100644 index f998fd7794828..0000000000000 --- a/boards/arm/stm32/stm3210e-eval/src/stm32_appinit.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32/stm3210e-eval/src/stm32_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 - -#include -#include - -#include "stm3210e-eval.h" - -/**************************************************************************** - * 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 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 stm32_bringup(); -#endif -} diff --git a/boards/arm/stm32/stm3210e-eval/src/stm32_composite.c b/boards/arm/stm32/stm3210e-eval/src/stm32_composite.c index 036a66a9e31e6..b955808ef1ba0 100644 --- a/boards/arm/stm32/stm3210e-eval/src/stm32_composite.c +++ b/boards/arm/stm32/stm3210e-eval/src/stm32_composite.c @@ -359,8 +359,7 @@ static void *board_composite1_connect(int port) int board_composite_initialize(int port) { /* If system/composite is built as an NSH command, then SD slot should - * already have been initialized in board_app_initialize() (see - * stm32_appinit.c). + * already have been initialized. * In this case, there is nothing further to be done here. * * NOTE: CONFIG_NSH_BUILTIN_APPS is not a fool-proof indication that NSH diff --git a/boards/arm/stm32/stm3210e-eval/src/stm32_usbmsc.c b/boards/arm/stm32/stm3210e-eval/src/stm32_usbmsc.c index 9b29146c8da3c..05bd61798b54f 100644 --- a/boards/arm/stm32/stm3210e-eval/src/stm32_usbmsc.c +++ b/boards/arm/stm32/stm3210e-eval/src/stm32_usbmsc.c @@ -93,8 +93,7 @@ int stm32_bringup(void); int board_usbmsc_initialize(int port) { /* If system/usbmsc is built as an NSH command, then SD slot should - * already have been initialized in board_app_initialize() - * (see stm32_appinit.c). + * already have been initialized. * In this case, there is nothing further to be done here. */ diff --git a/boards/arm/stm32/stm3220g-eval/configs/nsh2/defconfig b/boards/arm/stm32/stm3220g-eval/configs/nsh2/defconfig index baad242d5d8f6..25cbc3ad5eb00 100644 --- a/boards/arm/stm32/stm3220g-eval/configs/nsh2/defconfig +++ b/boards/arm/stm32/stm3220g-eval/configs/nsh2/defconfig @@ -54,7 +54,6 @@ CONFIG_NET_TCP=y CONFIG_NET_TCP_PREALLOC_CONNS=40 CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/stm3220g-eval/src/CMakeLists.txt b/boards/arm/stm32/stm3220g-eval/src/CMakeLists.txt index 2dd02863f9112..7f0321dd1b8b0 100644 --- a/boards/arm/stm32/stm3220g-eval/src/CMakeLists.txt +++ b/boards/arm/stm32/stm3220g-eval/src/CMakeLists.txt @@ -60,10 +60,6 @@ if(CONFIG_STM32_CAN_CHARDRIVER) list(APPEND SRCS stm32_can.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - if(CONFIG_INPUT_STMPE811) list(APPEND SRCS stm32_stmpe811.c) endif() diff --git a/boards/arm/stm32/stm3220g-eval/src/Make.defs b/boards/arm/stm32/stm3220g-eval/src/Make.defs index e214325560f80..e77785ac6fa58 100644 --- a/boards/arm/stm32/stm3220g-eval/src/Make.defs +++ b/boards/arm/stm32/stm3220g-eval/src/Make.defs @@ -54,10 +54,6 @@ ifeq ($(CONFIG_STM32_CAN_CHARDRIVER),y) CSRCS += stm32_can.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - ifeq ($(CONFIG_INPUT_STMPE811),y) CSRCS += stm32_stmpe811.c endif diff --git a/boards/arm/stm32/stm3220g-eval/src/stm32_appinit.c b/boards/arm/stm32/stm3220g-eval/src/stm32_appinit.c deleted file mode 100644 index 670e4d7c3082a..0000000000000 --- a/boards/arm/stm32/stm3220g-eval/src/stm32_appinit.c +++ /dev/null @@ -1,326 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32/stm3220g-eval/src/stm32_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 - -#include -#include -#include -#include - -#include -#include - -#ifdef CONFIG_STM32_SPI1 -# include -# include -#endif - -#ifdef CONFIG_STM32_SDIO -# include -# include -#endif - -#ifdef CONFIG_STM32_OTGFS -# include "stm32_usbhost.h" -#endif - -#include "stm32.h" -#include "stm32_i2c.h" -#include "stm3220g-eval.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Configuration ************************************************************/ - -/* For now, don't build in any SPI1 support -- NSH is not using it */ - -#undef CONFIG_STM32_SPI1 - -/* MMCSD PORT and SLOT number probably depend on the board configuration */ - -#define HAVE_USBDEV 1 -#define HAVE_MMCSD 1 -#define HAVE_USBHOST 1 - -#if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != 0 -# error "Only one MMC/SD slot" -# undef CONFIG_NSH_MMCSDSLOTNO -#endif - -#ifndef CONFIG_NSH_MMCSDSLOTNO -# define CONFIG_NSH_MMCSDSLOTNO 0 -#endif - -/* Can't support MMC/SD features if mountpoints are disabled or if SDIO - * support is not enabled. - */ - -#if defined(CONFIG_DISABLE_MOUNTPOINT) || !defined(CONFIG_STM32_SDIO) -# undef HAVE_MMCSD -#endif - -#ifndef CONFIG_NSH_MMCSDMINOR -# define CONFIG_NSH_MMCSDMINOR 0 -#endif - -/* Can't support USB host or device features if USB OTG FS is not enabled */ - -#ifndef CONFIG_STM32_OTGFS -# undef HAVE_USBDEV -# undef HAVE_USBHOST -#endif - -/* Can't support USB device is USB device is not enabled */ - -#ifndef CONFIG_USBDEV -# undef HAVE_USBDEV -#endif - -/* Can't support USB host is USB host is not enabled */ - -#ifndef CONFIG_USBHOST -# undef HAVE_USBHOST -#endif - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: stm32_i2c_register - * - * Description: - * Register one I2C drivers for the I2C tool. - * - ****************************************************************************/ - -#ifdef HAVE_I2CTOOL -static void stm32_i2c_register(int bus) -{ - struct i2c_master_s *i2c; - int ret; - - i2c = stm32_i2cbus_initialize(bus); - if (i2c == NULL) - { - _err("ERROR: Failed to get I2C%d interface\n", bus); - } - else - { - ret = i2c_register(i2c, bus); - if (ret < 0) - { - _err("ERROR: Failed to register I2C%d driver: %d\n", bus, ret); - stm32_i2cbus_uninitialize(i2c); - } - } -} -#endif - -/**************************************************************************** - * Name: stm32_i2ctool - * - * Description: - * Register I2C drivers for the I2C tool. - * - ****************************************************************************/ - -#ifdef HAVE_I2CTOOL -static void stm32_i2ctool(void) -{ -#ifdef CONFIG_STM32_I2C1 - stm32_i2c_register(1); -#endif -#ifdef CONFIG_STM32_I2C2 - stm32_i2c_register(2); -#endif -#ifdef CONFIG_STM32_I2C3 - stm32_i2c_register(3); -#endif -} -#else -# define stm32_i2ctool() -#endif - -/**************************************************************************** - * 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 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_STM32_SPI1 - struct spi_dev_s *spi; - struct mtd_dev_s *mtd; -#endif -#ifdef HAVE_MMCSD - struct sdio_dev_s *sdio; -#endif - int ret; - - /* Register I2C drivers on behalf of the I2C tool */ - - stm32_i2ctool(); - - /* Configure SPI-based devices */ - -#ifdef CONFIG_STM32_SPI1 - /* Get the SPI port */ - - spi = stm32_spibus_initialize(1); - if (!spi) - { - syslog(LOG_ERR, "ERROR: Failed to initialize SPI port 0\n"); - return -ENODEV; - } - - /* Now bind the SPI interface to the M25P64/128 SPI FLASH driver */ - - mtd = m25p_initialize(spi); - if (!mtd) - { - syslog(LOG_ERR, - "ERROR: Failed to bind SPI port 0 to the SPI FLASH driver\n"); - return -ENODEV; - } - -#warning "Now what are we going to do with this SPI FLASH driver?" -#endif - - /* Mount the SDIO-based MMC/SD block driver */ - -#ifdef HAVE_MMCSD - /* First, get an instance of the SDIO interface */ - - sdio = sdio_initialize(CONFIG_NSH_MMCSDSLOTNO); - if (!sdio) - { - syslog(LOG_ERR, "ERROR: Failed to initialize SDIO slot %d\n", - CONFIG_NSH_MMCSDSLOTNO); - return -ENODEV; - } - - /* Now bind the SDIO interface to the MMC/SD driver */ - - ret = mmcsd_slotinitialize(CONFIG_NSH_MMCSDMINOR, sdio); - if (ret != OK) - { - syslog(LOG_ERR, - "ERROR: Failed to bind SDIO to the MMC/SD driver: %d\n", ret); - return ret; - } - - /* Then let's guess and say that there is a card in the slot. I need to - * check to see if the STM3220G-EVAL board supports a GPIO to detect if - * there is a card in the slot. - */ - - sdio_mediachange(sdio, true); -#endif - - /* Initialize USB host operation. stm32_usbhost_initialize() starts a - * thread will monitor for USB connection and disconnection events. - */ - -#ifdef HAVE_USBHOST - ret = stm32_usbhost_initialize(); - if (ret != OK) - { - syslog(LOG_ERR, "ERROR: Failed to initialize USB host: %d\n", ret); - return ret; - } -#endif - -#ifdef CONFIG_INPUT_STMPE811 - /* Initialize the touchscreen */ - - ret = stm32_tsc_setup(0); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: stm32_tsc_setup failed: %d\n", ret); - } -#endif - -#ifdef CONFIG_PWM - /* Initialize PWM and register the PWM device. */ - - ret = stm32_pwm_setup(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: stm32_pwm_setup() failed: %d\n", ret); - } -#endif - -#ifdef CONFIG_ADC - /* Initialize ADC and register the ADC driver. */ - - ret = stm32_adc_setup(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: stm32_adc_setup failed: %d\n", ret); - } -#endif - -#ifdef CONFIG_STM32_CAN_CHARDRIVER - /* Initialize CAN and register the CAN driver. */ - - ret = stm32_can_setup(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: stm32_can_setup failed: %d\n", ret); - } -#endif - - UNUSED(ret); - return OK; -} diff --git a/boards/arm/stm32/stm3220g-eval/src/stm32_boot.c b/boards/arm/stm32/stm3220g-eval/src/stm32_boot.c index 96b9e34b351a2..a3693105506b6 100644 --- a/boards/arm/stm32/stm3220g-eval/src/stm32_boot.c +++ b/boards/arm/stm32/stm3220g-eval/src/stm32_boot.c @@ -28,20 +28,149 @@ #include +#include +#include +#include + #include +#include #include +#ifdef CONFIG_STM32_SPI1 +# include +# include +#endif + +#ifdef CONFIG_STM32_SDIO +# include +# include +#endif + +#ifdef CONFIG_STM32_OTGFS +# include "stm32_usbhost.h" +#endif + #include "arm_internal.h" +#include "stm32.h" +#include "stm32_i2c.h" #include "stm3220g-eval.h" /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ +/* Configuration ************************************************************/ + +/* For now, don't build in any SPI1 support -- NSH is not using it */ + +#undef CONFIG_STM32_SPI1 + +/* MMCSD PORT and SLOT number probably depend on the board configuration */ + +#define HAVE_USBDEV 1 +#define HAVE_MMCSD 1 +#define HAVE_USBHOST 1 + +#if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != 0 +# error "Only one MMC/SD slot" +# undef CONFIG_NSH_MMCSDSLOTNO +#endif + +#ifndef CONFIG_NSH_MMCSDSLOTNO +# define CONFIG_NSH_MMCSDSLOTNO 0 +#endif + +/* Can't support MMC/SD features if mountpoints are disabled or if SDIO + * support is not enabled. + */ + +#if defined(CONFIG_DISABLE_MOUNTPOINT) || !defined(CONFIG_STM32_SDIO) +# undef HAVE_MMCSD +#endif + +#ifndef CONFIG_NSH_MMCSDMINOR +# define CONFIG_NSH_MMCSDMINOR 0 +#endif + +/* Can't support USB host or device features if USB OTG FS is not enabled */ + +#ifndef CONFIG_STM32_OTGFS +# undef HAVE_USBDEV +# undef HAVE_USBHOST +#endif + +/* Can't support USB device is USB device is not enabled */ + +#ifndef CONFIG_USBDEV +# undef HAVE_USBDEV +#endif + +/* Can't support USB host is USB host is not enabled */ + +#ifndef CONFIG_USBHOST +# undef HAVE_USBHOST +#endif + /**************************************************************************** * Private Functions ****************************************************************************/ +/**************************************************************************** + * Name: stm32_i2c_register + * + * Description: + * Register one I2C drivers for the I2C tool. + * + ****************************************************************************/ + +#ifdef HAVE_I2CTOOL +static void stm32_i2c_register(int bus) +{ + struct i2c_master_s *i2c; + int ret; + + i2c = stm32_i2cbus_initialize(bus); + if (i2c == NULL) + { + _err("ERROR: Failed to get I2C%d interface\n", bus); + } + else + { + ret = i2c_register(i2c, bus); + if (ret < 0) + { + _err("ERROR: Failed to register I2C%d driver: %d\n", bus, ret); + stm32_i2cbus_uninitialize(i2c); + } + } +} +#endif + +/**************************************************************************** + * Name: stm32_i2ctool + * + * Description: + * Register I2C drivers for the I2C tool. + * + ****************************************************************************/ + +#ifdef HAVE_I2CTOOL +static void stm32_i2ctool(void) +{ +#ifdef CONFIG_STM32_I2C1 + stm32_i2c_register(1); +#endif +#ifdef CONFIG_STM32_I2C2 + stm32_i2c_register(2); +#endif +#ifdef CONFIG_STM32_I2C3 + stm32_i2c_register(3); +#endif +} +#else +# define stm32_i2ctool() +#endif + /**************************************************************************** * Public Functions ****************************************************************************/ @@ -95,3 +224,145 @@ void stm32_boardinitialize(void) board_autoled_initialize(); #endif } + +/**************************************************************************** + * 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ +#ifdef CONFIG_STM32_SPI1 + struct spi_dev_s *spi; + struct mtd_dev_s *mtd; +#endif +#ifdef HAVE_MMCSD + struct sdio_dev_s *sdio; +#endif + int ret; + + /* Register I2C drivers on behalf of the I2C tool */ + + stm32_i2ctool(); + + /* Configure SPI-based devices */ + +#ifdef CONFIG_STM32_SPI1 + /* Get the SPI port */ + + spi = stm32_spibus_initialize(1); + if (!spi) + { + syslog(LOG_ERR, "ERROR: Failed to initialize SPI port 0\n"); + return; + } + + /* Now bind the SPI interface to the M25P64/128 SPI FLASH driver */ + + mtd = m25p_initialize(spi); + if (!mtd) + { + syslog(LOG_ERR, + "ERROR: Failed to bind SPI port 0 to the SPI FLASH driver\n"); + return; + } + +#warning "Now what are we going to do with this SPI FLASH driver?" +#endif + + /* Mount the SDIO-based MMC/SD block driver */ + +#ifdef HAVE_MMCSD + /* First, get an instance of the SDIO interface */ + + sdio = sdio_initialize(CONFIG_NSH_MMCSDSLOTNO); + if (!sdio) + { + syslog(LOG_ERR, "ERROR: Failed to initialize SDIO slot %d\n", + CONFIG_NSH_MMCSDSLOTNO); + return; + } + + /* Now bind the SDIO interface to the MMC/SD driver */ + + ret = mmcsd_slotinitialize(CONFIG_NSH_MMCSDMINOR, sdio); + if (ret != OK) + { + syslog(LOG_ERR, + "ERROR: Failed to bind SDIO to the MMC/SD driver: %d\n", ret); + return; + } + + /* Then let's guess and say that there is a card in the slot. I need to + * check to see if the STM3220G-EVAL board supports a GPIO to detect if + * there is a card in the slot. + */ + + sdio_mediachange(sdio, true); +#endif + + /* Initialize USB host operation. stm32_usbhost_initialize() starts a + * thread will monitor for USB connection and disconnection events. + */ + +#ifdef HAVE_USBHOST + ret = stm32_usbhost_initialize(); + if (ret != OK) + { + syslog(LOG_ERR, "ERROR: Failed to initialize USB host: %d\n", ret); + return; + } +#endif + +#ifdef CONFIG_INPUT_STMPE811 + /* Initialize the touchscreen */ + + ret = stm32_tsc_setup(0); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: stm32_tsc_setup failed: %d\n", ret); + } +#endif + +#ifdef CONFIG_PWM + /* Initialize PWM and register the PWM device. */ + + ret = stm32_pwm_setup(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: stm32_pwm_setup() failed: %d\n", ret); + } +#endif + +#ifdef CONFIG_ADC + /* Initialize ADC and register the ADC driver. */ + + ret = stm32_adc_setup(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: stm32_adc_setup failed: %d\n", ret); + } +#endif + +#ifdef CONFIG_STM32_CAN_CHARDRIVER + /* Initialize CAN and register the CAN driver. */ + + ret = stm32_can_setup(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: stm32_can_setup failed: %d\n", ret); + } +#endif + + UNUSED(ret); +} +#endif diff --git a/boards/arm/stm32/stm3240g-eval/configs/fb/defconfig b/boards/arm/stm32/stm3240g-eval/configs/fb/defconfig index e5ced6c682d9c..7db5d2ec714c4 100644 --- a/boards/arm/stm32/stm3240g-eval/configs/fb/defconfig +++ b/boards/arm/stm32/stm3240g-eval/configs/fb/defconfig @@ -13,7 +13,6 @@ CONFIG_ARCH_CHIP="stm32" CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F407IG=y CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y CONFIG_DRIVERS_VIDEO=y @@ -37,7 +36,6 @@ CONFIG_LCD_NOGETRUN=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 CONFIG_MQ_MAXMSGSIZE=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32/stm3240g-eval/configs/nsh2/defconfig b/boards/arm/stm32/stm3240g-eval/configs/nsh2/defconfig index 2ef8101dc9899..007647eefa558 100644 --- a/boards/arm/stm32/stm3240g-eval/configs/nsh2/defconfig +++ b/boards/arm/stm32/stm3240g-eval/configs/nsh2/defconfig @@ -55,7 +55,6 @@ CONFIG_NET_TCP=y CONFIG_NET_TCP_PREALLOC_CONNS=40 CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/stm3240g-eval/src/CMakeLists.txt b/boards/arm/stm32/stm3240g-eval/src/CMakeLists.txt index 30e92467489c9..c8c5aa4f724e1 100644 --- a/boards/arm/stm32/stm3240g-eval/src/CMakeLists.txt +++ b/boards/arm/stm32/stm3240g-eval/src/CMakeLists.txt @@ -53,10 +53,6 @@ if(CONFIG_STM32_CAN_CHARDRIVER) list(APPEND SRCS stm32_can.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - if(CONFIG_INPUT_STMPE811) list(APPEND SRCS stm32_stmpe811.c) endif() diff --git a/boards/arm/stm32/stm3240g-eval/src/Make.defs b/boards/arm/stm32/stm3240g-eval/src/Make.defs index 04b7b4c85a92f..04d1ecfdd0b22 100644 --- a/boards/arm/stm32/stm3240g-eval/src/Make.defs +++ b/boards/arm/stm32/stm3240g-eval/src/Make.defs @@ -55,10 +55,6 @@ ifeq ($(CONFIG_STM32_CAN_CHARDRIVER),y) CSRCS += stm32_can.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - ifeq ($(CONFIG_INPUT_STMPE811),y) CSRCS += stm32_stmpe811.c endif diff --git a/boards/arm/stm32/stm3240g-eval/src/stm32_appinit.c b/boards/arm/stm32/stm3240g-eval/src/stm32_appinit.c deleted file mode 100644 index 69d0329d49575..0000000000000 --- a/boards/arm/stm32/stm3240g-eval/src/stm32_appinit.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32/stm3240g-eval/src/stm32_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 - -#include -#include - -#include "stm3240g-eval.h" - -/**************************************************************************** - * 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 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 stm32_bringup(); -#endif -} diff --git a/boards/arm/stm32/stm32_tiny/configs/nsh/defconfig b/boards/arm/stm32/stm32_tiny/configs/nsh/defconfig index 57302ab9ec0ae..221484c5f5975 100644 --- a/boards/arm/stm32/stm32_tiny/configs/nsh/defconfig +++ b/boards/arm/stm32/stm32_tiny/configs/nsh/defconfig @@ -33,7 +33,6 @@ CONFIG_EXAMPLES_NRF24L01TERM=y CONFIG_FILE_STREAM=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=80 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=1024 CONFIG_RAM_SIZE=20480 diff --git a/boards/arm/stm32/stm32_tiny/src/CMakeLists.txt b/boards/arm/stm32/stm32_tiny/src/CMakeLists.txt index 0412d4f845d76..c73b5cfb5bddf 100644 --- a/boards/arm/stm32/stm32_tiny/src/CMakeLists.txt +++ b/boards/arm/stm32/stm32_tiny/src/CMakeLists.txt @@ -26,10 +26,6 @@ if(CONFIG_PWM) list(APPEND SRCS stm32_pwm.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - target_sources(board PRIVATE ${SRCS}) set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/ld.script") diff --git a/boards/arm/stm32/stm32_tiny/src/Make.defs b/boards/arm/stm32/stm32_tiny/src/Make.defs index 11d3bf206260e..a8268fc340102 100644 --- a/boards/arm/stm32/stm32_tiny/src/Make.defs +++ b/boards/arm/stm32/stm32_tiny/src/Make.defs @@ -28,10 +28,6 @@ ifeq ($(CONFIG_PWM),y) CSRCS += stm32_pwm.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - DEPPATH += --dep-path board VPATH += :board CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board diff --git a/boards/arm/stm32/stm32_tiny/src/stm32_appinit.c b/boards/arm/stm32/stm32_tiny/src/stm32_appinit.c deleted file mode 100644 index 7af85c071d97d..0000000000000 --- a/boards/arm/stm32/stm32_tiny/src/stm32_appinit.c +++ /dev/null @@ -1,97 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32/stm32_tiny/src/stm32_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 - -#include -#include -#include -#include - -#include - -#include "stm32.h" -#include "stm32_tiny.h" - -#ifdef CONFIG_WL_NRF24L01 -#include "stm32_nrf24l01.h" -#endif - -/**************************************************************************** - * 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 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) -{ - int ret = OK; - -#ifdef CONFIG_PWM - /* Initialize PWM and register the PWM device. */ - - ret = stm32_pwm_setup(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: stm32_pwm_setup() failed: %d\n", ret); - } -#endif - -#if defined(CONFIG_WL_NRF24L01) - /* Initialize the NRF24L01 wireless module */ - - ret = board_nrf24l01_initialize(2); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: board_nrf24l01_initialize failed: %d\n", ret); - } -#endif - - return ret; -} diff --git a/boards/arm/stm32/stm32_tiny/src/stm32_boot.c b/boards/arm/stm32/stm32_tiny/src/stm32_boot.c index 92719c9f07a84..978fee88af4d1 100644 --- a/boards/arm/stm32/stm32_tiny/src/stm32_boot.c +++ b/boards/arm/stm32/stm32_tiny/src/stm32_boot.c @@ -34,6 +34,10 @@ #include "arm_internal.h" #include "stm32_tiny.h" +#ifdef CONFIG_WL_NRF24L01 +#include "stm32_nrf24l01.h" +#endif + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -82,3 +86,44 @@ void stm32_boardinitialize(void) stm32_usbinitialize(); #endif } + +/**************************************************************************** + * 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ + int ret = OK; + +#ifdef CONFIG_PWM + /* Initialize PWM and register the PWM device. */ + + ret = stm32_pwm_setup(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: stm32_pwm_setup() failed: %d\n", ret); + } +#endif + +#if defined(CONFIG_WL_NRF24L01) + /* Initialize the NRF24L01 wireless module */ + + ret = board_nrf24l01_initialize(2); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: board_nrf24l01_initialize failed: %d\n", ret); + } +#endif +} +#endif diff --git a/boards/arm/stm32/stm32butterfly2/configs/nsh/defconfig b/boards/arm/stm32/stm32butterfly2/configs/nsh/defconfig index 24366429338dd..79655e199f1a4 100644 --- a/boards/arm/stm32/stm32butterfly2/configs/nsh/defconfig +++ b/boards/arm/stm32/stm32butterfly2/configs/nsh/defconfig @@ -38,7 +38,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_STRERROR=y CONFIG_LIBC_STRERROR_SHORT=y CONFIG_MMCSD=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_MOTD=y CONFIG_NSH_MOTD_STRING="stm32butterfly2 welcoms you" diff --git a/boards/arm/stm32/stm32butterfly2/configs/nshnet/defconfig b/boards/arm/stm32/stm32butterfly2/configs/nshnet/defconfig index 8026f3b09e5aa..762efdfdce220 100644 --- a/boards/arm/stm32/stm32butterfly2/configs/nshnet/defconfig +++ b/boards/arm/stm32/stm32butterfly2/configs/nshnet/defconfig @@ -49,7 +49,6 @@ CONFIG_NET_ICMP_SOCKET=y CONFIG_NET_LOCAL=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_MOTD=y CONFIG_NSH_MOTD_STRING="stm32butterfly2 welcoms you" diff --git a/boards/arm/stm32/stm32butterfly2/configs/nshusbdev/defconfig b/boards/arm/stm32/stm32butterfly2/configs/nshusbdev/defconfig index 1017fb2e5a9cc..294531d34d641 100644 --- a/boards/arm/stm32/stm32butterfly2/configs/nshusbdev/defconfig +++ b/boards/arm/stm32/stm32butterfly2/configs/nshusbdev/defconfig @@ -36,7 +36,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_STRERROR=y CONFIG_LIBC_STRERROR_SHORT=y CONFIG_MMCSD=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_MOTD=y CONFIG_NSH_MOTD_STRING="stm32butterfly2 welcoms you" diff --git a/boards/arm/stm32/stm32butterfly2/configs/nshusbhost/defconfig b/boards/arm/stm32/stm32butterfly2/configs/nshusbhost/defconfig index 24366429338dd..79655e199f1a4 100644 --- a/boards/arm/stm32/stm32butterfly2/configs/nshusbhost/defconfig +++ b/boards/arm/stm32/stm32butterfly2/configs/nshusbhost/defconfig @@ -38,7 +38,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_STRERROR=y CONFIG_LIBC_STRERROR_SHORT=y CONFIG_MMCSD=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_MOTD=y CONFIG_NSH_MOTD_STRING="stm32butterfly2 welcoms you" diff --git a/boards/arm/stm32/stm32butterfly2/src/stm32_boot.c b/boards/arm/stm32/stm32butterfly2/src/stm32_boot.c index b49ed184d95b0..de6bf256cf4de 100644 --- a/boards/arm/stm32/stm32butterfly2/src/stm32_boot.c +++ b/boards/arm/stm32/stm32butterfly2/src/stm32_boot.c @@ -49,16 +49,21 @@ void stm32_boardinitialize(void) } /**************************************************************************** - * Name: board_app_initialize + * Name: board_late_initialize * * Description: - * Initializes upper half drivers with board specific settings + * 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. * - * Returned Value: - * 0 on success or errno value of failed init function. ****************************************************************************/ -int board_app_initialize(uintptr_t arg) +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) { int ret = 0; @@ -67,7 +72,7 @@ int board_app_initialize(uintptr_t arg) if (ret < 0) { syslog(LOG_ERR, "Failed to initialize SD slot: %d\n", ret); - return ret; + return; } #endif @@ -76,7 +81,7 @@ int board_app_initialize(uintptr_t arg) if (ret < 0) { syslog(LOG_ERR, "ERROR: Failed to initialize USB host: %d\n", ret); - return ret; + return; } #endif @@ -91,5 +96,5 @@ int board_app_initialize(uintptr_t arg) #endif UNUSED(ret); - return ret; } +#endif diff --git a/boards/arm/stm32/stm32f103-minimum/Kconfig b/boards/arm/stm32/stm32f103-minimum/Kconfig index 56abc2f647755..d9ced283ea062 100644 --- a/boards/arm/stm32/stm32f103-minimum/Kconfig +++ b/boards/arm/stm32/stm32f103-minimum/Kconfig @@ -20,7 +20,7 @@ endchoice config STM32F103MINIMUM_AT24_BLOCKMOUNT bool "AT24 Serial EEPROM auto-mount" default n - depends on NSH_ARCHINIT && STM32_I2C1 && MTD_AT24XX + depends on BOARD_LATE_INITIALIZE && STM32_I2C1 && MTD_AT24XX ---help--- Automatically initialize the AT24 I2C EEPROM driver when NSH starts. diff --git a/boards/arm/stm32/stm32f103-minimum/configs/adb/defconfig b/boards/arm/stm32/stm32f103-minimum/configs/adb/defconfig index 2f879106d26a0..493f2fdb00338 100644 --- a/boards/arm/stm32/stm32f103-minimum/configs/adb/defconfig +++ b/boards/arm/stm32/stm32f103-minimum/configs/adb/defconfig @@ -25,7 +25,6 @@ # CONFIG_NSH_DISABLE_PUT is not set # CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_XD is not set -CONFIG_ADBD_BOARD_INIT=y CONFIG_ADBD_DEVICE_ID="test" CONFIG_ADBD_FILE_SERVICE=y CONFIG_ADBD_SHELL_SERVICE=y @@ -37,7 +36,6 @@ CONFIG_ARCH_CHIP="stm32" CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F103C8=y CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARDCTL_RESET=y CONFIG_BOARD_LOOPSPERMSEC=5483 CONFIG_BUILTIN=y CONFIG_DEFAULT_SMALL=y @@ -50,7 +48,6 @@ CONFIG_INIT_STACKSIZE=1024 CONFIG_LIBC_EXECFUNCS=y CONFIG_LIBUV=y CONFIG_LINE_MAX=80 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=1024 CONFIG_PSEUDOTERM=y diff --git a/boards/arm/stm32/stm32f103-minimum/configs/apds9960/defconfig b/boards/arm/stm32/stm32f103-minimum/configs/apds9960/defconfig index 0a89b725227b1..2789b752ecf43 100644 --- a/boards/arm/stm32/stm32f103-minimum/configs/apds9960/defconfig +++ b/boards/arm/stm32/stm32f103-minimum/configs/apds9960/defconfig @@ -33,7 +33,6 @@ CONFIG_I2C_DRIVER=y CONFIG_IDLETHREAD_STACKSIZE=512 CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=80 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=1024 CONFIG_PTHREAD_STACK_MIN=512 diff --git a/boards/arm/stm32/stm32f103-minimum/configs/audio_tone/defconfig b/boards/arm/stm32/stm32f103-minimum/configs/audio_tone/defconfig index 3eff2f7c3ab88..6c6800df69d9d 100644 --- a/boards/arm/stm32/stm32f103-minimum/configs/audio_tone/defconfig +++ b/boards/arm/stm32/stm32f103-minimum/configs/audio_tone/defconfig @@ -32,7 +32,6 @@ CONFIG_DEFAULT_SMALL=y CONFIG_DRIVERS_AUDIO=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=80 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=1024 CONFIG_PWM=y diff --git a/boards/arm/stm32/stm32f103-minimum/configs/buttons/defconfig b/boards/arm/stm32/stm32f103-minimum/configs/buttons/defconfig index 216993e34df26..11c015562a8d0 100644 --- a/boards/arm/stm32/stm32f103-minimum/configs/buttons/defconfig +++ b/boards/arm/stm32/stm32f103-minimum/configs/buttons/defconfig @@ -26,7 +26,6 @@ CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F103C8=y CONFIG_ARCH_IRQBUTTONS=y CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=5483 CONFIG_BUILTIN=y CONFIG_DEFAULT_SMALL=y @@ -37,7 +36,6 @@ CONFIG_INPUT=y CONFIG_INPUT_BUTTONS=y CONFIG_INPUT_BUTTONS_LOWER=y CONFIG_LINE_MAX=80 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=1024 CONFIG_RAM_SIZE=20480 diff --git a/boards/arm/stm32/stm32f103-minimum/configs/jlx12864g/defconfig b/boards/arm/stm32/stm32f103-minimum/configs/jlx12864g/defconfig index b9d77cf8e059e..5eea66e1f1b5d 100644 --- a/boards/arm/stm32/stm32f103-minimum/configs/jlx12864g/defconfig +++ b/boards/arm/stm32/stm32f103-minimum/configs/jlx12864g/defconfig @@ -36,7 +36,6 @@ CONFIG_LCD=y CONFIG_LCD_ST7567=y CONFIG_LINE_MAX=80 CONFIG_MQ_MAXMSGSIZE=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=1024 CONFIG_NX=y diff --git a/boards/arm/stm32/stm32f103-minimum/configs/lcd1602/defconfig b/boards/arm/stm32/stm32f103-minimum/configs/lcd1602/defconfig index 90b1ea1d2af90..b91f9cca66b55 100644 --- a/boards/arm/stm32/stm32f103-minimum/configs/lcd1602/defconfig +++ b/boards/arm/stm32/stm32f103-minimum/configs/lcd1602/defconfig @@ -37,7 +37,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LCD_BACKPACK=y CONFIG_LCD_LCD1602=y CONFIG_LINE_MAX=80 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=1024 CONFIG_RAM_SIZE=20480 diff --git a/boards/arm/stm32/stm32f103-minimum/configs/mcp2515/defconfig b/boards/arm/stm32/stm32f103-minimum/configs/mcp2515/defconfig index 079628a1e891f..9f2e614adb3ac 100644 --- a/boards/arm/stm32/stm32f103-minimum/configs/mcp2515/defconfig +++ b/boards/arm/stm32/stm32f103-minimum/configs/mcp2515/defconfig @@ -37,7 +37,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=80 CONFIG_MCP2515_PHASESEG1=3 CONFIG_MCP2515_PROPSEG=1 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=1024 CONFIG_RAM_SIZE=20480 diff --git a/boards/arm/stm32/stm32f103-minimum/configs/nrf24/defconfig b/boards/arm/stm32/stm32f103-minimum/configs/nrf24/defconfig index 2368504f41bb3..ac06a6bc606b6 100644 --- a/boards/arm/stm32/stm32f103-minimum/configs/nrf24/defconfig +++ b/boards/arm/stm32/stm32f103-minimum/configs/nrf24/defconfig @@ -32,7 +32,6 @@ CONFIG_EXAMPLES_NRF24L01TERM=y CONFIG_FILE_STREAM=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=80 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=1024 CONFIG_RAM_SIZE=20480 diff --git a/boards/arm/stm32/stm32f103-minimum/configs/nsh/defconfig b/boards/arm/stm32/stm32f103-minimum/configs/nsh/defconfig index 39b8410b7a1b1..3c704737ee264 100644 --- a/boards/arm/stm32/stm32f103-minimum/configs/nsh/defconfig +++ b/boards/arm/stm32/stm32f103-minimum/configs/nsh/defconfig @@ -42,7 +42,6 @@ CONFIG_BUILTIN=y CONFIG_DEFAULT_SMALL=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=80 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=1024 CONFIG_RAM_SIZE=20480 diff --git a/boards/arm/stm32/stm32f103-minimum/configs/pwm/defconfig b/boards/arm/stm32/stm32f103-minimum/configs/pwm/defconfig index 3ef36f7ec87b6..8d0dda31037f1 100644 --- a/boards/arm/stm32/stm32f103-minimum/configs/pwm/defconfig +++ b/boards/arm/stm32/stm32f103-minimum/configs/pwm/defconfig @@ -30,7 +30,6 @@ CONFIG_EXAMPLES_PWM=y CONFIG_FILE_STREAM=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=80 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=1024 CONFIG_PWM=y diff --git a/boards/arm/stm32/stm32f103-minimum/configs/rfid-rc522/defconfig b/boards/arm/stm32/stm32f103-minimum/configs/rfid-rc522/defconfig index c6efb107ddb54..9b30668c97ea4 100644 --- a/boards/arm/stm32/stm32f103-minimum/configs/rfid-rc522/defconfig +++ b/boards/arm/stm32/stm32f103-minimum/configs/rfid-rc522/defconfig @@ -32,7 +32,6 @@ CONFIG_DRIVERS_CONTACTLESS=y CONFIG_EXAMPLES_RFID_READUID=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=80 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=1024 CONFIG_RAM_SIZE=20480 diff --git a/boards/arm/stm32/stm32f103-minimum/configs/rgbled/defconfig b/boards/arm/stm32/stm32f103-minimum/configs/rgbled/defconfig index d383359badfac..393c1bbdddec9 100644 --- a/boards/arm/stm32/stm32f103-minimum/configs/rgbled/defconfig +++ b/boards/arm/stm32/stm32f103-minimum/configs/rgbled/defconfig @@ -29,7 +29,6 @@ CONFIG_DEFAULT_SMALL=y CONFIG_EXAMPLES_RGBLED=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=80 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=1024 CONFIG_PWM=y diff --git a/boards/arm/stm32/stm32f103-minimum/configs/sensors/defconfig b/boards/arm/stm32/stm32f103-minimum/configs/sensors/defconfig index ed0d72641de6f..589d6e8d4ddff 100644 --- a/boards/arm/stm32/stm32f103-minimum/configs/sensors/defconfig +++ b/boards/arm/stm32/stm32f103-minimum/configs/sensors/defconfig @@ -21,7 +21,7 @@ CONFIG_ARCH_BOARD_STM32F103_MINIMUM=y CONFIG_ARCH_CHIP="stm32" CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F103C8=y -CONFIG_BOARDCTL_MKRD=y +CONFIG_BOARDCTL=y CONFIG_BOARDCTL_USBDEVCTRL=y CONFIG_BOARD_LOOPSPERMSEC=5483 CONFIG_BUILTIN=y @@ -39,7 +39,6 @@ CONFIG_LIBC_FLOATINGPOINT=y CONFIG_LIBM_TOOLCHAIN=y CONFIG_LINE_MAX=80 CONFIG_LTO_FULL=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=1024 CONFIG_RAM_SIZE=20480 diff --git a/boards/arm/stm32/stm32f103-minimum/configs/ssd1306/defconfig b/boards/arm/stm32/stm32f103-minimum/configs/ssd1306/defconfig index 0bb99603dbd77..8ab229454da28 100644 --- a/boards/arm/stm32/stm32f103-minimum/configs/ssd1306/defconfig +++ b/boards/arm/stm32/stm32f103-minimum/configs/ssd1306/defconfig @@ -49,7 +49,6 @@ CONFIG_LCD_FRAMEBUFFER=y CONFIG_LCD_SSD1306_I2C=y CONFIG_LCD_UG2864HSWEG01=y CONFIG_LINE_MAX=80 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=1024 CONFIG_RAM_SIZE=20480 diff --git a/boards/arm/stm32/stm32f103-minimum/configs/userled/defconfig b/boards/arm/stm32/stm32f103-minimum/configs/userled/defconfig index 1912332b6b787..931b29c9dede6 100644 --- a/boards/arm/stm32/stm32f103-minimum/configs/userled/defconfig +++ b/boards/arm/stm32/stm32f103-minimum/configs/userled/defconfig @@ -24,7 +24,6 @@ CONFIG_ARCH_CHIP="stm32" CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F103C8=y CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=5483 CONFIG_BUILTIN=y CONFIG_DEFAULT_SMALL=y @@ -33,7 +32,6 @@ CONFIG_EXAMPLES_LEDS=y CONFIG_FILE_STREAM=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=80 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=1024 CONFIG_RAM_SIZE=20480 diff --git a/boards/arm/stm32/stm32f103-minimum/configs/veml6070/defconfig b/boards/arm/stm32/stm32f103-minimum/configs/veml6070/defconfig index 8afe6a504d28f..3f439883df67f 100644 --- a/boards/arm/stm32/stm32f103-minimum/configs/veml6070/defconfig +++ b/boards/arm/stm32/stm32f103-minimum/configs/veml6070/defconfig @@ -24,13 +24,11 @@ CONFIG_ARCH_CHIP="stm32" CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F103C8=y CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=5483 CONFIG_BUILTIN=y CONFIG_DEFAULT_SMALL=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=80 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=1024 CONFIG_RAM_SIZE=20480 diff --git a/boards/arm/stm32/stm32f103-minimum/src/CMakeLists.txt b/boards/arm/stm32/stm32f103-minimum/src/CMakeLists.txt index 9ebb7d39cffdf..06607962aed7e 100644 --- a/boards/arm/stm32/stm32f103-minimum/src/CMakeLists.txt +++ b/boards/arm/stm32/stm32f103-minimum/src/CMakeLists.txt @@ -22,11 +22,8 @@ set(SRCS stm32_boot.c stm32_bringup.c stm32_spi.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) - if(CONFIG_BOARDCTL_RESET) - list(APPEND SRCS stm32_reset.c) - endif() +if(CONFIG_BOARDCTL_RESET) + list(APPEND SRCS stm32_reset.c) endif() if(CONFIG_ARCH_BUTTONS) diff --git a/boards/arm/stm32/stm32f103-minimum/src/Make.defs b/boards/arm/stm32/stm32f103-minimum/src/Make.defs index 93bdf6190e89a..a0fc84fc4eefb 100644 --- a/boards/arm/stm32/stm32f103-minimum/src/Make.defs +++ b/boards/arm/stm32/stm32f103-minimum/src/Make.defs @@ -24,12 +24,9 @@ include $(TOPDIR)/Make.defs CSRCS = stm32_boot.c stm32_bringup.c stm32_spi.c -ifeq ($(CONFIG_BOARDCTL),y) - CSRCS += stm32_appinit.c ifeq ($(CONFIG_BOARDCTL_RESET),y) CSRCS += stm32_reset.c endif -endif ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += stm32_buttons.c diff --git a/boards/arm/stm32/stm32f103-minimum/src/stm32_appinit.c b/boards/arm/stm32/stm32f103-minimum/src/stm32_appinit.c deleted file mode 100644 index 1fb0ee62a0556..0000000000000 --- a/boards/arm/stm32/stm32f103-minimum/src/stm32_appinit.c +++ /dev/null @@ -1,74 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32/stm32f103-minimum/src/stm32_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 - -#include -#include -#include -#include - -#include -#include - -#include "stm32.h" -#include "stm32f103_minimum.h" - -/**************************************************************************** - * 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 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) -{ - /* Perform board initialization here */ - - return stm32_bringup(); -} diff --git a/boards/arm/stm32/stm32f103-minimum/src/stm32_boot.c b/boards/arm/stm32/stm32f103-minimum/src/stm32_boot.c index 9ebb5686cee91..0f4f0c9e0a520 100644 --- a/boards/arm/stm32/stm32f103-minimum/src/stm32_boot.c +++ b/boards/arm/stm32/stm32f103-minimum/src/stm32_boot.c @@ -96,12 +96,6 @@ void stm32_boardinitialize(void) #ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { -#ifndef CONFIG_BOARDCTL - /* Perform board initialization here instead of from the - * board_app_initialize(). - */ - stm32_bringup(); -#endif } #endif diff --git a/boards/arm/stm32/stm32f103-minimum/src/stm32_usbmsc.c b/boards/arm/stm32/stm32f103-minimum/src/stm32_usbmsc.c index f3c07b23cc837..3ab090b7c655c 100644 --- a/boards/arm/stm32/stm32f103-minimum/src/stm32_usbmsc.c +++ b/boards/arm/stm32/stm32f103-minimum/src/stm32_usbmsc.c @@ -59,8 +59,7 @@ int board_usbmsc_initialize(int port) { /* If system/usbmsc is built as an NSH command, then SD slot should - * already have been initialized in board_app_initialize() - * (see stm32_appinit.c). + * already have been initialized. * In this case, there is nothing further to be done here. */ diff --git a/boards/arm/stm32/stm32f103-minimum/src/stm32f103_minimum.h b/boards/arm/stm32/stm32f103-minimum/src/stm32f103_minimum.h index eda8b3debf675..a3cac399ded8f 100644 --- a/boards/arm/stm32/stm32f103-minimum/src/stm32f103_minimum.h +++ b/boards/arm/stm32/stm32f103-minimum/src/stm32f103_minimum.h @@ -213,12 +213,7 @@ * Description: * Perform architecture specific initialization * - * CONFIG_BOARDCTL=y: - * If CONFIG_NSH_ARCHINITIALIZE=y: - * Called from the NSH library (or other application) - * Otherwise, assumed to be called from some other application. - * - * Otherwise CONFIG_BOARD_LATE_INITIALIZE=y: + * CONFIG_BOARD_LATE_INITIALIZE=y: * Called from board_late_initialize(). * * Otherwise, bad news: Never called diff --git a/boards/arm/stm32/stm32f334-disco/configs/buckboost/defconfig b/boards/arm/stm32/stm32f334-disco/configs/buckboost/defconfig index 3882de2a96324..8c31ee1302b90 100644 --- a/boards/arm/stm32/stm32f334-disco/configs/buckboost/defconfig +++ b/boards/arm/stm32/stm32f334-disco/configs/buckboost/defconfig @@ -18,6 +18,7 @@ CONFIG_ARCH_CHIP_STM32F334C8=y CONFIG_ARCH_HIPRI_INTERRUPT=y CONFIG_ARCH_RAMVECTORS=y CONFIG_ARCH_STACKDUMP=y +CONFIG_BOARDCTL=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y CONFIG_DEBUG_FULLOPT=y @@ -43,7 +44,6 @@ CONFIG_LIBDSP=y CONFIG_LIBM=y CONFIG_LINE_MAX=64 CONFIG_NAME_MAX=16 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_BASENAME=y CONFIG_NSH_DISABLE_CAT=y diff --git a/boards/arm/stm32/stm32f334-disco/configs/powerled/defconfig b/boards/arm/stm32/stm32f334-disco/configs/powerled/defconfig index 53f4f96f47d05..10a5ed5968f49 100644 --- a/boards/arm/stm32/stm32f334-disco/configs/powerled/defconfig +++ b/boards/arm/stm32/stm32f334-disco/configs/powerled/defconfig @@ -32,6 +32,7 @@ CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F334C8=y CONFIG_ARCH_STACKDUMP=y CONFIG_ARM_TOOLCHAIN_BUILDROOT=y +CONFIG_BOARDCTL=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y CONFIG_COMP=y @@ -51,7 +52,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_FLOATINGPOINT=y CONFIG_LIBM=y CONFIG_NAME_MAX=16 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_ARGCAT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=256 diff --git a/boards/arm/stm32/stm32f334-disco/src/CMakeLists.txt b/boards/arm/stm32/stm32f334-disco/src/CMakeLists.txt index cae93a234b156..b3e02b012c827 100644 --- a/boards/arm/stm32/stm32f334-disco/src/CMakeLists.txt +++ b/boards/arm/stm32/stm32f334-disco/src/CMakeLists.txt @@ -26,10 +26,6 @@ if(CONFIG_ARCH_LEDS) list(APPEND SRCS stm32_autoleds.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - if(CONFIG_STM32_CAN_CHARDRIVER) list(APPEND SRCS stm32_can.c) endif() diff --git a/boards/arm/stm32/stm32f334-disco/src/Make.defs b/boards/arm/stm32/stm32f334-disco/src/Make.defs index 5f94592797ad2..df8d1b44b3755 100644 --- a/boards/arm/stm32/stm32f334-disco/src/Make.defs +++ b/boards/arm/stm32/stm32f334-disco/src/Make.defs @@ -28,10 +28,6 @@ ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += stm32_autoleds.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - ifeq ($(CONFIG_STM32_CAN_CHARDRIVER),y) CSRCS += stm32_can.c endif diff --git a/boards/arm/stm32/stm32f334-disco/src/stm32_appinit.c b/boards/arm/stm32/stm32f334-disco/src/stm32_appinit.c deleted file mode 100644 index e83d296873bd9..0000000000000 --- a/boards/arm/stm32/stm32f334-disco/src/stm32_appinit.c +++ /dev/null @@ -1,171 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32/stm32f334-disco/src/stm32_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 - -#include -#include - -#include -#include - -#include "stm32f334-disco.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -#undef HAVE_LEDS -#undef HAVE_DAC - -#if !defined(CONFIG_ARCH_LEDS) && defined(CONFIG_USERLED_LOWER) -# define HAVE_LEDS 1 -#endif - -#if defined(CONFIG_DAC) -# define HAVE_DAC1 1 -# define HAVE_DAC2 1 -#endif - -/**************************************************************************** - * 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 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) -{ - int ret; - -#if !defined(CONFIG_DRIVERS_POWERLED) && !defined(CONFIG_DRIVERS_SMPS) -#ifdef HAVE_LEDS - /* Register the LED driver */ - - ret = userled_lower_initialize(LED_DRIVER_PATH); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: userled_lower_initialize() failed: %d\n", ret); - return ret; - } -#endif - -#ifdef CONFIG_ADC - /* Initialize ADC and register the ADC driver. */ - - ret = stm32_adc_setup(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: stm32_adc_setup failed: %d\n", ret); - } -#endif - -#ifdef CONFIG_DAC - /* Initialize DAC and register the DAC driver. */ - - ret = stm32_dac_setup(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: stm32_dac_setup failed: %d\n", ret); - } -#endif - -#ifdef CONFIG_COMP - /* Initialize COMP and register the COMP driver. */ - - ret = stm32_comp_setup(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: stm32_comp_setup failed: %d\n", ret); - } -#endif - -#ifdef CONFIG_OPAMP - /* Initialize OPAMP and register the OPAMP driver. */ - - ret = stm32_opamp_setup(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: stm32_opamp_setup failed: %d\n", ret); - } -#endif - -#ifdef CONFIG_STM32_HRTIM - /* Initialize HRTIM and register the HRTIM driver. */ - - ret = stm32_hrtim_setup(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: stm32_hrtim_setup failed: %d\n", ret); - } -#endif -#endif - -#ifdef CONFIG_DRIVERS_POWERLED - /* Initialize powerled and register the powerled driver */ - - ret = stm32_powerled_setup(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: stm32_powerled_setup failed: %d\n", ret); - } -#endif - -#ifdef CONFIG_DRIVERS_SMPS - /* Initialize smps and register the smps driver */ - - ret = stm32_smps_setup(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: stm32_smps_setup failed: %d\n", ret); - } -#endif - - UNUSED(ret); - return OK; -} diff --git a/boards/arm/stm32/stm32f334-disco/src/stm32_boot.c b/boards/arm/stm32/stm32f334-disco/src/stm32_boot.c index 3a7dd440843f7..5aacb0f9f1109 100644 --- a/boards/arm/stm32/stm32f334-disco/src/stm32_boot.c +++ b/boards/arm/stm32/stm32f334-disco/src/stm32_boot.c @@ -26,7 +26,11 @@ #include +#include +#include + #include +#include #include #include "stm32f334-disco.h" @@ -35,6 +39,18 @@ * Pre-processor Definitions ****************************************************************************/ +#undef HAVE_LEDS +#undef HAVE_DAC + +#if !defined(CONFIG_ARCH_LEDS) && defined(CONFIG_USERLED_LOWER) +# define HAVE_LEDS 1 +#endif + +#if defined(CONFIG_DAC) +# define HAVE_DAC1 1 +# define HAVE_DAC2 1 +#endif + /**************************************************************************** * Private Function Prototypes ****************************************************************************/ @@ -70,3 +86,109 @@ void stm32_boardinitialize(void) board_autoled_initialize(); #endif } + +/**************************************************************************** + * 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ + int ret; + +#if !defined(CONFIG_DRIVERS_POWERLED) && !defined(CONFIG_DRIVERS_SMPS) +#ifdef HAVE_LEDS + /* Register the LED driver */ + + ret = userled_lower_initialize(LED_DRIVER_PATH); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: userled_lower_initialize() failed: %d\n", ret); + return; + } +#endif + +#ifdef CONFIG_ADC + /* Initialize ADC and register the ADC driver. */ + + ret = stm32_adc_setup(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: stm32_adc_setup failed: %d\n", ret); + } +#endif + +#ifdef CONFIG_DAC + /* Initialize DAC and register the DAC driver. */ + + ret = stm32_dac_setup(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: stm32_dac_setup failed: %d\n", ret); + } +#endif + +#ifdef CONFIG_COMP + /* Initialize COMP and register the COMP driver. */ + + ret = stm32_comp_setup(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: stm32_comp_setup failed: %d\n", ret); + } +#endif + +#ifdef CONFIG_OPAMP + /* Initialize OPAMP and register the OPAMP driver. */ + + ret = stm32_opamp_setup(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: stm32_opamp_setup failed: %d\n", ret); + } +#endif + +#ifdef CONFIG_STM32_HRTIM + /* Initialize HRTIM and register the HRTIM driver. */ + + ret = stm32_hrtim_setup(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: stm32_hrtim_setup failed: %d\n", ret); + } +#endif +#endif + +#ifdef CONFIG_DRIVERS_POWERLED + /* Initialize powerled and register the powerled driver */ + + ret = stm32_powerled_setup(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: stm32_powerled_setup failed: %d\n", ret); + } +#endif + +#ifdef CONFIG_DRIVERS_SMPS + /* Initialize smps and register the smps driver */ + + ret = stm32_smps_setup(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: stm32_smps_setup failed: %d\n", ret); + } +#endif + + UNUSED(ret); +} +#endif diff --git a/boards/arm/stm32/stm32f334-disco/src/stm32_powerled.c b/boards/arm/stm32/stm32f334-disco/src/stm32_powerled.c index 8ecb93ffb22b5..0f7890bd25fd6 100644 --- a/boards/arm/stm32/stm32f334-disco/src/stm32_powerled.c +++ b/boards/arm/stm32/stm32f334-disco/src/stm32_powerled.c @@ -555,8 +555,6 @@ static int powerled_ioctl(struct powerled_dev_s *dev, int cmd, * Description: * Initialize POWERLED driver. * - * This function should be call by board_app_initialize(). - * * Returned Value: * 0 on success, a negated errno value on failure * diff --git a/boards/arm/stm32/stm32f334-disco/src/stm32_smps.c b/boards/arm/stm32/stm32f334-disco/src/stm32_smps.c index 9273b5dac08a8..9dc01746e992c 100644 --- a/boards/arm/stm32/stm32f334-disco/src/stm32_smps.c +++ b/boards/arm/stm32/stm32f334-disco/src/stm32_smps.c @@ -1045,8 +1045,6 @@ static void adc12_handler(void) * Description: * Initialize SMPS driver. * - * This function should be call by board_app_initialize(). - * * Returned Value: * 0 on success, a negated errno value on failure * diff --git a/boards/arm/stm32/stm32f3discovery/configs/usbnsh/defconfig b/boards/arm/stm32/stm32f3discovery/configs/usbnsh/defconfig index 11d725b255ad1..5d388639fb48f 100644 --- a/boards/arm/stm32/stm32f3discovery/configs/usbnsh/defconfig +++ b/boards/arm/stm32/stm32f3discovery/configs/usbnsh/defconfig @@ -32,7 +32,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/stm32f3discovery/src/CMakeLists.txt b/boards/arm/stm32/stm32f3discovery/src/CMakeLists.txt index dcf6bb01291d6..a5f1196b8266a 100644 --- a/boards/arm/stm32/stm32f3discovery/src/CMakeLists.txt +++ b/boards/arm/stm32/stm32f3discovery/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS stm32_boot.c stm32_bringup.c stm32_spi.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - if(CONFIG_ARCH_LEDS) list(APPEND SRCS stm32_autoleds.c) else() diff --git a/boards/arm/stm32/stm32f3discovery/src/Make.defs b/boards/arm/stm32/stm32f3discovery/src/Make.defs index e411c58633760..5ab0f6b49b4dd 100644 --- a/boards/arm/stm32/stm32f3discovery/src/Make.defs +++ b/boards/arm/stm32/stm32f3discovery/src/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = stm32_boot.c stm32_bringup.c stm32_spi.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += stm32_autoleds.c else diff --git a/boards/arm/stm32/stm32f3discovery/src/stm32_appinit.c b/boards/arm/stm32/stm32f3discovery/src/stm32_appinit.c deleted file mode 100644 index ee1e6af5ed48a..0000000000000 --- a/boards/arm/stm32/stm32f3discovery/src/stm32_appinit.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32/stm32f3discovery/src/stm32_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 - -#include -#include - -#include "stm32f3discovery.h" - -/**************************************************************************** - * 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 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 stm32_bringup(); -#endif -} diff --git a/boards/arm/stm32/stm32f401rc-rs485/configs/adc/defconfig b/boards/arm/stm32/stm32f401rc-rs485/configs/adc/defconfig index 8987cfd54f40e..2c10476201ee6 100644 --- a/boards/arm/stm32/stm32f401rc-rs485/configs/adc/defconfig +++ b/boards/arm/stm32/stm32f401rc-rs485/configs/adc/defconfig @@ -43,7 +43,6 @@ CONFIG_INPUT_BUTTONS=y CONFIG_INPUT_BUTTONS_LOWER=y CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/stm32f401rc-rs485/configs/bmp280/defconfig b/boards/arm/stm32/stm32f401rc-rs485/configs/bmp280/defconfig index f52ce82d8ea39..ee0e197c2655d 100644 --- a/boards/arm/stm32/stm32f401rc-rs485/configs/bmp280/defconfig +++ b/boards/arm/stm32/stm32f401rc-rs485/configs/bmp280/defconfig @@ -43,7 +43,6 @@ CONFIG_INPUT_BUTTONS_LOWER=y CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_FLOATINGPOINT=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/stm32f401rc-rs485/configs/dac/defconfig b/boards/arm/stm32/stm32f401rc-rs485/configs/dac/defconfig index 1ff3f0f0b95f9..4487a2834aaa9 100644 --- a/boards/arm/stm32/stm32f401rc-rs485/configs/dac/defconfig +++ b/boards/arm/stm32/stm32f401rc-rs485/configs/dac/defconfig @@ -40,7 +40,6 @@ CONFIG_INPUT_BUTTONS=y CONFIG_INPUT_BUTTONS_LOWER=y CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/stm32f401rc-rs485/configs/hcsr04/defconfig b/boards/arm/stm32/stm32f401rc-rs485/configs/hcsr04/defconfig index 92b616123e803..87491419a250a 100644 --- a/boards/arm/stm32/stm32f401rc-rs485/configs/hcsr04/defconfig +++ b/boards/arm/stm32/stm32f401rc-rs485/configs/hcsr04/defconfig @@ -40,7 +40,6 @@ CONFIG_INPUT_BUTTONS=y CONFIG_INPUT_BUTTONS_LOWER=y CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/stm32f401rc-rs485/configs/lcd1602/defconfig b/boards/arm/stm32/stm32f401rc-rs485/configs/lcd1602/defconfig index 7f2241012782c..68f78a2565b3a 100644 --- a/boards/arm/stm32/stm32f401rc-rs485/configs/lcd1602/defconfig +++ b/boards/arm/stm32/stm32f401rc-rs485/configs/lcd1602/defconfig @@ -43,7 +43,6 @@ CONFIG_INPUT_BUTTONS_LOWER=y CONFIG_INTELHEX_BINARY=y CONFIG_LCD_BACKPACK=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/stm32f401rc-rs485/configs/lm75/defconfig b/boards/arm/stm32/stm32f401rc-rs485/configs/lm75/defconfig index 3d730535aa80b..b431f061e801c 100644 --- a/boards/arm/stm32/stm32f401rc-rs485/configs/lm75/defconfig +++ b/boards/arm/stm32/stm32f401rc-rs485/configs/lm75/defconfig @@ -43,7 +43,6 @@ CONFIG_INPUT_BUTTONS_LOWER=y CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_FLOATINGPOINT=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/stm32f401rc-rs485/configs/max7219/defconfig b/boards/arm/stm32/stm32f401rc-rs485/configs/max7219/defconfig index 8fe9f9468fd1b..100a1658edffc 100644 --- a/boards/arm/stm32/stm32f401rc-rs485/configs/max7219/defconfig +++ b/boards/arm/stm32/stm32f401rc-rs485/configs/max7219/defconfig @@ -48,7 +48,6 @@ CONFIG_LCD_MAX7219=y CONFIG_LCD_NOGETRUN=y CONFIG_LINE_MAX=64 CONFIG_MQ_MAXMSGSIZE=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/stm32f401rc-rs485/configs/mfrc522/defconfig b/boards/arm/stm32/stm32f401rc-rs485/configs/mfrc522/defconfig index bdb9c9efaa363..d24b43acad199 100644 --- a/boards/arm/stm32/stm32f401rc-rs485/configs/mfrc522/defconfig +++ b/boards/arm/stm32/stm32f401rc-rs485/configs/mfrc522/defconfig @@ -43,7 +43,6 @@ CONFIG_INPUT_BUTTONS=y CONFIG_INPUT_BUTTONS_LOWER=y CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/stm32f401rc-rs485/configs/modbus_master/defconfig b/boards/arm/stm32/stm32f401rc-rs485/configs/modbus_master/defconfig index ff27e2521997b..2e5ad3de7e2fd 100644 --- a/boards/arm/stm32/stm32f401rc-rs485/configs/modbus_master/defconfig +++ b/boards/arm/stm32/stm32f401rc-rs485/configs/modbus_master/defconfig @@ -50,7 +50,6 @@ CONFIG_INPUT_BUTTONS_LOWER=y CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MB_RTU_MASTER=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/stm32f401rc-rs485/configs/modbus_slave/defconfig b/boards/arm/stm32/stm32f401rc-rs485/configs/modbus_slave/defconfig index 017ec108be831..199a6fe8f2321 100644 --- a/boards/arm/stm32/stm32f401rc-rs485/configs/modbus_slave/defconfig +++ b/boards/arm/stm32/stm32f401rc-rs485/configs/modbus_slave/defconfig @@ -43,7 +43,6 @@ CONFIG_INPUT_BUTTONS=y CONFIG_INPUT_BUTTONS_LOWER=y CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/stm32f401rc-rs485/configs/nsh/defconfig b/boards/arm/stm32/stm32f401rc-rs485/configs/nsh/defconfig index 19f3ac2102058..4effd9f205643 100644 --- a/boards/arm/stm32/stm32f401rc-rs485/configs/nsh/defconfig +++ b/boards/arm/stm32/stm32f401rc-rs485/configs/nsh/defconfig @@ -36,7 +36,6 @@ CONFIG_INPUT_BUTTONS=y CONFIG_INPUT_BUTTONS_LOWER=y CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/stm32f401rc-rs485/configs/qencoder/defconfig b/boards/arm/stm32/stm32f401rc-rs485/configs/qencoder/defconfig index 4d201bfb1e71d..041d1063cf925 100644 --- a/boards/arm/stm32/stm32f401rc-rs485/configs/qencoder/defconfig +++ b/boards/arm/stm32/stm32f401rc-rs485/configs/qencoder/defconfig @@ -41,7 +41,6 @@ CONFIG_INPUT_BUTTONS=y CONFIG_INPUT_BUTTONS_LOWER=y CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/stm32f401rc-rs485/configs/rndis/defconfig b/boards/arm/stm32/stm32f401rc-rs485/configs/rndis/defconfig index df8c1d3af2c5b..e6a0c65cdab01 100644 --- a/boards/arm/stm32/stm32f401rc-rs485/configs/rndis/defconfig +++ b/boards/arm/stm32/stm32f401rc-rs485/configs/rndis/defconfig @@ -59,7 +59,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32/stm32f401rc-rs485/configs/sdcard/defconfig b/boards/arm/stm32/stm32f401rc-rs485/configs/sdcard/defconfig index d55930f268eba..bdd8cbb1b33f4 100644 --- a/boards/arm/stm32/stm32f401rc-rs485/configs/sdcard/defconfig +++ b/boards/arm/stm32/stm32f401rc-rs485/configs/sdcard/defconfig @@ -43,7 +43,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MMCSD=y CONFIG_MMCSD_SDIO=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32/stm32f401rc-rs485/configs/ssd1309/defconfig b/boards/arm/stm32/stm32f401rc-rs485/configs/ssd1309/defconfig index 96d00c33ef175..0ebbf98d62c77 100644 --- a/boards/arm/stm32/stm32f401rc-rs485/configs/ssd1309/defconfig +++ b/boards/arm/stm32/stm32f401rc-rs485/configs/ssd1309/defconfig @@ -20,7 +20,6 @@ CONFIG_ARCH_INTERRUPTSTACK=2048 CONFIG_ARCH_IRQBUTTONS=y CONFIG_ARCH_STACKDUMP=y CONFIG_BOARDCTL_USBDEVCTRL=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=8499 CONFIG_BUILTIN=y CONFIG_CDCACM=y @@ -46,7 +45,6 @@ CONFIG_LCD_DD12864WO4A=y CONFIG_LCD_FRAMEBUFFER=y CONFIG_LCD_NOGETRUN=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32/stm32f401rc-rs485/configs/telnetd/defconfig b/boards/arm/stm32/stm32f401rc-rs485/configs/telnetd/defconfig index 1faa2b79762c9..38212b7cf512e 100644 --- a/boards/arm/stm32/stm32f401rc-rs485/configs/telnetd/defconfig +++ b/boards/arm/stm32/stm32f401rc-rs485/configs/telnetd/defconfig @@ -64,7 +64,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32/stm32f401rc-rs485/configs/usbmsc/defconfig b/boards/arm/stm32/stm32f401rc-rs485/configs/usbmsc/defconfig index 48dc0db262d6b..8810cd175f3d1 100644 --- a/boards/arm/stm32/stm32f401rc-rs485/configs/usbmsc/defconfig +++ b/boards/arm/stm32/stm32f401rc-rs485/configs/usbmsc/defconfig @@ -43,7 +43,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MMCSD=y CONFIG_MMCSD_SDIO=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32/stm32f401rc-rs485/configs/usbnsh/defconfig b/boards/arm/stm32/stm32f401rc-rs485/configs/usbnsh/defconfig index 576c5a3417530..8394c946d47cd 100644 --- a/boards/arm/stm32/stm32f401rc-rs485/configs/usbnsh/defconfig +++ b/boards/arm/stm32/stm32f401rc-rs485/configs/usbnsh/defconfig @@ -39,7 +39,6 @@ CONFIG_INPUT_BUTTONS=y CONFIG_INPUT_BUTTONS_LOWER=y CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/stm32f401rc-rs485/configs/ws2812/defconfig b/boards/arm/stm32/stm32f401rc-rs485/configs/ws2812/defconfig index e022ccea32994..7f4abba8eac5a 100644 --- a/boards/arm/stm32/stm32f401rc-rs485/configs/ws2812/defconfig +++ b/boards/arm/stm32/stm32f401rc-rs485/configs/ws2812/defconfig @@ -42,7 +42,6 @@ CONFIG_INPUT_BUTTONS=y CONFIG_INPUT_BUTTONS_LOWER=y CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/stm32f401rc-rs485/src/CMakeLists.txt b/boards/arm/stm32/stm32f401rc-rs485/src/CMakeLists.txt index 3bf72325e433a..bf67263f69295 100644 --- a/boards/arm/stm32/stm32f401rc-rs485/src/CMakeLists.txt +++ b/boards/arm/stm32/stm32f401rc-rs485/src/CMakeLists.txt @@ -30,11 +30,8 @@ if(CONFIG_USERLED) list(APPEND SRCS stm32_userleds.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) - if(CONFIG_BOARDCTL_RESET) - list(APPEND SRCS stm32_reset.c) - endif() +if(CONFIG_BOARDCTL_RESET) + list(APPEND SRCS stm32_reset.c) endif() if(CONFIG_ARCH_BUTTONS) diff --git a/boards/arm/stm32/stm32f401rc-rs485/src/Make.defs b/boards/arm/stm32/stm32f401rc-rs485/src/Make.defs index 95425aaa47488..122740343adba 100644 --- a/boards/arm/stm32/stm32f401rc-rs485/src/Make.defs +++ b/boards/arm/stm32/stm32f401rc-rs485/src/Make.defs @@ -41,12 +41,9 @@ ifeq ($(CONFIG_USERLED),y) CSRCS += stm32_userleds.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c ifeq ($(CONFIG_BOARDCTL_RESET),y) CSRCS += stm32_reset.c endif -endif ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += stm32_buttons.c @@ -54,7 +51,7 @@ endif ifeq ($(CONFIG_ADC),y) CSRCS += stm32_adc.c -endif +endif ifeq ($(CONFIG_STM32_SDIO),y) CSRCS += stm32_sdio.c diff --git a/boards/arm/stm32/stm32f401rc-rs485/src/stm32_appinit.c b/boards/arm/stm32/stm32f401rc-rs485/src/stm32_appinit.c deleted file mode 100644 index 1090f389bff5c..0000000000000 --- a/boards/arm/stm32/stm32f401rc-rs485/src/stm32_appinit.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32/stm32f401rc-rs485/src/stm32_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 - -#include -#include - -#include "stm32f401rc-rs485.h" - -#include - -/**************************************************************************** - * 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 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 - return OK; -#else - /* Perform board initialization here */ - - return stm32_bringup(); -#endif -} diff --git a/boards/arm/stm32/stm32f401rc-rs485/src/stm32_boot.c b/boards/arm/stm32/stm32f401rc-rs485/src/stm32_boot.c index 432164d76c244..e4a5038168bbe 100644 --- a/boards/arm/stm32/stm32f401rc-rs485/src/stm32_boot.c +++ b/boards/arm/stm32/stm32f401rc-rs485/src/stm32_boot.c @@ -88,10 +88,6 @@ void stm32_boardinitialize(void) #ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { - /* Perform board initialization here instead of from the - * board_app_initialize(). - */ - stm32_bringup(); } #endif diff --git a/boards/arm/stm32/stm32f401rc-rs485/src/stm32_usbmsc.c b/boards/arm/stm32/stm32f401rc-rs485/src/stm32_usbmsc.c index cebac2378d5a0..d5d633d8996be 100644 --- a/boards/arm/stm32/stm32f401rc-rs485/src/stm32_usbmsc.c +++ b/boards/arm/stm32/stm32f401rc-rs485/src/stm32_usbmsc.c @@ -59,8 +59,7 @@ int board_usbmsc_initialize(int port) { /* If system/usbmsc is built as an NSH command, then SD slot should - * already have been initialized in board_app_initialize() - * (see stm32_appinit.c). + * already have been initialized. * In this case, there is nothing further to be done here. */ diff --git a/boards/arm/stm32/stm32f401rc-rs485/src/stm32f401rc-rs485.h b/boards/arm/stm32/stm32f401rc-rs485/src/stm32f401rc-rs485.h index 46c2b900ec364..b8fbec7e25a6d 100644 --- a/boards/arm/stm32/stm32f401rc-rs485/src/stm32f401rc-rs485.h +++ b/boards/arm/stm32/stm32f401rc-rs485/src/stm32f401rc-rs485.h @@ -194,12 +194,7 @@ extern struct sdio_dev_s *g_sdio; * Description: * Perform architecture specific initialization * - * CONFIG_BOARDCTL=y: - * If CONFIG_NSH_ARCHINITIALIZE=y: - * Called from the NSH library (or other application) - * Otherwise, assumed to be called from some other application. - * - * Otherwise CONFIG_BOARD_LATE_INITIALIZE=y: + * CONFIG_BOARD_LATE_INITIALIZE=y: * Called from board_late_initialize(). * * Otherwise, bad news: Never called diff --git a/boards/arm/stm32/stm32f411-minimum/configs/composite/defconfig b/boards/arm/stm32/stm32f411-minimum/configs/composite/defconfig index 8017feacdb26c..3b481dfd674d8 100644 --- a/boards/arm/stm32/stm32f411-minimum/configs/composite/defconfig +++ b/boards/arm/stm32/stm32f411-minimum/configs/composite/defconfig @@ -31,7 +31,6 @@ CONFIG_HAVE_CXX=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_LOSMART=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32/stm32f411-minimum/configs/pwm/defconfig b/boards/arm/stm32/stm32f411-minimum/configs/pwm/defconfig index 2a0f7c543e4be..3f60dea548167 100644 --- a/boards/arm/stm32/stm32f411-minimum/configs/pwm/defconfig +++ b/boards/arm/stm32/stm32f411-minimum/configs/pwm/defconfig @@ -27,7 +27,6 @@ CONFIG_HAVE_CXX=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/stm32f411-minimum/configs/rgbled/defconfig b/boards/arm/stm32/stm32f411-minimum/configs/rgbled/defconfig index 47073ef277b80..3afa110be2c4a 100644 --- a/boards/arm/stm32/stm32f411-minimum/configs/rgbled/defconfig +++ b/boards/arm/stm32/stm32f411-minimum/configs/rgbled/defconfig @@ -27,7 +27,6 @@ CONFIG_HAVE_CXX=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/stm32f411-minimum/configs/spifsnsh/defconfig b/boards/arm/stm32/stm32f411-minimum/configs/spifsnsh/defconfig index 93b22c7493d80..bc6985a1d4ce1 100644 --- a/boards/arm/stm32/stm32f411-minimum/configs/spifsnsh/defconfig +++ b/boards/arm/stm32/stm32f411-minimum/configs/spifsnsh/defconfig @@ -26,7 +26,6 @@ CONFIG_HAVE_CXX=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_LOSMART=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32/stm32f411-minimum/configs/usbmsc/defconfig b/boards/arm/stm32/stm32f411-minimum/configs/usbmsc/defconfig index fc54d84924cc8..1d49a8275be78 100644 --- a/boards/arm/stm32/stm32f411-minimum/configs/usbmsc/defconfig +++ b/boards/arm/stm32/stm32f411-minimum/configs/usbmsc/defconfig @@ -26,7 +26,6 @@ CONFIG_HAVE_CXX=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_LOSMART=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32/stm32f411-minimum/src/CMakeLists.txt b/boards/arm/stm32/stm32f411-minimum/src/CMakeLists.txt index 09c582407c20c..67ae6a038bb8a 100644 --- a/boards/arm/stm32/stm32f411-minimum/src/CMakeLists.txt +++ b/boards/arm/stm32/stm32f411-minimum/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS stm32_boot.c stm32_bringup.c) -if(CONFIG_NSH_LIBRARY) - list(APPEND SRCS stm32_appinit.c) -endif() - if(CONFIG_ARCH_LEDS) list(APPEND SRCS stm32_autoleds.c) endif() diff --git a/boards/arm/stm32/stm32f411-minimum/src/Make.defs b/boards/arm/stm32/stm32f411-minimum/src/Make.defs index d8cde2b77e953..a221a572f16d4 100644 --- a/boards/arm/stm32/stm32f411-minimum/src/Make.defs +++ b/boards/arm/stm32/stm32f411-minimum/src/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = stm32_boot.c stm32_bringup.c -ifeq ($(CONFIG_NSH_LIBRARY),y) - CSRCS += stm32_appinit.c -endif - ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += stm32_autoleds.c endif diff --git a/boards/arm/stm32/stm32f411-minimum/src/stm32_appinit.c b/boards/arm/stm32/stm32f411-minimum/src/stm32_appinit.c deleted file mode 100644 index eb04e9a0c91b0..0000000000000 --- a/boards/arm/stm32/stm32f411-minimum/src/stm32_appinit.c +++ /dev/null @@ -1,81 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32/stm32f411-minimum/src/stm32_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 - -#include -#include -#include - -#include -#include - -#include -#include - -#include - -#include "stm32f411-minimum.h" - -/**************************************************************************** - * 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 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) -{ -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board-specific initialization */ - - return stm32_bringup(); -#else - return OK; -#endif -} diff --git a/boards/arm/stm32/stm32f411-minimum/src/stm32_usbmsc.c b/boards/arm/stm32/stm32f411-minimum/src/stm32_usbmsc.c index 2da1cf2f75f9e..19084231667d2 100644 --- a/boards/arm/stm32/stm32f411-minimum/src/stm32_usbmsc.c +++ b/boards/arm/stm32/stm32f411-minimum/src/stm32_usbmsc.c @@ -59,8 +59,7 @@ int board_usbmsc_initialize(int port) { /* If system/usbmsc is built as an NSH command, then SD slot should - * already have been initialized in board_app_initialize() - * (see stm32_appinit.c). + * already have been initialized. * In this case, there is nothing further to be done here. */ diff --git a/boards/arm/stm32/stm32f411e-disco/src/CMakeLists.txt b/boards/arm/stm32/stm32f411e-disco/src/CMakeLists.txt index d140063b28f4f..9f3433d0cc824 100644 --- a/boards/arm/stm32/stm32f411e-disco/src/CMakeLists.txt +++ b/boards/arm/stm32/stm32f411e-disco/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS stm32_boot.c stm32_bringup.c) -if(CONFIG_NSH_LIBRARY) - list(APPEND SRCS stm32_appinit.c) -endif() - if(CONFIG_STM32_OTGFS) list(APPEND SRCS stm32_usb.c) endif() diff --git a/boards/arm/stm32/stm32f411e-disco/src/Make.defs b/boards/arm/stm32/stm32f411e-disco/src/Make.defs index d848bee82f887..cff6ead802f11 100644 --- a/boards/arm/stm32/stm32f411e-disco/src/Make.defs +++ b/boards/arm/stm32/stm32f411e-disco/src/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = stm32_boot.c stm32_bringup.c -ifeq ($(CONFIG_NSH_LIBRARY),y) -CSRCS += stm32_appinit.c -endif - ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += stm32_buttons.c endif diff --git a/boards/arm/stm32/stm32f411e-disco/src/stm32_appinit.c b/boards/arm/stm32/stm32f411e-disco/src/stm32_appinit.c deleted file mode 100644 index c4ae8f7ad2f64..0000000000000 --- a/boards/arm/stm32/stm32f411e-disco/src/stm32_appinit.c +++ /dev/null @@ -1,81 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32/stm32f411e-disco/src/stm32_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 - -#include -#include -#include - -#include -#include - -#include -#include - -#include - -#include "stm32f411e-disco.h" - -/**************************************************************************** - * 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 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) -{ -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board-specific initialization */ - - return stm32_bringup(); -#else - return OK; -#endif -} diff --git a/boards/arm/stm32/stm32f429i-disco/configs/adc/defconfig b/boards/arm/stm32/stm32f429i-disco/configs/adc/defconfig index 1afeda1f6dfb9..2e4718deb92b3 100644 --- a/boards/arm/stm32/stm32f429i-disco/configs/adc/defconfig +++ b/boards/arm/stm32/stm32f429i-disco/configs/adc/defconfig @@ -32,7 +32,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/stm32f429i-disco/configs/bootlogo/defconfig b/boards/arm/stm32/stm32f429i-disco/configs/bootlogo/defconfig index 90e38117e7e96..d9f7431a0247f 100644 --- a/boards/arm/stm32/stm32f429i-disco/configs/bootlogo/defconfig +++ b/boards/arm/stm32/stm32f429i-disco/configs/bootlogo/defconfig @@ -37,7 +37,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=128 CONFIG_MM_REGIONS=2 CONFIG_MQ_MAXMSGSIZE=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_MAXARGUMENTS=17 diff --git a/boards/arm/stm32/stm32f429i-disco/configs/extflash/defconfig b/boards/arm/stm32/stm32f429i-disco/configs/extflash/defconfig index 02a0357e1e6ba..6126452086010 100644 --- a/boards/arm/stm32/stm32f429i-disco/configs/extflash/defconfig +++ b/boards/arm/stm32/stm32f429i-disco/configs/extflash/defconfig @@ -32,7 +32,6 @@ CONFIG_MTD_CONFIG_RAM_CONSOLIDATE=y CONFIG_MTD_PARTITION=y CONFIG_MTD_PARTITION_NAMES=y CONFIG_MTD_SMART_SECTOR_SIZE=512 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/stm32f429i-disco/configs/fb/defconfig b/boards/arm/stm32/stm32f429i-disco/configs/fb/defconfig index 83b9e2dcb8cd4..f4449b5807ff3 100644 --- a/boards/arm/stm32/stm32f429i-disco/configs/fb/defconfig +++ b/boards/arm/stm32/stm32f429i-disco/configs/fb/defconfig @@ -37,7 +37,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=128 CONFIG_MM_REGIONS=2 CONFIG_MQ_MAXMSGSIZE=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_MAXARGUMENTS=17 diff --git a/boards/arm/stm32/stm32f429i-disco/configs/lcd/defconfig b/boards/arm/stm32/stm32f429i-disco/configs/lcd/defconfig index a5ce3deb48717..55ff0bb5b9f95 100644 --- a/boards/arm/stm32/stm32f429i-disco/configs/lcd/defconfig +++ b/boards/arm/stm32/stm32f429i-disco/configs/lcd/defconfig @@ -17,7 +17,6 @@ CONFIG_ARCH_CHIP="stm32" CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F429Z=y CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y CONFIG_DEBUG_CUSTOMOPT=y diff --git a/boards/arm/stm32/stm32f429i-disco/configs/lvgl/defconfig b/boards/arm/stm32/stm32f429i-disco/configs/lvgl/defconfig index c6e2b84da59b0..d4b2f40ad717c 100644 --- a/boards/arm/stm32/stm32f429i-disco/configs/lvgl/defconfig +++ b/boards/arm/stm32/stm32f429i-disco/configs/lvgl/defconfig @@ -46,7 +46,6 @@ CONFIG_LV_USE_NUTTX=y CONFIG_LV_USE_NUTTX_TOUCHSCREEN=y CONFIG_MM_REGIONS=2 CONFIG_MQ_MAXMSGSIZE=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/stm32f429i-disco/configs/nxhello/defconfig b/boards/arm/stm32/stm32f429i-disco/configs/nxhello/defconfig index 6a5976bd78b24..fc3c836a06499 100644 --- a/boards/arm/stm32/stm32f429i-disco/configs/nxhello/defconfig +++ b/boards/arm/stm32/stm32f429i-disco/configs/nxhello/defconfig @@ -36,7 +36,6 @@ CONFIG_LIBC_MAX_EXITFUNS=1 CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 CONFIG_MQ_MAXMSGSIZE=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/stm32f429i-disco/configs/nxwm/defconfig b/boards/arm/stm32/stm32f429i-disco/configs/nxwm/defconfig index 7b0af9d1428ca..819fa8d7df831 100644 --- a/boards/arm/stm32/stm32f429i-disco/configs/nxwm/defconfig +++ b/boards/arm/stm32/stm32f429i-disco/configs/nxwm/defconfig @@ -42,7 +42,6 @@ CONFIG_LIBC_MAX_EXITFUNS=1 CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 CONFIG_MQ_MAXMSGSIZE=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_LIBRARY=y diff --git a/boards/arm/stm32/stm32f429i-disco/configs/ofloader/defconfig b/boards/arm/stm32/stm32f429i-disco/configs/ofloader/defconfig index db3c8e95d0f37..e0d8d16cb0f9e 100644 --- a/boards/arm/stm32/stm32f429i-disco/configs/ofloader/defconfig +++ b/boards/arm/stm32/stm32f429i-disco/configs/ofloader/defconfig @@ -17,7 +17,6 @@ CONFIG_ARCH_CHIP_STM32F429Z=y CONFIG_ARCH_STACKDUMP=y CONFIG_BCH=y CONFIG_BOARDCTL=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y CONFIG_DEBUG_FULLOPT=y diff --git a/boards/arm/stm32/stm32f429i-disco/configs/usbmsc/defconfig b/boards/arm/stm32/stm32f429i-disco/configs/usbmsc/defconfig index 993aef8785b77..03447b3fac8b1 100644 --- a/boards/arm/stm32/stm32f429i-disco/configs/usbmsc/defconfig +++ b/boards/arm/stm32/stm32f429i-disco/configs/usbmsc/defconfig @@ -28,7 +28,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/stm32f429i-disco/configs/usbnsh/defconfig b/boards/arm/stm32/stm32f429i-disco/configs/usbnsh/defconfig index c23ce3e6c70aa..7246fb6ffad44 100644 --- a/boards/arm/stm32/stm32f429i-disco/configs/usbnsh/defconfig +++ b/boards/arm/stm32/stm32f429i-disco/configs/usbnsh/defconfig @@ -35,7 +35,6 @@ CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/stm32f429i-disco/src/CMakeLists.txt b/boards/arm/stm32/stm32f429i-disco/src/CMakeLists.txt index 5bee3e74ff4c2..fa9314f019bff 100644 --- a/boards/arm/stm32/stm32f429i-disco/src/CMakeLists.txt +++ b/boards/arm/stm32/stm32f429i-disco/src/CMakeLists.txt @@ -32,10 +32,6 @@ if(CONFIG_ARCH_BUTTONS) list(APPEND SRCS stm32_buttons.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - if(CONFIG_ARCH_IDLE_CUSTOM) list(APPEND SRCS stm32_idle.c) endif() diff --git a/boards/arm/stm32/stm32f429i-disco/src/Make.defs b/boards/arm/stm32/stm32f429i-disco/src/Make.defs index bf6450fd8b337..5b7dd1fcbd2fd 100644 --- a/boards/arm/stm32/stm32f429i-disco/src/Make.defs +++ b/boards/arm/stm32/stm32f429i-disco/src/Make.defs @@ -34,10 +34,6 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += stm32_buttons.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - ifeq ($(CONFIG_ARCH_IDLE_CUSTOM),y) CSRCS += stm32_idle.c endif diff --git a/boards/arm/stm32/stm32f429i-disco/src/stm32_appinit.c b/boards/arm/stm32/stm32f429i-disco/src/stm32_appinit.c deleted file mode 100644 index 34da37bf689b7..0000000000000 --- a/boards/arm/stm32/stm32f429i-disco/src/stm32_appinit.c +++ /dev/null @@ -1,79 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32/stm32f429i-disco/src/stm32_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 - -#include - -#include - -#include "stm32f429i-disco.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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 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 stm32_bringup(); -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/arm/stm32/stm32f4discovery/configs/adb/defconfig b/boards/arm/stm32/stm32f4discovery/configs/adb/defconfig index ab52bcf71b087..70765999bf7d8 100644 --- a/boards/arm/stm32/stm32f4discovery/configs/adb/defconfig +++ b/boards/arm/stm32/stm32f4discovery/configs/adb/defconfig @@ -20,7 +20,6 @@ CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F407VG=y CONFIG_ARCH_STACKDUMP=y CONFIG_BOARDCTL_RESET=y -CONFIG_BOARDCTL_USBDEVCTRL=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y CONFIG_DEBUG_FULLOPT=y @@ -41,7 +40,6 @@ CONFIG_LIBC_EXECFUNCS=y CONFIG_LIBUV=y CONFIG_LINE_MAX=128 CONFIG_MMCSD=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/stm32f4discovery/configs/audio/defconfig b/boards/arm/stm32/stm32f4discovery/configs/audio/defconfig index ab8e772bce359..7a58739b22135 100644 --- a/boards/arm/stm32/stm32f4discovery/configs/audio/defconfig +++ b/boards/arm/stm32/stm32f4discovery/configs/audio/defconfig @@ -20,7 +20,6 @@ CONFIG_AUDIO=y CONFIG_AUDIO_CS43L22=y CONFIG_AUDIO_CUSTOM_DEV_PATH=y CONFIG_AUDIO_EXCLUDE_TONE=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y CONFIG_DRIVERS_AUDIO=y diff --git a/boards/arm/stm32/stm32f4discovery/configs/brickmatch/defconfig b/boards/arm/stm32/stm32f4discovery/configs/brickmatch/defconfig index 6152a6df8bde6..bb8d3b332702f 100644 --- a/boards/arm/stm32/stm32f4discovery/configs/brickmatch/defconfig +++ b/boards/arm/stm32/stm32f4discovery/configs/brickmatch/defconfig @@ -18,7 +18,6 @@ CONFIG_ARCH_CHIP="stm32" CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F407VG=y CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y CONFIG_DRIVERS_VIDEO=y diff --git a/boards/arm/stm32/stm32f4discovery/configs/composite/defconfig b/boards/arm/stm32/stm32f4discovery/configs/composite/defconfig index f373bd4fdebdd..8485892f11c54 100644 --- a/boards/arm/stm32/stm32f4discovery/configs/composite/defconfig +++ b/boards/arm/stm32/stm32f4discovery/configs/composite/defconfig @@ -61,7 +61,6 @@ CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NFS=y CONFIG_NFS_STATISTICS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_FILE_APPS=y diff --git a/boards/arm/stm32/stm32f4discovery/configs/cxx-oot-build/defconfig b/boards/arm/stm32/stm32f4discovery/configs/cxx-oot-build/defconfig index 4a06d4832fe06..6dd62ac3583a5 100644 --- a/boards/arm/stm32/stm32f4discovery/configs/cxx-oot-build/defconfig +++ b/boards/arm/stm32/stm32f4discovery/configs/cxx-oot-build/defconfig @@ -17,7 +17,6 @@ CONFIG_ARCH_CHIP="stm32" CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F407VG=y CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y CONFIG_CXX_EXCEPTION=y diff --git a/boards/arm/stm32/stm32f4discovery/configs/elf/defconfig b/boards/arm/stm32/stm32f4discovery/configs/elf/defconfig index 71c641aad46b8..d67f3e5aa69aa 100644 --- a/boards/arm/stm32/stm32f4discovery/configs/elf/defconfig +++ b/boards/arm/stm32/stm32f4discovery/configs/elf/defconfig @@ -16,7 +16,6 @@ CONFIG_ARCH_STACKDUMP=y CONFIG_BINFMT_CONSTRUCTORS=y CONFIG_BOARDCTL=y CONFIG_BOARDCTL_ROMDISK=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_CONSOLE_SYSLOG=y CONFIG_ELF=y diff --git a/boards/arm/stm32/stm32f4discovery/configs/ether_w5500/defconfig b/boards/arm/stm32/stm32f4discovery/configs/ether_w5500/defconfig index 44f68c3151418..41f42ad54d132 100644 --- a/boards/arm/stm32/stm32f4discovery/configs/ether_w5500/defconfig +++ b/boards/arm/stm32/stm32f4discovery/configs/ether_w5500/defconfig @@ -17,7 +17,6 @@ CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F407VG=y CONFIG_ARCH_STACKDUMP=y CONFIG_BCH=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y CONFIG_EXAMPLES_HELLO=y diff --git a/boards/arm/stm32/stm32f4discovery/configs/ipv6/defconfig b/boards/arm/stm32/stm32f4discovery/configs/ipv6/defconfig index 6422951eb329a..910ab3e1436d6 100644 --- a/boards/arm/stm32/stm32f4discovery/configs/ipv6/defconfig +++ b/boards/arm/stm32/stm32f4discovery/configs/ipv6/defconfig @@ -49,7 +49,6 @@ CONFIG_NET_SOLINGER=y CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/stm32f4discovery/configs/kostest/defconfig b/boards/arm/stm32/stm32f4discovery/configs/kostest/defconfig index a3c0680c14b80..cc106c43eb404 100644 --- a/boards/arm/stm32/stm32f4discovery/configs/kostest/defconfig +++ b/boards/arm/stm32/stm32f4discovery/configs/kostest/defconfig @@ -13,7 +13,6 @@ CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F407VG=y CONFIG_ARCH_STACKDUMP=y CONFIG_ARM_MPU=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILD_PROTECTED=y CONFIG_CONSOLE_SYSLOG=y diff --git a/boards/arm/stm32/stm32f4discovery/configs/lcd1602/defconfig b/boards/arm/stm32/stm32f4discovery/configs/lcd1602/defconfig index cbeb5f8564da4..da7f85f99a7b6 100644 --- a/boards/arm/stm32/stm32f4discovery/configs/lcd1602/defconfig +++ b/boards/arm/stm32/stm32f4discovery/configs/lcd1602/defconfig @@ -17,7 +17,6 @@ CONFIG_ARCH_CHIP="stm32" CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F407VG=y CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y CONFIG_EXAMPLES_HELLO=y diff --git a/boards/arm/stm32/stm32f4discovery/configs/lwl/defconfig b/boards/arm/stm32/stm32f4discovery/configs/lwl/defconfig index 265613b69a147..562e7ffef0e7f 100644 --- a/boards/arm/stm32/stm32f4discovery/configs/lwl/defconfig +++ b/boards/arm/stm32/stm32f4discovery/configs/lwl/defconfig @@ -17,7 +17,6 @@ CONFIG_ARCH_CHIP="stm32" CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F407VG=y CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y CONFIG_EXAMPLES_HELLO=y diff --git a/boards/arm/stm32/stm32f4discovery/configs/max31855/defconfig b/boards/arm/stm32/stm32f4discovery/configs/max31855/defconfig index 6005887b5dbd9..05486e4a8f735 100644 --- a/boards/arm/stm32/stm32f4discovery/configs/max31855/defconfig +++ b/boards/arm/stm32/stm32f4discovery/configs/max31855/defconfig @@ -17,7 +17,6 @@ CONFIG_ARCH_CHIP="stm32" CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F407VG=y CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y CONFIG_EXAMPLES_MAX31855=y diff --git a/boards/arm/stm32/stm32f4discovery/configs/max7219/defconfig b/boards/arm/stm32/stm32f4discovery/configs/max7219/defconfig index ebf310999a4d7..88741ebb797a7 100644 --- a/boards/arm/stm32/stm32f4discovery/configs/max7219/defconfig +++ b/boards/arm/stm32/stm32f4discovery/configs/max7219/defconfig @@ -65,7 +65,6 @@ CONFIG_LIBC_LONG_LONG=y CONFIG_MAX7219_NHORIZONTALBLKS=4 CONFIG_MM_REGIONS=2 CONFIG_MQ_MAXMSGSIZE=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NX=y CONFIG_NXFONT_MONO5X8=y diff --git a/boards/arm/stm32/stm32f4discovery/configs/mmcsdspi/defconfig b/boards/arm/stm32/stm32f4discovery/configs/mmcsdspi/defconfig index e7851465ed502..7c3b724bbedf9 100644 --- a/boards/arm/stm32/stm32f4discovery/configs/mmcsdspi/defconfig +++ b/boards/arm/stm32/stm32f4discovery/configs/mmcsdspi/defconfig @@ -40,7 +40,6 @@ CONFIG_LINE_MAX=64 CONFIG_MMCSD=y CONFIG_MM_REGIONS=2 CONFIG_NETUTILS_CODECS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/stm32f4discovery/configs/modbus_slave/defconfig b/boards/arm/stm32/stm32f4discovery/configs/modbus_slave/defconfig index 0eba5c05bcf09..7e4857ec739a2 100644 --- a/boards/arm/stm32/stm32f4discovery/configs/modbus_slave/defconfig +++ b/boards/arm/stm32/stm32f4discovery/configs/modbus_slave/defconfig @@ -20,7 +20,6 @@ CONFIG_ARCH_CHIP="stm32" CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F407VG=y CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y CONFIG_EXAMPLES_HELLO=y diff --git a/boards/arm/stm32/stm32f4discovery/configs/module/defconfig b/boards/arm/stm32/stm32f4discovery/configs/module/defconfig index 4e33a7a77dd3e..3b84fd63e69e6 100644 --- a/boards/arm/stm32/stm32f4discovery/configs/module/defconfig +++ b/boards/arm/stm32/stm32f4discovery/configs/module/defconfig @@ -29,7 +29,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 CONFIG_MODULE=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/stm32f4discovery/configs/mpr121_keypad/defconfig b/boards/arm/stm32/stm32f4discovery/configs/mpr121_keypad/defconfig index 8090b5152f057..c6b607db2870e 100644 --- a/boards/arm/stm32/stm32f4discovery/configs/mpr121_keypad/defconfig +++ b/boards/arm/stm32/stm32f4discovery/configs/mpr121_keypad/defconfig @@ -17,7 +17,6 @@ CONFIG_ARCH_CHIP="stm32" CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F407VG=y CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y CONFIG_DEBUG_FEATURES=y diff --git a/boards/arm/stm32/stm32f4discovery/configs/netnsh/defconfig b/boards/arm/stm32/stm32f4discovery/configs/netnsh/defconfig index afee06bdc315d..acf1c69a8867f 100644 --- a/boards/arm/stm32/stm32f4discovery/configs/netnsh/defconfig +++ b/boards/arm/stm32/stm32f4discovery/configs/netnsh/defconfig @@ -52,7 +52,6 @@ CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/stm32f4discovery/configs/nsh/defconfig b/boards/arm/stm32/stm32f4discovery/configs/nsh/defconfig index a9fcc06d26c79..27dc6222bebb4 100644 --- a/boards/arm/stm32/stm32f4discovery/configs/nsh/defconfig +++ b/boards/arm/stm32/stm32f4discovery/configs/nsh/defconfig @@ -16,7 +16,6 @@ CONFIG_ARCH_CHIP="stm32" CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F407VG=y CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y CONFIG_EXAMPLES_HELLO=y diff --git a/boards/arm/stm32/stm32f4discovery/configs/rgbled/defconfig b/boards/arm/stm32/stm32f4discovery/configs/rgbled/defconfig index f1e645e2f0905..12ba2b303a997 100644 --- a/boards/arm/stm32/stm32f4discovery/configs/rgbled/defconfig +++ b/boards/arm/stm32/stm32f4discovery/configs/rgbled/defconfig @@ -16,7 +16,6 @@ CONFIG_ARCH_CHIP="stm32" CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F407VG=y CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y CONFIG_EXAMPLES_RGBLED=y diff --git a/boards/arm/stm32/stm32f4discovery/configs/rndis/defconfig b/boards/arm/stm32/stm32f4discovery/configs/rndis/defconfig index 914eeb0a59297..fde9264166505 100644 --- a/boards/arm/stm32/stm32f4discovery/configs/rndis/defconfig +++ b/boards/arm/stm32/stm32f4discovery/configs/rndis/defconfig @@ -59,7 +59,6 @@ CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NFS=y CONFIG_NFS_STATISTICS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_FILE_APPS=y diff --git a/boards/arm/stm32/stm32f4discovery/configs/sbutton/defconfig b/boards/arm/stm32/stm32f4discovery/configs/sbutton/defconfig index 3f7bd12d6f7a5..2dbb1e6193a64 100644 --- a/boards/arm/stm32/stm32f4discovery/configs/sbutton/defconfig +++ b/boards/arm/stm32/stm32f4discovery/configs/sbutton/defconfig @@ -18,7 +18,6 @@ CONFIG_ARCH_CHIP="stm32" CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F407VG=y CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y CONFIG_EXAMPLES_HELLO=y diff --git a/boards/arm/stm32/stm32f4discovery/configs/sporadic/defconfig b/boards/arm/stm32/stm32f4discovery/configs/sporadic/defconfig index 023ab35871a78..3af85b79a137f 100644 --- a/boards/arm/stm32/stm32f4discovery/configs/sporadic/defconfig +++ b/boards/arm/stm32/stm32f4discovery/configs/sporadic/defconfig @@ -16,7 +16,6 @@ CONFIG_ARCH_CHIP="stm32" CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F407VG=y CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y CONFIG_FS_PROCFS=y diff --git a/boards/arm/stm32/stm32f4discovery/configs/st7567/defconfig b/boards/arm/stm32/stm32f4discovery/configs/st7567/defconfig index aa0080aa318f5..88af267d2b656 100644 --- a/boards/arm/stm32/stm32f4discovery/configs/st7567/defconfig +++ b/boards/arm/stm32/stm32f4discovery/configs/st7567/defconfig @@ -16,7 +16,6 @@ CONFIG_ARCH_CHIP="stm32" CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F407VG=y CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y CONFIG_DRIVERS_VIDEO=y diff --git a/boards/arm/stm32/stm32f4discovery/configs/st7789/defconfig b/boards/arm/stm32/stm32f4discovery/configs/st7789/defconfig index 5f0adeb394fa2..9d846ecf6a4bc 100644 --- a/boards/arm/stm32/stm32f4discovery/configs/st7789/defconfig +++ b/boards/arm/stm32/stm32f4discovery/configs/st7789/defconfig @@ -16,7 +16,6 @@ CONFIG_ARCH_CHIP="stm32" CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F407VG=y CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y CONFIG_DRIVERS_VIDEO=y @@ -34,7 +33,6 @@ CONFIG_LCD_PORTRAIT=y CONFIG_LCD_ST7789=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/stm32f4discovery/configs/usbmsc/defconfig b/boards/arm/stm32/stm32f4discovery/configs/usbmsc/defconfig index 10b3e02c31074..0bc84e9ee02c1 100644 --- a/boards/arm/stm32/stm32f4discovery/configs/usbmsc/defconfig +++ b/boards/arm/stm32/stm32f4discovery/configs/usbmsc/defconfig @@ -27,7 +27,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32/stm32f4discovery/configs/usbnsh/defconfig b/boards/arm/stm32/stm32f4discovery/configs/usbnsh/defconfig index c651e446768d1..dce3e3d343b5c 100644 --- a/boards/arm/stm32/stm32f4discovery/configs/usbnsh/defconfig +++ b/boards/arm/stm32/stm32f4discovery/configs/usbnsh/defconfig @@ -33,7 +33,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/stm32f4discovery/configs/wifi/defconfig b/boards/arm/stm32/stm32f4discovery/configs/wifi/defconfig index 62bc4955ab104..9867fcf30a580 100644 --- a/boards/arm/stm32/stm32f4discovery/configs/wifi/defconfig +++ b/boards/arm/stm32/stm32f4discovery/configs/wifi/defconfig @@ -59,7 +59,6 @@ CONFIG_NETUTILS_WEBSERVER=y CONFIG_NET_USRSOCK=y CONFIG_NET_USRSOCK_PREALLOC_CONNS=16 CONFIG_NET_USRSOCK_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32/stm32f4discovery/configs/xen1210/defconfig b/boards/arm/stm32/stm32f4discovery/configs/xen1210/defconfig index bb125566bf239..e0237c63e672e 100644 --- a/boards/arm/stm32/stm32f4discovery/configs/xen1210/defconfig +++ b/boards/arm/stm32/stm32f4discovery/configs/xen1210/defconfig @@ -17,7 +17,6 @@ CONFIG_ARCH_CHIP="stm32" CONFIG_ARCH_CHIP_STM32=y CONFIG_ARCH_CHIP_STM32F407VG=y CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y CONFIG_FS_PROCFS=y diff --git a/boards/arm/stm32/stm32f4discovery/src/CMakeLists.txt b/boards/arm/stm32/stm32f4discovery/src/CMakeLists.txt index 2784309d2c124..e56c3f35a7d26 100644 --- a/boards/arm/stm32/stm32f4discovery/src/CMakeLists.txt +++ b/boards/arm/stm32/stm32f4discovery/src/CMakeLists.txt @@ -92,11 +92,8 @@ if(CONFIG_PWM) list(APPEND SRCS stm32_pwm.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) - if(CONFIG_BOARDCTL_RESET) - list(APPEND SRCS stm32_reset.c) - endif() +if(CONFIG_BOARDCTL_RESET) + list(APPEND SRCS stm32_reset.c) endif() if(CONFIG_ARCH_CUSTOM_PMINIT) diff --git a/boards/arm/stm32/stm32f4discovery/src/Make.defs b/boards/arm/stm32/stm32f4discovery/src/Make.defs index e8060c2ca425e..d4a14a5c9f11b 100644 --- a/boards/arm/stm32/stm32f4discovery/src/Make.defs +++ b/boards/arm/stm32/stm32f4discovery/src/Make.defs @@ -98,12 +98,9 @@ ifeq ($(CONFIG_CAPTURE),y) CSRCS += stm32_capture.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c ifeq ($(CONFIG_BOARDCTL_RESET),y) CSRCS += stm32_reset.c endif -endif ifeq ($(CONFIG_ARCH_CUSTOM_PMINIT),y) CSRCS += stm32_pm.c diff --git a/boards/arm/stm32/stm32f4discovery/src/stm32_appinit.c b/boards/arm/stm32/stm32f4discovery/src/stm32_appinit.c deleted file mode 100644 index 06034540d4a6e..0000000000000 --- a/boards/arm/stm32/stm32f4discovery/src/stm32_appinit.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32/stm32f4discovery/src/stm32_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 - -#include -#include - -#include "stm32f4discovery.h" - -/**************************************************************************** - * 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 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 stm32_bringup(); -#endif -} diff --git a/boards/arm/stm32/stm32f4discovery/src/stm32_usbmsc.c b/boards/arm/stm32/stm32f4discovery/src/stm32_usbmsc.c index 5437f1a47c2af..d4afdc4e95ebf 100644 --- a/boards/arm/stm32/stm32f4discovery/src/stm32_usbmsc.c +++ b/boards/arm/stm32/stm32f4discovery/src/stm32_usbmsc.c @@ -59,8 +59,7 @@ int board_usbmsc_initialize(int port) { /* If system/usbmsc is built as an NSH command, then SD slot should - * already have been initialized in board_app_initialize() - * (see stm32_appinit.c). + * already have been initialized. * In this case, there is nothing further to be done here. */ diff --git a/boards/arm/stm32/stm32ldiscovery/configs/chrono/defconfig b/boards/arm/stm32/stm32ldiscovery/configs/chrono/defconfig index e82087838c212..84ba90d0b107e 100644 --- a/boards/arm/stm32/stm32ldiscovery/configs/chrono/defconfig +++ b/boards/arm/stm32/stm32ldiscovery/configs/chrono/defconfig @@ -41,7 +41,6 @@ CONFIG_LIBC_SLCDCODEC=y CONFIG_LWL_CONSOLE=y CONFIG_MM_SMALL=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=64 CONFIG_NUNGET_CHARS=0 diff --git a/boards/arm/stm32/stm32ldiscovery/src/CMakeLists.txt b/boards/arm/stm32/stm32ldiscovery/src/CMakeLists.txt index 4fcff1709313f..feae2b53ca12f 100644 --- a/boards/arm/stm32/stm32ldiscovery/src/CMakeLists.txt +++ b/boards/arm/stm32/stm32ldiscovery/src/CMakeLists.txt @@ -40,10 +40,6 @@ if(CONFIG_PWM) list(APPEND SRCS stm32_pwm.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - target_sources(board PRIVATE ${SRCS}) if(CONFIG_ARCH_CHIP_STM32L152RB) diff --git a/boards/arm/stm32/stm32ldiscovery/src/Make.defs b/boards/arm/stm32/stm32ldiscovery/src/Make.defs index c9fd4a64a3cc9..0a07db0a932e5 100644 --- a/boards/arm/stm32/stm32ldiscovery/src/Make.defs +++ b/boards/arm/stm32/stm32ldiscovery/src/Make.defs @@ -42,10 +42,6 @@ ifeq ($(CONFIG_PWM),y) CSRCS += stm32_pwm.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - DEPPATH += --dep-path board VPATH += :board CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board diff --git a/boards/arm/stm32/stm32ldiscovery/src/stm32_appinit.c b/boards/arm/stm32/stm32ldiscovery/src/stm32_appinit.c deleted file mode 100644 index ad8cd3649cf45..0000000000000 --- a/boards/arm/stm32/stm32ldiscovery/src/stm32_appinit.c +++ /dev/null @@ -1,72 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32/stm32ldiscovery/src/stm32_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 - -#include -#include - -#include "stm32ldiscovery.h" - -/**************************************************************************** - * 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 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) -{ -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board initialization here */ - - return stm32_bringup(); -#else - return OK; -#endif -} diff --git a/boards/arm/stm32/stm32ldiscovery/src/stm32_boot.c b/boards/arm/stm32/stm32ldiscovery/src/stm32_boot.c index 90c611a616b6d..701fdbd303cc7 100644 --- a/boards/arm/stm32/stm32ldiscovery/src/stm32_boot.c +++ b/boards/arm/stm32/stm32ldiscovery/src/stm32_boot.c @@ -86,10 +86,6 @@ void stm32_boardinitialize(void) #ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { - /* Perform board initialization here instead of from the - * board_app_initialize(). - */ - stm32_bringup(); } #endif diff --git a/boards/arm/stm32/stm32ldiscovery/src/stm32ldiscovery.h b/boards/arm/stm32/stm32ldiscovery/src/stm32ldiscovery.h index 378a2e3805a95..a3ef72b726591 100644 --- a/boards/arm/stm32/stm32ldiscovery/src/stm32ldiscovery.h +++ b/boards/arm/stm32/stm32ldiscovery/src/stm32ldiscovery.h @@ -237,12 +237,7 @@ * Description: * Perform architecture specific initialization * - * CONFIG_BOARDCTL=y: - * If CONFIG_NSH_ARCHINITIALIZE=y: - * Called from the NSH library (or other application) - * Otherwise, assumed to be called from some other application. - * - * Otherwise CONFIG_BOARD_LATE_INITIALIZE=y: + * CONFIG_BOARD_LATE_INITIALIZE=y: * Called from board_late_initialize(). * * Otherwise, bad news: Never called diff --git a/boards/arm/stm32/stm32vldiscovery/src/CMakeLists.txt b/boards/arm/stm32/stm32vldiscovery/src/CMakeLists.txt index 630393344bead..ee0a0879fcae5 100644 --- a/boards/arm/stm32/stm32vldiscovery/src/CMakeLists.txt +++ b/boards/arm/stm32/stm32vldiscovery/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS stm32_boot.c stm32_bringup.c stm32_leds.c stm32_buttons.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - target_sources(board PRIVATE ${SRCS}) set_property(GLOBAL PROPERTY LD_SCRIPT diff --git a/boards/arm/stm32/stm32vldiscovery/src/Make.defs b/boards/arm/stm32/stm32vldiscovery/src/Make.defs index 84e41f01c96e7..9eef1f9e16dac 100644 --- a/boards/arm/stm32/stm32vldiscovery/src/Make.defs +++ b/boards/arm/stm32/stm32vldiscovery/src/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = stm32_boot.c stm32_bringup.c stm32_leds.c stm32_buttons.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - DEPPATH += --dep-path board VPATH += :board CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board diff --git a/boards/arm/stm32/stm32vldiscovery/src/stm32_appinit.c b/boards/arm/stm32/stm32vldiscovery/src/stm32_appinit.c deleted file mode 100644 index 7d55230ed07ac..0000000000000 --- a/boards/arm/stm32/stm32vldiscovery/src/stm32_appinit.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32/stm32vldiscovery/src/stm32_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 - -#include -#include - -#include "stm32vldiscovery.h" - -/**************************************************************************** - * 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 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 stm32_bringup(); -#endif -} diff --git a/boards/arm/stm32/viewtool-stm32f107/configs/ft80x/defconfig b/boards/arm/stm32/viewtool-stm32f107/configs/ft80x/defconfig index be45d60154493..f952c3ca348eb 100644 --- a/boards/arm/stm32/viewtool-stm32f107/configs/ft80x/defconfig +++ b/boards/arm/stm32/viewtool-stm32f107/configs/ft80x/defconfig @@ -24,7 +24,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LCD=y CONFIG_LCD_FT80X=y CONFIG_LCD_FT80X_AUDIO_GPIOSHUTDOWN=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/stm32/viewtool-stm32f107/configs/netnsh/defconfig b/boards/arm/stm32/viewtool-stm32f107/configs/netnsh/defconfig index e55c0927f33dd..083ecf7359a96 100644 --- a/boards/arm/stm32/viewtool-stm32f107/configs/netnsh/defconfig +++ b/boards/arm/stm32/viewtool-stm32f107/configs/netnsh/defconfig @@ -44,7 +44,6 @@ CONFIG_NET_TCP=y CONFIG_NET_TCP_PREALLOC_CONNS=40 CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/stm32/viewtool-stm32f107/configs/tcpblaster/defconfig b/boards/arm/stm32/viewtool-stm32f107/configs/tcpblaster/defconfig index 066be4baf40c1..1e3c72298e85f 100644 --- a/boards/arm/stm32/viewtool-stm32f107/configs/tcpblaster/defconfig +++ b/boards/arm/stm32/viewtool-stm32f107/configs/tcpblaster/defconfig @@ -38,7 +38,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_TCP_PREALLOC_CONNS=40 CONFIG_NET_TCP_WRITE_BUFFERS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/stm32/viewtool-stm32f107/src/CMakeLists.txt b/boards/arm/stm32/viewtool-stm32f107/src/CMakeLists.txt index 73b70821463f9..c994fa4536ce5 100644 --- a/boards/arm/stm32/viewtool-stm32f107/src/CMakeLists.txt +++ b/boards/arm/stm32/viewtool-stm32f107/src/CMakeLists.txt @@ -46,10 +46,6 @@ if(CONFIG_LCD_SSD1289) list(APPEND SRCS stm32_ssd1289.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - if(CONFIG_USBMSC) list(APPEND SRCS stm32_usbmsc.c) endif() diff --git a/boards/arm/stm32/viewtool-stm32f107/src/Make.defs b/boards/arm/stm32/viewtool-stm32f107/src/Make.defs index 341a7a8d8707f..260a9270b30a2 100644 --- a/boards/arm/stm32/viewtool-stm32f107/src/Make.defs +++ b/boards/arm/stm32/viewtool-stm32f107/src/Make.defs @@ -48,10 +48,6 @@ ifeq ($(CONFIG_LCD_SSD1289),y) # F103 CSRCS += stm32_ssd1289.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - ifeq ($(CONFIG_USBMSC),y) CSRCS += stm32_usbmsc.c endif diff --git a/boards/arm/stm32/viewtool-stm32f107/src/stm32_appinit.c b/boards/arm/stm32/viewtool-stm32f107/src/stm32_appinit.c deleted file mode 100644 index 1113773207823..0000000000000 --- a/boards/arm/stm32/viewtool-stm32f107/src/stm32_appinit.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32/viewtool-stm32f107/src/stm32_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 - -#include -#include - -#include "viewtool_stm32f107.h" - -/**************************************************************************** - * 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 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 stm32_bringup(); -#endif -} diff --git a/boards/arm/stm32/viewtool-stm32f107/src/stm32_usbmsc.c b/boards/arm/stm32/viewtool-stm32f107/src/stm32_usbmsc.c index 81167f07a266c..015af8a323d69 100644 --- a/boards/arm/stm32/viewtool-stm32f107/src/stm32_usbmsc.c +++ b/boards/arm/stm32/viewtool-stm32f107/src/stm32_usbmsc.c @@ -61,8 +61,7 @@ int board_usbmsc_initialize(int port) { /* If system/usbmsc is built as an NSH command, then SD slot should - * already have been initialized in board_app_initialize() - * (see stm32_appinit.c). + * already have been initialized. * In this case, there is nothing further to be done here. */ diff --git a/boards/arm/stm32f0l0g0/b-l072z-lrwan1/configs/adc/defconfig b/boards/arm/stm32f0l0g0/b-l072z-lrwan1/configs/adc/defconfig index aa6d41bf582f9..4462d03ab5630 100644 --- a/boards/arm/stm32f0l0g0/b-l072z-lrwan1/configs/adc/defconfig +++ b/boards/arm/stm32f0l0g0/b-l072z-lrwan1/configs/adc/defconfig @@ -17,6 +17,7 @@ CONFIG_ARCH_CHIP_STM32L072CZ=y CONFIG_ARCH_CHIP_STM32L072XX=y CONFIG_ARCH_CHIP_STM32L0=y CONFIG_ARCH_STACKDUMP=y +CONFIG_BOARDCTL=y CONFIG_BOARD_LOOPSPERMSEC=2796 CONFIG_BUILTIN=y CONFIG_DISABLE_ENVIRON=y @@ -31,7 +32,6 @@ CONFIG_INIT_STACKSIZE=1536 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=64 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32f0l0g0/b-l072z-lrwan1/configs/nxlines_oled/defconfig b/boards/arm/stm32f0l0g0/b-l072z-lrwan1/configs/nxlines_oled/defconfig index c0859f6f9499f..535105ac3231c 100644 --- a/boards/arm/stm32f0l0g0/b-l072z-lrwan1/configs/nxlines_oled/defconfig +++ b/boards/arm/stm32f0l0g0/b-l072z-lrwan1/configs/nxlines_oled/defconfig @@ -36,7 +36,6 @@ CONFIG_LCD_SSD1306_I2C=y CONFIG_LINE_MAX=64 CONFIG_MQ_MAXMSGSIZE=64 CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=64 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32f0l0g0/b-l072z-lrwan1/configs/sx127x/defconfig b/boards/arm/stm32f0l0g0/b-l072z-lrwan1/configs/sx127x/defconfig index aa728f9a8721b..c68b956af1e9a 100644 --- a/boards/arm/stm32f0l0g0/b-l072z-lrwan1/configs/sx127x/defconfig +++ b/boards/arm/stm32f0l0g0/b-l072z-lrwan1/configs/sx127x/defconfig @@ -37,7 +37,6 @@ CONFIG_LPWAN_SX127X_RFFREQ_DEFAULT=930000000 CONFIG_LPWAN_SX127X_RXSUPPORT=y CONFIG_LPWAN_SX127X_TXSUPPORT=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=64 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32f0l0g0/b-l072z-lrwan1/src/CMakeLists.txt b/boards/arm/stm32f0l0g0/b-l072z-lrwan1/src/CMakeLists.txt index d1907db623323..133c3298bce49 100644 --- a/boards/arm/stm32f0l0g0/b-l072z-lrwan1/src/CMakeLists.txt +++ b/boards/arm/stm32f0l0g0/b-l072z-lrwan1/src/CMakeLists.txt @@ -36,10 +36,6 @@ if(CONFIG_STM32F0L0G0_SPI) list(APPEND SRCS stm32_spi.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - if(CONFIG_LPWAN_SX127X) list(APPEND SRCS stm32_sx127x.c) endif() diff --git a/boards/arm/stm32f0l0g0/b-l072z-lrwan1/src/Make.defs b/boards/arm/stm32f0l0g0/b-l072z-lrwan1/src/Make.defs index 3471923bbebfb..c1646dd2d1cd1 100644 --- a/boards/arm/stm32f0l0g0/b-l072z-lrwan1/src/Make.defs +++ b/boards/arm/stm32f0l0g0/b-l072z-lrwan1/src/Make.defs @@ -38,10 +38,6 @@ ifeq ($(CONFIG_STM32F0L0G0_SPI),y) CSRCS += stm32_spi.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - ifeq ($(CONFIG_LPWAN_SX127X),y) CSRCS += stm32_sx127x.c endif diff --git a/boards/arm/stm32f0l0g0/b-l072z-lrwan1/src/stm32_appinit.c b/boards/arm/stm32f0l0g0/b-l072z-lrwan1/src/stm32_appinit.c deleted file mode 100644 index 08b01b9cfc694..0000000000000 --- a/boards/arm/stm32f0l0g0/b-l072z-lrwan1/src/stm32_appinit.c +++ /dev/null @@ -1,81 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32f0l0g0/b-l072z-lrwan1/src/stm32_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 - -#include -#include - -#include -#include - -#include "b-l072z-lrwan1.h" - -/**************************************************************************** - * 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 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 stm32_bringup(); -#endif -} diff --git a/boards/arm/stm32f0l0g0/b-l072z-lrwan1/src/stm32_boot.c b/boards/arm/stm32f0l0g0/b-l072z-lrwan1/src/stm32_boot.c index b79a7a810d371..3df42fb83cb73 100644 --- a/boards/arm/stm32f0l0g0/b-l072z-lrwan1/src/stm32_boot.c +++ b/boards/arm/stm32f0l0g0/b-l072z-lrwan1/src/stm32_boot.c @@ -96,6 +96,6 @@ void board_late_initialize(void) { /* Perform board-specific initialization */ - nrf52_bringup(); + stm32_bringup(); } #endif diff --git a/boards/arm/stm32f0l0g0/nucleo-c071rb/configs/adcscope/defconfig b/boards/arm/stm32f0l0g0/nucleo-c071rb/configs/adcscope/defconfig index 003ae422ea186..54dc06b209bb6 100644 --- a/boards/arm/stm32f0l0g0/nucleo-c071rb/configs/adcscope/defconfig +++ b/boards/arm/stm32f0l0g0/nucleo-c071rb/configs/adcscope/defconfig @@ -22,7 +22,6 @@ CONFIG_ARCH_IRQBUTTONS=y CONFIG_ARCH_STACKDUMP=y CONFIG_BOARDCTL=y CONFIG_BOARDCTL_MKRD=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=3997 CONFIG_BUILTIN=y CONFIG_DEBUG_ASSERTIONS=y diff --git a/boards/arm/stm32f0l0g0/nucleo-c071rb/configs/jumbo/defconfig b/boards/arm/stm32f0l0g0/nucleo-c071rb/configs/jumbo/defconfig index 9515b056fdd0b..493d9479f9c00 100644 --- a/boards/arm/stm32f0l0g0/nucleo-c071rb/configs/jumbo/defconfig +++ b/boards/arm/stm32f0l0g0/nucleo-c071rb/configs/jumbo/defconfig @@ -21,7 +21,6 @@ CONFIG_ARCH_CHIP_STM32C0=y CONFIG_ARCH_IRQBUTTONS=y CONFIG_ARCH_STACKDUMP=y CONFIG_BOARDCTL=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=3997 CONFIG_BUILTIN=y CONFIG_DEBUG_FEATURES=y diff --git a/boards/arm/stm32f0l0g0/nucleo-c071rb/configs/nsh/defconfig b/boards/arm/stm32f0l0g0/nucleo-c071rb/configs/nsh/defconfig index 0a9fbd7b96b03..af2948dd839e9 100644 --- a/boards/arm/stm32f0l0g0/nucleo-c071rb/configs/nsh/defconfig +++ b/boards/arm/stm32f0l0g0/nucleo-c071rb/configs/nsh/defconfig @@ -15,7 +15,6 @@ CONFIG_ARCH_CHIP_STM32C071XX=y CONFIG_ARCH_CHIP_STM32C0=y CONFIG_ARCH_IRQBUTTONS=y CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=3997 CONFIG_DEBUG_FULLOPT=y CONFIG_DEBUG_SYMBOLS=y diff --git a/boards/arm/stm32f0l0g0/nucleo-c071rb/src/CMakeLists.txt b/boards/arm/stm32f0l0g0/nucleo-c071rb/src/CMakeLists.txt index 03e5b9efe0a59..2d327d8c10698 100644 --- a/boards/arm/stm32f0l0g0/nucleo-c071rb/src/CMakeLists.txt +++ b/boards/arm/stm32f0l0g0/nucleo-c071rb/src/CMakeLists.txt @@ -32,10 +32,6 @@ if(CONFIG_ARCH_BUTTONS) list(APPEND SRCS stm32_buttons.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - if(CONFIG_ADC) list(APPEND SRCS stm32_adc.c) endif() diff --git a/boards/arm/stm32f0l0g0/nucleo-c071rb/src/Make.defs b/boards/arm/stm32f0l0g0/nucleo-c071rb/src/Make.defs index 7b4bb3362e583..a89ade512165b 100644 --- a/boards/arm/stm32f0l0g0/nucleo-c071rb/src/Make.defs +++ b/boards/arm/stm32f0l0g0/nucleo-c071rb/src/Make.defs @@ -34,10 +34,6 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += stm32_buttons.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - ifeq ($(CONFIG_ADC),y) CSRCS += stm32_adc.c endif diff --git a/boards/arm/stm32f0l0g0/nucleo-c071rb/src/stm32_appinit.c b/boards/arm/stm32f0l0g0/nucleo-c071rb/src/stm32_appinit.c deleted file mode 100644 index 0c47cb1ad215f..0000000000000 --- a/boards/arm/stm32f0l0g0/nucleo-c071rb/src/stm32_appinit.c +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32f0l0g0/nucleo-c071rb/src/stm32_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 - -#include - -#include - -#include "nucleo-c071rb.h" - -/**************************************************************************** - * 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 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) -{ - /* Did we already initialize via board_late_initialize()? */ - -#ifndef CONFIG_BOARD_LATE_INITIALIZE - return stm32_bringup(); -#else - return OK; -#endif -} diff --git a/boards/arm/stm32f0l0g0/nucleo-c071rb/src/stm32_boot.c b/boards/arm/stm32f0l0g0/nucleo-c071rb/src/stm32_boot.c index 173717fab6574..b12a1c64a71d5 100644 --- a/boards/arm/stm32f0l0g0/nucleo-c071rb/src/stm32_boot.c +++ b/boards/arm/stm32f0l0g0/nucleo-c071rb/src/stm32_boot.c @@ -78,10 +78,6 @@ void stm32_boardinitialize(void) #ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { - /* Perform board bring-up here instead of from the - * board_app_initialize(). - */ - stm32_bringup(); } #endif diff --git a/boards/arm/stm32f0l0g0/nucleo-c092rc/configs/can/defconfig b/boards/arm/stm32f0l0g0/nucleo-c092rc/configs/can/defconfig index 118102ab57bc1..e8640c01a5c45 100644 --- a/boards/arm/stm32f0l0g0/nucleo-c092rc/configs/can/defconfig +++ b/boards/arm/stm32f0l0g0/nucleo-c092rc/configs/can/defconfig @@ -15,7 +15,6 @@ CONFIG_ARCH_CHIP_STM32C092XX=y CONFIG_ARCH_CHIP_STM32C0=y CONFIG_ARCH_IRQBUTTONS=y CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=3997 CONFIG_BUILTIN=y CONFIG_CAN_ERRORS=y diff --git a/boards/arm/stm32f0l0g0/nucleo-c092rc/configs/cansock/defconfig b/boards/arm/stm32f0l0g0/nucleo-c092rc/configs/cansock/defconfig index f3a86f9681b0c..0be70e4919560 100644 --- a/boards/arm/stm32f0l0g0/nucleo-c092rc/configs/cansock/defconfig +++ b/boards/arm/stm32f0l0g0/nucleo-c092rc/configs/cansock/defconfig @@ -18,7 +18,6 @@ CONFIG_ARCH_CHIP_STM32C092XX=y CONFIG_ARCH_CHIP_STM32C0=y CONFIG_ARCH_INTERRUPTSTACK=1024 CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=3997 CONFIG_BUILTIN=y CONFIG_CANUTILS_CANDUMP=y diff --git a/boards/arm/stm32f0l0g0/nucleo-c092rc/configs/jumbo/defconfig b/boards/arm/stm32f0l0g0/nucleo-c092rc/configs/jumbo/defconfig index ce0dc6eeccef7..b360b8a8630e4 100644 --- a/boards/arm/stm32f0l0g0/nucleo-c092rc/configs/jumbo/defconfig +++ b/boards/arm/stm32f0l0g0/nucleo-c092rc/configs/jumbo/defconfig @@ -21,7 +21,6 @@ CONFIG_ARCH_CHIP_STM32C0=y CONFIG_ARCH_IRQBUTTONS=y CONFIG_ARCH_STACKDUMP=y CONFIG_BOARDCTL=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=3997 CONFIG_BUILTIN=y CONFIG_DEBUG_FEATURES=y diff --git a/boards/arm/stm32f0l0g0/nucleo-c092rc/configs/nsh/defconfig b/boards/arm/stm32f0l0g0/nucleo-c092rc/configs/nsh/defconfig index 141e462454955..ed0012322cc6f 100644 --- a/boards/arm/stm32f0l0g0/nucleo-c092rc/configs/nsh/defconfig +++ b/boards/arm/stm32f0l0g0/nucleo-c092rc/configs/nsh/defconfig @@ -15,7 +15,6 @@ CONFIG_ARCH_CHIP_STM32C092XX=y CONFIG_ARCH_CHIP_STM32C0=y CONFIG_ARCH_IRQBUTTONS=y CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=3997 CONFIG_DEBUG_FULLOPT=y CONFIG_DEBUG_SYMBOLS=y diff --git a/boards/arm/stm32f0l0g0/nucleo-c092rc/src/CMakeLists.txt b/boards/arm/stm32f0l0g0/nucleo-c092rc/src/CMakeLists.txt index 63782e9618a80..163b6d6bb7c73 100644 --- a/boards/arm/stm32f0l0g0/nucleo-c092rc/src/CMakeLists.txt +++ b/boards/arm/stm32f0l0g0/nucleo-c092rc/src/CMakeLists.txt @@ -32,10 +32,6 @@ if(CONFIG_ARCH_BUTTONS) list(APPEND SRCS stm32_buttons.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - if(CONFIG_ADC) list(APPEND SRCS stm32_adc.c) endif() diff --git a/boards/arm/stm32f0l0g0/nucleo-c092rc/src/Make.defs b/boards/arm/stm32f0l0g0/nucleo-c092rc/src/Make.defs index 8c4bb580a143f..aa1ef14621960 100644 --- a/boards/arm/stm32f0l0g0/nucleo-c092rc/src/Make.defs +++ b/boards/arm/stm32f0l0g0/nucleo-c092rc/src/Make.defs @@ -34,10 +34,6 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += stm32_buttons.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - ifeq ($(CONFIG_ADC),y) CSRCS += stm32_adc.c endif diff --git a/boards/arm/stm32f0l0g0/nucleo-c092rc/src/stm32_appinit.c b/boards/arm/stm32f0l0g0/nucleo-c092rc/src/stm32_appinit.c deleted file mode 100644 index ebeba085b0f1a..0000000000000 --- a/boards/arm/stm32f0l0g0/nucleo-c092rc/src/stm32_appinit.c +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32f0l0g0/nucleo-c092rc/src/stm32_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 - -#include - -#include - -#include "nucleo-c092rc.h" - -/**************************************************************************** - * 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 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) -{ - /* Did we already initialize via board_late_initialize()? */ - -#ifndef CONFIG_BOARD_LATE_INITIALIZE - return stm32_bringup(); -#else - return OK; -#endif -} diff --git a/boards/arm/stm32f0l0g0/nucleo-c092rc/src/stm32_boot.c b/boards/arm/stm32f0l0g0/nucleo-c092rc/src/stm32_boot.c index 2cc4354d6b0d2..ceb6af10047d6 100644 --- a/boards/arm/stm32f0l0g0/nucleo-c092rc/src/stm32_boot.c +++ b/boards/arm/stm32f0l0g0/nucleo-c092rc/src/stm32_boot.c @@ -78,10 +78,6 @@ void stm32_boardinitialize(void) #ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { - /* Perform board bring-up here instead of from the - * board_app_initialize(). - */ - stm32_bringup(); } #endif diff --git a/boards/arm/stm32f0l0g0/nucleo-f072rb/configs/nsh/defconfig b/boards/arm/stm32f0l0g0/nucleo-f072rb/configs/nsh/defconfig index 005881ead0efa..fe6bd5a96bce0 100644 --- a/boards/arm/stm32f0l0g0/nucleo-f072rb/configs/nsh/defconfig +++ b/boards/arm/stm32f0l0g0/nucleo-f072rb/configs/nsh/defconfig @@ -37,7 +37,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=1536 CONFIG_MM_SMALL=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=64 CONFIG_NUNGET_CHARS=0 diff --git a/boards/arm/stm32f0l0g0/nucleo-f072rb/src/CMakeLists.txt b/boards/arm/stm32f0l0g0/nucleo-f072rb/src/CMakeLists.txt index 0147d82ff10ee..16d4ed14c1224 100644 --- a/boards/arm/stm32f0l0g0/nucleo-f072rb/src/CMakeLists.txt +++ b/boards/arm/stm32f0l0g0/nucleo-f072rb/src/CMakeLists.txt @@ -32,10 +32,6 @@ if(CONFIG_ARCH_BUTTONS) list(APPEND SRCS stm32_buttons.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - target_sources(board PRIVATE ${SRCS}) set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/flash.ld") diff --git a/boards/arm/stm32f0l0g0/nucleo-f072rb/src/Make.defs b/boards/arm/stm32f0l0g0/nucleo-f072rb/src/Make.defs index 3d26c7d4de8c7..27aae3fb3b131 100644 --- a/boards/arm/stm32f0l0g0/nucleo-f072rb/src/Make.defs +++ b/boards/arm/stm32f0l0g0/nucleo-f072rb/src/Make.defs @@ -34,10 +34,6 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += stm32_buttons.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - DEPPATH += --dep-path board VPATH += :board CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board diff --git a/boards/arm/stm32f0l0g0/nucleo-f072rb/src/stm32_appinit.c b/boards/arm/stm32f0l0g0/nucleo-f072rb/src/stm32_appinit.c deleted file mode 100644 index 78edbf9a6b5ff..0000000000000 --- a/boards/arm/stm32f0l0g0/nucleo-f072rb/src/stm32_appinit.c +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32f0l0g0/nucleo-f072rb/src/stm32_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 - -#include - -#include - -#include "nucleo-f072rb.h" - -/**************************************************************************** - * 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 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) -{ - /* Did we already initialize via board_late_initialize()? */ - -#ifndef CONFIG_BOARD_LATE_INITIALIZE - return stm32_bringup(); -#else - return OK; -#endif -} diff --git a/boards/arm/stm32f0l0g0/nucleo-f091rc/configs/nsh/defconfig b/boards/arm/stm32f0l0g0/nucleo-f091rc/configs/nsh/defconfig index 85e5ab4f2f0bf..039c992186b98 100644 --- a/boards/arm/stm32f0l0g0/nucleo-f091rc/configs/nsh/defconfig +++ b/boards/arm/stm32f0l0g0/nucleo-f091rc/configs/nsh/defconfig @@ -39,7 +39,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=1536 CONFIG_MM_SMALL=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=64 CONFIG_NUNGET_CHARS=0 diff --git a/boards/arm/stm32f0l0g0/nucleo-f091rc/configs/sx127x/defconfig b/boards/arm/stm32f0l0g0/nucleo-f091rc/configs/sx127x/defconfig index 7c361695e9b5b..a33db3856a49f 100644 --- a/boards/arm/stm32f0l0g0/nucleo-f091rc/configs/sx127x/defconfig +++ b/boards/arm/stm32f0l0g0/nucleo-f091rc/configs/sx127x/defconfig @@ -36,7 +36,6 @@ CONFIG_LPWAN_SX127X_MODULATION_DEFAULT=1 CONFIG_LPWAN_SX127X_RXSUPPORT=y CONFIG_LPWAN_SX127X_TXSUPPORT=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=64 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32f0l0g0/nucleo-f091rc/src/CMakeLists.txt b/boards/arm/stm32f0l0g0/nucleo-f091rc/src/CMakeLists.txt index e2bac8bc110f2..bfafa31ee78a0 100644 --- a/boards/arm/stm32f0l0g0/nucleo-f091rc/src/CMakeLists.txt +++ b/boards/arm/stm32f0l0g0/nucleo-f091rc/src/CMakeLists.txt @@ -36,10 +36,6 @@ if(CONFIG_STM32F0L0G0_SPI) list(APPEND SRCS stm32_spi.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - if(CONFIG_LPWAN_SX127X) list(APPEND SRCS stm32_sx127x.c) endif() diff --git a/boards/arm/stm32f0l0g0/nucleo-f091rc/src/Make.defs b/boards/arm/stm32f0l0g0/nucleo-f091rc/src/Make.defs index 878be9be5ab60..b455d3605ef0e 100644 --- a/boards/arm/stm32f0l0g0/nucleo-f091rc/src/Make.defs +++ b/boards/arm/stm32f0l0g0/nucleo-f091rc/src/Make.defs @@ -38,10 +38,6 @@ ifeq ($(CONFIG_STM32F0L0G0_SPI),y) CSRCS += stm32_spi.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - ifeq ($(CONFIG_LPWAN_SX127X),y) CSRCS += stm32_sx127x.c endif diff --git a/boards/arm/stm32f0l0g0/nucleo-f091rc/src/stm32_appinit.c b/boards/arm/stm32f0l0g0/nucleo-f091rc/src/stm32_appinit.c deleted file mode 100644 index 0c0c4bd5e3fab..0000000000000 --- a/boards/arm/stm32f0l0g0/nucleo-f091rc/src/stm32_appinit.c +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32f0l0g0/nucleo-f091rc/src/stm32_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 - -#include - -#include - -#include "nucleo-f091rc.h" - -/**************************************************************************** - * 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 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) -{ - /* Did we already initialize via board_late_initialize()? */ - -#ifndef CONFIG_BOARD_LATE_INITIALIZE - return stm32_bringup(); -#else - return OK; -#endif -} diff --git a/boards/arm/stm32f0l0g0/nucleo-g070rb/configs/nsh/defconfig b/boards/arm/stm32f0l0g0/nucleo-g070rb/configs/nsh/defconfig index 895a3c615d96e..9e16858e87d4e 100644 --- a/boards/arm/stm32f0l0g0/nucleo-g070rb/configs/nsh/defconfig +++ b/boards/arm/stm32f0l0g0/nucleo-g070rb/configs/nsh/defconfig @@ -16,7 +16,6 @@ CONFIG_ARCH_CHIP_STM32G070RB=y CONFIG_ARCH_CHIP_STM32G0=y CONFIG_ARCH_IRQBUTTONS=y CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=2796 CONFIG_BUILTIN=y CONFIG_DEBUG_FULLOPT=y diff --git a/boards/arm/stm32f0l0g0/nucleo-g070rb/src/CMakeLists.txt b/boards/arm/stm32f0l0g0/nucleo-g070rb/src/CMakeLists.txt index c0ce3a9391d87..08d07dd22c1c0 100644 --- a/boards/arm/stm32f0l0g0/nucleo-g070rb/src/CMakeLists.txt +++ b/boards/arm/stm32f0l0g0/nucleo-g070rb/src/CMakeLists.txt @@ -36,10 +36,6 @@ if(CONFIG_DEV_GPIO) list(APPEND SRCS stm32_gpio.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - if(CONFIG_PWM) list(APPEND SRCS stm32_pwm.c) endif() diff --git a/boards/arm/stm32f0l0g0/nucleo-g070rb/src/Make.defs b/boards/arm/stm32f0l0g0/nucleo-g070rb/src/Make.defs index cec0ba4489d72..3fcfafcf17fe3 100644 --- a/boards/arm/stm32f0l0g0/nucleo-g070rb/src/Make.defs +++ b/boards/arm/stm32f0l0g0/nucleo-g070rb/src/Make.defs @@ -38,10 +38,6 @@ ifeq ($(CONFIG_DEV_GPIO),y) CSRCS += stm32_gpio.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - ifeq ($(CONFIG_PWM),y) CSRCS += stm32_pwm.c endif diff --git a/boards/arm/stm32f0l0g0/nucleo-g070rb/src/stm32_appinit.c b/boards/arm/stm32f0l0g0/nucleo-g070rb/src/stm32_appinit.c deleted file mode 100644 index abcf90dc0c68e..0000000000000 --- a/boards/arm/stm32f0l0g0/nucleo-g070rb/src/stm32_appinit.c +++ /dev/null @@ -1,81 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32f0l0g0/nucleo-g070rb/src/stm32_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 - -#include -#include - -#include -#include - -#include "nucleo-g070rb.h" - -/**************************************************************************** - * 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 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 stm32_bringup(); -#endif -} diff --git a/boards/arm/stm32f0l0g0/nucleo-g070rb/src/stm32_boot.c b/boards/arm/stm32f0l0g0/nucleo-g070rb/src/stm32_boot.c index bb3ff68695ca3..7783acec8ab67 100644 --- a/boards/arm/stm32f0l0g0/nucleo-g070rb/src/stm32_boot.c +++ b/boards/arm/stm32f0l0g0/nucleo-g070rb/src/stm32_boot.c @@ -78,10 +78,6 @@ void stm32_boardinitialize(void) #ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { - /* Perform board bring-up here instead of from the - * board_app_initialize(). - */ - stm32_bringup(); } #endif diff --git a/boards/arm/stm32f0l0g0/nucleo-g070rb/src/stm32_bringup.c b/boards/arm/stm32f0l0g0/nucleo-g070rb/src/stm32_bringup.c index 95b7f55b6a784..4d21f1918aec3 100644 --- a/boards/arm/stm32f0l0g0/nucleo-g070rb/src/stm32_bringup.c +++ b/boards/arm/stm32f0l0g0/nucleo-g070rb/src/stm32_bringup.c @@ -123,10 +123,6 @@ static void stm32_i2ctool(void) * CONFIG_BOARD_LATE_INITIALIZE=y : * Called from board_late_initialize(). * - * CONFIG_BOARD_LATE_INITIALIZE=n && CONFIG_BOARDCTL=y - * && CONFIG_NSH_ARCHINIT: - * Called from the NSH library - * ****************************************************************************/ int stm32_bringup(void) diff --git a/boards/arm/stm32f0l0g0/nucleo-g071rb/src/CMakeLists.txt b/boards/arm/stm32f0l0g0/nucleo-g071rb/src/CMakeLists.txt index 9f59398f374bd..b0e6eae77fbcc 100644 --- a/boards/arm/stm32f0l0g0/nucleo-g071rb/src/CMakeLists.txt +++ b/boards/arm/stm32f0l0g0/nucleo-g071rb/src/CMakeLists.txt @@ -32,10 +32,6 @@ if(CONFIG_ARCH_BUTTONS) list(APPEND SRCS stm32_buttons.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - target_sources(board PRIVATE ${SRCS}) set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/ld.script") diff --git a/boards/arm/stm32f0l0g0/nucleo-g071rb/src/Make.defs b/boards/arm/stm32f0l0g0/nucleo-g071rb/src/Make.defs index 6819c48988130..75e78e8bc721c 100644 --- a/boards/arm/stm32f0l0g0/nucleo-g071rb/src/Make.defs +++ b/boards/arm/stm32f0l0g0/nucleo-g071rb/src/Make.defs @@ -34,10 +34,6 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += stm32_buttons.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - DEPPATH += --dep-path board VPATH += :board CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board diff --git a/boards/arm/stm32f0l0g0/nucleo-g071rb/src/stm32_appinit.c b/boards/arm/stm32f0l0g0/nucleo-g071rb/src/stm32_appinit.c deleted file mode 100644 index 5a1eea5def685..0000000000000 --- a/boards/arm/stm32f0l0g0/nucleo-g071rb/src/stm32_appinit.c +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32f0l0g0/nucleo-g071rb/src/stm32_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 - -#include -#include - -#include -#include - -#include "nucleo-g071rb.h" - -/**************************************************************************** - * 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 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 stm32_bringup(); -#endif -} diff --git a/boards/arm/stm32f0l0g0/nucleo-g0b1re/configs/adc/defconfig b/boards/arm/stm32f0l0g0/nucleo-g0b1re/configs/adc/defconfig index 25ce4bc29f812..4bb6f38f054e4 100644 --- a/boards/arm/stm32f0l0g0/nucleo-g0b1re/configs/adc/defconfig +++ b/boards/arm/stm32f0l0g0/nucleo-g0b1re/configs/adc/defconfig @@ -16,7 +16,6 @@ CONFIG_ARCH_CHIP="stm32f0l0g0" CONFIG_ARCH_CHIP_STM32G0=y CONFIG_ARCH_CHIP_STM32G0B1RE=y CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=4164 CONFIG_BUILTIN=y CONFIG_DEBUG_FULLOPT=y diff --git a/boards/arm/stm32f0l0g0/nucleo-g0b1re/configs/adc_dma/defconfig b/boards/arm/stm32f0l0g0/nucleo-g0b1re/configs/adc_dma/defconfig index b219ecaf5ea22..1674e14770265 100644 --- a/boards/arm/stm32f0l0g0/nucleo-g0b1re/configs/adc_dma/defconfig +++ b/boards/arm/stm32f0l0g0/nucleo-g0b1re/configs/adc_dma/defconfig @@ -18,7 +18,6 @@ CONFIG_ARCH_CHIP_STM32G0=y CONFIG_ARCH_CHIP_STM32G0B1RE=y CONFIG_ARCH_STACKDUMP=y CONFIG_BOARDCTL=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=4164 CONFIG_BUILTIN=y CONFIG_DEBUG_FEATURES=y diff --git a/boards/arm/stm32f0l0g0/nucleo-g0b1re/src/CMakeLists.txt b/boards/arm/stm32f0l0g0/nucleo-g0b1re/src/CMakeLists.txt index 17b4bbcbc494c..f6843c176e198 100644 --- a/boards/arm/stm32f0l0g0/nucleo-g0b1re/src/CMakeLists.txt +++ b/boards/arm/stm32f0l0g0/nucleo-g0b1re/src/CMakeLists.txt @@ -32,10 +32,6 @@ if(CONFIG_ARCH_BUTTONS) list(APPEND SRCS stm32_buttons.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - target_sources(board PRIVATE ${SRCS}) set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/ld.script") diff --git a/boards/arm/stm32f0l0g0/nucleo-g0b1re/src/Make.defs b/boards/arm/stm32f0l0g0/nucleo-g0b1re/src/Make.defs index 79545c290c2e1..b3019b82f54fd 100644 --- a/boards/arm/stm32f0l0g0/nucleo-g0b1re/src/Make.defs +++ b/boards/arm/stm32f0l0g0/nucleo-g0b1re/src/Make.defs @@ -34,10 +34,6 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += stm32_buttons.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - ifeq ($(CONFIG_ADC),y) CSRCS += stm32_adc.c endif diff --git a/boards/arm/stm32f0l0g0/nucleo-g0b1re/src/stm32_appinit.c b/boards/arm/stm32f0l0g0/nucleo-g0b1re/src/stm32_appinit.c deleted file mode 100644 index 6f8bc76d6957f..0000000000000 --- a/boards/arm/stm32f0l0g0/nucleo-g0b1re/src/stm32_appinit.c +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32f0l0g0/nucleo-g0b1re/src/stm32_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 - -#include -#include - -#include -#include - -#include "nucleo-g0b1re.h" - -/**************************************************************************** - * 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 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 stm32_bringup(); -#endif -} diff --git a/boards/arm/stm32f0l0g0/nucleo-l073rz/configs/sx127x/defconfig b/boards/arm/stm32f0l0g0/nucleo-l073rz/configs/sx127x/defconfig index d914fd21e674f..bfdca3049be00 100644 --- a/boards/arm/stm32f0l0g0/nucleo-l073rz/configs/sx127x/defconfig +++ b/boards/arm/stm32f0l0g0/nucleo-l073rz/configs/sx127x/defconfig @@ -37,7 +37,6 @@ CONFIG_LPWAN_SX127X_MODULATION_DEFAULT=1 CONFIG_LPWAN_SX127X_RXSUPPORT=y CONFIG_LPWAN_SX127X_TXSUPPORT=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=64 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32f0l0g0/nucleo-l073rz/src/CMakeLists.txt b/boards/arm/stm32f0l0g0/nucleo-l073rz/src/CMakeLists.txt index 9099f5375713f..c14a6c3588178 100644 --- a/boards/arm/stm32f0l0g0/nucleo-l073rz/src/CMakeLists.txt +++ b/boards/arm/stm32f0l0g0/nucleo-l073rz/src/CMakeLists.txt @@ -36,10 +36,6 @@ if(CONFIG_STM32F0L0G0_SPI) list(APPEND SRCS stm32_spi.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - if(CONFIG_WL_NRF24L01) list(APPEND SRCS stm32_nrf24l01.c) endif() diff --git a/boards/arm/stm32f0l0g0/nucleo-l073rz/src/Make.defs b/boards/arm/stm32f0l0g0/nucleo-l073rz/src/Make.defs index 805bf1223c397..bd4f63065bd7d 100644 --- a/boards/arm/stm32f0l0g0/nucleo-l073rz/src/Make.defs +++ b/boards/arm/stm32f0l0g0/nucleo-l073rz/src/Make.defs @@ -38,10 +38,6 @@ ifeq ($(CONFIG_STM32F0L0G0_SPI),y) CSRCS += stm32_spi.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - ifeq ($(CONFIG_WL_NRF24L01),y) CSRCS += stm32_nrf24l01.c endif diff --git a/boards/arm/stm32f0l0g0/nucleo-l073rz/src/stm32_appinit.c b/boards/arm/stm32f0l0g0/nucleo-l073rz/src/stm32_appinit.c deleted file mode 100644 index a781010930992..0000000000000 --- a/boards/arm/stm32f0l0g0/nucleo-l073rz/src/stm32_appinit.c +++ /dev/null @@ -1,81 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32f0l0g0/nucleo-l073rz/src/stm32_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 - -#include -#include - -#include -#include - -#include "nucleo-l073rz.h" - -/**************************************************************************** - * 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 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 stm32_bringup(); -#endif -} diff --git a/boards/arm/stm32f0l0g0/stm32f051-discovery/src/CMakeLists.txt b/boards/arm/stm32f0l0g0/stm32f051-discovery/src/CMakeLists.txt index e38b6f9f172e8..185c0672fedfa 100644 --- a/boards/arm/stm32f0l0g0/stm32f051-discovery/src/CMakeLists.txt +++ b/boards/arm/stm32f0l0g0/stm32f051-discovery/src/CMakeLists.txt @@ -44,10 +44,6 @@ if(CONFIG_SENSORS_QENCODER) list(APPEND SRCS stm32_qencoder.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - target_sources(board PRIVATE ${SRCS}) set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/flash.ld") diff --git a/boards/arm/stm32f0l0g0/stm32f051-discovery/src/Make.defs b/boards/arm/stm32f0l0g0/stm32f051-discovery/src/Make.defs index 96b350843f754..520a4c8e8917b 100644 --- a/boards/arm/stm32f0l0g0/stm32f051-discovery/src/Make.defs +++ b/boards/arm/stm32f0l0g0/stm32f051-discovery/src/Make.defs @@ -46,10 +46,6 @@ ifeq ($(CONFIG_SENSORS_QENCODER),y) CSRCS += stm32_qencoder.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - DEPPATH += --dep-path board VPATH += :board CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board diff --git a/boards/arm/stm32f0l0g0/stm32f051-discovery/src/stm32_appinit.c b/boards/arm/stm32f0l0g0/stm32f051-discovery/src/stm32_appinit.c deleted file mode 100644 index 2c02e4c6a05a4..0000000000000 --- a/boards/arm/stm32f0l0g0/stm32f051-discovery/src/stm32_appinit.c +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32f0l0g0/stm32f051-discovery/src/stm32_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 - -#include - -#include - -#include "stm32f051-discovery.h" - -/**************************************************************************** - * 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 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) -{ - /* Did we already initialize via board_late_initialize()? */ - -#ifndef CONFIG_BOARD_LATE_INITIALIZE - return stm32_bringup(); -#else - return OK; -#endif -} diff --git a/boards/arm/stm32f0l0g0/stm32f072-discovery/src/CMakeLists.txt b/boards/arm/stm32f0l0g0/stm32f072-discovery/src/CMakeLists.txt index 4e1e1b9fe7ac1..0475024980bd0 100644 --- a/boards/arm/stm32f0l0g0/stm32f072-discovery/src/CMakeLists.txt +++ b/boards/arm/stm32f0l0g0/stm32f072-discovery/src/CMakeLists.txt @@ -44,10 +44,6 @@ if(CONFIG_SENSORS_QENCODER) list(APPEND SRCS stm32_qencoder.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - target_sources(board PRIVATE ${SRCS}) set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/flash.ld") diff --git a/boards/arm/stm32f0l0g0/stm32f072-discovery/src/Make.defs b/boards/arm/stm32f0l0g0/stm32f072-discovery/src/Make.defs index 586a1755db7a6..2963ffd2ae229 100644 --- a/boards/arm/stm32f0l0g0/stm32f072-discovery/src/Make.defs +++ b/boards/arm/stm32f0l0g0/stm32f072-discovery/src/Make.defs @@ -46,10 +46,6 @@ ifeq ($(CONFIG_SENSORS_QENCODER),y) CSRCS += stm32_qencoder.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - DEPPATH += --dep-path board VPATH += :board CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board diff --git a/boards/arm/stm32f0l0g0/stm32f072-discovery/src/stm32_appinit.c b/boards/arm/stm32f0l0g0/stm32f072-discovery/src/stm32_appinit.c deleted file mode 100644 index ae8da4cc6d0d7..0000000000000 --- a/boards/arm/stm32f0l0g0/stm32f072-discovery/src/stm32_appinit.c +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32f0l0g0/stm32f072-discovery/src/stm32_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 - -#include - -#include - -#include "stm32f072-discovery.h" - -/**************************************************************************** - * 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 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) -{ - /* Did we already initialize via board_late_initialize()? */ - -#ifndef CONFIG_BOARD_LATE_INITIALIZE - return stm32_bringup(); -#else - return OK; -#endif -} diff --git a/boards/arm/stm32f0l0g0/stm32g071b-disco/configs/oled/defconfig b/boards/arm/stm32f0l0g0/stm32g071b-disco/configs/oled/defconfig index 7738db703f497..a5ed5ebad7a6d 100644 --- a/boards/arm/stm32f0l0g0/stm32g071b-disco/configs/oled/defconfig +++ b/boards/arm/stm32f0l0g0/stm32g071b-disco/configs/oled/defconfig @@ -48,7 +48,6 @@ CONFIG_LINE_MAX=64 CONFIG_MM_SMALL=y CONFIG_MQ_MAXMSGSIZE=64 CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=64 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32f0l0g0/stm32g071b-disco/src/CMakeLists.txt b/boards/arm/stm32f0l0g0/stm32g071b-disco/src/CMakeLists.txt index 296de8b597bf0..88d162b167978 100644 --- a/boards/arm/stm32f0l0g0/stm32g071b-disco/src/CMakeLists.txt +++ b/boards/arm/stm32f0l0g0/stm32g071b-disco/src/CMakeLists.txt @@ -27,10 +27,6 @@ if(CONFIG_USERLED) list(APPEND SRCS stm32_userleds.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - if(CONFIG_SPI) list(APPEND SRCS stm32_spi.c) endif() diff --git a/boards/arm/stm32f0l0g0/stm32g071b-disco/src/Make.defs b/boards/arm/stm32f0l0g0/stm32g071b-disco/src/Make.defs index 65651fe2b67b3..1f012b2515c36 100644 --- a/boards/arm/stm32f0l0g0/stm32g071b-disco/src/Make.defs +++ b/boards/arm/stm32f0l0g0/stm32g071b-disco/src/Make.defs @@ -29,10 +29,6 @@ ifeq ($(CONFIG_USERLED),y) CSRCS += stm32_userleds.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - ifeq ($(CONFIG_SPI),y) CSRCS += stm32_spi.c endif diff --git a/boards/arm/stm32f0l0g0/stm32g071b-disco/src/stm32_appinit.c b/boards/arm/stm32f0l0g0/stm32g071b-disco/src/stm32_appinit.c deleted file mode 100644 index 7469dfc2d56f6..0000000000000 --- a/boards/arm/stm32f0l0g0/stm32g071b-disco/src/stm32_appinit.c +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32f0l0g0/stm32g071b-disco/src/stm32_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 - -#include - -#include "stm32g071b-disco.h" - -/**************************************************************************** - * 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 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 stm32_bringup(); -#endif -} diff --git a/boards/arm/stm32f0l0g0/stm32l0538-disco/src/CMakeLists.txt b/boards/arm/stm32f0l0g0/stm32l0538-disco/src/CMakeLists.txt index 08d6dc7bcb575..2d3a59a01db8e 100644 --- a/boards/arm/stm32f0l0g0/stm32l0538-disco/src/CMakeLists.txt +++ b/boards/arm/stm32f0l0g0/stm32l0538-disco/src/CMakeLists.txt @@ -32,10 +32,6 @@ if(CONFIG_ARCH_BUTTONS) list(APPEND SRCS stm32_buttons.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - target_sources(board PRIVATE ${SRCS}) set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/ld.script") diff --git a/boards/arm/stm32f0l0g0/stm32l0538-disco/src/Make.defs b/boards/arm/stm32f0l0g0/stm32l0538-disco/src/Make.defs index df59ca7a7d691..502d059a1057e 100644 --- a/boards/arm/stm32f0l0g0/stm32l0538-disco/src/Make.defs +++ b/boards/arm/stm32f0l0g0/stm32l0538-disco/src/Make.defs @@ -34,10 +34,6 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += stm32_buttons.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - DEPPATH += --dep-path board VPATH += :board CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board diff --git a/boards/arm/stm32f0l0g0/stm32l0538-disco/src/stm32_appinit.c b/boards/arm/stm32f0l0g0/stm32l0538-disco/src/stm32_appinit.c deleted file mode 100644 index 6b9820f21d510..0000000000000 --- a/boards/arm/stm32f0l0g0/stm32l0538-disco/src/stm32_appinit.c +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32f0l0g0/stm32l0538-disco/src/stm32_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 - -#include - -#include "stm32l0538-disco.h" - -/**************************************************************************** - * 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 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 stm32_bringup(); -#endif -} diff --git a/boards/arm/stm32f7/nucleo-f722ze/configs/can/defconfig b/boards/arm/stm32f7/nucleo-f722ze/configs/can/defconfig index 1dfac675765c6..59f5aaad34ef0 100644 --- a/boards/arm/stm32f7/nucleo-f722ze/configs/can/defconfig +++ b/boards/arm/stm32f7/nucleo-f722ze/configs/can/defconfig @@ -31,7 +31,6 @@ CONFIG_HAVE_CXXINITIALIZE=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32f7/nucleo-f722ze/configs/cansock/defconfig b/boards/arm/stm32f7/nucleo-f722ze/configs/cansock/defconfig index 3b79dfee89f47..c03ccde370cb4 100644 --- a/boards/arm/stm32f7/nucleo-f722ze/configs/cansock/defconfig +++ b/boards/arm/stm32f7/nucleo-f722ze/configs/cansock/defconfig @@ -43,7 +43,6 @@ CONFIG_NET_CAN=y CONFIG_NET_CAN_EXTID=y CONFIG_NET_SOCKOPTS=y CONFIG_NET_STATISTICS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32f7/nucleo-f722ze/configs/composite/defconfig b/boards/arm/stm32f7/nucleo-f722ze/configs/composite/defconfig index f927b7699d31f..f856c74056476 100644 --- a/boards/arm/stm32f7/nucleo-f722ze/configs/composite/defconfig +++ b/boards/arm/stm32f7/nucleo-f722ze/configs/composite/defconfig @@ -52,7 +52,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32f7/nucleo-f722ze/src/CMakeLists.txt b/boards/arm/stm32f7/nucleo-f722ze/src/CMakeLists.txt index 8cb113234740e..f8b17eb732e90 100644 --- a/boards/arm/stm32f7/nucleo-f722ze/src/CMakeLists.txt +++ b/boards/arm/stm32f7/nucleo-f722ze/src/CMakeLists.txt @@ -32,10 +32,6 @@ if(CONFIG_ARCH_BUTTONS) list(APPEND SRCS stm32_buttons.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinitialize.c) -endif() - if(CONFIG_DEV_GPIO) list(APPEND SRCS stm32_gpio.c) endif() diff --git a/boards/arm/stm32f7/nucleo-f722ze/src/Make.defs b/boards/arm/stm32f7/nucleo-f722ze/src/Make.defs index abc77c0320345..084c954afc3c9 100644 --- a/boards/arm/stm32f7/nucleo-f722ze/src/Make.defs +++ b/boards/arm/stm32f7/nucleo-f722ze/src/Make.defs @@ -34,10 +34,6 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += stm32_buttons.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinitialize.c -endif - ifeq ($(CONFIG_DEV_GPIO),y) CSRCS += stm32_gpio.c endif diff --git a/boards/arm/stm32f7/nucleo-f722ze/src/nucleo-f722ze.h b/boards/arm/stm32f7/nucleo-f722ze/src/nucleo-f722ze.h index af3cb8e902d8b..1db1e63552c98 100644 --- a/boards/arm/stm32f7/nucleo-f722ze/src/nucleo-f722ze.h +++ b/boards/arm/stm32f7/nucleo-f722ze/src/nucleo-f722ze.h @@ -204,16 +204,9 @@ * Description: * Perform architecture specific initialization * - * CONFIG_BOARDCTL=y: - * If CONFIG_NSH_ARCHINITIALIZE=y: - * Called from the NSH library (or other application) - * Otherwise, assumed to be called from some other application. - * - * Otherwise CONFIG_BOARD_LATE_INITIALIZE=y: + * CONFIG_BOARD_LATE_INITIALIZE=y: * Called from board_late_initialize(). * - * Otherwise, bad news: Never called - * ****************************************************************************/ int stm32_bringup(void); diff --git a/boards/arm/stm32f7/nucleo-f722ze/src/stm32_appinitialize.c b/boards/arm/stm32f7/nucleo-f722ze/src/stm32_appinitialize.c deleted file mode 100644 index 6c82fbcecb433..0000000000000 --- a/boards/arm/stm32f7/nucleo-f722ze/src/stm32_appinitialize.c +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32f7/nucleo-f722ze/src/stm32_appinitialize.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 -#include - -#include "nucleo-f722ze.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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 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) -{ -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board-specific initialization */ - - return stm32_bringup(); -#else - return OK; -#endif -} - -#endif - diff --git a/boards/arm/stm32f7/nucleo-f746zg/configs/evalos/defconfig b/boards/arm/stm32f7/nucleo-f746zg/configs/evalos/defconfig index bee096c7c1676..d32e6ac0e4cdf 100644 --- a/boards/arm/stm32f7/nucleo-f746zg/configs/evalos/defconfig +++ b/boards/arm/stm32f7/nucleo-f746zg/configs/evalos/defconfig @@ -32,7 +32,6 @@ CONFIG_HAVE_CXXINITIALIZE=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32f7/nucleo-f746zg/configs/note/defconfig b/boards/arm/stm32f7/nucleo-f746zg/configs/note/defconfig index d17a4de50bf79..ecc5faf6678e5 100644 --- a/boards/arm/stm32f7/nucleo-f746zg/configs/note/defconfig +++ b/boards/arm/stm32f7/nucleo-f746zg/configs/note/defconfig @@ -23,7 +23,6 @@ CONFIG_ARMV7M_DCACHE=y CONFIG_ARMV7M_DCACHE_WRITETHROUGH=y CONFIG_ARMV7M_DTCM=y CONFIG_ARMV7M_ICACHE=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=43103 CONFIG_BUILTIN=y CONFIG_CAN_USE_RTR=y @@ -63,7 +62,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32f7/nucleo-f746zg/configs/pysim/defconfig b/boards/arm/stm32f7/nucleo-f746zg/configs/pysim/defconfig index eba8392d26142..dfc6915718a0c 100644 --- a/boards/arm/stm32f7/nucleo-f746zg/configs/pysim/defconfig +++ b/boards/arm/stm32f7/nucleo-f746zg/configs/pysim/defconfig @@ -24,7 +24,6 @@ CONFIG_ARMV7M_DCACHE=y CONFIG_ARMV7M_DCACHE_WRITETHROUGH=y CONFIG_ARMV7M_DTCM=y CONFIG_ARMV7M_ICACHE=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=43103 CONFIG_BUILTIN=y CONFIG_CAN_USE_RTR=y @@ -62,7 +61,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32f7/nucleo-f746zg/src/CMakeLists.txt b/boards/arm/stm32f7/nucleo-f746zg/src/CMakeLists.txt index 68d09c3d17158..73a308ecf1c88 100644 --- a/boards/arm/stm32f7/nucleo-f746zg/src/CMakeLists.txt +++ b/boards/arm/stm32f7/nucleo-f746zg/src/CMakeLists.txt @@ -32,10 +32,6 @@ if(CONFIG_ARCH_BUTTONS) list(APPEND SRCS stm32_buttons.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinitialize.c) -endif() - if(CONFIG_DEV_GPIO) list(APPEND SRCS stm32_gpio.c) endif() diff --git a/boards/arm/stm32f7/nucleo-f746zg/src/Make.defs b/boards/arm/stm32f7/nucleo-f746zg/src/Make.defs index 49783595c964b..92eaf789e5872 100644 --- a/boards/arm/stm32f7/nucleo-f746zg/src/Make.defs +++ b/boards/arm/stm32f7/nucleo-f746zg/src/Make.defs @@ -34,10 +34,6 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += stm32_buttons.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinitialize.c -endif - ifeq ($(CONFIG_DEV_GPIO),y) CSRCS += stm32_gpio.c endif diff --git a/boards/arm/stm32f7/nucleo-f746zg/src/nucleo-f746zg.h b/boards/arm/stm32f7/nucleo-f746zg/src/nucleo-f746zg.h index 753ec9a2c3220..a71f98a2c345a 100644 --- a/boards/arm/stm32f7/nucleo-f746zg/src/nucleo-f746zg.h +++ b/boards/arm/stm32f7/nucleo-f746zg/src/nucleo-f746zg.h @@ -204,16 +204,9 @@ * Description: * Perform architecture specific initialization * - * CONFIG_BOARDCTL=y: - * If CONFIG_NSH_ARCHINITIALIZE=y: - * Called from the NSH library (or other application) - * Otherwise, assumed to be called from some other application. - * - * Otherwise CONFIG_BOARD_LATE_INITIALIZE=y: + * CONFIG_BOARD_LATE_INITIALIZE=y: * Called from board_late_initialize(). * - * Otherwise, bad news: Never called - * ****************************************************************************/ int stm32_bringup(void); diff --git a/boards/arm/stm32f7/nucleo-f746zg/src/stm32_appinitialize.c b/boards/arm/stm32f7/nucleo-f746zg/src/stm32_appinitialize.c deleted file mode 100644 index a158fe21c92d2..0000000000000 --- a/boards/arm/stm32f7/nucleo-f746zg/src/stm32_appinitialize.c +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32f7/nucleo-f746zg/src/stm32_appinitialize.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 -#include - -#include "nucleo-f746zg.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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 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) -{ -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board-specific initialization */ - - return stm32_bringup(); -#else - return OK; -#endif -} - -#endif - diff --git a/boards/arm/stm32f7/nucleo-f767zi/configs/evalos/defconfig b/boards/arm/stm32f7/nucleo-f767zi/configs/evalos/defconfig index 7ed386f72c72e..3baad155b05b7 100644 --- a/boards/arm/stm32f7/nucleo-f767zi/configs/evalos/defconfig +++ b/boards/arm/stm32f7/nucleo-f767zi/configs/evalos/defconfig @@ -33,7 +33,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 CONFIG_MPU60X0_I2C=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32f7/nucleo-f767zi/configs/netnsh/defconfig b/boards/arm/stm32f7/nucleo-f767zi/configs/netnsh/defconfig index 68e0613ffc583..6ddfdc068527d 100644 --- a/boards/arm/stm32f7/nucleo-f767zi/configs/netnsh/defconfig +++ b/boards/arm/stm32f7/nucleo-f767zi/configs/netnsh/defconfig @@ -45,7 +45,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32f7/nucleo-f767zi/src/CMakeLists.txt b/boards/arm/stm32f7/nucleo-f767zi/src/CMakeLists.txt index 8cdbe6dc3692a..28d7f560bef67 100644 --- a/boards/arm/stm32f7/nucleo-f767zi/src/CMakeLists.txt +++ b/boards/arm/stm32f7/nucleo-f767zi/src/CMakeLists.txt @@ -32,10 +32,6 @@ if(CONFIG_ARCH_BUTTONS) list(APPEND SRCS stm32_buttons.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinitialize.c) -endif() - if(CONFIG_DEV_GPIO) list(APPEND SRCS stm32_gpio.c) endif() diff --git a/boards/arm/stm32f7/nucleo-f767zi/src/Make.defs b/boards/arm/stm32f7/nucleo-f767zi/src/Make.defs index 54554d9780811..b4c24d64fec26 100644 --- a/boards/arm/stm32f7/nucleo-f767zi/src/Make.defs +++ b/boards/arm/stm32f7/nucleo-f767zi/src/Make.defs @@ -34,10 +34,6 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += stm32_buttons.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinitialize.c -endif - ifeq ($(CONFIG_DEV_GPIO),y) CSRCS += stm32_gpio.c endif diff --git a/boards/arm/stm32f7/nucleo-f767zi/src/nucleo-f767zi.h b/boards/arm/stm32f7/nucleo-f767zi/src/nucleo-f767zi.h index bc925a104df8f..60c9ab458c9a0 100644 --- a/boards/arm/stm32f7/nucleo-f767zi/src/nucleo-f767zi.h +++ b/boards/arm/stm32f7/nucleo-f767zi/src/nucleo-f767zi.h @@ -230,15 +230,7 @@ * Description: * Perform architecture specific initialization * - * CONFIG_BOARDCTL=y: - * If CONFIG_NSH_ARCHINITIALIZE=y: - * Called from the NSH library (or other application) - * Otherwise, assumed to be called from some other application. - * - * Otherwise CONFIG_BOARD_LATE_INITIALIZE=y: - * Called from board_late_initialize(). - * - * Otherwise, bad news: Never called + * Called from board_late_initialize(). * ****************************************************************************/ diff --git a/boards/arm/stm32f7/nucleo-f767zi/src/stm32_appinitialize.c b/boards/arm/stm32f7/nucleo-f767zi/src/stm32_appinitialize.c deleted file mode 100644 index 2b7ac8b355d03..0000000000000 --- a/boards/arm/stm32f7/nucleo-f767zi/src/stm32_appinitialize.c +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32f7/nucleo-f767zi/src/stm32_appinitialize.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 -#include - -#include "nucleo-f767zi.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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 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) -{ -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board-specific initialization */ - - return stm32_bringup(); -#else - return OK; -#endif -} - -#endif - diff --git a/boards/arm/stm32f7/steval-eth001v1/configs/foc_b16/defconfig b/boards/arm/stm32f7/steval-eth001v1/configs/foc_b16/defconfig index c077bcb4bf75e..89261567704a3 100644 --- a/boards/arm/stm32f7/steval-eth001v1/configs/foc_b16/defconfig +++ b/boards/arm/stm32f7/steval-eth001v1/configs/foc_b16/defconfig @@ -47,7 +47,6 @@ CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 CONFIG_MOTOR=y CONFIG_MOTOR_FOC=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32f7/steval-eth001v1/configs/foc_f32/defconfig b/boards/arm/stm32f7/steval-eth001v1/configs/foc_f32/defconfig index 7dcb697af5674..2d3229bf10e2e 100644 --- a/boards/arm/stm32f7/steval-eth001v1/configs/foc_f32/defconfig +++ b/boards/arm/stm32f7/steval-eth001v1/configs/foc_f32/defconfig @@ -47,7 +47,6 @@ CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 CONFIG_MOTOR=y CONFIG_MOTOR_FOC=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32f7/steval-eth001v1/src/CMakeLists.txt b/boards/arm/stm32f7/steval-eth001v1/src/CMakeLists.txt index 612fb63d83af0..0082f8f94996b 100644 --- a/boards/arm/stm32f7/steval-eth001v1/src/CMakeLists.txt +++ b/boards/arm/stm32f7/steval-eth001v1/src/CMakeLists.txt @@ -1,31 +1,27 @@ -############################################################################ +# ############################################################################## # boards/arm/stm32f7/steval-eth001v1/src/CMakeLists.txt # # 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 +# 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 +# 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. +# License for the specific language governing permissions and limitations under +# the License. # -############################################################################ +# ############################################################################## set(SRCS stm32_boot.c stm32_bringup.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - if(CONFIG_STM32F7_FOC) list(APPEND SRCS stm32_foc.c) endif() diff --git a/boards/arm/stm32f7/steval-eth001v1/src/Make.defs b/boards/arm/stm32f7/steval-eth001v1/src/Make.defs index 8e265b63d92dc..ace68763fc406 100644 --- a/boards/arm/stm32f7/steval-eth001v1/src/Make.defs +++ b/boards/arm/stm32f7/steval-eth001v1/src/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = stm32_boot.c stm32_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - ifeq ($(CONFIG_STM32F7_FOC),y) CSRCS += stm32_foc.c endif diff --git a/boards/arm/stm32f7/steval-eth001v1/src/stm32_appinit.c b/boards/arm/stm32f7/steval-eth001v1/src/stm32_appinit.c deleted file mode 100644 index 397c99adb2cb4..0000000000000 --- a/boards/arm/stm32f7/steval-eth001v1/src/stm32_appinit.c +++ /dev/null @@ -1,74 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32f7/steval-eth001v1/src/stm32_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 -#include - -#include "steval-eth001v1.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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 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) -{ -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board-specific initialization */ - - return stm32_bringup(); -#else - return OK; -#endif -} - -#endif diff --git a/boards/arm/stm32f7/steval-eth001v1/src/stm32_foc.c b/boards/arm/stm32f7/steval-eth001v1/src/stm32_foc.c index 5579b4a94536b..9a27e7bc94852 100644 --- a/boards/arm/stm32f7/steval-eth001v1/src/stm32_foc.c +++ b/boards/arm/stm32f7/steval-eth001v1/src/stm32_foc.c @@ -436,8 +436,6 @@ static void board_foc_trace(struct foc_dev_s *dev, int type, bool state) * Description: * Initialize FOC driver. * - * This function should be call by board_app_initialize(). - * * Returned Value: * 0 on success, a negated errno value on failure * diff --git a/boards/arm/stm32f7/stm32f746-ws/configs/nsh/defconfig b/boards/arm/stm32f7/stm32f746-ws/configs/nsh/defconfig index fcc698dcc0754..378ee084c7f8b 100644 --- a/boards/arm/stm32f7/stm32f746-ws/configs/nsh/defconfig +++ b/boards/arm/stm32f7/stm32f746-ws/configs/nsh/defconfig @@ -52,7 +52,6 @@ CONFIG_MMCSD=y CONFIG_MMCSD_MULTIBLOCK_LIMIT=1 CONFIG_MMCSD_SDIO=y CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_MAXARGUMENTS=12 diff --git a/boards/arm/stm32f7/stm32f746-ws/src/CMakeLists.txt b/boards/arm/stm32f7/stm32f746-ws/src/CMakeLists.txt index 8fcf733f7ea67..973faf1d30432 100644 --- a/boards/arm/stm32f7/stm32f746-ws/src/CMakeLists.txt +++ b/boards/arm/stm32f7/stm32f746-ws/src/CMakeLists.txt @@ -1,31 +1,27 @@ -############################################################################ +# ############################################################################## # boards/arm/stm32f7/stm32f746-ws/src/CMakeLists.txt # # 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 +# 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 +# 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. +# License for the specific language governing permissions and limitations under +# the License. # -############################################################################ +# ############################################################################## set(SRCS stm32_boot.c stm32_spi.c stm32_dma_alloc.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinitialize.c) -endif() - if(CONFIG_STM32F7_OTGFS) list(APPEND SRCS stm32_usb.c) endif() diff --git a/boards/arm/stm32f7/stm32f746-ws/src/Make.defs b/boards/arm/stm32f7/stm32f746-ws/src/Make.defs index df9d49346bb9c..80e52803544eb 100644 --- a/boards/arm/stm32f7/stm32f746-ws/src/Make.defs +++ b/boards/arm/stm32f7/stm32f746-ws/src/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = stm32_boot.c stm32_spi.c stm32_dma_alloc.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinitialize.c -endif - ifeq ($(CONFIG_STM32F7_OTGFS),y) CSRCS += stm32_usb.c endif diff --git a/boards/arm/stm32f7/stm32f746-ws/src/stm32_appinitialize.c b/boards/arm/stm32f7/stm32f746-ws/src/stm32_appinitialize.c deleted file mode 100644 index 0c5b2d40f173b..0000000000000 --- a/boards/arm/stm32f7/stm32f746-ws/src/stm32_appinitialize.c +++ /dev/null @@ -1,104 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32f7/stm32f746-ws/src/stm32_appinitialize.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 -#include - -#include -#include -#include - -#include "stm32f746-ws.h" -#include "stm32_i2c.h" - -static void stm32_i2c_register(int bus) -{ - struct i2c_master_s *i2c; - int ret; - - i2c = stm32_i2cbus_initialize(bus); - if (i2c == NULL) - { - serr("ERROR: Failed to get I2C%d interface\n", bus); - } - else - { - ret = i2c_register(i2c, bus); - if (ret < 0) - { - serr("ERROR: Failed to register I2C%d driver: %d\n", bus, ret); - stm32_i2cbus_uninitialize(i2c); - } - } -} - -static void stm32_i2ctool(void) -{ - stm32_i2c_register(1); -} - -/**************************************************************************** - * 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. - * - ****************************************************************************/ - -int board_app_initialize(void) -{ - /* Register I2C drivers on behalf of the I2C tool */ - - stm32_i2ctool(); - -#if defined(CONFIG_FAT_DMAMEMORY) - if (stm32_dma_alloc_init() < 0) - { - syslog(LOG_ERR, "DMA alloc FAILED"); - } -#endif - -#ifdef CONFIG_STM32F7_SDMMC1 - /* Initialize the SDIO block driver */ - - int ret = OK; - - ret = stm32_sdio_initialize(); - if (ret != OK) - { - ferr("ERROR: Failed to initialize MMC/SD driver: %d\n", ret); - return ret; - } -#endif - - return OK; -} diff --git a/boards/arm/stm32f7/stm32f746-ws/src/stm32_boot.c b/boards/arm/stm32f7/stm32f746-ws/src/stm32_boot.c index 15f81b007952e..eb4801aefb4ca 100644 --- a/boards/arm/stm32f7/stm32f746-ws/src/stm32_boot.c +++ b/boards/arm/stm32f7/stm32f746-ws/src/stm32_boot.c @@ -28,11 +28,46 @@ #include +#include + #include #include +#include +#include #include "arm_internal.h" #include "stm32f746-ws.h" +#include "stm32_i2c.h" + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +static void stm32_i2c_register(int bus) +{ + struct i2c_master_s *i2c; + int ret; + + i2c = stm32_i2cbus_initialize(bus); + if (i2c == NULL) + { + serr("ERROR: Failed to get I2C%d interface\n", bus); + } + else + { + ret = i2c_register(i2c, bus); + if (ret < 0) + { + serr("ERROR: Failed to register I2C%d driver: %d\n", bus, ret); + stm32_i2cbus_uninitialize(i2c); + } + } +} + +static void stm32_i2ctool(void) +{ + stm32_i2c_register(1); +} /**************************************************************************** * Public Functions @@ -81,13 +116,28 @@ void stm32_boardinitialize(void) #ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { -#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_BOARDCTL) - /* Perform NSH initialization here instead of from the NSH. This - * alternative NSH initialization is necessary when NSH is ran in - * user-space but the initialization function must run in kernel space. - */ + /* Register I2C drivers on behalf of the I2C tool */ + + stm32_i2ctool(); + +#if defined(CONFIG_FAT_DMAMEMORY) + if (stm32_dma_alloc_init() < 0) + { + syslog(LOG_ERR, "DMA alloc FAILED"); + } +#endif + +#ifdef CONFIG_STM32F7_SDMMC1 + /* Initialize the SDIO block driver */ - board_app_initialize(); + int ret = OK; + + ret = stm32_sdio_initialize(); + if (ret != OK) + { + ferr("ERROR: Failed to initialize MMC/SD driver: %d\n", ret); + return; + } #endif } #endif diff --git a/boards/arm/stm32f7/stm32f746g-disco/configs/audio/defconfig b/boards/arm/stm32f7/stm32f746g-disco/configs/audio/defconfig index 57932696d7fc9..0205e65dc256e 100644 --- a/boards/arm/stm32f7/stm32f746g-disco/configs/audio/defconfig +++ b/boards/arm/stm32f7/stm32f746g-disco/configs/audio/defconfig @@ -21,7 +21,6 @@ CONFIG_ARMV7M_DTCM=y CONFIG_ARMV7M_ICACHE=y CONFIG_AUDIO_I2S=y CONFIG_AUDIO_WM8994=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=43103 CONFIG_BUILTIN=y CONFIG_DEBUG_ASSERTIONS=y diff --git a/boards/arm/stm32f7/stm32f746g-disco/configs/fb/defconfig b/boards/arm/stm32f7/stm32f746g-disco/configs/fb/defconfig index e8d3c4cad9b87..1a6201d978f27 100644 --- a/boards/arm/stm32f7/stm32f746g-disco/configs/fb/defconfig +++ b/boards/arm/stm32f7/stm32f746g-disco/configs/fb/defconfig @@ -22,7 +22,6 @@ CONFIG_ARMV7M_DCACHE=y CONFIG_ARMV7M_DCACHE_WRITETHROUGH=y CONFIG_ARMV7M_DTCM=y CONFIG_ARMV7M_ICACHE=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=43103 CONFIG_BUILTIN=y CONFIG_DEBUG_FULLOPT=y diff --git a/boards/arm/stm32f7/stm32f746g-disco/configs/lvgl/defconfig b/boards/arm/stm32f7/stm32f746g-disco/configs/lvgl/defconfig index e247f13bfdb42..cb454fadbe662 100644 --- a/boards/arm/stm32f7/stm32f746g-disco/configs/lvgl/defconfig +++ b/boards/arm/stm32f7/stm32f746g-disco/configs/lvgl/defconfig @@ -23,7 +23,6 @@ CONFIG_ARMV7M_DCACHE=y CONFIG_ARMV7M_DCACHE_WRITETHROUGH=y CONFIG_ARMV7M_DTCM=y CONFIG_ARMV7M_ICACHE=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=43103 CONFIG_BUILTIN=y CONFIG_DEBUG_FULLOPT=y diff --git a/boards/arm/stm32f7/stm32f746g-disco/configs/netnsh/defconfig b/boards/arm/stm32f7/stm32f746g-disco/configs/netnsh/defconfig index 14e82a3c80a91..a72895966d05c 100644 --- a/boards/arm/stm32f7/stm32f746g-disco/configs/netnsh/defconfig +++ b/boards/arm/stm32f7/stm32f746g-disco/configs/netnsh/defconfig @@ -18,7 +18,6 @@ CONFIG_ARMV7M_DCACHE=y CONFIG_ARMV7M_DCACHE_WRITETHROUGH=y CONFIG_ARMV7M_DTCM=y CONFIG_ARMV7M_ICACHE=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=43103 CONFIG_BUILTIN=y CONFIG_DEBUG_SYMBOLS=y diff --git a/boards/arm/stm32f7/stm32f746g-disco/configs/nxdemo/defconfig b/boards/arm/stm32f7/stm32f746g-disco/configs/nxdemo/defconfig index bd83f334e6e16..bef22e038407a 100644 --- a/boards/arm/stm32f7/stm32f746g-disco/configs/nxdemo/defconfig +++ b/boards/arm/stm32f7/stm32f746g-disco/configs/nxdemo/defconfig @@ -23,7 +23,6 @@ CONFIG_ARMV7M_DCACHE=y CONFIG_ARMV7M_DCACHE_WRITETHROUGH=y CONFIG_ARMV7M_DTCM=y CONFIG_ARMV7M_ICACHE=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=43103 CONFIG_BUILTIN=y CONFIG_DEBUG_FULLOPT=y diff --git a/boards/arm/stm32f7/stm32f746g-disco/configs/nxterm/defconfig b/boards/arm/stm32f7/stm32f746g-disco/configs/nxterm/defconfig index c3e6d7296ba9a..b1d0a83557572 100644 --- a/boards/arm/stm32f7/stm32f746g-disco/configs/nxterm/defconfig +++ b/boards/arm/stm32f7/stm32f746g-disco/configs/nxterm/defconfig @@ -24,7 +24,6 @@ CONFIG_ARMV7M_DCACHE=y CONFIG_ARMV7M_DCACHE_WRITETHROUGH=y CONFIG_ARMV7M_DTCM=y CONFIG_ARMV7M_ICACHE=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=43103 CONFIG_BUILTIN=y CONFIG_DEBUG_FULLOPT=y diff --git a/boards/arm/stm32f7/stm32f746g-disco/src/CMakeLists.txt b/boards/arm/stm32f7/stm32f746g-disco/src/CMakeLists.txt index a20d4e5c0dbe1..fa3921f051cc2 100644 --- a/boards/arm/stm32f7/stm32f746g-disco/src/CMakeLists.txt +++ b/boards/arm/stm32f7/stm32f746g-disco/src/CMakeLists.txt @@ -32,10 +32,6 @@ if(CONFIG_ARCH_BUTTONS) list(APPEND SRCS stm32_buttons.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinitialize.c) -endif() - if(CONFIG_ADC) list(APPEND SRCS stm32_adc.c) endif() diff --git a/boards/arm/stm32f7/stm32f746g-disco/src/Make.defs b/boards/arm/stm32f7/stm32f746g-disco/src/Make.defs index 3ebba261bab7a..ddc33cdca5ba3 100644 --- a/boards/arm/stm32f7/stm32f746g-disco/src/Make.defs +++ b/boards/arm/stm32f7/stm32f746g-disco/src/Make.defs @@ -34,10 +34,6 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += stm32_buttons.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinitialize.c -endif - ifeq ($(CONFIG_ADC),y) CSRCS += stm32_adc.c endif diff --git a/boards/arm/stm32f7/stm32f746g-disco/src/stm32_appinitialize.c b/boards/arm/stm32f7/stm32f746g-disco/src/stm32_appinitialize.c deleted file mode 100644 index ad1e945f47480..0000000000000 --- a/boards/arm/stm32f7/stm32f746g-disco/src/stm32_appinitialize.c +++ /dev/null @@ -1,74 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32f7/stm32f746g-disco/src/stm32_appinitialize.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 -#include - -#include "stm32f746g-disco.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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 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) -{ -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board-specific initialization */ - - return stm32_bringup(); -#else - return OK; -#endif -} - -#endif diff --git a/boards/arm/stm32f7/stm32f769i-disco/configs/netnsh/defconfig b/boards/arm/stm32f7/stm32f769i-disco/configs/netnsh/defconfig index ae09239b3a0e8..74e1fa7b56801 100644 --- a/boards/arm/stm32f7/stm32f769i-disco/configs/netnsh/defconfig +++ b/boards/arm/stm32f7/stm32f769i-disco/configs/netnsh/defconfig @@ -18,7 +18,6 @@ CONFIG_ARMV7M_DCACHE=y CONFIG_ARMV7M_DCACHE_WRITETHROUGH=y CONFIG_ARMV7M_DTCM=y CONFIG_ARMV7M_ICACHE=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=43103 CONFIG_BUILTIN=y CONFIG_ETH0_PHY_LAN8742A=y diff --git a/boards/arm/stm32f7/stm32f769i-disco/configs/nsh/defconfig b/boards/arm/stm32f7/stm32f769i-disco/configs/nsh/defconfig index 27e0984d460ac..0f40ae305257a 100644 --- a/boards/arm/stm32f7/stm32f769i-disco/configs/nsh/defconfig +++ b/boards/arm/stm32f7/stm32f769i-disco/configs/nsh/defconfig @@ -27,7 +27,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32f7/stm32f769i-disco/src/CMakeLists.txt b/boards/arm/stm32f7/stm32f769i-disco/src/CMakeLists.txt index dc99018b08d52..b41627ab51855 100644 --- a/boards/arm/stm32f7/stm32f769i-disco/src/CMakeLists.txt +++ b/boards/arm/stm32f7/stm32f769i-disco/src/CMakeLists.txt @@ -32,10 +32,6 @@ if(CONFIG_ARCH_BUTTONS) list(APPEND SRCS stm32_buttons.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinitialize.c) -endif() - if(CONFIG_PWM) list(APPEND SRCS stm32_pwm.c) endif() diff --git a/boards/arm/stm32f7/stm32f769i-disco/src/Make.defs b/boards/arm/stm32f7/stm32f769i-disco/src/Make.defs index c9981eacbacbe..82a79440d22a7 100644 --- a/boards/arm/stm32f7/stm32f769i-disco/src/Make.defs +++ b/boards/arm/stm32f7/stm32f769i-disco/src/Make.defs @@ -34,10 +34,6 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += stm32_buttons.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinitialize.c -endif - ifeq ($(CONFIG_PWM),y) CSRCS += stm32_pwm.c endif diff --git a/boards/arm/stm32f7/stm32f769i-disco/src/stm32_appinitialize.c b/boards/arm/stm32f7/stm32f769i-disco/src/stm32_appinitialize.c deleted file mode 100644 index 4ea5e7ec1bc63..0000000000000 --- a/boards/arm/stm32f7/stm32f769i-disco/src/stm32_appinitialize.c +++ /dev/null @@ -1,72 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32f7/stm32f769i-disco/src/stm32_appinitialize.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 -#include - -#include "stm32f769i-disco.h" - -/**************************************************************************** - * 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 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 stm32_bringup(); -#endif -} diff --git a/boards/arm/stm32f7/stm32f777zit6-meadow/configs/dualcdcacm/defconfig b/boards/arm/stm32f7/stm32f777zit6-meadow/configs/dualcdcacm/defconfig index d410340c5fb0a..cf9cf1cb87d21 100644 --- a/boards/arm/stm32f7/stm32f777zit6-meadow/configs/dualcdcacm/defconfig +++ b/boards/arm/stm32f7/stm32f777zit6-meadow/configs/dualcdcacm/defconfig @@ -34,7 +34,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32f7/stm32f777zit6-meadow/configs/f7corecomp/defconfig b/boards/arm/stm32f7/stm32f777zit6-meadow/configs/f7corecomp/defconfig index adf0ea8c9714d..0361ac3973f4a 100644 --- a/boards/arm/stm32f7/stm32f777zit6-meadow/configs/f7corecomp/defconfig +++ b/boards/arm/stm32f7/stm32f777zit6-meadow/configs/f7corecomp/defconfig @@ -19,7 +19,6 @@ CONFIG_ARMV7M_DCACHE_WRITETHROUGH=y CONFIG_ARMV7M_DTCM=y CONFIG_ARMV7M_ICACHE=y CONFIG_BOARDCTL_USBDEVCTRL=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=43103 CONFIG_BOARD_MEADOW_F7_CORE_COMPUTE=y CONFIG_BUILTIN=y @@ -50,7 +49,6 @@ CONFIG_MTD_BYTE_WRITE=y CONFIG_MTD_PARTITION=y CONFIG_MTD_SECT512=y CONFIG_MTD_W25QXXXJV=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32f7/stm32f777zit6-meadow/configs/i2s/defconfig b/boards/arm/stm32f7/stm32f777zit6-meadow/configs/i2s/defconfig index 8bb1a21f153f4..2a5630c8763f9 100644 --- a/boards/arm/stm32f7/stm32f777zit6-meadow/configs/i2s/defconfig +++ b/boards/arm/stm32f7/stm32f777zit6-meadow/configs/i2s/defconfig @@ -25,7 +25,6 @@ CONFIG_AUDIO_I2S=y CONFIG_BCH=y CONFIG_BOARDCTL_ROMDISK=y CONFIG_BOARDCTL_USBDEVCTRL=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=43103 CONFIG_BUILTIN=y CONFIG_CDCACM=y @@ -72,7 +71,6 @@ CONFIG_MTD_BYTE_WRITE=y CONFIG_MTD_PARTITION=y CONFIG_MTD_SECT512=y CONFIG_MTD_W25QXXXJV=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFCONFIG=y CONFIG_NSH_DISABLE_IFUPDOWN=y diff --git a/boards/arm/stm32f7/stm32f777zit6-meadow/configs/meadow_os/defconfig b/boards/arm/stm32f7/stm32f777zit6-meadow/configs/meadow_os/defconfig index ef2a0d285133d..8f9a71be40497 100644 --- a/boards/arm/stm32f7/stm32f777zit6-meadow/configs/meadow_os/defconfig +++ b/boards/arm/stm32f7/stm32f777zit6-meadow/configs/meadow_os/defconfig @@ -19,7 +19,6 @@ CONFIG_ARMV7M_DTCM=y CONFIG_ARMV7M_ICACHE=y CONFIG_BCH=y CONFIG_BOARDCTL_USBDEVCTRL=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=43103 CONFIG_BUILTIN=y CONFIG_CDCACM=y @@ -39,7 +38,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MEADOW_HCOM=y CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32f7/stm32f777zit6-meadow/configs/nsh/defconfig b/boards/arm/stm32f7/stm32f777zit6-meadow/configs/nsh/defconfig index 12633779da462..b63aa4ec89f9b 100644 --- a/boards/arm/stm32f7/stm32f777zit6-meadow/configs/nsh/defconfig +++ b/boards/arm/stm32f7/stm32f777zit6-meadow/configs/nsh/defconfig @@ -25,7 +25,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32f7/stm32f777zit6-meadow/configs/projectlab/defconfig b/boards/arm/stm32f7/stm32f777zit6-meadow/configs/projectlab/defconfig index 8a85af3087ef0..e4d37559d9d58 100644 --- a/boards/arm/stm32f7/stm32f777zit6-meadow/configs/projectlab/defconfig +++ b/boards/arm/stm32f7/stm32f777zit6-meadow/configs/projectlab/defconfig @@ -19,7 +19,6 @@ CONFIG_ARMV7M_DTCM=y CONFIG_ARMV7M_ICACHE=y CONFIG_BCH=y CONFIG_BOARDCTL_USBDEVCTRL=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=43103 CONFIG_BOARD_MEADOW_PROJECTLAB=y CONFIG_BUILTIN=y @@ -50,7 +49,6 @@ CONFIG_MTD_BYTE_WRITE=y CONFIG_MTD_PARTITION=y CONFIG_MTD_SECT512=y CONFIG_MTD_W25QXXXJV=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32f7/stm32f777zit6-meadow/configs/sdram/defconfig b/boards/arm/stm32f7/stm32f777zit6-meadow/configs/sdram/defconfig index 1579b65b41e7b..26e856613c856 100644 --- a/boards/arm/stm32f7/stm32f777zit6-meadow/configs/sdram/defconfig +++ b/boards/arm/stm32f7/stm32f777zit6-meadow/configs/sdram/defconfig @@ -27,7 +27,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32f7/stm32f777zit6-meadow/configs/usbnsh/defconfig b/boards/arm/stm32f7/stm32f777zit6-meadow/configs/usbnsh/defconfig index e7b553acf141f..6fb257d819b01 100644 --- a/boards/arm/stm32f7/stm32f777zit6-meadow/configs/usbnsh/defconfig +++ b/boards/arm/stm32f7/stm32f777zit6-meadow/configs/usbnsh/defconfig @@ -19,7 +19,6 @@ CONFIG_ARMV7M_DTCM=y CONFIG_ARMV7M_ICACHE=y CONFIG_BCH=y CONFIG_BOARDCTL_USBDEVCTRL=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=43103 CONFIG_BUILTIN=y CONFIG_CDCACM=y @@ -44,7 +43,6 @@ CONFIG_MTD_BYTE_WRITE=y CONFIG_MTD_PARTITION=y CONFIG_MTD_SECT512=y CONFIG_MTD_W25QXXXJV=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32f7/stm32f777zit6-meadow/src/CMakeLists.txt b/boards/arm/stm32f7/stm32f777zit6-meadow/src/CMakeLists.txt index 17559db0c4d3f..a22e8a9afed18 100644 --- a/boards/arm/stm32f7/stm32f777zit6-meadow/src/CMakeLists.txt +++ b/boards/arm/stm32f7/stm32f777zit6-meadow/src/CMakeLists.txt @@ -32,11 +32,8 @@ if(CONFIG_ARCH_BUTTONS) list(APPEND SRCS stm32_buttons.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinitialize.c) - if(CONFIG_BOARDCTL_IOCTL) - list(APPEND SRCS stm32_ioctl.c) - endif() +if(CONFIG_BOARDCTL_IOCTL) + list(APPEND SRCS stm32_ioctl.c) endif() if(CONFIG_PWM) diff --git a/boards/arm/stm32f7/stm32f777zit6-meadow/src/Make.defs b/boards/arm/stm32f7/stm32f777zit6-meadow/src/Make.defs index f206e99f38160..8d6ef41b3a6f9 100644 --- a/boards/arm/stm32f7/stm32f777zit6-meadow/src/Make.defs +++ b/boards/arm/stm32f7/stm32f777zit6-meadow/src/Make.defs @@ -35,12 +35,9 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += stm32_buttons.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinitialize.c ifeq ($(CONFIG_BOARDCTL_IOCTL),y) CSRCS += stm32_ioctl.c endif -endif ifeq ($(CONFIG_PWM),y) CSRCS += stm32_pwm.c diff --git a/boards/arm/stm32f7/stm32f777zit6-meadow/src/stm32_appinitialize.c b/boards/arm/stm32f7/stm32f777zit6-meadow/src/stm32_appinitialize.c deleted file mode 100644 index 16a97f6298006..0000000000000 --- a/boards/arm/stm32f7/stm32f777zit6-meadow/src/stm32_appinitialize.c +++ /dev/null @@ -1,72 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32f7/stm32f777zit6-meadow/src/stm32_appinitialize.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 -#include - -#include "stm32f777zit6-meadow.h" - -/**************************************************************************** - * 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 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 stm32_bringup(); -#endif -} diff --git a/boards/arm/stm32f7/stm32f777zit6-meadow/src/stm32_boot.c b/boards/arm/stm32f7/stm32f777zit6-meadow/src/stm32_boot.c index 18f055b3c3531..fbf4f961fc5b7 100644 --- a/boards/arm/stm32f7/stm32f777zit6-meadow/src/stm32_boot.c +++ b/boards/arm/stm32f7/stm32f777zit6-meadow/src/stm32_boot.c @@ -179,15 +179,7 @@ void board_late_initialize(void) } #endif -#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_BOARDCTL) - /* Perform NSH initialization here instead of from the NSH. This - * alternative NSH initialization is necessary when NSH is ran in - * user-space but the initialization function must run in kernel space. - */ - board_app_initialize(); -#else stm32_bringup(); -#endif } #endif diff --git a/boards/arm/stm32h5/nucleo-h563zi/configs/adc/defconfig b/boards/arm/stm32h5/nucleo-h563zi/configs/adc/defconfig index 75ae93f20fded..47aa7fb2cfe23 100644 --- a/boards/arm/stm32h5/nucleo-h563zi/configs/adc/defconfig +++ b/boards/arm/stm32h5/nucleo-h563zi/configs/adc/defconfig @@ -35,7 +35,6 @@ CONFIG_HAVE_CXXINITIALIZE=y CONFIG_IDLETHREAD_STACKSIZE=2048 CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32h5/nucleo-h563zi/configs/adc_watchdog/defconfig b/boards/arm/stm32h5/nucleo-h563zi/configs/adc_watchdog/defconfig index 403904b8e320e..f5fde0ba1a74c 100644 --- a/boards/arm/stm32h5/nucleo-h563zi/configs/adc_watchdog/defconfig +++ b/boards/arm/stm32h5/nucleo-h563zi/configs/adc_watchdog/defconfig @@ -35,7 +35,6 @@ CONFIG_HAVE_CXXINITIALIZE=y CONFIG_IDLETHREAD_STACKSIZE=2048 CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32h5/nucleo-h563zi/configs/dts/defconfig b/boards/arm/stm32h5/nucleo-h563zi/configs/dts/defconfig index 49762f0b5fc2c..23e83ae917777 100644 --- a/boards/arm/stm32h5/nucleo-h563zi/configs/dts/defconfig +++ b/boards/arm/stm32h5/nucleo-h563zi/configs/dts/defconfig @@ -29,7 +29,6 @@ CONFIG_HAVE_CXXINITIALIZE=y CONFIG_IDLETHREAD_STACKSIZE=2048 CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32h5/nucleo-h563zi/configs/fdcan1/defconfig b/boards/arm/stm32h5/nucleo-h563zi/configs/fdcan1/defconfig index e4ff3c988f074..d6a00523dbb80 100644 --- a/boards/arm/stm32h5/nucleo-h563zi/configs/fdcan1/defconfig +++ b/boards/arm/stm32h5/nucleo-h563zi/configs/fdcan1/defconfig @@ -32,7 +32,6 @@ CONFIG_HAVE_CXXINITIALIZE=y CONFIG_IDLETHREAD_STACKSIZE=2048 CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32h5/nucleo-h563zi/configs/nsh/defconfig b/boards/arm/stm32h5/nucleo-h563zi/configs/nsh/defconfig index b226bcf197034..d2a59492c4b05 100644 --- a/boards/arm/stm32h5/nucleo-h563zi/configs/nsh/defconfig +++ b/boards/arm/stm32h5/nucleo-h563zi/configs/nsh/defconfig @@ -29,7 +29,6 @@ CONFIG_HAVE_CXXINITIALIZE=y CONFIG_IDLETHREAD_STACKSIZE=2048 CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32h5/nucleo-h563zi/configs/pwm/defconfig b/boards/arm/stm32h5/nucleo-h563zi/configs/pwm/defconfig index 628a5f8735f9a..3b73e316f4e90 100644 --- a/boards/arm/stm32h5/nucleo-h563zi/configs/pwm/defconfig +++ b/boards/arm/stm32h5/nucleo-h563zi/configs/pwm/defconfig @@ -31,7 +31,6 @@ CONFIG_HAVE_CXXINITIALIZE=y CONFIG_IDLETHREAD_STACKSIZE=2048 CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32h5/nucleo-h563zi/configs/usbnsh/defconfig b/boards/arm/stm32h5/nucleo-h563zi/configs/usbnsh/defconfig index 83891b6e4c850..6772b433f1f1e 100644 --- a/boards/arm/stm32h5/nucleo-h563zi/configs/usbnsh/defconfig +++ b/boards/arm/stm32h5/nucleo-h563zi/configs/usbnsh/defconfig @@ -35,7 +35,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=4096 CONFIG_IRQ_WORK_STACKSIZE=4096 CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32h5/nucleo-h563zi/src/CMakeLists.txt b/boards/arm/stm32h5/nucleo-h563zi/src/CMakeLists.txt index 4999c854abb2f..7dca629677e6b 100644 --- a/boards/arm/stm32h5/nucleo-h563zi/src/CMakeLists.txt +++ b/boards/arm/stm32h5/nucleo-h563zi/src/CMakeLists.txt @@ -32,10 +32,6 @@ if(CONFIG_ARCH_BUTTONS) list(APPEND SRCS stm32_buttons.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - if(CONFIG_ADC) list(APPEND SRCS stm32_adc.c) endif() diff --git a/boards/arm/stm32h5/nucleo-h563zi/src/Makefile b/boards/arm/stm32h5/nucleo-h563zi/src/Makefile index e3c0288e28ed4..015b4463999df 100644 --- a/boards/arm/stm32h5/nucleo-h563zi/src/Makefile +++ b/boards/arm/stm32h5/nucleo-h563zi/src/Makefile @@ -35,10 +35,6 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += stm32_buttons.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - ifeq ($(CONFIG_ADC),y) CSRCS += stm32_adc.c endif diff --git a/boards/arm/stm32h5/nucleo-h563zi/src/stm32_appinit.c b/boards/arm/stm32h5/nucleo-h563zi/src/stm32_appinit.c deleted file mode 100644 index ff4984f29b20c..0000000000000 --- a/boards/arm/stm32h5/nucleo-h563zi/src/stm32_appinit.c +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32h5/nucleo-h563zi/src/stm32_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 - -#include - -#include "nucleo-h563zi.h" - -#include - -/**************************************************************************** - * 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 cold 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) -{ - /* Did we already initialize via board_late_initialize()? */ - -#ifndef CONFIG_BOARD_LATE_INITIALIZE - return stm32_bringup(); -#else - return OK; -#endif -} diff --git a/boards/arm/stm32h7/linum-stm32h753bi/configs/buzzer/defconfig b/boards/arm/stm32h7/linum-stm32h753bi/configs/buzzer/defconfig index 9b287ccd342bd..81256b344b366 100644 --- a/boards/arm/stm32h7/linum-stm32h753bi/configs/buzzer/defconfig +++ b/boards/arm/stm32h7/linum-stm32h753bi/configs/buzzer/defconfig @@ -31,7 +31,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBM=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=4 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32h7/linum-stm32h753bi/configs/eeprom/defconfig b/boards/arm/stm32h7/linum-stm32h753bi/configs/eeprom/defconfig index 275e4f97c8821..5ead89d6a20dc 100644 --- a/boards/arm/stm32h7/linum-stm32h753bi/configs/eeprom/defconfig +++ b/boards/arm/stm32h7/linum-stm32h753bi/configs/eeprom/defconfig @@ -32,7 +32,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBM=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=4 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32h7/linum-stm32h753bi/configs/leds/defconfig b/boards/arm/stm32h7/linum-stm32h753bi/configs/leds/defconfig index 109278d58ec2e..2f5b1ee1c58e2 100644 --- a/boards/arm/stm32h7/linum-stm32h753bi/configs/leds/defconfig +++ b/boards/arm/stm32h7/linum-stm32h753bi/configs/leds/defconfig @@ -34,7 +34,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBM=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=4 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32h7/linum-stm32h753bi/configs/littlefs/defconfig b/boards/arm/stm32h7/linum-stm32h753bi/configs/littlefs/defconfig index 32184b57160e7..ef1fdd8f3fa13 100644 --- a/boards/arm/stm32h7/linum-stm32h753bi/configs/littlefs/defconfig +++ b/boards/arm/stm32h7/linum-stm32h753bi/configs/littlefs/defconfig @@ -38,7 +38,6 @@ CONFIG_MM_DEFAULT_ALIGNMENT=4 CONFIG_MM_REGIONS=4 CONFIG_MTD=y CONFIG_MTD_W25QXXXJV=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32h7/linum-stm32h753bi/configs/lvgl/defconfig b/boards/arm/stm32h7/linum-stm32h753bi/configs/lvgl/defconfig index e05f0d841fd1e..0478f18677610 100644 --- a/boards/arm/stm32h7/linum-stm32h753bi/configs/lvgl/defconfig +++ b/boards/arm/stm32h7/linum-stm32h753bi/configs/lvgl/defconfig @@ -49,7 +49,6 @@ CONFIG_LV_USE_NUTTX_TOUCHSCREEN=y CONFIG_LV_USE_PERF_MONITOR=y CONFIG_LV_USE_SYSMON=y CONFIG_MM_REGIONS=5 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32h7/linum-stm32h753bi/configs/mfrc522/defconfig b/boards/arm/stm32h7/linum-stm32h753bi/configs/mfrc522/defconfig index 610edbd861239..5f25013c7d1b1 100644 --- a/boards/arm/stm32h7/linum-stm32h753bi/configs/mfrc522/defconfig +++ b/boards/arm/stm32h7/linum-stm32h753bi/configs/mfrc522/defconfig @@ -33,7 +33,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBM=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=4 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32h7/linum-stm32h753bi/configs/modbus_master/defconfig b/boards/arm/stm32h7/linum-stm32h753bi/configs/modbus_master/defconfig index fe61cae9e3d3c..6486a55fbbb22 100644 --- a/boards/arm/stm32h7/linum-stm32h753bi/configs/modbus_master/defconfig +++ b/boards/arm/stm32h7/linum-stm32h753bi/configs/modbus_master/defconfig @@ -45,7 +45,6 @@ CONFIG_LIBM=y CONFIG_LINE_MAX=64 CONFIG_MB_RTU_MASTER=y CONFIG_MM_REGIONS=4 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32h7/linum-stm32h753bi/configs/modbus_slave/defconfig b/boards/arm/stm32h7/linum-stm32h753bi/configs/modbus_slave/defconfig index 976e34a9a081d..2579b2ca842aa 100644 --- a/boards/arm/stm32h7/linum-stm32h753bi/configs/modbus_slave/defconfig +++ b/boards/arm/stm32h7/linum-stm32h753bi/configs/modbus_slave/defconfig @@ -36,7 +36,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBM=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=4 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32h7/linum-stm32h753bi/configs/netnsh/defconfig b/boards/arm/stm32h7/linum-stm32h753bi/configs/netnsh/defconfig index 745227f0f48f1..8d434e7ed5ea7 100644 --- a/boards/arm/stm32h7/linum-stm32h753bi/configs/netnsh/defconfig +++ b/boards/arm/stm32h7/linum-stm32h753bi/configs/netnsh/defconfig @@ -50,7 +50,6 @@ CONFIG_NET_ROUTE=y CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32h7/linum-stm32h753bi/configs/nsh/defconfig b/boards/arm/stm32h7/linum-stm32h753bi/configs/nsh/defconfig index bff037aa6c83f..293a768c652ec 100644 --- a/boards/arm/stm32h7/linum-stm32h753bi/configs/nsh/defconfig +++ b/boards/arm/stm32h7/linum-stm32h753bi/configs/nsh/defconfig @@ -30,7 +30,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBM=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=4 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32h7/linum-stm32h753bi/configs/nxffs/defconfig b/boards/arm/stm32h7/linum-stm32h753bi/configs/nxffs/defconfig index 3071f7816c35a..c04492147c903 100644 --- a/boards/arm/stm32h7/linum-stm32h753bi/configs/nxffs/defconfig +++ b/boards/arm/stm32h7/linum-stm32h753bi/configs/nxffs/defconfig @@ -34,7 +34,6 @@ CONFIG_MM_DEFAULT_ALIGNMENT=4 CONFIG_MM_REGIONS=4 CONFIG_MTD=y CONFIG_MTD_W25QXXXJV=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32h7/linum-stm32h753bi/configs/qencoder/defconfig b/boards/arm/stm32h7/linum-stm32h753bi/configs/qencoder/defconfig index 173adafcaa62c..790cb3c5968ed 100644 --- a/boards/arm/stm32h7/linum-stm32h753bi/configs/qencoder/defconfig +++ b/boards/arm/stm32h7/linum-stm32h753bi/configs/qencoder/defconfig @@ -31,7 +31,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBM=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=4 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32h7/linum-stm32h753bi/configs/rndis/defconfig b/boards/arm/stm32h7/linum-stm32h753bi/configs/rndis/defconfig index 1864c96d8d909..c50bb27796069 100644 --- a/boards/arm/stm32h7/linum-stm32h753bi/configs/rndis/defconfig +++ b/boards/arm/stm32h7/linum-stm32h753bi/configs/rndis/defconfig @@ -50,7 +50,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32h7/linum-stm32h753bi/configs/sdcard/defconfig b/boards/arm/stm32h7/linum-stm32h753bi/configs/sdcard/defconfig index ed676243cc0e4..3dbb6830e6954 100644 --- a/boards/arm/stm32h7/linum-stm32h753bi/configs/sdcard/defconfig +++ b/boards/arm/stm32h7/linum-stm32h753bi/configs/sdcard/defconfig @@ -40,7 +40,6 @@ CONFIG_MMCSD=y CONFIG_MMCSD_SDIO=y CONFIG_MMCSD_SDIOWAIT_WRCOMPLETE=y CONFIG_MM_REGIONS=4 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32h7/linum-stm32h753bi/configs/sdram/defconfig b/boards/arm/stm32h7/linum-stm32h753bi/configs/sdram/defconfig index 604003db855ac..b7502e7c4a2c9 100644 --- a/boards/arm/stm32h7/linum-stm32h753bi/configs/sdram/defconfig +++ b/boards/arm/stm32h7/linum-stm32h753bi/configs/sdram/defconfig @@ -29,7 +29,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBM=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=5 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32h7/linum-stm32h753bi/configs/socketcan/defconfig b/boards/arm/stm32h7/linum-stm32h753bi/configs/socketcan/defconfig index 63ed03ed52c51..f79049ddbd2c2 100644 --- a/boards/arm/stm32h7/linum-stm32h753bi/configs/socketcan/defconfig +++ b/boards/arm/stm32h7/linum-stm32h753bi/configs/socketcan/defconfig @@ -21,7 +21,6 @@ CONFIG_ARMV7M_DCACHE=y CONFIG_ARMV7M_DCACHE_WRITETHROUGH=y CONFIG_ARMV7M_DTCM=y CONFIG_ARMV7M_ICACHE=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=43103 CONFIG_BUILTIN=y CONFIG_CANUTILS_CANDUMP=y diff --git a/boards/arm/stm32h7/linum-stm32h753bi/configs/tone/defconfig b/boards/arm/stm32h7/linum-stm32h753bi/configs/tone/defconfig index 3dafeafa40a84..7f6c62f7326f6 100644 --- a/boards/arm/stm32h7/linum-stm32h753bi/configs/tone/defconfig +++ b/boards/arm/stm32h7/linum-stm32h753bi/configs/tone/defconfig @@ -36,7 +36,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBM=y CONFIG_LINE_MAX=120 CONFIG_MM_REGIONS=4 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32h7/linum-stm32h753bi/configs/usbmsc-sdcard/defconfig b/boards/arm/stm32h7/linum-stm32h753bi/configs/usbmsc-sdcard/defconfig index 83bd786154d37..0c36755c1c72a 100644 --- a/boards/arm/stm32h7/linum-stm32h753bi/configs/usbmsc-sdcard/defconfig +++ b/boards/arm/stm32h7/linum-stm32h753bi/configs/usbmsc-sdcard/defconfig @@ -41,7 +41,6 @@ CONFIG_MMCSD=y CONFIG_MMCSD_SDIO=y CONFIG_MMCSD_SDIOWAIT_WRCOMPLETE=y CONFIG_MM_REGIONS=4 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32h7/linum-stm32h753bi/configs/usbnsh/defconfig b/boards/arm/stm32h7/linum-stm32h753bi/configs/usbnsh/defconfig index fd6d41f63cb9d..77d040d77ad81 100644 --- a/boards/arm/stm32h7/linum-stm32h753bi/configs/usbnsh/defconfig +++ b/boards/arm/stm32h7/linum-stm32h753bi/configs/usbnsh/defconfig @@ -33,7 +33,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBM=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=4 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32h7/linum-stm32h753bi/configs/zmodem/defconfig b/boards/arm/stm32h7/linum-stm32h753bi/configs/zmodem/defconfig index b88023f56ddb2..12364f56d134b 100644 --- a/boards/arm/stm32h7/linum-stm32h753bi/configs/zmodem/defconfig +++ b/boards/arm/stm32h7/linum-stm32h753bi/configs/zmodem/defconfig @@ -46,7 +46,6 @@ CONFIG_MMCSD=y CONFIG_MMCSD_SDIO=y CONFIG_MMCSD_SDIOWAIT_WRCOMPLETE=y CONFIG_MM_REGIONS=4 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32h7/linum-stm32h753bi/src/CMakeLists.txt b/boards/arm/stm32h7/linum-stm32h753bi/src/CMakeLists.txt index 4062f4dfe66c7..d0d7904d73a2b 100644 --- a/boards/arm/stm32h7/linum-stm32h753bi/src/CMakeLists.txt +++ b/boards/arm/stm32h7/linum-stm32h753bi/src/CMakeLists.txt @@ -30,10 +30,6 @@ if(CONFIG_USERLED) list(APPEND SRCS stm32_userled.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinitialize.c) -endif() - if(CONFIG_STM32H7_OTGFS) list(APPEND SRCS stm32_usb.c) endif() diff --git a/boards/arm/stm32h7/linum-stm32h753bi/src/Makefile b/boards/arm/stm32h7/linum-stm32h753bi/src/Makefile index e8adde244ed3c..c2ae5df6f581a 100644 --- a/boards/arm/stm32h7/linum-stm32h753bi/src/Makefile +++ b/boards/arm/stm32h7/linum-stm32h753bi/src/Makefile @@ -68,10 +68,6 @@ ifeq ($(CONFIG_CL_MFRC522),y) CSRCS += stm32_mfrc522.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinitialize.c -endif - ifeq ($(CONFIG_STM32H7_LTDC),y) CSRCS += stm32_lcd.c endif diff --git a/boards/arm/stm32h7/linum-stm32h753bi/src/linum-stm32h753bi.h b/boards/arm/stm32h7/linum-stm32h753bi/src/linum-stm32h753bi.h index 885910ba3855f..a4cc20958f1fb 100644 --- a/boards/arm/stm32h7/linum-stm32h753bi/src/linum-stm32h753bi.h +++ b/boards/arm/stm32h7/linum-stm32h753bi/src/linum-stm32h753bi.h @@ -148,10 +148,6 @@ * CONFIG_BOARD_LATE_INITIALIZE=y : * Called from board_late_initialize(). * - * CONFIG_BOARD_LATE_INITIALIZE=n && CONFIG_BOARDCTL=y && - * CONFIG_NSH_ARCHINIT: - * Called from the NSH library - * ****************************************************************************/ int stm32_bringup(void); diff --git a/boards/arm/stm32h7/linum-stm32h753bi/src/stm32_appinitialize.c b/boards/arm/stm32h7/linum-stm32h753bi/src/stm32_appinitialize.c deleted file mode 100644 index 30bfc1edac401..0000000000000 --- a/boards/arm/stm32h7/linum-stm32h753bi/src/stm32_appinitialize.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32h7/linum-stm32h753bi/src/stm32_appinitialize.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 - -#include -#include - -#include "linum-stm32h753bi.h" - -/**************************************************************************** - * 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 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 stm32_bringup(); -#endif -} diff --git a/boards/arm/stm32h7/linum-stm32h753bi/src/stm32_bringup.c b/boards/arm/stm32h7/linum-stm32h753bi/src/stm32_bringup.c index ebe03e69b2b89..bab56899d14b3 100644 --- a/boards/arm/stm32h7/linum-stm32h753bi/src/stm32_bringup.c +++ b/boards/arm/stm32h7/linum-stm32h753bi/src/stm32_bringup.c @@ -154,10 +154,6 @@ static void stm32_i2ctool(void) * CONFIG_BOARD_LATE_INITIALIZE=y : * Called from board_late_initialize(). * - * CONFIG_BOARD_LATE_INITIALIZE=n && CONFIG_BOARDCTL=y && - * CONFIG_NSH_ARCHINIT: - * Called from the NSH library - * ****************************************************************************/ int stm32_bringup(void) diff --git a/boards/arm/stm32h7/linum-stm32h753bi/src/stm32_usbmsc.c b/boards/arm/stm32h7/linum-stm32h753bi/src/stm32_usbmsc.c index 84d4dd1c800ba..88981e3df7234 100644 --- a/boards/arm/stm32h7/linum-stm32h753bi/src/stm32_usbmsc.c +++ b/boards/arm/stm32h7/linum-stm32h753bi/src/stm32_usbmsc.c @@ -48,8 +48,7 @@ int board_usbmsc_initialize(int port) { /* If system/usbmsc is built as an NSH command, then SD slot should - * already have been initialized in board_app_initialize() - * (see stm32_appinit.c). + * already have been initialized. * In this case, there is nothing further to be done here. */ diff --git a/boards/arm/stm32h7/nucleo-h723zg/configs/oa_tc6/defconfig b/boards/arm/stm32h7/nucleo-h723zg/configs/oa_tc6/defconfig index 47a86a8ffbc3e..314c36575b7f0 100644 --- a/boards/arm/stm32h7/nucleo-h723zg/configs/oa_tc6/defconfig +++ b/boards/arm/stm32h7/nucleo-h723zg/configs/oa_tc6/defconfig @@ -19,7 +19,6 @@ CONFIG_ARMV7M_DCACHE=y CONFIG_ARMV7M_DCACHE_WRITETHROUGH=y CONFIG_ARMV7M_DTCM=y CONFIG_ARMV7M_ICACHE=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=43103 CONFIG_BUILTIN=y CONFIG_DEBUG_FEATURES=y diff --git a/boards/arm/stm32h7/nucleo-h723zg/src/CMakeLists.txt b/boards/arm/stm32h7/nucleo-h723zg/src/CMakeLists.txt index 979311adc7bc2..f27901f9491cb 100644 --- a/boards/arm/stm32h7/nucleo-h723zg/src/CMakeLists.txt +++ b/boards/arm/stm32h7/nucleo-h723zg/src/CMakeLists.txt @@ -48,10 +48,6 @@ if(CONFIG_BOARDCTL_UNIQUEID) list(APPEND SRCS stm32_uid.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinitialize.c) -endif() - if(CONFIG_DEV_GPIO) list(APPEND SRCS stm32_gpio.c) endif() diff --git a/boards/arm/stm32h7/nucleo-h723zg/src/Makefile b/boards/arm/stm32h7/nucleo-h723zg/src/Makefile index 111f96be6932c..dedc375fb9c05 100644 --- a/boards/arm/stm32h7/nucleo-h723zg/src/Makefile +++ b/boards/arm/stm32h7/nucleo-h723zg/src/Makefile @@ -50,10 +50,6 @@ ifeq ($(CONFIG_BOARDCTL_UNIQUEID),y) CSRCS += stm32_uid.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinitialize.c -endif - ifeq ($(CONFIG_DEV_GPIO),y) CSRCS += stm32_gpio.c endif diff --git a/boards/arm/stm32h7/nucleo-h723zg/src/stm32_appinitialize.c b/boards/arm/stm32h7/nucleo-h723zg/src/stm32_appinitialize.c deleted file mode 100644 index c988b0079f4ce..0000000000000 --- a/boards/arm/stm32h7/nucleo-h723zg/src/stm32_appinitialize.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32h7/nucleo-h723zg/src/stm32_appinitialize.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 - -#include -#include - -#include "nucleo-h723zg.h" - -/**************************************************************************** - * 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 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 stm32_bringup(); -#endif -} diff --git a/boards/arm/stm32h7/nucleo-h723zg/src/stm32_usbmsc.c b/boards/arm/stm32h7/nucleo-h723zg/src/stm32_usbmsc.c index 8ad08805e1b92..4e6f4f3874f4a 100644 --- a/boards/arm/stm32h7/nucleo-h723zg/src/stm32_usbmsc.c +++ b/boards/arm/stm32h7/nucleo-h723zg/src/stm32_usbmsc.c @@ -48,8 +48,7 @@ int board_usbmsc_initialize(int port) { /* If system/usbmsc is built as an NSH command, then SD slot should - * already have been initialized in board_app_initialize() - * (see stm32_appinit.c). + * already have been initialized in board_late_initialize() * In this case, there is nothing further to be done here. */ diff --git a/boards/arm/stm32h7/nucleo-h743zi/configs/capture/defconfig b/boards/arm/stm32h7/nucleo-h743zi/configs/capture/defconfig index 32c916c0f66ad..3596119057564 100644 --- a/boards/arm/stm32h7/nucleo-h743zi/configs/capture/defconfig +++ b/boards/arm/stm32h7/nucleo-h743zi/configs/capture/defconfig @@ -20,7 +20,6 @@ CONFIG_ARMV7M_DCACHE=y CONFIG_ARMV7M_DCACHE_WRITETHROUGH=y CONFIG_ARMV7M_DTCM=y CONFIG_ARMV7M_ICACHE=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=43103 CONFIG_BUILTIN=y CONFIG_CAPTURE=y diff --git a/boards/arm/stm32h7/nucleo-h743zi/configs/composite/defconfig b/boards/arm/stm32h7/nucleo-h743zi/configs/composite/defconfig index f53df00c754ea..81c3cdcdab630 100644 --- a/boards/arm/stm32h7/nucleo-h743zi/configs/composite/defconfig +++ b/boards/arm/stm32h7/nucleo-h743zi/configs/composite/defconfig @@ -58,7 +58,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32h7/nucleo-h743zi/configs/elf/defconfig b/boards/arm/stm32h7/nucleo-h743zi/configs/elf/defconfig index 6e8af1d110bfd..2fa4212858e45 100644 --- a/boards/arm/stm32h7/nucleo-h743zi/configs/elf/defconfig +++ b/boards/arm/stm32h7/nucleo-h743zi/configs/elf/defconfig @@ -39,7 +39,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBM=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=4 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_FILE_APPS=y diff --git a/boards/arm/stm32h7/nucleo-h743zi/configs/mcuboot-app/defconfig b/boards/arm/stm32h7/nucleo-h743zi/configs/mcuboot-app/defconfig index cc5d0a45a2296..6966a2baf2025 100644 --- a/boards/arm/stm32h7/nucleo-h743zi/configs/mcuboot-app/defconfig +++ b/boards/arm/stm32h7/nucleo-h743zi/configs/mcuboot-app/defconfig @@ -55,7 +55,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32h7/nucleo-h743zi/configs/netnsh/defconfig b/boards/arm/stm32h7/nucleo-h743zi/configs/netnsh/defconfig index 2331f3472fa23..67f590adaf0aa 100644 --- a/boards/arm/stm32h7/nucleo-h743zi/configs/netnsh/defconfig +++ b/boards/arm/stm32h7/nucleo-h743zi/configs/netnsh/defconfig @@ -49,7 +49,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32h7/nucleo-h743zi/configs/nxlines_oled/defconfig b/boards/arm/stm32h7/nucleo-h743zi/configs/nxlines_oled/defconfig index cb583682e5c32..8f193c58d45ab 100644 --- a/boards/arm/stm32h7/nucleo-h743zi/configs/nxlines_oled/defconfig +++ b/boards/arm/stm32h7/nucleo-h743zi/configs/nxlines_oled/defconfig @@ -43,7 +43,6 @@ CONFIG_LCD_SSD1306_I2C=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=4 CONFIG_MQ_MAXMSGSIZE=128 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32h7/nucleo-h743zi/configs/otg_fs_host/defconfig b/boards/arm/stm32h7/nucleo-h743zi/configs/otg_fs_host/defconfig index 087f8553a6db9..258614328286d 100644 --- a/boards/arm/stm32h7/nucleo-h743zi/configs/otg_fs_host/defconfig +++ b/boards/arm/stm32h7/nucleo-h743zi/configs/otg_fs_host/defconfig @@ -32,7 +32,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBM=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=4 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32h7/nucleo-h743zi/configs/pwm/defconfig b/boards/arm/stm32h7/nucleo-h743zi/configs/pwm/defconfig index 60057c793ee1c..a501dab8470aa 100644 --- a/boards/arm/stm32h7/nucleo-h743zi/configs/pwm/defconfig +++ b/boards/arm/stm32h7/nucleo-h743zi/configs/pwm/defconfig @@ -30,7 +30,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=4 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32h7/nucleo-h743zi/configs/rndis/defconfig b/boards/arm/stm32h7/nucleo-h743zi/configs/rndis/defconfig index 00cb7c263813c..9060c7e249b52 100644 --- a/boards/arm/stm32h7/nucleo-h743zi/configs/rndis/defconfig +++ b/boards/arm/stm32h7/nucleo-h743zi/configs/rndis/defconfig @@ -52,7 +52,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32h7/nucleo-h743zi/src/CMakeLists.txt b/boards/arm/stm32h7/nucleo-h743zi/src/CMakeLists.txt index 280ab93a551f8..d4e92b8f5ed14 100644 --- a/boards/arm/stm32h7/nucleo-h743zi/src/CMakeLists.txt +++ b/boards/arm/stm32h7/nucleo-h743zi/src/CMakeLists.txt @@ -72,10 +72,6 @@ if(CONFIG_LCD_SSD1306) list(APPEND SRCS stm32_ssd1306.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinitialize.c) -endif() - if(CONFIG_STM32H7_PROGMEM) list(APPEND SRCS stm32_progmem.c) endif() diff --git a/boards/arm/stm32h7/nucleo-h743zi/src/Makefile b/boards/arm/stm32h7/nucleo-h743zi/src/Makefile index 14d0b78569a84..985900a61a9d7 100644 --- a/boards/arm/stm32h7/nucleo-h743zi/src/Makefile +++ b/boards/arm/stm32h7/nucleo-h743zi/src/Makefile @@ -74,10 +74,6 @@ ifeq ($(CONFIG_LCD_SSD1306),y) CSRCS += stm32_ssd1306.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinitialize.c -endif - ifeq ($(CONFIG_STM32H7_PROGMEM),y) CSRCS += stm32_progmem.c endif diff --git a/boards/arm/stm32h7/nucleo-h743zi/src/nucleo-h743zi.h b/boards/arm/stm32h7/nucleo-h743zi/src/nucleo-h743zi.h index b9d0156998017..4bcfe00d50ba4 100644 --- a/boards/arm/stm32h7/nucleo-h743zi/src/nucleo-h743zi.h +++ b/boards/arm/stm32h7/nucleo-h743zi/src/nucleo-h743zi.h @@ -238,10 +238,6 @@ * CONFIG_BOARD_LATE_INITIALIZE=y : * Called from board_late_initialize(). * - * CONFIG_BOARD_LATE_INITIALIZE=n && CONFIG_BOARDCTL=y && - * CONFIG_NSH_ARCHINIT: - * Called from the NSH library - * ****************************************************************************/ int stm32_bringup(void); diff --git a/boards/arm/stm32h7/nucleo-h743zi/src/stm32_appinitialize.c b/boards/arm/stm32h7/nucleo-h743zi/src/stm32_appinitialize.c deleted file mode 100644 index 26d21104d6e63..0000000000000 --- a/boards/arm/stm32h7/nucleo-h743zi/src/stm32_appinitialize.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32h7/nucleo-h743zi/src/stm32_appinitialize.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 - -#include -#include - -#include "nucleo-h743zi.h" - -/**************************************************************************** - * 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 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 stm32_bringup(); -#endif -} diff --git a/boards/arm/stm32h7/nucleo-h743zi/src/stm32_bringup.c b/boards/arm/stm32h7/nucleo-h743zi/src/stm32_bringup.c index 3ec9cfe076b70..a8999a87a404b 100644 --- a/boards/arm/stm32h7/nucleo-h743zi/src/stm32_bringup.c +++ b/boards/arm/stm32h7/nucleo-h743zi/src/stm32_bringup.c @@ -244,10 +244,6 @@ static void stm32_i2ctool(void) * CONFIG_BOARD_LATE_INITIALIZE=y : * Called from board_late_initialize(). * - * CONFIG_BOARD_LATE_INITIALIZE=n && CONFIG_BOARDCTL=y && - * CONFIG_NSH_ARCHINIT: - * Called from the NSH library - * ****************************************************************************/ int stm32_bringup(void) diff --git a/boards/arm/stm32h7/nucleo-h743zi/src/stm32_usbmsc.c b/boards/arm/stm32h7/nucleo-h743zi/src/stm32_usbmsc.c index 80e041a9654a0..edf9bd2e77a5c 100644 --- a/boards/arm/stm32h7/nucleo-h743zi/src/stm32_usbmsc.c +++ b/boards/arm/stm32h7/nucleo-h743zi/src/stm32_usbmsc.c @@ -48,8 +48,7 @@ int board_usbmsc_initialize(int port) { /* If system/usbmsc is built as an NSH command, then SD slot should - * already have been initialized in board_app_initialize() - * (see stm32_appinit.c). + * already have been initialized. * In this case, there is nothing further to be done here. */ diff --git a/boards/arm/stm32h7/nucleo-h743zi2/configs/jumbo/defconfig b/boards/arm/stm32h7/nucleo-h743zi2/configs/jumbo/defconfig index f88266c35aab8..de5ac1f5cd3d8 100644 --- a/boards/arm/stm32h7/nucleo-h743zi2/configs/jumbo/defconfig +++ b/boards/arm/stm32h7/nucleo-h743zi2/configs/jumbo/defconfig @@ -74,7 +74,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32h7/nucleo-h743zi2/configs/netnsh/defconfig b/boards/arm/stm32h7/nucleo-h743zi2/configs/netnsh/defconfig index 5a7e861f228f2..42df2d25cf260 100644 --- a/boards/arm/stm32h7/nucleo-h743zi2/configs/netnsh/defconfig +++ b/boards/arm/stm32h7/nucleo-h743zi2/configs/netnsh/defconfig @@ -49,7 +49,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32h7/nucleo-h743zi2/configs/pysim/defconfig b/boards/arm/stm32h7/nucleo-h743zi2/configs/pysim/defconfig index db6e280a067c2..9b95d63b8be4e 100644 --- a/boards/arm/stm32h7/nucleo-h743zi2/configs/pysim/defconfig +++ b/boards/arm/stm32h7/nucleo-h743zi2/configs/pysim/defconfig @@ -60,7 +60,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32h7/nucleo-h743zi2/configs/socketcan/defconfig b/boards/arm/stm32h7/nucleo-h743zi2/configs/socketcan/defconfig index 39d3523dfb78a..5eb5fce08d013 100644 --- a/boards/arm/stm32h7/nucleo-h743zi2/configs/socketcan/defconfig +++ b/boards/arm/stm32h7/nucleo-h743zi2/configs/socketcan/defconfig @@ -21,7 +21,6 @@ CONFIG_ARMV7M_DCACHE=y CONFIG_ARMV7M_DCACHE_WRITETHROUGH=y CONFIG_ARMV7M_DTCM=y CONFIG_ARMV7M_ICACHE=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=43103 CONFIG_BUILTIN=y CONFIG_CANUTILS_CANDUMP=y diff --git a/boards/arm/stm32h7/nucleo-h743zi2/src/CMakeLists.txt b/boards/arm/stm32h7/nucleo-h743zi2/src/CMakeLists.txt index c8ef998d0f266..ce26e66e8cc9d 100644 --- a/boards/arm/stm32h7/nucleo-h743zi2/src/CMakeLists.txt +++ b/boards/arm/stm32h7/nucleo-h743zi2/src/CMakeLists.txt @@ -36,10 +36,6 @@ if(CONFIG_STM32H7_OTGFS) list(APPEND SRCS stm32_usb.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinitialize.c) -endif() - if(CONFIG_DEV_GPIO) list(APPEND SRCS stm32_gpio.c) endif() diff --git a/boards/arm/stm32h7/nucleo-h743zi2/src/Makefile b/boards/arm/stm32h7/nucleo-h743zi2/src/Makefile index 92e776d490e8e..9991b451550b5 100644 --- a/boards/arm/stm32h7/nucleo-h743zi2/src/Makefile +++ b/boards/arm/stm32h7/nucleo-h743zi2/src/Makefile @@ -42,10 +42,6 @@ ifeq ($(CONFIG_STM32H7_OTGFS),y) CSRCS += stm32_usb.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinitialize.c -endif - ifeq ($(CONFIG_DEV_GPIO),y) CSRCS += stm32_gpio.c endif diff --git a/boards/arm/stm32h7/nucleo-h743zi2/src/stm32_appinitialize.c b/boards/arm/stm32h7/nucleo-h743zi2/src/stm32_appinitialize.c deleted file mode 100644 index dd2ccdd8e25ce..0000000000000 --- a/boards/arm/stm32h7/nucleo-h743zi2/src/stm32_appinitialize.c +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32h7/nucleo-h743zi2/src/stm32_appinitialize.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 -#include -#include - -#include "nucleo-h743zi2.h" - -/**************************************************************************** - * 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 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 stm32_bringup(); -#endif -} diff --git a/boards/arm/stm32h7/nucleo-h743zi2/src/stm32_bringup.c b/boards/arm/stm32h7/nucleo-h743zi2/src/stm32_bringup.c index e461b6460930b..aa17bd7856f56 100644 --- a/boards/arm/stm32h7/nucleo-h743zi2/src/stm32_bringup.c +++ b/boards/arm/stm32h7/nucleo-h743zi2/src/stm32_bringup.c @@ -70,10 +70,6 @@ * CONFIG_BOARD_LATE_INITIALIZE=y : * Called from board_late_initialize(). * - * CONFIG_BOARD_LATE_INITIALIZE=n && CONFIG_BOARDCTL=y && - * CONFIG_NSH_ARCHINIT: - * Called from the NSH library - * ****************************************************************************/ int stm32_bringup(void) diff --git a/boards/arm/stm32h7/nucleo-h745zi/configs/nsh_cm4_rptun/defconfig b/boards/arm/stm32h7/nucleo-h745zi/configs/nsh_cm4_rptun/defconfig index 14530ae4bfd9c..f404c9aca7cc4 100644 --- a/boards/arm/stm32h7/nucleo-h745zi/configs/nsh_cm4_rptun/defconfig +++ b/boards/arm/stm32h7/nucleo-h745zi/configs/nsh_cm4_rptun/defconfig @@ -26,7 +26,6 @@ CONFIG_HAVE_CXXINITIALIZE=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_PROMPT_STRING="nsh-cm4> " diff --git a/boards/arm/stm32h7/nucleo-h745zi/configs/nsh_cm7_rptun/defconfig b/boards/arm/stm32h7/nucleo-h745zi/configs/nsh_cm7_rptun/defconfig index 4cf1e4891fe98..32deeca58262e 100644 --- a/boards/arm/stm32h7/nucleo-h745zi/configs/nsh_cm7_rptun/defconfig +++ b/boards/arm/stm32h7/nucleo-h745zi/configs/nsh_cm7_rptun/defconfig @@ -31,7 +31,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=4 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_PROMPT_STRING="nsh-cm7> " diff --git a/boards/arm/stm32h7/nucleo-h745zi/configs/pysim_cm7/defconfig b/boards/arm/stm32h7/nucleo-h745zi/configs/pysim_cm7/defconfig index de74afd19f1b1..ee71e6b201906 100644 --- a/boards/arm/stm32h7/nucleo-h745zi/configs/pysim_cm7/defconfig +++ b/boards/arm/stm32h7/nucleo-h745zi/configs/pysim_cm7/defconfig @@ -60,7 +60,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32h7/nucleo-h745zi/src/CMakeLists.txt b/boards/arm/stm32h7/nucleo-h745zi/src/CMakeLists.txt index a20c432323a80..4d1e7e4d7c217 100644 --- a/boards/arm/stm32h7/nucleo-h745zi/src/CMakeLists.txt +++ b/boards/arm/stm32h7/nucleo-h745zi/src/CMakeLists.txt @@ -28,10 +28,6 @@ else() list(APPEND SRCS stm32_userleds.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinitialize.c) -endif() - target_sources(board PRIVATE ${SRCS}) if(CONFIG_ARCH_CHIP_STM32H7_CORTEXM7) diff --git a/boards/arm/stm32h7/nucleo-h745zi/src/Makefile b/boards/arm/stm32h7/nucleo-h745zi/src/Makefile index e3b0718b1dbda..df3be92d50930 100644 --- a/boards/arm/stm32h7/nucleo-h745zi/src/Makefile +++ b/boards/arm/stm32h7/nucleo-h745zi/src/Makefile @@ -38,10 +38,6 @@ ifeq ($(CONFIG_STM32H7_OTGFS),y) CSRCS += stm32_usb.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinitialize.c -endif - ifeq ($(CONFIG_DEV_GPIO),y) CSRCS += stm32_gpio.c endif diff --git a/boards/arm/stm32h7/nucleo-h745zi/src/nucleo-h745zi.h b/boards/arm/stm32h7/nucleo-h745zi/src/nucleo-h745zi.h index 28e800b3e3d1c..b3b16bee6f644 100644 --- a/boards/arm/stm32h7/nucleo-h745zi/src/nucleo-h745zi.h +++ b/boards/arm/stm32h7/nucleo-h745zi/src/nucleo-h745zi.h @@ -245,10 +245,6 @@ * CONFIG_BOARD_LATE_INITIALIZE=y : * Called from board_late_initialize(). * - * CONFIG_BOARD_LATE_INITIALIZE=n && CONFIG_BOARDCTL=y && - * CONFIG_NSH_ARCHINIT: - * Called from the NSH library - * ****************************************************************************/ int stm32_bringup(void); diff --git a/boards/arm/stm32h7/nucleo-h745zi/src/stm32_appinitialize.c b/boards/arm/stm32h7/nucleo-h745zi/src/stm32_appinitialize.c deleted file mode 100644 index 1d1b8c135d89c..0000000000000 --- a/boards/arm/stm32h7/nucleo-h745zi/src/stm32_appinitialize.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32h7/nucleo-h745zi/src/stm32_appinitialize.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 - -#include -#include - -#include "nucleo-h745zi.h" - -/**************************************************************************** - * 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 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 stm32_bringup(); -#endif -} diff --git a/boards/arm/stm32h7/nucleo-h745zi/src/stm32_bringup.c b/boards/arm/stm32h7/nucleo-h745zi/src/stm32_bringup.c index 9b195df0501c8..a8e26a5b59120 100644 --- a/boards/arm/stm32h7/nucleo-h745zi/src/stm32_bringup.c +++ b/boards/arm/stm32h7/nucleo-h745zi/src/stm32_bringup.c @@ -85,10 +85,6 @@ void rpmsg_serialinit(void) * CONFIG_BOARD_LATE_INITIALIZE=y : * Called from board_late_initialize(). * - * CONFIG_BOARD_LATE_INITIALIZE=n && CONFIG_BOARDCTL=y && - * CONFIG_NSH_ARCHINIT: - * Called from the NSH library - * ****************************************************************************/ int stm32_bringup(void) @@ -229,7 +225,7 @@ int stm32_bringup(void) { syslog(LOG_ERR, "ERROR: stm32_pwm_setup() failed: %d\n", ret); } -#endif +#endif return OK; } diff --git a/boards/arm/stm32h7/openh743i/configs/composite_hs/defconfig b/boards/arm/stm32h7/openh743i/configs/composite_hs/defconfig index f05a404aa4444..42eadf579ad14 100644 --- a/boards/arm/stm32h7/openh743i/configs/composite_hs/defconfig +++ b/boards/arm/stm32h7/openh743i/configs/composite_hs/defconfig @@ -55,7 +55,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32h7/openh743i/configs/usbdev_hs_host_fs/defconfig b/boards/arm/stm32h7/openh743i/configs/usbdev_hs_host_fs/defconfig index 00a47ac64b913..5122941e7e509 100644 --- a/boards/arm/stm32h7/openh743i/configs/usbdev_hs_host_fs/defconfig +++ b/boards/arm/stm32h7/openh743i/configs/usbdev_hs_host_fs/defconfig @@ -36,7 +36,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=4 CONFIG_NDEBUG=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32h7/openh743i/src/CMakeLists.txt b/boards/arm/stm32h7/openh743i/src/CMakeLists.txt index 67c6af472179d..d6e3a6040cbf4 100644 --- a/boards/arm/stm32h7/openh743i/src/CMakeLists.txt +++ b/boards/arm/stm32h7/openh743i/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS stm32_boot.c stm32_bringup.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinitialize.c) -endif() - if(CONFIG_STM32H7_SDMMC) list(APPEND SRCS stm32_sdmmc.c) endif() diff --git a/boards/arm/stm32h7/openh743i/src/Makefile b/boards/arm/stm32h7/openh743i/src/Makefile index 05eaa57aaa4a4..eda04e7c3af25 100644 --- a/boards/arm/stm32h7/openh743i/src/Makefile +++ b/boards/arm/stm32h7/openh743i/src/Makefile @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = stm32_boot.c stm32_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinitialize.c -endif - ifeq ($(CONFIG_STM32H7_SDMMC),y) CSRCS += stm32_sdmmc.c endif diff --git a/boards/arm/stm32h7/openh743i/src/stm32_appinitialize.c b/boards/arm/stm32h7/openh743i/src/stm32_appinitialize.c deleted file mode 100644 index 098df3e0b0012..0000000000000 --- a/boards/arm/stm32h7/openh743i/src/stm32_appinitialize.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32h7/openh743i/src/stm32_appinitialize.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 - -#include -#include - -#include "openh743i.h" - -/**************************************************************************** - * 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 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 stm32_bringup(); -#endif -} diff --git a/boards/arm/stm32h7/openh743i/src/stm32_boot.c b/boards/arm/stm32h7/openh743i/src/stm32_boot.c index 48aa841425777..df105a23b30aa 100644 --- a/boards/arm/stm32h7/openh743i/src/stm32_boot.c +++ b/boards/arm/stm32h7/openh743i/src/stm32_boot.c @@ -76,12 +76,6 @@ void stm32_boardinitialize(void) #ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { -#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_BOARDCTL) - /* Perform board bring-up here instead of from the - * board_app_initialize(). - */ - stm32_bringup(); -#endif } #endif diff --git a/boards/arm/stm32h7/openh743i/src/stm32_bringup.c b/boards/arm/stm32h7/openh743i/src/stm32_bringup.c index f9a620015aab3..8d0abb21da5a7 100644 --- a/boards/arm/stm32h7/openh743i/src/stm32_bringup.c +++ b/boards/arm/stm32h7/openh743i/src/stm32_bringup.c @@ -62,8 +62,6 @@ * Called from board_late_initialize(). * * CONFIG_BOARD_LATE_INITIALIZE=n && CONFIG_BOARDCTL=y && - * CONFIG_NSH_ARCHINIT: - * Called from the NSH library * ****************************************************************************/ diff --git a/boards/arm/stm32h7/openh743i/src/stm32_usbmsc.c b/boards/arm/stm32h7/openh743i/src/stm32_usbmsc.c index 3cf9f662480a3..cfa34a7b21488 100644 --- a/boards/arm/stm32h7/openh743i/src/stm32_usbmsc.c +++ b/boards/arm/stm32h7/openh743i/src/stm32_usbmsc.c @@ -59,8 +59,7 @@ int board_usbmsc_initialize(int port) { /* If system/usbmsc is built as an NSH command, then SD slot should - * already have been initialized in board_app_initialize() - * (see stm32_appinit.c). + * already have been initialized. * In this case, there is nothing further to be done here. */ diff --git a/boards/arm/stm32h7/portenta-h7/configs/jumbo_cm7/defconfig b/boards/arm/stm32h7/portenta-h7/configs/jumbo_cm7/defconfig index 2ff316ae6e6a3..c8778936d3ef9 100644 --- a/boards/arm/stm32h7/portenta-h7/configs/jumbo_cm7/defconfig +++ b/boards/arm/stm32h7/portenta-h7/configs/jumbo_cm7/defconfig @@ -18,7 +18,6 @@ CONFIG_ARMV7M_DCACHE=y CONFIG_ARMV7M_DCACHE_WRITETHROUGH=y CONFIG_ARMV7M_DTCM=y CONFIG_ARMV7M_ICACHE=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=43103 CONFIG_BUILTIN=y CONFIG_DEBUG_ASSERTIONS=y diff --git a/boards/arm/stm32h7/portenta-h7/src/CMakeLists.txt b/boards/arm/stm32h7/portenta-h7/src/CMakeLists.txt index eab66ddce962d..50b89cc1eb8bf 100644 --- a/boards/arm/stm32h7/portenta-h7/src/CMakeLists.txt +++ b/boards/arm/stm32h7/portenta-h7/src/CMakeLists.txt @@ -26,10 +26,6 @@ if(CONFIG_ARCH_LEDS) list(APPEND SRCS stm32_autoleds.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinitialize.c) -endif() - target_sources(board PRIVATE ${SRCS}) if(CONFIG_ARCH_CHIP_STM32H7_CORTEXM7) diff --git a/boards/arm/stm32h7/portenta-h7/src/Makefile b/boards/arm/stm32h7/portenta-h7/src/Makefile index a1bb5920c3a6a..adca38bed3e6c 100644 --- a/boards/arm/stm32h7/portenta-h7/src/Makefile +++ b/boards/arm/stm32h7/portenta-h7/src/Makefile @@ -28,8 +28,4 @@ ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += stm32_autoleds.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinitialize.c -endif - include $(TOPDIR)/boards/Board.mk diff --git a/boards/arm/stm32h7/portenta-h7/src/portenta-h7.h b/boards/arm/stm32h7/portenta-h7/src/portenta-h7.h index f6d9cda70ae55..157269188172e 100644 --- a/boards/arm/stm32h7/portenta-h7/src/portenta-h7.h +++ b/boards/arm/stm32h7/portenta-h7/src/portenta-h7.h @@ -81,10 +81,6 @@ * CONFIG_BOARD_LATE_INITIALIZE=y : * Called from board_late_initialize(). * - * CONFIG_BOARD_LATE_INITIALIZE=n && CONFIG_BOARDCTL=y && - * CONFIG_NSH_ARCHINIT: - * Called from the NSH library - * ****************************************************************************/ int stm32_bringup(void); diff --git a/boards/arm/stm32h7/portenta-h7/src/stm32_appinitialize.c b/boards/arm/stm32h7/portenta-h7/src/stm32_appinitialize.c deleted file mode 100644 index 05fc9961493cf..0000000000000 --- a/boards/arm/stm32h7/portenta-h7/src/stm32_appinitialize.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32h7/portenta-h7/src/stm32_appinitialize.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 - -#include -#include - -#include "portenta-h7.h" - -/**************************************************************************** - * 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 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 stm32_bringup(); -#endif -} diff --git a/boards/arm/stm32h7/portenta-h7/src/stm32_bringup.c b/boards/arm/stm32h7/portenta-h7/src/stm32_bringup.c index a2aefc772e2a4..a61fab1bb6488 100644 --- a/boards/arm/stm32h7/portenta-h7/src/stm32_bringup.c +++ b/boards/arm/stm32h7/portenta-h7/src/stm32_bringup.c @@ -113,10 +113,6 @@ static void stm32_i2ctool(void) * CONFIG_BOARD_LATE_INITIALIZE=y : * Called from board_late_initialize(). * - * CONFIG_BOARD_LATE_INITIALIZE=n && CONFIG_BOARDCTL=y && - * CONFIG_NSH_ARCHINIT: - * Called from the NSH library - * ****************************************************************************/ int stm32_bringup(void) diff --git a/boards/arm/stm32h7/stm32h745i-disco/configs/lvgl/defconfig b/boards/arm/stm32h7/stm32h745i-disco/configs/lvgl/defconfig index f4c765b1ecd5b..5690c750d3736 100644 --- a/boards/arm/stm32h7/stm32h745i-disco/configs/lvgl/defconfig +++ b/boards/arm/stm32h7/stm32h745i-disco/configs/lvgl/defconfig @@ -49,7 +49,6 @@ CONFIG_LV_USE_LOG=y CONFIG_LV_USE_NUTTX=y CONFIG_LV_USE_NUTTX_TOUCHSCREEN=y CONFIG_MQ_MAXMSGSIZE=256 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32h7/stm32h745i-disco/configs/netnsh/defconfig b/boards/arm/stm32h7/stm32h745i-disco/configs/netnsh/defconfig index ae359de9c54fe..a8fe4e516efa7 100644 --- a/boards/arm/stm32h7/stm32h745i-disco/configs/netnsh/defconfig +++ b/boards/arm/stm32h7/stm32h745i-disco/configs/netnsh/defconfig @@ -49,7 +49,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32h7/stm32h745i-disco/configs/nsh_cm4_rptun/defconfig b/boards/arm/stm32h7/stm32h745i-disco/configs/nsh_cm4_rptun/defconfig index c6838ca8f0a2c..d3dd2789880b0 100644 --- a/boards/arm/stm32h7/stm32h745i-disco/configs/nsh_cm4_rptun/defconfig +++ b/boards/arm/stm32h7/stm32h745i-disco/configs/nsh_cm4_rptun/defconfig @@ -26,7 +26,6 @@ CONFIG_HAVE_CXXINITIALIZE=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_PROMPT_STRING="nsh-cm4> " diff --git a/boards/arm/stm32h7/stm32h745i-disco/configs/nsh_cm7_rptun/defconfig b/boards/arm/stm32h7/stm32h745i-disco/configs/nsh_cm7_rptun/defconfig index 77ba8828fe440..52f90e5c3f8c3 100644 --- a/boards/arm/stm32h7/stm32h745i-disco/configs/nsh_cm7_rptun/defconfig +++ b/boards/arm/stm32h7/stm32h745i-disco/configs/nsh_cm7_rptun/defconfig @@ -31,7 +31,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=4 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_PROMPT_STRING="nsh-cm7> " diff --git a/boards/arm/stm32h7/stm32h745i-disco/configs/touchtest/defconfig b/boards/arm/stm32h7/stm32h745i-disco/configs/touchtest/defconfig index be4bfd82240c4..d187e442ce272 100644 --- a/boards/arm/stm32h7/stm32h745i-disco/configs/touchtest/defconfig +++ b/boards/arm/stm32h7/stm32h745i-disco/configs/touchtest/defconfig @@ -37,7 +37,6 @@ CONFIG_IOB_NCHAINS=24 CONFIG_LINE_MAX=64 CONFIG_MM_IOB=y CONFIG_MM_REGIONS=4 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32h7/stm32h745i-disco/src/CMakeLists.txt b/boards/arm/stm32h7/stm32h745i-disco/src/CMakeLists.txt index 0c77b55a62c99..424170bc1a1db 100644 --- a/boards/arm/stm32h7/stm32h745i-disco/src/CMakeLists.txt +++ b/boards/arm/stm32h7/stm32h745i-disco/src/CMakeLists.txt @@ -32,10 +32,6 @@ if(CONFIG_STM32H7_OTGFS) list(APPEND SRCS stm32_usb.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinitialize.c) -endif() - if(CONFIG_TESTING_OSTEST) list(APPEND SRCS stm32_ostest.c) endif() diff --git a/boards/arm/stm32h7/stm32h745i-disco/src/Makefile b/boards/arm/stm32h7/stm32h745i-disco/src/Makefile index 253e470ef46c5..59db9b7cd6a76 100644 --- a/boards/arm/stm32h7/stm32h745i-disco/src/Makefile +++ b/boards/arm/stm32h7/stm32h745i-disco/src/Makefile @@ -34,10 +34,6 @@ ifeq ($(CONFIG_STM32H7_OTGFS),y) CSRCS += stm32_usb.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinitialize.c -endif - ifeq ($(CONFIG_TESTING_OSTEST),y) CSRCS += stm32_ostest.c endif diff --git a/boards/arm/stm32h7/stm32h745i-disco/src/stm32_appinitialize.c b/boards/arm/stm32h7/stm32h745i-disco/src/stm32_appinitialize.c deleted file mode 100644 index d09861fbea9b5..0000000000000 --- a/boards/arm/stm32h7/stm32h745i-disco/src/stm32_appinitialize.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32h7/stm32h745i-disco/src/stm32_appinitialize.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 - -#include -#include - -#include "stm32h745i_disco.h" - -/**************************************************************************** - * 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 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 stm32_bringup(); -#endif -} diff --git a/boards/arm/stm32h7/stm32h745i-disco/src/stm32_bringup.c b/boards/arm/stm32h7/stm32h745i-disco/src/stm32_bringup.c index 7b73a4e0b87e4..5af6ac7f31f97 100644 --- a/boards/arm/stm32h7/stm32h745i-disco/src/stm32_bringup.c +++ b/boards/arm/stm32h7/stm32h745i-disco/src/stm32_bringup.c @@ -115,10 +115,6 @@ void rpmsg_serialinit(void) * CONFIG_BOARD_LATE_INITIALIZE=y : * Called from board_late_initialize(). * - * CONFIG_BOARD_LATE_INITIALIZE=n && CONFIG_BOARDCTL=y && - * CONFIG_NSH_ARCHINIT: - * Called from the NSH library - * ****************************************************************************/ int stm32_bringup(void) diff --git a/boards/arm/stm32h7/stm32h747i-disco/src/CMakeLists.txt b/boards/arm/stm32h7/stm32h747i-disco/src/CMakeLists.txt index 2e7b06e34eb8c..2aff1364c448c 100644 --- a/boards/arm/stm32h7/stm32h747i-disco/src/CMakeLists.txt +++ b/boards/arm/stm32h7/stm32h747i-disco/src/CMakeLists.txt @@ -48,10 +48,6 @@ if(CONFIG_BOARDCTL_UNIQUEID) list(APPEND SRCS stm32_uid.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinitialize.c) -endif() - if(CONFIG_STM32H7_SDMMC) list(APPEND SRCS stm32_sdmmc.c) endif() @@ -68,5 +64,5 @@ if(NOT CONFIG_BUILD_FLAT) add_subdirectory(${NUTTX_BOARD_DIR}/kernel) set_property( GLOBAL PROPERTY LD_SCRIPT_USER ${NUTTX_BOARD_DIR}/scripts/memory.ld - ${NUTTX_BOARD_DIR}/scripts/user-space.ld) + ${NUTTX_BOARD_DIR}/scripts/user-space.ld) endif() diff --git a/boards/arm/stm32h7/stm32h747i-disco/src/Makefile b/boards/arm/stm32h7/stm32h747i-disco/src/Makefile index d3428220c8b04..788e0f0d91f20 100644 --- a/boards/arm/stm32h7/stm32h747i-disco/src/Makefile +++ b/boards/arm/stm32h7/stm32h747i-disco/src/Makefile @@ -50,10 +50,6 @@ ifeq ($(CONFIG_BOARDCTL_UNIQUEID),y) CSRCS += stm32_uid.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinitialize.c -endif - ifeq ($(CONFIG_STM32H7_SDMMC),y) CSRCS += stm32_sdmmc.c endif diff --git a/boards/arm/stm32h7/stm32h747i-disco/src/stm32_appinitialize.c b/boards/arm/stm32h7/stm32h747i-disco/src/stm32_appinitialize.c deleted file mode 100644 index 19e9911490de7..0000000000000 --- a/boards/arm/stm32h7/stm32h747i-disco/src/stm32_appinitialize.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32h7/stm32h747i-disco/src/stm32_appinitialize.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 - -#include -#include - -#include "stm32h747i-disco.h" - -/**************************************************************************** - * 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 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 stm32_bringup(); -#endif -} diff --git a/boards/arm/stm32h7/stm32h747i-disco/src/stm32_bringup.c b/boards/arm/stm32h7/stm32h747i-disco/src/stm32_bringup.c index 8c52d89d0cf79..84e93d0e9977b 100644 --- a/boards/arm/stm32h7/stm32h747i-disco/src/stm32_bringup.c +++ b/boards/arm/stm32h7/stm32h747i-disco/src/stm32_bringup.c @@ -118,10 +118,6 @@ static void stm32_i2ctool(void) * CONFIG_BOARD_LATE_INITIALIZE=y : * Called from board_late_initialize(). * - * CONFIG_BOARD_LATE_INITIALIZE=n && CONFIG_BOARDCTL=y && - * CONFIG_NSH_ARCHINIT: - * Called from the NSH library - * ****************************************************************************/ int stm32_bringup(void) diff --git a/boards/arm/stm32h7/stm32h747i-disco/src/stm32h747i-disco.h b/boards/arm/stm32h7/stm32h747i-disco/src/stm32h747i-disco.h index eb6159ec7d00b..c53bb6f8a765e 100644 --- a/boards/arm/stm32h7/stm32h747i-disco/src/stm32h747i-disco.h +++ b/boards/arm/stm32h7/stm32h747i-disco/src/stm32h747i-disco.h @@ -117,10 +117,6 @@ * CONFIG_BOARD_LATE_INITIALIZE=y : * Called from board_late_initialize(). * - * CONFIG_BOARD_LATE_INITIALIZE=n && CONFIG_BOARDCTL=y && - * CONFIG_NSH_ARCHINIT: - * Called from the NSH library - * ****************************************************************************/ int stm32_bringup(void); diff --git a/boards/arm/stm32h7/stm32h750b-dk/configs/lvgl/defconfig b/boards/arm/stm32h7/stm32h750b-dk/configs/lvgl/defconfig index 0682135b137b1..f4913aa50bb86 100644 --- a/boards/arm/stm32h7/stm32h750b-dk/configs/lvgl/defconfig +++ b/boards/arm/stm32h7/stm32h750b-dk/configs/lvgl/defconfig @@ -51,7 +51,6 @@ CONFIG_LV_USE_NUTTX_TOUCHSCREEN=y CONFIG_MM_HEAP_MEMPOOL_THRESHOLD=0 CONFIG_MM_REGIONS=6 CONFIG_MQ_MAXMSGSIZE=256 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32h7/stm32h750b-dk/src/CMakeLists.txt b/boards/arm/stm32h7/stm32h750b-dk/src/CMakeLists.txt index fde7f720d2785..d89067b817f11 100644 --- a/boards/arm/stm32h7/stm32h750b-dk/src/CMakeLists.txt +++ b/boards/arm/stm32h7/stm32h750b-dk/src/CMakeLists.txt @@ -30,10 +30,6 @@ if(CONFIG_STM32H7_OTGFS) list(APPEND SRCS stm32_usb.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinitialize.c) -endif() - if(CONFIG_TESTING_OSTEST) list(APPEND SRCS stm32_ostest.c) endif() diff --git a/boards/arm/stm32h7/stm32h750b-dk/src/Makefile b/boards/arm/stm32h7/stm32h750b-dk/src/Makefile index a0a30c67a8263..7dec83d2100fc 100644 --- a/boards/arm/stm32h7/stm32h750b-dk/src/Makefile +++ b/boards/arm/stm32h7/stm32h750b-dk/src/Makefile @@ -32,10 +32,6 @@ ifeq ($(CONFIG_STM32H7_OTGFS),y) CSRCS += stm32_usb.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinitialize.c -endif - ifeq ($(CONFIG_TESTING_OSTEST),y) CSRCS += stm32_ostest.c endif @@ -52,4 +48,4 @@ ifeq ($(CONFIG_STM32H7_LTDC),y) CSRCS += stm32_lcd.c endif -include $(TOPDIR)/boards/Board.mk \ No newline at end of file +include $(TOPDIR)/boards/Board.mk diff --git a/boards/arm/stm32h7/stm32h750b-dk/src/stm32_appinitialize.c b/boards/arm/stm32h7/stm32h750b-dk/src/stm32_appinitialize.c deleted file mode 100644 index 856fbded41803..0000000000000 --- a/boards/arm/stm32h7/stm32h750b-dk/src/stm32_appinitialize.c +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32h7/stm32h750b-dk/src/stm32_appinitialize.c - * - * 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 - -#include -#include - -#include "stm32h750b-dk.h" - -/**************************************************************************** - * 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 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 stm32_bringup(); -#endif -} diff --git a/boards/arm/stm32h7/stm32h750b-dk/src/stm32_bringup.c b/boards/arm/stm32h7/stm32h750b-dk/src/stm32_bringup.c index cb37f043e36f3..a7200dffe19a8 100644 --- a/boards/arm/stm32h7/stm32h750b-dk/src/stm32_bringup.c +++ b/boards/arm/stm32h7/stm32h750b-dk/src/stm32_bringup.c @@ -113,10 +113,6 @@ void rpmsg_serialinit(void) * CONFIG_BOARD_LATE_INITIALIZE=y : * Called from board_late_initialize(). * - * CONFIG_BOARD_LATE_INITIALIZE=n && CONFIG_BOARDCTL=y && - * CONFIG_NSH_ARCHINIT: - * Called from the NSH library - * ****************************************************************************/ int stm32_bringup(void) diff --git a/boards/arm/stm32h7/weact-stm32h743/configs/sdcard/defconfig b/boards/arm/stm32h7/weact-stm32h743/configs/sdcard/defconfig index 72b1e14147f72..bb9f06926d9f7 100644 --- a/boards/arm/stm32h7/weact-stm32h743/configs/sdcard/defconfig +++ b/boards/arm/stm32h7/weact-stm32h743/configs/sdcard/defconfig @@ -40,7 +40,6 @@ CONFIG_MMCSD=y CONFIG_MMCSD_SDIO=y CONFIG_MMCSD_SDIOWAIT_WRCOMPLETE=y CONFIG_MM_REGIONS=4 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32h7/weact-stm32h743/configs/st7735/defconfig b/boards/arm/stm32h7/weact-stm32h743/configs/st7735/defconfig index dd05c04db5154..5aedb0aeceee3 100644 --- a/boards/arm/stm32h7/weact-stm32h743/configs/st7735/defconfig +++ b/boards/arm/stm32h7/weact-stm32h743/configs/st7735/defconfig @@ -42,7 +42,6 @@ CONFIG_LCD_ST7735_XRES=80 CONFIG_LCD_ST7735_YOFFSET=1 CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=4 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32h7/weact-stm32h743/src/CMakeLists.txt b/boards/arm/stm32h7/weact-stm32h743/src/CMakeLists.txt index ee8fb5bff0b76..af3c82ac515ef 100644 --- a/boards/arm/stm32h7/weact-stm32h743/src/CMakeLists.txt +++ b/boards/arm/stm32h7/weact-stm32h743/src/CMakeLists.txt @@ -42,10 +42,6 @@ if(CONFIG_FAT_DMAMEMORY) list(APPEND SRCS stm32_dma_alloc.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinitialize.c) -endif() - target_sources(board PRIVATE ${SRCS}) if(NOT CONFIG_BUILD_FLAT) diff --git a/boards/arm/stm32h7/weact-stm32h743/src/Makefile b/boards/arm/stm32h7/weact-stm32h743/src/Makefile index 252922dff7a5c..3d686ef415e02 100644 --- a/boards/arm/stm32h7/weact-stm32h743/src/Makefile +++ b/boards/arm/stm32h7/weact-stm32h743/src/Makefile @@ -44,8 +44,4 @@ ifeq ($(CONFIG_FAT_DMAMEMORY),y) CSRCS += stm32_dma_alloc.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinitialize.c -endif - include $(TOPDIR)/boards/Board.mk diff --git a/boards/arm/stm32h7/weact-stm32h743/src/stm32_appinitialize.c b/boards/arm/stm32h7/weact-stm32h743/src/stm32_appinitialize.c deleted file mode 100644 index f0d4608860616..0000000000000 --- a/boards/arm/stm32h7/weact-stm32h743/src/stm32_appinitialize.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32h7/weact-stm32h743/src/stm32_appinitialize.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 - -#include -#include - -#include "weact-stm32h743.h" - -/**************************************************************************** - * 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 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 stm32_bringup(); -#endif -} diff --git a/boards/arm/stm32h7/weact-stm32h743/src/stm32_bringup.c b/boards/arm/stm32h7/weact-stm32h743/src/stm32_bringup.c index e9335b3406f31..a69d806e8bfa4 100644 --- a/boards/arm/stm32h7/weact-stm32h743/src/stm32_bringup.c +++ b/boards/arm/stm32h7/weact-stm32h743/src/stm32_bringup.c @@ -59,10 +59,6 @@ * CONFIG_BOARD_LATE_INITIALIZE=y : * Called from board_late_initialize(). * - * CONFIG_BOARD_LATE_INITIALIZE=n && CONFIG_BOARDCTL=y && - * CONFIG_NSH_ARCHINIT: - * Called from the NSH library - * ****************************************************************************/ int stm32_bringup(void) diff --git a/boards/arm/stm32h7/weact-stm32h743/src/weact-stm32h743.h b/boards/arm/stm32h7/weact-stm32h743/src/weact-stm32h743.h index 0d39b8f52bbd9..34f91044d7ec8 100644 --- a/boards/arm/stm32h7/weact-stm32h743/src/weact-stm32h743.h +++ b/boards/arm/stm32h7/weact-stm32h743/src/weact-stm32h743.h @@ -168,10 +168,6 @@ void weak_function stm32_spidev_initialize(void); * CONFIG_BOARD_LATE_INITIALIZE=y : * Called from board_late_initialize(). * - * CONFIG_BOARD_LATE_INITIALIZE=n && CONFIG_BOARDCTL=y && - * CONFIG_NSH_ARCHINIT: - * Called from the NSH library - * ****************************************************************************/ int stm32_bringup(void); diff --git a/boards/arm/stm32h7/weact-stm32h750/configs/sdcard/defconfig b/boards/arm/stm32h7/weact-stm32h750/configs/sdcard/defconfig index 772a28f45f4a2..d1fa7662bd6d8 100644 --- a/boards/arm/stm32h7/weact-stm32h750/configs/sdcard/defconfig +++ b/boards/arm/stm32h7/weact-stm32h750/configs/sdcard/defconfig @@ -41,7 +41,6 @@ CONFIG_MMCSD=y CONFIG_MMCSD_SDIO=y CONFIG_MMCSD_SDIOWAIT_WRCOMPLETE=y CONFIG_MM_REGIONS=4 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32h7/weact-stm32h750/configs/st7735/defconfig b/boards/arm/stm32h7/weact-stm32h750/configs/st7735/defconfig index 275491db1fdaf..5098495e7f2a6 100644 --- a/boards/arm/stm32h7/weact-stm32h750/configs/st7735/defconfig +++ b/boards/arm/stm32h7/weact-stm32h750/configs/st7735/defconfig @@ -43,7 +43,6 @@ CONFIG_LCD_ST7735_XRES=80 CONFIG_LCD_ST7735_YOFFSET=1 CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=4 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32h7/weact-stm32h750/src/CMakeLists.txt b/boards/arm/stm32h7/weact-stm32h750/src/CMakeLists.txt index 01b06b6e7cbfc..6c5220cccc2ab 100644 --- a/boards/arm/stm32h7/weact-stm32h750/src/CMakeLists.txt +++ b/boards/arm/stm32h7/weact-stm32h750/src/CMakeLists.txt @@ -50,11 +50,8 @@ if(CONFIG_FAT_DMAMEMORY) list(APPEND SRCS stm32_dma_alloc.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinitialize.c) - if(CONFIG_BOARDCTL_IOCTL) - list(APPEND SRCS stm32_ioctl.c) - endif() +if(CONFIG_BOARDCTL_IOCTL) + list(APPEND SRCS stm32_ioctl.c) endif() target_sources(board PRIVATE ${SRCS}) diff --git a/boards/arm/stm32h7/weact-stm32h750/src/Makefile b/boards/arm/stm32h7/weact-stm32h750/src/Makefile index c186c90a78124..80033455ab338 100644 --- a/boards/arm/stm32h7/weact-stm32h750/src/Makefile +++ b/boards/arm/stm32h7/weact-stm32h750/src/Makefile @@ -44,8 +44,4 @@ ifeq ($(CONFIG_FAT_DMAMEMORY),y) CSRCS += stm32_dma_alloc.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinitialize.c -endif - include $(TOPDIR)/boards/Board.mk diff --git a/boards/arm/stm32h7/weact-stm32h750/src/stm32_appinitialize.c b/boards/arm/stm32h7/weact-stm32h750/src/stm32_appinitialize.c deleted file mode 100644 index abab7c528e414..0000000000000 --- a/boards/arm/stm32h7/weact-stm32h750/src/stm32_appinitialize.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32h7/weact-stm32h750/src/stm32_appinitialize.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 - -#include -#include - -#include "weact-stm32h750.h" - -/**************************************************************************** - * 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 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 stm32_bringup(); -#endif -} diff --git a/boards/arm/stm32h7/weact-stm32h750/src/stm32_bringup.c b/boards/arm/stm32h7/weact-stm32h750/src/stm32_bringup.c index a3235d8a6b4fd..a2fe0030fe4b8 100644 --- a/boards/arm/stm32h7/weact-stm32h750/src/stm32_bringup.c +++ b/boards/arm/stm32h7/weact-stm32h750/src/stm32_bringup.c @@ -59,10 +59,6 @@ * CONFIG_BOARD_LATE_INITIALIZE=y : * Called from board_late_initialize(). * - * CONFIG_BOARD_LATE_INITIALIZE=n && CONFIG_BOARDCTL=y && - * CONFIG_NSH_ARCHINIT: - * Called from the NSH library - * ****************************************************************************/ int stm32_bringup(void) diff --git a/boards/arm/stm32h7/weact-stm32h750/src/weact-stm32h750.h b/boards/arm/stm32h7/weact-stm32h750/src/weact-stm32h750.h index d32a4d692130b..ecf03db790700 100644 --- a/boards/arm/stm32h7/weact-stm32h750/src/weact-stm32h750.h +++ b/boards/arm/stm32h7/weact-stm32h750/src/weact-stm32h750.h @@ -168,10 +168,6 @@ void weak_function stm32_spidev_initialize(void); * CONFIG_BOARD_LATE_INITIALIZE=y : * Called from board_late_initialize(). * - * CONFIG_BOARD_LATE_INITIALIZE=n && CONFIG_BOARDCTL=y && - * CONFIG_NSH_ARCHINIT: - * Called from the NSH library - * ****************************************************************************/ int stm32_bringup(void); diff --git a/boards/arm/stm32l4/b-l475e-iot01a/configs/nsh/defconfig b/boards/arm/stm32l4/b-l475e-iot01a/configs/nsh/defconfig index 26fa3e51a556a..7fbc7b18e1f88 100644 --- a/boards/arm/stm32l4/b-l475e-iot01a/configs/nsh/defconfig +++ b/boards/arm/stm32l4/b-l475e-iot01a/configs/nsh/defconfig @@ -27,7 +27,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MTD_SMART_SECTOR_SIZE=512 CONFIG_MX25RXX_SECTOR512=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_LOSMART=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32l4/b-l475e-iot01a/configs/spirit-6lowpan/defconfig b/boards/arm/stm32l4/b-l475e-iot01a/configs/spirit-6lowpan/defconfig index 82197acd69b16..180321aac4b50 100644 --- a/boards/arm/stm32l4/b-l475e-iot01a/configs/spirit-6lowpan/defconfig +++ b/boards/arm/stm32l4/b-l475e-iot01a/configs/spirit-6lowpan/defconfig @@ -63,7 +63,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_GET=y CONFIG_NSH_DISABLE_PUT=y diff --git a/boards/arm/stm32l4/b-l475e-iot01a/configs/spirit-starhub/defconfig b/boards/arm/stm32l4/b-l475e-iot01a/configs/spirit-starhub/defconfig index 162aaa9a2abee..63f9c072fd5c6 100644 --- a/boards/arm/stm32l4/b-l475e-iot01a/configs/spirit-starhub/defconfig +++ b/boards/arm/stm32l4/b-l475e-iot01a/configs/spirit-starhub/defconfig @@ -54,7 +54,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_GET=y CONFIG_NSH_DISABLE_PUT=y diff --git a/boards/arm/stm32l4/b-l475e-iot01a/configs/spirit-starpoint/defconfig b/boards/arm/stm32l4/b-l475e-iot01a/configs/spirit-starpoint/defconfig index 8b073a5b81d57..fd31a0624c1b8 100644 --- a/boards/arm/stm32l4/b-l475e-iot01a/configs/spirit-starpoint/defconfig +++ b/boards/arm/stm32l4/b-l475e-iot01a/configs/spirit-starpoint/defconfig @@ -65,7 +65,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_GET=y CONFIG_NSH_DISABLE_PUT=y diff --git a/boards/arm/stm32l4/b-l475e-iot01a/src/CMakeLists.txt b/boards/arm/stm32l4/b-l475e-iot01a/src/CMakeLists.txt index ac7a4dfa8abbb..7d6ffd6d70384 100644 --- a/boards/arm/stm32l4/b-l475e-iot01a/src/CMakeLists.txt +++ b/boards/arm/stm32l4/b-l475e-iot01a/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS stm32_boot.c stm32_bringup.c stm32_spi.c stm32_timer.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - if(CONFIG_ARCH_LEDS) list(APPEND SRCS stm32_autoleds.c) else() diff --git a/boards/arm/stm32l4/b-l475e-iot01a/src/Makefile b/boards/arm/stm32l4/b-l475e-iot01a/src/Makefile index d7c64d18693e2..4b6dba43ad15b 100644 --- a/boards/arm/stm32l4/b-l475e-iot01a/src/Makefile +++ b/boards/arm/stm32l4/b-l475e-iot01a/src/Makefile @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = stm32_boot.c stm32_bringup.c stm32_spi.c stm32_timer.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += stm32_autoleds.c else diff --git a/boards/arm/stm32l4/b-l475e-iot01a/src/b-l475e-iot01a.h b/boards/arm/stm32l4/b-l475e-iot01a/src/b-l475e-iot01a.h index 4f359aab3fc90..831f891cc5ae0 100644 --- a/boards/arm/stm32l4/b-l475e-iot01a/src/b-l475e-iot01a.h +++ b/boards/arm/stm32l4/b-l475e-iot01a/src/b-l475e-iot01a.h @@ -136,10 +136,8 @@ * Name: stm32l4_bringup * * Description: - * Called either by board_initialize() if CONFIG_BOARD_LATE_INITIALIZE or - * by board_app_initialize if CONFIG_BOARDCTL is selected. This - * function initializes and configures all on-board features appropriate - * for the selected configuration. + * This function initializes and configures all on-board features + * appropriate for the selected configuration. * ****************************************************************************/ diff --git a/boards/arm/stm32l4/b-l475e-iot01a/src/stm32_appinit.c b/boards/arm/stm32l4/b-l475e-iot01a/src/stm32_appinit.c deleted file mode 100644 index b54e5be1b5a75..0000000000000 --- a/boards/arm/stm32l4/b-l475e-iot01a/src/stm32_appinit.c +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32l4/b-l475e-iot01a/src/stm32_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 - -#include - -#include - -#include "b-l475e-iot01a.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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 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) -{ -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board initialization */ - - return stm32l4_bringup(); -#else - return OK; -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/arm/stm32l4/b-l475e-iot01a/src/stm32_bringup.c b/boards/arm/stm32l4/b-l475e-iot01a/src/stm32_bringup.c index 8d635addb1426..cdbb58f24fbeb 100644 --- a/boards/arm/stm32l4/b-l475e-iot01a/src/stm32_bringup.c +++ b/boards/arm/stm32l4/b-l475e-iot01a/src/stm32_bringup.c @@ -52,10 +52,8 @@ * Name: stm32l4_bringup * * Description: - * Called either by board_initialize() if CONFIG_BOARD_LATE_INITIALIZE or - * by board_app_initialize if CONFIG_BOARDCTL is selected. This - * function initializes and configures all on-board features appropriate - * for the selected configuration. + * This function initializes and configures all on-board features + * appropriate for the selected configuration. * ****************************************************************************/ diff --git a/boards/arm/stm32l4/nucleo-l432kc/configs/nsh/defconfig b/boards/arm/stm32l4/nucleo-l432kc/configs/nsh/defconfig index ead3562c0b895..a897ae2145b2c 100644 --- a/boards/arm/stm32l4/nucleo-l432kc/configs/nsh/defconfig +++ b/boards/arm/stm32l4/nucleo-l432kc/configs/nsh/defconfig @@ -29,7 +29,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32l4/nucleo-l432kc/configs/wgen/defconfig b/boards/arm/stm32l4/nucleo-l432kc/configs/wgen/defconfig index 564109a85f22d..433b98f9aab67 100644 --- a/boards/arm/stm32l4/nucleo-l432kc/configs/wgen/defconfig +++ b/boards/arm/stm32l4/nucleo-l432kc/configs/wgen/defconfig @@ -31,7 +31,6 @@ CONFIG_INIT_ENTRYPOINT="dac_wgen_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32l4/nucleo-l432kc/src/CMakeLists.txt b/boards/arm/stm32l4/nucleo-l432kc/src/CMakeLists.txt index 988c57acf4d97..4a419a020455d 100644 --- a/boards/arm/stm32l4/nucleo-l432kc/src/CMakeLists.txt +++ b/boards/arm/stm32l4/nucleo-l432kc/src/CMakeLists.txt @@ -76,11 +76,8 @@ if(CONFIG_TIMER) list(APPEND SRCS stm32_timer.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) - if(CONFIG_BOARDCTL_IOCTL) - list(APPEND SRCS stm32_ioctl.c) - endif() +if(CONFIG_BOARDCTL_IOCTL) + list(APPEND SRCS stm32_ioctl.c) endif() if(CONFIG_BOARDCTL_UNIQUEID) diff --git a/boards/arm/stm32l4/nucleo-l432kc/src/Makefile b/boards/arm/stm32l4/nucleo-l432kc/src/Makefile index 0571726b0453c..10e16a6729f53 100644 --- a/boards/arm/stm32l4/nucleo-l432kc/src/Makefile +++ b/boards/arm/stm32l4/nucleo-l432kc/src/Makefile @@ -78,12 +78,9 @@ ifeq ($(CONFIG_TIMER),y) CSRCS += stm32_timer.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c ifeq ($(CONFIG_BOARDCTL_IOCTL),y) CSRCS += stm32_ioctl.c endif -endif ifeq ($(CONFIG_BOARDCTL_UNIQUEID),y) CSRCS += stm32_uid.c diff --git a/boards/arm/stm32l4/nucleo-l432kc/src/stm32_appinit.c b/boards/arm/stm32l4/nucleo-l432kc/src/stm32_appinit.c deleted file mode 100644 index 45b16776e16de..0000000000000 --- a/boards/arm/stm32l4/nucleo-l432kc/src/stm32_appinit.c +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32l4/nucleo-l432kc/src/stm32_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 - -#include -#include - -#include "nucleo-l432kc.h" - -/**************************************************************************** - * 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 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) -{ - /* Did we already initialize via board_late_initialize()? */ - -#ifndef CONFIG_BOARD_LATE_INITIALIZE - return stm32_bringup(); -#else - return OK; -#endif -} diff --git a/boards/arm/stm32l4/nucleo-l432kc/src/stm32_boot.c b/boards/arm/stm32l4/nucleo-l432kc/src/stm32_boot.c index 3f6cb99ecf88d..1241ab202ffcd 100644 --- a/boards/arm/stm32l4/nucleo-l432kc/src/stm32_boot.c +++ b/boards/arm/stm32l4/nucleo-l432kc/src/stm32_boot.c @@ -103,13 +103,6 @@ void stm32l4_board_initialize(void) #ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { - /* Perform NSH initialization here instead of from the NSH. This - * alternative NSH initialization is necessary when NSH is ran in - * user-space but the initialization function must run in kernel space. - */ - -#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_NSH_ARCHINIT) - board_app_initialize(0); -#endif + stm32_bringup(); } #endif diff --git a/boards/arm/stm32l4/nucleo-l432kc/src/stm32_bringup.c b/boards/arm/stm32l4/nucleo-l432kc/src/stm32_bringup.c index d3836b439d50d..0898bcad05435 100644 --- a/boards/arm/stm32l4/nucleo-l432kc/src/stm32_bringup.c +++ b/boards/arm/stm32l4/nucleo-l432kc/src/stm32_bringup.c @@ -196,8 +196,7 @@ int stm32_bringup(void) #ifdef CONFIG_SPI_DRIVER stm32l4_spiregister(); - /* driver registering must be processed in appinit. - * If called it during board_init, + /* If called it during board_init, * registering failed due to heap doesn't be initialized yet. */ #endif diff --git a/boards/arm/stm32l4/nucleo-l452re/configs/nsh/defconfig b/boards/arm/stm32l4/nucleo-l452re/configs/nsh/defconfig index 6f70c55ffef2f..98f401ba27ac3 100644 --- a/boards/arm/stm32l4/nucleo-l452re/configs/nsh/defconfig +++ b/boards/arm/stm32l4/nucleo-l452re/configs/nsh/defconfig @@ -37,7 +37,6 @@ CONFIG_I2C_RESET=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32l4/nucleo-l452re/src/CMakeLists.txt b/boards/arm/stm32l4/nucleo-l452re/src/CMakeLists.txt index 8e9e677d887df..5695d928b1cd4 100644 --- a/boards/arm/stm32l4/nucleo-l452re/src/CMakeLists.txt +++ b/boards/arm/stm32l4/nucleo-l452re/src/CMakeLists.txt @@ -40,10 +40,6 @@ if(CONFIG_DAC) list(APPEND SRCS stm32_dac.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - target_sources(board PRIVATE ${SRCS}) set_property(GLOBAL PROPERTY LD_SCRIPT diff --git a/boards/arm/stm32l4/nucleo-l452re/src/Makefile b/boards/arm/stm32l4/nucleo-l452re/src/Makefile index 12025a9676032..4c04979e48a7b 100644 --- a/boards/arm/stm32l4/nucleo-l452re/src/Makefile +++ b/boards/arm/stm32l4/nucleo-l452re/src/Makefile @@ -42,8 +42,4 @@ ifeq ($(CONFIG_DAC),y) CSRCS += stm32_dac.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - include $(TOPDIR)/boards/Board.mk diff --git a/boards/arm/stm32l4/nucleo-l452re/src/stm32_appinit.c b/boards/arm/stm32l4/nucleo-l452re/src/stm32_appinit.c deleted file mode 100644 index 5c154629c6d1f..0000000000000 --- a/boards/arm/stm32l4/nucleo-l452re/src/stm32_appinit.c +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32l4/nucleo-l452re/src/stm32_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 - -#include - -#include "nucleo-l452re.h" - -#include - -/**************************************************************************** - * 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 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) -{ - /* Did we already initialize via board_late_initialize()? */ - -#ifndef CONFIG_BOARD_LATE_INITIALIZE - return stm32_bringup(); -#else - return OK; -#endif -} diff --git a/boards/arm/stm32l4/nucleo-l476rg/configs/nsh/defconfig b/boards/arm/stm32l4/nucleo-l476rg/configs/nsh/defconfig index 33959cdd37683..4850d96906598 100644 --- a/boards/arm/stm32l4/nucleo-l476rg/configs/nsh/defconfig +++ b/boards/arm/stm32l4/nucleo-l476rg/configs/nsh/defconfig @@ -29,7 +29,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32l4/nucleo-l476rg/configs/nxdemo/defconfig b/boards/arm/stm32l4/nucleo-l476rg/configs/nxdemo/defconfig index 4ed3063db285f..648c01ff163cf 100644 --- a/boards/arm/stm32l4/nucleo-l476rg/configs/nxdemo/defconfig +++ b/boards/arm/stm32l4/nucleo-l476rg/configs/nxdemo/defconfig @@ -34,7 +34,6 @@ CONFIG_LCD_PCD8544=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 CONFIG_MQ_MAXMSGSIZE=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32l4/nucleo-l476rg/src/CMakeLists.txt b/boards/arm/stm32l4/nucleo-l476rg/src/CMakeLists.txt index 3435d8650758b..caeda607c1d82 100644 --- a/boards/arm/stm32l4/nucleo-l476rg/src/CMakeLists.txt +++ b/boards/arm/stm32l4/nucleo-l476rg/src/CMakeLists.txt @@ -99,11 +99,8 @@ if(CONFIG_TIMER) list(APPEND SRCS stm32_timer.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) - if(CONFIG_BOARDCTL_IOCTL) - list(APPEND SRCS stm32_ioctl.c) - endif() +if(CONFIG_BOARDCTL_IOCTL) + list(APPEND SRCS stm32_ioctl.c) endif() if(CONFIG_BOARDCTL_UNIQUEID) diff --git a/boards/arm/stm32l4/nucleo-l476rg/src/Makefile b/boards/arm/stm32l4/nucleo-l476rg/src/Makefile index 92d0a381bdd57..d51f9740937ce 100644 --- a/boards/arm/stm32l4/nucleo-l476rg/src/Makefile +++ b/boards/arm/stm32l4/nucleo-l476rg/src/Makefile @@ -103,12 +103,9 @@ ifeq ($(CONFIG_TIMER),y) CSRCS += stm32_timer.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c ifeq ($(CONFIG_BOARDCTL_IOCTL),y) CSRCS += stm32_ioctl.c endif -endif ifeq ($(CONFIG_BOARDCTL_UNIQUEID),y) CSRCS += stm32_uid.c diff --git a/boards/arm/stm32l4/nucleo-l476rg/src/stm32_appinit.c b/boards/arm/stm32l4/nucleo-l476rg/src/stm32_appinit.c deleted file mode 100644 index c0dcea5d134a8..0000000000000 --- a/boards/arm/stm32l4/nucleo-l476rg/src/stm32_appinit.c +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32l4/nucleo-l476rg/src/stm32_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 - -#include -#include - -#include "nucleo-l476rg.h" - -/**************************************************************************** - * 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 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) -{ - /* Did we already initialize via board_late_initialize()? */ - -#ifndef CONFIG_BOARD_LATE_INITIALIZE - return stm32_bringup(); -#else - return OK; -#endif -} diff --git a/boards/arm/stm32l4/nucleo-l476rg/src/stm32_boot.c b/boards/arm/stm32l4/nucleo-l476rg/src/stm32_boot.c index 049faa106a8fa..4800e811aa07e 100644 --- a/boards/arm/stm32l4/nucleo-l476rg/src/stm32_boot.c +++ b/boards/arm/stm32l4/nucleo-l476rg/src/stm32_boot.c @@ -95,13 +95,6 @@ void stm32l4_board_initialize(void) #ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { - /* Perform NSH initialization here instead of from the NSH. This - * alternative NSH initialization is necessary when NSH is ran in - * user-space but the initialization function must run in kernel space. - */ - -#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_NSH_ARCHINIT) - board_app_initialize(0); -#endif + stm32_bringup(); } #endif diff --git a/boards/arm/stm32l4/nucleo-l496zg/configs/nsh/defconfig b/boards/arm/stm32l4/nucleo-l496zg/configs/nsh/defconfig index fedc6c8213672..9a6ea2b69d599 100644 --- a/boards/arm/stm32l4/nucleo-l496zg/configs/nsh/defconfig +++ b/boards/arm/stm32l4/nucleo-l496zg/configs/nsh/defconfig @@ -38,7 +38,6 @@ CONFIG_I2C_RESET=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32l4/nucleo-l496zg/src/CMakeLists.txt b/boards/arm/stm32l4/nucleo-l496zg/src/CMakeLists.txt index 32ff2a428fc3c..3e922a252e9ef 100644 --- a/boards/arm/stm32l4/nucleo-l496zg/src/CMakeLists.txt +++ b/boards/arm/stm32l4/nucleo-l496zg/src/CMakeLists.txt @@ -32,11 +32,8 @@ if(CONFIG_ARCH_BUTTONS) list(APPEND SRCS stm32_buttons.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinitialize.c) - if(CONFIG_BOARDCTL_IOCTL) - list(APPEND SRCS stm32_ioctl.c) - endif() +if(CONFIG_BOARDCTL_IOCTL) + list(APPEND SRCS stm32_ioctl.c) endif() if(CONFIG_SPI) diff --git a/boards/arm/stm32l4/nucleo-l496zg/src/Makefile b/boards/arm/stm32l4/nucleo-l496zg/src/Makefile index b14856b894e6e..5170327a0612b 100644 --- a/boards/arm/stm32l4/nucleo-l496zg/src/Makefile +++ b/boards/arm/stm32l4/nucleo-l496zg/src/Makefile @@ -34,12 +34,9 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += stm32_buttons.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinitialize.c ifeq ($(CONFIG_BOARDCTL_IOCTL),y) CSRCS += stm32_ioctl.c endif -endif ifeq ($(CONFIG_SPI),y) CSRCS += stm32_spi.c diff --git a/boards/arm/stm32l4/nucleo-l496zg/src/stm32_appinit.c b/boards/arm/stm32l4/nucleo-l496zg/src/stm32_appinit.c deleted file mode 100644 index a0d80f933c1c6..0000000000000 --- a/boards/arm/stm32l4/nucleo-l496zg/src/stm32_appinit.c +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32l4/nucleo-l496zg/src/stm32_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 - -#include -#include - -#include "nucleo-l496zg.h" - -/**************************************************************************** - * 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 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) -{ - /* Did we already initialize via board_late_initialize()? */ - -#ifndef CONFIG_BOARD_LATE_INITIALIZE - return stm32_bringup(); -#else - return OK; -#endif -} diff --git a/boards/arm/stm32l4/nucleo-l496zg/src/stm32_appinitialize.c b/boards/arm/stm32l4/nucleo-l496zg/src/stm32_appinitialize.c deleted file mode 100644 index 2ec914842333a..0000000000000 --- a/boards/arm/stm32l4/nucleo-l496zg/src/stm32_appinitialize.c +++ /dev/null @@ -1,208 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32l4/nucleo-l496zg/src/stm32_appinitialize.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 - -#include -#include -#include - -#include "nucleo-144.h" -#include -#include - -#include "stm32l4_i2c.h" - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -#if defined(CONFIG_STM32L4_I2C1) -struct i2c_master_s *i2c1; -#endif -#if defined(CONFIG_STM32L4_I2C2) -struct i2c_master_s *i2c2; -#endif -#if defined(CONFIG_STM32L4_I2C3) -struct i2c_master_s *i2c3; -#endif -#if defined(CONFIG_STM32L4_I2C4) -struct i2c_master_s *i2c4; -#endif - -/**************************************************************************** - * 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 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) -{ - int ret; - -#ifdef CONFIG_FS_PROCFS - /* Mount the procfs file system */ - - ret = nx_mount(NULL, STM32_PROCFS_MOUNTPOINT, "procfs", 0, NULL); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: Failed to mount procfs at %s: %d\n", - STM32_PROCFS_MOUNTPOINT, ret); - } -#endif - -#if !defined(CONFIG_ARCH_LEDS) && defined(CONFIG_USERLED_LOWER) - /* Register the LED driver */ - - ret = userled_lower_initialize(LED_DRIVER_PATH); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: userled_lower_initialize() failed: %d\n", ret); - } -#endif - -#ifdef CONFIG_ADC - /* Initialize ADC and register the ADC driver. */ - - ret = stm32_adc_setup(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: stm32_adc_setup failed: %d\n", ret); - } - -#ifdef CONFIG_STM32L4_DFSDM - /* Initialize DFSDM and register its filters as additional ADC devices. */ - - ret = stm32_dfsdm_setup(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: stm32_dfsdm_setup failed: %d\n", ret); - } - -#endif -#endif /* CONFIG_ADC */ - -#ifdef CONFIG_DAC - /* Initialize DAC and register the DAC driver. */ - - ret = stm32_dac_setup(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: stm32_dac_setup failed: %d\n", ret); - } -#endif - -#if defined(CONFIG_FAT_DMAMEMORY) - if (stm32_dma_alloc_init() < 0) - { - syslog(LOG_ERR, "DMA alloc FAILED"); - } -#endif - -#if defined(CONFIG_NUCLEO_SPI_TEST) - /* Create SPI interfaces */ - - ret = stm32_spidev_bus_test(); - if (ret != OK) - { - syslog(LOG_ERR, "ERROR: Failed to initialize SPI interfaces: %d\n", - ret); - return ret; - } -#endif - -#if defined(CONFIG_MMCSD) - /* Configure SDIO */ - - /* Initialize the SDIO block driver */ - - ret = stm32l4_sdio_initialize(); - if (ret != OK) - { - ferr("ERROR: Failed to initialize MMC/SD driver: %d\n", ret); - return ret; - } -#endif - -#if defined(CONFIG_I2C) - /* Configure I2C */ - - /* REVISIT: this is ugly! */ - -#if defined(CONFIG_STM32L4_I2C1) - i2c1 = stm32l4_i2cbus_initialize(1); -#endif -#if defined(CONFIG_STM32L4_I2C2) - i2c2 = stm32l4_i2cbus_initialize(2); -#endif -#if defined(CONFIG_STM32L4_I2C3) - i2c3 = stm32l4_i2cbus_initialize(3); -#endif -#if defined(CONFIG_STM32L4_I2C4) - i2c4 = stm32l4_i2cbus_initialize(4); -#endif -#ifdef CONFIG_I2C_DRIVER -#if defined(CONFIG_STM32L4_I2C1) - i2c_register(i2c1, 1); -#endif -#if defined(CONFIG_STM32L4_I2C2) - i2c_register(i2c2, 2); -#endif -#if defined(CONFIG_STM32L4_I2C3) - i2c_register(i2c3, 3); -#endif -#if defined(CONFIG_STM32L4_I2C4) - i2c_register(i2c4, 4); -#endif -#endif -#endif /* CONFIG_I2C */ - - UNUSED(ret); - return OK; -} diff --git a/boards/arm/stm32l4/nucleo-l496zg/src/stm32_boot.c b/boards/arm/stm32l4/nucleo-l496zg/src/stm32_boot.c index 6a6e88a0cc3f9..a195c97e0191e 100644 --- a/boards/arm/stm32l4/nucleo-l496zg/src/stm32_boot.c +++ b/boards/arm/stm32l4/nucleo-l496zg/src/stm32_boot.c @@ -28,12 +28,19 @@ #include +#include +#include + #include #include #include "arm_internal.h" #include "nucleo-144.h" +/**************************************************************************** + * Private Data + ****************************************************************************/ + /**************************************************************************** * Public Functions ****************************************************************************/ @@ -85,13 +92,6 @@ void stm32l4_board_initialize(void) #ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { -#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_BOARDCTL) - /* Perform NSH initialization here instead of from the NSH. This - * alternative NSH initialization is necessary when NSH is ran in - * user-space but the initialization function must run in kernel space. - */ - - board_app_initialize(0); -#endif + stm32_bringup(); } #endif diff --git a/boards/arm/stm32l4/steval-stlcs01v1/configs/lwl/defconfig b/boards/arm/stm32l4/steval-stlcs01v1/configs/lwl/defconfig index e1de412966b20..135cc3d507056 100644 --- a/boards/arm/stm32l4/steval-stlcs01v1/configs/lwl/defconfig +++ b/boards/arm/stm32l4/steval-stlcs01v1/configs/lwl/defconfig @@ -28,7 +28,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_LWL_CONSOLE=y CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32l4/steval-stlcs01v1/configs/usbnsh/defconfig b/boards/arm/stm32l4/steval-stlcs01v1/configs/usbnsh/defconfig index 25dbedca65141..8a7ad6bdecd6c 100644 --- a/boards/arm/stm32l4/steval-stlcs01v1/configs/usbnsh/defconfig +++ b/boards/arm/stm32l4/steval-stlcs01v1/configs/usbnsh/defconfig @@ -31,7 +31,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32l4/steval-stlcs01v1/src/CMakeLists.txt b/boards/arm/stm32l4/steval-stlcs01v1/src/CMakeLists.txt index 5724bb7d50f59..88aa47097ced8 100644 --- a/boards/arm/stm32l4/steval-stlcs01v1/src/CMakeLists.txt +++ b/boards/arm/stm32l4/steval-stlcs01v1/src/CMakeLists.txt @@ -26,10 +26,6 @@ if(CONFIG_ARCH_LEDS) list(APPEND SRCS stm32_autoleds.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - if(CONFIG_STM32L4_OTGFS) list(APPEND SRCS stm32_usb.c) endif() diff --git a/boards/arm/stm32l4/steval-stlcs01v1/src/Makefile b/boards/arm/stm32l4/steval-stlcs01v1/src/Makefile index 5a8566fe401f2..e46d406cb3eb9 100644 --- a/boards/arm/stm32l4/steval-stlcs01v1/src/Makefile +++ b/boards/arm/stm32l4/steval-stlcs01v1/src/Makefile @@ -28,10 +28,6 @@ ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += stm32_autoleds.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - ifeq ($(CONFIG_STM32L4_OTGFS),y) CSRCS += stm32_usb.c endif diff --git a/boards/arm/stm32l4/steval-stlcs01v1/src/steval-stlcs01v1.h b/boards/arm/stm32l4/steval-stlcs01v1/src/steval-stlcs01v1.h index b09a22bcfd9aa..b206a8d27d897 100644 --- a/boards/arm/stm32l4/steval-stlcs01v1/src/steval-stlcs01v1.h +++ b/boards/arm/stm32l4/steval-stlcs01v1/src/steval-stlcs01v1.h @@ -77,16 +77,9 @@ * Description: * Perform architecture specific initialization * - * CONFIG_BOARDCTL=y: - * If CONFIG_NSH_ARCHINITIALIZE=y: - * Called from the NSH library (or other application) - * Otherwise, assumed to be called from some other application. - * - * Otherwise CONFIG_BOARD_LATE_INITIALIZE=y: + * CONFIG_BOARD_LATE_INITIALIZE=y: * Called from board_late_initialize(). * - * Otherwise, bad news: Never called - * ****************************************************************************/ int stm32l4_bringup(void); diff --git a/boards/arm/stm32l4/steval-stlcs01v1/src/stm32_appinit.c b/boards/arm/stm32l4/steval-stlcs01v1/src/stm32_appinit.c deleted file mode 100644 index 2c0d16eac49c6..0000000000000 --- a/boards/arm/stm32l4/steval-stlcs01v1/src/stm32_appinit.c +++ /dev/null @@ -1,79 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32l4/steval-stlcs01v1/src/stm32_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 - -#include - -#include - -#include "steval-stlcs01v1.h" - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * 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 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 stm32l4_bringup(); -#endif -} diff --git a/boards/arm/stm32l4/stm32l476-mdk/configs/nsh/defconfig b/boards/arm/stm32l4/stm32l476-mdk/configs/nsh/defconfig index 94eb0e4af0919..875e7b30a1792 100644 --- a/boards/arm/stm32l4/stm32l476-mdk/configs/nsh/defconfig +++ b/boards/arm/stm32l4/stm32l476-mdk/configs/nsh/defconfig @@ -32,7 +32,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LIBM=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32l4/stm32l476-mdk/src/CMakeLists.txt b/boards/arm/stm32l4/stm32l476-mdk/src/CMakeLists.txt index 9deebb0f0b6fa..f47dc052ac4dc 100644 --- a/boards/arm/stm32l4/stm32l476-mdk/src/CMakeLists.txt +++ b/boards/arm/stm32l4/stm32l476-mdk/src/CMakeLists.txt @@ -20,7 +20,7 @@ # # ############################################################################## -set(SRCS stm32_boot.c stm32_bringup.c stm32_spi.c stm32_userleds.c) +set(SRCS stm32_boot.c stm32_spi.c stm32_userleds.c) if(CONFIG_ARCH_BOARD_STM32L4_CUSTOM_CLOCKCONFIG) list(APPEND SRCS stm32_clockconfig.c) @@ -34,10 +34,6 @@ if(CONFIG_ARCH_BUTTONS) list(APPEND SRCS stm32_buttons.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - target_sources(board PRIVATE ${SRCS}) set_property(GLOBAL PROPERTY LD_SCRIPT diff --git a/boards/arm/stm32l4/stm32l476-mdk/src/Makefile b/boards/arm/stm32l4/stm32l476-mdk/src/Makefile index f0fa7f07753bc..0aba6ed8c09d0 100644 --- a/boards/arm/stm32l4/stm32l476-mdk/src/Makefile +++ b/boards/arm/stm32l4/stm32l476-mdk/src/Makefile @@ -22,7 +22,7 @@ include $(TOPDIR)/Make.defs -CSRCS = stm32_boot.c stm32_bringup.c stm32_spi.c stm32_userleds.c +CSRCS = stm32_boot.c stm32_spi.c stm32_userleds.c ifeq ($(CONFIG_ARCH_BOARD_STM32L4_CUSTOM_CLOCKCONFIG),y) CSRCS += stm32_clockconfig.c @@ -36,8 +36,4 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += stm32_buttons.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - include $(TOPDIR)/boards/Board.mk diff --git a/boards/arm/stm32l4/stm32l476-mdk/src/stm32_appinit.c b/boards/arm/stm32l4/stm32l476-mdk/src/stm32_appinit.c deleted file mode 100644 index ab612dc79da9a..0000000000000 --- a/boards/arm/stm32l4/stm32l476-mdk/src/stm32_appinit.c +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32l4/stm32l476-mdk/src/stm32_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 - -#include - -#include "stm32l476-mdk.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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 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 stm32_bringup(); -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/arm/stm32l4/stm32l476-mdk/src/stm32_boot.c b/boards/arm/stm32l4/stm32l476-mdk/src/stm32_boot.c index 0bde3e3c79bd1..ab4b6b3ddc43a 100644 --- a/boards/arm/stm32l4/stm32l476-mdk/src/stm32_boot.c +++ b/boards/arm/stm32l4/stm32l476-mdk/src/stm32_boot.c @@ -28,15 +28,39 @@ #include +#include +#include +#include +#include +#include +#include + #include #include -#include - #include +#include +#include +#include #include "arm_internal.h" +#include "stm32l4.h" +#include "stm32l4_uid.h" #include "stm32l476-mdk.h" +/* Conditional logic in stm32l476-mdk.h will determine if certain features + * are supported. Tests for these features need to be made after including + * stm32l476-mdk.h. + */ + +#ifdef HAVE_RTC_DRIVER +# include +# include "stm32l4_rtc.h" +#endif + +#ifdef HAVE_USERLED_DRIVER +# include +#endif + /**************************************************************************** * Public Functions ****************************************************************************/ @@ -87,8 +111,77 @@ void stm32l4_board_initialize(void) #ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { - /* Perform board-specific initialization */ +#ifdef HAVE_RTC_DRIVER + struct rtc_lowerhalf_s *rtclower; +#endif + int ret; + +#ifdef HAVE_PROC + /* mount the proc filesystem */ + + syslog(LOG_INFO, "Mounting procfs to /proc\n"); + + ret = nx_mount(NULL, CONFIG_NSH_PROC_MOUNTPOINT, "procfs", 0, NULL); + if (ret < 0) + { + syslog(LOG_ERR, + "ERROR: Failed to mount the PROC filesystem: %d\n", ret); + return; + } +#endif + +#ifdef HAVE_RTC_DRIVER + /* Instantiate the STM32 lower-half RTC driver */ + + rtclower = stm32l4_rtc_lowerhalf(); + if (!rtclower) + { + syslog(LOG_ERR, + "ERROR: Failed to instantiate the RTC lower-half driver\n"); + return; + } + else + { + /* Bind the lower half driver and register the combined RTC driver + * as /dev/rtc0 + */ + + ret = rtc_initialize(0, rtclower); + if (ret < 0) + { + syslog(LOG_ERR, + "ERROR: Failed to bind/register the RTC driver: %d\n", + ret); + return; + } + } +#endif + +#ifdef HAVE_USERLED_DRIVER + /* Register the LED driver */ + + ret = userled_lower_initialize("/dev/userleds"); + if (ret != OK) + { + syslog(LOG_ERR, "ERROR: userled_lower_initialize() failed: %d\n", + ret); + return; + } +#endif + + UNUSED(ret); +} +#endif + +#if defined(CONFIG_BOARDCTL_UNIQUEID) +int board_uniqueid(uint8_t *uniqueid) +{ + if (uniqueid == NULL) + { + return -EINVAL; + } - stm32_bringup(); + stm32l4_get_uniqueid(uniqueid); + return OK; } #endif diff --git a/boards/arm/stm32l4/stm32l476-mdk/src/stm32_bringup.c b/boards/arm/stm32l4/stm32l476-mdk/src/stm32_bringup.c deleted file mode 100644 index 87f3ee3a429c2..0000000000000 --- a/boards/arm/stm32l4/stm32l476-mdk/src/stm32_bringup.c +++ /dev/null @@ -1,168 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32l4/stm32l476-mdk/src/stm32_bringup.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 - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include - -#include "stm32l4.h" -#include "stm32l4_uid.h" -#include "stm32l476-mdk.h" - -/* Conditional logic in stm32l476-mdk.h will determine if certain features - * are supported. Tests for these features need to be made after including - * stm32l476-mdk.h. - */ - -#ifdef HAVE_RTC_DRIVER -# include -# include "stm32l4_rtc.h" -#endif - -#ifdef HAVE_USERLED_DRIVER -# include -#endif - -/**************************************************************************** - * 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 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. - * - ****************************************************************************/ - -#ifdef CONFIG_BOARDCTL -int board_app_initialize(uintptr_t arg) -{ -#ifdef HAVE_RTC_DRIVER - struct rtc_lowerhalf_s *rtclower; -#endif - int ret; - -#ifdef HAVE_PROC - /* mount the proc filesystem */ - - syslog(LOG_INFO, "Mounting procfs to /proc\n"); - - ret = nx_mount(NULL, CONFIG_NSH_PROC_MOUNTPOINT, "procfs", 0, NULL); - if (ret < 0) - { - syslog(LOG_ERR, - "ERROR: Failed to mount the PROC filesystem: %d\n", ret); - return ret; - } -#endif - -#ifdef HAVE_RTC_DRIVER - /* Instantiate the STM32 lower-half RTC driver */ - - rtclower = stm32l4_rtc_lowerhalf(); - if (!rtclower) - { - syslog(LOG_ERR, - "ERROR: Failed to instantiate the RTC lower-half driver\n"); - return -ENOMEM; - } - else - { - /* Bind the lower half driver and register the combined RTC driver - * as /dev/rtc0 - */ - - ret = rtc_initialize(0, rtclower); - if (ret < 0) - { - syslog(LOG_ERR, - "ERROR: Failed to bind/register the RTC driver: %d\n", - ret); - return ret; - } - } -#endif - -#ifdef HAVE_USERLED_DRIVER - /* Register the LED driver */ - - ret = userled_lower_initialize("/dev/userleds"); - if (ret != OK) - { - syslog(LOG_ERR, "ERROR: userled_lower_initialize() failed: %d\n", - ret); - return ret; - } -#endif - - UNUSED(ret); - return OK; -} -#endif /* CONFIG_BOARDCTL */ - -#if defined(CONFIG_BOARDCTL_UNIQUEID) -int board_uniqueid(uint8_t *uniqueid) -{ - if (uniqueid == NULL) - { - return -EINVAL; - } - - stm32l4_get_uniqueid(uniqueid); - return OK; -} -#endif diff --git a/boards/arm/stm32l4/stm32l476vg-disco/configs/knsh/defconfig b/boards/arm/stm32l4/stm32l476vg-disco/configs/knsh/defconfig index 612d56f1cc91d..9ee1fcccd70b7 100644 --- a/boards/arm/stm32l4/stm32l476vg-disco/configs/knsh/defconfig +++ b/boards/arm/stm32l4/stm32l476vg-disco/configs/knsh/defconfig @@ -20,9 +20,6 @@ CONFIG_ARCH_INTERRUPTSTACK=2048 CONFIG_ARCH_IRQBUTTONS=y CONFIG_ARCH_STACKDUMP=y CONFIG_ARM_MPU=y -CONFIG_BOARDCTL_IOCTL=y -CONFIG_BOARDCTL_UNIQUEID=y -CONFIG_BOARDCTL_UNIQUEID_SIZE=12 CONFIG_BOARD_LOOPSPERMSEC=8499 CONFIG_BUILD_PROTECTED=y CONFIG_DEV_LOOP=y @@ -37,7 +34,6 @@ CONFIG_MTD=y CONFIG_MTD_N25QXXX=y CONFIG_MTD_PARTITION=y CONFIG_N25QXXX_SECTOR512=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_DISABLE_MKRD=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32l4/stm32l476vg-disco/configs/nsh/defconfig b/boards/arm/stm32l4/stm32l476vg-disco/configs/nsh/defconfig index a94c7b3bcc626..9bab580b6f0a9 100644 --- a/boards/arm/stm32l4/stm32l476vg-disco/configs/nsh/defconfig +++ b/boards/arm/stm32l4/stm32l476vg-disco/configs/nsh/defconfig @@ -39,7 +39,6 @@ CONFIG_MTD=y CONFIG_MTD_N25QXXX=y CONFIG_MTD_PARTITION=y CONFIG_N25QXXX_SECTOR512=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32l4/stm32l476vg-disco/src/Makefile b/boards/arm/stm32l4/stm32l476vg-disco/src/Makefile index 821da245d6b06..a2438eee63bd8 100644 --- a/boards/arm/stm32l4/stm32l476vg-disco/src/Makefile +++ b/boards/arm/stm32l4/stm32l476vg-disco/src/Makefile @@ -46,12 +46,9 @@ ifeq ($(CONFIG_ADC),y) #CSRCS += stm32_adc.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c ifeq ($(CONFIG_BOARDCTL_IOCTL),y) CSRCS += stm32_ioctl.c endif -endif ifeq ($(CONFIG_ETC_ROMFS),y) CSRCS += etc_romfs.c diff --git a/boards/arm/stm32l4/stm32l476vg-disco/src/stm32_appinit.c b/boards/arm/stm32l4/stm32l476vg-disco/src/stm32_appinit.c deleted file mode 100644 index dd49a7b0877b1..0000000000000 --- a/boards/arm/stm32l4/stm32l476vg-disco/src/stm32_appinit.c +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32l4/stm32l476vg-disco/src/stm32_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 - -#include -#include - -#include "stm32l476vg-disco.h" - -/**************************************************************************** - * 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 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) -{ - /* Did we already initialize via board_late_initialize()? */ - -#ifndef CONFIG_BOARD_LATE_INITIALIZE - return stm32_bringup(); -#else - return OK; -#endif -} diff --git a/boards/arm/stm32l4/stm32l476vg-disco/src/stm32_boot.c b/boards/arm/stm32l4/stm32l476vg-disco/src/stm32_boot.c index 23cd3a2b32908..74a290c5550b3 100644 --- a/boards/arm/stm32l4/stm32l476vg-disco/src/stm32_boot.c +++ b/boards/arm/stm32l4/stm32l476vg-disco/src/stm32_boot.c @@ -98,13 +98,6 @@ void stm32l4_board_initialize(void) #ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { - /* Perform NSH initialization here instead of from the NSH. This - * alternative NSH initialization is necessary when NSH is ran in - * user-space but the initialization function must run in kernel space. - */ - -#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_NSH_ARCHINIT) - board_app_initialize(0); -#endif + stm32_bringup(); } #endif diff --git a/boards/arm/stm32l4/stm32l4r9ai-disco/configs/knsh/defconfig b/boards/arm/stm32l4/stm32l4r9ai-disco/configs/knsh/defconfig index bd6578f519270..020cf49a74023 100644 --- a/boards/arm/stm32l4/stm32l4r9ai-disco/configs/knsh/defconfig +++ b/boards/arm/stm32l4/stm32l4r9ai-disco/configs/knsh/defconfig @@ -19,9 +19,6 @@ CONFIG_ARCH_INTERRUPTSTACK=2048 CONFIG_ARCH_IRQBUTTONS=y CONFIG_ARCH_STACKDUMP=y CONFIG_ARM_MPU=y -CONFIG_BOARDCTL_IOCTL=y -CONFIG_BOARDCTL_UNIQUEID=y -CONFIG_BOARDCTL_UNIQUEID_SIZE=12 CONFIG_BOARD_LOOPSPERMSEC=9234 CONFIG_BUILD_PROTECTED=y CONFIG_DEBUG_FULLOPT=y @@ -40,7 +37,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_MM_REGIONS=3 CONFIG_MTD=y CONFIG_MTD_PARTITION=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_DISABLE_MKRD=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32l4/stm32l4r9ai-disco/configs/nsh/defconfig b/boards/arm/stm32l4/stm32l4r9ai-disco/configs/nsh/defconfig index 7ef9d34b82ab4..b2e29c4a53539 100644 --- a/boards/arm/stm32l4/stm32l4r9ai-disco/configs/nsh/defconfig +++ b/boards/arm/stm32l4/stm32l4r9ai-disco/configs/nsh/defconfig @@ -40,7 +40,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_MM_REGIONS=3 CONFIG_MTD=y CONFIG_MTD_PARTITION=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32l4/stm32l4r9ai-disco/src/Makefile b/boards/arm/stm32l4/stm32l4r9ai-disco/src/Makefile index 735e393570903..47936292ad5fb 100644 --- a/boards/arm/stm32l4/stm32l4r9ai-disco/src/Makefile +++ b/boards/arm/stm32l4/stm32l4r9ai-disco/src/Makefile @@ -59,12 +59,9 @@ ifeq ($(CONFIG_STM32L4_OTGFS),y) CSRCS += stm32_usb.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c ifeq ($(CONFIG_BOARDCTL_IOCTL),y) CSRCS += stm32_ioctl.c endif -endif ifeq ($(CONFIG_ETC_ROMFS),y) CSRCS += etc_romfs.c diff --git a/boards/arm/stm32l4/stm32l4r9ai-disco/src/stm32_appinit.c b/boards/arm/stm32l4/stm32l4r9ai-disco/src/stm32_appinit.c deleted file mode 100644 index 131464b3ec82a..0000000000000 --- a/boards/arm/stm32l4/stm32l4r9ai-disco/src/stm32_appinit.c +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32l4/stm32l4r9ai-disco/src/stm32_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 - -#include -#include - -#include "stm32l4r9ai-disco.h" - -/**************************************************************************** - * 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 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) -{ - /* Did we already initialize via board_late_initialize()? */ - -#ifndef CONFIG_BOARD_LATE_INITIALIZE - return stm32_bringup(); -#else - return OK; -#endif -} diff --git a/boards/arm/stm32l4/stm32l4r9ai-disco/src/stm32_boot.c b/boards/arm/stm32l4/stm32l4r9ai-disco/src/stm32_boot.c index 530b0577cbfe3..ccc12956c6a36 100644 --- a/boards/arm/stm32l4/stm32l4r9ai-disco/src/stm32_boot.c +++ b/boards/arm/stm32l4/stm32l4r9ai-disco/src/stm32_boot.c @@ -98,13 +98,6 @@ void stm32l4_board_initialize(void) #ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { - /* Perform NSH initialization here instead of from the NSH. This - * alternative NSH initialization is necessary when NSH is ran in - * user-space but the initialization function must run in kernel space. - */ - -#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_NSH_ARCHINIT) - board_app_initialize(0); -#endif + stm32_bringup(); } #endif diff --git a/boards/arm/stm32l5/nucleo-l552ze/configs/nsh/defconfig b/boards/arm/stm32l5/nucleo-l552ze/configs/nsh/defconfig index 316ab1c02e3a5..14235ae113610 100644 --- a/boards/arm/stm32l5/nucleo-l552ze/configs/nsh/defconfig +++ b/boards/arm/stm32l5/nucleo-l552ze/configs/nsh/defconfig @@ -36,7 +36,6 @@ CONFIG_INPUT_BUTTONS=y CONFIG_INPUT_BUTTONS_LOWER=y CONFIG_LINE_MAX=64 CONFIG_LPUART1_SERIAL_CONSOLE=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32l5/nucleo-l552ze/src/CMakeLists.txt b/boards/arm/stm32l5/nucleo-l552ze/src/CMakeLists.txt index 70b4b2eee1e74..0146945c9d555 100644 --- a/boards/arm/stm32l5/nucleo-l552ze/src/CMakeLists.txt +++ b/boards/arm/stm32l5/nucleo-l552ze/src/CMakeLists.txt @@ -32,10 +32,6 @@ if(CONFIG_ARCH_BUTTONS) list(APPEND SRCS stm32_buttons.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - target_sources(board PRIVATE ${SRCS}) set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/flash.ld") diff --git a/boards/arm/stm32l5/nucleo-l552ze/src/Makefile b/boards/arm/stm32l5/nucleo-l552ze/src/Makefile index 848f9648e9413..28cdefc9f468d 100644 --- a/boards/arm/stm32l5/nucleo-l552ze/src/Makefile +++ b/boards/arm/stm32l5/nucleo-l552ze/src/Makefile @@ -35,8 +35,4 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += stm32_buttons.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - include $(TOPDIR)/boards/Board.mk diff --git a/boards/arm/stm32l5/nucleo-l552ze/src/stm32_appinit.c b/boards/arm/stm32l5/nucleo-l552ze/src/stm32_appinit.c deleted file mode 100644 index 8cfdb9045c670..0000000000000 --- a/boards/arm/stm32l5/nucleo-l552ze/src/stm32_appinit.c +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32l5/nucleo-l552ze/src/stm32_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 - -#include - -#include "nucleo-l552ze.h" - -#include - -/**************************************************************************** - * 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 cold 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) -{ - /* Did we already initialize via board_late_initialize()? */ - -#ifndef CONFIG_BOARD_LATE_INITIALIZE - return stm32_bringup(); -#else - return OK; -#endif -} diff --git a/boards/arm/stm32l5/stm32l562e-dk/configs/nsh/defconfig b/boards/arm/stm32l5/stm32l562e-dk/configs/nsh/defconfig index 83e35ca6815fa..2edfa787c5e64 100644 --- a/boards/arm/stm32l5/stm32l562e-dk/configs/nsh/defconfig +++ b/boards/arm/stm32l5/stm32l562e-dk/configs/nsh/defconfig @@ -31,7 +31,6 @@ CONFIG_HAVE_CXXINITIALIZE=y CONFIG_IDLETHREAD_STACKSIZE=2048 CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32l5/stm32l562e-dk/src/CMakeLists.txt b/boards/arm/stm32l5/stm32l562e-dk/src/CMakeLists.txt index 759a5286c0103..bf7a04d8d5376 100644 --- a/boards/arm/stm32l5/stm32l562e-dk/src/CMakeLists.txt +++ b/boards/arm/stm32l5/stm32l562e-dk/src/CMakeLists.txt @@ -32,10 +32,6 @@ if(CONFIG_ARCH_BUTTONS) list(APPEND SRCS stm32_buttons.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - target_sources(board PRIVATE ${SRCS}) set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/tfm-ns.ld") diff --git a/boards/arm/stm32l5/stm32l562e-dk/src/Makefile b/boards/arm/stm32l5/stm32l562e-dk/src/Makefile index 2e03d200b6868..aa38e15db504a 100644 --- a/boards/arm/stm32l5/stm32l562e-dk/src/Makefile +++ b/boards/arm/stm32l5/stm32l562e-dk/src/Makefile @@ -35,8 +35,4 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += stm32_buttons.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - include $(TOPDIR)/boards/Board.mk diff --git a/boards/arm/stm32l5/stm32l562e-dk/src/stm32_appinit.c b/boards/arm/stm32l5/stm32l562e-dk/src/stm32_appinit.c deleted file mode 100644 index 307964bd67655..0000000000000 --- a/boards/arm/stm32l5/stm32l562e-dk/src/stm32_appinit.c +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32l5/stm32l562e-dk/src/stm32_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 - -#include - -#include "stm32l562e-dk.h" - -#include - -/**************************************************************************** - * 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 cold 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) -{ - /* Did we already initialize via board_late_initialize()? */ - -#ifndef CONFIG_BOARD_LATE_INITIALIZE - return stm32_bringup(); -#else - return OK; -#endif -} diff --git a/boards/arm/stm32u5/b-u585i-iot02a/configs/nsh/defconfig b/boards/arm/stm32u5/b-u585i-iot02a/configs/nsh/defconfig index 66c8feb2dc0cf..74b6940237b58 100644 --- a/boards/arm/stm32u5/b-u585i-iot02a/configs/nsh/defconfig +++ b/boards/arm/stm32u5/b-u585i-iot02a/configs/nsh/defconfig @@ -32,7 +32,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INPUT=y CONFIG_LIBM=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32u5/b-u585i-iot02a/src/CMakeLists.txt b/boards/arm/stm32u5/b-u585i-iot02a/src/CMakeLists.txt index c0c733e9acf7a..a845f39aefe01 100644 --- a/boards/arm/stm32u5/b-u585i-iot02a/src/CMakeLists.txt +++ b/boards/arm/stm32u5/b-u585i-iot02a/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS stm32_boot.c stm32_bringup.c stm32_spi.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - if(CONFIG_ARCH_BOARD_STM32U5_CUSTOM_CLOCKCONFIG) list(APPEND SRCS stm32_clockconfig.c) endif() diff --git a/boards/arm/stm32u5/b-u585i-iot02a/src/Makefile b/boards/arm/stm32u5/b-u585i-iot02a/src/Makefile index 48bc90571ea1c..0a32978916af9 100644 --- a/boards/arm/stm32u5/b-u585i-iot02a/src/Makefile +++ b/boards/arm/stm32u5/b-u585i-iot02a/src/Makefile @@ -25,10 +25,6 @@ ASRCS = CSRCS = stm32_boot.c stm32_bringup.c stm32_spi.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - ifeq ($(CONFIG_ARCH_BOARD_STM32U5_CUSTOM_CLOCKCONFIG),y) CSRCS += stm32_clockconfig.c endif diff --git a/boards/arm/stm32u5/b-u585i-iot02a/src/stm32_appinit.c b/boards/arm/stm32u5/b-u585i-iot02a/src/stm32_appinit.c deleted file mode 100644 index c0594f96f08bd..0000000000000 --- a/boards/arm/stm32u5/b-u585i-iot02a/src/stm32_appinit.c +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32u5/b-u585i-iot02a/src/stm32_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 - -#include - -#include "b-u585i-iot02a.h" - -#include - -/**************************************************************************** - * 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 cold 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) -{ - /* Did we already initialize via board_late_initialize()? */ - -#ifndef CONFIG_BOARD_LATE_INITIALIZE - return stm32_bringup(); -#else - return OK; -#endif -} diff --git a/boards/arm/stm32u5/nucleo-u5a5zj-q/configs/nsh/defconfig b/boards/arm/stm32u5/nucleo-u5a5zj-q/configs/nsh/defconfig index a2555146d0cb5..a489a5a0284cf 100644 --- a/boards/arm/stm32u5/nucleo-u5a5zj-q/configs/nsh/defconfig +++ b/boards/arm/stm32u5/nucleo-u5a5zj-q/configs/nsh/defconfig @@ -32,7 +32,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBM=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=4 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32u5/nucleo-u5a5zj-q/src/CMakeLists.txt b/boards/arm/stm32u5/nucleo-u5a5zj-q/src/CMakeLists.txt index 18a86294aeaff..fa6b58b12dc9d 100644 --- a/boards/arm/stm32u5/nucleo-u5a5zj-q/src/CMakeLists.txt +++ b/boards/arm/stm32u5/nucleo-u5a5zj-q/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS stm32_boot.c stm32_bringup.c stm32_spi.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - if(CONFIG_ARCH_BOARD_STM32U5_CUSTOM_CLOCKCONFIG) list(APPEND SRCS stm32_clockconfig.c) endif() diff --git a/boards/arm/stm32u5/nucleo-u5a5zj-q/src/Makefile b/boards/arm/stm32u5/nucleo-u5a5zj-q/src/Makefile index 71f3c21059ba2..1fa94c46e61d5 100644 --- a/boards/arm/stm32u5/nucleo-u5a5zj-q/src/Makefile +++ b/boards/arm/stm32u5/nucleo-u5a5zj-q/src/Makefile @@ -25,10 +25,6 @@ ASRCS = CSRCS = stm32_boot.c stm32_bringup.c stm32_spi.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - ifeq ($(CONFIG_ARCH_BOARD_STM32U5_CUSTOM_CLOCKCONFIG),y) CSRCS += stm32_clockconfig.c endif diff --git a/boards/arm/stm32u5/nucleo-u5a5zj-q/src/stm32_appinit.c b/boards/arm/stm32u5/nucleo-u5a5zj-q/src/stm32_appinit.c deleted file mode 100644 index fd03281dc017f..0000000000000 --- a/boards/arm/stm32u5/nucleo-u5a5zj-q/src/stm32_appinit.c +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32u5/nucleo-u5a5zj-q/src/stm32_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 - -#include - -#include "nucleo-u5a5zj-q.h" - -#include - -/**************************************************************************** - * 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 cold 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) -{ - /* Did we already initialize via board_late_initialize()? */ - -#ifndef CONFIG_BOARD_LATE_INITIALIZE - return stm32_bringup(); -#else - return OK; -#endif -} diff --git a/boards/arm/stm32wb/flipperzero/configs/nsh/defconfig b/boards/arm/stm32wb/flipperzero/configs/nsh/defconfig index 98b80f8d30c51..c127e72875f9b 100644 --- a/boards/arm/stm32wb/flipperzero/configs/nsh/defconfig +++ b/boards/arm/stm32wb/flipperzero/configs/nsh/defconfig @@ -33,7 +33,6 @@ CONFIG_LCD_NOGETRUN=y CONFIG_LCD_ST7565=y CONFIG_LINE_MAX=64 CONFIG_MQ_MAXMSGSIZE=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32wb/flipperzero/src/CMakeLists.txt b/boards/arm/stm32wb/flipperzero/src/CMakeLists.txt index b38341f1522f8..80c36fc77e1c8 100644 --- a/boards/arm/stm32wb/flipperzero/src/CMakeLists.txt +++ b/boards/arm/stm32wb/flipperzero/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS stm32_boot.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - if(CONFIG_SPI) list(APPEND SRCS stm32_spi.c) endif() diff --git a/boards/arm/stm32wb/flipperzero/src/Makefile b/boards/arm/stm32wb/flipperzero/src/Makefile index 13b789b1ad3d5..716d6b290016b 100644 --- a/boards/arm/stm32wb/flipperzero/src/Makefile +++ b/boards/arm/stm32wb/flipperzero/src/Makefile @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = stm32_boot.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - ifeq ($(CONFIG_SPI),y) CSRCS += stm32_spi.c endif diff --git a/boards/arm/stm32wb/flipperzero/src/stm32_appinit.c b/boards/arm/stm32wb/flipperzero/src/stm32_appinit.c deleted file mode 100644 index d708fe1318a6d..0000000000000 --- a/boards/arm/stm32wb/flipperzero/src/stm32_appinit.c +++ /dev/null @@ -1,196 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32wb/flipperzero/src/stm32_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 - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "stm32wb_tim.h" - -#ifdef CONFIG_RTC_DRIVER -# include -# include "stm32wb_rtc.h" -#endif - -#ifdef CONFIG_STM32WB_BLE -# include "stm32wb_blehci.h" -#endif - -#include "flipperzero.h" - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: arm_netinitialize - * - * Description: - * Dummy function expected to start-up logic. - * - ****************************************************************************/ - -#if defined(CONFIG_NET) && !defined(CONFIG_NETDEV_LATEINIT) -void arm_netinitialize(void) -{ -} -#endif - -/**************************************************************************** - * 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 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. - * - ****************************************************************************/ - -#ifdef CONFIG_BOARDCTL -int board_app_initialize(uintptr_t arg) -{ -#ifdef CONFIG_RTC_DRIVER - struct rtc_lowerhalf_s *rtclower; -#endif - int ret = OK; - -#ifdef HAVE_PROC - /* Mount the proc filesystem */ - - syslog(LOG_INFO, "Mounting procfs to /proc\n"); - - ret = nx_mount(NULL, CONFIG_NSH_PROC_MOUNTPOINT, "procfs", 0, NULL); - if (ret < 0) - { - syslog(LOG_ERR, - "ERROR: Failed to mount the PROC filesystem: %d (%d)\n", - ret, errno); - return ret; - } -#endif - -#ifdef CONFIG_RTC_DRIVER - /* Instantiate the STM32WB lower-half RTC driver */ - - rtclower = stm32wb_rtc_lowerhalf(); - if (!rtclower) - { - serr("ERROR: Failed to instantiate the RTC lower-half driver\n"); - return -ENOMEM; - } - else - { - /* Bind the lower half driver and register the combined RTC driver - * as /dev/rtc0 - */ - - ret = rtc_initialize(0, rtclower); - if (ret < 0) - { - serr("ERROR: Failed to bind/register the RTC driver: %d\n", ret); - return ret; - } - } -#endif - -#ifdef CONFIG_TIMER - /* Initialize and register the timer driver */ - - ret = stm32wb_timer_initialize("/dev/timer0", 1); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: Failed to register the timer driver: %d\n", - ret); - return ret; - } -#endif - -#ifdef CONFIG_LCD - ret = board_lcd_initialize(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: Failed to initialize LCD.\n"); - } -#endif - -#ifdef CONFIG_STM32WB_BLE - /* Initialize and register BLE HCI driver */ - - stm32wb_blehci_initialize(); -#endif - - return ret; -} -#endif /* CONFIG_BOARDCTL */ - -#ifdef CONFIG_BOARDCTL_IOCTL -int board_ioctl(unsigned int cmd, uintptr_t arg) -{ - return -ENOTTY; -} -#endif - -#if defined(CONFIG_BOARDCTL_UNIQUEID) -int board_uniqueid(uint8_t *uniqueid) -{ - if (uniqueid == NULL) - { - return -EINVAL; - } - - stm32wb_get_uniqueid(uniqueid); - return OK; -} -#endif diff --git a/boards/arm/stm32wb/flipperzero/src/stm32_boot.c b/boards/arm/stm32wb/flipperzero/src/stm32_boot.c index dd07cd6dad383..b83f7f7bab36d 100644 --- a/boards/arm/stm32wb/flipperzero/src/stm32_boot.c +++ b/boards/arm/stm32wb/flipperzero/src/stm32_boot.c @@ -28,11 +28,29 @@ #include +#include +#include +#include +#include +#include + #include #include +#include #include +#include "stm32wb_tim.h" + +#ifdef CONFIG_RTC_DRIVER +# include +# include "stm32wb_rtc.h" +#endif + +#ifdef CONFIG_STM32WB_BLE +# include "stm32wb_blehci.h" +#endif + #include "flipperzero.h" /**************************************************************************** @@ -70,6 +88,20 @@ void stm32wb_board_initialize(void) #endif } +/**************************************************************************** + * Name: arm_netinitialize + * + * Description: + * Dummy function expected to start-up logic. + * + ****************************************************************************/ + +#if defined(CONFIG_NET) && !defined(CONFIG_NETDEV_LATEINIT) +void arm_netinitialize(void) +{ +} +#endif + /**************************************************************************** * Name: board_late_initialize * @@ -87,13 +119,94 @@ void stm32wb_board_initialize(void) #ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { - /* Perform NSH initialization here instead of from the NSH. This - * alternative NSH initialization is necessary when NSH is ran in - * user-space but the initialization function must run in kernel space. - */ +#ifdef CONFIG_RTC_DRIVER + struct rtc_lowerhalf_s *rtclower; +#endif + int ret = OK; -#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_NSH_ARCHINIT) - board_app_initialize(0); +#ifdef HAVE_PROC + /* Mount the proc filesystem */ + + syslog(LOG_INFO, "Mounting procfs to /proc\n"); + + ret = nx_mount(NULL, CONFIG_NSH_PROC_MOUNTPOINT, "procfs", 0, NULL); + if (ret < 0) + { + syslog(LOG_ERR, + "ERROR: Failed to mount the PROC filesystem: %d (%d)\n", + ret, errno); + return; + } #endif + +#ifdef CONFIG_RTC_DRIVER + /* Instantiate the STM32WB lower-half RTC driver */ + + rtclower = stm32wb_rtc_lowerhalf(); + if (!rtclower) + { + serr("ERROR: Failed to instantiate the RTC lower-half driver\n"); + return; + } + else + { + /* Bind the lower half driver and register the combined RTC driver + * as /dev/rtc0 + */ + + ret = rtc_initialize(0, rtclower); + if (ret < 0) + { + serr("ERROR: Failed to bind/register the RTC driver: %d\n", ret); + return; + } + } +#endif + +#ifdef CONFIG_TIMER + /* Initialize and register the timer driver */ + + ret = stm32wb_timer_initialize("/dev/timer0", 1); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: Failed to register the timer driver: %d\n", + ret); + return; + } +#endif + +#ifdef CONFIG_LCD + ret = board_lcd_initialize(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: Failed to initialize LCD.\n"); + } +#endif + +#ifdef CONFIG_STM32WB_BLE + /* Initialize and register BLE HCI driver */ + + stm32wb_blehci_initialize(); +#endif +} +#endif + +#ifdef CONFIG_BOARDCTL_IOCTL +int board_ioctl(unsigned int cmd, uintptr_t arg) +{ + return -ENOTTY; +} +#endif + +#if defined(CONFIG_BOARDCTL_UNIQUEID) +int board_uniqueid(uint8_t *uniqueid) +{ + if (uniqueid == NULL) + { + return -EINVAL; + } + + stm32wb_get_uniqueid(uniqueid); + return OK; } #endif diff --git a/boards/arm/stm32wb/nucleo-wb55rg/configs/ble/defconfig b/boards/arm/stm32wb/nucleo-wb55rg/configs/ble/defconfig index b8c22875dbd8f..ff3325b96d84c 100644 --- a/boards/arm/stm32wb/nucleo-wb55rg/configs/ble/defconfig +++ b/boards/arm/stm32wb/nucleo-wb55rg/configs/ble/defconfig @@ -30,7 +30,6 @@ CONFIG_LINE_MAX=64 CONFIG_NET=y CONFIG_NET_BLUETOOTH=y CONFIG_NET_STATISTICS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/stm32wb/nucleo-wb55rg/configs/nimble/defconfig b/boards/arm/stm32wb/nucleo-wb55rg/configs/nimble/defconfig index 9a90c7753eee6..7e9dcb33872da 100644 --- a/boards/arm/stm32wb/nucleo-wb55rg/configs/nimble/defconfig +++ b/boards/arm/stm32wb/nucleo-wb55rg/configs/nimble/defconfig @@ -34,7 +34,6 @@ CONFIG_NET_BLUETOOTH=y CONFIG_NET_STATISTICS=y CONFIG_NIMBLE=y CONFIG_NIMBLE_ROLE_PERIPHERAL=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32wb/nucleo-wb55rg/configs/nsh/defconfig b/boards/arm/stm32wb/nucleo-wb55rg/configs/nsh/defconfig index 0e2af22c947ea..0738f6cea5820 100644 --- a/boards/arm/stm32wb/nucleo-wb55rg/configs/nsh/defconfig +++ b/boards/arm/stm32wb/nucleo-wb55rg/configs/nsh/defconfig @@ -21,7 +21,6 @@ CONFIG_HAVE_CXXINITIALIZE=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/stm32wb/nucleo-wb55rg/src/CMakeLists.txt b/boards/arm/stm32wb/nucleo-wb55rg/src/CMakeLists.txt index 8c5df0a55874d..ccedd77381ba0 100644 --- a/boards/arm/stm32wb/nucleo-wb55rg/src/CMakeLists.txt +++ b/boards/arm/stm32wb/nucleo-wb55rg/src/CMakeLists.txt @@ -28,10 +28,6 @@ else() list(APPEND SRCS stm32_userleds.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - target_sources(board PRIVATE ${SRCS}) set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/wb55rg.ld") diff --git a/boards/arm/stm32wb/nucleo-wb55rg/src/Makefile b/boards/arm/stm32wb/nucleo-wb55rg/src/Makefile index 02f0299a9bc4f..11d004aa68c5c 100644 --- a/boards/arm/stm32wb/nucleo-wb55rg/src/Makefile +++ b/boards/arm/stm32wb/nucleo-wb55rg/src/Makefile @@ -30,8 +30,4 @@ else CSRCS += stm32_userleds.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += stm32_appinit.c -endif - include $(TOPDIR)/boards/Board.mk diff --git a/boards/arm/stm32wb/nucleo-wb55rg/src/stm32_appinit.c b/boards/arm/stm32wb/nucleo-wb55rg/src/stm32_appinit.c deleted file mode 100644 index 7da65ac26c838..0000000000000 --- a/boards/arm/stm32wb/nucleo-wb55rg/src/stm32_appinit.c +++ /dev/null @@ -1,188 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32wb/nucleo-wb55rg/src/stm32_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 - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "stm32wb_tim.h" - -#ifdef CONFIG_RTC_DRIVER -# include -# include "stm32wb_rtc.h" -#endif - -#ifdef CONFIG_STM32WB_BLE -# include "stm32wb_blehci.h" -#endif - -#include "nucleo-wb55rg.h" - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: arm_netinitialize - * - * Description: - * Dummy function expected to start-up logic. - * - ****************************************************************************/ - -#if defined(CONFIG_NET) && !defined(CONFIG_NETDEV_LATEINIT) -void arm_netinitialize(void) -{ -} -#endif - -/**************************************************************************** - * 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 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. - * - ****************************************************************************/ - -#ifdef CONFIG_BOARDCTL -int board_app_initialize(uintptr_t arg) -{ -#ifdef CONFIG_RTC_DRIVER - struct rtc_lowerhalf_s *rtclower; -#endif - int ret = OK; - -#ifdef HAVE_PROC - /* Mount the proc filesystem */ - - syslog(LOG_INFO, "Mounting procfs to /proc\n"); - - ret = nx_mount(NULL, CONFIG_NSH_PROC_MOUNTPOINT, "procfs", 0, NULL); - if (ret < 0) - { - syslog(LOG_ERR, - "ERROR: Failed to mount the PROC filesystem: %d (%d)\n", - ret, errno); - return ret; - } -#endif - -#ifdef CONFIG_RTC_DRIVER - /* Instantiate the STM32WB lower-half RTC driver */ - - rtclower = stm32wb_rtc_lowerhalf(); - if (!rtclower) - { - serr("ERROR: Failed to instantiate the RTC lower-half driver\n"); - return -ENOMEM; - } - else - { - /* Bind the lower half driver and register the combined RTC driver - * as /dev/rtc0 - */ - - ret = rtc_initialize(0, rtclower); - if (ret < 0) - { - serr("ERROR: Failed to bind/register the RTC driver: %d\n", ret); - return ret; - } - } -#endif - -#ifdef CONFIG_TIMER - /* Initialize and register the timer driver */ - - ret = stm32wb_timer_initialize("/dev/timer0", 1); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: Failed to register the timer driver: %d\n", - ret); - return ret; - } -#endif - -#ifdef CONFIG_STM32WB_BLE - /* Initialize and register BLE HCI driver */ - - stm32wb_blehci_initialize(); -#endif - - return ret; -} -#endif /* CONFIG_BOARDCTL */ - -#ifdef CONFIG_BOARDCTL_IOCTL -int board_ioctl(unsigned int cmd, uintptr_t arg) -{ - return -ENOTTY; -} -#endif - -#if defined(CONFIG_BOARDCTL_UNIQUEID) -int board_uniqueid(uint8_t *uniqueid) -{ - if (uniqueid == NULL) - { - return -EINVAL; - } - - stm32wb_get_uniqueid(uniqueid); - return OK; -} -#endif diff --git a/boards/arm/stm32wb/nucleo-wb55rg/src/stm32_boot.c b/boards/arm/stm32wb/nucleo-wb55rg/src/stm32_boot.c index 6e7881784fb74..a8199219abe59 100644 --- a/boards/arm/stm32wb/nucleo-wb55rg/src/stm32_boot.c +++ b/boards/arm/stm32wb/nucleo-wb55rg/src/stm32_boot.c @@ -28,11 +28,29 @@ #include +#include +#include +#include +#include +#include + #include #include +#include #include +#include "stm32wb_tim.h" + +#ifdef CONFIG_RTC_DRIVER +# include +# include "stm32wb_rtc.h" +#endif + +#ifdef CONFIG_STM32WB_BLE +# include "stm32wb_blehci.h" +#endif + #include "nucleo-wb55rg.h" /**************************************************************************** @@ -59,6 +77,20 @@ void stm32wb_board_initialize(void) #endif } +/**************************************************************************** + * Name: arm_netinitialize + * + * Description: + * Dummy function expected to start-up logic. + * + ****************************************************************************/ + +#if defined(CONFIG_NET) && !defined(CONFIG_NETDEV_LATEINIT) +void arm_netinitialize(void) +{ +} +#endif + /**************************************************************************** * Name: board_late_initialize * @@ -76,13 +108,87 @@ void stm32wb_board_initialize(void) #ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { - /* Perform NSH initialization here instead of from the NSH. This - * alternative NSH initialization is necessary when NSH is ran in - * user-space but the initialization function must run in kernel space. - */ +#ifdef CONFIG_RTC_DRIVER + struct rtc_lowerhalf_s *rtclower; +#endif + int ret = OK; + +#ifdef HAVE_PROC + /* Mount the proc filesystem */ + + syslog(LOG_INFO, "Mounting procfs to /proc\n"); -#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_NSH_ARCHINIT) - board_app_initialize(0); + ret = nx_mount(NULL, CONFIG_NSH_PROC_MOUNTPOINT, "procfs", 0, NULL); + if (ret < 0) + { + syslog(LOG_ERR, + "ERROR: Failed to mount the PROC filesystem: %d (%d)\n", + ret, errno); + return; + } #endif + +#ifdef CONFIG_RTC_DRIVER + /* Instantiate the STM32WB lower-half RTC driver */ + + rtclower = stm32wb_rtc_lowerhalf(); + if (!rtclower) + { + serr("ERROR: Failed to instantiate the RTC lower-half driver\n"); + return; + } + else + { + /* Bind the lower half driver and register the combined RTC driver + * as /dev/rtc0 + */ + + ret = rtc_initialize(0, rtclower); + if (ret < 0) + { + serr("ERROR: Failed to bind/register the RTC driver: %d\n", ret); + return; + } + } +#endif + +#ifdef CONFIG_TIMER + /* Initialize and register the timer driver */ + + ret = stm32wb_timer_initialize("/dev/timer0", 1); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: Failed to register the timer driver: %d\n", + ret); + return; + } +#endif + +#ifdef CONFIG_STM32WB_BLE + /* Initialize and register BLE HCI driver */ + + stm32wb_blehci_initialize(); +#endif + UNUSED(ret); +} +#endif + +#ifdef CONFIG_BOARDCTL_IOCTL +int board_ioctl(unsigned int cmd, uintptr_t arg) +{ + return -ENOTTY; +} +#endif + +#if defined(CONFIG_BOARDCTL_UNIQUEID) +int board_uniqueid(uint8_t *uniqueid) +{ + if (uniqueid == NULL) + { + return -EINVAL; + } + + stm32wb_get_uniqueid(uniqueid); + return OK; } #endif diff --git a/boards/arm/stm32wl5/nucleo-wl55jc/Kconfig b/boards/arm/stm32wl5/nucleo-wl55jc/Kconfig index 6fbb8b4cb12d3..411801e17de7f 100644 --- a/boards/arm/stm32wl5/nucleo-wl55jc/Kconfig +++ b/boards/arm/stm32wl5/nucleo-wl55jc/Kconfig @@ -8,15 +8,12 @@ if ARCH_BOARD_NUCLEO_WL55JC config ARCH_BOARD_NUCLEO_WL55JC_DEMO_LED_IRQ bool "[demo] LED on button interrupt" depends on ARCH_BUTTONS - depends on NSH_ARCHINIT + depends on BOARD_LATE_INITIALIZE ---help--- When enabled, pressing B3 button will toggle red LED. This options is mostly for demo purposes of how one can install GPIO interrupt. -comment "[demo] LED on button interrupt requires NSH_ARCHINIT" - depends on !NSH_ARCHINIT || !ARCH_BUTTONS - config ARCH_BOARD_ENABLE_CPU2 bool "Enable CPU2 on startup" default n diff --git a/boards/arm/stm32wl5/nucleo-wl55jc/configs/demo/defconfig b/boards/arm/stm32wl5/nucleo-wl55jc/configs/demo/defconfig index 57b1b50fe7afd..1074e1f8d0ba1 100644 --- a/boards/arm/stm32wl5/nucleo-wl55jc/configs/demo/defconfig +++ b/boards/arm/stm32wl5/nucleo-wl55jc/configs/demo/defconfig @@ -44,7 +44,6 @@ CONFIG_LPUART1_SERIAL_CONSOLE=y CONFIG_MTD_CONFIG=y CONFIG_MTD_CONFIG_NAMED=y CONFIG_MTD_SMART_SECTOR_SIZE=2048 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_RAM_SIZE=32768 CONFIG_RAM_START=0x20000000 diff --git a/boards/arm/stm32wl5/nucleo-wl55jc/configs/fb/defconfig b/boards/arm/stm32wl5/nucleo-wl55jc/configs/fb/defconfig index 4e2a5ac5c547e..3c5150dc6a9f5 100644 --- a/boards/arm/stm32wl5/nucleo-wl55jc/configs/fb/defconfig +++ b/boards/arm/stm32wl5/nucleo-wl55jc/configs/fb/defconfig @@ -14,7 +14,6 @@ CONFIG_ARCH_BUTTONS=y CONFIG_ARCH_CHIP="stm32wl5" CONFIG_ARCH_CHIP_STM32WL55JC_CPU1=y CONFIG_ARCH_CHIP_STM32WL5=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=0 CONFIG_BUILTIN=y CONFIG_DRIVERS_VIDEO=y diff --git a/boards/arm/stm32wl5/nucleo-wl55jc/src/CMakeLists.txt b/boards/arm/stm32wl5/nucleo-wl55jc/src/CMakeLists.txt index f8ca9fe234dff..fb81ed2942934 100644 --- a/boards/arm/stm32wl5/nucleo-wl55jc/src/CMakeLists.txt +++ b/boards/arm/stm32wl5/nucleo-wl55jc/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS stm32_boot.c stm32_leds.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS stm32_appinit.c) -endif() - if(CONFIG_ARCH_BUTTONS) list(APPEND SRCS stm32_buttons.c) endif() diff --git a/boards/arm/stm32wl5/nucleo-wl55jc/src/Makefile b/boards/arm/stm32wl5/nucleo-wl55jc/src/Makefile index 630173bd9842c..1c280874bc539 100644 --- a/boards/arm/stm32wl5/nucleo-wl55jc/src/Makefile +++ b/boards/arm/stm32wl5/nucleo-wl55jc/src/Makefile @@ -24,7 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = stm32_boot.c stm32_leds.c -CSRCS-$(CONFIG_BOARDCTL) += stm32_appinit.c CSRCS-$(CONFIG_ARCH_BUTTONS) += stm32_buttons.c CSRCS-$(CONFIG_ARCH_BOARD_FLASH_MOUNT) += stm32_flash.c CSRCS-$(CONFIG_SPI_DRIVER) += stm32_spi.c diff --git a/boards/arm/stm32wl5/nucleo-wl55jc/src/stm32_appinit.c b/boards/arm/stm32wl5/nucleo-wl55jc/src/stm32_appinit.c deleted file mode 100644 index d8fee19197a18..0000000000000 --- a/boards/arm/stm32wl5/nucleo-wl55jc/src/stm32_appinit.c +++ /dev/null @@ -1,175 +0,0 @@ -/**************************************************************************** - * boards/arm/stm32wl5/nucleo-wl55jc/src/stm32_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 - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include - -#include - -#include "nucleo-wl55jc.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Define proc mountpoint in case procfs is used but nsh is not */ - -#ifndef CONFIG_NSH_PROC_MOUNTPOINT -#define CONFIG_NSH_PROC_MOUNTPOINT "/proc" -#endif - -/**************************************************************************** - * 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 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) -{ - int ret = OK; - (void)arg; - -#ifdef HAVE_PROC - /* Mount the proc filesystem */ - - syslog(LOG_INFO, "Mounting procfs to /proc\n"); - - ret = nx_mount(NULL, CONFIG_NSH_PROC_MOUNTPOINT, "procfs", 0, NULL); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: Failed to mount the PROC filesystem: %d\n", - ret); - return ret; - } -#endif - -#if defined(CONFIG_USERLED_LOWER) - /* Register the LED driver */ - - ret = userled_lower_initialize("/dev/userleds"); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: userled_lower_initialize() failed: %d\n", ret); - } -#endif - -#if defined(CONFIG_INPUT_BUTTONS_LOWER) - /* Register the Button driver */ - - ret = btn_lower_initialize("/dev/buttons"); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: btn_lower_initialize() failed: %d\n", ret); - } -#endif - -#if defined(CONFIG_ARCH_BOARD_FLASH_MOUNT) - /* Register partition table for on-board FLASH memory */ - - ret = stm32wl5_flash_init(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: stm32wl5_flash_init() failed: %d\n", ret); - } -#endif - -#if defined(CONFIG_ARCH_BOARD_IPCC) - /* Register IPCC driver */ - - ret = ipcc_init(); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: ipcc_init() failed\n"); - } -#endif - -#if defined(CONFIG_ARCH_BOARD_ENABLE_CPU2) - /* Start second CPU */ - - stm32wl5_pwr_boot_c2(); -#endif - - return ret; -} - -#ifdef CONFIG_BOARDCTL_IOCTL -int board_ioctl(unsigned int cmd, uintptr_t arg) -{ - return -ENOTTY; -} -#endif - -#if defined(CONFIG_BOARDCTL_UNIQUEID) -int board_uniqueid(uint8_t *uniqueid) -{ - if (uniqueid == 0) - { - return -EINVAL; - } - - stm32wl5_get_uniqueid(uniqueid); - return OK; -} -#endif diff --git a/boards/arm/stm32wl5/nucleo-wl55jc/src/stm32_boot.c b/boards/arm/stm32wl5/nucleo-wl55jc/src/stm32_boot.c index 065cd7eed2676..b823f818470ad 100644 --- a/boards/arm/stm32wl5/nucleo-wl55jc/src/stm32_boot.c +++ b/boards/arm/stm32wl5/nucleo-wl55jc/src/stm32_boot.c @@ -28,9 +28,18 @@ #include +#include +#include +#include +#include +#include + #include #include #include +#include +#include +#include #include @@ -38,6 +47,10 @@ #include #endif +#include +#include +#include + #include "arm_internal.h" #include "nucleo-wl55jc.h" @@ -45,6 +58,12 @@ * Pre-processor Definitions ****************************************************************************/ +/* Define proc mountpoint in case procfs is used but nsh is not */ + +#ifndef CONFIG_NSH_PROC_MOUNTPOINT +#define CONFIG_NSH_PROC_MOUNTPOINT "/proc" +#endif + /**************************************************************************** * Private Data ****************************************************************************/ @@ -87,9 +106,7 @@ void stm32wl5_board_initialize(void) #ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { -#if defined(CONFIG_VIDEO_FB) int ret; -#endif #if defined(CONFIG_STM32WL5_SPI1) || defined(CONFIG_STM32WL5_SPI2S2) stm32wl5_spidev_initialize(); @@ -107,13 +124,86 @@ void board_late_initialize(void) } #endif - /* Perform NSH initialization here instead of from the NSH. This - * alternative NSH initialization is necessary when NSH is ran in - * user-space but the initialization function must run in kernel space. - */ +#ifdef HAVE_PROC + /* Mount the proc filesystem */ + + syslog(LOG_INFO, "Mounting procfs to /proc\n"); -#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_NSH_ARCHINIT) - board_app_initialize(0); + ret = nx_mount(NULL, CONFIG_NSH_PROC_MOUNTPOINT, "procfs", 0, NULL); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: Failed to mount the PROC filesystem: %d\n", + ret); + return; + } #endif + +#if defined(CONFIG_USERLED_LOWER) + /* Register the LED driver */ + + ret = userled_lower_initialize("/dev/userleds"); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: userled_lower_initialize() failed: %d\n", ret); + } +#endif + +#if defined(CONFIG_INPUT_BUTTONS_LOWER) + /* Register the Button driver */ + + ret = btn_lower_initialize("/dev/buttons"); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: btn_lower_initialize() failed: %d\n", ret); + } +#endif + +#if defined(CONFIG_ARCH_BOARD_FLASH_MOUNT) + /* Register partition table for on-board FLASH memory */ + + ret = stm32wl5_flash_init(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: stm32wl5_flash_init() failed: %d\n", ret); + } +#endif + +#if defined(CONFIG_ARCH_BOARD_IPCC) + /* Register IPCC driver */ + + ret = ipcc_init(); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: ipcc_init() failed\n"); + } +#endif + +#if defined(CONFIG_ARCH_BOARD_ENABLE_CPU2) + /* Start second CPU */ + + stm32wl5_pwr_boot_c2(); +#endif + + UNUSED(ret); +} +#endif + +#ifdef CONFIG_BOARDCTL_IOCTL +int board_ioctl(unsigned int cmd, uintptr_t arg) +{ + return -ENOTTY; +} +#endif + +#if defined(CONFIG_BOARDCTL_UNIQUEID) +int board_uniqueid(uint8_t *uniqueid) +{ + if (uniqueid == 0) + { + return -EINVAL; + } + + stm32wl5_get_uniqueid(uniqueid); + return OK; } #endif diff --git a/boards/arm/str71x/olimex-strp711/configs/nsh/defconfig b/boards/arm/str71x/olimex-strp711/configs/nsh/defconfig index 8814f3d408a9b..2ea9d1ab049c8 100644 --- a/boards/arm/str71x/olimex-strp711/configs/nsh/defconfig +++ b/boards/arm/str71x/olimex-strp711/configs/nsh/defconfig @@ -22,7 +22,6 @@ CONFIG_IDLETHREAD_STACKSIZE=2048 CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=64 CONFIG_MMCSD=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_MMCSDSPIPORTNO=1 CONFIG_NSH_READLINE=y diff --git a/boards/arm/str71x/olimex-strp711/src/Makefile b/boards/arm/str71x/olimex-strp711/src/Makefile index d0fa559d33e3c..4c175061a04b1 100644 --- a/boards/arm/str71x/olimex-strp711/src/Makefile +++ b/boards/arm/str71x/olimex-strp711/src/Makefile @@ -22,10 +22,8 @@ include $(TOPDIR)/Make.defs -CSRCS = str71_spi.c str71_leds.c str71_buttons.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += str71_appinit.c -endif +CSRCS = str71_spi.c str71_leds.c str71_buttons.c str71_boardinit.c + ifeq ($(CONFIG_ENC28J60),y) CSRCS += str71_enc28j60.c endif diff --git a/boards/arm/str71x/olimex-strp711/src/str71_appinit.c b/boards/arm/str71x/olimex-strp711/src/str71_boardinit.c similarity index 68% rename from boards/arm/str71x/olimex-strp711/src/str71_appinit.c rename to boards/arm/str71x/olimex-strp711/src/str71_boardinit.c index ffc5f7d1a1740..843054983c9b7 100644 --- a/boards/arm/str71x/olimex-strp711/src/str71_appinit.c +++ b/boards/arm/str71x/olimex-strp711/src/str71_boardinit.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm/str71x/olimex-strp711/src/str71_appinit.c + * boards/arm/str71x/olimex-strp711/src/str71_boardinit.c * * SPDX-License-Identifier: Apache-2.0 * @@ -47,23 +47,10 @@ #define NSH_HAVEUSBDEV 1 #ifdef CONFIG_STR71X_BSPI1 # define NSH_HAVEMMCSD 1 -# ifdef CONFIG_NSH_ARCHINIT -# if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 1 -# error "The Olimex STR-P711 MMC/SD is on BSPI1" -# undef CONFIG_NSH_MMCSDSPIPORTNO -# define CONFIG_NSH_MMCSDSPIPORTNO 0 -# endif -# if !defined(CONFIG_NSH_MMCSDSLOTNO) || CONFIG_NSH_MMCSDSLOTNO != 0 -# error "The Olimex STR-P711 MMC/SD is on BSPI1 slot 0" -# undef CONFIG_NSH_MMCSDSLOTNO -# define CONFIG_NSH_MMCSDSLOTNO 0 -# endif -# else # undef CONFIG_NSH_MMCSDSPIPORTNO # define CONFIG_NSH_MMCSDSPIPORTNO 0 # undef CONFIG_NSH_MMCSDSLOTNO # define CONFIG_NSH_MMCSDSLOTNO 0 -# endif #else # undef NSH_HAVEMMCSD #endif @@ -89,31 +76,20 @@ ****************************************************************************/ /**************************************************************************** - * Name: board_app_initialize + * Name: board_late_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 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. + * 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. * ****************************************************************************/ -int board_app_initialize(uintptr_t arg) +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) { #ifdef NSH_HAVEMMCSD struct spi_dev_s *spi; @@ -129,7 +105,7 @@ int board_app_initialize(uintptr_t arg) { syslog(LOG_ERR, "ERROR: Failed to initialize SPI port %d\n", CONFIG_NSH_MMCSDSPIPORTNO); - return -ENODEV; + return; } syslog(LOG_INFO, "Successfully initialized SPI port %d\n", @@ -148,12 +124,11 @@ int board_app_initialize(uintptr_t arg) syslog(LOG_ERR, "ERROR: Failed to bind SPI port %d to MMC/SD slot %d: %d\n", CONFIG_NSH_MMCSDSPIPORTNO, CONFIG_NSH_MMCSDSLOTNO, ret); - return ret; + return; } syslog(LOG_INFO, "Successfully bound SPI port %d to MMC/SD slot %d\n", CONFIG_NSH_MMCSDSPIPORTNO, CONFIG_NSH_MMCSDSLOTNO); #endif - - return OK; } +#endif diff --git a/boards/arm/tiva/dk-tm4c129x/configs/ipv6/defconfig b/boards/arm/tiva/dk-tm4c129x/configs/ipv6/defconfig index 886391f9f5d01..ce64626c7edf7 100644 --- a/boards/arm/tiva/dk-tm4c129x/configs/ipv6/defconfig +++ b/boards/arm/tiva/dk-tm4c129x/configs/ipv6/defconfig @@ -44,7 +44,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/tiva/dk-tm4c129x/configs/nsh/defconfig b/boards/arm/tiva/dk-tm4c129x/configs/nsh/defconfig index cf810a6aaf6cd..cad650dcd127a 100644 --- a/boards/arm/tiva/dk-tm4c129x/configs/nsh/defconfig +++ b/boards/arm/tiva/dk-tm4c129x/configs/nsh/defconfig @@ -44,7 +44,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/tiva/dk-tm4c129x/src/Makefile b/boards/arm/tiva/dk-tm4c129x/src/Makefile index 840f8f204f644..e3ccd6ab6aca2 100644 --- a/boards/arm/tiva/dk-tm4c129x/src/Makefile +++ b/boards/arm/tiva/dk-tm4c129x/src/Makefile @@ -42,10 +42,6 @@ ifeq ($(CONFIG_DK_TM4C129X_TIMER),y) CSRCS += tm4c_timer.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += tm4c_appinit.c -endif - ifeq ($(CONFIG_LM75_I2C),y) ifeq ($(CONFIG_TIVA_I2C6),y) CSRCS += tm4c_tmp100.c diff --git a/boards/arm/tiva/dk-tm4c129x/src/tm4c_appinit.c b/boards/arm/tiva/dk-tm4c129x/src/tm4c_appinit.c deleted file mode 100644 index e80606eff1b87..0000000000000 --- a/boards/arm/tiva/dk-tm4c129x/src/tm4c_appinit.c +++ /dev/null @@ -1,71 +0,0 @@ -/**************************************************************************** - * boards/arm/tiva/dk-tm4c129x/src/tm4c_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 - -#include - -#include "dk-tm4c129x.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) -{ - /* If CONFIG_BOARD_LATE_INITIALIZE is selected then board initialization - * was already performed in board_late_initialize. - */ - -#ifndef CONFIG_BOARD_LATE_INITIALIZE - return tm4c_bringup(); -#else - return OK; -#endif -} diff --git a/boards/arm/tiva/eagle100/configs/nsh/defconfig b/boards/arm/tiva/eagle100/configs/nsh/defconfig index 0f7c39f4ca2a7..1d56207b4d172 100644 --- a/boards/arm/tiva/eagle100/configs/nsh/defconfig +++ b/boards/arm/tiva/eagle100/configs/nsh/defconfig @@ -36,7 +36,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/tiva/eagle100/src/Makefile b/boards/arm/tiva/eagle100/src/Makefile index 7a77e880a9473..9a11d7c221364 100644 --- a/boards/arm/tiva/eagle100/src/Makefile +++ b/boards/arm/tiva/eagle100/src/Makefile @@ -23,8 +23,5 @@ include $(TOPDIR)/Make.defs CSRCS = lm_boot.c lm_leds.c lm_ethernet.c lm_ssi.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += lm_appinit.c -endif include $(TOPDIR)/boards/Board.mk diff --git a/boards/arm/tiva/eagle100/src/lm_appinit.c b/boards/arm/tiva/eagle100/src/lm_appinit.c deleted file mode 100644 index c1bc463c9294b..0000000000000 --- a/boards/arm/tiva/eagle100/src/lm_appinit.c +++ /dev/null @@ -1,154 +0,0 @@ -/**************************************************************************** - * boards/arm/tiva/eagle100/src/lm_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 - -#include -#include -#include - -#include -#include -#include - -#include "tiva_ssi.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Configuration ************************************************************/ - -/* PORT and SLOT number probably depend on the board configuration */ - -#ifdef CONFIG_NSH_ARCHINIT -# undef NSH_HAVEUSBDEV -# define NSH_HAVEMMCSD 1 -# if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 0 -# error "The Eagle100 MMC/SD is on SSI0" -# undef CONFIG_NSH_MMCSDSPIPORTNO -# define CONFIG_NSH_MMCSDSPIPORTNO 0 -# endif -# if !defined(CONFIG_NSH_MMCSDSLOTNO) || CONFIG_NSH_MMCSDSLOTNO != 0 -# error "The Eagle100 MMC/SD is on SSI0 slot 0" -# undef CONFIG_NSH_MMCSDSLOTNO -# define CONFIG_NSH_MMCSDSLOTNO 0 -# endif -#else -# undef CONFIG_NSH_MMCSDSPIPORTNO -# define CONFIG_NSH_MMCSDSPIPORTNO 0 -# undef CONFIG_NSH_MMCSDSLOTNO -# define CONFIG_NSH_MMCSDSLOTNO 0 -#endif - -/* Can't support USB features if USB is not enabled */ - -#ifndef CONFIG_USBDEV -# undef NSH_HAVEUSBDEV -#endif - -/* Can't support MMC/SD features if mountpoints are disabled */ - -#if defined(CONFIG_DISABLE_MOUNTPOINT) -# undef NSH_HAVEMMCSD -#endif - -#ifndef CONFIG_NSH_MMCSDMINOR -# define CONFIG_NSH_MMCSDMINOR 0 -#endif - -/**************************************************************************** - * 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) -{ - struct spi_dev_s *spi; -#if defined (CONFIG_MMCSD) && defined (CONFIG_MMCSD_SPI) - int ret; -#endif - - /* Get the SPI port */ - - syslog(LOG_INFO, "Initializing SPI port %d\n", - CONFIG_NSH_MMCSDSPIPORTNO); - - spi = tiva_ssibus_initialize(CONFIG_NSH_MMCSDSPIPORTNO); - if (!spi) - { - syslog(LOG_ERR, "ERROR: Failed to initialize SPI port %d\n", - CONFIG_NSH_MMCSDSPIPORTNO); - return -ENODEV; - } - - syslog(LOG_INFO, "Successfully initialized SPI port %d\n", - CONFIG_NSH_MMCSDSPIPORTNO); - -#if defined (CONFIG_MMCSD) && defined (CONFIG_MMCSD_SPI) - /* Bind the SPI port to the slot */ - - syslog(LOG_INFO, "Binding SPI port %d to MMC/SD slot %d\n", - CONFIG_NSH_MMCSDSPIPORTNO, CONFIG_NSH_MMCSDSLOTNO); - - ret = mmcsd_spislotinitialize(CONFIG_NSH_MMCSDMINOR, - CONFIG_NSH_MMCSDSLOTNO, spi); - if (ret < 0) - { - syslog(LOG_ERR, - "ERROR: Failed to bind SPI port %d to MMC/SD slot %d: %d\n", - CONFIG_NSH_MMCSDSPIPORTNO, CONFIG_NSH_MMCSDSLOTNO, ret); - return ret; - } - - syslog(LOG_INFO, "Successfully bound SPI port %d to MMC/SD slot %d\n", - CONFIG_NSH_MMCSDSPIPORTNO, CONFIG_NSH_MMCSDSLOTNO); -#endif - - return OK; -} diff --git a/boards/arm/tiva/eagle100/src/lm_boot.c b/boards/arm/tiva/eagle100/src/lm_boot.c index df20d814624fa..5aa5fd42e2d9b 100644 --- a/boards/arm/tiva/eagle100/src/lm_boot.c +++ b/boards/arm/tiva/eagle100/src/lm_boot.c @@ -28,9 +28,16 @@ #include -#include +#include +#include +#include + #include +#include +#include +#include +#include "tiva_ssi.h" #include "arm_internal.h" #include "eagle100.h" @@ -38,6 +45,31 @@ * Pre-processor Definitions ****************************************************************************/ +/* Configuration ************************************************************/ + +/* PORT and SLOT number probably depend on the board configuration */ + +# undef CONFIG_NSH_MMCSDSPIPORTNO +# define CONFIG_NSH_MMCSDSPIPORTNO 0 +# undef CONFIG_NSH_MMCSDSLOTNO +# define CONFIG_NSH_MMCSDSLOTNO 0 + +/* Can't support USB features if USB is not enabled */ + +#ifndef CONFIG_USBDEV +# undef NSH_HAVEUSBDEV +#endif + +/* Can't support MMC/SD features if mountpoints are disabled */ + +#if defined(CONFIG_DISABLE_MOUNTPOINT) +# undef NSH_HAVEMMCSD +#endif + +#ifndef CONFIG_NSH_MMCSDMINOR +# define CONFIG_NSH_MMCSDMINOR 0 +#endif + /**************************************************************************** * Private Functions ****************************************************************************/ @@ -80,3 +112,62 @@ void tiva_boardinitialize(void) board_autoled_initialize(); #endif } + +/**************************************************************************** + * 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_intitialize() 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ + struct spi_dev_s *spi; +#if defined (CONFIG_MMCSD) && defined (CONFIG_MMCSD_SPI) + int ret; +#endif + + /* Get the SPI port */ + + syslog(LOG_INFO, "Initializing SPI port %d\n", + CONFIG_NSH_MMCSDSPIPORTNO); + + spi = tiva_ssibus_initialize(CONFIG_NSH_MMCSDSPIPORTNO); + if (!spi) + { + syslog(LOG_ERR, "ERROR: Failed to initialize SPI port %d\n", + CONFIG_NSH_MMCSDSPIPORTNO); + return; + } + + syslog(LOG_INFO, "Successfully initialized SPI port %d\n", + CONFIG_NSH_MMCSDSPIPORTNO); + +#if defined (CONFIG_MMCSD) && defined (CONFIG_MMCSD_SPI) + /* Bind the SPI port to the slot */ + + syslog(LOG_INFO, "Binding SPI port %d to MMC/SD slot %d\n", + CONFIG_NSH_MMCSDSPIPORTNO, CONFIG_NSH_MMCSDSLOTNO); + + ret = mmcsd_spislotinitialize(CONFIG_NSH_MMCSDMINOR, + CONFIG_NSH_MMCSDSLOTNO, spi); + if (ret < 0) + { + syslog(LOG_ERR, + "ERROR: Failed to bind SPI port %d to MMC/SD slot %d: %d\n", + CONFIG_NSH_MMCSDSPIPORTNO, CONFIG_NSH_MMCSDSLOTNO, ret); + return; + } + + syslog(LOG_INFO, "Successfully bound SPI port %d to MMC/SD slot %d\n", + CONFIG_NSH_MMCSDSPIPORTNO, CONFIG_NSH_MMCSDSLOTNO); +#endif +} +#endif /* CONFIG_BOARD_LATE_INITIALIZE */ diff --git a/boards/arm/tiva/ekk-lm3s9b96/configs/nsh/defconfig b/boards/arm/tiva/ekk-lm3s9b96/configs/nsh/defconfig index 957cbef4545a8..67c8dbd063a62 100644 --- a/boards/arm/tiva/ekk-lm3s9b96/configs/nsh/defconfig +++ b/boards/arm/tiva/ekk-lm3s9b96/configs/nsh/defconfig @@ -35,7 +35,6 @@ CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y CONFIG_NFS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/tiva/ekk-lm3s9b96/src/CMakeLists.txt b/boards/arm/tiva/ekk-lm3s9b96/src/CMakeLists.txt index 1caf62876e159..599cdb9c95144 100644 --- a/boards/arm/tiva/ekk-lm3s9b96/src/CMakeLists.txt +++ b/boards/arm/tiva/ekk-lm3s9b96/src/CMakeLists.txt @@ -21,9 +21,6 @@ # ############################################################################## set(SRCS lm_boot.c lm_leds.c lm_ethernet.c lm_ssi.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS lm_appinit.c) -endif() target_sources(board PRIVATE ${SRCS}) diff --git a/boards/arm/tiva/ekk-lm3s9b96/src/Makefile b/boards/arm/tiva/ekk-lm3s9b96/src/Makefile index 4ab93fe1d2419..852abd4a8681c 100644 --- a/boards/arm/tiva/ekk-lm3s9b96/src/Makefile +++ b/boards/arm/tiva/ekk-lm3s9b96/src/Makefile @@ -23,8 +23,5 @@ include $(TOPDIR)/Make.defs CSRCS = lm_boot.c lm_leds.c lm_ethernet.c lm_ssi.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += lm_appinit.c -endif include $(TOPDIR)/boards/Board.mk diff --git a/boards/arm/tiva/ekk-lm3s9b96/src/lm_boot.c b/boards/arm/tiva/ekk-lm3s9b96/src/lm_boot.c index 5fb97071f481d..28ed2674d0389 100644 --- a/boards/arm/tiva/ekk-lm3s9b96/src/lm_boot.c +++ b/boards/arm/tiva/ekk-lm3s9b96/src/lm_boot.c @@ -78,3 +78,23 @@ void tiva_boardinitialize(void) board_autoled_initialize(); #endif } + +/**************************************************************************** + * 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ +} +#endif diff --git a/boards/arm/tiva/launchxl-cc1310/configs/nsh/defconfig b/boards/arm/tiva/launchxl-cc1310/configs/nsh/defconfig index b896137e094ad..5ff4ee7085be5 100644 --- a/boards/arm/tiva/launchxl-cc1310/configs/nsh/defconfig +++ b/boards/arm/tiva/launchxl-cc1310/configs/nsh/defconfig @@ -24,7 +24,6 @@ CONFIG_FS_PROCFS=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/tiva/launchxl-cc1310/src/Makefile b/boards/arm/tiva/launchxl-cc1310/src/Makefile index 43d68da65b41f..088a34a87dae2 100644 --- a/boards/arm/tiva/launchxl-cc1310/src/Makefile +++ b/boards/arm/tiva/launchxl-cc1310/src/Makefile @@ -22,13 +22,7 @@ include $(TOPDIR)/Make.defs -CSRCS = cc1310_boot.c cc1310_pinconfig.c - -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += cc1310_appinit.c cc1310_bringup.c -else ifeq ($(CONFIG_BOARD_LATE_INITIALIZE),y) -CSRCS += cc1310_bringup.c -endif +CSRCS = cc1310_boot.c cc1310_pinconfig.c cc1310_bringup.c ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += cc1310_autoleds.c diff --git a/boards/arm/tiva/launchxl-cc1310/src/cc1310_appinit.c b/boards/arm/tiva/launchxl-cc1310/src/cc1310_appinit.c deleted file mode 100644 index 36ba9fed0ac59..0000000000000 --- a/boards/arm/tiva/launchxl-cc1310/src/cc1310_appinit.c +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** - * boards/arm/tiva/launchxl-cc1310/src/cc1310_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 - -#include - -#include - -#include "launchxl-cc1310.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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 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) -{ -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board initialization */ - - return cc1310_bringup(); -#else - return OK; -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/arm/tiva/launchxl-cc1312r1/configs/nsh/defconfig b/boards/arm/tiva/launchxl-cc1312r1/configs/nsh/defconfig index 0cb2eddc3c3d1..384f19f5e2a78 100644 --- a/boards/arm/tiva/launchxl-cc1312r1/configs/nsh/defconfig +++ b/boards/arm/tiva/launchxl-cc1312r1/configs/nsh/defconfig @@ -24,7 +24,6 @@ CONFIG_FS_PROCFS=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/tiva/launchxl-cc1312r1/src/CMakeLists.txt b/boards/arm/tiva/launchxl-cc1312r1/src/CMakeLists.txt index db620f4f5c8d9..8a27e4dbdf9c0 100644 --- a/boards/arm/tiva/launchxl-cc1312r1/src/CMakeLists.txt +++ b/boards/arm/tiva/launchxl-cc1312r1/src/CMakeLists.txt @@ -20,13 +20,7 @@ # # ############################################################################## -set(SRCS cc1312_boot.c cc1312_pinconfig.c) - -if(CONFIG_BOARDCTL) - list(APPEND SRCS cc1312_appinit.c cc1312_bringup.c) -elseif(CONFIG_BOARD_LATE_INITIALIZE) - list(APPEND SRCS cc1312_bringup.c) -endif() +set(SRCS cc1312_boot.c cc1312_pinconfig.c cc1312_bringup.c) if(CONFIG_ARCH_LEDS) list(APPEND SRCS cc1312_autoleds.c) diff --git a/boards/arm/tiva/launchxl-cc1312r1/src/Makefile b/boards/arm/tiva/launchxl-cc1312r1/src/Makefile index ff9920c64ca8d..a3656450a5871 100644 --- a/boards/arm/tiva/launchxl-cc1312r1/src/Makefile +++ b/boards/arm/tiva/launchxl-cc1312r1/src/Makefile @@ -22,13 +22,7 @@ include $(TOPDIR)/Make.defs -CSRCS = cc1312_boot.c cc1312_pinconfig.c - -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += cc1312_appinit.c cc1312_bringup.c -else ifeq ($(CONFIG_BOARD_LATE_INITIALIZE),y) -CSRCS += cc1312_bringup.c -endif +CSRCS = cc1312_boot.c cc1312_pinconfig.c cc1312_bringup.c ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += cc1312_autoleds.c diff --git a/boards/arm/tiva/launchxl-cc1312r1/src/cc1312_appinit.c b/boards/arm/tiva/launchxl-cc1312r1/src/cc1312_appinit.c deleted file mode 100644 index 4beb1fac78f65..0000000000000 --- a/boards/arm/tiva/launchxl-cc1312r1/src/cc1312_appinit.c +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** - * boards/arm/tiva/launchxl-cc1312r1/src/cc1312_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 - -#include - -#include - -#include "launchxl-cc1312r1.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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 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) -{ -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board initialization */ - - return cc1312_bringup(); -#else - return OK; -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/arm/tiva/lm3s6432-s2e/configs/nsh/defconfig b/boards/arm/tiva/lm3s6432-s2e/configs/nsh/defconfig index eb4f22c8cb1d4..9543471635886 100644 --- a/boards/arm/tiva/lm3s6432-s2e/configs/nsh/defconfig +++ b/boards/arm/tiva/lm3s6432-s2e/configs/nsh/defconfig @@ -36,7 +36,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/tiva/lm3s6432-s2e/src/Makefile b/boards/arm/tiva/lm3s6432-s2e/src/Makefile index 35fa6b3ce41ae..29230464b74d6 100644 --- a/boards/arm/tiva/lm3s6432-s2e/src/Makefile +++ b/boards/arm/tiva/lm3s6432-s2e/src/Makefile @@ -23,8 +23,5 @@ include $(TOPDIR)/Make.defs CSRCS = lm_boot.c lm_leds.c lm_ethernet.c lm_ssi.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += lm_appinit.c -endif include $(TOPDIR)/boards/Board.mk diff --git a/boards/arm/tiva/lm3s6432-s2e/src/lm_appinit.c b/boards/arm/tiva/lm3s6432-s2e/src/lm_appinit.c deleted file mode 100644 index bd12ec3a6422a..0000000000000 --- a/boards/arm/tiva/lm3s6432-s2e/src/lm_appinit.c +++ /dev/null @@ -1,67 +0,0 @@ -/**************************************************************************** - * boards/arm/tiva/lm3s6432-s2e/src/lm_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 - -#include -#include -#include - -#include -#include -#include - -/**************************************************************************** - * 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) -{ - return OK; -} diff --git a/boards/arm/tiva/lm3s6432-s2e/src/lm_boot.c b/boards/arm/tiva/lm3s6432-s2e/src/lm_boot.c index 497a27e5d8ccf..2eb9b0b3fec03 100644 --- a/boards/arm/tiva/lm3s6432-s2e/src/lm_boot.c +++ b/boards/arm/tiva/lm3s6432-s2e/src/lm_boot.c @@ -91,3 +91,23 @@ void tiva_boardinitialize(void) tiva_configgpio(XCVR_ON_GPIO); tiva_configgpio(XCVR_OFF_GPIO); } + +/**************************************************************************** + * 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ +} +#endif diff --git a/boards/arm/tiva/lm3s6965-ek/configs/discover/defconfig b/boards/arm/tiva/lm3s6965-ek/configs/discover/defconfig index 76b01ac3d7c4b..ed5d8e262b674 100644 --- a/boards/arm/tiva/lm3s6965-ek/configs/discover/defconfig +++ b/boards/arm/tiva/lm3s6965-ek/configs/discover/defconfig @@ -42,7 +42,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/tiva/lm3s6965-ek/configs/nsh/defconfig b/boards/arm/tiva/lm3s6965-ek/configs/nsh/defconfig index b6d2ee61a8f07..629b7f5eca70d 100644 --- a/boards/arm/tiva/lm3s6965-ek/configs/nsh/defconfig +++ b/boards/arm/tiva/lm3s6965-ek/configs/nsh/defconfig @@ -38,7 +38,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/tiva/lm3s6965-ek/configs/qemu-flat/defconfig b/boards/arm/tiva/lm3s6965-ek/configs/qemu-flat/defconfig index 0b9a51565e69a..29f63217a295f 100644 --- a/boards/arm/tiva/lm3s6965-ek/configs/qemu-flat/defconfig +++ b/boards/arm/tiva/lm3s6965-ek/configs/qemu-flat/defconfig @@ -57,7 +57,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/tiva/lm3s6965-ek/configs/qemu-protected/defconfig b/boards/arm/tiva/lm3s6965-ek/configs/qemu-protected/defconfig index 05c76a4be5143..a2c7f48448380 100644 --- a/boards/arm/tiva/lm3s6965-ek/configs/qemu-protected/defconfig +++ b/boards/arm/tiva/lm3s6965-ek/configs/qemu-protected/defconfig @@ -59,7 +59,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm/tiva/lm3s6965-ek/src/CMakeLists.txt b/boards/arm/tiva/lm3s6965-ek/src/CMakeLists.txt index ed90349c799f2..bf265b59c5b88 100644 --- a/boards/arm/tiva/lm3s6965-ek/src/CMakeLists.txt +++ b/boards/arm/tiva/lm3s6965-ek/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS lm_boot.c lm_leds.c lm_ethernet.c lm_ssi.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS lm_appinit.c) -endif() - if(CONFIG_NX_LCDDRIVER) list(APPEND SRCS lm_oled.c) endif() diff --git a/boards/arm/tiva/lm3s6965-ek/src/Makefile b/boards/arm/tiva/lm3s6965-ek/src/Makefile index 4aa7f7dca8c48..6a64b5cdfabd7 100644 --- a/boards/arm/tiva/lm3s6965-ek/src/Makefile +++ b/boards/arm/tiva/lm3s6965-ek/src/Makefile @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = lm_boot.c lm_leds.c lm_ethernet.c lm_ssi.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += lm_appinit.c -endif - ifeq ($(CONFIG_NX_LCDDRIVER),y) CSRCS += lm_oled.c endif diff --git a/boards/arm/tiva/lm3s6965-ek/src/lm_appinit.c b/boards/arm/tiva/lm3s6965-ek/src/lm_appinit.c deleted file mode 100644 index 9508324080aa8..0000000000000 --- a/boards/arm/tiva/lm3s6965-ek/src/lm_appinit.c +++ /dev/null @@ -1,65 +0,0 @@ -/**************************************************************************** - * boards/arm/tiva/lm3s6965-ek/src/lm_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 - -#include "lm3s6965-ek.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) -{ -#ifndef CONFIG_BOARD_LATE_INITIALIZE - return lm_bringup(); -#else - return OK; -#endif -} diff --git a/boards/arm/tiva/lm3s6965-ek/src/lm_bringup.c b/boards/arm/tiva/lm3s6965-ek/src/lm_bringup.c index 6c6c8c831d373..67119222df854 100644 --- a/boards/arm/tiva/lm3s6965-ek/src/lm_bringup.c +++ b/boards/arm/tiva/lm3s6965-ek/src/lm_bringup.c @@ -56,28 +56,12 @@ /* PORT and SLOT number depend on the board configuration */ -#ifdef CONFIG_NSH_ARCHINIT -# if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 0 -# error "The LM3S6965 Eval Kit MMC/SD is on SSI0" -# undef CONFIG_NSH_MMCSDSPIPORTNO -# define CONFIG_NSH_MMCSDSPIPORTNO 0 -# endif -# if !defined(CONFIG_NSH_MMCSDSLOTNO) || CONFIG_NSH_MMCSDSLOTNO != 0 -# error "The LM3S6965 Eval Kit MMC/SD is on SSI0 slot 0" -# undef CONFIG_NSH_MMCSDSLOTNO -# define CONFIG_NSH_MMCSDSLOTNO 0 -# endif -# ifndef CONFIG_NSH_MMCSDMINOR -# define CONFIG_NSH_MMCSDMINOR 0 -# endif -#else # undef CONFIG_NSH_MMCSDSPIPORTNO # define CONFIG_NSH_MMCSDSPIPORTNO 0 # undef CONFIG_NSH_MMCSDSLOTNO # define CONFIG_NSH_MMCSDSLOTNO 0 # undef CONFIG_NSH_MMCSDMINOR # define CONFIG_NSH_MMCSDMINOR 0 -#endif /**************************************************************************** * Public Functions diff --git a/boards/arm/tiva/lm3s8962-ek/configs/nsh/defconfig b/boards/arm/tiva/lm3s8962-ek/configs/nsh/defconfig index 628156d0f6d54..1020d25cd6980 100644 --- a/boards/arm/tiva/lm3s8962-ek/configs/nsh/defconfig +++ b/boards/arm/tiva/lm3s8962-ek/configs/nsh/defconfig @@ -38,7 +38,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/arm/tiva/lm3s8962-ek/src/CMakeLists.txt b/boards/arm/tiva/lm3s8962-ek/src/CMakeLists.txt index 6390263df1003..cffecb245e1a4 100644 --- a/boards/arm/tiva/lm3s8962-ek/src/CMakeLists.txt +++ b/boards/arm/tiva/lm3s8962-ek/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS lm_boot.c lm_leds.c lm_ethernet.c lm_ssi.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS lm_appinit.c) -endif() - if(CONFIG_NX_LCDDRIVER) list(APPEND SRCS lm_oled.c) endif() diff --git a/boards/arm/tiva/lm3s8962-ek/src/Makefile b/boards/arm/tiva/lm3s8962-ek/src/Makefile index f1bfb5484bffa..ab3f0300a364f 100644 --- a/boards/arm/tiva/lm3s8962-ek/src/Makefile +++ b/boards/arm/tiva/lm3s8962-ek/src/Makefile @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = lm_boot.c lm_leds.c lm_ethernet.c lm_ssi.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += lm_appinit.c -endif - ifeq ($(CONFIG_NX_LCDDRIVER),y) CSRCS += lm_oled.c endif diff --git a/boards/arm/tiva/lm3s8962-ek/src/lm_appinit.c b/boards/arm/tiva/lm3s8962-ek/src/lm_appinit.c deleted file mode 100644 index 7f5dc485cc3fc..0000000000000 --- a/boards/arm/tiva/lm3s8962-ek/src/lm_appinit.c +++ /dev/null @@ -1,157 +0,0 @@ -/**************************************************************************** - * boards/arm/tiva/lm3s8962-ek/src/lm_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 - -#include -#include -#include - -#include -#include -#include - -#include "tiva_ssi.h" -#include "lm3s8962-ek.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Configuration ************************************************************/ - -#undef NSH_HAVEUSBDEV -#define NSH_HAVEMMCSD 1 - -/* PORT and SLOT number depend on the board configuration */ - -#ifdef CONFIG_NSH_ARCHINIT -# if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 0 -# error "The LM3S8962 Eval Kit MMC/SD is on SSI0" -# undef CONFIG_NSH_MMCSDSPIPORTNO -# define CONFIG_NSH_MMCSDSPIPORTNO 0 -# endif - -# if !defined(CONFIG_NSH_MMCSDSLOTNO) || CONFIG_NSH_MMCSDSLOTNO != 0 -# error "The LM3S8962 Eval Kit MMC/SD is on SSI0 slot 0" -# undef CONFIG_NSH_MMCSDSLOTNO -# define CONFIG_NSH_MMCSDSLOTNO 0 -# endif - -# ifndef CONFIG_NSH_MMCSDMINOR -# define CONFIG_NSH_MMCSDMINOR 0 -# endif - -#else -# undef CONFIG_NSH_MMCSDSPIPORTNO -# define CONFIG_NSH_MMCSDSPIPORTNO 0 -# undef CONFIG_NSH_MMCSDSLOTNO -# define CONFIG_NSH_MMCSDSLOTNO 0 -# undef CONFIG_NSH_MMCSDMINOR -# define CONFIG_NSH_MMCSDMINOR 0 -#endif - -/* Can't support USB features if USB is not enabled */ - -#ifndef CONFIG_USBDEV -# undef NSH_HAVEUSBDEV -#endif - -/* Can't support MMC/SD features if mountpoints are disabled */ - -#if defined(CONFIG_DISABLE_MOUNTPOINT) -# undef NSH_HAVEMMCSD -#endif - -/**************************************************************************** - * 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 NSH_HAVEMMCSD - struct spi_dev_s *spi; - int ret; - - /* Get the SPI port */ - - syslog(LOG_INFO, "Initializing SPI port %d\n", - CONFIG_NSH_MMCSDSPIPORTNO); - - spi = tiva_ssibus_initialize(CONFIG_NSH_MMCSDSPIPORTNO); - if (!spi) - { - syslog(LOG_ERR, "ERROR: Failed to initialize SPI port %d\n", - CONFIG_NSH_MMCSDSPIPORTNO); - return -ENODEV; - } - - syslog(LOG_INFO, "Successfully initialized SPI port %d\n", - CONFIG_NSH_MMCSDSPIPORTNO); - - /* Bind the SPI port to the slot */ - - syslog(LOG_INFO, "Binding SPI port %d to MMC/SD slot %d\n", - CONFIG_NSH_MMCSDSPIPORTNO, CONFIG_NSH_MMCSDSLOTNO); - - ret = mmcsd_spislotinitialize(CONFIG_NSH_MMCSDMINOR, - CONFIG_NSH_MMCSDSLOTNO, spi); - if (ret < 0) - { - syslog(LOG_ERR, - "ERROR: Failed to bind SPI port %d to MMC/SD slot %d: %d\n", - CONFIG_NSH_MMCSDSPIPORTNO, CONFIG_NSH_MMCSDSLOTNO, ret); - return ret; - } - - syslog(LOG_INFO, "Successfully bound SPI port %d to MMC/SD slot %d\n", - CONFIG_NSH_MMCSDSPIPORTNO, CONFIG_NSH_MMCSDSLOTNO); -#endif - return OK; -} diff --git a/boards/arm/tiva/lm3s8962-ek/src/lm_boot.c b/boards/arm/tiva/lm3s8962-ek/src/lm_boot.c index e76250d7f210e..79da202b0e8fc 100644 --- a/boards/arm/tiva/lm3s8962-ek/src/lm_boot.c +++ b/boards/arm/tiva/lm3s8962-ek/src/lm_boot.c @@ -28,16 +28,50 @@ #include +#include +#include +#include +#include + #include #include +#include +#include #include "arm_internal.h" +#include "tiva_ssi.h" #include "lm3s8962-ek.h" /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ +/* Configuration ************************************************************/ + +#undef NSH_HAVEUSBDEV +#define NSH_HAVEMMCSD 1 + +/* PORT and SLOT number depend on the board configuration */ + +# undef CONFIG_NSH_MMCSDSPIPORTNO +# define CONFIG_NSH_MMCSDSPIPORTNO 0 +# undef CONFIG_NSH_MMCSDSLOTNO +# define CONFIG_NSH_MMCSDSLOTNO 0 +# undef CONFIG_NSH_MMCSDMINOR +# define CONFIG_NSH_MMCSDMINOR 0 + +/* Can't support USB features if USB is not enabled */ + +#ifndef CONFIG_USBDEV +# undef NSH_HAVEUSBDEV +#endif + +/* Can't support MMC/SD features if mountpoints are disabled */ + +#if defined(CONFIG_DISABLE_MOUNTPOINT) +# undef NSH_HAVEMMCSD +#endif + /**************************************************************************** * Private Functions ****************************************************************************/ @@ -82,3 +116,60 @@ void tiva_boardinitialize(void) board_autoled_initialize(); #endif } + +/**************************************************************************** + * 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_intitialize() 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ +#ifdef NSH_HAVEMMCSD + struct spi_dev_s *spi; + int ret; + + /* Get the SPI port */ + + syslog(LOG_INFO, "Initializing SPI port %d\n", + CONFIG_NSH_MMCSDSPIPORTNO); + + spi = tiva_ssibus_initialize(CONFIG_NSH_MMCSDSPIPORTNO); + if (!spi) + { + syslog(LOG_ERR, "ERROR: Failed to initialize SPI port %d\n", + CONFIG_NSH_MMCSDSPIPORTNO); + return; + } + + syslog(LOG_INFO, "Successfully initialized SPI port %d\n", + CONFIG_NSH_MMCSDSPIPORTNO); + + /* Bind the SPI port to the slot */ + + syslog(LOG_INFO, "Binding SPI port %d to MMC/SD slot %d\n", + CONFIG_NSH_MMCSDSPIPORTNO, CONFIG_NSH_MMCSDSLOTNO); + + ret = mmcsd_spislotinitialize(CONFIG_NSH_MMCSDMINOR, + CONFIG_NSH_MMCSDSLOTNO, spi); + if (ret < 0) + { + syslog(LOG_ERR, + "ERROR: Failed to bind SPI port %d to MMC/SD slot %d: %d\n", + CONFIG_NSH_MMCSDSPIPORTNO, CONFIG_NSH_MMCSDSLOTNO, ret); + return; + } + + syslog(LOG_INFO, "Successfully bound SPI port %d to MMC/SD slot %d\n", + CONFIG_NSH_MMCSDSPIPORTNO, CONFIG_NSH_MMCSDSLOTNO); +#endif +} +#endif /* CONFIG_BOARD_LATE_INITIALIZE */ diff --git a/boards/arm/tiva/lm4f120-launchpad/src/CMakeLists.txt b/boards/arm/tiva/lm4f120-launchpad/src/CMakeLists.txt index ec94f630c5adb..f3cbbfde28c73 100644 --- a/boards/arm/tiva/lm4f120-launchpad/src/CMakeLists.txt +++ b/boards/arm/tiva/lm4f120-launchpad/src/CMakeLists.txt @@ -26,10 +26,6 @@ if(CONFIG_ARCH_LEDS) list(APPEND SRCS lm4f_autoleds.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS lm4f_appinit.c) -endif() - target_sources(board PRIVATE ${SRCS}) set_property(GLOBAL PROPERTY LD_SCRIPT diff --git a/boards/arm/tiva/lm4f120-launchpad/src/Makefile b/boards/arm/tiva/lm4f120-launchpad/src/Makefile index 44a032d37406a..0bd274272773e 100644 --- a/boards/arm/tiva/lm4f120-launchpad/src/Makefile +++ b/boards/arm/tiva/lm4f120-launchpad/src/Makefile @@ -28,8 +28,4 @@ ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += lm4f_autoleds.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += lm4f_appinit.c -endif - include $(TOPDIR)/boards/Board.mk diff --git a/boards/arm/tiva/lm4f120-launchpad/src/lm4f_appinit.c b/boards/arm/tiva/lm4f120-launchpad/src/lm4f_appinit.c deleted file mode 100644 index 7829c953693f3..0000000000000 --- a/boards/arm/tiva/lm4f120-launchpad/src/lm4f_appinit.c +++ /dev/null @@ -1,88 +0,0 @@ -/**************************************************************************** - * boards/arm/tiva/lm4f120-launchpad/src/lm4f_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 - -#include -#include -#include - -#include -#include -#include - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Configuration ************************************************************/ - -/* PORT and SLOT number probably depend on the board configuration */ - -#ifdef CONFIG_ARCH_BOARD_LM4F120_LAUNCHPAD -# undef NSH_HAVEUSBDEV -#else -# error "Unrecognized lm3s board" -# undef NSH_HAVEUSBDEV -#endif - -/* Can't support USB features if USB is not enabled */ - -#ifndef CONFIG_USBDEV -# undef NSH_HAVEUSBDEV -#endif - -/**************************************************************************** - * 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) -{ - return OK; -} diff --git a/boards/arm/tiva/lm4f120-launchpad/src/lm4f_boot.c b/boards/arm/tiva/lm4f120-launchpad/src/lm4f_boot.c index 6f50458dc15f7..7fdf002fd3857 100644 --- a/boards/arm/tiva/lm4f120-launchpad/src/lm4f_boot.c +++ b/boards/arm/tiva/lm4f120-launchpad/src/lm4f_boot.c @@ -81,3 +81,22 @@ void tiva_boardinitialize(void) lm4f_led_initialize(); #endif } + +/**************************************************************************** + * 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_intitialize() 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ +} +#endif /* CONFIG_BOARD_LATE_INITIALIZE */ diff --git a/boards/arm/tiva/tm4c123g-launchpad/Kconfig b/boards/arm/tiva/tm4c123g-launchpad/Kconfig index 764eaaf5f01c0..ddc788df56cc1 100644 --- a/boards/arm/tiva/tm4c123g-launchpad/Kconfig +++ b/boards/arm/tiva/tm4c123g-launchpad/Kconfig @@ -8,7 +8,7 @@ if ARCH_BOARD_TM4C123G_LAUNCHPAD config TM4C123G_LAUNCHPAD_AT24_BLOCKMOUNT bool "AT24 Serial EEPROM auto-mount" default n - depends on NSH_ARCHINIT && TIVA_I2C0 && MTD_AT24XX + depends on BOARD_LATE_INITIALIZE && TIVA_I2C0 && MTD_AT24XX ---help--- Automatically initialize the AT24 SPI EEPROM driver when NSH starts. diff --git a/boards/arm/tiva/tm4c123g-launchpad/configs/mcp2515/defconfig b/boards/arm/tiva/tm4c123g-launchpad/configs/mcp2515/defconfig index 5d29673fc9cd1..b53cb45120d55 100644 --- a/boards/arm/tiva/tm4c123g-launchpad/configs/mcp2515/defconfig +++ b/boards/arm/tiva/tm4c123g-launchpad/configs/mcp2515/defconfig @@ -31,7 +31,6 @@ CONFIG_LINE_MAX=64 CONFIG_MCP2515_PHASESEG1=3 CONFIG_MCP2515_PROPSEG=1 CONFIG_MCP2515_SPI_SCK_FREQUENCY=4000000 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/tiva/tm4c123g-launchpad/configs/nsh/defconfig b/boards/arm/tiva/tm4c123g-launchpad/configs/nsh/defconfig index 174422970437b..4c71404d39124 100644 --- a/boards/arm/tiva/tm4c123g-launchpad/configs/nsh/defconfig +++ b/boards/arm/tiva/tm4c123g-launchpad/configs/nsh/defconfig @@ -21,7 +21,6 @@ CONFIG_BOARD_LOOPSPERMSEC=4531 CONFIG_BUILTIN=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/tiva/tm4c123g-launchpad/src/CMakeLists.txt b/boards/arm/tiva/tm4c123g-launchpad/src/CMakeLists.txt index 72391990e0541..e3b5b336d5f9f 100644 --- a/boards/arm/tiva/tm4c123g-launchpad/src/CMakeLists.txt +++ b/boards/arm/tiva/tm4c123g-launchpad/src/CMakeLists.txt @@ -26,10 +26,6 @@ if(CONFIG_ARCH_LEDS) list(APPEND SRCS tm4c_autoleds.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS tm4c_appinit.c) -endif() - if(CONFIG_TIVA_TIMER) list(APPEND SRCS tm4c_timer.c) endif() diff --git a/boards/arm/tiva/tm4c123g-launchpad/src/Makefile b/boards/arm/tiva/tm4c123g-launchpad/src/Makefile index fbe9688c42379..6cadab7894602 100644 --- a/boards/arm/tiva/tm4c123g-launchpad/src/Makefile +++ b/boards/arm/tiva/tm4c123g-launchpad/src/Makefile @@ -28,10 +28,6 @@ ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += tm4c_autoleds.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += tm4c_appinit.c -endif - ifeq ($(CONFIG_TIVA_TIMER),y) CSRCS += tm4c_timer.c endif diff --git a/boards/arm/tiva/tm4c123g-launchpad/src/tm4c_appinit.c b/boards/arm/tiva/tm4c123g-launchpad/src/tm4c_appinit.c deleted file mode 100644 index cad9059550cad..0000000000000 --- a/boards/arm/tiva/tm4c123g-launchpad/src/tm4c_appinit.c +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** - * boards/arm/tiva/tm4c123g-launchpad/src/tm4c_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 - -#include - -#include "tm4c123g-launchpad.h" - -/**************************************************************************** - * 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 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) -{ - /* If CONFIG_BOARD_LATE_INITIALIZE is selected then board initialization - * was already performed in board_late_initialize. - */ - -#ifndef CONFIG_BOARD_LATE_INITIALIZE - return tm4c_bringup(); -#else - return OK; -#endif -} diff --git a/boards/arm/tiva/tm4c1294-launchpad/configs/ipv6/defconfig b/boards/arm/tiva/tm4c1294-launchpad/configs/ipv6/defconfig index 9083a9bdfbc25..de73d32e1bb4d 100644 --- a/boards/arm/tiva/tm4c1294-launchpad/configs/ipv6/defconfig +++ b/boards/arm/tiva/tm4c1294-launchpad/configs/ipv6/defconfig @@ -43,7 +43,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/tiva/tm4c1294-launchpad/configs/nsh/defconfig b/boards/arm/tiva/tm4c1294-launchpad/configs/nsh/defconfig index d5defbce25550..b1b5b9cf72ba3 100644 --- a/boards/arm/tiva/tm4c1294-launchpad/configs/nsh/defconfig +++ b/boards/arm/tiva/tm4c1294-launchpad/configs/nsh/defconfig @@ -42,7 +42,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/tiva/tm4c1294-launchpad/src/CMakeLists.txt b/boards/arm/tiva/tm4c1294-launchpad/src/CMakeLists.txt index 6ad85a24977cf..0a11d8151afc3 100644 --- a/boards/arm/tiva/tm4c1294-launchpad/src/CMakeLists.txt +++ b/boards/arm/tiva/tm4c1294-launchpad/src/CMakeLists.txt @@ -44,10 +44,6 @@ if(CONFIG_DK_TM4C129X_TIMER) list(APPEND SRCS tm4c_timer.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS tm4c_appinit.c) -endif() - if(CONFIG_TIVA_HCIUART) if(CONFIG_BLUETOOTH_UART) list(APPEND SRCS tm4c_hciuart.c) diff --git a/boards/arm/tiva/tm4c1294-launchpad/src/Makefile b/boards/arm/tiva/tm4c1294-launchpad/src/Makefile index 615fe7d9484e1..ea90f74df05a5 100644 --- a/boards/arm/tiva/tm4c1294-launchpad/src/Makefile +++ b/boards/arm/tiva/tm4c1294-launchpad/src/Makefile @@ -46,10 +46,6 @@ ifeq ($(CONFIG_DK_TM4C129X_TIMER),y) CSRCS += tm4c_timer.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += tm4c_appinit.c -endif - ifeq ($(CONFIG_TIVA_HCIUART),y) ifeq ($(CONFIG_BLUETOOTH_UART),y) CSRCS += tm4c_hciuart.c diff --git a/boards/arm/tiva/tm4c1294-launchpad/src/tm4c_appinit.c b/boards/arm/tiva/tm4c1294-launchpad/src/tm4c_appinit.c deleted file mode 100644 index 641790b40e203..0000000000000 --- a/boards/arm/tiva/tm4c1294-launchpad/src/tm4c_appinit.c +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** - * boards/arm/tiva/tm4c1294-launchpad/src/tm4c_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 - -#include - -#include "tm4c1294-launchpad.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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 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) -{ - /* If CONFIG_BOARD_LATE_INITIALIZE is selected then board initialization - * was already performed in board_late_initialize. - */ - -#ifndef CONFIG_BOARD_LATE_INITIALIZE - return tm4c_bringup(); -#else - return OK; -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/arm/tiva/tm4c129e-launchpad/configs/ipv6/defconfig b/boards/arm/tiva/tm4c129e-launchpad/configs/ipv6/defconfig index 7b8eff0485c5b..2577a4d728192 100644 --- a/boards/arm/tiva/tm4c129e-launchpad/configs/ipv6/defconfig +++ b/boards/arm/tiva/tm4c129e-launchpad/configs/ipv6/defconfig @@ -40,7 +40,6 @@ CONFIG_NET_TCP_NOTIFIER=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_NOTIFIER=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/tiva/tm4c129e-launchpad/configs/nsh/defconfig b/boards/arm/tiva/tm4c129e-launchpad/configs/nsh/defconfig index 09205b2f66ef7..8ad0ace21c4ee 100644 --- a/boards/arm/tiva/tm4c129e-launchpad/configs/nsh/defconfig +++ b/boards/arm/tiva/tm4c129e-launchpad/configs/nsh/defconfig @@ -44,7 +44,6 @@ CONFIG_NET_TCP_NOTIFIER=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_NOTIFIER=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/tiva/tm4c129e-launchpad/configs/ostest/defconfig b/boards/arm/tiva/tm4c129e-launchpad/configs/ostest/defconfig index 918f33383f5d6..671a733270ee0 100644 --- a/boards/arm/tiva/tm4c129e-launchpad/configs/ostest/defconfig +++ b/boards/arm/tiva/tm4c129e-launchpad/configs/ostest/defconfig @@ -48,7 +48,6 @@ CONFIG_NET_TCP_NOTIFIER=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_NOTIFIER=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/tiva/tm4c129e-launchpad/src/CMakeLists.txt b/boards/arm/tiva/tm4c129e-launchpad/src/CMakeLists.txt index 70c5f2f0b4ce4..55e71e0bd3af0 100644 --- a/boards/arm/tiva/tm4c129e-launchpad/src/CMakeLists.txt +++ b/boards/arm/tiva/tm4c129e-launchpad/src/CMakeLists.txt @@ -40,10 +40,6 @@ if(CONFIG_DK_TM4C129X_TIMER) list(APPEND SRCS tm4c_timer.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS tm4c_appinit.c) -endif() - if(CONFIG_TIVA_HCIUART) if(CONFIG_BLUETOOTH_UART) list(APPEND SRCS tm4c_hciuart.c) diff --git a/boards/arm/tiva/tm4c129e-launchpad/src/Makefile b/boards/arm/tiva/tm4c129e-launchpad/src/Makefile index 88d145ea114c7..4c044c4f75209 100644 --- a/boards/arm/tiva/tm4c129e-launchpad/src/Makefile +++ b/boards/arm/tiva/tm4c129e-launchpad/src/Makefile @@ -42,10 +42,6 @@ ifeq ($(CONFIG_DK_TM4C129X_TIMER),y) CSRCS += tm4c_timer.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += tm4c_appinit.c -endif - ifeq ($(CONFIG_TIVA_HCIUART),y) ifeq ($(CONFIG_BLUETOOTH_UART),y) CSRCS += tm4c_hciuart.c diff --git a/boards/arm/tiva/tm4c129e-launchpad/src/tm4c_appinit.c b/boards/arm/tiva/tm4c129e-launchpad/src/tm4c_appinit.c deleted file mode 100644 index dc063beb5ad94..0000000000000 --- a/boards/arm/tiva/tm4c129e-launchpad/src/tm4c_appinit.c +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** - * boards/arm/tiva/tm4c129e-launchpad/src/tm4c_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 - -#include - -#include "tm4c129e-launchpad.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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 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) -{ - /* If CONFIG_BOARD_LATE_INITIALIZE is selected then board initialization - * was already performed in board_late_initialize. - */ - -#ifndef CONFIG_BOARD_LATE_INITIALIZE - return tm4c_bringup(); -#else - return OK; -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/arm/tlsr82/tlsr8278adk80d/configs/nsh/defconfig b/boards/arm/tlsr82/tlsr8278adk80d/configs/nsh/defconfig index b5a38c2d853f5..ff3c4a890b84c 100644 --- a/boards/arm/tlsr82/tlsr8278adk80d/configs/nsh/defconfig +++ b/boards/arm/tlsr82/tlsr8278adk80d/configs/nsh/defconfig @@ -44,7 +44,6 @@ CONFIG_ARCH_INTERRUPTSTACK=1024 CONFIG_ARCH_SETJMP_H=y CONFIG_ARCH_STACKDUMP=y CONFIG_BOARDCTL=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=2000 CONFIG_BUILTIN=y CONFIG_DEBUG_ASSERTIONS=y diff --git a/boards/arm/tlsr82/tlsr8278adk80d/src/Makefile b/boards/arm/tlsr82/tlsr8278adk80d/src/Makefile index 2b59f16ecbadb..a378eba63c31b 100644 --- a/boards/arm/tlsr82/tlsr8278adk80d/src/Makefile +++ b/boards/arm/tlsr82/tlsr8278adk80d/src/Makefile @@ -22,7 +22,6 @@ include $(TOPDIR)/Make.defs -CSRCS = tlsr8278_appinit.c CSRCS += tlsr8278_bringup.c tlsr8278_boot.c CSRCS += tlsr8278_gpio.c diff --git a/boards/arm/tlsr82/tlsr8278adk80d/src/tlsr8278_appinit.c b/boards/arm/tlsr82/tlsr8278adk80d/src/tlsr8278_appinit.c deleted file mode 100644 index b172f9c7ca1a5..0000000000000 --- a/boards/arm/tlsr82/tlsr8278adk80d/src/tlsr8278_appinit.c +++ /dev/null @@ -1,94 +0,0 @@ -/**************************************************************************** - * boards/arm/tlsr82/tlsr8278adk80d/src/tlsr8278_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 - -#include -#include - -#include "tlsr8278adk80d.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -#define TELINK_LIB_VAR_PASTE(v) tl_multi_addr_##v - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -uint16_t TELINK_LIB_VAR_PASTE(L); -uint16_t TELINK_LIB_VAR_PASTE(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) -{ - UNUSED(arg); - - /* Perform board-specific initialization */ - - return 0; -} - -#ifdef CONFIG_BOARDCTL_IOCTL -int board_ioctl(unsigned int cmd, uintptr_t arg) -{ - switch (cmd) - { - default: - return -EINVAL; - } - - return OK; -} -#endif diff --git a/boards/arm/tlsr82/tlsr8278adk80d/src/tlsr8278_boot.c b/boards/arm/tlsr82/tlsr8278adk80d/src/tlsr8278_boot.c index b007bf1958ce8..5c1448358bf84 100644 --- a/boards/arm/tlsr82/tlsr8278adk80d/src/tlsr8278_boot.c +++ b/boards/arm/tlsr82/tlsr8278adk80d/src/tlsr8278_boot.c @@ -26,8 +26,24 @@ #include +#include +#include + #include "tlsr8278adk80d.h" +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +#define TELINK_LIB_VAR_PASTE(v) tl_multi_addr_##v + +/**************************************************************************** + * Public Data + ****************************************************************************/ + +uint16_t TELINK_LIB_VAR_PASTE(L); +uint16_t TELINK_LIB_VAR_PASTE(H); + /**************************************************************************** * Public Functions ****************************************************************************/ @@ -40,3 +56,16 @@ void board_late_initialize(void) tlsr8278_bringup(); } #endif + +#ifdef CONFIG_BOARDCTL_IOCTL +int board_ioctl(unsigned int cmd, uintptr_t arg) +{ + switch (cmd) + { + default: + return -EINVAL; + } + + return OK; +} +#endif diff --git a/boards/arm/tms570/launchxl-tms57004/configs/nsh/defconfig b/boards/arm/tms570/launchxl-tms57004/configs/nsh/defconfig index 644185000c15f..3dc783f150f54 100644 --- a/boards/arm/tms570/launchxl-tms57004/configs/nsh/defconfig +++ b/boards/arm/tms570/launchxl-tms57004/configs/nsh/defconfig @@ -28,7 +28,6 @@ CONFIG_HOST_WINDOWS=y CONFIG_I2C=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/tms570/launchxl-tms57004/src/CMakeLists.txt b/boards/arm/tms570/launchxl-tms57004/src/CMakeLists.txt index b63ec22d3404f..41150905be296 100644 --- a/boards/arm/tms570/launchxl-tms57004/src/CMakeLists.txt +++ b/boards/arm/tms570/launchxl-tms57004/src/CMakeLists.txt @@ -32,10 +32,6 @@ if(CONFIG_ARCH_BUTTONS) list(APPEND SRCS tms570_buttons.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS tms570_appinit.c) -endif() - target_sources(board PRIVATE ${SRCS}) set_property(GLOBAL PROPERTY LD_SCRIPT diff --git a/boards/arm/tms570/launchxl-tms57004/src/Makefile b/boards/arm/tms570/launchxl-tms57004/src/Makefile index fc5827a96bff8..a87fd6a7b5959 100644 --- a/boards/arm/tms570/launchxl-tms57004/src/Makefile +++ b/boards/arm/tms570/launchxl-tms57004/src/Makefile @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = tms570_initialize.c tms570_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) - CSRCS += tms570_appinit.c -endif - ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += tms570_autoleds.c else diff --git a/boards/arm/tms570/launchxl-tms57004/src/tms570_appinit.c b/boards/arm/tms570/launchxl-tms57004/src/tms570_appinit.c deleted file mode 100644 index 80e4c22087cd5..0000000000000 --- a/boards/arm/tms570/launchxl-tms57004/src/tms570_appinit.c +++ /dev/null @@ -1,72 +0,0 @@ -/**************************************************************************** - * boards/arm/tms570/launchxl-tms57004/src/tms570_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 -#include - -#include "launchxl-tms57004.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. - * - ****************************************************************************/ - -#ifdef CONFIG_BOARDCTL -int board_app_initialize(uintptr_t arg) -{ -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform application level board initialization (if that was not already - * done in board_late_initialize(). - */ - - tms570_bringup(); -#endif - - return 0; -} -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/arm/tms570/tms570ls31x-usb-kit/configs/nsh/defconfig b/boards/arm/tms570/tms570ls31x-usb-kit/configs/nsh/defconfig index 41b021a1ab0a0..c70f47a011d78 100644 --- a/boards/arm/tms570/tms570ls31x-usb-kit/configs/nsh/defconfig +++ b/boards/arm/tms570/tms570ls31x-usb-kit/configs/nsh/defconfig @@ -28,7 +28,6 @@ CONFIG_I2C=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/tms570/tms570ls31x-usb-kit/src/CMakeLists.txt b/boards/arm/tms570/tms570ls31x-usb-kit/src/CMakeLists.txt index cc42883b84032..c804a98d81f74 100644 --- a/boards/arm/tms570/tms570ls31x-usb-kit/src/CMakeLists.txt +++ b/boards/arm/tms570/tms570ls31x-usb-kit/src/CMakeLists.txt @@ -32,10 +32,6 @@ if(CONFIG_ARCH_BUTTONS) list(APPEND SRCS tms570_buttons.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS tms570_appinit.c) -endif() - if(CONFIG_MMCSD) list(APPEND SRCS tms570_sdmmc.c) endif() diff --git a/boards/arm/tms570/tms570ls31x-usb-kit/src/Makefile b/boards/arm/tms570/tms570ls31x-usb-kit/src/Makefile index 85ae0803ad77e..6aef71c5de063 100644 --- a/boards/arm/tms570/tms570ls31x-usb-kit/src/Makefile +++ b/boards/arm/tms570/tms570ls31x-usb-kit/src/Makefile @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = tms570_initialize.c tms570_bringup.c tms570_spi.c -ifeq ($(CONFIG_BOARDCTL),y) - CSRCS += tms570_appinit.c -endif - ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += tms570_autoleds.c else diff --git a/boards/arm/tms570/tms570ls31x-usb-kit/src/tms570_appinit.c b/boards/arm/tms570/tms570ls31x-usb-kit/src/tms570_appinit.c deleted file mode 100644 index 1bc903553801f..0000000000000 --- a/boards/arm/tms570/tms570ls31x-usb-kit/src/tms570_appinit.c +++ /dev/null @@ -1,72 +0,0 @@ -/**************************************************************************** - * boards/arm/tms570/tms570ls31x-usb-kit/src/tms570_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 -#include - -#include "tms570ls31x_usb_kit.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. - * - ****************************************************************************/ - -#ifdef CONFIG_BOARDCTL -int board_app_initialize(uintptr_t arg) -{ -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform application level board initialization (if that was not already - * done in board_late_initialize(). - */ - - tms570_bringup(); -#endif - - return 0; -} -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/arm/xmc4/xmc4500-relax/configs/nsh/defconfig b/boards/arm/xmc4/xmc4500-relax/configs/nsh/defconfig index 5f70afb02a8e7..db90c4da5a612 100644 --- a/boards/arm/xmc4/xmc4500-relax/configs/nsh/defconfig +++ b/boards/arm/xmc4/xmc4500-relax/configs/nsh/defconfig @@ -39,7 +39,6 @@ CONFIG_MTD=y CONFIG_MTD_AT24XX=y CONFIG_MTD_AT25=y CONFIG_MTD_CONFIG=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/xmc4/xmc4500-relax/src/CMakeLists.txt b/boards/arm/xmc4/xmc4500-relax/src/CMakeLists.txt index a9ab734a5c1ad..b456f2efec623 100644 --- a/boards/arm/xmc4/xmc4500-relax/src/CMakeLists.txt +++ b/boards/arm/xmc4/xmc4500-relax/src/CMakeLists.txt @@ -40,10 +40,6 @@ if(CONFIG_SENSORS_MAX6675) list(APPEND SRCS xmc4_max6675.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS xmc4_appinit.c) -endif() - target_sources(board PRIVATE ${SRCS}) set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/flash.ld") diff --git a/boards/arm/xmc4/xmc4500-relax/src/Makefile b/boards/arm/xmc4/xmc4500-relax/src/Makefile index f90c385b5b58e..269a9cfad8e76 100644 --- a/boards/arm/xmc4/xmc4500-relax/src/Makefile +++ b/boards/arm/xmc4/xmc4500-relax/src/Makefile @@ -42,8 +42,4 @@ ifeq ($(CONFIG_SENSORS_MAX6675),y) CSRCS += xmc4_max6675.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += xmc4_appinit.c -endif - include $(TOPDIR)/boards/Board.mk diff --git a/boards/arm/xmc4/xmc4500-relax/src/xmc4_appinit.c b/boards/arm/xmc4/xmc4500-relax/src/xmc4_appinit.c deleted file mode 100644 index a2291bd254cdb..0000000000000 --- a/boards/arm/xmc4/xmc4500-relax/src/xmc4_appinit.c +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** - * boards/arm/xmc4/xmc4500-relax/src/xmc4_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 - -#include - -#include - -#include "xmc4500-relax.h" - -/**************************************************************************** - * 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 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) -{ -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board initialization */ - - return xmc4_bringup(); -#else - return OK; -#endif /* CONFIG_BOARD_LATE_INITIALIZE */ -} diff --git a/boards/arm/xmc4/xmc4700-relax/configs/nsh/defconfig b/boards/arm/xmc4/xmc4700-relax/configs/nsh/defconfig index 4f510a9416c51..f7ec163734fb9 100644 --- a/boards/arm/xmc4/xmc4700-relax/configs/nsh/defconfig +++ b/boards/arm/xmc4/xmc4700-relax/configs/nsh/defconfig @@ -22,7 +22,6 @@ CONFIG_DEBUG_NOOPT=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/xmc4/xmc4700-relax/src/CMakeLists.txt b/boards/arm/xmc4/xmc4700-relax/src/CMakeLists.txt index 49cd9f9d2b453..2e13a561e8260 100644 --- a/boards/arm/xmc4/xmc4700-relax/src/CMakeLists.txt +++ b/boards/arm/xmc4/xmc4700-relax/src/CMakeLists.txt @@ -36,10 +36,6 @@ if(CONFIG_XMC4_USCI_SPI) list(APPEND SRCS xmc4_spi.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS xmc4_appinit.c) -endif() - target_sources(board PRIVATE ${SRCS}) set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/flash.ld") diff --git a/boards/arm/xmc4/xmc4700-relax/src/Makefile b/boards/arm/xmc4/xmc4700-relax/src/Makefile index 2f987bd31cfd9..1a2bc0a525fa8 100644 --- a/boards/arm/xmc4/xmc4700-relax/src/Makefile +++ b/boards/arm/xmc4/xmc4700-relax/src/Makefile @@ -38,8 +38,4 @@ ifeq ($(CONFIG_XMC4_USCI_SPI),y) CSRCS += xmc4_spi.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += xmc4_appinit.c -endif - include $(TOPDIR)/boards/Board.mk diff --git a/boards/arm/xmc4/xmc4700-relax/src/xmc4_appinit.c b/boards/arm/xmc4/xmc4700-relax/src/xmc4_appinit.c deleted file mode 100644 index b1e87c9876b50..0000000000000 --- a/boards/arm/xmc4/xmc4700-relax/src/xmc4_appinit.c +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** - * boards/arm/xmc4/xmc4700-relax/src/xmc4_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 - -#include - -#include - -#include "xmc4700-relax.h" - -/**************************************************************************** - * 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 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) -{ -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board initialization */ - - return xmc4_bringup(); -#else - return OK; -#endif /* CONFIG_BOARD_LATE_INITIALIZE */ -} diff --git a/boards/arm/xmc4/xmc4800-relax/configs/nsh/defconfig b/boards/arm/xmc4/xmc4800-relax/configs/nsh/defconfig index 4cc8f1630261c..291901bc0fc2d 100644 --- a/boards/arm/xmc4/xmc4800-relax/configs/nsh/defconfig +++ b/boards/arm/xmc4/xmc4800-relax/configs/nsh/defconfig @@ -27,7 +27,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LIBCXXTOOLCHAIN=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm/xmc4/xmc4800-relax/src/CMakeLists.txt b/boards/arm/xmc4/xmc4800-relax/src/CMakeLists.txt index 372e441e3cdd7..9c267e2530684 100644 --- a/boards/arm/xmc4/xmc4800-relax/src/CMakeLists.txt +++ b/boards/arm/xmc4/xmc4800-relax/src/CMakeLists.txt @@ -36,10 +36,6 @@ if(CONFIG_XMC4_USCI_SPI) list(APPEND SRCS xmc4_spi.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS xmc4_appinit.c) -endif() - target_sources(board PRIVATE ${SRCS}) set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/flash.ld") diff --git a/boards/arm/xmc4/xmc4800-relax/src/Makefile b/boards/arm/xmc4/xmc4800-relax/src/Makefile index dd5721f8ff548..e4dc2b0f90375 100644 --- a/boards/arm/xmc4/xmc4800-relax/src/Makefile +++ b/boards/arm/xmc4/xmc4800-relax/src/Makefile @@ -38,8 +38,4 @@ ifeq ($(CONFIG_XMC4_USCI_SPI),y) CSRCS += xmc4_spi.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += xmc4_appinit.c -endif - include $(TOPDIR)/boards/Board.mk diff --git a/boards/arm/xmc4/xmc4800-relax/src/xmc4_appinit.c b/boards/arm/xmc4/xmc4800-relax/src/xmc4_appinit.c deleted file mode 100644 index 31fbafcc1a315..0000000000000 --- a/boards/arm/xmc4/xmc4800-relax/src/xmc4_appinit.c +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** - * boards/arm/xmc4/xmc4800-relax/src/xmc4_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 - -#include - -#include - -#include "xmc4800-relax.h" - -/**************************************************************************** - * 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 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) -{ -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board initialization */ - - return xmc4_bringup(); -#else - return OK; -#endif /* CONFIG_BOARD_LATE_INITIALIZE */ -} diff --git a/boards/arm64/a527/avaota-a1/configs/nsh/defconfig b/boards/arm64/a527/avaota-a1/configs/nsh/defconfig index a6f60966c324e..2a3ea4ff43948 100644 --- a/boards/arm64/a527/avaota-a1/configs/nsh/defconfig +++ b/boards/arm64/a527/avaota-a1/configs/nsh/defconfig @@ -42,7 +42,6 @@ CONFIG_ARCH_TEXT_VBASE=0x00000000 CONFIG_ARCH_USE_MMU=y CONFIG_ARM64_STRING_FUNCTION=y CONFIG_BOARDCTL_ROMDISK=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=201847 CONFIG_BUILD_KERNEL=y CONFIG_DEBUG_ASSERTIONS=y @@ -74,7 +73,6 @@ CONFIG_LIBC_STRERROR=y CONFIG_LIBM=y CONFIG_MM_KMAP=y CONFIG_MM_PGALLOC=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/arm64/a527/avaota-a1/src/CMakeLists.txt b/boards/arm64/a527/avaota-a1/src/CMakeLists.txt index 5d5787cb95c86..4c7b4aede6dc6 100644 --- a/boards/arm64/a527/avaota-a1/src/CMakeLists.txt +++ b/boards/arm64/a527/avaota-a1/src/CMakeLists.txt @@ -22,7 +22,7 @@ set(SRCS a527_boardinit.c a527_bringup.c) if(CONFIG_BOARDCTL) - list(APPEND SRCS a527_appinit.c a527_power.c) + list(APPEND SRCS a527_power.c) endif() target_sources(board PRIVATE ${SRCS}) diff --git a/boards/arm64/a527/avaota-a1/src/Makefile b/boards/arm64/a527/avaota-a1/src/Makefile index 850462fddf63c..5d7cd452d1f6a 100644 --- a/boards/arm64/a527/avaota-a1/src/Makefile +++ b/boards/arm64/a527/avaota-a1/src/Makefile @@ -24,8 +24,4 @@ include $(TOPDIR)/Make.defs CSRCS = a527_boardinit.c a527_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += a527_appinit.c a527_power.c -endif - include $(TOPDIR)/boards/Board.mk diff --git a/boards/arm64/a527/avaota-a1/src/a527_appinit.c b/boards/arm64/a527/avaota-a1/src/a527_appinit.c deleted file mode 100644 index 19d758eedc93d..0000000000000 --- a/boards/arm64/a527/avaota-a1/src/a527_appinit.c +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** - * boards/arm64/a527/avaota-a1/src/a527_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 -#include -#include -#include "avaota-a1.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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 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) -{ - UNUSED(arg); -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board initialization */ - - return a527_bringup(); -#else - return OK; -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/arm64/a64/pinephone/configs/lcd/defconfig b/boards/arm64/a64/pinephone/configs/lcd/defconfig index b2fb74644c300..b41ef5838d6b4 100644 --- a/boards/arm64/a64/pinephone/configs/lcd/defconfig +++ b/boards/arm64/a64/pinephone/configs/lcd/defconfig @@ -35,7 +35,6 @@ CONFIG_HAVE_CXXINITIALIZE=y CONFIG_IDLETHREAD_STACKSIZE=8192 CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm64/a64/pinephone/configs/lvgl/defconfig b/boards/arm64/a64/pinephone/configs/lvgl/defconfig index afe848365b612..3b4ea8b478b24 100644 --- a/boards/arm64/a64/pinephone/configs/lvgl/defconfig +++ b/boards/arm64/a64/pinephone/configs/lvgl/defconfig @@ -53,7 +53,6 @@ CONFIG_LV_USE_CLIB_STRING=y CONFIG_LV_USE_DEMO_WIDGETS=y CONFIG_LV_USE_NUTTX=y CONFIG_LV_USE_NUTTX_TOUCHSCREEN=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm64/a64/pinephone/configs/nsh/defconfig b/boards/arm64/a64/pinephone/configs/nsh/defconfig index 22260c9573d04..d0ab13e1872f8 100644 --- a/boards/arm64/a64/pinephone/configs/nsh/defconfig +++ b/boards/arm64/a64/pinephone/configs/nsh/defconfig @@ -35,7 +35,6 @@ CONFIG_HAVE_CXXINITIALIZE=y CONFIG_IDLETHREAD_STACKSIZE=8192 CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm64/a64/pinephone/configs/sensor/defconfig b/boards/arm64/a64/pinephone/configs/sensor/defconfig index 861b3b4d310ac..4f37be269d71f 100644 --- a/boards/arm64/a64/pinephone/configs/sensor/defconfig +++ b/boards/arm64/a64/pinephone/configs/sensor/defconfig @@ -38,7 +38,6 @@ CONFIG_IDLETHREAD_STACKSIZE=8192 CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_MPU60X0_I2C=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm64/a64/pinephone/src/CMakeLists.txt b/boards/arm64/a64/pinephone/src/CMakeLists.txt index 4458d7d9b43e3..97ab6dd27ccd1 100644 --- a/boards/arm64/a64/pinephone/src/CMakeLists.txt +++ b/boards/arm64/a64/pinephone/src/CMakeLists.txt @@ -23,7 +23,6 @@ set(SRCS pinephone_boardinit.c pinephone_bringup.c pinephone_pmic.c) if(CONFIG_BOARDCTL) - list(APPEND SRCS pinephone_appinit.c) if(CONFIG_BOARDCTL_RESET) list(APPEND SRCS pinephone_reset.c) endif() diff --git a/boards/arm64/a64/pinephone/src/Makefile b/boards/arm64/a64/pinephone/src/Makefile index 8376a6844c5a1..81c3f37b9bd12 100644 --- a/boards/arm64/a64/pinephone/src/Makefile +++ b/boards/arm64/a64/pinephone/src/Makefile @@ -24,12 +24,9 @@ include $(TOPDIR)/Make.defs CSRCS = pinephone_boardinit.c pinephone_bringup.c pinephone_pmic.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += pinephone_appinit.c ifeq ($(CONFIG_BOARDCTL_RESET),y) CSRCS += pinephone_reset.c endif -endif ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += pinephone_autoleds.c diff --git a/boards/arm64/a64/pinephone/src/pinephone_appinit.c b/boards/arm64/a64/pinephone/src/pinephone_appinit.c deleted file mode 100644 index 2331583e1fffe..0000000000000 --- a/boards/arm64/a64/pinephone/src/pinephone_appinit.c +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** - * boards/arm64/a64/pinephone/src/pinephone_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 -#include -#include -#include "pinephone.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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 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) -{ - UNUSED(arg); -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board initialization */ - - return pinephone_bringup(); -#else - return OK; -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/arm64/bcm2711/raspberrypi-4b/configs/cgol/defconfig b/boards/arm64/bcm2711/raspberrypi-4b/configs/cgol/defconfig index ba110299cde40..c2541e404d3e1 100644 --- a/boards/arm64/bcm2711/raspberrypi-4b/configs/cgol/defconfig +++ b/boards/arm64/bcm2711/raspberrypi-4b/configs/cgol/defconfig @@ -38,7 +38,6 @@ CONFIG_HAVE_CXXINITIALIZE=y CONFIG_IDLETHREAD_STACKSIZE=8192 CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm64/bcm2711/raspberrypi-4b/configs/fb/defconfig b/boards/arm64/bcm2711/raspberrypi-4b/configs/fb/defconfig index 0459e7f031cb1..59751ea74f043 100644 --- a/boards/arm64/bcm2711/raspberrypi-4b/configs/fb/defconfig +++ b/boards/arm64/bcm2711/raspberrypi-4b/configs/fb/defconfig @@ -33,7 +33,6 @@ CONFIG_HAVE_CXXINITIALIZE=y CONFIG_IDLETHREAD_STACKSIZE=8192 CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm64/bcm2711/raspberrypi-4b/configs/lvgl/defconfig b/boards/arm64/bcm2711/raspberrypi-4b/configs/lvgl/defconfig index 539f85ad073c0..15cb9dd21fb0e 100644 --- a/boards/arm64/bcm2711/raspberrypi-4b/configs/lvgl/defconfig +++ b/boards/arm64/bcm2711/raspberrypi-4b/configs/lvgl/defconfig @@ -16,7 +16,6 @@ CONFIG_ARCH_EARLY_PRINT=y CONFIG_ARCH_INTERRUPTSTACK=4096 CONFIG_ARCH_IRQPRIO=y CONFIG_BCM2711_FRAMEBUFFER=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=132954 CONFIG_BUILTIN=y CONFIG_DEBUG_ASSERTIONS=y @@ -43,7 +42,6 @@ CONFIG_LV_USE_CLIB_SPRINTF=y CONFIG_LV_USE_CLIB_STRING=y CONFIG_LV_USE_DEMO_WIDGETS=y CONFIG_LV_USE_NUTTX=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm64/bcm2711/raspberrypi-4b/configs/nsh/defconfig b/boards/arm64/bcm2711/raspberrypi-4b/configs/nsh/defconfig index 5d0766b5262dc..2be27f4611243 100644 --- a/boards/arm64/bcm2711/raspberrypi-4b/configs/nsh/defconfig +++ b/boards/arm64/bcm2711/raspberrypi-4b/configs/nsh/defconfig @@ -33,7 +33,6 @@ CONFIG_HAVE_CXXINITIALIZE=y CONFIG_IDLETHREAD_STACKSIZE=8192 CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm64/bcm2711/raspberrypi-4b/configs/sd/defconfig b/boards/arm64/bcm2711/raspberrypi-4b/configs/sd/defconfig index af3389573a0c0..44e65724129b0 100644 --- a/boards/arm64/bcm2711/raspberrypi-4b/configs/sd/defconfig +++ b/boards/arm64/bcm2711/raspberrypi-4b/configs/sd/defconfig @@ -44,7 +44,6 @@ CONFIG_HAVE_CXXINITIALIZE=y CONFIG_IDLETHREAD_STACKSIZE=8192 CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm64/bcm2711/raspberrypi-4b/src/CMakeLists.txt b/boards/arm64/bcm2711/raspberrypi-4b/src/CMakeLists.txt index 2bf016857a349..e3c6860ae152f 100644 --- a/boards/arm64/bcm2711/raspberrypi-4b/src/CMakeLists.txt +++ b/boards/arm64/bcm2711/raspberrypi-4b/src/CMakeLists.txt @@ -24,10 +24,6 @@ if(CONFIG_ARCH_LEDS) list(APPEND SRCS rpi4b_autoleds.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS rpi4b_appinit.c) -endif() - if(CONFIG_DEV_GPIO) list(APPEND SRCS rpi4b_gpio.c) endif() diff --git a/boards/arm64/bcm2711/raspberrypi-4b/src/Makefile b/boards/arm64/bcm2711/raspberrypi-4b/src/Makefile index f87cefa315125..214f2a084c29e 100644 --- a/boards/arm64/bcm2711/raspberrypi-4b/src/Makefile +++ b/boards/arm64/bcm2711/raspberrypi-4b/src/Makefile @@ -26,10 +26,6 @@ ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += rpi4b_autoleds.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += rpi4b_appinit.c -endif - ifeq ($(CONFIG_DEV_GPIO),y) CSRCS += rpi4b_gpio.c endif diff --git a/boards/arm64/bcm2711/raspberrypi-4b/src/rpi4b_appinit.c b/boards/arm64/bcm2711/raspberrypi-4b/src/rpi4b_appinit.c deleted file mode 100644 index 2df3041644edc..0000000000000 --- a/boards/arm64/bcm2711/raspberrypi-4b/src/rpi4b_appinit.c +++ /dev/null @@ -1,101 +0,0 @@ -/**************************************************************************** - * boards/arm64/bcm2711/raspberrypi-4b/src/rpi4b_appinit.c - * - * Author: Matteo Golin - * - * 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 - -#include -#include - -#include -#include - -#include "rpi4b.h" -#include - -/**************************************************************************** - * 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 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) -{ - UNUSED(arg); - int ret = OK; - -#ifdef CONFIG_FS_PROCFS - /* Mount the proc file system */ - - ret = nx_mount(NULL, "/proc", "procfs", 0, NULL); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: Failed to mount procfs at /proc: %d\n", ret); - } -#endif - -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board initialization */ - - ret = rpi4b_bringup(); -#endif - -#ifdef CONFIG_RPI4B_MOUNT_BOOT - /* Mount SD card file system (currently just the boot (first) partition). - * Assumes /dev/mmcsd0 exists, but if it doesn't it will fail gracefully. - */ - - ret = nx_mount("/dev/mmcsd0", "/sd", "vfat", 0, NULL); - if (ret < 0) - { - syslog(LOG_ERR, "Could not mount SD card FAT partition: %d\n", ret); - } -#endif - - return ret; -} diff --git a/boards/arm64/bcm2711/raspberrypi-4b/src/rpi4b_boardinitialize.c b/boards/arm64/bcm2711/raspberrypi-4b/src/rpi4b_boardinitialize.c index 87600c8af88a2..fa073c10da496 100644 --- a/boards/arm64/bcm2711/raspberrypi-4b/src/rpi4b_boardinitialize.c +++ b/boards/arm64/bcm2711/raspberrypi-4b/src/rpi4b_boardinitialize.c @@ -27,8 +27,12 @@ #include #include +#include +#include #include +#include +#include #include "rpi4b.h" @@ -104,8 +108,32 @@ void bcm2711_board_initialize(void) #ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { + int ret = 0; + +#ifdef CONFIG_FS_PROCFS + /* Mount the proc file system */ + + ret = nx_mount(NULL, "/proc", "procfs", 0, NULL); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: Failed to mount procfs at /proc: %d\n", ret); + } +#endif + /* Perform board initialization */ - rpi4b_bringup(); + ret = rpi4b_bringup(); + +#ifdef CONFIG_RPI4B_MOUNT_BOOT + /* Mount SD card file system (currently just the boot (first) partition). + * Assumes /dev/mmcsd0 exists, but if it doesn't it will fail gracefully. + */ + + ret = nx_mount("/dev/mmcsd0", "/sd", "vfat", 0, NULL); + if (ret < 0) + { + syslog(LOG_ERR, "Could not mount SD card FAT partition: %d\n", ret); + } +#endif } #endif /* CONFIG_BOARD_LATE_INITIALIZE */ diff --git a/boards/arm64/fvp-v8r/fvp-armv8r/configs/citest/defconfig b/boards/arm64/fvp-v8r/fvp-armv8r/configs/citest/defconfig index 40ed0f9551b8c..1b3f233182063 100644 --- a/boards/arm64/fvp-v8r/fvp-armv8r/configs/citest/defconfig +++ b/boards/arm64/fvp-v8r/fvp-armv8r/configs/citest/defconfig @@ -32,7 +32,6 @@ CONFIG_HRTIMER_LIST=y CONFIG_IDLETHREAD_STACKSIZE=8192 CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm64/fvp-v8r/fvp-armv8r/configs/citest_smp/defconfig b/boards/arm64/fvp-v8r/fvp-armv8r/configs/citest_smp/defconfig index 85b0603d5c2e3..d9c9cc00e0f58 100644 --- a/boards/arm64/fvp-v8r/fvp-armv8r/configs/citest_smp/defconfig +++ b/boards/arm64/fvp-v8r/fvp-armv8r/configs/citest_smp/defconfig @@ -30,7 +30,6 @@ CONFIG_FS_ROMFS=y CONFIG_IDLETHREAD_STACKSIZE=8192 CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm64/fvp-v8r/fvp-armv8r/configs/nsh/defconfig b/boards/arm64/fvp-v8r/fvp-armv8r/configs/nsh/defconfig index 9ceaeb337a713..df3fac0fde64d 100644 --- a/boards/arm64/fvp-v8r/fvp-armv8r/configs/nsh/defconfig +++ b/boards/arm64/fvp-v8r/fvp-armv8r/configs/nsh/defconfig @@ -32,7 +32,6 @@ CONFIG_FS_ROMFS=y CONFIG_IDLETHREAD_STACKSIZE=8192 CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm64/fvp-v8r/fvp-armv8r/configs/nsh_smp/defconfig b/boards/arm64/fvp-v8r/fvp-armv8r/configs/nsh_smp/defconfig index 8b0d1e8311d00..ca05a63b0735c 100644 --- a/boards/arm64/fvp-v8r/fvp-armv8r/configs/nsh_smp/defconfig +++ b/boards/arm64/fvp-v8r/fvp-armv8r/configs/nsh_smp/defconfig @@ -32,7 +32,6 @@ CONFIG_FS_ROMFS=y CONFIG_IDLETHREAD_STACKSIZE=8192 CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm64/fvp-v8r/fvp-armv8r/configs/pnsh/defconfig b/boards/arm64/fvp-v8r/fvp-armv8r/configs/pnsh/defconfig index 541fe9e5a0bbf..9e59d24629aed 100644 --- a/boards/arm64/fvp-v8r/fvp-armv8r/configs/pnsh/defconfig +++ b/boards/arm64/fvp-v8r/fvp-armv8r/configs/pnsh/defconfig @@ -38,7 +38,6 @@ CONFIG_IDLETHREAD_STACKSIZE=8192 CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_MM_KERNEL_HEAPSIZE=524288 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm64/fvp-v8r/fvp-armv8r/configs/pnsh_smp/defconfig b/boards/arm64/fvp-v8r/fvp-armv8r/configs/pnsh_smp/defconfig index a2b3dc6d90c9f..116ccd08d7c02 100644 --- a/boards/arm64/fvp-v8r/fvp-armv8r/configs/pnsh_smp/defconfig +++ b/boards/arm64/fvp-v8r/fvp-armv8r/configs/pnsh_smp/defconfig @@ -38,7 +38,6 @@ CONFIG_IDLETHREAD_STACKSIZE=8192 CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_MM_KERNEL_HEAPSIZE=524288 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm64/fvp-v8r/fvp-armv8r/src/CMakeLists.txt b/boards/arm64/fvp-v8r/fvp-armv8r/src/CMakeLists.txt index a3c5938cbdcef..81799e647ab47 100644 --- a/boards/arm64/fvp-v8r/fvp-armv8r/src/CMakeLists.txt +++ b/boards/arm64/fvp-v8r/fvp-armv8r/src/CMakeLists.txt @@ -21,8 +21,4 @@ # ############################################################################## set(SRCS fvp_boardinit.c fvp_bringup.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS fvp_appinit.c) -endif() - target_sources(board PRIVATE ${SRCS}) diff --git a/boards/arm64/fvp-v8r/fvp-armv8r/src/Makefile b/boards/arm64/fvp-v8r/fvp-armv8r/src/Makefile index 5548900d9f0f7..1381db8ab8d18 100644 --- a/boards/arm64/fvp-v8r/fvp-armv8r/src/Makefile +++ b/boards/arm64/fvp-v8r/fvp-armv8r/src/Makefile @@ -24,8 +24,4 @@ include $(TOPDIR)/Make.defs CSRCS = fvp_boardinit.c fvp_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += fvp_appinit.c -endif - include $(TOPDIR)/boards/Board.mk diff --git a/boards/arm64/fvp-v8r/fvp-armv8r/src/fvp_appinit.c b/boards/arm64/fvp-v8r/fvp-armv8r/src/fvp_appinit.c deleted file mode 100644 index 7f7cf19f4aaf1..0000000000000 --- a/boards/arm64/fvp-v8r/fvp-armv8r/src/fvp_appinit.c +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** - * boards/arm64/fvp-v8r/fvp-armv8r/src/fvp_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 -#include -#include -#include "fvp-armv8r.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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 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) -{ - UNUSED(arg); -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board initialization */ - - return fvp_bringup(); -#else - return OK; -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/arm64/imx8/imx8qm-mek/configs/nsh/defconfig b/boards/arm64/imx8/imx8qm-mek/configs/nsh/defconfig index 432cae0116c72..7be578bad8a7e 100644 --- a/boards/arm64/imx8/imx8qm-mek/configs/nsh/defconfig +++ b/boards/arm64/imx8/imx8qm-mek/configs/nsh/defconfig @@ -33,7 +33,6 @@ CONFIG_IDLETHREAD_STACKSIZE=8192 CONFIG_IMX8_UART1=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm64/imx8/imx8qm-mek/src/CMakeLists.txt b/boards/arm64/imx8/imx8qm-mek/src/CMakeLists.txt index 293636a5ea8e2..2594331295dda 100644 --- a/boards/arm64/imx8/imx8qm-mek/src/CMakeLists.txt +++ b/boards/arm64/imx8/imx8qm-mek/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS imx8_boardinit.c imx8_bringup.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS imx8_appinit.c) -endif() - target_sources(board PRIVATE ${SRCS}) set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/dramboot.ld") diff --git a/boards/arm64/imx8/imx8qm-mek/src/Makefile b/boards/arm64/imx8/imx8qm-mek/src/Makefile index f9124aafc25ef..c1852aa55003a 100644 --- a/boards/arm64/imx8/imx8qm-mek/src/Makefile +++ b/boards/arm64/imx8/imx8qm-mek/src/Makefile @@ -24,8 +24,4 @@ include $(TOPDIR)/Make.defs CSRCS = imx8_boardinit.c imx8_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += imx8_appinit.c -endif - include $(TOPDIR)/boards/Board.mk diff --git a/boards/arm64/imx8/imx8qm-mek/src/imx8_appinit.c b/boards/arm64/imx8/imx8qm-mek/src/imx8_appinit.c deleted file mode 100644 index 9d91bc538f6b8..0000000000000 --- a/boards/arm64/imx8/imx8qm-mek/src/imx8_appinit.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm64/imx8/imx8qm-mek/src/imx8_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 - -#include - -#include - -#include "imx8qm-mek.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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 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) -{ - UNUSED(arg); -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board initialization */ - - return imx8_bringup(); -#else - return OK; -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/arm64/imx9/imx93-evk/configs/bootloader/defconfig b/boards/arm64/imx9/imx93-evk/configs/bootloader/defconfig index 45d8c00f5ef95..4056ccfb934cb 100644 --- a/boards/arm64/imx9/imx93-evk/configs/bootloader/defconfig +++ b/boards/arm64/imx9/imx93-evk/configs/bootloader/defconfig @@ -61,7 +61,6 @@ CONFIG_ARCH_CHIP_IMX9=y CONFIG_ARCH_INTERRUPTSTACK=4096 CONFIG_ARM64_DCACHE_DISABLE=y CONFIG_ASSERTIONS_FILENAME=y -CONFIG_BOARDCTL_MKRD=y CONFIG_BOARD_LOOPSPERMSEC=241712 CONFIG_BUILTIN=y CONFIG_DEBUG_ASSERTIONS=y @@ -94,7 +93,6 @@ CONFIG_LINE_MAX=80 CONFIG_LPUART1_SERIAL_CONSOLE=y CONFIG_MM_FILL_ALLOCATIONS=y CONFIG_NSH_ALIAS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_ARGCAT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_HELP=y diff --git a/boards/arm64/imx9/imx93-evk/configs/knsh/defconfig b/boards/arm64/imx9/imx93-evk/configs/knsh/defconfig index 1deafa9a628c4..fbe97a26410c6 100644 --- a/boards/arm64/imx9/imx93-evk/configs/knsh/defconfig +++ b/boards/arm64/imx9/imx93-evk/configs/knsh/defconfig @@ -34,7 +34,6 @@ CONFIG_ARCH_TEXT_VBASE=0x00000000 CONFIG_ARCH_USE_MMU=y CONFIG_ARM64_STRING_FUNCTION=y CONFIG_BCH_BUFFER_ALIGNMENT=64 -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=241712 CONFIG_BUILD_KERNEL=y CONFIG_CDCACM=y @@ -118,7 +117,6 @@ CONFIG_NET_TIMESTAMP=y CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y CONFIG_NET_UDP_NOTIFIER=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_DISABLE_DMESG=y CONFIG_NSH_DISABLE_EXIT=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm64/imx9/imx93-evk/configs/koptee/defconfig b/boards/arm64/imx9/imx93-evk/configs/koptee/defconfig index 4fecc41253e0f..4cf697e75f2d9 100644 --- a/boards/arm64/imx9/imx93-evk/configs/koptee/defconfig +++ b/boards/arm64/imx9/imx93-evk/configs/koptee/defconfig @@ -37,7 +37,6 @@ CONFIG_ARCH_TEXT_VBASE=0x00000000 CONFIG_ARCH_USE_MMU=y CONFIG_ARM64_STRING_FUNCTION=y CONFIG_BCH_BUFFER_ALIGNMENT=64 -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=241712 CONFIG_BUILD_KERNEL=y CONFIG_CDCACM=y @@ -123,7 +122,6 @@ CONFIG_NET_TIMESTAMP=y CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y CONFIG_NET_UDP_NOTIFIER=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_DISABLE_DMESG=y CONFIG_NSH_DISABLE_EXIT=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/arm64/imx9/imx93-evk/configs/nsh/defconfig b/boards/arm64/imx9/imx93-evk/configs/nsh/defconfig index c663f70c537b0..e624827cadff1 100644 --- a/boards/arm64/imx9/imx93-evk/configs/nsh/defconfig +++ b/boards/arm64/imx9/imx93-evk/configs/nsh/defconfig @@ -78,7 +78,6 @@ CONFIG_NETDEV_PHY_IOCTL=y CONFIG_NET_ICMP_SOCKET=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm64/imx9/imx93-evk/configs/optee/defconfig b/boards/arm64/imx9/imx93-evk/configs/optee/defconfig index f1e88d13934ae..96033d349a23e 100644 --- a/boards/arm64/imx9/imx93-evk/configs/optee/defconfig +++ b/boards/arm64/imx9/imx93-evk/configs/optee/defconfig @@ -79,7 +79,6 @@ CONFIG_NETDEV_PHY_IOCTL=y CONFIG_NET_ICMP_SOCKET=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm64/imx9/imx93-evk/src/Makefile b/boards/arm64/imx9/imx93-evk/src/Makefile index d938b626dc0e9..b80005248dd1d 100644 --- a/boards/arm64/imx9/imx93-evk/src/Makefile +++ b/boards/arm64/imx9/imx93-evk/src/Makefile @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = imx9_boardinit.c imx9_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += imx9_appinit.c -endif - ifeq ($(CONFIG_PWM),y) CSRCS += imx9_pwm.c endif diff --git a/boards/arm64/imx9/imx93-evk/src/imx9_appinit.c b/boards/arm64/imx9/imx93-evk/src/imx9_appinit.c deleted file mode 100644 index 39d4132d3c8c0..0000000000000 --- a/boards/arm64/imx9/imx93-evk/src/imx9_appinit.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm64/imx9/imx93-evk/src/imx9_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 - -#include - -#include - -#include "imx93-evk.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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 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) -{ - UNUSED(arg); -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board initialization */ - - return imx9_bringup(); -#else - return OK; -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/arm64/imx9/imx95-a55-evk/configs/emmc/defconfig b/boards/arm64/imx9/imx95-a55-evk/configs/emmc/defconfig index 706cbe3ff6d1d..dc63329df228b 100644 --- a/boards/arm64/imx9/imx95-a55-evk/configs/emmc/defconfig +++ b/boards/arm64/imx9/imx95-a55-evk/configs/emmc/defconfig @@ -16,7 +16,6 @@ CONFIG_ARCH_EARLY_PRINT=y CONFIG_ARCH_INTERRUPTSTACK=4096 CONFIG_ARCH_USE_MMU=y CONFIG_BOARDCTL_RESET=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=241712 CONFIG_BUILTIN=y CONFIG_DEBUG_ASSERTIONS=y diff --git a/boards/arm64/imx9/imx95-a55-evk/configs/nsh/defconfig b/boards/arm64/imx9/imx95-a55-evk/configs/nsh/defconfig index 7acc9fba627af..3ee6ff9fa35ab 100644 --- a/boards/arm64/imx9/imx95-a55-evk/configs/nsh/defconfig +++ b/boards/arm64/imx9/imx95-a55-evk/configs/nsh/defconfig @@ -41,7 +41,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LPUART1_SERIAL_CONSOLE=y CONFIG_NDEBUG=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm64/imx9/imx95-a55-evk/src/CMakeLists.txt b/boards/arm64/imx9/imx95-a55-evk/src/CMakeLists.txt index 5fe327c8e0564..e02a43f26d91a 100644 --- a/boards/arm64/imx9/imx95-a55-evk/src/CMakeLists.txt +++ b/boards/arm64/imx9/imx95-a55-evk/src/CMakeLists.txt @@ -22,11 +22,8 @@ set(SRCS imx9_boardinit.c imx9_bringup.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS imx9_appinit.c) - if(CONFIG_BOARDCTL_RESET) - list(APPEND SRCS imx9_reset.c) - endif() +if(CONFIG_BOARDCTL_RESET) + list(APPEND SRCS imx9_reset.c) endif() if(CONFIG_IMX9_USDHC) diff --git a/boards/arm64/imx9/imx95-a55-evk/src/Makefile b/boards/arm64/imx9/imx95-a55-evk/src/Makefile index d73b23b8bf7b5..55f7666091ab9 100644 --- a/boards/arm64/imx9/imx95-a55-evk/src/Makefile +++ b/boards/arm64/imx9/imx95-a55-evk/src/Makefile @@ -24,12 +24,9 @@ include $(TOPDIR)/Make.defs CSRCS = imx9_boardinit.c imx9_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += imx9_appinit.c ifeq ($(CONFIG_BOARDCTL_RESET),y) CSRCS += imx9_reset.c endif -endif ifeq ($(CONFIG_IMX9_USDHC),y) CSRCS += imx9_usdhc.c diff --git a/boards/arm64/imx9/imx95-a55-evk/src/imx9_appinit.c b/boards/arm64/imx9/imx95-a55-evk/src/imx9_appinit.c deleted file mode 100644 index 057f0ff7be6f0..0000000000000 --- a/boards/arm64/imx9/imx95-a55-evk/src/imx9_appinit.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm64/imx9/imx95-a55-evk/src/imx9_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 - -#include - -#include - -#include "imx95-evk.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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 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) -{ - UNUSED(arg); -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board initialization */ - - return imx9_bringup(); -#else - return OK; -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/arm64/qemu/qemu-armv8a/configs/citest/defconfig b/boards/arm64/qemu/qemu-armv8a/configs/citest/defconfig index 9460e22168275..66c8a52ae9478 100644 --- a/boards/arm64/qemu/qemu-armv8a/configs/citest/defconfig +++ b/boards/arm64/qemu/qemu-armv8a/configs/citest/defconfig @@ -35,7 +35,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_EXECFUNCS=y CONFIG_MM_KASAN=y CONFIG_MM_KASAN_GLOBAL=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm64/qemu/qemu-armv8a/configs/citest_smp/defconfig b/boards/arm64/qemu/qemu-armv8a/configs/citest_smp/defconfig index f366755c0c71f..19889d26648e6 100644 --- a/boards/arm64/qemu/qemu-armv8a/configs/citest_smp/defconfig +++ b/boards/arm64/qemu/qemu-armv8a/configs/citest_smp/defconfig @@ -31,7 +31,6 @@ CONFIG_IDLETHREAD_STACKSIZE=16384 CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_EXECFUNCS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm64/qemu/qemu-armv8a/configs/fastboot/defconfig b/boards/arm64/qemu/qemu-armv8a/configs/fastboot/defconfig index ce94acb533448..3b84dbcab3db5 100644 --- a/boards/arm64/qemu/qemu-armv8a/configs/fastboot/defconfig +++ b/boards/arm64/qemu/qemu-armv8a/configs/fastboot/defconfig @@ -69,7 +69,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NFS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm64/qemu/qemu-armv8a/configs/fb/defconfig b/boards/arm64/qemu/qemu-armv8a/configs/fb/defconfig index a29da2e2639ec..f9a11164c19a3 100644 --- a/boards/arm64/qemu/qemu-armv8a/configs/fb/defconfig +++ b/boards/arm64/qemu/qemu-armv8a/configs/fb/defconfig @@ -46,7 +46,6 @@ CONFIG_IOB_NCHAINS=64 CONFIG_IOB_THROTTLE=8 CONFIG_LIBC_EXECFUNCS=y CONFIG_MM_IOB=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm64/qemu/qemu-armv8a/configs/gdbstub/defconfig b/boards/arm64/qemu/qemu-armv8a/configs/gdbstub/defconfig index e94702a6eb4f2..93a62e7025c79 100644 --- a/boards/arm64/qemu/qemu-armv8a/configs/gdbstub/defconfig +++ b/boards/arm64/qemu/qemu-armv8a/configs/gdbstub/defconfig @@ -44,7 +44,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_EXECFUNCS=y CONFIG_LIBC_MEMFD_ERROR=y CONFIG_LIB_GDBSTUB=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm64/qemu/qemu-armv8a/configs/knsh/defconfig b/boards/arm64/qemu/qemu-armv8a/configs/knsh/defconfig index fd4fd4b38261e..20f9f27d3fd89 100644 --- a/boards/arm64/qemu/qemu-armv8a/configs/knsh/defconfig +++ b/boards/arm64/qemu/qemu-armv8a/configs/knsh/defconfig @@ -70,7 +70,6 @@ CONFIG_LIBC_STRERROR=y CONFIG_LIBM=y CONFIG_MM_KMAP=y CONFIG_MM_PGALLOC=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/arm64/qemu/qemu-armv8a/configs/mte/defconfig b/boards/arm64/qemu/qemu-armv8a/configs/mte/defconfig index 40267bf2eea56..f44759c8ea678 100644 --- a/boards/arm64/qemu/qemu-armv8a/configs/mte/defconfig +++ b/boards/arm64/qemu/qemu-armv8a/configs/mte/defconfig @@ -43,7 +43,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_EXECFUNCS=y CONFIG_LIBC_MEMFD_ERROR=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm64/qemu/qemu-armv8a/configs/netnsh/defconfig b/boards/arm64/qemu/qemu-armv8a/configs/netnsh/defconfig index fa9ad0b6e7dde..34e9281a5155f 100644 --- a/boards/arm64/qemu/qemu-armv8a/configs/netnsh/defconfig +++ b/boards/arm64/qemu/qemu-armv8a/configs/netnsh/defconfig @@ -76,7 +76,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NFS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm64/qemu/qemu-armv8a/configs/netnsh_hv/defconfig b/boards/arm64/qemu/qemu-armv8a/configs/netnsh_hv/defconfig index 7997d95ac63a1..7f687ee47d376 100644 --- a/boards/arm64/qemu/qemu-armv8a/configs/netnsh_hv/defconfig +++ b/boards/arm64/qemu/qemu-armv8a/configs/netnsh_hv/defconfig @@ -69,7 +69,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NFS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm64/qemu/qemu-armv8a/configs/netnsh_smp/defconfig b/boards/arm64/qemu/qemu-armv8a/configs/netnsh_smp/defconfig index 5250b66665c09..7ed8642c99ac8 100644 --- a/boards/arm64/qemu/qemu-armv8a/configs/netnsh_smp/defconfig +++ b/boards/arm64/qemu/qemu-armv8a/configs/netnsh_smp/defconfig @@ -66,7 +66,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NFS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm64/qemu/qemu-armv8a/configs/netnsh_smp_hv/defconfig b/boards/arm64/qemu/qemu-armv8a/configs/netnsh_smp_hv/defconfig index cc0b7b55564c3..755ebe35b3e97 100644 --- a/boards/arm64/qemu/qemu-armv8a/configs/netnsh_smp_hv/defconfig +++ b/boards/arm64/qemu/qemu-armv8a/configs/netnsh_smp_hv/defconfig @@ -67,7 +67,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NFS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm64/qemu/qemu-armv8a/configs/nsh/defconfig b/boards/arm64/qemu/qemu-armv8a/configs/nsh/defconfig index 436cf8250aa4b..9a11093c1e97f 100644 --- a/boards/arm64/qemu/qemu-armv8a/configs/nsh/defconfig +++ b/boards/arm64/qemu/qemu-armv8a/configs/nsh/defconfig @@ -42,7 +42,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_EXECFUNCS=y CONFIG_LIBC_MEMFD_ERROR=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm64/qemu/qemu-armv8a/configs/nsh_fiq/defconfig b/boards/arm64/qemu/qemu-armv8a/configs/nsh_fiq/defconfig index bf8e7011e431b..8ba76bdfa43f3 100644 --- a/boards/arm64/qemu/qemu-armv8a/configs/nsh_fiq/defconfig +++ b/boards/arm64/qemu/qemu-armv8a/configs/nsh_fiq/defconfig @@ -40,7 +40,6 @@ CONFIG_HAVE_CXXINITIALIZE=y CONFIG_IDLETHREAD_STACKSIZE=8192 CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm64/qemu/qemu-armv8a/configs/nsh_gicv2/defconfig b/boards/arm64/qemu/qemu-armv8a/configs/nsh_gicv2/defconfig index c62593d922196..a5ae5397910f9 100644 --- a/boards/arm64/qemu/qemu-armv8a/configs/nsh_gicv2/defconfig +++ b/boards/arm64/qemu/qemu-armv8a/configs/nsh_gicv2/defconfig @@ -35,7 +35,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_EXECFUNCS=y CONFIG_LIBM=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm64/qemu/qemu-armv8a/configs/nsh_smp/defconfig b/boards/arm64/qemu/qemu-armv8a/configs/nsh_smp/defconfig index 324928b52c450..813e8aa0e4fa3 100644 --- a/boards/arm64/qemu/qemu-armv8a/configs/nsh_smp/defconfig +++ b/boards/arm64/qemu/qemu-armv8a/configs/nsh_smp/defconfig @@ -46,7 +46,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_EXECFUNCS=y CONFIG_LIBC_MEMFD_ERROR=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm64/qemu/qemu-armv8a/configs/nsh_smp_tickless/defconfig b/boards/arm64/qemu/qemu-armv8a/configs/nsh_smp_tickless/defconfig index f8a40ede21455..2bf39e46812a0 100644 --- a/boards/arm64/qemu/qemu-armv8a/configs/nsh_smp_tickless/defconfig +++ b/boards/arm64/qemu/qemu-armv8a/configs/nsh_smp_tickless/defconfig @@ -31,7 +31,6 @@ CONFIG_IDLETHREAD_STACKSIZE=16384 CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_EXECFUNCS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm64/qemu/qemu-armv8a/configs/rpproxy/defconfig b/boards/arm64/qemu/qemu-armv8a/configs/rpproxy/defconfig index d266e49892bf7..3189faed2ff9a 100644 --- a/boards/arm64/qemu/qemu-armv8a/configs/rpproxy/defconfig +++ b/boards/arm64/qemu/qemu-armv8a/configs/rpproxy/defconfig @@ -20,7 +20,6 @@ CONFIG_ARM64_SEMIHOSTING_HOSTFS_CACHE_COHERENCE=y CONFIG_ARM64_STRING_FUNCTION=y CONFIG_BOARDCTL_POWEROFF=y CONFIG_BOARDCTL_RESET=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BUILTIN=y CONFIG_DEBUG_ASSERTIONS=y CONFIG_DEBUG_ASSERTIONS_EXPRESSION=y @@ -63,7 +62,6 @@ CONFIG_LIBC_ZONEINFO=y CONFIG_NET=y CONFIG_NETDEV_LATEINIT=y CONFIG_NET_RPMSG=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_PROMPT_STRING="proxy> " CONFIG_NSH_READLINE=y diff --git a/boards/arm64/qemu/qemu-armv8a/configs/rpserver/defconfig b/boards/arm64/qemu/qemu-armv8a/configs/rpserver/defconfig index 7e37f3b1d8a08..2516372d31ef0 100644 --- a/boards/arm64/qemu/qemu-armv8a/configs/rpserver/defconfig +++ b/boards/arm64/qemu/qemu-armv8a/configs/rpserver/defconfig @@ -19,7 +19,6 @@ CONFIG_ARM64_SEMIHOSTING_HOSTFS_CACHE_COHERENCE=y CONFIG_ARM64_STRING_FUNCTION=y CONFIG_BOARDCTL_POWEROFF=y CONFIG_BOARDCTL_RESET=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BUILTIN=y CONFIG_DEBUG_ASSERTIONS=y CONFIG_DEBUG_ASSERTIONS_EXPRESSION=y @@ -63,7 +62,6 @@ CONFIG_LIBC_ZONEINFO=y CONFIG_NET=y CONFIG_NETDEV_LATEINIT=y CONFIG_NET_RPMSG=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_PROMPT_STRING="server> " diff --git a/boards/arm64/qemu/qemu-armv8a/configs/sotest/defconfig b/boards/arm64/qemu/qemu-armv8a/configs/sotest/defconfig index 11a91f3fd86fc..48c18d5210b0b 100644 --- a/boards/arm64/qemu/qemu-armv8a/configs/sotest/defconfig +++ b/boards/arm64/qemu/qemu-armv8a/configs/sotest/defconfig @@ -48,7 +48,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_DLFCN=y CONFIG_LIBC_ELF_DUMPBUFFER=y CONFIG_LIBC_EXECFUNCS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm64/qemu/qemu-armv8a/configs/sw_tags/defconfig b/boards/arm64/qemu/qemu-armv8a/configs/sw_tags/defconfig index 2bea20fedb58a..984fb0fc8643c 100644 --- a/boards/arm64/qemu/qemu-armv8a/configs/sw_tags/defconfig +++ b/boards/arm64/qemu/qemu-armv8a/configs/sw_tags/defconfig @@ -42,7 +42,6 @@ CONFIG_LIBC_EXECFUNCS=y CONFIG_LTO_FULL=y CONFIG_MM_KASAN=y CONFIG_MM_KASAN_SW_TAGS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm64/qemu/qemu-armv8a/configs/xedge_demo/defconfig b/boards/arm64/qemu/qemu-armv8a/configs/xedge_demo/defconfig index e45b2131f8724..68c4633b1d4eb 100644 --- a/boards/arm64/qemu/qemu-armv8a/configs/xedge_demo/defconfig +++ b/boards/arm64/qemu/qemu-armv8a/configs/xedge_demo/defconfig @@ -76,7 +76,6 @@ CONFIG_NET_TCP=y CONFIG_NET_TCP_ALLOC_CONNS=20 CONFIG_NET_UDP=y CONFIG_NFS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm64/qemu/qemu-armv8a/src/CMakeLists.txt b/boards/arm64/qemu/qemu-armv8a/src/CMakeLists.txt index 385e0ed5f2d6d..fad82a2fb4ac8 100644 --- a/boards/arm64/qemu/qemu-armv8a/src/CMakeLists.txt +++ b/boards/arm64/qemu/qemu-armv8a/src/CMakeLists.txt @@ -22,7 +22,7 @@ set(SRCS qemu_boardinit.c qemu_bringup.c) if(CONFIG_BOARDCTL) - list(APPEND SRCS qemu_appinit.c qemu_power.c) + list(APPEND SRCS qemu_power.c) endif() if(CONFIG_LIBC_FDT) diff --git a/boards/arm64/qemu/qemu-armv8a/src/Makefile b/boards/arm64/qemu/qemu-armv8a/src/Makefile index b7ab9588723c9..f276114b2ae36 100644 --- a/boards/arm64/qemu/qemu-armv8a/src/Makefile +++ b/boards/arm64/qemu/qemu-armv8a/src/Makefile @@ -25,7 +25,7 @@ include $(TOPDIR)/Make.defs CSRCS = qemu_boardinit.c qemu_bringup.c ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += qemu_appinit.c qemu_power.c +CSRCS += qemu_power.c endif ifeq ($(CONFIG_LIBC_FDT),y) diff --git a/boards/arm64/qemu/qemu-armv8a/src/qemu_appinit.c b/boards/arm64/qemu/qemu-armv8a/src/qemu_appinit.c deleted file mode 100644 index 72507c91b5b6c..0000000000000 --- a/boards/arm64/qemu/qemu-armv8a/src/qemu_appinit.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/arm64/qemu/qemu-armv8a/src/qemu_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 - -#include - -#include - -#include "qemu-armv8a.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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 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) -{ - UNUSED(arg); -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board initialization */ - - return qemu_bringup(); -#else - return OK; -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/arm64/rk3399/nanopi_m4/configs/nsh/defconfig b/boards/arm64/rk3399/nanopi_m4/configs/nsh/defconfig index 0ad77abe8fd37..fcbb75e1dc8c9 100644 --- a/boards/arm64/rk3399/nanopi_m4/configs/nsh/defconfig +++ b/boards/arm64/rk3399/nanopi_m4/configs/nsh/defconfig @@ -38,7 +38,6 @@ CONFIG_HAVE_CXX=y CONFIG_HAVE_CXXINITIALIZE=y CONFIG_IDLETHREAD_STACKSIZE=8192 CONFIG_INIT_ENTRYPOINT="nsh_main" -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm64/rk3399/nanopi_m4/src/Makefile b/boards/arm64/rk3399/nanopi_m4/src/Makefile index 44c09add7eff6..3cccdf3ce8f12 100644 --- a/boards/arm64/rk3399/nanopi_m4/src/Makefile +++ b/boards/arm64/rk3399/nanopi_m4/src/Makefile @@ -23,7 +23,6 @@ include $(TOPDIR)/Make.defs CSRCS = nanopi_m4_boardinit.c -CSRCS += nanopi_m4_appinit.c ifeq ($(CONFIG_ETC_ROMFS),y) RCSRCS = etc/init.d/rc.sysinit etc/init.d/rcS diff --git a/boards/arm64/rk3399/nanopi_m4/src/nanopi_m4_appinit.c b/boards/arm64/rk3399/nanopi_m4/src/nanopi_m4_appinit.c deleted file mode 100644 index 03ae07d5a1df6..0000000000000 --- a/boards/arm64/rk3399/nanopi_m4/src/nanopi_m4_appinit.c +++ /dev/null @@ -1,66 +0,0 @@ -/**************************************************************************** - * boards/arm64/rk3399/nanopi_m4/src/nanopi_m4_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 -#include -#include -#include "nanopi_m4.h" - -/**************************************************************************** - * 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 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) -{ - /* Perform board initialization */ - - return OK; -} diff --git a/boards/arm64/rk3399/nanopi_m4/src/nanopi_m4_boardinit.c b/boards/arm64/rk3399/nanopi_m4/src/nanopi_m4_boardinit.c index ea2f99ca8b2a6..7bd8d46c7a3b2 100644 --- a/boards/arm64/rk3399/nanopi_m4/src/nanopi_m4_boardinit.c +++ b/boards/arm64/rk3399/nanopi_m4/src/nanopi_m4_boardinit.c @@ -101,6 +101,5 @@ void rk3399_board_initialize(void) #ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { - /* Perform board initialization */ } #endif /* CONFIG_BOARD_LATE_INITIALIZE */ diff --git a/boards/arm64/rk3399/pinephonepro/configs/nsh/defconfig b/boards/arm64/rk3399/pinephonepro/configs/nsh/defconfig index 4cdda4dd59947..c490398a7c828 100644 --- a/boards/arm64/rk3399/pinephonepro/configs/nsh/defconfig +++ b/boards/arm64/rk3399/pinephonepro/configs/nsh/defconfig @@ -37,7 +37,6 @@ CONFIG_HAVE_CXX=y CONFIG_HAVE_CXXINITIALIZE=y CONFIG_IDLETHREAD_STACKSIZE=8192 CONFIG_INIT_ENTRYPOINT="nsh_main" -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm64/rk3399/pinephonepro/src/CMakeLists.txt b/boards/arm64/rk3399/pinephonepro/src/CMakeLists.txt index c39a7c63538ef..3bcbb66ef04f3 100644 --- a/boards/arm64/rk3399/pinephonepro/src/CMakeLists.txt +++ b/boards/arm64/rk3399/pinephonepro/src/CMakeLists.txt @@ -23,7 +23,6 @@ set(SRCS pinephonepro_boardinit.c pinephonepro_bringup.c) if(CONFIG_BOARDCTL) - list(APPEND SRCS pinephonepro_appinit.c) if(CONFIG_BOARDCTL_RESET) list(APPEND SRCS pinephonepro_reset.c) endif() diff --git a/boards/arm64/rk3399/pinephonepro/src/Makefile b/boards/arm64/rk3399/pinephonepro/src/Makefile index ad8f030577a9c..d659d138e1aea 100644 --- a/boards/arm64/rk3399/pinephonepro/src/Makefile +++ b/boards/arm64/rk3399/pinephonepro/src/Makefile @@ -24,11 +24,8 @@ include $(TOPDIR)/Make.defs CSRCS = pinephonepro_boardinit.c pinephonepro_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += pinephonepro_appinit.c ifeq ($(CONFIG_BOARDCTL_RESET),y) CSRCS += pinephonepro_reset.c endif -endif include $(TOPDIR)/boards/Board.mk diff --git a/boards/arm64/rk3399/pinephonepro/src/pinephonepro_appinit.c b/boards/arm64/rk3399/pinephonepro/src/pinephonepro_appinit.c deleted file mode 100644 index 9208f94f71d27..0000000000000 --- a/boards/arm64/rk3399/pinephonepro/src/pinephonepro_appinit.c +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** - * boards/arm64/rk3399/pinephonepro/src/pinephonepro_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 -#include -#include -#include "pinephonepro.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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 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) -{ - UNUSED(arg); -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board initialization */ - - return pinephonepro_bringup(); -#else - return OK; -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/arm64/zynq-mpsoc/zcu111/configs/jtag/defconfig b/boards/arm64/zynq-mpsoc/zcu111/configs/jtag/defconfig index 97737c569f6e9..1d054bd056110 100644 --- a/boards/arm64/zynq-mpsoc/zcu111/configs/jtag/defconfig +++ b/boards/arm64/zynq-mpsoc/zcu111/configs/jtag/defconfig @@ -44,7 +44,6 @@ CONFIG_HAVE_CXXINITIALIZE=y CONFIG_IDLETHREAD_STACKSIZE=8192 CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=9192 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm64/zynq-mpsoc/zcu111/configs/netjtag/defconfig b/boards/arm64/zynq-mpsoc/zcu111/configs/netjtag/defconfig index f64751f4409f5..fd7389d5e6601 100644 --- a/boards/arm64/zynq-mpsoc/zcu111/configs/netjtag/defconfig +++ b/boards/arm64/zynq-mpsoc/zcu111/configs/netjtag/defconfig @@ -75,7 +75,6 @@ CONFIG_NET_TCP_KEEPALIVE=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_WRITE_BUFFERS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm64/zynq-mpsoc/zcu111/configs/netnsh/defconfig b/boards/arm64/zynq-mpsoc/zcu111/configs/netnsh/defconfig index 91c5b72030569..d4f3b29970ba1 100644 --- a/boards/arm64/zynq-mpsoc/zcu111/configs/netnsh/defconfig +++ b/boards/arm64/zynq-mpsoc/zcu111/configs/netnsh/defconfig @@ -70,7 +70,6 @@ CONFIG_NET_TCP_KEEPALIVE=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_WRITE_BUFFERS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm64/zynq-mpsoc/zcu111/configs/nsh/defconfig b/boards/arm64/zynq-mpsoc/zcu111/configs/nsh/defconfig index 1d7c7bbdf5773..7a387d34159f5 100644 --- a/boards/arm64/zynq-mpsoc/zcu111/configs/nsh/defconfig +++ b/boards/arm64/zynq-mpsoc/zcu111/configs/nsh/defconfig @@ -43,7 +43,6 @@ CONFIG_HAVE_CXXINITIALIZE=y CONFIG_IDLETHREAD_STACKSIZE=8192 CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=9192 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/arm64/zynq-mpsoc/zcu111/src/Makefile b/boards/arm64/zynq-mpsoc/zcu111/src/Makefile index a0eacd701e7e9..8dd6f477d3b59 100644 --- a/boards/arm64/zynq-mpsoc/zcu111/src/Makefile +++ b/boards/arm64/zynq-mpsoc/zcu111/src/Makefile @@ -23,12 +23,10 @@ include $(TOPDIR)/Make.defs CSRCS = zcu111_boardinit.c zcu111_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += zcu111_appinit.c + ifeq ($(CONFIG_BOARDCTL_RESET),y) CSRCS += zcu111_reset.c endif -endif ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += zcu111_autoleds.c diff --git a/boards/arm64/zynq-mpsoc/zcu111/src/zcu111_appinit.c b/boards/arm64/zynq-mpsoc/zcu111/src/zcu111_appinit.c deleted file mode 100644 index 43a18f5df5f39..0000000000000 --- a/boards/arm64/zynq-mpsoc/zcu111/src/zcu111_appinit.c +++ /dev/null @@ -1,72 +0,0 @@ -/**************************************************************************** - * boards/arm64/zynq-mpsoc/zcu111/src/zcu111_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 -#include -#include -#include "zcu111.h" - -/**************************************************************************** - * 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 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 zcu111_bringup(); -#endif -} diff --git a/boards/avr/at32uc3/avr32dev1/src/Makefile b/boards/avr/at32uc3/avr32dev1/src/Makefile index d37964d7697a2..2b8350fdfd686 100644 --- a/boards/avr/at32uc3/avr32dev1/src/Makefile +++ b/boards/avr/at32uc3/avr32dev1/src/Makefile @@ -23,13 +23,15 @@ include $(TOPDIR)/Make.defs CSRCS = avr32_boot.c + ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += avr32_leds.c endif + ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += avr32_buttons.c endif -CSRCS += avr32_appinit.c + CSRCS += avr32_bringup.c include $(TOPDIR)/boards/Board.mk diff --git a/boards/avr/at32uc3/avr32dev1/src/avr32_appinit.c b/boards/avr/at32uc3/avr32dev1/src/avr32_appinit.c deleted file mode 100644 index 8c8592fd0e7f4..0000000000000 --- a/boards/avr/at32uc3/avr32dev1/src/avr32_appinit.c +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** - * boards/avr/at32uc3/avr32dev1/src/avr32_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 - -#include - -#include - -#include "avr32dev1.h" - -/**************************************************************************** - * 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 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) -{ -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board initialization */ - - return avr32_bringup(); -#else - return OK; -#endif /* CONFIG_BOARD_LATE_INITIALIZE */ -} diff --git a/boards/avr/at32uc3/avr32dev1/src/avr32_boot.c b/boards/avr/at32uc3/avr32dev1/src/avr32_boot.c index 4c6c761f6477f..8fcf82c82acce 100644 --- a/boards/avr/at32uc3/avr32dev1/src/avr32_boot.c +++ b/boards/avr/at32uc3/avr32dev1/src/avr32_boot.c @@ -68,3 +68,23 @@ void at32uc3_boardinitialize(void) board_autoled_initializeialize(); #endif } + +/**************************************************************************** + * 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ + avr32_bringup(); +} +#endif diff --git a/boards/avr/at32uc3/mizar32a/src/Makefile b/boards/avr/at32uc3/mizar32a/src/Makefile index f714dd728cd16..0a66e41f70102 100644 --- a/boards/avr/at32uc3/mizar32a/src/Makefile +++ b/boards/avr/at32uc3/mizar32a/src/Makefile @@ -23,13 +23,15 @@ include $(TOPDIR)/Make.defs CSRCS = avr32_boot.c + ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += avr32_leds.c endif + ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += avr32_buttons.c endif -CSRCS += avr32_appinit.c + CSRCS += avr32_bringup.c include $(TOPDIR)/boards/Board.mk diff --git a/boards/avr/at32uc3/mizar32a/src/avr32_appinit.c b/boards/avr/at32uc3/mizar32a/src/avr32_appinit.c deleted file mode 100644 index e2d62ffbc473b..0000000000000 --- a/boards/avr/at32uc3/mizar32a/src/avr32_appinit.c +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** - * boards/avr/at32uc3/mizar32a/src/avr32_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 - -#include - -#include - -#include "mizar32a.h" - -/**************************************************************************** - * 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 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) -{ -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board initialization */ - - return avr32_bringup(); -#else - return OK; -#endif /* CONFIG_BOARD_LATE_INITIALIZE */ -} diff --git a/boards/avr/at32uc3/mizar32a/src/avr32_boot.c b/boards/avr/at32uc3/mizar32a/src/avr32_boot.c index a745997cc5680..d4be3e9697686 100644 --- a/boards/avr/at32uc3/mizar32a/src/avr32_boot.c +++ b/boards/avr/at32uc3/mizar32a/src/avr32_boot.c @@ -68,3 +68,23 @@ void at32uc3_boardinitialize(void) board_autoled_initializeialize(); #endif } + +/**************************************************************************** + * 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ + avr32_bringup(); +} +#endif diff --git a/boards/avr/at90usb/micropendous3/src/at90usb_boot.c b/boards/avr/at90usb/micropendous3/src/at90usb_boot.c index d06888129bff6..b09d700f57006 100644 --- a/boards/avr/at90usb/micropendous3/src/at90usb_boot.c +++ b/boards/avr/at90usb/micropendous3/src/at90usb_boot.c @@ -77,3 +77,22 @@ void at90usb_boardinitialize(void) at90usb_led_initialize(); #endif } + +/**************************************************************************** + * 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ +} +#endif /* CONFIG_BOARD_LATE_INITIALIZE */ diff --git a/boards/avr/at90usb/teensy-2.0/src/Makefile b/boards/avr/at90usb/teensy-2.0/src/Makefile index 4955e097ac3a8..3d0fce3153fdc 100644 --- a/boards/avr/at90usb/teensy-2.0/src/Makefile +++ b/boards/avr/at90usb/teensy-2.0/src/Makefile @@ -28,10 +28,6 @@ ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += at90usb_leds.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += at90usb_appinit.c -endif - ifeq ($(CONFIG_USBMSC),y) CSRCS += at90usb_usbmsc.c endif diff --git a/boards/avr/at90usb/teensy-2.0/src/at90usb_appinit.c b/boards/avr/at90usb/teensy-2.0/src/at90usb_appinit.c deleted file mode 100644 index 5f9705159cde9..0000000000000 --- a/boards/avr/at90usb/teensy-2.0/src/at90usb_appinit.c +++ /dev/null @@ -1,68 +0,0 @@ -/**************************************************************************** - * boards/avr/at90usb/teensy-2.0/src/at90usb_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 - -#include -#include - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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 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) -{ - return OK; -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/avr/at90usb/teensy-2.0/src/at90usb_boot.c b/boards/avr/at90usb/teensy-2.0/src/at90usb_boot.c index 4e74f9f99e51d..810424c81ce99 100644 --- a/boards/avr/at90usb/teensy-2.0/src/at90usb_boot.c +++ b/boards/avr/at90usb/teensy-2.0/src/at90usb_boot.c @@ -69,3 +69,22 @@ void at90usb_boardinitialize(void) at90usb_led_initialize(); #endif } + +/**************************************************************************** + * 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ +} +#endif /* CONFIG_BOARD_LATE_INITIALIZE */ diff --git a/boards/avr/atmega/amber/src/atmega_boot.c b/boards/avr/atmega/amber/src/atmega_boot.c index 7ade76f741c18..3dc0455b128df 100644 --- a/boards/avr/atmega/amber/src/atmega_boot.c +++ b/boards/avr/atmega/amber/src/atmega_boot.c @@ -77,3 +77,22 @@ void atmega_boardinitialize(void) atmega_led_initialize(); #endif } + +/**************************************************************************** + * 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ +} +#endif /* CONFIG_BOARD_LATE_INITIALIZE */ diff --git a/boards/avr/atmega/arduino-mega2560/src/avr_boot.c b/boards/avr/atmega/arduino-mega2560/src/avr_boot.c index 77563d96eda1a..537aff676d460 100644 --- a/boards/avr/atmega/arduino-mega2560/src/avr_boot.c +++ b/boards/avr/atmega/arduino-mega2560/src/avr_boot.c @@ -65,3 +65,22 @@ void atmega_boardinitialize(void) atmega_led_initialize(); #endif } + +/**************************************************************************** + * 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ +} +#endif /* CONFIG_BOARD_LATE_INITIALIZE */ diff --git a/boards/avr/atmega/elegoo-mega2560r3/src/avr_boot.c b/boards/avr/atmega/elegoo-mega2560r3/src/avr_boot.c index bc4aaf7fd7f88..da65e66436c6a 100644 --- a/boards/avr/atmega/elegoo-mega2560r3/src/avr_boot.c +++ b/boards/avr/atmega/elegoo-mega2560r3/src/avr_boot.c @@ -66,3 +66,22 @@ void atmega_boardinitialize(void) board_autoled_initialize(); #endif } + +/**************************************************************************** + * 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ +} +#endif /* CONFIG_BOARD_LATE_INITIALIZE */ diff --git a/boards/avr/atmega/mega1284p-xplained/src/avr_boot.c b/boards/avr/atmega/mega1284p-xplained/src/avr_boot.c index 1736e2d1eb0a9..6ed87f8f7eff4 100644 --- a/boards/avr/atmega/mega1284p-xplained/src/avr_boot.c +++ b/boards/avr/atmega/mega1284p-xplained/src/avr_boot.c @@ -77,3 +77,22 @@ void atmega_boardinitialize(void) atmega_led_initialize(); #endif } + +/**************************************************************************** + * 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ +} +#endif diff --git a/boards/avr/atmega/moteino-mega/src/avr_boot.c b/boards/avr/atmega/moteino-mega/src/avr_boot.c index 094085dffe611..ded95a3e956a5 100644 --- a/boards/avr/atmega/moteino-mega/src/avr_boot.c +++ b/boards/avr/atmega/moteino-mega/src/avr_boot.c @@ -77,3 +77,22 @@ void atmega_boardinitialize(void) atmega_led_initialize(); #endif } + +/**************************************************************************** + * 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ +} +#endif /* CONFIG_BOARD_LATE_INITIALIZE */ diff --git a/boards/boardctl.c b/boards/boardctl.c index 258ee99aa22d2..31ba2c245caed 100644 --- a/boards/boardctl.c +++ b/boards/boardctl.c @@ -387,26 +387,11 @@ int boardctl(unsigned int cmd, uintptr_t arg) switch (cmd) { - /* CMD: BOARDIOC_INIT - * DESCRIPTION: Perform one-time application initialization. - * 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 cold 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. - * CONFIGURATION: CONFIG_BOARDCTL - * DEPENDENCIES: Board logic must provide board_app_initialization - */ - case BOARDIOC_INIT: { - ret = board_app_initialize(arg); + /* WARNING: deprecated, will be removed */ + + ret = -ENOTTY; } break; diff --git a/boards/hc/m9s12/demo9s12ne64/src/Makefile b/boards/hc/m9s12/demo9s12ne64/src/Makefile index 9d317d6a76372..cc6d28ecf3570 100644 --- a/boards/hc/m9s12/demo9s12ne64/src/Makefile +++ b/boards/hc/m9s12/demo9s12ne64/src/Makefile @@ -23,8 +23,5 @@ include $(TOPDIR)/Make.defs CSRCS = m9s12_boot.c m9s12_leds.c m9s12_buttons.c m9s12_spi.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += m9s12_appinit.c -endif include $(TOPDIR)/boards/Board.mk diff --git a/boards/hc/m9s12/demo9s12ne64/src/m9s12_appinit.c b/boards/hc/m9s12/demo9s12ne64/src/m9s12_appinit.c deleted file mode 100644 index dba0fc340935d..0000000000000 --- a/boards/hc/m9s12/demo9s12ne64/src/m9s12_appinit.c +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** - * boards/hc/m9s12/demo9s12ne64/src/m9s12_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 - -#include -#include -#include - -#include - -#include "demo9s12ne64.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * 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) -{ - /* Configure SPI-based devices */ - - return OK; -} diff --git a/boards/hc/m9s12/ne64badge/src/Makefile b/boards/hc/m9s12/ne64badge/src/Makefile index 9d1d7b0fec4ce..7c576adc83bc5 100644 --- a/boards/hc/m9s12/ne64badge/src/Makefile +++ b/boards/hc/m9s12/ne64badge/src/Makefile @@ -23,8 +23,5 @@ include $(TOPDIR)/Make.defs CSRCS = m9s12_boot.c m9s12_leds.c m9s12_buttons.c m9s12_spi.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += m9s12_appinit.c -endif include $(TOPDIR)/boards/Board.mk diff --git a/boards/hc/m9s12/ne64badge/src/m9s12_appinit.c b/boards/hc/m9s12/ne64badge/src/m9s12_appinit.c deleted file mode 100644 index 3588ad515a719..0000000000000 --- a/boards/hc/m9s12/ne64badge/src/m9s12_appinit.c +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** - * boards/hc/m9s12/ne64badge/src/m9s12_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 - -#include -#include -#include - -#include - -#include "ne64badge.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * 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) -{ - /* Configure SPI-based devices */ - - return OK; -} diff --git a/boards/mips/pic32mx/mirtoo/configs/nxffs/defconfig b/boards/mips/pic32mx/mirtoo/configs/nxffs/defconfig index 10899f3102608..87f4de7af4abc 100644 --- a/boards/mips/pic32mx/mirtoo/configs/nxffs/defconfig +++ b/boards/mips/pic32mx/mirtoo/configs/nxffs/defconfig @@ -30,7 +30,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_MIPS32_TOOLCHAIN_PINGUINOW=y CONFIG_MTD=y CONFIG_MTD_SST25=y -CONFIG_NSH_ARCHINIT=y CONFIG_PIC32MX_DEBUGGER=1 CONFIG_PIC32MX_ICESEL=2 CONFIG_PIC32MX_OSCOUT=1 diff --git a/boards/mips/pic32mx/mirtoo/src/Makefile b/boards/mips/pic32mx/mirtoo/src/Makefile index f9c20b171f924..7a8821c60c837 100644 --- a/boards/mips/pic32mx/mirtoo/src/Makefile +++ b/boards/mips/pic32mx/mirtoo/src/Makefile @@ -32,8 +32,4 @@ ifeq ($(CONFIG_PIC32MX_ADC),y) CSRCS += pic32_adc.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += pic32_appinit.c -endif - include $(TOPDIR)/boards/Board.mk diff --git a/boards/mips/pic32mx/mirtoo/src/pic32_appinit.c b/boards/mips/pic32mx/mirtoo/src/pic32_appinit.c deleted file mode 100644 index 7df470dd4a0ce..0000000000000 --- a/boards/mips/pic32mx/mirtoo/src/pic32_appinit.c +++ /dev/null @@ -1,162 +0,0 @@ -/**************************************************************************** - * boards/mips/pic32mx/mirtoo/src/pic32_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 - -#include -#include -#include -#include - -#include -#include - -#ifdef CONFIG_PIC32MX_SPI2 -# include -# include -# include -#endif - -#include "pic32mx.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Configuration ************************************************************/ - -/* Can't support the SST25 device if it SPI2/SST25 support is not enabled */ - -#define HAVE_SST25 1 -#if !defined(CONFIG_PIC32MX_SPI2) || !defined(CONFIG_MTD_SST25) -# undef HAVE_SST25 -#endif - -/* Can't support SST25 features if mountpoints are disabled */ - -#if defined(CONFIG_DISABLE_MOUNTPOINT) -# undef HAVE_SST25 -#endif - -/* Use minor device number 0 is not is provided */ - -#ifndef CONFIG_NSH_MMCSDMINOR -# define CONFIG_NSH_MMCSDMINOR 0 -#endif - -/* Can't support both FAT and NXFFS */ - -#if defined(CONFIG_FS_FAT) && defined(CONFIG_FS_NXFFS) -# warning "Can't support both FAT and NXFFS -- using FAT" -#endif - -/**************************************************************************** - * 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 HAVE_SST25 - struct spi_dev_s *spi; - struct mtd_dev_s *mtd; - int ret; - - /* Get the SPI port */ - - spi = pic32mx_spibus_initialize(2); - if (!spi) - { - ferr("ERROR: Failed to initialize SPI port 2\n"); - return -ENODEV; - } - - /* Now bind the SPI interface to the SST 25 SPI FLASH driver */ - - mtd = sst25_initialize(spi); - if (!mtd) - { - ferr("ERROR: Failed to bind SPI port 2 to the SST 25 FLASH driver\n"); - return -ENODEV; - } - -#ifndef CONFIG_FS_NXFFS - /* Register the MTD driver */ - - char path[32]; - snprintf(path, sizeof(path), "/dev/mtdblock%d", CONFIG_NSH_MMCSDMINOR); - ret = register_mtddriver(path, mtd, 0755, NULL); - if (ret < 0) - { - ferr("ERROR: Failed to register the MTD driver %s, ret %d\n", - path, ret); - return ret; - } -#else - /* Initialize to provide NXFFS on the MTD interface */ - - ret = nxffs_initialize(mtd); - if (ret < 0) - { - ferr("ERROR: NXFFS initialization failed: %d\n", -ret); - return ret; - } - - /* Mount the file system at /mnt/sst25 */ - - ret = nx_mount(NULL, "/mnt/sst25", "nxffs", 0, NULL); - if (ret < 0) - { - ferr("ERROR: Failed to mount the NXFFS volume: %d\n", ret); - return ret; - } -#endif -#endif - - return OK; -} diff --git a/boards/mips/pic32mx/mirtoo/src/pic32_boot.c b/boards/mips/pic32mx/mirtoo/src/pic32_boot.c index 21f0f8dfd3eb7..1b4845471ccc6 100644 --- a/boards/mips/pic32mx/mirtoo/src/pic32_boot.c +++ b/boards/mips/pic32mx/mirtoo/src/pic32_boot.c @@ -28,7 +28,19 @@ #include +#include +#include +#include + +#include #include +#include + +#ifdef CONFIG_PIC32MX_SPI2 +# include +# include +# include +#endif #include "mips_internal.h" #include "pic32mx.h" @@ -45,6 +57,33 @@ #define GPIO_U2TX (GPIO_OUTPUT|GPIO_PORTB|GPIO_PIN10) #define GPIO_U2RX (GPIO_INPUT|GPIO_PORTB|GPIO_PIN11) +/* Configuration ************************************************************/ + +/* Can't support the SST25 device if it SPI2/SST25 support is not enabled */ + +#define HAVE_SST25 1 +#if !defined(CONFIG_PIC32MX_SPI2) || !defined(CONFIG_MTD_SST25) +# undef HAVE_SST25 +#endif + +/* Can't support SST25 features if mountpoints are disabled */ + +#if defined(CONFIG_DISABLE_MOUNTPOINT) +# undef HAVE_SST25 +#endif + +/* Use minor device number 0 is not is provided */ + +#ifndef CONFIG_NSH_MMCSDMINOR +# define CONFIG_NSH_MMCSDMINOR 0 +#endif + +/* Can't support both FAT and NXFFS */ + +#if defined(CONFIG_FS_FAT) && defined(CONFIG_FS_NXFFS) +# warning "Can't support both FAT and NXFFS -- using FAT" +#endif + /**************************************************************************** * Private Functions ****************************************************************************/ @@ -149,3 +188,78 @@ void pic32mx_boardinitialize(void) pic32mx_led_initialize(); #endif } + +/**************************************************************************** + * 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ +#ifdef HAVE_SST25 + struct spi_dev_s *spi; + struct mtd_dev_s *mtd; + int ret; + + /* Get the SPI port */ + + spi = pic32mx_spibus_initialize(2); + if (!spi) + { + ferr("ERROR: Failed to initialize SPI port 2\n"); + return; + } + + /* Now bind the SPI interface to the SST 25 SPI FLASH driver */ + + mtd = sst25_initialize(spi); + if (!mtd) + { + ferr("ERROR: Failed to bind SPI port 2 to the SST 25 FLASH driver\n"); + return; + } + +#ifndef CONFIG_FS_NXFFS + /* Register the MTD driver */ + + char path[32]; + snprintf(path, sizeof(path), "/dev/mtdblock%d", CONFIG_NSH_MMCSDMINOR); + ret = register_mtddriver(path, mtd, 0755, NULL); + if (ret < 0) + { + ferr("ERROR: Failed to register the MTD driver %s, ret %d\n", + path, ret); + return; + } +#else + /* Initialize to provide NXFFS on the MTD interface */ + + ret = nxffs_initialize(mtd); + if (ret < 0) + { + ferr("ERROR: NXFFS initialization failed: %d\n", -ret); + return; + } + + /* Mount the file system at /mnt/sst25 */ + + ret = nx_mount(NULL, "/mnt/sst25", "nxffs", 0, NULL); + if (ret < 0) + { + ferr("ERROR: Failed to mount the NXFFS volume: %d\n", ret); + return; + } +#endif +#endif +} + +#endif /* CONFIG_BOARD_LATE_INITIALIZE */ diff --git a/boards/mips/pic32mx/pic32mx-starterkit/configs/nsh/defconfig b/boards/mips/pic32mx/pic32mx-starterkit/configs/nsh/defconfig index 2ab362a681f31..eeb58fd06d703 100644 --- a/boards/mips/pic32mx/pic32mx-starterkit/configs/nsh/defconfig +++ b/boards/mips/pic32mx/pic32mx-starterkit/configs/nsh/defconfig @@ -29,7 +29,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MMCSD=y CONFIG_MTD=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/mips/pic32mx/pic32mx-starterkit/configs/nsh2/defconfig b/boards/mips/pic32mx/pic32mx-starterkit/configs/nsh2/defconfig index 75e35bdf9533d..ecc940d2f62e7 100644 --- a/boards/mips/pic32mx/pic32mx-starterkit/configs/nsh2/defconfig +++ b/boards/mips/pic32mx/pic32mx-starterkit/configs/nsh2/defconfig @@ -47,7 +47,6 @@ CONFIG_NET_TCP=y CONFIG_NET_TCP_PREALLOC_CONNS=40 CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/mips/pic32mx/pic32mx-starterkit/src/Makefile b/boards/mips/pic32mx/pic32mx-starterkit/src/Makefile index 5d183b4755774..f7ce3c712838f 100644 --- a/boards/mips/pic32mx/pic32mx-starterkit/src/Makefile +++ b/boards/mips/pic32mx/pic32mx-starterkit/src/Makefile @@ -28,10 +28,6 @@ ifeq ($(CONFIG_PIC32MX_USBDEV),y) CSRCS += pic32mx_usbdev.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += pic32mx_appinit.c -endif - ifeq ($(CONFIG_USBMSC),y) CSRCS += pic32mx_usbmsc.c endif diff --git a/boards/mips/pic32mx/pic32mx-starterkit/src/pic32mx_appinit.c b/boards/mips/pic32mx/pic32mx-starterkit/src/pic32mx_appinit.c deleted file mode 100644 index bbf13a39cad5f..0000000000000 --- a/boards/mips/pic32mx/pic32mx-starterkit/src/pic32mx_appinit.c +++ /dev/null @@ -1,390 +0,0 @@ -/**************************************************************************** - * boards/mips/pic32mx/pic32mx-starterkit/src/pic32mx_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 - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include "pic32mx.h" -#include "pic32mx-starterkit.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Configuration ************************************************************/ - -/* Assume that we have MMC/SD, USB host (and USB device) */ - -#define NSH_HAVEMMCSD 1 -#define NSH_HAVEUSBHOST 1 - -/* The PIC32 Ethernet Starter Kit does not have an SD slot on board. If one - * is added, then it must be specified by defining which SPI bus that it - * is connected on. - */ - -#ifndef CONFIG_PIC32MX_MMCSDSPIPORTNO -# undef NSH_HAVEMMCSD -#endif - -/* Make sure that the configuration will support the SD card */ - -#ifdef NSH_HAVEMMCSD - -/* Make sure that the NSH configuration uses the correct SPI */ - -# if !defined(CONFIG_NSH_MMCSDSPIPORTNO) -# define CONFIG_NSH_MMCSDSPIPORTNO CONFIG_PIC32MX_MMCSDSPIPORTNO -# elif CONFIG_NSH_MMCSDSPIPORTNO != CONFIG_PIC32MX_MMCSDSPIPORTNO -# warning "CONFIG_PIC32MX_MMCSDSPIPORTNO does not match CONFIG_NSH_MMCSDSPIPORTNO" -# undef CONFIG_NSH_MMCSDSPIPORTNO -# define CONFIG_NSH_MMCSDSPIPORTNO CONFIG_PIC32MX_MMCSDSPIPORTNO -# endif - -/* Make sure that the NSH configuration uses the slot */ - -# if !defined(CONFIG_NSH_MMCSDSLOTNO) -# define CONFIG_NSH_MMCSDSLOTNO 0 -# elif CONFIG_NSH_MMCSDSLOTNO != 0 -# warning "The PIC32 Starter Kit has only one slot (0)" -# undef CONFIG_NSH_MMCSDSLOTNO -# define CONFIG_NSH_MMCSDSLOTNO 0 -# endif - -/* Make sure that the correct SPI is enabled in the configuration */ - -# if CONFIG_PIC32MX_MMCSDSPIPORTNO == 1 && !defined(CONFIG_PIC32MX_SPI1) -# warning "CONFIG_PIC32MX_SPI1 is not enabled" -# undef NSH_HAVEMMCSD -# elif CONFIG_PIC32MX_MMCSDSPIPORTNO == 2 && !defined(CONFIG_PIC32MX_SPI2) -# warning "CONFIG_PIC32MX_SPI2 is not enabled" -# undef NSH_HAVEMMCSD -# elif CONFIG_PIC32MX_MMCSDSPIPORTNO == 3 && !defined(CONFIG_PIC32MX_SPI3) -# warning "CONFIG_PIC32MX_SPI3 is not enabled" -# undef NSH_HAVEMMCSD -# elif CONFIG_PIC32MX_MMCSDSPIPORTNO == 4 && !defined(CONFIG_PIC32MX_SPI4) -# warning "CONFIG_PIC32MX_SPI4 is not enabled" -# undef NSH_HAVEMMCSD -# endif -#endif - -/* Can't support MMC/SD features if mountpoints are disabled */ - -#if defined(CONFIG_DISABLE_MOUNTPOINT) -# undef NSH_HAVEMMCSD -#endif - -/* Select /dev/mmcsd0 if no other minor number is provided */ - -#ifndef CONFIG_NSH_MMCSDMINOR -# define CONFIG_NSH_MMCSDMINOR 0 -#endif - -/* USB Host */ - -#ifdef CONFIG_USBHOST -# ifndef CONFIG_PIC32MX_USBHOST -# error "CONFIG_PIC32MX_USBHOST is not selected" -# undef NSH_HAVEUSBHOST -# endif -#endif - -#ifdef CONFIG_PIC32MX_USBHOST -# ifndef CONFIG_USBHOST -# warning "CONFIG_USBHOST is not selected" -# undef NSH_HAVEUSBHOST -# endif -#endif - -#if !defined(CONFIG_USBHOST) || !defined(CONFIG_PIC32MX_USBHOST) -# undef NSH_HAVEUSBHOST -#endif - -#ifdef NSH_HAVEUSBHOST -# ifndef CONFIG_USBHOST_DEFPRIO -# define CONFIG_USBHOST_DEFPRIO 50 -# endif -# ifndef CONFIG_USBHOST_STACKSIZE -# ifdef CONFIG_USBHOST_HUB -# define CONFIG_USBHOST_STACKSIZE 1536 -# else -# define CONFIG_USBHOST_STACKSIZE 1024 -# endif -# endif -#endif - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -#ifdef NSH_HAVEUSBHOST -static struct usbhost_connection_s *g_usbconn; -#endif - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: nsh_waiter - * - * Description: - * Wait for USB devices to be connected. - * - ****************************************************************************/ - -#ifdef NSH_HAVEUSBHOST -static int nsh_waiter(int argc, char *argv[]) -{ - struct usbhost_hubport_s *hport; - - syslog(LOG_INFO, "nsh_waiter: Running\n"); - for (; ; ) - { - /* Wait for the device to change state */ - - DEBUGVERIFY(CONN_WAIT(g_usbconn, &hport)); - syslog(LOG_INFO, "nsh_waiter: %s\n", - hport->connected ? "connected" : "disconnected"); - - /* Did we just become connected? */ - - if (hport->connected) - { - /* Yes.. enumerate the newly connected device */ - - CONN_ENUMERATE(g_usbconn, hport); - } - } - - /* Keep the compiler from complaining */ - - return 0; -} -#endif - -/**************************************************************************** - * Name: nsh_sdinitialize - * - * Description: - * Initialize SPI-based microSD. - * - ****************************************************************************/ - -#ifdef NSH_HAVEMMCSD -static int nsh_sdinitialize(void) -{ - struct spi_dev_s *spi; - int ret; - - /* Get the SPI port */ - - spi = pic32mx_spibus_initialize(CONFIG_NSH_MMCSDSPIPORTNO); - if (!spi) - { - syslog(LOG_ERR, "ERROR: Failed to initialize SPI port %d\n", - CONFIG_NSH_MMCSDSPIPORTNO); - ret = -ENODEV; - goto errout; - } - - syslog(LOG_INFO, "Successfully initialized SPI port %d\n", - CONFIG_NSH_MMCSDSPIPORTNO); - - /* Bind the SPI port to the slot */ - - ret = mmcsd_spislotinitialize(CONFIG_NSH_MMCSDMINOR, - CONFIG_NSH_MMCSDSLOTNO, spi); - if (ret < 0) - { - syslog(LOG_ERR, - "ERROR: Failed to bind SPI port %d to MMC/SD slot %d: %d\n", - CONFIG_NSH_MMCSDSPIPORTNO, - CONFIG_NSH_MMCSDSLOTNO, ret); - goto errout; - } - - syslog(LOG_INFO, "Successfully bound SPI port %d to MMC/SD slot %d\n", - CONFIG_NSH_MMCSDSPIPORTNO, - CONFIG_NSH_MMCSDSLOTNO); - return OK; - -errout: - return ret; -} -#else -# define nsh_sdinitialize() (OK) -#endif - -/**************************************************************************** - * Name: nsh_usbhostinitialize - * - * Description: - * Initialize SPI-based microSD. - * - ****************************************************************************/ - -#ifdef NSH_HAVEUSBHOST -static int nsh_usbhostinitialize(void) -{ - int ret; - - /* First, register all of the class drivers needed to support the drivers - * that we care about: - */ - - syslog(LOG_INFO, "Register class drivers\n"); - -#ifdef CONFIG_USBHOST_MSC - /* Register the USB host Mass Storage Class */ - - ret = usbhost_msc_initialize(); - if (ret != OK) - { - syslog(LOG_ERR, - "ERROR: Failed to register the mass storage class: %d\n", ret); - } -#endif - -#ifdef CONFIG_USBHOST_CDCACM - /* Register the CDC/ACM serial class */ - - ret = usbhost_cdcacm_initialize(); - if (ret != OK) - { - syslog(LOG_ERR, - "ERROR: Failed to register the CDC/ACM serial class: %d\n", - ret); - } -#endif - - /* Then get an instance of the USB host interface */ - - syslog(LOG_INFO, "Initialize USB host\n"); - g_usbconn = pic32_usbhost_initialize(0); - if (g_usbconn) - { - /* Start a thread to handle device connection. */ - - syslog(LOG_INFO, "Start nsh_waiter\n"); - - ret = kthread_create("usbhost", CONFIG_USBHOST_DEFPRIO, - CONFIG_USBHOST_STACKSIZE, - nsh_waiter, NULL); - return ret < 0 ? -ENOEXEC : OK; - } - - return -ENODEV; -} -#else -# define nsh_usbhostinitialize() (OK) -#endif - -/**************************************************************************** - * Name: nsh_usbdevinitialize - * - * Description: - * Initialize SPI-based microSD. - * - ****************************************************************************/ - -#ifdef CONFIG_USBDEV -static int nsh_usbdevinitialize(void) -{ - /* The PIC32 Starter Kit has no way to know when the USB is connected. So - * we will fake it and tell the USB driver that the USB is connected now. - */ - - pic32mx_usbattach(); - return OK; -} -#else -# define nsh_usbdevinitialize() (OK) -#endif - -/**************************************************************************** - * 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 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) -{ - int ret; - - /* Initialize SPI-based microSD */ - - ret = nsh_sdinitialize(); - if (ret == OK) - { - /* Initialize USB host */ - - ret = nsh_usbhostinitialize(); - } - - if (ret == OK) - { - /* Initialize USB device */ - - ret = nsh_usbdevinitialize(); - } - - return ret; -} diff --git a/boards/mips/pic32mx/pic32mx-starterkit/src/pic32mx_boot.c b/boards/mips/pic32mx/pic32mx-starterkit/src/pic32mx_boot.c index b3b9a9d95387e..05897f23f1a0d 100644 --- a/boards/mips/pic32mx/pic32mx-starterkit/src/pic32mx_boot.c +++ b/boards/mips/pic32mx/pic32mx-starterkit/src/pic32mx_boot.c @@ -28,7 +28,18 @@ #include +#include +#include +#include +#include +#include + #include +#include +#include +#include +#include +#include #include "mips_internal.h" #include "pic32mx.h" @@ -38,10 +49,297 @@ * Pre-processor Definitions ****************************************************************************/ +/* Configuration ************************************************************/ + +/* Assume that we have MMC/SD, USB host (and USB device) */ + +#define NSH_HAVEMMCSD 1 +#define NSH_HAVEUSBHOST 1 + +/* The PIC32 Ethernet Starter Kit does not have an SD slot on board. If one + * is added, then it must be specified by defining which SPI bus that it + * is connected on. + */ + +#ifndef CONFIG_PIC32MX_MMCSDSPIPORTNO +# undef NSH_HAVEMMCSD +#endif + +/* Make sure that the configuration will support the SD card */ + +#ifdef NSH_HAVEMMCSD + +/* Make sure that the NSH configuration uses the correct SPI */ + +# if !defined(CONFIG_NSH_MMCSDSPIPORTNO) +# define CONFIG_NSH_MMCSDSPIPORTNO CONFIG_PIC32MX_MMCSDSPIPORTNO +# elif CONFIG_NSH_MMCSDSPIPORTNO != CONFIG_PIC32MX_MMCSDSPIPORTNO +# warning "CONFIG_PIC32MX_MMCSDSPIPORTNO does not match CONFIG_NSH_MMCSDSPIPORTNO" +# undef CONFIG_NSH_MMCSDSPIPORTNO +# define CONFIG_NSH_MMCSDSPIPORTNO CONFIG_PIC32MX_MMCSDSPIPORTNO +# endif + +/* Make sure that the NSH configuration uses the slot */ + +# if !defined(CONFIG_NSH_MMCSDSLOTNO) +# define CONFIG_NSH_MMCSDSLOTNO 0 +# elif CONFIG_NSH_MMCSDSLOTNO != 0 +# warning "The PIC32 Starter Kit has only one slot (0)" +# undef CONFIG_NSH_MMCSDSLOTNO +# define CONFIG_NSH_MMCSDSLOTNO 0 +# endif + +/* Make sure that the correct SPI is enabled in the configuration */ + +# if CONFIG_PIC32MX_MMCSDSPIPORTNO == 1 && !defined(CONFIG_PIC32MX_SPI1) +# warning "CONFIG_PIC32MX_SPI1 is not enabled" +# undef NSH_HAVEMMCSD +# elif CONFIG_PIC32MX_MMCSDSPIPORTNO == 2 && !defined(CONFIG_PIC32MX_SPI2) +# warning "CONFIG_PIC32MX_SPI2 is not enabled" +# undef NSH_HAVEMMCSD +# elif CONFIG_PIC32MX_MMCSDSPIPORTNO == 3 && !defined(CONFIG_PIC32MX_SPI3) +# warning "CONFIG_PIC32MX_SPI3 is not enabled" +# undef NSH_HAVEMMCSD +# elif CONFIG_PIC32MX_MMCSDSPIPORTNO == 4 && !defined(CONFIG_PIC32MX_SPI4) +# warning "CONFIG_PIC32MX_SPI4 is not enabled" +# undef NSH_HAVEMMCSD +# endif +#endif + +/* Can't support MMC/SD features if mountpoints are disabled */ + +#if defined(CONFIG_DISABLE_MOUNTPOINT) +# undef NSH_HAVEMMCSD +#endif + +/* Select /dev/mmcsd0 if no other minor number is provided */ + +#ifndef CONFIG_NSH_MMCSDMINOR +# define CONFIG_NSH_MMCSDMINOR 0 +#endif + +/* USB Host */ + +#ifdef CONFIG_USBHOST +# ifndef CONFIG_PIC32MX_USBHOST +# error "CONFIG_PIC32MX_USBHOST is not selected" +# undef NSH_HAVEUSBHOST +# endif +#endif + +#ifdef CONFIG_PIC32MX_USBHOST +# ifndef CONFIG_USBHOST +# warning "CONFIG_USBHOST is not selected" +# undef NSH_HAVEUSBHOST +# endif +#endif + +#if !defined(CONFIG_USBHOST) || !defined(CONFIG_PIC32MX_USBHOST) +# undef NSH_HAVEUSBHOST +#endif + +#ifdef NSH_HAVEUSBHOST +# ifndef CONFIG_USBHOST_DEFPRIO +# define CONFIG_USBHOST_DEFPRIO 50 +# endif +# ifndef CONFIG_USBHOST_STACKSIZE +# ifdef CONFIG_USBHOST_HUB +# define CONFIG_USBHOST_STACKSIZE 1536 +# else +# define CONFIG_USBHOST_STACKSIZE 1024 +# endif +# endif +#endif + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +#ifdef NSH_HAVEUSBHOST +static struct usbhost_connection_s *g_usbconn; +#endif + /**************************************************************************** * Private Functions ****************************************************************************/ +/**************************************************************************** + * Name: nsh_waiter + * + * Description: + * Wait for USB devices to be connected. + * + ****************************************************************************/ + +#ifdef NSH_HAVEUSBHOST +static int nsh_waiter(int argc, char *argv[]) +{ + struct usbhost_hubport_s *hport; + + syslog(LOG_INFO, "nsh_waiter: Running\n"); + for (; ; ) + { + /* Wait for the device to change state */ + + DEBUGVERIFY(CONN_WAIT(g_usbconn, &hport)); + syslog(LOG_INFO, "nsh_waiter: %s\n", + hport->connected ? "connected" : "disconnected"); + + /* Did we just become connected? */ + + if (hport->connected) + { + /* Yes.. enumerate the newly connected device */ + + CONN_ENUMERATE(g_usbconn, hport); + } + } + + /* Keep the compiler from complaining */ + + return 0; +} +#endif + +/**************************************************************************** + * Name: nsh_sdinitialize + * + * Description: + * Initialize SPI-based microSD. + * + ****************************************************************************/ + +#ifdef NSH_HAVEMMCSD +static int nsh_sdinitialize(void) +{ + struct spi_dev_s *spi; + int ret; + + /* Get the SPI port */ + + spi = pic32mx_spibus_initialize(CONFIG_NSH_MMCSDSPIPORTNO); + if (!spi) + { + syslog(LOG_ERR, "ERROR: Failed to initialize SPI port %d\n", + CONFIG_NSH_MMCSDSPIPORTNO); + ret = -ENODEV; + goto errout; + } + + syslog(LOG_INFO, "Successfully initialized SPI port %d\n", + CONFIG_NSH_MMCSDSPIPORTNO); + + /* Bind the SPI port to the slot */ + + ret = mmcsd_spislotinitialize(CONFIG_NSH_MMCSDMINOR, + CONFIG_NSH_MMCSDSLOTNO, spi); + if (ret < 0) + { + syslog(LOG_ERR, + "ERROR: Failed to bind SPI port %d to MMC/SD slot %d: %d\n", + CONFIG_NSH_MMCSDSPIPORTNO, + CONFIG_NSH_MMCSDSLOTNO, ret); + goto errout; + } + + syslog(LOG_INFO, "Successfully bound SPI port %d to MMC/SD slot %d\n", + CONFIG_NSH_MMCSDSPIPORTNO, + CONFIG_NSH_MMCSDSLOTNO); + return OK; + +errout: + return ret; +} +#else +# define nsh_sdinitialize() (OK) +#endif + +/**************************************************************************** + * Name: nsh_usbhostinitialize + * + * Description: + * Initialize SPI-based microSD. + * + ****************************************************************************/ + +#ifdef NSH_HAVEUSBHOST +static int nsh_usbhostinitialize(void) +{ + int ret; + + /* First, register all of the class drivers needed to support the drivers + * that we care about: + */ + + syslog(LOG_INFO, "Register class drivers\n"); + +#ifdef CONFIG_USBHOST_MSC + /* Register the USB host Mass Storage Class */ + + ret = usbhost_msc_initialize(); + if (ret != OK) + { + syslog(LOG_ERR, + "ERROR: Failed to register the mass storage class: %d\n", ret); + } +#endif + +#ifdef CONFIG_USBHOST_CDCACM + /* Register the CDC/ACM serial class */ + + ret = usbhost_cdcacm_initialize(); + if (ret != OK) + { + syslog(LOG_ERR, + "ERROR: Failed to register the CDC/ACM serial class: %d\n", + ret); + } +#endif + + /* Then get an instance of the USB host interface */ + + syslog(LOG_INFO, "Initialize USB host\n"); + g_usbconn = pic32_usbhost_initialize(0); + if (g_usbconn) + { + /* Start a thread to handle device connection. */ + + syslog(LOG_INFO, "Start nsh_waiter\n"); + + ret = kthread_create("usbhost", CONFIG_USBHOST_DEFPRIO, + CONFIG_USBHOST_STACKSIZE, + nsh_waiter, NULL); + return ret < 0 ? -ENOEXEC : OK; + } + + return -ENODEV; +} +#else +# define nsh_usbhostinitialize() (OK) +#endif + +/**************************************************************************** + * Name: nsh_usbdevinitialize + * + * Description: + * Initialize SPI-based microSD. + * + ****************************************************************************/ + +#ifdef CONFIG_USBDEV +static int nsh_usbdevinitialize(void) +{ + /* The PIC32 Starter Kit has no way to know when the USB is connected. So + * we will fake it and tell the USB driver that the USB is connected now. + */ + + pic32mx_usbattach(); + return OK; +} +#else +# define nsh_usbdevinitialize() (OK) +#endif + /**************************************************************************** * Public Functions ****************************************************************************/ @@ -78,3 +376,41 @@ void pic32mx_boardinitialize(void) pic32mx_led_initialize(); #endif } + +/**************************************************************************** + * 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ + int ret; + + /* Initialize SPI-based microSD */ + + ret = nsh_sdinitialize(); + if (ret == OK) + { + /* Initialize USB host */ + + ret = nsh_usbhostinitialize(); + } + + if (ret == OK) + { + /* Initialize USB device */ + + ret = nsh_usbdevinitialize(); + } +} +#endif diff --git a/boards/mips/pic32mx/pic32mx-starterkit/src/pic32mx_usbmsc.c b/boards/mips/pic32mx/pic32mx-starterkit/src/pic32mx_usbmsc.c index e1db7b086aed3..3496551850d40 100644 --- a/boards/mips/pic32mx/pic32mx-starterkit/src/pic32mx_usbmsc.c +++ b/boards/mips/pic32mx/pic32mx-starterkit/src/pic32mx_usbmsc.c @@ -45,9 +45,8 @@ int board_usbmsc_initialize(int port) { /* If system/usbmsc is built as an NSH command, then SD slot should - * already have been initialized in board_app_initialize() (see - * pic32mx_appinit.c). In this case, there is nothing further to be - * done here. + * already have been initialized. + * In this case, there is nothing further to be done here. */ #ifndef CONFIG_NSH_BUILTIN_APPS diff --git a/boards/mips/pic32mx/pic32mx7mmb/configs/nsh/defconfig b/boards/mips/pic32mx/pic32mx7mmb/configs/nsh/defconfig index ef73f352f25c6..27abe9d7a430b 100644 --- a/boards/mips/pic32mx/pic32mx7mmb/configs/nsh/defconfig +++ b/boards/mips/pic32mx/pic32mx7mmb/configs/nsh/defconfig @@ -49,7 +49,6 @@ CONFIG_NET_TCP=y CONFIG_NET_TCP_PREALLOC_CONNS=40 CONFIG_NET_UDP=y CONFIG_NET_UDP_CHECKSUMS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/mips/pic32mx/pic32mx7mmb/src/Makefile b/boards/mips/pic32mx/pic32mx7mmb/src/Makefile index d7d9a871b5f3f..18405dd038216 100644 --- a/boards/mips/pic32mx/pic32mx7mmb/src/Makefile +++ b/boards/mips/pic32mx/pic32mx7mmb/src/Makefile @@ -28,10 +28,6 @@ ifeq ($(CONFIG_PIC32MX_USBDEV),y) CSRCS += pic32_usbdev.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += pic32_appinit.c -endif - ifeq ($(CONFIG_USBMSC),y) CSRCS += pic32_usbmsc.c endif diff --git a/boards/mips/pic32mx/pic32mx7mmb/src/pic32_appinit.c b/boards/mips/pic32mx/pic32mx7mmb/src/pic32_appinit.c deleted file mode 100644 index 649a7b3448671..0000000000000 --- a/boards/mips/pic32mx/pic32mx7mmb/src/pic32_appinit.c +++ /dev/null @@ -1,85 +0,0 @@ -/**************************************************************************** - * boards/mips/pic32mx/pic32mx7mmb/src/pic32_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 - -#include -#include - -#include - -#include "pic32mx7mmb.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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. - * - * CONFIG_BOARDCTL=y : - * Called from the NSH library - * - * CONFIG_BOARD_LATE_INITIALIZE=y, CONFIG_NSH_LIBRARY=y, && - * CONFIG_BOARDCTL=n : - * Called from board_late_initialize(). - * - * 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) -{ - /* Did we already initialize via board_late_initialize()? */ - -#ifndef CONFIG_BOARD_LATE_INITIALIZE - return pic32mx_bringup(); -#else - return OK; -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/mips/pic32mx/pic32mx7mmb/src/pic32_usbmsc.c b/boards/mips/pic32mx/pic32mx7mmb/src/pic32_usbmsc.c index 1b7f98ca6e438..dac3593f62752 100644 --- a/boards/mips/pic32mx/pic32mx7mmb/src/pic32_usbmsc.c +++ b/boards/mips/pic32mx/pic32mx7mmb/src/pic32_usbmsc.c @@ -45,8 +45,7 @@ int board_usbmsc_initialize(int port) { /* If system/usbmsc is built as an NSH command, then SD slot should - * already have been initialized in board_app_initialize() - * (see pic32_appinit.c). + * already have been initialized. * In this case, there is nothing further to be done here. */ diff --git a/boards/mips/pic32mx/sure-pic32mx/configs/nsh/defconfig b/boards/mips/pic32mx/sure-pic32mx/configs/nsh/defconfig index 3c0f3b1a4ae1d..d20f7ea5fe790 100644 --- a/boards/mips/pic32mx/sure-pic32mx/configs/nsh/defconfig +++ b/boards/mips/pic32mx/sure-pic32mx/configs/nsh/defconfig @@ -24,7 +24,6 @@ CONFIG_IDLETHREAD_STACKSIZE=2048 CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/mips/pic32mx/sure-pic32mx/configs/usbnsh/defconfig b/boards/mips/pic32mx/sure-pic32mx/configs/usbnsh/defconfig index 602ab8f1140c1..361651bc902fc 100644 --- a/boards/mips/pic32mx/sure-pic32mx/configs/usbnsh/defconfig +++ b/boards/mips/pic32mx/sure-pic32mx/configs/usbnsh/defconfig @@ -30,7 +30,6 @@ CONFIG_IDLETHREAD_STACKSIZE=2048 CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/mips/pic32mx/sure-pic32mx/src/Makefile b/boards/mips/pic32mx/sure-pic32mx/src/Makefile index 460a369201f25..e131c3158a8f6 100644 --- a/boards/mips/pic32mx/sure-pic32mx/src/Makefile +++ b/boards/mips/pic32mx/sure-pic32mx/src/Makefile @@ -45,8 +45,4 @@ ifeq ($(CONFIG_LCD_LCD1602),y) CSRCS += pic32mx_lcd1602.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += pic32mx_appinit.c -endif - include $(TOPDIR)/boards/Board.mk diff --git a/boards/mips/pic32mx/sure-pic32mx/src/pic32mx_appinit.c b/boards/mips/pic32mx/sure-pic32mx/src/pic32mx_appinit.c deleted file mode 100644 index bbd186f886472..0000000000000 --- a/boards/mips/pic32mx/sure-pic32mx/src/pic32mx_appinit.c +++ /dev/null @@ -1,421 +0,0 @@ -/**************************************************************************** - * boards/mips/pic32mx/sure-pic32mx/src/pic32mx_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 - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#ifdef CONFIG_USBMONITOR -# include -#endif - -#include "pic32mx.h" -#include "sure-pic32mx.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Configuration ************************************************************/ - -/* PORT and SLOT number probably depend on the board configuration */ - -#define NSH_HAVE_MMCSD 1 -#define NSH_HAVE_USBHOST 1 -#define NSH_HAVE_USBMONITOR 1 - -/* Can't support MMC/SD if SPI2 is not enabled */ - -#ifndef CONFIG_PIC32MX_SPI2 -# undef NSH_HAVE_MMCSD -#endif - -/* Can't support MMC/SD features if mountpoints are disabled */ - -#if defined(CONFIG_DISABLE_MOUNTPOINT) -# undef NSH_HAVE_MMCSD -#endif - -/* MMC/SD configuration */ - -#ifdef NSH_HAVE_MMCSD -# ifdef CONFIG_NSH_ARCHINIT -# if !defined(CONFIG_NSH_MMCSDSPIPORTNO) || CONFIG_NSH_MMCSDSPIPORTNO != 2 -# warning "The Sure PIC32MX MMC/SD is on SPI2" -# undef CONFIG_NSH_MMCSDSPIPORTNO -# define CONFIG_NSH_MMCSDSPIPORTNO 2 -# endif -# if !defined(CONFIG_NSH_MMCSDSLOTNO) || CONFIG_NSH_MMCSDSLOTNO != 0 -# error "The Sure PIC32MX MMC/SD has only one slot (0)" -# warning CONFIG_NSH_MMCSDSLOTNO -# define CONFIG_NSH_MMCSDSLOTNO 0 -# endif -# ifndef CONFIG_NSH_MMCSDMINOR -# define CONFIG_NSH_MMCSDMINOR 0 -# endif -# else -# undef CONFIG_NSH_MMCSDSPIPORTNO -# define CONFIG_NSH_MMCSDSPIPORTNO 2 -# undef CONFIG_NSH_MMCSDSLOTNO -# define CONFIG_NSH_MMCSDSLOTNO 0 -# undef CONFIG_NSH_MMCSDMINOR -# define CONFIG_NSH_MMCSDMINOR 0 -# endif -#endif - -/* USB Host */ - -#ifdef CONFIG_USBHOST -# ifndef CONFIG_PIC32MX_USBHOST -# warning "CONFIG_PIC32MX_USBHOST is not selected" -# undef CONFIG_USBHOST -# endif -#endif - -#ifdef CONFIG_PIC32MX_USBHOST -# ifndef CONFIG_USBHOST -# warning "CONFIG_USBHOST is not selected" -# undef CONFIG_PIC32MX_USBHOST -# endif -#endif - -#if !defined(CONFIG_USBHOST) || !defined(CONFIG_PIC32MX_USBHOST) -# undef NSH_HAVE_USBHOST -#endif - -#ifdef NSH_HAVE_USBHOST -# ifndef CONFIG_USBHOST_DEFPRIO -# define CONFIG_USBHOST_DEFPRIO 50 -# endif -# ifndef CONFIG_USBHOST_STACKSIZE -# ifdef CONFIG_USBHOST_HUB -# define CONFIG_USBHOST_STACKSIZE 1536 -# else -# define CONFIG_USBHOST_STACKSIZE 1024 -# endif -# endif -#endif - -/* USB Monitor */ - -/* Check if we should enable the USB monitor before starting NSH */ - -#ifndef CONFIG_USBMONITOR -# undef NSH_HAVE_USBMONITOR -#endif - -#ifndef NSH_HAVE_USBDEV -# undef CONFIG_USBDEV_TRACE -#endif - -#ifndef NSH_HAVE_USBHOST -# undef CONFIG_USBHOST_TRACE -#endif - -#if !defined(CONFIG_USBDEV_TRACE) && !defined(CONFIG_USBHOST_TRACE) -# undef NSH_HAVE_USBMONITOR -#endif - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -#ifdef NSH_HAVE_USBHOST -static struct usbhost_connection_s *g_usbconn; -#endif - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: nsh_waiter - * - * Description: - * Wait for USB devices to be connected. - * - ****************************************************************************/ - -#ifdef NSH_HAVE_USBHOST -static int nsh_waiter(int argc, char *argv[]) -{ - struct usbhost_hubport_s *hport; - - syslog(LOG_INFO, "nsh_waiter: Running\n"); - for (; ; ) - { - /* Wait for the device to change state */ - - DEBUGVERIFY(CONN_WAIT(g_usbconn, &hport)); - syslog(LOG_INFO, "nsh_waiter: %s\n", - hport->connected ? "connected" : "disconnected"); - - /* Did we just become connected? */ - - if (hport->connected) - { - /* Yes.. enumerate the newly connected device */ - - CONN_ENUMERATE(g_usbconn, hport); - } - } - - /* Keep the compiler from complaining */ - - return 0; -} -#endif - -/**************************************************************************** - * Name: nsh_sdinitialize - * - * Description: - * Initialize SPI-based microSD. - * - ****************************************************************************/ - -#ifdef NSH_HAVE_MMCSD -static int nsh_sdinitialize(void) -{ - struct spi_dev_s *spi; - int ret; - - /* Get the SPI port */ - - spi = pic32mx_spibus_initialize(CONFIG_NSH_MMCSDSPIPORTNO); - if (!spi) - { - syslog(LOG_ERR, "ERROR: Failed to initialize SPI port %d\n", - CONFIG_NSH_MMCSDSPIPORTNO); - ret = -ENODEV; - goto errout; - } - - syslog(LOG_INFO, "Successfully initialized SPI port %d\n", - CONFIG_NSH_MMCSDSPIPORTNO); - - /* The SPI should be in 8-bit (default) and mode2: CKP=1, CKE=0. - * The MMC/SD driver will control the SPI frequency. WARNING: - * this is not the right way to do this... this should be done - * the MMC/SD driver: Other device on SPI1 may need other mode - * settings. - */ - - SPI_SETMODE(spi, SPIDEV_MODE2); - - /* Bind the SPI port to the slot */ - - ret = mmcsd_spislotinitialize(CONFIG_NSH_MMCSDMINOR, - CONFIG_NSH_MMCSDSLOTNO, spi); - if (ret < 0) - { - syslog(LOG_ERR, - "ERROR: Failed to bind SPI port %d to MMC/SD slot %d: %d\n", - CONFIG_NSH_MMCSDSPIPORTNO, - CONFIG_NSH_MMCSDSLOTNO, ret); - goto errout; - } - - syslog(LOG_INFO, "Successfully bound SPI port %d to MMC/SD slot %d\n", - CONFIG_NSH_MMCSDSPIPORTNO, - CONFIG_NSH_MMCSDSLOTNO); - return OK; - -errout: - return ret; -} -#else -# define nsh_sdinitialize() (OK) -#endif - -/**************************************************************************** - * Name: nsh_usbhostinitialize - * - * Description: - * Initialize USB Host - * - ****************************************************************************/ - -#ifdef NSH_HAVE_USBHOST -static int nsh_usbhostinitialize(void) -{ - int ret; - - /* First, register all of the class drivers needed to support the drivers - * that we care about: - */ - - syslog(LOG_INFO, "Register class drivers\n"); - -#ifdef CONFIG_USBHOST_MSC - /* Register the USB mass storage class class */ - - ret = usbhost_msc_initialize(); - if (ret != OK) - { - syslog(LOG_ERR, - "ERROR: Failed to register the mass storage class: %d\n", ret); - } -#endif - -#ifdef CONFIG_USBHOST_CDCACM - /* Register the CDC/ACM serial class */ - - ret = usbhost_cdcacm_initialize(); - if (ret != OK) - { - syslog(LOG_ERR, - "ERROR: Failed to register the CDC/ACM serial class: %d\n", - ret); - } -#endif - - /* Then get an instance of the USB host interface */ - - syslog(LOG_INFO, "Initialize USB host\n"); - - g_usbconn = pic32_usbhost_initialize(0); - if (g_usbconn) - { - /* Start a thread to handle device connection. */ - - syslog(LOG_INFO, "Start nsh_waiter\n"); - - ret = kthread_create("usbhost", CONFIG_USBHOST_DEFPRIO, - CONFIG_USBHOST_STACKSIZE, - nsh_waiter, NULL); - return ret < 0 ? -ENOEXEC : OK; - } - - return -ENODEV; -} -#else -# define nsh_usbhostinitialize() (OK) -#endif - -/**************************************************************************** - * Name: nsh_usbdevinitialize - * - * Description: - * Initialize SPI-based microSD. - * - ****************************************************************************/ - -#ifdef CONFIG_USBDEV -static int nsh_usbdevinitialize(void) -{ - /* The Sure board has no way to know when the USB is connected. So we - * will fake it and tell the USB driver that the USB is connected now. - */ - - pic32mx_usbattach(); - return OK; -} -#else -# define nsh_usbdevinitialize() (OK) -#endif - -/**************************************************************************** - * 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 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) -{ - int ret; - - /* Initialize the LCD1602 and register the device as /dev/lcd1602 */ - -#ifdef CONFIG_LCD_LCD1602 - ret = up_lcd1602_initialize(); - if (ret == OK) -#endif - { - /* Initialize SPI-based microSD */ - - ret = nsh_sdinitialize(); - } - - if (ret == OK) - { - /* Initialize USB host */ - - ret = nsh_usbhostinitialize(); - } - - if (ret == OK) - { - /* Initialize USB device */ - - ret = nsh_usbdevinitialize(); - } - -#ifdef NSH_HAVE_USBMONITOR - if (ret == OK) - { - /* Start the USB Monitor */ - - ret = usbmonitor_start(); - } -#endif - - return ret; -} diff --git a/boards/mips/pic32mx/sure-pic32mx/src/pic32mx_boot.c b/boards/mips/pic32mx/sure-pic32mx/src/pic32mx_boot.c index 44ca7b5460bcb..3af4c8f9d2a2e 100644 --- a/boards/mips/pic32mx/sure-pic32mx/src/pic32mx_boot.c +++ b/boards/mips/pic32mx/sure-pic32mx/src/pic32mx_boot.c @@ -28,7 +28,23 @@ #include +#include +#include +#include +#include +#include + #include +#include +#include +#include +#include +#include +#include + +#ifdef CONFIG_USBMONITOR +# include +#endif #include "mips_internal.h" #include "pic32mx.h" @@ -38,10 +54,289 @@ * Pre-processor Definitions ****************************************************************************/ +/* Configuration ************************************************************/ + +/* PORT and SLOT number probably depend on the board configuration */ + +#define NSH_HAVE_MMCSD 1 +#define NSH_HAVE_USBHOST 1 +#define NSH_HAVE_USBMONITOR 1 + +/* Can't support MMC/SD if SPI2 is not enabled */ + +#ifndef CONFIG_PIC32MX_SPI2 +# undef NSH_HAVE_MMCSD +#endif + +/* Can't support MMC/SD features if mountpoints are disabled */ + +#if defined(CONFIG_DISABLE_MOUNTPOINT) +# undef NSH_HAVE_MMCSD +#endif + +/* MMC/SD configuration */ + +#ifdef NSH_HAVE_MMCSD +# undef CONFIG_NSH_MMCSDSPIPORTNO +# define CONFIG_NSH_MMCSDSPIPORTNO 2 +# undef CONFIG_NSH_MMCSDSLOTNO +# define CONFIG_NSH_MMCSDSLOTNO 0 +# undef CONFIG_NSH_MMCSDMINOR +# define CONFIG_NSH_MMCSDMINOR 0 +#endif + +/* USB Host */ + +#ifdef CONFIG_USBHOST +# ifndef CONFIG_PIC32MX_USBHOST +# warning "CONFIG_PIC32MX_USBHOST is not selected" +# undef CONFIG_USBHOST +# endif +#endif + +#ifdef CONFIG_PIC32MX_USBHOST +# ifndef CONFIG_USBHOST +# warning "CONFIG_USBHOST is not selected" +# undef CONFIG_PIC32MX_USBHOST +# endif +#endif + +#if !defined(CONFIG_USBHOST) || !defined(CONFIG_PIC32MX_USBHOST) +# undef NSH_HAVE_USBHOST +#endif + +#ifdef NSH_HAVE_USBHOST +# ifndef CONFIG_USBHOST_DEFPRIO +# define CONFIG_USBHOST_DEFPRIO 50 +# endif +# ifndef CONFIG_USBHOST_STACKSIZE +# ifdef CONFIG_USBHOST_HUB +# define CONFIG_USBHOST_STACKSIZE 1536 +# else +# define CONFIG_USBHOST_STACKSIZE 1024 +# endif +# endif +#endif + +/* USB Monitor */ + +/* Check if we should enable the USB monitor before starting NSH */ + +#ifndef CONFIG_USBMONITOR +# undef NSH_HAVE_USBMONITOR +#endif + +#ifndef NSH_HAVE_USBDEV +# undef CONFIG_USBDEV_TRACE +#endif + +#ifndef NSH_HAVE_USBHOST +# undef CONFIG_USBHOST_TRACE +#endif + +#if !defined(CONFIG_USBDEV_TRACE) && !defined(CONFIG_USBHOST_TRACE) +# undef NSH_HAVE_USBMONITOR +#endif + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +#ifdef NSH_HAVE_USBHOST +static struct usbhost_connection_s *g_usbconn; +#endif + /**************************************************************************** * Private Functions ****************************************************************************/ +/**************************************************************************** + * Name: nsh_waiter + * + * Description: + * Wait for USB devices to be connected. + * + ****************************************************************************/ + +#ifdef NSH_HAVE_USBHOST +static int nsh_waiter(int argc, char *argv[]) +{ + struct usbhost_hubport_s *hport; + + syslog(LOG_INFO, "nsh_waiter: Running\n"); + for (; ; ) + { + /* Wait for the device to change state */ + + DEBUGVERIFY(CONN_WAIT(g_usbconn, &hport)); + syslog(LOG_INFO, "nsh_waiter: %s\n", + hport->connected ? "connected" : "disconnected"); + + /* Did we just become connected? */ + + if (hport->connected) + { + /* Yes.. enumerate the newly connected device */ + + CONN_ENUMERATE(g_usbconn, hport); + } + } + + /* Keep the compiler from complaining */ + + return 0; +} +#endif + +/**************************************************************************** + * Name: nsh_sdinitialize + * + * Description: + * Initialize SPI-based microSD. + * + ****************************************************************************/ + +#ifdef NSH_HAVE_MMCSD +static int nsh_sdinitialize(void) +{ + struct spi_dev_s *spi; + int ret; + + /* Get the SPI port */ + + spi = pic32mx_spibus_initialize(CONFIG_NSH_MMCSDSPIPORTNO); + if (!spi) + { + syslog(LOG_ERR, "ERROR: Failed to initialize SPI port %d\n", + CONFIG_NSH_MMCSDSPIPORTNO); + ret = -ENODEV; + goto errout; + } + + syslog(LOG_INFO, "Successfully initialized SPI port %d\n", + CONFIG_NSH_MMCSDSPIPORTNO); + + /* The SPI should be in 8-bit (default) and mode2: CKP=1, CKE=0. + * The MMC/SD driver will control the SPI frequency. WARNING: + * this is not the right way to do this... this should be done + * the MMC/SD driver: Other device on SPI1 may need other mode + * settings. + */ + + SPI_SETMODE(spi, SPIDEV_MODE2); + + /* Bind the SPI port to the slot */ + + ret = mmcsd_spislotinitialize(CONFIG_NSH_MMCSDMINOR, + CONFIG_NSH_MMCSDSLOTNO, spi); + if (ret < 0) + { + syslog(LOG_ERR, + "ERROR: Failed to bind SPI port %d to MMC/SD slot %d: %d\n", + CONFIG_NSH_MMCSDSPIPORTNO, + CONFIG_NSH_MMCSDSLOTNO, ret); + goto errout; + } + + syslog(LOG_INFO, "Successfully bound SPI port %d to MMC/SD slot %d\n", + CONFIG_NSH_MMCSDSPIPORTNO, + CONFIG_NSH_MMCSDSLOTNO); + return OK; + +errout: + return ret; +} +#else +# define nsh_sdinitialize() (OK) +#endif + +/**************************************************************************** + * Name: nsh_usbhostinitialize + * + * Description: + * Initialize USB Host + * + ****************************************************************************/ + +#ifdef NSH_HAVE_USBHOST +static int nsh_usbhostinitialize(void) +{ + int ret; + + /* First, register all of the class drivers needed to support the drivers + * that we care about: + */ + + syslog(LOG_INFO, "Register class drivers\n"); + +#ifdef CONFIG_USBHOST_MSC + /* Register the USB mass storage class class */ + + ret = usbhost_msc_initialize(); + if (ret != OK) + { + syslog(LOG_ERR, + "ERROR: Failed to register the mass storage class: %d\n", ret); + } +#endif + +#ifdef CONFIG_USBHOST_CDCACM + /* Register the CDC/ACM serial class */ + + ret = usbhost_cdcacm_initialize(); + if (ret != OK) + { + syslog(LOG_ERR, + "ERROR: Failed to register the CDC/ACM serial class: %d\n", + ret); + } +#endif + + /* Then get an instance of the USB host interface */ + + syslog(LOG_INFO, "Initialize USB host\n"); + + g_usbconn = pic32_usbhost_initialize(0); + if (g_usbconn) + { + /* Start a thread to handle device connection. */ + + syslog(LOG_INFO, "Start nsh_waiter\n"); + + ret = kthread_create("usbhost", CONFIG_USBHOST_DEFPRIO, + CONFIG_USBHOST_STACKSIZE, + nsh_waiter, NULL); + return ret < 0 ? -ENOEXEC : OK; + } + + return -ENODEV; +} +#else +# define nsh_usbhostinitialize() (OK) +#endif + +/**************************************************************************** + * Name: nsh_usbdevinitialize + * + * Description: + * Initialize SPI-based microSD. + * + ****************************************************************************/ + +#ifdef CONFIG_USBDEV +static int nsh_usbdevinitialize(void) +{ + /* The Sure board has no way to know when the USB is connected. So we + * will fake it and tell the USB driver that the USB is connected now. + */ + + pic32mx_usbattach(); + return OK; +} +#else +# define nsh_usbdevinitialize() (OK) +#endif + /**************************************************************************** * Public Functions ****************************************************************************/ @@ -86,3 +381,58 @@ void pic32mx_boardinitialize(void) pic32mx_led_initialize(); #endif } + +/**************************************************************************** + * 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ + int ret; + + /* Initialize the LCD1602 and register the device as /dev/lcd1602 */ + +#ifdef CONFIG_LCD_LCD1602 + ret = up_lcd1602_initialize(); + if (ret == OK) +#endif + { + /* Initialize SPI-based microSD */ + + ret = nsh_sdinitialize(); + } + + if (ret == OK) + { + /* Initialize USB host */ + + ret = nsh_usbhostinitialize(); + } + + if (ret == OK) + { + /* Initialize USB device */ + + ret = nsh_usbdevinitialize(); + } + +#ifdef NSH_HAVE_USBMONITOR + if (ret == OK) + { + /* Start the USB Monitor */ + + ret = usbmonitor_start(); + } +#endif +} +#endif /* CONFIG_BOARD_LATE_INITIALIZE */ diff --git a/boards/mips/pic32mx/ubw32/configs/nsh/defconfig b/boards/mips/pic32mx/ubw32/configs/nsh/defconfig index 0a9779547d27d..d87dc8c2a0196 100644 --- a/boards/mips/pic32mx/ubw32/configs/nsh/defconfig +++ b/boards/mips/pic32mx/ubw32/configs/nsh/defconfig @@ -30,7 +30,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MMCSD=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/mips/pic32mx/ubw32/src/Makefile b/boards/mips/pic32mx/ubw32/src/Makefile index e6ba5b6fdc944..f17022ae98572 100644 --- a/boards/mips/pic32mx/ubw32/src/Makefile +++ b/boards/mips/pic32mx/ubw32/src/Makefile @@ -28,10 +28,6 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += pic32_buttons.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += pic32_appinit.c -endif - ifeq ($(CONFIG_PIC32MX_USBDEV),y) CSRCS += pic32_usbdev.c endif diff --git a/boards/mips/pic32mx/ubw32/src/pic32_appinit.c b/boards/mips/pic32mx/ubw32/src/pic32_appinit.c deleted file mode 100644 index fbdbc546b3f66..0000000000000 --- a/boards/mips/pic32mx/ubw32/src/pic32_appinit.c +++ /dev/null @@ -1,108 +0,0 @@ -/**************************************************************************** - * boards/mips/pic32mx/ubw32/src/pic32_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 - -#include -#include - -#include - -#include "pic32mx.h" -#include "ubw32.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: nsh_usbdevinitialize - * - * Description: - * Initialize SPI-based microSD. - * - ****************************************************************************/ - -#ifdef CONFIG_USBDEV -static int nsh_usbdevinitialize(void) -{ - /* The UBW32 has no way to know when the USB is connected. So we will fake - * it and tell the USB driver that the USB is connected now. - */ - - pic32mx_usbattach(); - return OK; -} -#else -# define nsh_usbdevinitialize() (OK) -#endif - -/**************************************************************************** - * 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 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) -{ - int ret; - - /* Initialize USB device */ - - ret = nsh_usbdevinitialize(); - return ret; -} diff --git a/boards/mips/pic32mx/ubw32/src/pic32_boot.c b/boards/mips/pic32mx/ubw32/src/pic32_boot.c index 14939f7ad6ba9..8d0b41911fe2d 100644 --- a/boards/mips/pic32mx/ubw32/src/pic32_boot.c +++ b/boards/mips/pic32mx/ubw32/src/pic32_boot.c @@ -28,6 +28,9 @@ #include +#include +#include + #include #include "mips_internal.h" @@ -42,6 +45,28 @@ * Private Functions ****************************************************************************/ +/**************************************************************************** + * Name: nsh_usbdevinitialize + * + * Description: + * Initialize SPI-based microSD. + * + ****************************************************************************/ + +#ifdef CONFIG_USBDEV +static int nsh_usbdevinitialize(void) +{ + /* The UBW32 has no way to know when the USB is connected. So we will fake + * it and tell the USB driver that the USB is connected now. + */ + + pic32mx_usbattach(); + return OK; +} +#else +# define nsh_usbdevinitialize() +#endif + /**************************************************************************** * Public Functions ****************************************************************************/ @@ -76,3 +101,23 @@ void pic32mx_boardinitialize(void) pic32mx_led_initialize(); #endif } + +/**************************************************************************** + * 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ + nsh_usbdevinitialize(); +} +#endif /* CONFIG_BOARD_LATE_INITIALIZE */ diff --git a/boards/mips/pic32mz/chipkit-wifire/configs/nsh/defconfig b/boards/mips/pic32mz/chipkit-wifire/configs/nsh/defconfig index 30a1497b65077..b887868479b02 100644 --- a/boards/mips/pic32mz/chipkit-wifire/configs/nsh/defconfig +++ b/boards/mips/pic32mz/chipkit-wifire/configs/nsh/defconfig @@ -29,7 +29,6 @@ CONFIG_LINE_MAX=64 CONFIG_MIPS_MICROMIPS=y CONFIG_MMCSD=y CONFIG_MTD=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/mips/pic32mz/chipkit-wifire/src/Makefile b/boards/mips/pic32mz/chipkit-wifire/src/Makefile index 5d678cf013af7..60ba139223483 100644 --- a/boards/mips/pic32mz/chipkit-wifire/src/Makefile +++ b/boards/mips/pic32mz/chipkit-wifire/src/Makefile @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = pic32mz_boot.c pic32mz_bringup.c pic32mz_userleds.c pic32mz_spi.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += pic32mz_appinit.c -endif - ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += pic32mz_autoleds.c endif diff --git a/boards/mips/pic32mz/chipkit-wifire/src/pic32mz_appinit.c b/boards/mips/pic32mz/chipkit-wifire/src/pic32mz_appinit.c deleted file mode 100644 index ce33b0c0320c8..0000000000000 --- a/boards/mips/pic32mz/chipkit-wifire/src/pic32mz_appinit.c +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** - * boards/mips/pic32mz/chipkit-wifire/src/pic32mz_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 - -#include - -#include "chipkit-wifire.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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 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) -{ - /* If CONFIG_BOARD_LATE_INITIALIZE is selected then board initialization - * was already performed in board_late_initialize. - */ - -#ifndef CONFIG_BOARD_LATE_INITIALIZE - return pic32mz_bringup(); -#else - return OK; -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/mips/pic32mz/flipnclick-pic32mz/configs/nsh/defconfig b/boards/mips/pic32mz/flipnclick-pic32mz/configs/nsh/defconfig index b1a3cce173f8f..52843ea800665 100644 --- a/boards/mips/pic32mz/flipnclick-pic32mz/configs/nsh/defconfig +++ b/boards/mips/pic32mz/flipnclick-pic32mz/configs/nsh/defconfig @@ -30,7 +30,6 @@ CONFIG_MIPS32_TOOLCHAIN_PINGUINOW=y CONFIG_MIPS_MICROMIPS=y CONFIG_MMCSD=y CONFIG_MTD=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/mips/pic32mz/flipnclick-pic32mz/configs/nxlines/defconfig b/boards/mips/pic32mz/flipnclick-pic32mz/configs/nxlines/defconfig index 6c1f2a5f89175..c757b0e8a7c79 100644 --- a/boards/mips/pic32mz/flipnclick-pic32mz/configs/nxlines/defconfig +++ b/boards/mips/pic32mz/flipnclick-pic32mz/configs/nxlines/defconfig @@ -37,7 +37,6 @@ CONFIG_MIPS_MICROMIPS=y CONFIG_MMCSD=y CONFIG_MQ_MAXMSGSIZE=64 CONFIG_MTD=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/mips/pic32mz/flipnclick-pic32mz/src/Makefile b/boards/mips/pic32mz/flipnclick-pic32mz/src/Makefile index 39147722ac6b1..d10aeea185631 100644 --- a/boards/mips/pic32mz/flipnclick-pic32mz/src/Makefile +++ b/boards/mips/pic32mz/flipnclick-pic32mz/src/Makefile @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = pic32mz_boot.c pic32mz_bringup.c pic32mz_userleds.c pic32mz_spi.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += pic32mz_appinit.c -endif - ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += pic32mz_autoleds.c endif diff --git a/boards/mips/pic32mz/flipnclick-pic32mz/src/pic32mz_appinit.c b/boards/mips/pic32mz/flipnclick-pic32mz/src/pic32mz_appinit.c deleted file mode 100644 index 5d9d8c74d1038..0000000000000 --- a/boards/mips/pic32mz/flipnclick-pic32mz/src/pic32mz_appinit.c +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** - * boards/mips/pic32mz/flipnclick-pic32mz/src/pic32mz_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 - -#include - -#include "flipnclick-pic32mz.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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 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) -{ - /* If CONFIG_BOARD_LATE_INITIALIZE is selected then board initialization - * was already performed in board_late_initialize. - */ - -#ifndef CONFIG_BOARD_LATE_INITIALIZE - return pic32mz_bringup(); -#else - return OK; -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/mips/pic32mz/pic32mz-starterkit/configs/nsh/defconfig b/boards/mips/pic32mz/pic32mz-starterkit/configs/nsh/defconfig index 765d02f864aca..eb4c5bb175f60 100644 --- a/boards/mips/pic32mz/pic32mz-starterkit/configs/nsh/defconfig +++ b/boards/mips/pic32mz/pic32mz-starterkit/configs/nsh/defconfig @@ -31,7 +31,6 @@ CONFIG_MIPS32_TOOLCHAIN_PINGUINOW=y CONFIG_MIPS_MICROMIPS=y CONFIG_MMCSD=y CONFIG_MTD=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/mips/pic32mz/pic32mz-starterkit/src/Makefile b/boards/mips/pic32mz/pic32mz-starterkit/src/Makefile index 11ebe41977800..353ca0340bf35 100644 --- a/boards/mips/pic32mz/pic32mz-starterkit/src/Makefile +++ b/boards/mips/pic32mz/pic32mz-starterkit/src/Makefile @@ -34,8 +34,4 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += pic32mz_buttons.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += pic32mz_appinit.c -endif - include $(TOPDIR)/boards/Board.mk diff --git a/boards/mips/pic32mz/pic32mz-starterkit/src/pic32mz_appinit.c b/boards/mips/pic32mz/pic32mz-starterkit/src/pic32mz_appinit.c deleted file mode 100644 index 9c8456e66eccf..0000000000000 --- a/boards/mips/pic32mz/pic32mz-starterkit/src/pic32mz_appinit.c +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** - * boards/mips/pic32mz/pic32mz-starterkit/src/pic32mz_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 - -#include - -#include "pic32mz-starterkit.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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 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) -{ - /* If CONFIG_BOARD_LATE_INITIALIZE is selected then board initialization - * was already performed in board_late_initialize. - */ - -#ifndef CONFIG_BOARD_LATE_INITIALIZE - return pic32mz_bringup(); -#else - return OK; -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/or1k/mor1kx/or1k/configs/nsh/defconfig b/boards/or1k/mor1kx/or1k/configs/nsh/defconfig index 5e57265523fd1..f2c97b144734f 100644 --- a/boards/or1k/mor1kx/or1k/configs/nsh/defconfig +++ b/boards/or1k/mor1kx/or1k/configs/nsh/defconfig @@ -41,7 +41,6 @@ CONFIG_ARCH_BOARD_OR1K=y CONFIG_ARCH_CHIP="mor1kx" CONFIG_ARCH_CHIP_MOR1KX=y CONFIG_ARCH_OR1K=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=512 CONFIG_BOOT_RUNFROMSDRAM=y CONFIG_BUILTIN=y @@ -75,7 +74,6 @@ CONFIG_FS_PROCFS_REGISTER=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=1024 CONFIG_LINE_MAX=40 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=1024 CONFIG_NUNGET_CHARS=0 diff --git a/boards/or1k/mor1kx/or1k/src/Makefile b/boards/or1k/mor1kx/or1k/src/Makefile index f921b9fccb495..2129058630b0d 100644 --- a/boards/or1k/mor1kx/or1k/src/Makefile +++ b/boards/or1k/mor1kx/or1k/src/Makefile @@ -24,8 +24,4 @@ include $(TOPDIR)/Make.defs CSRCS = or1k_boot.c or1k_bringup.c or1k_autoled.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += or1k_appinit.c -endif - include $(TOPDIR)/boards/Board.mk diff --git a/boards/or1k/mor1kx/or1k/src/or1k_appinit.c b/boards/or1k/mor1kx/or1k/src/or1k_appinit.c deleted file mode 100644 index 460967cd323b0..0000000000000 --- a/boards/or1k/mor1kx/or1k/src/or1k_appinit.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/or1k/mor1kx/or1k/src/or1k_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 - -#include -#include - -#include "or1k.h" - -/**************************************************************************** - * 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 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 or1k_bringup(); -#endif -} diff --git a/boards/renesas/rx65n/rx65n-grrose/configs/netnsh/defconfig b/boards/renesas/rx65n/rx65n-grrose/configs/netnsh/defconfig index a10ca473166e7..c1970629cd468 100644 --- a/boards/renesas/rx65n/rx65n-grrose/configs/netnsh/defconfig +++ b/boards/renesas/rx65n/rx65n-grrose/configs/netnsh/defconfig @@ -42,7 +42,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/renesas/rx65n/rx65n-grrose/src/Makefile b/boards/renesas/rx65n/rx65n-grrose/src/Makefile index a20bfbd386bc0..75ef9f7b50920 100644 --- a/boards/renesas/rx65n/rx65n-grrose/src/Makefile +++ b/boards/renesas/rx65n/rx65n-grrose/src/Makefile @@ -22,6 +22,6 @@ include $(TOPDIR)/Make.defs -CSRCS = rx65n_appinit.c rx65n_bringup.c rx65n_sbram.c rx65n_gpio.c +CSRCS = rx65n_bringup.c rx65n_sbram.c rx65n_gpio.c include $(TOPDIR)/boards/Board.mk diff --git a/boards/renesas/rx65n/rx65n-grrose/src/rx65n_appinit.c b/boards/renesas/rx65n/rx65n-grrose/src/rx65n_appinit.c deleted file mode 100644 index 5fb04586b1091..0000000000000 --- a/boards/renesas/rx65n/rx65n-grrose/src/rx65n_appinit.c +++ /dev/null @@ -1,84 +0,0 @@ -/**************************************************************************** - * boards/renesas/rx65n/rx65n-grrose/src/rx65n_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 - -#include -#include - -#include -#include "rx65n_grrose.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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. - * - * CONFIG_BOARDCTL=y : - * Called from the NSH library - * - * CONFIG_BOARD_LATE_INITIALIZE=y, CONFIG_NSH_LIBRARY=y, && - * CONFIG_BOARDCTL=n : - * Called from board_late_initialize(). - * - * 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) -{ - /* Did we already initialize via board_late_initialize()? */ - -#ifndef CONFIG_BOARD_LATE_INITIALIZE - return rx65n_bringup(); -#else - return OK; -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/renesas/rx65n/rx65n-grrose/src/rx65n_bringup.c b/boards/renesas/rx65n/rx65n-grrose/src/rx65n_bringup.c index 62a78afeeb62d..abe41bd232558 100644 --- a/boards/renesas/rx65n/rx65n-grrose/src/rx65n_bringup.c +++ b/boards/renesas/rx65n/rx65n-grrose/src/rx65n_bringup.c @@ -537,3 +537,23 @@ void board_autoled_off(int led) #endif #endif + +/**************************************************************************** + * 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ + rx65n_bringup(); +} +#endif /* CONFIG_BOARD_LATE_INITIALIZE */ diff --git a/boards/renesas/rx65n/rx65n-rsk2mb/configs/netnsh/defconfig b/boards/renesas/rx65n/rx65n-rsk2mb/configs/netnsh/defconfig index 82205d04939f2..f938c42cb05d6 100644 --- a/boards/renesas/rx65n/rx65n-rsk2mb/configs/netnsh/defconfig +++ b/boards/renesas/rx65n/rx65n-rsk2mb/configs/netnsh/defconfig @@ -42,7 +42,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/renesas/rx65n/rx65n-rsk2mb/configs/nsh/defconfig b/boards/renesas/rx65n/rx65n-rsk2mb/configs/nsh/defconfig index 2467c82a4f4f7..6bee2f2fe9ae1 100644 --- a/boards/renesas/rx65n/rx65n-rsk2mb/configs/nsh/defconfig +++ b/boards/renesas/rx65n/rx65n-rsk2mb/configs/nsh/defconfig @@ -22,7 +22,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=1024 CONFIG_LINE_MAX=64 CONFIG_MOTOROLA_SREC=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/renesas/rx65n/rx65n-rsk2mb/src/Makefile b/boards/renesas/rx65n/rx65n-rsk2mb/src/Makefile index 11ab5c5517050..a83d920cfc334 100644 --- a/boards/renesas/rx65n/rx65n-rsk2mb/src/Makefile +++ b/boards/renesas/rx65n/rx65n-rsk2mb/src/Makefile @@ -22,6 +22,6 @@ include $(TOPDIR)/Make.defs -CSRCS = rx65n_appinit.c rx65n_bringup.c rx65n_sbram.c rx65n_gpio.c +CSRCS = rx65n_bringup.c rx65n_sbram.c rx65n_gpio.c include $(TOPDIR)/boards/Board.mk diff --git a/boards/renesas/rx65n/rx65n-rsk2mb/src/rx65n_appinit.c b/boards/renesas/rx65n/rx65n-rsk2mb/src/rx65n_appinit.c deleted file mode 100644 index 9f68f6e17460f..0000000000000 --- a/boards/renesas/rx65n/rx65n-rsk2mb/src/rx65n_appinit.c +++ /dev/null @@ -1,84 +0,0 @@ -/**************************************************************************** - * boards/renesas/rx65n/rx65n-rsk2mb/src/rx65n_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 - -#include -#include - -#include -#include "rx65n_rsk2mb.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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. - * - * CONFIG_BOARDCTL=y : - * Called from the NSH library - * - * CONFIG_BOARD_LATE_INITIALIZE=y, CONFIG_NSH_LIBRARY=y, && - * CONFIG_BOARDCTL=n : - * Called from board_late_initialize(). - * - * 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) -{ - /* Did we already initialize via board_late_initialize()? */ - -#ifndef CONFIG_BOARD_LATE_INITIALIZE - return rx65n_bringup(); -#else - return OK; -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/renesas/rx65n/rx65n-rsk2mb/src/rx65n_bringup.c b/boards/renesas/rx65n/rx65n-rsk2mb/src/rx65n_bringup.c index 87668ea351c01..7d863a792f568 100644 --- a/boards/renesas/rx65n/rx65n-rsk2mb/src/rx65n_bringup.c +++ b/boards/renesas/rx65n/rx65n-rsk2mb/src/rx65n_bringup.c @@ -544,3 +544,23 @@ void board_autoled_off(int led) #endif #endif + +/**************************************************************************** + * 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ + rx65n_bringup(); +} +#endif /* CONFIG_BOARD_LATE_INITIALIZE */ diff --git a/boards/risc-v/bl602/bl602evb/configs/dma/defconfig b/boards/risc-v/bl602/bl602evb/configs/dma/defconfig index 9eb61fc288a2b..b3dc660ff21a1 100644 --- a/boards/risc-v/bl602/bl602evb/configs/dma/defconfig +++ b/boards/risc-v/bl602/bl602evb/configs/dma/defconfig @@ -47,7 +47,6 @@ CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_LINE_MAX=64 CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=64 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/bl602/bl602evb/configs/elf/defconfig b/boards/risc-v/bl602/bl602evb/configs/elf/defconfig index 6e65a97d1037e..5df466f88edbc 100644 --- a/boards/risc-v/bl602/bl602evb/configs/elf/defconfig +++ b/boards/risc-v/bl602/bl602evb/configs/elf/defconfig @@ -31,6 +31,7 @@ CONFIG_ARCH_RISCV=y CONFIG_ARCH_STACKDUMP=y CONFIG_BL602_HAVE_UART0=y CONFIG_BL602_TIMER0=y +CONFIG_BOARDCTL=y CONFIG_BOARDCTL_ROMDISK=y CONFIG_BOARD_LOOPSPERMSEC=10000 CONFIG_BUILTIN=y @@ -64,7 +65,6 @@ CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_LIBM=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=64 CONFIG_NSH_FILE_APPS=y diff --git a/boards/risc-v/bl602/bl602evb/configs/fpu/defconfig b/boards/risc-v/bl602/bl602evb/configs/fpu/defconfig index aef984115daa9..847f609d3f0b0 100644 --- a/boards/risc-v/bl602/bl602evb/configs/fpu/defconfig +++ b/boards/risc-v/bl602/bl602evb/configs/fpu/defconfig @@ -49,7 +49,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=64 CONFIG_NSH_STRERROR=y diff --git a/boards/risc-v/bl602/bl602evb/configs/gpio/defconfig b/boards/risc-v/bl602/bl602evb/configs/gpio/defconfig index a9eb7a8821761..1570b10420487 100644 --- a/boards/risc-v/bl602/bl602evb/configs/gpio/defconfig +++ b/boards/risc-v/bl602/bl602evb/configs/gpio/defconfig @@ -51,7 +51,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=64 CONFIG_NSH_STRERROR=y diff --git a/boards/risc-v/bl602/bl602evb/configs/i2c/defconfig b/boards/risc-v/bl602/bl602evb/configs/i2c/defconfig index 28f36a4579f9e..45598857c6104 100644 --- a/boards/risc-v/bl602/bl602evb/configs/i2c/defconfig +++ b/boards/risc-v/bl602/bl602evb/configs/i2c/defconfig @@ -51,7 +51,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=64 CONFIG_NSH_STRERROR=y diff --git a/boards/risc-v/bl602/bl602evb/configs/nsh/defconfig b/boards/risc-v/bl602/bl602evb/configs/nsh/defconfig index c7c30d72ef46b..85496174f674b 100644 --- a/boards/risc-v/bl602/bl602evb/configs/nsh/defconfig +++ b/boards/risc-v/bl602/bl602evb/configs/nsh/defconfig @@ -49,7 +49,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=64 CONFIG_NSH_STRERROR=y diff --git a/boards/risc-v/bl602/bl602evb/configs/spi/defconfig b/boards/risc-v/bl602/bl602evb/configs/spi/defconfig index 6330432b7fce2..2d46134eb4894 100644 --- a/boards/risc-v/bl602/bl602evb/configs/spi/defconfig +++ b/boards/risc-v/bl602/bl602evb/configs/spi/defconfig @@ -50,7 +50,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=64 CONFIG_NSH_MAXARGUMENTS=16 diff --git a/boards/risc-v/bl602/bl602evb/configs/spiflash/defconfig b/boards/risc-v/bl602/bl602evb/configs/spiflash/defconfig index f567b4af69ea7..f8e14b2c1f1dc 100644 --- a/boards/risc-v/bl602/bl602evb/configs/spiflash/defconfig +++ b/boards/risc-v/bl602/bl602evb/configs/spiflash/defconfig @@ -52,7 +52,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=64 CONFIG_NSH_STRERROR=y diff --git a/boards/risc-v/bl602/bl602evb/configs/timer/defconfig b/boards/risc-v/bl602/bl602evb/configs/timer/defconfig index 34046affedf30..507ca1af8c2aa 100644 --- a/boards/risc-v/bl602/bl602evb/configs/timer/defconfig +++ b/boards/risc-v/bl602/bl602evb/configs/timer/defconfig @@ -53,7 +53,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=64 CONFIG_NSH_STRERROR=y diff --git a/boards/risc-v/bl602/bl602evb/configs/wifi/defconfig b/boards/risc-v/bl602/bl602evb/configs/wifi/defconfig index d95806717378d..093658e4bac2b 100644 --- a/boards/risc-v/bl602/bl602evb/configs/wifi/defconfig +++ b/boards/risc-v/bl602/bl602evb/configs/wifi/defconfig @@ -28,7 +28,6 @@ # CONFIG_NSH_DISABLE_DF is not set # CONFIG_NSH_DISABLE_DIRNAME is not set # CONFIG_NSH_DISABLE_LOSMART is not set -# CONFIG_NSH_DISABLE_REBOOT is not set # CONFIG_NSH_DISABLE_UNAME is not set CONFIG_ARCH="risc-v" CONFIG_ARCH_BOARD="bl602evb" @@ -40,7 +39,7 @@ CONFIG_ARCH_RISCV=y CONFIG_ARCH_STACKDUMP=y CONFIG_BL602_HAVE_UART0=y CONFIG_BL602_WIRELESS=y -CONFIG_BOARDCTL_RESET=y +CONFIG_BOARDCTL=y CONFIG_BOARD_LOOPSPERMSEC=10000 CONFIG_BUILTIN=y CONFIG_DEBUG_FEATURES=y @@ -98,7 +97,6 @@ CONFIG_NET_TCP=y CONFIG_NET_TCP_KEEPALIVE=y CONFIG_NET_TCP_NOTIFIER=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=64 CONFIG_NSH_STRERROR=y diff --git a/boards/risc-v/bl602/bl602evb/src/Makefile b/boards/risc-v/bl602/bl602evb/src/Makefile index e2b99e65ecac2..9dc90ecf46ec4 100644 --- a/boards/risc-v/bl602/bl602evb/src/Makefile +++ b/boards/risc-v/bl602/bl602evb/src/Makefile @@ -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 diff --git a/boards/risc-v/bl602/bl602evb/src/bl602_appinit.c b/boards/risc-v/bl602/bl602evb/src/bl602_boardctl.c similarity index 62% rename from boards/risc-v/bl602/bl602evb/src/bl602_appinit.c rename to boards/risc-v/bl602/bl602evb/src/bl602_boardctl.c index 6bb65101a38ff..bee28b3671494 100644 --- a/boards/risc-v/bl602/bl602evb/src/bl602_appinit.c +++ b/boards/risc-v/bl602/bl602evb/src/bl602_boardctl.c @@ -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) { diff --git a/boards/risc-v/bl602/bl602evb/src/bl602_boot.c b/boards/risc-v/bl602/bl602evb/src/bl602_boot.c index 3822268181edc..0b8299d83bf7a 100644 --- a/boards/risc-v/bl602/bl602evb/src/bl602_boot.c +++ b/boards/risc-v/bl602/bl602evb/src/bl602_boot.c @@ -31,6 +31,8 @@ #include #include +#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 diff --git a/boards/risc-v/bl808/ox64/configs/adc/defconfig b/boards/risc-v/bl808/ox64/configs/adc/defconfig index 8db57aaddc320..c2dfa5e166383 100644 --- a/boards/risc-v/bl808/ox64/configs/adc/defconfig +++ b/boards/risc-v/bl808/ox64/configs/adc/defconfig @@ -46,7 +46,6 @@ CONFIG_BL808_UART1=y CONFIG_BL808_UART2=y CONFIG_BL808_UART3=y CONFIG_BOARDCTL_ROMDISK=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=1120 CONFIG_BUILD_KERNEL=y CONFIG_DEBUG_ASSERTIONS=y @@ -77,7 +76,6 @@ CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_MM_PGALLOC=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/bl808/ox64/configs/nsh/defconfig b/boards/risc-v/bl808/ox64/configs/nsh/defconfig index c9d4179369a51..3786c983d5884 100644 --- a/boards/risc-v/bl808/ox64/configs/nsh/defconfig +++ b/boards/risc-v/bl808/ox64/configs/nsh/defconfig @@ -36,7 +36,6 @@ CONFIG_BL808_UART1=y CONFIG_BL808_UART2=y CONFIG_BL808_UART3=y CONFIG_BOARDCTL_ROMDISK=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=1120 CONFIG_BUILD_KERNEL=y CONFIG_DEBUG_ASSERTIONS=y @@ -63,7 +62,6 @@ CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_MM_PGALLOC=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/bl808/ox64/configs/spi/defconfig b/boards/risc-v/bl808/ox64/configs/spi/defconfig index beb7bf48e0652..9afb9bb36de44 100644 --- a/boards/risc-v/bl808/ox64/configs/spi/defconfig +++ b/boards/risc-v/bl808/ox64/configs/spi/defconfig @@ -37,7 +37,6 @@ CONFIG_BL808_UART1=y CONFIG_BL808_UART2=y CONFIG_BL808_UART3=y CONFIG_BOARDCTL_ROMDISK=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=1120 CONFIG_BUILD_KERNEL=y CONFIG_DEBUG_ASSERTIONS=y @@ -64,7 +63,6 @@ CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_MM_PGALLOC=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/bl808/ox64/configs/timer/defconfig b/boards/risc-v/bl808/ox64/configs/timer/defconfig index b3059f7f5b89e..f95d7f2596d75 100644 --- a/boards/risc-v/bl808/ox64/configs/timer/defconfig +++ b/boards/risc-v/bl808/ox64/configs/timer/defconfig @@ -38,7 +38,6 @@ CONFIG_BL808_UART2=y CONFIG_BL808_UART3=y CONFIG_BL808_WDT=y CONFIG_BOARDCTL_ROMDISK=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=1120 CONFIG_BUILD_KERNEL=y CONFIG_DEBUG_ASSERTIONS=y @@ -67,7 +66,6 @@ CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_MM_PGALLOC=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/bl808/ox64/src/Makefile b/boards/risc-v/bl808/ox64/src/Makefile index 4ab1d24e3a12b..e925055af1a9f 100644 --- a/boards/risc-v/bl808/ox64/src/Makefile +++ b/boards/risc-v/bl808/ox64/src/Makefile @@ -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 diff --git a/boards/risc-v/bl808/ox64/src/bl808_appinit.c b/boards/risc-v/bl808/ox64/src/bl808_boardinit.c similarity index 80% rename from boards/risc-v/bl808/ox64/src/bl808_appinit.c rename to boards/risc-v/bl808/ox64/src/bl808_boardinit.c index db444784d5748..b497ac1876e13 100644 --- a/boards/risc-v/bl808/ox64/src/bl808_appinit.c +++ b/boards/risc-v/bl808/ox64/src/bl808_boardinit.c @@ -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,48 +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 */ - -#ifdef CONFIG_NSH_ARCHINIT - - mount(NULL, "/proc", "procfs", 0, NULL); - -#endif - - return OK; -#endif -} - /**************************************************************************** * Name: board_late_initialize * @@ -171,6 +129,7 @@ int board_app_initialize(uintptr_t arg) * ****************************************************************************/ +#ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { /* Mount the RAM Disk */ @@ -221,12 +180,8 @@ void board_late_initialize(void) bl808_wdt_init(); #endif -#ifdef CONFIG_NSH_ARCHINIT - mount(NULL, "/proc", "procfs", 0, NULL); -#endif - #ifdef CONFIG_USERLED /* Register the LED driver */ @@ -237,3 +192,4 @@ void board_late_initialize(void) } #endif } +#endif /* CONFIG_BOARD_LATE_INITIALIZE */ diff --git a/boards/risc-v/c906/smartl-c906/configs/elf/defconfig b/boards/risc-v/c906/smartl-c906/configs/elf/defconfig index c728e83923e6e..ea9118ca5ab1f 100644 --- a/boards/risc-v/c906/smartl-c906/configs/elf/defconfig +++ b/boards/risc-v/c906/smartl-c906/configs/elf/defconfig @@ -36,7 +36,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_LIBM=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_DISABLE_MKDIR=y diff --git a/boards/risc-v/c906/smartl-c906/configs/fpu/defconfig b/boards/risc-v/c906/smartl-c906/configs/fpu/defconfig index 47aa49377412d..36d8ee3287804 100644 --- a/boards/risc-v/c906/smartl-c906/configs/fpu/defconfig +++ b/boards/risc-v/c906/smartl-c906/configs/fpu/defconfig @@ -30,7 +30,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_DISABLE_MKDIR=y diff --git a/boards/risc-v/c906/smartl-c906/configs/knsh/defconfig b/boards/risc-v/c906/smartl-c906/configs/knsh/defconfig index 26f002363ff9e..deb76a3bdb36e 100644 --- a/boards/risc-v/c906/smartl-c906/configs/knsh/defconfig +++ b/boards/risc-v/c906/smartl-c906/configs/knsh/defconfig @@ -32,7 +32,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_MM_KERNEL_HEAPSIZE=524288 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_DISABLE_MKDIR=y diff --git a/boards/risc-v/c906/smartl-c906/configs/module/defconfig b/boards/risc-v/c906/smartl-c906/configs/module/defconfig index 1870b988ad068..94f1a929e8807 100644 --- a/boards/risc-v/c906/smartl-c906/configs/module/defconfig +++ b/boards/risc-v/c906/smartl-c906/configs/module/defconfig @@ -36,7 +36,6 @@ CONFIG_LIBC_EXECFUNCS=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_MODULE=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_DISABLE_MKDIR=y diff --git a/boards/risc-v/c906/smartl-c906/configs/nsh/defconfig b/boards/risc-v/c906/smartl-c906/configs/nsh/defconfig index eb48db2c37c06..66f6b1b36a878 100644 --- a/boards/risc-v/c906/smartl-c906/configs/nsh/defconfig +++ b/boards/risc-v/c906/smartl-c906/configs/nsh/defconfig @@ -29,7 +29,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_DISABLE_MKDIR=y diff --git a/boards/risc-v/c906/smartl-c906/configs/sotest/defconfig b/boards/risc-v/c906/smartl-c906/configs/sotest/defconfig index 9709c33849907..800ff3aa6a749 100644 --- a/boards/risc-v/c906/smartl-c906/configs/sotest/defconfig +++ b/boards/risc-v/c906/smartl-c906/configs/sotest/defconfig @@ -37,7 +37,6 @@ CONFIG_LIBC_ELF_ALIGN_LOG2=3 CONFIG_LIBC_EXECFUNCS=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_DISABLE_MKDIR=y diff --git a/boards/risc-v/c906/smartl-c906/src/Makefile b/boards/risc-v/c906/smartl-c906/src/Makefile index e65aa99c6d5f6..e37ba5898a9ac 100644 --- a/boards/risc-v/c906/smartl-c906/src/Makefile +++ b/boards/risc-v/c906/smartl-c906/src/Makefile @@ -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 diff --git a/boards/risc-v/c906/smartl-c906/src/c906_appinit.c b/boards/risc-v/c906/smartl-c906/src/c906_appinit.c deleted file mode 100644 index 6d346b8d08008..0000000000000 --- a/boards/risc-v/c906/smartl-c906/src/c906_appinit.c +++ /dev/null @@ -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 - -#include -#include -#include -#include - -#include - -#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 -} diff --git a/boards/risc-v/c906/smartl-c906/src/c906_boot.c b/boards/risc-v/c906/smartl-c906/src/c906_boot.c index dabafd5fedc04..ccc3bbc92ea15 100644 --- a/boards/risc-v/c906/smartl-c906/src/c906_boot.c +++ b/boards/risc-v/c906/smartl-c906/src/c906_boot.c @@ -31,6 +31,8 @@ #include #include +#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 diff --git a/boards/risc-v/eic7700x/starpro64/configs/nsh/defconfig b/boards/risc-v/eic7700x/starpro64/configs/nsh/defconfig index 32e215ecf8468..6bbcba05f1f26 100644 --- a/boards/risc-v/eic7700x/starpro64/configs/nsh/defconfig +++ b/boards/risc-v/eic7700x/starpro64/configs/nsh/defconfig @@ -40,7 +40,6 @@ CONFIG_ARCH_USE_MMU=y CONFIG_ARCH_USE_MPU=y CONFIG_ARCH_USE_S_MODE=y CONFIG_BOARDCTL_ROMDISK=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=1120 CONFIG_BUILD_KERNEL=y CONFIG_DEBUG_ASSERTIONS=y @@ -67,7 +66,6 @@ CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_MM_PGALLOC=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/eic7700x/starpro64/src/Makefile b/boards/risc-v/eic7700x/starpro64/src/Makefile index 00863157ed797..4c1536de06fee 100644 --- a/boards/risc-v/eic7700x/starpro64/src/Makefile +++ b/boards/risc-v/eic7700x/starpro64/src/Makefile @@ -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 diff --git a/boards/risc-v/eic7700x/starpro64/src/eic7700x_appinit.c b/boards/risc-v/eic7700x/starpro64/src/eic7700x_boardinit.c similarity index 74% rename from boards/risc-v/eic7700x/starpro64/src/eic7700x_appinit.c rename to boards/risc-v/eic7700x/starpro64/src/eic7700x_boardinit.c index a7dfe1db2c678..a712fd760d638 100644 --- a/boards/risc-v/eic7700x/starpro64/src/eic7700x_appinit.c +++ b/boards/risc-v/eic7700x/starpro64/src/eic7700x_boardinit.c @@ -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,48 +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 */ - -#ifdef CONFIG_NSH_ARCHINIT - - mount(NULL, "/proc", "procfs", 0, NULL); - -#endif - - return OK; -#endif -} - /**************************************************************************** * Name: board_late_initialize * @@ -153,6 +111,7 @@ int board_app_initialize(uintptr_t arg) * ****************************************************************************/ +#ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { /* Mount the RAM Disk */ @@ -161,9 +120,6 @@ void board_late_initialize(void) /* Perform board-specific initialization */ -#ifdef CONFIG_NSH_ARCHINIT - mount(NULL, "/proc", "procfs", 0, NULL); - -#endif } +#endif /* CONFIG_BOARD_LATE_INITIALIZE */ diff --git a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit-rust-1/configs/brickmatch/defconfig b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit-rust-1/configs/brickmatch/defconfig index 49a9ef0a6ec90..de4e70631b4c2 100644 --- a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit-rust-1/configs/brickmatch/defconfig +++ b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit-rust-1/configs/brickmatch/defconfig @@ -52,7 +52,6 @@ CONFIG_LCD_NOGETRUN=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit-rust-1/configs/nsh/defconfig b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit-rust-1/configs/nsh/defconfig index 84d740df70419..b42d6e14bde36 100644 --- a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit-rust-1/configs/nsh/defconfig +++ b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit-rust-1/configs/nsh/defconfig @@ -27,7 +27,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit-rust-1/src/Make.defs b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit-rust-1/src/Make.defs index dff51a3de6bd0..9fa8cab3a733e 100644 --- a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit-rust-1/src/Make.defs +++ b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit-rust-1/src/Make.defs @@ -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) diff --git a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit-rust-1/src/esp32c3-legacy-devkit-rust-1.h b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit-rust-1/src/esp32c3-legacy-devkit-rust-1.h index b00782e677970..3a60764bd1d1e 100644 --- a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit-rust-1/src/esp32c3-legacy-devkit-rust-1.h +++ b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit-rust-1/src/esp32c3-legacy-devkit-rust-1.h @@ -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); diff --git a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit-rust-1/src/esp32c3_appinit.c b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit-rust-1/src/esp32c3_appinit.c deleted file mode 100644 index 43fcf7c696ad8..0000000000000 --- a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit-rust-1/src/esp32c3_appinit.c +++ /dev/null @@ -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 - -#include -#include - -#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 */ diff --git a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit-rust-1/src/esp32c3_boot.c b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit-rust-1/src/esp32c3_boot.c index b4731faea056d..a825d55cecd1f 100644 --- a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit-rust-1/src/esp32c3_boot.c +++ b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit-rust-1/src/esp32c3_boot.c @@ -28,6 +28,8 @@ #include #include +#include "esp32c3-legacy-devkit-rust-1.h" + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ diff --git a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/adc/defconfig b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/adc/defconfig index 3b67858d1a3b3..8be6c54b7ad9c 100644 --- a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/adc/defconfig +++ b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/adc/defconfig @@ -31,7 +31,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/autopm/defconfig b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/autopm/defconfig index 60744781265de..dbe112f07a074 100644 --- a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/autopm/defconfig +++ b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/autopm/defconfig @@ -44,7 +44,6 @@ CONFIG_NET_ETH_PKTSIZE=1514 CONFIG_NET_ICMP_SOCKET=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/ble/defconfig b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/ble/defconfig index ad0009833a466..7a3a627b631a1 100644 --- a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/ble/defconfig +++ b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/ble/defconfig @@ -35,7 +35,6 @@ CONFIG_NETDEV_LATEINIT=y CONFIG_NET_BLUETOOTH=y CONFIG_NET_SOCKOPTS=y CONFIG_NET_TCP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/bmp180/defconfig b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/bmp180/defconfig index d3d947e8ceae8..21e9c99f0a2d7 100644 --- a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/bmp180/defconfig +++ b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/bmp180/defconfig @@ -28,7 +28,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/crypto/defconfig b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/crypto/defconfig index c744fa84fad08..133ce4369bfd5 100644 --- a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/crypto/defconfig +++ b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/crypto/defconfig @@ -33,7 +33,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/cxx/defconfig b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/cxx/defconfig index decc50e403359..34b21eb0af81d 100644 --- a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/cxx/defconfig +++ b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/cxx/defconfig @@ -33,7 +33,6 @@ CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_LIBM=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/efuse/defconfig b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/efuse/defconfig index d8b4f70fb16a6..0949b161a2ac4 100644 --- a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/efuse/defconfig +++ b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/efuse/defconfig @@ -31,7 +31,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/elf/defconfig b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/elf/defconfig index ad0ae506dcdf4..3367cf979a937 100644 --- a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/elf/defconfig +++ b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/elf/defconfig @@ -35,7 +35,6 @@ CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_LIBM=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_FILE_APPS=y diff --git a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/gdbstub/defconfig b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/gdbstub/defconfig index 4e453422fa6b3..c32c5a927e9d2 100644 --- a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/gdbstub/defconfig +++ b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/gdbstub/defconfig @@ -54,7 +54,6 @@ CONFIG_NET_TCP_DELAYED_ACK=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_WRITE_BUFFERS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/gpio/defconfig b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/gpio/defconfig index 886422d6782a2..0d79646ee6883 100644 --- a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/gpio/defconfig +++ b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/gpio/defconfig @@ -29,7 +29,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/knsh/defconfig b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/knsh/defconfig index 06ff862271c8e..e7521330a43f3 100644 --- a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/knsh/defconfig +++ b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/knsh/defconfig @@ -33,7 +33,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/lvgl/defconfig b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/lvgl/defconfig index 7b2a11a24012b..d3baa883f01b7 100644 --- a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/lvgl/defconfig +++ b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/lvgl/defconfig @@ -44,7 +44,6 @@ CONFIG_LV_USE_NUTTX=y CONFIG_LV_USE_NUTTX_LCD=y CONFIG_MQ_MAXMSGSIZE=64 CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/mcuboot_slot_confirm/defconfig b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/mcuboot_slot_confirm/defconfig index 0ee290aa355ac..6470effb9b5d9 100644 --- a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/mcuboot_slot_confirm/defconfig +++ b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/mcuboot_slot_confirm/defconfig @@ -33,7 +33,6 @@ CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_MTD_SMART=y CONFIG_NAME_MAX=48 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_LOSMART=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/module/defconfig b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/module/defconfig index 027a8f6f4e358..b6b77b6cf5786 100644 --- a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/module/defconfig +++ b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/module/defconfig @@ -30,7 +30,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MODULE=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/nsh/defconfig b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/nsh/defconfig index d63c4a1e87c5d..3d2c3c012f38f 100644 --- a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/nsh/defconfig +++ b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/nsh/defconfig @@ -29,7 +29,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/nvcfgdata/defconfig b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/nvcfgdata/defconfig index 6f9c008d0f847..532f1d8ac1496 100644 --- a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/nvcfgdata/defconfig +++ b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/nvcfgdata/defconfig @@ -32,7 +32,6 @@ CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_MTD_CONFIG=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/oneshot/defconfig b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/oneshot/defconfig index 5d336900efd60..766f0baaec6fb 100644 --- a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/oneshot/defconfig +++ b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/oneshot/defconfig @@ -31,7 +31,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/ostest/defconfig b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/ostest/defconfig index 30ae9f033d32b..ddecc77b5f683 100644 --- a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/ostest/defconfig +++ b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/ostest/defconfig @@ -26,7 +26,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/pm/defconfig b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/pm/defconfig index f3cd6f472be82..e17671ef929eb 100644 --- a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/pm/defconfig +++ b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/pm/defconfig @@ -27,7 +27,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/pwm/defconfig b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/pwm/defconfig index 754fd7503bd05..5b97c82dda4e9 100644 --- a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/pwm/defconfig +++ b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/pwm/defconfig @@ -29,7 +29,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/random/defconfig b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/random/defconfig index e0e87049cf565..0e12229540df5 100644 --- a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/random/defconfig +++ b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/random/defconfig @@ -29,7 +29,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/romfs/defconfig b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/romfs/defconfig index 3cf5d5d6c67b8..edc5e2e0f3be7 100644 --- a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/romfs/defconfig +++ b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/romfs/defconfig @@ -31,7 +31,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/rtc/defconfig b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/rtc/defconfig index 5fc6e7cc33c88..1dee143176346 100644 --- a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/rtc/defconfig +++ b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/rtc/defconfig @@ -28,7 +28,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/sotest/defconfig b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/sotest/defconfig index c685dcc612d4e..b48a2a57321ca 100644 --- a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/sotest/defconfig +++ b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/sotest/defconfig @@ -32,7 +32,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_DLFCN=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/spiflash/defconfig b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/spiflash/defconfig index 35b084971b201..25d959cdae5ec 100644 --- a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/spiflash/defconfig +++ b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/spiflash/defconfig @@ -30,7 +30,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NAME_MAX=48 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_LOSMART=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/sta_softap/defconfig b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/sta_softap/defconfig index ea2e022854275..388f9403b4744 100644 --- a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/sta_softap/defconfig +++ b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/sta_softap/defconfig @@ -59,7 +59,6 @@ CONFIG_NET_ICMP_SOCKET=y CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/tickless/defconfig b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/tickless/defconfig index 90bd0595c8530..e22856df4ad2d 100644 --- a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/tickless/defconfig +++ b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/tickless/defconfig @@ -27,7 +27,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/timer/defconfig b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/timer/defconfig index c86e2a82c83fe..fc9110cf14a3d 100644 --- a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/timer/defconfig +++ b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/timer/defconfig @@ -29,7 +29,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/twai/defconfig b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/twai/defconfig index 09318c8f223dc..bd1c370f1cbfa 100644 --- a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/twai/defconfig +++ b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/twai/defconfig @@ -30,7 +30,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/uid/defconfig b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/uid/defconfig index 39f8ed629183a..81755149ab2a0 100644 --- a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/uid/defconfig +++ b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/uid/defconfig @@ -27,7 +27,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/usbconsole/defconfig b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/usbconsole/defconfig index 23cdfb37c72ed..3911db369fde5 100644 --- a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/usbconsole/defconfig +++ b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/usbconsole/defconfig @@ -30,7 +30,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/watchdog/defconfig b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/watchdog/defconfig index c6fbfd78ef9fd..c5f69bbd6d27d 100644 --- a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/watchdog/defconfig +++ b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/watchdog/defconfig @@ -29,7 +29,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/watcher/defconfig b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/watcher/defconfig index d668c1d9206a4..a2ae8c3256b6f 100644 --- a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/watcher/defconfig +++ b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/watcher/defconfig @@ -31,7 +31,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/wifi/defconfig b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/wifi/defconfig index 038342febf3e0..a9765e38f82a5 100644 --- a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/wifi/defconfig +++ b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/configs/wifi/defconfig @@ -50,7 +50,6 @@ CONFIG_NET_TCP_DELAYED_ACK=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_WRITE_BUFFERS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/src/Make.defs b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/src/Make.defs index 4040c7f93933f..92fd7f47de9f4 100644 --- a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/src/Make.defs +++ b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/src/Make.defs @@ -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) diff --git a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/src/esp32c3-legacy-devkit.h b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/src/esp32c3-legacy-devkit.h index bd8fe8da816d8..9a523b3c6cffd 100644 --- a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/src/esp32c3-legacy-devkit.h +++ b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/src/esp32c3-legacy-devkit.h @@ -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); diff --git a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/src/esp32c3_appinit.c b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/src/esp32c3_appinit.c deleted file mode 100644 index ba31950794f6d..0000000000000 --- a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/src/esp32c3_appinit.c +++ /dev/null @@ -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 - -#include -#include - -#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 */ diff --git a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/src/esp32c3_boot.c b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/src/esp32c3_boot.c index e61142bda2343..935ce6617c372 100644 --- a/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/src/esp32c3_boot.c +++ b/boards/risc-v/esp32c3-legacy/esp32c3-legacy-devkit/src/esp32c3_boot.c @@ -28,6 +28,8 @@ #include #include +#include "esp32c3-legacy-devkit.h" + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ diff --git a/boards/risc-v/esp32c3/esp32-c3-zero/configs/jumbo/defconfig b/boards/risc-v/esp32c3/esp32-c3-zero/configs/jumbo/defconfig index 5ac94ef4ce7a2..b618e82c4d90e 100644 --- a/boards/risc-v/esp32c3/esp32-c3-zero/configs/jumbo/defconfig +++ b/boards/risc-v/esp32c3/esp32-c3-zero/configs/jumbo/defconfig @@ -40,7 +40,6 @@ CONFIG_LIBC_FLOATINGPOINT=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3/esp32-c3-zero/configs/nsh/defconfig b/boards/risc-v/esp32c3/esp32-c3-zero/configs/nsh/defconfig index b4db58c81aa40..6009c08737efd 100644 --- a/boards/risc-v/esp32c3/esp32-c3-zero/configs/nsh/defconfig +++ b/boards/risc-v/esp32c3/esp32-c3-zero/configs/nsh/defconfig @@ -29,7 +29,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3/esp32-c3-zero/configs/sta_softap/defconfig b/boards/risc-v/esp32c3/esp32-c3-zero/configs/sta_softap/defconfig index 858faa6968161..301fa691bd16f 100644 --- a/boards/risc-v/esp32c3/esp32-c3-zero/configs/sta_softap/defconfig +++ b/boards/risc-v/esp32c3/esp32-c3-zero/configs/sta_softap/defconfig @@ -57,7 +57,6 @@ CONFIG_NET_TCP_DELAYED_ACK=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3/esp32-c3-zero/configs/usbnsh/defconfig b/boards/risc-v/esp32c3/esp32-c3-zero/configs/usbnsh/defconfig index 1dca055eab442..8c9dfd0014f3b 100644 --- a/boards/risc-v/esp32c3/esp32-c3-zero/configs/usbnsh/defconfig +++ b/boards/risc-v/esp32c3/esp32-c3-zero/configs/usbnsh/defconfig @@ -32,7 +32,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3/esp32-c3-zero/configs/wifi/defconfig b/boards/risc-v/esp32c3/esp32-c3-zero/configs/wifi/defconfig index 967e64b332d0b..00a520a594c17 100644 --- a/boards/risc-v/esp32c3/esp32-c3-zero/configs/wifi/defconfig +++ b/boards/risc-v/esp32c3/esp32-c3-zero/configs/wifi/defconfig @@ -53,7 +53,6 @@ CONFIG_NET_TCP_DELAYED_ACK=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3/esp32-c3-zero/src/CMakeLists.txt b/boards/risc-v/esp32c3/esp32-c3-zero/src/CMakeLists.txt index 315fae8352f75..ac53348f444ab 100644 --- a/boards/risc-v/esp32c3/esp32-c3-zero/src/CMakeLists.txt +++ b/boards/risc-v/esp32c3/esp32-c3-zero/src/CMakeLists.txt @@ -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() diff --git a/boards/risc-v/esp32c3/esp32-c3-zero/src/Make.defs b/boards/risc-v/esp32c3/esp32-c3-zero/src/Make.defs index de99c8deadb6c..ed4fa5a58d0c1 100644 --- a/boards/risc-v/esp32c3/esp32-c3-zero/src/Make.defs +++ b/boards/risc-v/esp32c3/esp32-c3-zero/src/Make.defs @@ -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) diff --git a/boards/risc-v/esp32c3/esp32-c3-zero/src/esp32-c3-zero.h b/boards/risc-v/esp32c3/esp32-c3-zero/src/esp32-c3-zero.h index 506b3d094a1e8..2c421a4e83f0f 100644 --- a/boards/risc-v/esp32c3/esp32-c3-zero/src/esp32-c3-zero.h +++ b/boards/risc-v/esp32c3/esp32-c3-zero/src/esp32-c3-zero.h @@ -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. * diff --git a/boards/risc-v/esp32c3/esp32-c3-zero/src/esp32c3_appinit.c b/boards/risc-v/esp32c3/esp32-c3-zero/src/esp32c3_appinit.c deleted file mode 100644 index ab3478a7f60ae..0000000000000 --- a/boards/risc-v/esp32c3/esp32-c3-zero/src/esp32c3_appinit.c +++ /dev/null @@ -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 - -#include - -#include - -#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 */ diff --git a/boards/risc-v/esp32c3/esp32-c3-zero/src/esp32c3_boot.c b/boards/risc-v/esp32c3/esp32-c3-zero/src/esp32c3_boot.c index 5e77d94eea29f..0bbd318bab409 100644 --- a/boards/risc-v/esp32c3/esp32-c3-zero/src/esp32c3_boot.c +++ b/boards/risc-v/esp32c3/esp32-c3-zero/src/esp32c3_boot.c @@ -26,6 +26,8 @@ #include +#include "esp32-c3-zero.h" + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ diff --git a/boards/risc-v/esp32c3/esp32-c3-zero/src/esp32c3_bringup.c b/boards/risc-v/esp32c3/esp32-c3-zero/src/esp32c3_bringup.c index 373fffa97a310..644034ea26595 100644 --- a/boards/risc-v/esp32c3/esp32-c3-zero/src/esp32c3_bringup.c +++ b/boards/risc-v/esp32c3/esp32-c3-zero/src/esp32c3_bringup.c @@ -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. * diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/configs/adc/defconfig b/boards/risc-v/esp32c3/esp32c3-devkit/configs/adc/defconfig index 7c3ab0e3cc9eb..f5014f9290933 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/configs/adc/defconfig +++ b/boards/risc-v/esp32c3/esp32c3-devkit/configs/adc/defconfig @@ -32,7 +32,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/configs/ble/defconfig b/boards/risc-v/esp32c3/esp32c3-devkit/configs/ble/defconfig index 3d7ca120dc460..b10170eaa4f52 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/configs/ble/defconfig +++ b/boards/risc-v/esp32c3/esp32c3-devkit/configs/ble/defconfig @@ -41,7 +41,6 @@ CONFIG_NET_BLUETOOTH=y CONFIG_NET_SOCKOPTS=y CONFIG_NET_TCP=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_DATE=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/configs/bmp180/defconfig b/boards/risc-v/esp32c3/esp32c3-devkit/configs/bmp180/defconfig index c89e31afd7b5c..be866f85005a4 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/configs/bmp180/defconfig +++ b/boards/risc-v/esp32c3/esp32c3-devkit/configs/bmp180/defconfig @@ -31,7 +31,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/configs/buttons/defconfig b/boards/risc-v/esp32c3/esp32c3-devkit/configs/buttons/defconfig index 557765561db34..39cea105d7adf 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/configs/buttons/defconfig +++ b/boards/risc-v/esp32c3/esp32c3-devkit/configs/buttons/defconfig @@ -36,7 +36,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/configs/crypto/defconfig b/boards/risc-v/esp32c3/esp32c3-devkit/configs/crypto/defconfig index cf12dd424696e..387e1f511dc39 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/configs/crypto/defconfig +++ b/boards/risc-v/esp32c3/esp32c3-devkit/configs/crypto/defconfig @@ -40,7 +40,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/configs/efuse/defconfig b/boards/risc-v/esp32c3/esp32c3-devkit/configs/efuse/defconfig index eb61fb586672a..e368193348948 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/configs/efuse/defconfig +++ b/boards/risc-v/esp32c3/esp32c3-devkit/configs/efuse/defconfig @@ -30,7 +30,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/configs/gpio/defconfig b/boards/risc-v/esp32c3/esp32c3-devkit/configs/gpio/defconfig index c6141a595cea6..3fd0de08b3fc0 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/configs/gpio/defconfig +++ b/boards/risc-v/esp32c3/esp32c3-devkit/configs/gpio/defconfig @@ -32,7 +32,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/configs/i2c/defconfig b/boards/risc-v/esp32c3/esp32c3-devkit/configs/i2c/defconfig index 1b6150cb05147..f2d632c59651f 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/configs/i2c/defconfig +++ b/boards/risc-v/esp32c3/esp32c3-devkit/configs/i2c/defconfig @@ -34,7 +34,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/configs/i2schar/defconfig b/boards/risc-v/esp32c3/esp32c3-devkit/configs/i2schar/defconfig index 0bc716f456fe0..e92b3aa1ea89a 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/configs/i2schar/defconfig +++ b/boards/risc-v/esp32c3/esp32c3-devkit/configs/i2schar/defconfig @@ -45,7 +45,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/configs/mcuboot_nsh/defconfig b/boards/risc-v/esp32c3/esp32c3-devkit/configs/mcuboot_nsh/defconfig index 8ba5d7f25534d..23ffad02f6690 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/configs/mcuboot_nsh/defconfig +++ b/boards/risc-v/esp32c3/esp32c3-devkit/configs/mcuboot_nsh/defconfig @@ -30,7 +30,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/configs/mcuboot_update_agent/defconfig b/boards/risc-v/esp32c3/esp32c3-devkit/configs/mcuboot_update_agent/defconfig index ae26871ccefb3..cd041e2aea350 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/configs/mcuboot_update_agent/defconfig +++ b/boards/risc-v/esp32c3/esp32c3-devkit/configs/mcuboot_update_agent/defconfig @@ -57,7 +57,6 @@ CONFIG_NET_TCP_DELAYED_ACK=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_MOTD=y diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/configs/nimble/defconfig b/boards/risc-v/esp32c3/esp32c3-devkit/configs/nimble/defconfig index adee132c2b0c0..d38d2cd41e01b 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/configs/nimble/defconfig +++ b/boards/risc-v/esp32c3/esp32c3-devkit/configs/nimble/defconfig @@ -45,7 +45,6 @@ CONFIG_NET_BLUETOOTH=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 CONFIG_NIMBLE=y CONFIG_NIMBLE_ROLE_PERIPHERAL=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_DATE=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/configs/nsh/defconfig b/boards/risc-v/esp32c3/esp32c3-devkit/configs/nsh/defconfig index c7c8600f0c1f4..8fddd1507b3bc 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/configs/nsh/defconfig +++ b/boards/risc-v/esp32c3/esp32c3-devkit/configs/nsh/defconfig @@ -29,7 +29,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/configs/ostest/defconfig b/boards/risc-v/esp32c3/esp32c3-devkit/configs/ostest/defconfig index b4d371d4ce024..de8664da0a939 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/configs/ostest/defconfig +++ b/boards/risc-v/esp32c3/esp32c3-devkit/configs/ostest/defconfig @@ -29,7 +29,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/configs/pm/defconfig b/boards/risc-v/esp32c3/esp32c3-devkit/configs/pm/defconfig index 7bfbe622d36b6..61cc149f6d4c0 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/configs/pm/defconfig +++ b/boards/risc-v/esp32c3/esp32c3-devkit/configs/pm/defconfig @@ -30,7 +30,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/configs/pwm/defconfig b/boards/risc-v/esp32c3/esp32c3-devkit/configs/pwm/defconfig index ab1f81f80a340..40deb3aacf923 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/configs/pwm/defconfig +++ b/boards/risc-v/esp32c3/esp32c3-devkit/configs/pwm/defconfig @@ -33,7 +33,6 @@ CONFIG_LIBC_FLOATINGPOINT=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/configs/random/defconfig b/boards/risc-v/esp32c3/esp32c3-devkit/configs/random/defconfig index 864b3d5eb7fe3..6bcc758a508e5 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/configs/random/defconfig +++ b/boards/risc-v/esp32c3/esp32c3-devkit/configs/random/defconfig @@ -30,7 +30,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/configs/rmt/defconfig b/boards/risc-v/esp32c3/esp32c3-devkit/configs/rmt/defconfig index cf384764b0a7a..a67e109f43b64 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/configs/rmt/defconfig +++ b/boards/risc-v/esp32c3/esp32c3-devkit/configs/rmt/defconfig @@ -33,7 +33,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/configs/romfs/defconfig b/boards/risc-v/esp32c3/esp32c3-devkit/configs/romfs/defconfig index e74e870f8c45f..cf74a13c2efe1 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/configs/romfs/defconfig +++ b/boards/risc-v/esp32c3/esp32c3-devkit/configs/romfs/defconfig @@ -31,7 +31,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/configs/rtc/defconfig b/boards/risc-v/esp32c3/esp32c3-devkit/configs/rtc/defconfig index 891f93d7f23ab..d7f21c8b4b6bf 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/configs/rtc/defconfig +++ b/boards/risc-v/esp32c3/esp32c3-devkit/configs/rtc/defconfig @@ -30,7 +30,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_DATE=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/configs/sdm/defconfig b/boards/risc-v/esp32c3/esp32c3-devkit/configs/sdm/defconfig index e47f31949e469..74e468f8fc298 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/configs/sdm/defconfig +++ b/boards/risc-v/esp32c3/esp32c3-devkit/configs/sdm/defconfig @@ -31,7 +31,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/configs/sdmmc_spi/defconfig b/boards/risc-v/esp32c3/esp32c3-devkit/configs/sdmmc_spi/defconfig index 26a9e4c728dd0..fbc689607d177 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/configs/sdmmc_spi/defconfig +++ b/boards/risc-v/esp32c3/esp32c3-devkit/configs/sdmmc_spi/defconfig @@ -39,7 +39,6 @@ CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_MMCSD=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_MMCSDSPIPORTNO=2 diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/configs/spi/defconfig b/boards/risc-v/esp32c3/esp32c3-devkit/configs/spi/defconfig index 56e133f0f2fd7..d1a077f4a052b 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/configs/spi/defconfig +++ b/boards/risc-v/esp32c3/esp32c3-devkit/configs/spi/defconfig @@ -30,7 +30,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/configs/spiflash/defconfig b/boards/risc-v/esp32c3/esp32c3-devkit/configs/spiflash/defconfig index 7407ba2b5e9c0..5e3a4fb611207 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/configs/spiflash/defconfig +++ b/boards/risc-v/esp32c3/esp32c3-devkit/configs/spiflash/defconfig @@ -34,7 +34,6 @@ CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NAME_MAX=48 CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_LOSMART=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/configs/sta_softap/defconfig b/boards/risc-v/esp32c3/esp32c3-devkit/configs/sta_softap/defconfig index 07e1f5bf3928a..27e63dd34e684 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/configs/sta_softap/defconfig +++ b/boards/risc-v/esp32c3/esp32c3-devkit/configs/sta_softap/defconfig @@ -57,7 +57,6 @@ CONFIG_NET_TCP_DELAYED_ACK=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/configs/temperature_sensor/defconfig b/boards/risc-v/esp32c3/esp32c3-devkit/configs/temperature_sensor/defconfig index 443ea1b8b25ea..9130c0b539f23 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/configs/temperature_sensor/defconfig +++ b/boards/risc-v/esp32c3/esp32c3-devkit/configs/temperature_sensor/defconfig @@ -31,7 +31,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/configs/tickless/defconfig b/boards/risc-v/esp32c3/esp32c3-devkit/configs/tickless/defconfig index 1a153aa05ae54..15742531b2d2f 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/configs/tickless/defconfig +++ b/boards/risc-v/esp32c3/esp32c3-devkit/configs/tickless/defconfig @@ -28,7 +28,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/configs/timers/defconfig b/boards/risc-v/esp32c3/esp32c3-devkit/configs/timers/defconfig index ec1a4463c52e5..9890de24a555b 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/configs/timers/defconfig +++ b/boards/risc-v/esp32c3/esp32c3-devkit/configs/timers/defconfig @@ -30,7 +30,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/configs/twai/defconfig b/boards/risc-v/esp32c3/esp32c3-devkit/configs/twai/defconfig index 2a325c4a3b689..08b9d60678a68 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/configs/twai/defconfig +++ b/boards/risc-v/esp32c3/esp32c3-devkit/configs/twai/defconfig @@ -31,7 +31,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/configs/usbconsole/defconfig b/boards/risc-v/esp32c3/esp32c3-devkit/configs/usbconsole/defconfig index c72b8696728e2..76e1b72fdb70b 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/configs/usbconsole/defconfig +++ b/boards/risc-v/esp32c3/esp32c3-devkit/configs/usbconsole/defconfig @@ -32,7 +32,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/configs/watchdog/defconfig b/boards/risc-v/esp32c3/esp32c3-devkit/configs/watchdog/defconfig index 0926f48b24d7b..085c48a80a98d 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/configs/watchdog/defconfig +++ b/boards/risc-v/esp32c3/esp32c3-devkit/configs/watchdog/defconfig @@ -31,7 +31,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/configs/wifi/defconfig b/boards/risc-v/esp32c3/esp32c3-devkit/configs/wifi/defconfig index 18305828a758d..77e6fbd81505a 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/configs/wifi/defconfig +++ b/boards/risc-v/esp32c3/esp32c3-devkit/configs/wifi/defconfig @@ -53,7 +53,6 @@ CONFIG_NET_TCP_DELAYED_ACK=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/src/CMakeLists.txt b/boards/risc-v/esp32c3/esp32c3-devkit/src/CMakeLists.txt index 9377e66016b1c..1ef7d0a5ce06b 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/src/CMakeLists.txt +++ b/boards/risc-v/esp32c3/esp32c3-devkit/src/CMakeLists.txt @@ -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() diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/src/Make.defs b/boards/risc-v/esp32c3/esp32c3-devkit/src/Make.defs index 1ca4c30c12a06..deedce149d21f 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/src/Make.defs +++ b/boards/risc-v/esp32c3/esp32c3-devkit/src/Make.defs @@ -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) diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3-devkit.h b/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3-devkit.h index 5f2bac614d355..20f6fc0bb69a8 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3-devkit.h +++ b/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3-devkit.h @@ -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. * diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_appinit.c b/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_appinit.c deleted file mode 100644 index 98e43f109794f..0000000000000 --- a/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_appinit.c +++ /dev/null @@ -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 - -#include - -#include - -#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 */ diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_boot.c b/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_boot.c index d56ec332a5891..74fb00073e1d8 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_boot.c +++ b/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_boot.c @@ -26,6 +26,8 @@ #include +#include "esp32c3-devkit.h" + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_bringup.c b/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_bringup.c index 65cb798ae342b..942d6a1def09e 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_bringup.c +++ b/boards/risc-v/esp32c3/esp32c3-devkit/src/esp32c3_bringup.c @@ -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. * diff --git a/boards/risc-v/esp32c3/esp32c3-xiao/configs/ble/defconfig b/boards/risc-v/esp32c3/esp32c3-xiao/configs/ble/defconfig index 1c280efd2580d..116fc3fcb6fcd 100644 --- a/boards/risc-v/esp32c3/esp32c3-xiao/configs/ble/defconfig +++ b/boards/risc-v/esp32c3/esp32c3-xiao/configs/ble/defconfig @@ -43,7 +43,6 @@ CONFIG_NET_BLUETOOTH=y CONFIG_NET_SOCKOPTS=y CONFIG_NET_TCP=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_DATE=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/risc-v/esp32c3/esp32c3-xiao/configs/gpio/defconfig b/boards/risc-v/esp32c3/esp32c3-xiao/configs/gpio/defconfig index 60fa72f251811..db48ce76596ce 100644 --- a/boards/risc-v/esp32c3/esp32c3-xiao/configs/gpio/defconfig +++ b/boards/risc-v/esp32c3/esp32c3-xiao/configs/gpio/defconfig @@ -34,7 +34,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3/esp32c3-xiao/configs/nsh/defconfig b/boards/risc-v/esp32c3/esp32c3-xiao/configs/nsh/defconfig index c346b93f0d96f..a7ef5f5684301 100644 --- a/boards/risc-v/esp32c3/esp32c3-xiao/configs/nsh/defconfig +++ b/boards/risc-v/esp32c3/esp32c3-xiao/configs/nsh/defconfig @@ -29,7 +29,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3/esp32c3-xiao/configs/usbnsh/defconfig b/boards/risc-v/esp32c3/esp32c3-xiao/configs/usbnsh/defconfig index ccbe39afe71b3..2c25b286dd671 100644 --- a/boards/risc-v/esp32c3/esp32c3-xiao/configs/usbnsh/defconfig +++ b/boards/risc-v/esp32c3/esp32c3-xiao/configs/usbnsh/defconfig @@ -32,7 +32,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3/esp32c3-xiao/configs/wifi/defconfig b/boards/risc-v/esp32c3/esp32c3-xiao/configs/wifi/defconfig index e56f487150d72..caeae42b24b9a 100644 --- a/boards/risc-v/esp32c3/esp32c3-xiao/configs/wifi/defconfig +++ b/boards/risc-v/esp32c3/esp32c3-xiao/configs/wifi/defconfig @@ -51,7 +51,6 @@ CONFIG_NET_TCP_DELAYED_ACK=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c3/esp32c3-xiao/src/CMakeLists.txt b/boards/risc-v/esp32c3/esp32c3-xiao/src/CMakeLists.txt index dc938b949b7f2..5ec07809461ef 100644 --- a/boards/risc-v/esp32c3/esp32c3-xiao/src/CMakeLists.txt +++ b/boards/risc-v/esp32c3/esp32c3-xiao/src/CMakeLists.txt @@ -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() diff --git a/boards/risc-v/esp32c3/esp32c3-xiao/src/Make.defs b/boards/risc-v/esp32c3/esp32c3-xiao/src/Make.defs index 37deb0146b21d..db924d72acc0d 100644 --- a/boards/risc-v/esp32c3/esp32c3-xiao/src/Make.defs +++ b/boards/risc-v/esp32c3/esp32c3-xiao/src/Make.defs @@ -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) diff --git a/boards/risc-v/esp32c3/esp32c3-xiao/src/esp32c3-xiao.h b/boards/risc-v/esp32c3/esp32c3-xiao/src/esp32c3-xiao.h index 6645f64432c7f..51bb33484d953 100644 --- a/boards/risc-v/esp32c3/esp32c3-xiao/src/esp32c3-xiao.h +++ b/boards/risc-v/esp32c3/esp32c3-xiao/src/esp32c3-xiao.h @@ -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. * diff --git a/boards/risc-v/esp32c3/esp32c3-xiao/src/esp32c3_appinit.c b/boards/risc-v/esp32c3/esp32c3-xiao/src/esp32c3_appinit.c deleted file mode 100644 index 6113c90337f62..0000000000000 --- a/boards/risc-v/esp32c3/esp32c3-xiao/src/esp32c3_appinit.c +++ /dev/null @@ -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 - -#include - -#include - -#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 */ diff --git a/boards/risc-v/esp32c3/esp32c3-xiao/src/esp32c3_boot.c b/boards/risc-v/esp32c3/esp32c3-xiao/src/esp32c3_boot.c index 947875d531e47..ed4a149c6ea00 100644 --- a/boards/risc-v/esp32c3/esp32c3-xiao/src/esp32c3_boot.c +++ b/boards/risc-v/esp32c3/esp32c3-xiao/src/esp32c3_boot.c @@ -26,6 +26,8 @@ #include +#include "esp32c3-xiao.h" + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ diff --git a/boards/risc-v/esp32c3/esp32c3-xiao/src/esp32c3_bringup.c b/boards/risc-v/esp32c3/esp32c3-xiao/src/esp32c3_bringup.c index 7fbfa7a43fa23..d14ffd1b430ac 100644 --- a/boards/risc-v/esp32c3/esp32c3-xiao/src/esp32c3_bringup.c +++ b/boards/risc-v/esp32c3/esp32c3-xiao/src/esp32c3_bringup.c @@ -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. * diff --git a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/adc/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/adc/defconfig index f208e17f20029..123eccb28699f 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/adc/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/adc/defconfig @@ -33,7 +33,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/bmp180/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/bmp180/defconfig index f01eab1af73a7..35f4bee65382a 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/bmp180/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/bmp180/defconfig @@ -32,7 +32,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/buttons/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/buttons/defconfig index 70b23701c9829..937b18a51eae8 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/buttons/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/buttons/defconfig @@ -37,7 +37,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/capture/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/capture/defconfig index 44f01c6b2b107..bd86bdb08e896 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/capture/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/capture/defconfig @@ -34,7 +34,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/crypto/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/crypto/defconfig index 997c4b73f6739..d239fc4fb7ed6 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/crypto/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/crypto/defconfig @@ -41,7 +41,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/efuse/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/efuse/defconfig index 88fcd0b6c4f98..f71d5677473a8 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/efuse/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/efuse/defconfig @@ -32,7 +32,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/gpio/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/gpio/defconfig index 7654ab841992a..a126edf928c0b 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/gpio/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/gpio/defconfig @@ -33,7 +33,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/i2c/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/i2c/defconfig index db456b42bd962..c6e2c3a640e45 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/i2c/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/i2c/defconfig @@ -34,7 +34,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/i2schar/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/i2schar/defconfig index bd5e63c04dd5e..f70d3749c5538 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/i2schar/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/i2schar/defconfig @@ -46,7 +46,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/mcuboot_nsh/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/mcuboot_nsh/defconfig index 3faf6fb3cba45..daba8ef115f9e 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/mcuboot_nsh/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/mcuboot_nsh/defconfig @@ -31,7 +31,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/mcuboot_update_agent/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/mcuboot_update_agent/defconfig index 0aefb04687783..257fd6fcae418 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/mcuboot_update_agent/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/mcuboot_update_agent/defconfig @@ -58,7 +58,6 @@ CONFIG_NET_TCP_DELAYED_ACK=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_MOTD=y diff --git a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/motor/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/motor/defconfig index 8a8494eaee63e..e86a761b59bab 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/motor/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/motor/defconfig @@ -34,7 +34,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/mpu60x0/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/mpu60x0/defconfig index 086f149ffdcdd..6f4f3001b2291 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/mpu60x0/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/mpu60x0/defconfig @@ -32,7 +32,6 @@ CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_MPU60X0_I2C=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/nsh/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/nsh/defconfig index a8fcec3ec5da5..a7f460601871d 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/nsh/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/nsh/defconfig @@ -30,7 +30,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/oa_tc6/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/oa_tc6/defconfig index c641965da9717..9fe6edc895970 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/oa_tc6/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/oa_tc6/defconfig @@ -54,7 +54,6 @@ CONFIG_NET_TCP_DELAYED_ACK=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/ostest/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/ostest/defconfig index 56f72ad169178..e64be80b57d05 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/ostest/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/ostest/defconfig @@ -30,7 +30,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/pm/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/pm/defconfig index b74bcb4ab7c8a..230ec54f655b3 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/pm/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/pm/defconfig @@ -31,7 +31,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_DATE=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/pwm/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/pwm/defconfig index 8027a8ce00a1b..77c5d3080701f 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/pwm/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/pwm/defconfig @@ -34,7 +34,6 @@ CONFIG_LIBC_FLOATINGPOINT=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/qencoder/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/qencoder/defconfig index d7e34c25f9f9a..d3db2014d9c02 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/qencoder/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/qencoder/defconfig @@ -39,7 +39,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/random/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/random/defconfig index 002193248feaa..cb1a199c633c4 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/random/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/random/defconfig @@ -31,7 +31,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/rmt/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/rmt/defconfig index eb6499d1d9037..47715a605b36f 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/rmt/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/rmt/defconfig @@ -33,7 +33,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/romfs/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/romfs/defconfig index f9c8d54ed7a87..677c6938ee72b 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/romfs/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/romfs/defconfig @@ -34,7 +34,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/rtc/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/rtc/defconfig index 51bc2059ee3b2..e2d2b3ae998e4 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/rtc/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/rtc/defconfig @@ -31,7 +31,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_DATE=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/sdm/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/sdm/defconfig index b429c3349256a..34c0a4b6e6efe 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/sdm/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/sdm/defconfig @@ -32,7 +32,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/sdmmc_spi/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/sdmmc_spi/defconfig index e5f89d53be9a1..8a21c2d90e3ec 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/sdmmc_spi/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/sdmmc_spi/defconfig @@ -39,7 +39,6 @@ CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_MMCSD=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_MMCSDSPIPORTNO=2 diff --git a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/spi/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/spi/defconfig index c38e615e3c16c..28c8d5ef0009e 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/spi/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/spi/defconfig @@ -32,7 +32,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/spiflash/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/spiflash/defconfig index 54fd480bd0612..de7f62e8f53bb 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/spiflash/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/spiflash/defconfig @@ -35,7 +35,6 @@ CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NAME_MAX=48 CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_LOSMART=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/spislv/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/spislv/defconfig index d9b6a90116cc0..8cd1d88c3969a 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/spislv/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/spislv/defconfig @@ -37,7 +37,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/sta_softap/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/sta_softap/defconfig index f55f6b7c60f61..d9c756fe1ce07 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/sta_softap/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/sta_softap/defconfig @@ -58,7 +58,6 @@ CONFIG_NET_TCP_DELAYED_ACK=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/temperature_sensor/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/temperature_sensor/defconfig index 9c4f84a2c0822..54149c0d9b65a 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/temperature_sensor/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/temperature_sensor/defconfig @@ -32,7 +32,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/tickless/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/tickless/defconfig index df497987b1262..3f5d5bb8af7b5 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/tickless/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/tickless/defconfig @@ -29,7 +29,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/timers/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/timers/defconfig index ce1f58c663fff..c07fff7a4d98a 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/timers/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/timers/defconfig @@ -31,7 +31,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/twai/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/twai/defconfig index 918f92de18fea..9e35f7d4d69e6 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/twai/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/twai/defconfig @@ -32,7 +32,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/ulp/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/ulp/defconfig index 436801ebf78e4..8336d9b88c311 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/ulp/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/ulp/defconfig @@ -34,7 +34,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/usbconsole/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/usbconsole/defconfig index 3935a4988e5a4..fd41db5c37103 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/usbconsole/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/usbconsole/defconfig @@ -33,7 +33,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/watchdog/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/watchdog/defconfig index d15dd67fa2290..bcc0f3c48300c 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/watchdog/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/watchdog/defconfig @@ -32,7 +32,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/wifi/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/wifi/defconfig index 3c01fdf93aae7..61e07cc0955a0 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitc/configs/wifi/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitc/configs/wifi/defconfig @@ -54,7 +54,6 @@ CONFIG_NET_TCP_KEEPALIVE=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_DATE=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/risc-v/esp32c6/esp32c6-devkitc/src/CMakeLists.txt b/boards/risc-v/esp32c6/esp32c6-devkitc/src/CMakeLists.txt index ca86890361924..6acaf7683dd48 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitc/src/CMakeLists.txt +++ b/boards/risc-v/esp32c6/esp32c6-devkitc/src/CMakeLists.txt @@ -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() diff --git a/boards/risc-v/esp32c6/esp32c6-devkitc/src/Make.defs b/boards/risc-v/esp32c6/esp32c6-devkitc/src/Make.defs index 1ff5925501244..7dc9abd1bc7e1 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitc/src/Make.defs +++ b/boards/risc-v/esp32c6/esp32c6-devkitc/src/Make.defs @@ -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) diff --git a/boards/risc-v/esp32c6/esp32c6-devkitc/src/esp32c6-devkitc.h b/boards/risc-v/esp32c6/esp32c6-devkitc/src/esp32c6-devkitc.h index e68bd78780ef7..c9a0af65e33ec 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitc/src/esp32c6-devkitc.h +++ b/boards/risc-v/esp32c6/esp32c6-devkitc/src/esp32c6-devkitc.h @@ -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. * diff --git a/boards/risc-v/esp32c6/esp32c6-devkitc/src/esp32c6_appinit.c b/boards/risc-v/esp32c6/esp32c6-devkitc/src/esp32c6_appinit.c deleted file mode 100644 index c6f607a6fad99..0000000000000 --- a/boards/risc-v/esp32c6/esp32c6-devkitc/src/esp32c6_appinit.c +++ /dev/null @@ -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 - -#include - -#include - -#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 */ diff --git a/boards/risc-v/esp32c6/esp32c6-devkitc/src/esp32c6_bringup.c b/boards/risc-v/esp32c6/esp32c6-devkitc/src/esp32c6_bringup.c index d0f08c72046bb..0b221584f2d18 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitc/src/esp32c6_bringup.c +++ b/boards/risc-v/esp32c6/esp32c6-devkitc/src/esp32c6_bringup.c @@ -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. * diff --git a/boards/risc-v/esp32c6/esp32c6-devkitm/configs/bmp180/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitm/configs/bmp180/defconfig index 00156706ae030..cadcc29d687f0 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitm/configs/bmp180/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitm/configs/bmp180/defconfig @@ -32,7 +32,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-devkitm/configs/buttons/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitm/configs/buttons/defconfig index 283d2e32a4a0c..d319b7f102e37 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitm/configs/buttons/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitm/configs/buttons/defconfig @@ -37,7 +37,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-devkitm/configs/efuse/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitm/configs/efuse/defconfig index 8ee8a2d039903..89e8edce10bab 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitm/configs/efuse/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitm/configs/efuse/defconfig @@ -31,7 +31,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-devkitm/configs/gpio/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitm/configs/gpio/defconfig index 4c5d934b9d423..f5112a579bb42 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitm/configs/gpio/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitm/configs/gpio/defconfig @@ -33,7 +33,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-devkitm/configs/i2c/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitm/configs/i2c/defconfig index 75fea9c2ed5fb..4be215e59d66a 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitm/configs/i2c/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitm/configs/i2c/defconfig @@ -34,7 +34,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-devkitm/configs/i2schar/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitm/configs/i2schar/defconfig index a12b0b0409cad..da0cd82629d6d 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitm/configs/i2schar/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitm/configs/i2schar/defconfig @@ -46,7 +46,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-devkitm/configs/mcuboot_nsh/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitm/configs/mcuboot_nsh/defconfig index 0a3814e8c29c9..878870ddbc5ea 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitm/configs/mcuboot_nsh/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitm/configs/mcuboot_nsh/defconfig @@ -31,7 +31,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-devkitm/configs/nsh/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitm/configs/nsh/defconfig index 52cba24952601..31f6ec35ecb90 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitm/configs/nsh/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitm/configs/nsh/defconfig @@ -30,7 +30,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-devkitm/configs/oa_tc6/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitm/configs/oa_tc6/defconfig index b26008a0d5d58..ba62555f6bf58 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitm/configs/oa_tc6/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitm/configs/oa_tc6/defconfig @@ -53,7 +53,6 @@ CONFIG_NET_TCP_DELAYED_ACK=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-devkitm/configs/ostest/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitm/configs/ostest/defconfig index 9afbd8341503a..d4cf186ca1035 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitm/configs/ostest/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitm/configs/ostest/defconfig @@ -30,7 +30,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-devkitm/configs/pwm/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitm/configs/pwm/defconfig index 20ecbbd187037..708f341eda7e7 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitm/configs/pwm/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitm/configs/pwm/defconfig @@ -34,7 +34,6 @@ CONFIG_LIBC_FLOATINGPOINT=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-devkitm/configs/random/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitm/configs/random/defconfig index e1373df8fed23..53ef3a89d5f37 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitm/configs/random/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitm/configs/random/defconfig @@ -31,7 +31,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-devkitm/configs/rmt/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitm/configs/rmt/defconfig index 5f22445caa68f..85bf56a57d0e2 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitm/configs/rmt/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitm/configs/rmt/defconfig @@ -33,7 +33,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-devkitm/configs/romfs/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitm/configs/romfs/defconfig index 9718095b7028c..1217bdded613c 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitm/configs/romfs/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitm/configs/romfs/defconfig @@ -33,7 +33,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-devkitm/configs/rtc/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitm/configs/rtc/defconfig index 5a84093a6768e..d468be0f4818d 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitm/configs/rtc/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitm/configs/rtc/defconfig @@ -31,7 +31,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_DATE=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/risc-v/esp32c6/esp32c6-devkitm/configs/sdmmc_spi/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitm/configs/sdmmc_spi/defconfig index 3f921ef3bd84c..1ae09844df8ea 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitm/configs/sdmmc_spi/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitm/configs/sdmmc_spi/defconfig @@ -39,7 +39,6 @@ CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_MMCSD=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_MMCSDSPIPORTNO=2 diff --git a/boards/risc-v/esp32c6/esp32c6-devkitm/configs/spi/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitm/configs/spi/defconfig index b7e584501c615..2c6d20c150184 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitm/configs/spi/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitm/configs/spi/defconfig @@ -32,7 +32,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-devkitm/configs/spiflash/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitm/configs/spiflash/defconfig index 96832c93a3232..3911d415e3e7d 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitm/configs/spiflash/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitm/configs/spiflash/defconfig @@ -35,7 +35,6 @@ CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NAME_MAX=48 CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_LOSMART=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/risc-v/esp32c6/esp32c6-devkitm/configs/spislv/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitm/configs/spislv/defconfig index 6637edf9a5b1e..ed15166e80c80 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitm/configs/spislv/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitm/configs/spislv/defconfig @@ -37,7 +37,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-devkitm/configs/sta_softap/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitm/configs/sta_softap/defconfig index 8263988bf03f8..836d6b8643354 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitm/configs/sta_softap/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitm/configs/sta_softap/defconfig @@ -57,7 +57,6 @@ CONFIG_NET_TCP_DELAYED_ACK=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-devkitm/configs/tickless/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitm/configs/tickless/defconfig index cc9ff5c05ef66..8e87a87c26a81 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitm/configs/tickless/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitm/configs/tickless/defconfig @@ -29,7 +29,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-devkitm/configs/timers/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitm/configs/timers/defconfig index 900e39c59bbb1..1c24d71376ddb 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitm/configs/timers/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitm/configs/timers/defconfig @@ -31,7 +31,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-devkitm/configs/twai/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitm/configs/twai/defconfig index 6788919394771..d11c39a646582 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitm/configs/twai/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitm/configs/twai/defconfig @@ -32,7 +32,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-devkitm/configs/usbconsole/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitm/configs/usbconsole/defconfig index 0d26a89d71d86..84d3e7e6b4681 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitm/configs/usbconsole/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitm/configs/usbconsole/defconfig @@ -33,7 +33,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-devkitm/configs/watchdog/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitm/configs/watchdog/defconfig index a56fb373222cd..3ea42fedeb569 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitm/configs/watchdog/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitm/configs/watchdog/defconfig @@ -32,7 +32,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-devkitm/configs/wifi/defconfig b/boards/risc-v/esp32c6/esp32c6-devkitm/configs/wifi/defconfig index 8263988bf03f8..836d6b8643354 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitm/configs/wifi/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-devkitm/configs/wifi/defconfig @@ -57,7 +57,6 @@ CONFIG_NET_TCP_DELAYED_ACK=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-devkitm/src/CMakeLists.txt b/boards/risc-v/esp32c6/esp32c6-devkitm/src/CMakeLists.txt index 5228c69d97de8..c18052469251f 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitm/src/CMakeLists.txt +++ b/boards/risc-v/esp32c6/esp32c6-devkitm/src/CMakeLists.txt @@ -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() diff --git a/boards/risc-v/esp32c6/esp32c6-devkitm/src/Make.defs b/boards/risc-v/esp32c6/esp32c6-devkitm/src/Make.defs index 82112d9c9a5d7..eaedb1ff108e9 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitm/src/Make.defs +++ b/boards/risc-v/esp32c6/esp32c6-devkitm/src/Make.defs @@ -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) diff --git a/boards/risc-v/esp32c6/esp32c6-devkitm/src/esp32c6-devkitm.h b/boards/risc-v/esp32c6/esp32c6-devkitm/src/esp32c6-devkitm.h index e960706d09551..f131e28180fb2 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitm/src/esp32c6-devkitm.h +++ b/boards/risc-v/esp32c6/esp32c6-devkitm/src/esp32c6-devkitm.h @@ -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. * diff --git a/boards/risc-v/esp32c6/esp32c6-devkitm/src/esp32c6_appinit.c b/boards/risc-v/esp32c6/esp32c6-devkitm/src/esp32c6_appinit.c deleted file mode 100644 index 94910f225227b..0000000000000 --- a/boards/risc-v/esp32c6/esp32c6-devkitm/src/esp32c6_appinit.c +++ /dev/null @@ -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 - -#include - -#include - -#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 */ diff --git a/boards/risc-v/esp32c6/esp32c6-devkitm/src/esp32c6_bringup.c b/boards/risc-v/esp32c6/esp32c6-devkitm/src/esp32c6_bringup.c index 9b18ce9a64f7d..7b20f598aba94 100644 --- a/boards/risc-v/esp32c6/esp32c6-devkitm/src/esp32c6_bringup.c +++ b/boards/risc-v/esp32c6/esp32c6-devkitm/src/esp32c6_bringup.c @@ -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. * diff --git a/boards/risc-v/esp32c6/esp32c6-xiao/configs/gpio/defconfig b/boards/risc-v/esp32c6/esp32c6-xiao/configs/gpio/defconfig index 7cea624354026..7d5c3f1a0d54c 100644 --- a/boards/risc-v/esp32c6/esp32c6-xiao/configs/gpio/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-xiao/configs/gpio/defconfig @@ -35,7 +35,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-xiao/configs/nsh/defconfig b/boards/risc-v/esp32c6/esp32c6-xiao/configs/nsh/defconfig index dcf421fa6696a..6d72f8f6b86fd 100644 --- a/boards/risc-v/esp32c6/esp32c6-xiao/configs/nsh/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-xiao/configs/nsh/defconfig @@ -30,7 +30,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-xiao/configs/usbnsh/defconfig b/boards/risc-v/esp32c6/esp32c6-xiao/configs/usbnsh/defconfig index 4ff67c3f9fb94..69fa708a5e9d9 100644 --- a/boards/risc-v/esp32c6/esp32c6-xiao/configs/usbnsh/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-xiao/configs/usbnsh/defconfig @@ -33,7 +33,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-xiao/configs/wifi/defconfig b/boards/risc-v/esp32c6/esp32c6-xiao/configs/wifi/defconfig index d7692a5ae1ad6..3fc155da83895 100644 --- a/boards/risc-v/esp32c6/esp32c6-xiao/configs/wifi/defconfig +++ b/boards/risc-v/esp32c6/esp32c6-xiao/configs/wifi/defconfig @@ -52,7 +52,6 @@ CONFIG_NET_TCP_DELAYED_ACK=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32c6/esp32c6-xiao/src/CMakeLists.txt b/boards/risc-v/esp32c6/esp32c6-xiao/src/CMakeLists.txt index 458dea794c7b4..7382fb3bbfe71 100644 --- a/boards/risc-v/esp32c6/esp32c6-xiao/src/CMakeLists.txt +++ b/boards/risc-v/esp32c6/esp32c6-xiao/src/CMakeLists.txt @@ -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() diff --git a/boards/risc-v/esp32c6/esp32c6-xiao/src/Make.defs b/boards/risc-v/esp32c6/esp32c6-xiao/src/Make.defs index 4a3bc371cb1e2..b65df426c6f57 100644 --- a/boards/risc-v/esp32c6/esp32c6-xiao/src/Make.defs +++ b/boards/risc-v/esp32c6/esp32c6-xiao/src/Make.defs @@ -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) diff --git a/boards/risc-v/esp32c6/esp32c6-xiao/src/esp32c6-xiao.h b/boards/risc-v/esp32c6/esp32c6-xiao/src/esp32c6-xiao.h index 365206addd2bb..deae1c430dd18 100644 --- a/boards/risc-v/esp32c6/esp32c6-xiao/src/esp32c6-xiao.h +++ b/boards/risc-v/esp32c6/esp32c6-xiao/src/esp32c6-xiao.h @@ -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. * diff --git a/boards/risc-v/esp32c6/esp32c6-xiao/src/esp32c6_appinit.c b/boards/risc-v/esp32c6/esp32c6-xiao/src/esp32c6_appinit.c deleted file mode 100644 index 32c6ff19c9812..0000000000000 --- a/boards/risc-v/esp32c6/esp32c6-xiao/src/esp32c6_appinit.c +++ /dev/null @@ -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 - -#include - -#include - -#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 */ diff --git a/boards/risc-v/esp32c6/esp32c6-xiao/src/esp32c6_bringup.c b/boards/risc-v/esp32c6/esp32c6-xiao/src/esp32c6_bringup.c index b6c5e5f214d5f..102e3f6804bb9 100644 --- a/boards/risc-v/esp32c6/esp32c6-xiao/src/esp32c6_bringup.c +++ b/boards/risc-v/esp32c6/esp32c6-xiao/src/esp32c6_bringup.c @@ -120,9 +120,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. * diff --git a/boards/risc-v/esp32h2/esp32h2-devkit/configs/adc/defconfig b/boards/risc-v/esp32h2/esp32h2-devkit/configs/adc/defconfig index 51558539f2a26..ee04f01bd5e7c 100644 --- a/boards/risc-v/esp32h2/esp32h2-devkit/configs/adc/defconfig +++ b/boards/risc-v/esp32h2/esp32h2-devkit/configs/adc/defconfig @@ -32,7 +32,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32h2/esp32h2-devkit/configs/bmp180/defconfig b/boards/risc-v/esp32h2/esp32h2-devkit/configs/bmp180/defconfig index 9c19c2a7476c0..f4ca0a6c14e05 100644 --- a/boards/risc-v/esp32h2/esp32h2-devkit/configs/bmp180/defconfig +++ b/boards/risc-v/esp32h2/esp32h2-devkit/configs/bmp180/defconfig @@ -31,7 +31,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32h2/esp32h2-devkit/configs/buttons/defconfig b/boards/risc-v/esp32h2/esp32h2-devkit/configs/buttons/defconfig index b89f24ddb3f4c..bf8310399ff7e 100644 --- a/boards/risc-v/esp32h2/esp32h2-devkit/configs/buttons/defconfig +++ b/boards/risc-v/esp32h2/esp32h2-devkit/configs/buttons/defconfig @@ -36,7 +36,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32h2/esp32h2-devkit/configs/capture/defconfig b/boards/risc-v/esp32h2/esp32h2-devkit/configs/capture/defconfig index adc0f8b2130f1..e881eb8af4729 100644 --- a/boards/risc-v/esp32h2/esp32h2-devkit/configs/capture/defconfig +++ b/boards/risc-v/esp32h2/esp32h2-devkit/configs/capture/defconfig @@ -33,7 +33,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32h2/esp32h2-devkit/configs/crypto/defconfig b/boards/risc-v/esp32h2/esp32h2-devkit/configs/crypto/defconfig index 0b41c4401f43d..3c47954827856 100644 --- a/boards/risc-v/esp32h2/esp32h2-devkit/configs/crypto/defconfig +++ b/boards/risc-v/esp32h2/esp32h2-devkit/configs/crypto/defconfig @@ -40,7 +40,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32h2/esp32h2-devkit/configs/efuse/defconfig b/boards/risc-v/esp32h2/esp32h2-devkit/configs/efuse/defconfig index 63160e8bbe95f..15ed68d248c6b 100644 --- a/boards/risc-v/esp32h2/esp32h2-devkit/configs/efuse/defconfig +++ b/boards/risc-v/esp32h2/esp32h2-devkit/configs/efuse/defconfig @@ -31,7 +31,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32h2/esp32h2-devkit/configs/gpio/defconfig b/boards/risc-v/esp32h2/esp32h2-devkit/configs/gpio/defconfig index b6fac3c95165b..f42c65634c49c 100644 --- a/boards/risc-v/esp32h2/esp32h2-devkit/configs/gpio/defconfig +++ b/boards/risc-v/esp32h2/esp32h2-devkit/configs/gpio/defconfig @@ -32,7 +32,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32h2/esp32h2-devkit/configs/i2c/defconfig b/boards/risc-v/esp32h2/esp32h2-devkit/configs/i2c/defconfig index b90c8a01c0987..9c85d937901c2 100644 --- a/boards/risc-v/esp32h2/esp32h2-devkit/configs/i2c/defconfig +++ b/boards/risc-v/esp32h2/esp32h2-devkit/configs/i2c/defconfig @@ -34,7 +34,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32h2/esp32h2-devkit/configs/i2schar/defconfig b/boards/risc-v/esp32h2/esp32h2-devkit/configs/i2schar/defconfig index 7dfe9eba8f2dc..5f5100a248163 100644 --- a/boards/risc-v/esp32h2/esp32h2-devkit/configs/i2schar/defconfig +++ b/boards/risc-v/esp32h2/esp32h2-devkit/configs/i2schar/defconfig @@ -45,7 +45,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32h2/esp32h2-devkit/configs/mcuboot_nsh/defconfig b/boards/risc-v/esp32h2/esp32h2-devkit/configs/mcuboot_nsh/defconfig index 74107f92fe592..52e39d5f357ee 100644 --- a/boards/risc-v/esp32h2/esp32h2-devkit/configs/mcuboot_nsh/defconfig +++ b/boards/risc-v/esp32h2/esp32h2-devkit/configs/mcuboot_nsh/defconfig @@ -30,7 +30,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32h2/esp32h2-devkit/configs/motor/defconfig b/boards/risc-v/esp32h2/esp32h2-devkit/configs/motor/defconfig index a8b6b0af7e326..eaf2f44009e6a 100644 --- a/boards/risc-v/esp32h2/esp32h2-devkit/configs/motor/defconfig +++ b/boards/risc-v/esp32h2/esp32h2-devkit/configs/motor/defconfig @@ -33,7 +33,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32h2/esp32h2-devkit/configs/nsh/defconfig b/boards/risc-v/esp32h2/esp32h2-devkit/configs/nsh/defconfig index d87e91f91adc5..47eb7b9ffa589 100644 --- a/boards/risc-v/esp32h2/esp32h2-devkit/configs/nsh/defconfig +++ b/boards/risc-v/esp32h2/esp32h2-devkit/configs/nsh/defconfig @@ -29,7 +29,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32h2/esp32h2-devkit/configs/ostest/defconfig b/boards/risc-v/esp32h2/esp32h2-devkit/configs/ostest/defconfig index 3e9750067180e..ff7bdbbe5c2c7 100644 --- a/boards/risc-v/esp32h2/esp32h2-devkit/configs/ostest/defconfig +++ b/boards/risc-v/esp32h2/esp32h2-devkit/configs/ostest/defconfig @@ -29,7 +29,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32h2/esp32h2-devkit/configs/pm/defconfig b/boards/risc-v/esp32h2/esp32h2-devkit/configs/pm/defconfig index 0adee44df66a8..4d25a29ad9847 100644 --- a/boards/risc-v/esp32h2/esp32h2-devkit/configs/pm/defconfig +++ b/boards/risc-v/esp32h2/esp32h2-devkit/configs/pm/defconfig @@ -30,7 +30,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32h2/esp32h2-devkit/configs/pwm/defconfig b/boards/risc-v/esp32h2/esp32h2-devkit/configs/pwm/defconfig index 98408b591e79b..ff1bf693e4df9 100644 --- a/boards/risc-v/esp32h2/esp32h2-devkit/configs/pwm/defconfig +++ b/boards/risc-v/esp32h2/esp32h2-devkit/configs/pwm/defconfig @@ -33,7 +33,6 @@ CONFIG_LIBC_FLOATINGPOINT=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32h2/esp32h2-devkit/configs/qencoder/defconfig b/boards/risc-v/esp32h2/esp32h2-devkit/configs/qencoder/defconfig index 012c34abf8e61..23a5e580b5dfe 100644 --- a/boards/risc-v/esp32h2/esp32h2-devkit/configs/qencoder/defconfig +++ b/boards/risc-v/esp32h2/esp32h2-devkit/configs/qencoder/defconfig @@ -38,7 +38,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32h2/esp32h2-devkit/configs/random/defconfig b/boards/risc-v/esp32h2/esp32h2-devkit/configs/random/defconfig index 705a8a4759e78..1af702501e12f 100644 --- a/boards/risc-v/esp32h2/esp32h2-devkit/configs/random/defconfig +++ b/boards/risc-v/esp32h2/esp32h2-devkit/configs/random/defconfig @@ -30,7 +30,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32h2/esp32h2-devkit/configs/rmt/defconfig b/boards/risc-v/esp32h2/esp32h2-devkit/configs/rmt/defconfig index 3d07dad2409b5..3ca251b6c2526 100644 --- a/boards/risc-v/esp32h2/esp32h2-devkit/configs/rmt/defconfig +++ b/boards/risc-v/esp32h2/esp32h2-devkit/configs/rmt/defconfig @@ -32,7 +32,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32h2/esp32h2-devkit/configs/romfs/defconfig b/boards/risc-v/esp32h2/esp32h2-devkit/configs/romfs/defconfig index f31c00dc97282..8647d67aa48a8 100644 --- a/boards/risc-v/esp32h2/esp32h2-devkit/configs/romfs/defconfig +++ b/boards/risc-v/esp32h2/esp32h2-devkit/configs/romfs/defconfig @@ -31,7 +31,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32h2/esp32h2-devkit/configs/rtc/defconfig b/boards/risc-v/esp32h2/esp32h2-devkit/configs/rtc/defconfig index c8ec0f436aa1a..cbe8cbc8475dc 100644 --- a/boards/risc-v/esp32h2/esp32h2-devkit/configs/rtc/defconfig +++ b/boards/risc-v/esp32h2/esp32h2-devkit/configs/rtc/defconfig @@ -30,7 +30,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_DATE=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/risc-v/esp32h2/esp32h2-devkit/configs/sdm/defconfig b/boards/risc-v/esp32h2/esp32h2-devkit/configs/sdm/defconfig index 6c69fad9b19f0..0df58ed696407 100644 --- a/boards/risc-v/esp32h2/esp32h2-devkit/configs/sdm/defconfig +++ b/boards/risc-v/esp32h2/esp32h2-devkit/configs/sdm/defconfig @@ -31,7 +31,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32h2/esp32h2-devkit/configs/sdmmc_spi/defconfig b/boards/risc-v/esp32h2/esp32h2-devkit/configs/sdmmc_spi/defconfig index bd5f463e64782..49955eb43c6dc 100644 --- a/boards/risc-v/esp32h2/esp32h2-devkit/configs/sdmmc_spi/defconfig +++ b/boards/risc-v/esp32h2/esp32h2-devkit/configs/sdmmc_spi/defconfig @@ -37,7 +37,6 @@ CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_MMCSD=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_MMCSDSPIPORTNO=2 diff --git a/boards/risc-v/esp32h2/esp32h2-devkit/configs/spi/defconfig b/boards/risc-v/esp32h2/esp32h2-devkit/configs/spi/defconfig index 978f517c788a7..e819ed4762381 100644 --- a/boards/risc-v/esp32h2/esp32h2-devkit/configs/spi/defconfig +++ b/boards/risc-v/esp32h2/esp32h2-devkit/configs/spi/defconfig @@ -30,7 +30,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32h2/esp32h2-devkit/configs/spiflash/defconfig b/boards/risc-v/esp32h2/esp32h2-devkit/configs/spiflash/defconfig index d79127c2475c2..f6e89b0fe2130 100644 --- a/boards/risc-v/esp32h2/esp32h2-devkit/configs/spiflash/defconfig +++ b/boards/risc-v/esp32h2/esp32h2-devkit/configs/spiflash/defconfig @@ -34,7 +34,6 @@ CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NAME_MAX=48 CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_LOSMART=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/risc-v/esp32h2/esp32h2-devkit/configs/temperature_sensor/defconfig b/boards/risc-v/esp32h2/esp32h2-devkit/configs/temperature_sensor/defconfig index 5057b04eaae85..2a3dafa576704 100644 --- a/boards/risc-v/esp32h2/esp32h2-devkit/configs/temperature_sensor/defconfig +++ b/boards/risc-v/esp32h2/esp32h2-devkit/configs/temperature_sensor/defconfig @@ -31,7 +31,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32h2/esp32h2-devkit/configs/tickless/defconfig b/boards/risc-v/esp32h2/esp32h2-devkit/configs/tickless/defconfig index 8bcddd7c6ec19..8aceaa373eb09 100644 --- a/boards/risc-v/esp32h2/esp32h2-devkit/configs/tickless/defconfig +++ b/boards/risc-v/esp32h2/esp32h2-devkit/configs/tickless/defconfig @@ -28,7 +28,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32h2/esp32h2-devkit/configs/timers/defconfig b/boards/risc-v/esp32h2/esp32h2-devkit/configs/timers/defconfig index 150cd3ea8ecb9..98a722ae89fc8 100644 --- a/boards/risc-v/esp32h2/esp32h2-devkit/configs/timers/defconfig +++ b/boards/risc-v/esp32h2/esp32h2-devkit/configs/timers/defconfig @@ -30,7 +30,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32h2/esp32h2-devkit/configs/twai/defconfig b/boards/risc-v/esp32h2/esp32h2-devkit/configs/twai/defconfig index 4e0c55719ef49..351ab11eb0e10 100644 --- a/boards/risc-v/esp32h2/esp32h2-devkit/configs/twai/defconfig +++ b/boards/risc-v/esp32h2/esp32h2-devkit/configs/twai/defconfig @@ -31,7 +31,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32h2/esp32h2-devkit/configs/usbconsole/defconfig b/boards/risc-v/esp32h2/esp32h2-devkit/configs/usbconsole/defconfig index 5082caf2dfa43..0c5b18de2e7b6 100644 --- a/boards/risc-v/esp32h2/esp32h2-devkit/configs/usbconsole/defconfig +++ b/boards/risc-v/esp32h2/esp32h2-devkit/configs/usbconsole/defconfig @@ -32,7 +32,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32h2/esp32h2-devkit/configs/watchdog/defconfig b/boards/risc-v/esp32h2/esp32h2-devkit/configs/watchdog/defconfig index 12652632da334..1414759662a94 100644 --- a/boards/risc-v/esp32h2/esp32h2-devkit/configs/watchdog/defconfig +++ b/boards/risc-v/esp32h2/esp32h2-devkit/configs/watchdog/defconfig @@ -31,7 +31,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/esp32h2/esp32h2-devkit/src/CMakeLists.txt b/boards/risc-v/esp32h2/esp32h2-devkit/src/CMakeLists.txt index 44594ca44bca0..73b4f8f16fa62 100644 --- a/boards/risc-v/esp32h2/esp32h2-devkit/src/CMakeLists.txt +++ b/boards/risc-v/esp32h2/esp32h2-devkit/src/CMakeLists.txt @@ -23,8 +23,6 @@ set(SRCS esp32h2_boot.c esp32h2_bringup.c) if(CONFIG_BOARDCTL) - list(APPEND SRCS esp32h2_appinit.c) - if(CONFIG_BOARDCTL_RESET) list(APPEND SRCS esp32h2_reset.c) endif() diff --git a/boards/risc-v/esp32h2/esp32h2-devkit/src/Make.defs b/boards/risc-v/esp32h2/esp32h2-devkit/src/Make.defs index 1f57dc7ee997f..38eebccf487c2 100644 --- a/boards/risc-v/esp32h2/esp32h2-devkit/src/Make.defs +++ b/boards/risc-v/esp32h2/esp32h2-devkit/src/Make.defs @@ -24,12 +24,8 @@ include $(TOPDIR)/Make.defs CSRCS = esp32h2_boot.c esp32h2_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) - CSRCS += esp32h2_appinit.c - - ifeq ($(CONFIG_BOARDCTL_RESET),y) - CSRCS += esp32h2_reset.c - endif +ifeq ($(CONFIG_BOARDCTL_RESET),y) + CSRCS += esp32h2_reset.c endif ifeq ($(CONFIG_DEV_GPIO),y) diff --git a/boards/risc-v/esp32h2/esp32h2-devkit/src/esp32h2-devkit.h b/boards/risc-v/esp32h2/esp32h2-devkit/src/esp32h2-devkit.h index 08f547dab24a1..4da4ed0be8ea0 100644 --- a/boards/risc-v/esp32h2/esp32h2-devkit/src/esp32h2-devkit.h +++ b/boards/risc-v/esp32h2/esp32h2-devkit/src/esp32h2-devkit.h @@ -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. * diff --git a/boards/risc-v/esp32h2/esp32h2-devkit/src/esp32h2_appinit.c b/boards/risc-v/esp32h2/esp32h2-devkit/src/esp32h2_appinit.c deleted file mode 100644 index 8da0356480b21..0000000000000 --- a/boards/risc-v/esp32h2/esp32h2-devkit/src/esp32h2_appinit.c +++ /dev/null @@ -1,83 +0,0 @@ -/**************************************************************************** - * boards/risc-v/esp32h2/esp32h2-devkit/src/esp32h2_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 - -#include - -#include - -#include "esp32h2-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 */ diff --git a/boards/risc-v/esp32h2/esp32h2-devkit/src/esp32h2_boot.c b/boards/risc-v/esp32h2/esp32h2-devkit/src/esp32h2_boot.c index 057de07601569..a8a9fa856f26b 100644 --- a/boards/risc-v/esp32h2/esp32h2-devkit/src/esp32h2_boot.c +++ b/boards/risc-v/esp32h2/esp32h2-devkit/src/esp32h2_boot.c @@ -26,6 +26,8 @@ #include +#include "esp32h2-devkit.h" + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ diff --git a/boards/risc-v/esp32h2/esp32h2-devkit/src/esp32h2_bringup.c b/boards/risc-v/esp32h2/esp32h2-devkit/src/esp32h2_bringup.c index b45476008b6bf..e04356a756aee 100644 --- a/boards/risc-v/esp32h2/esp32h2-devkit/src/esp32h2_bringup.c +++ b/boards/risc-v/esp32h2/esp32h2-devkit/src/esp32h2_bringup.c @@ -152,9 +152,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. * diff --git a/boards/risc-v/esp32p4/esp32p4-function-ev-board/configs/psram_usrheap/defconfig b/boards/risc-v/esp32p4/esp32p4-function-ev-board/configs/psram_usrheap/defconfig index c5401e9910034..4d37c8358ce2d 100644 --- a/boards/risc-v/esp32p4/esp32p4-function-ev-board/configs/psram_usrheap/defconfig +++ b/boards/risc-v/esp32p4/esp32p4-function-ev-board/configs/psram_usrheap/defconfig @@ -19,7 +19,6 @@ CONFIG_ARCH_MINIMAL_VECTORTABLE_DYNAMIC=y CONFIG_ARCH_NUSER_INTERRUPTS=17 CONFIG_ARCH_RISCV=y CONFIG_BOARDCTL_RESET=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=15000 CONFIG_BUILTIN=y CONFIG_ESPRESSIF_SPIFLASH=y diff --git a/boards/risc-v/esp32p4/esp32p4-function-ev-board/src/CMakeLists.txt b/boards/risc-v/esp32p4/esp32p4-function-ev-board/src/CMakeLists.txt index 3e523e9a2873e..688eddaf1db05 100644 --- a/boards/risc-v/esp32p4/esp32p4-function-ev-board/src/CMakeLists.txt +++ b/boards/risc-v/esp32p4/esp32p4-function-ev-board/src/CMakeLists.txt @@ -23,8 +23,6 @@ set(SRCS esp32p4_boot.c esp32p4_bringup.c) if(CONFIG_BOARDCTL) - list(APPEND SRCS esp32p4_appinit.c) - if(CONFIG_BOARDCTL_RESET) list(APPEND SRCS esp32p4_reset.c) endif() diff --git a/boards/risc-v/esp32p4/esp32p4-function-ev-board/src/Make.defs b/boards/risc-v/esp32p4/esp32p4-function-ev-board/src/Make.defs index d3351e1aab93a..021a384a17363 100644 --- a/boards/risc-v/esp32p4/esp32p4-function-ev-board/src/Make.defs +++ b/boards/risc-v/esp32p4/esp32p4-function-ev-board/src/Make.defs @@ -25,8 +25,6 @@ include $(TOPDIR)/Make.defs CSRCS = esp32p4_boot.c esp32p4_bringup.c ifeq ($(CONFIG_BOARDCTL),y) - CSRCS += esp32p4_appinit.c - ifeq ($(CONFIG_BOARDCTL_RESET),y) CSRCS += esp32p4_reset.c endif diff --git a/boards/risc-v/esp32p4/esp32p4-function-ev-board/src/esp32p4-function-ev-board.h b/boards/risc-v/esp32p4/esp32p4-function-ev-board/src/esp32p4-function-ev-board.h index 61a362e469f67..6917761f504f1 100644 --- a/boards/risc-v/esp32p4/esp32p4-function-ev-board/src/esp32p4-function-ev-board.h +++ b/boards/risc-v/esp32p4/esp32p4-function-ev-board/src/esp32p4-function-ev-board.h @@ -66,12 +66,6 @@ * Description: * Perform architecture-specific initialization. * - * 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. * diff --git a/boards/risc-v/esp32p4/esp32p4-function-ev-board/src/esp32p4_appinit.c b/boards/risc-v/esp32p4/esp32p4-function-ev-board/src/esp32p4_appinit.c deleted file mode 100644 index b2d6710a30764..0000000000000 --- a/boards/risc-v/esp32p4/esp32p4-function-ev-board/src/esp32p4_appinit.c +++ /dev/null @@ -1,83 +0,0 @@ -/**************************************************************************** - * boards/risc-v/esp32p4/esp32p4-function-ev-board/src/esp32p4_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 - -#include - -#include - -#include "esp32p4-function-ev-board.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 */ diff --git a/boards/risc-v/esp32p4/esp32p4-function-ev-board/src/esp32p4_bringup.c b/boards/risc-v/esp32p4/esp32p4-function-ev-board/src/esp32p4_bringup.c index 318a19bc15245..e32286ada4fb9 100644 --- a/boards/risc-v/esp32p4/esp32p4-function-ev-board/src/esp32p4_bringup.c +++ b/boards/risc-v/esp32p4/esp32p4-function-ev-board/src/esp32p4_bringup.c @@ -144,12 +144,6 @@ * Description: * Perform architecture-specific initialization. * - * 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. * diff --git a/boards/risc-v/esp32p4/esp32p4-pico-wifi-wareshare/src/CMakeLists.txt b/boards/risc-v/esp32p4/esp32p4-pico-wifi-wareshare/src/CMakeLists.txt index 8e3313eb34049..6d8acca90c174 100644 --- a/boards/risc-v/esp32p4/esp32p4-pico-wifi-wareshare/src/CMakeLists.txt +++ b/boards/risc-v/esp32p4/esp32p4-pico-wifi-wareshare/src/CMakeLists.txt @@ -23,8 +23,6 @@ set(SRCS esp32p4_boot.c esp32p4_bringup.c) if(CONFIG_BOARDCTL) - list(APPEND SRCS esp32p4_appinit.c) - if(CONFIG_BOARDCTL_RESET) list(APPEND SRCS esp32p4_reset.c) endif() diff --git a/boards/risc-v/esp32p4/esp32p4-pico-wifi-wareshare/src/Make.defs b/boards/risc-v/esp32p4/esp32p4-pico-wifi-wareshare/src/Make.defs index eca3e2c570d2b..84af56cdc752c 100644 --- a/boards/risc-v/esp32p4/esp32p4-pico-wifi-wareshare/src/Make.defs +++ b/boards/risc-v/esp32p4/esp32p4-pico-wifi-wareshare/src/Make.defs @@ -25,8 +25,6 @@ include $(TOPDIR)/Make.defs CSRCS = esp32p4_boot.c esp32p4_bringup.c ifeq ($(CONFIG_BOARDCTL),y) - CSRCS += esp32p4_appinit.c - ifeq ($(CONFIG_BOARDCTL_RESET),y) CSRCS += esp32p4_reset.c endif diff --git a/boards/risc-v/esp32p4/esp32p4-pico-wifi-wareshare/src/esp32p4-pico-wifi.h b/boards/risc-v/esp32p4/esp32p4-pico-wifi-wareshare/src/esp32p4-pico-wifi.h index 1044c2ae7964b..0f826899c8ee2 100644 --- a/boards/risc-v/esp32p4/esp32p4-pico-wifi-wareshare/src/esp32p4-pico-wifi.h +++ b/boards/risc-v/esp32p4/esp32p4-pico-wifi-wareshare/src/esp32p4-pico-wifi.h @@ -66,12 +66,6 @@ * Description: * Perform architecture-specific initialization. * - * 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. * diff --git a/boards/risc-v/esp32p4/esp32p4-pico-wifi-wareshare/src/esp32p4_appinit.c b/boards/risc-v/esp32p4/esp32p4-pico-wifi-wareshare/src/esp32p4_appinit.c deleted file mode 100644 index 288170a905e63..0000000000000 --- a/boards/risc-v/esp32p4/esp32p4-pico-wifi-wareshare/src/esp32p4_appinit.c +++ /dev/null @@ -1,83 +0,0 @@ -/**************************************************************************** - * boards/risc-v/esp32p4/esp32p4-pico-wifi-wareshare/src/esp32p4_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 - -#include - -#include - -#include "esp32p4-pico-wifi.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 */ diff --git a/boards/risc-v/esp32p4/esp32p4-pico-wifi-wareshare/src/esp32p4_boot.c b/boards/risc-v/esp32p4/esp32p4-pico-wifi-wareshare/src/esp32p4_boot.c index 681ddea0e9016..956a9b741f867 100644 --- a/boards/risc-v/esp32p4/esp32p4-pico-wifi-wareshare/src/esp32p4_boot.c +++ b/boards/risc-v/esp32p4/esp32p4-pico-wifi-wareshare/src/esp32p4_boot.c @@ -26,6 +26,8 @@ #include +#include "esp32p4-pico-wifi.h" + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ diff --git a/boards/risc-v/esp32p4/esp32p4-pico-wifi-wareshare/src/esp32p4_bringup.c b/boards/risc-v/esp32p4/esp32p4-pico-wifi-wareshare/src/esp32p4_bringup.c index 5a1f598e47901..9375eac5df64f 100644 --- a/boards/risc-v/esp32p4/esp32p4-pico-wifi-wareshare/src/esp32p4_bringup.c +++ b/boards/risc-v/esp32p4/esp32p4-pico-wifi-wareshare/src/esp32p4_bringup.c @@ -133,12 +133,6 @@ * Description: * Perform architecture-specific initialization. * - * 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. * diff --git a/boards/risc-v/fe310/hifive1-revb/configs/nsh/defconfig b/boards/risc-v/fe310/hifive1-revb/configs/nsh/defconfig index cc9493dc9100d..54de9d77adb82 100644 --- a/boards/risc-v/fe310/hifive1-revb/configs/nsh/defconfig +++ b/boards/risc-v/fe310/hifive1-revb/configs/nsh/defconfig @@ -66,7 +66,6 @@ CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_MM_SMALL=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=64 CONFIG_NSH_STRERROR=y diff --git a/boards/risc-v/fe310/hifive1-revb/src/CMakeLists.txt b/boards/risc-v/fe310/hifive1-revb/src/CMakeLists.txt index 257f17040d2e9..29663a320224a 100644 --- a/boards/risc-v/fe310/hifive1-revb/src/CMakeLists.txt +++ b/boards/risc-v/fe310/hifive1-revb/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS fe310_bringup.c fe310_boot.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS fe310_appinit.c) -endif() - if(CONFIG_ARCH_LEDS) list(APPEND SRCS fe310_autoleds.c) endif() diff --git a/boards/risc-v/fe310/hifive1-revb/src/Makefile b/boards/risc-v/fe310/hifive1-revb/src/Makefile index d67da83bf4e80..9d28af8a912f1 100644 --- a/boards/risc-v/fe310/hifive1-revb/src/Makefile +++ b/boards/risc-v/fe310/hifive1-revb/src/Makefile @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = fe310_bringup.c fe310_boot.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += fe310_appinit.c -endif - ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += fe310_autoleds.c endif diff --git a/boards/risc-v/fe310/hifive1-revb/src/fe310_appinit.c b/boards/risc-v/fe310/hifive1-revb/src/fe310_appinit.c deleted file mode 100644 index 76dd76f98caa9..0000000000000 --- a/boards/risc-v/fe310/hifive1-revb/src/fe310_appinit.c +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** - * boards/risc-v/fe310/hifive1-revb/src/fe310_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 - -#include -#include -#include -#include - -#include - -#include "fe310.h" -#include "hifive1-revb.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 fe310_bringup(); -#endif -} diff --git a/boards/risc-v/fe310/hifive1-revb/src/fe310_boot.c b/boards/risc-v/fe310/hifive1-revb/src/fe310_boot.c index fd569df6bf9ba..1f1bcdbdf0cab 100644 --- a/boards/risc-v/fe310/hifive1-revb/src/fe310_boot.c +++ b/boards/risc-v/fe310/hifive1-revb/src/fe310_boot.c @@ -31,6 +31,8 @@ #include #include +#include "hifive1-revb.h" + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -62,3 +64,30 @@ void fe310_boardinitialize(void) board_autoled_initialize(); #endif } + +/**************************************************************************** + * 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) +{ + fe310_bringup(); +} +#endif diff --git a/boards/risc-v/hpm6000/hpm6360evk/configs/nsh/defconfig b/boards/risc-v/hpm6000/hpm6360evk/configs/nsh/defconfig index ede6f76f17ca8..cfff7362e4bf2 100644 --- a/boards/risc-v/hpm6000/hpm6360evk/configs/nsh/defconfig +++ b/boards/risc-v/hpm6000/hpm6360evk/configs/nsh/defconfig @@ -60,7 +60,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_ENVPATH=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=64 CONFIG_NSH_STRERROR=y diff --git a/boards/risc-v/hpm6000/hpm6360evk/src/CMakeLists.txt b/boards/risc-v/hpm6000/hpm6360evk/src/CMakeLists.txt index 82a17b1335754..9145db47cc4f3 100644 --- a/boards/risc-v/hpm6000/hpm6360evk/src/CMakeLists.txt +++ b/boards/risc-v/hpm6000/hpm6360evk/src/CMakeLists.txt @@ -20,13 +20,7 @@ # # ############################################################################## -set(SRCS hpm6360_bringup.c hpm6360_boot.c hpm6360_appinit.c) - -if(CONFIG_BOARDCTL) - if(EXISTS hpm6360_appinit.c) - list(APPEND SRCS hpm6360_appinit.c) - endif() -endif() +set(SRCS hpm6360_bringup.c hpm6360_boot.c) if(CONFIG_ARCH_LEDS) list(APPEND SRCS hpm6360_autoleds.c) diff --git a/boards/risc-v/hpm6000/hpm6360evk/src/Makefile b/boards/risc-v/hpm6000/hpm6360evk/src/Makefile index 4cf141fe1b811..f88002400333b 100644 --- a/boards/risc-v/hpm6000/hpm6360evk/src/Makefile +++ b/boards/risc-v/hpm6000/hpm6360evk/src/Makefile @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = hpm6360_bringup.c hpm6360_boot.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += hpm6360_appinit.c -endif - ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += hpm6360_autoleds.c endif diff --git a/boards/risc-v/hpm6000/hpm6360evk/src/hpm6360_appinit.c b/boards/risc-v/hpm6000/hpm6360evk/src/hpm6360_appinit.c deleted file mode 100644 index 6a2d02e5e1475..0000000000000 --- a/boards/risc-v/hpm6000/hpm6360evk/src/hpm6360_appinit.c +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** - * boards/risc-v/hpm6000/hpm6360evk/src/hpm6360_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 - -#include -#include -#include -#include - -#include - -#include "hpm6360evk.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 hpm6360_bringup(); -#endif -} diff --git a/boards/risc-v/hpm6000/hpm6360evk/src/hpm6360_boot.c b/boards/risc-v/hpm6000/hpm6360evk/src/hpm6360_boot.c index 620df55a2a4fb..5c17f2ccede60 100644 --- a/boards/risc-v/hpm6000/hpm6360evk/src/hpm6360_boot.c +++ b/boards/risc-v/hpm6000/hpm6360evk/src/hpm6360_boot.c @@ -64,3 +64,30 @@ void hpm6360_boardinitialize(void) hpm6360_autoled_initialize(); #endif } + +/**************************************************************************** + * 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) +{ + hpm6360_bringup(); +} +#endif diff --git a/boards/risc-v/hpm6750/hpm6750evk2/configs/nsh/defconfig b/boards/risc-v/hpm6750/hpm6750evk2/configs/nsh/defconfig index 0379b4666e569..bdaa49a424f01 100644 --- a/boards/risc-v/hpm6750/hpm6750evk2/configs/nsh/defconfig +++ b/boards/risc-v/hpm6750/hpm6750evk2/configs/nsh/defconfig @@ -58,7 +58,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_ENVPATH=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=64 CONFIG_NSH_STRERROR=y diff --git a/boards/risc-v/hpm6750/hpm6750evk2/src/CMakeLists.txt b/boards/risc-v/hpm6750/hpm6750evk2/src/CMakeLists.txt index e1f20fbbc0dd3..d46aa06b81e3e 100644 --- a/boards/risc-v/hpm6750/hpm6750evk2/src/CMakeLists.txt +++ b/boards/risc-v/hpm6750/hpm6750evk2/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS hpm6750_bringup.c hpm6750_boot.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS hpm6750_appinit.c) -endif() - target_sources(board PRIVATE ${SRCS}) set_property(GLOBAL PROPERTY LD_SCRIPT "${NUTTX_BOARD_DIR}/scripts/ld.script") diff --git a/boards/risc-v/hpm6750/hpm6750evk2/src/Makefile b/boards/risc-v/hpm6750/hpm6750evk2/src/Makefile index 1b926a53679f4..8c2e28ad3de7d 100644 --- a/boards/risc-v/hpm6750/hpm6750evk2/src/Makefile +++ b/boards/risc-v/hpm6750/hpm6750evk2/src/Makefile @@ -24,8 +24,4 @@ include $(TOPDIR)/Make.defs CSRCS = hpm6750_bringup.c hpm6750_boot.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += hpm6750_appinit.c -endif - include $(TOPDIR)/boards/Board.mk diff --git a/boards/risc-v/hpm6750/hpm6750evk2/src/hpm6750_appinit.c b/boards/risc-v/hpm6750/hpm6750evk2/src/hpm6750_appinit.c deleted file mode 100644 index 78a5e995a85cb..0000000000000 --- a/boards/risc-v/hpm6750/hpm6750evk2/src/hpm6750_appinit.c +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** - * boards/risc-v/hpm6750/hpm6750evk2/src/hpm6750_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 - -#include -#include -#include -#include - -#include - -#include "hpm6750evk2.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 hpm6750_bringup(); -#endif -} diff --git a/boards/risc-v/hpm6750/hpm6750evk2/src/hpm6750_boot.c b/boards/risc-v/hpm6750/hpm6750evk2/src/hpm6750_boot.c index dc85feaac902c..3f831ec62dbb2 100644 --- a/boards/risc-v/hpm6750/hpm6750evk2/src/hpm6750_boot.c +++ b/boards/risc-v/hpm6750/hpm6750evk2/src/hpm6750_boot.c @@ -31,6 +31,8 @@ #include #include +#include "hpm6750evk2.h" + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -58,3 +60,30 @@ void hpm6750_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) +{ + hpm6750_bringup(); +} +#endif diff --git a/boards/risc-v/jh7110/star64/configs/nsh/defconfig b/boards/risc-v/jh7110/star64/configs/nsh/defconfig index abf5a1a228a47..0e59a4059f318 100644 --- a/boards/risc-v/jh7110/star64/configs/nsh/defconfig +++ b/boards/risc-v/jh7110/star64/configs/nsh/defconfig @@ -40,7 +40,6 @@ CONFIG_ARCH_USE_MMU=y CONFIG_ARCH_USE_MPU=y CONFIG_ARCH_USE_S_MODE=y CONFIG_BOARDCTL_ROMDISK=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=116524 CONFIG_BUILD_KERNEL=y CONFIG_DEBUG_ASSERTIONS=y @@ -67,7 +66,6 @@ CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_MM_PGALLOC=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/jh7110/star64/src/Makefile b/boards/risc-v/jh7110/star64/src/Makefile index c767f4330ae28..1487e7319760e 100644 --- a/boards/risc-v/jh7110/star64/src/Makefile +++ b/boards/risc-v/jh7110/star64/src/Makefile @@ -24,6 +24,6 @@ include $(TOPDIR)/Make.defs RCSRCS = etc/init.d/rc.sysinit etc/init.d/rcS -CSRCS = jh7110_appinit.c +CSRCS = jh7110_boardinit.c include $(TOPDIR)/boards/Board.mk diff --git a/boards/risc-v/jh7110/star64/src/jh7110_appinit.c b/boards/risc-v/jh7110/star64/src/jh7110_boardinit.c similarity index 75% rename from boards/risc-v/jh7110/star64/src/jh7110_appinit.c rename to boards/risc-v/jh7110/star64/src/jh7110_boardinit.c index ec6e1d169e94c..a028b89a4b8f9 100644 --- a/boards/risc-v/jh7110/star64/src/jh7110_appinit.c +++ b/boards/risc-v/jh7110/star64/src/jh7110_boardinit.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/risc-v/jh7110/star64/src/jh7110_appinit.c + * boards/risc-v/jh7110/star64/src/jh7110_boardinit.c * * SPDX-License-Identifier: Apache-2.0 * @@ -92,48 +92,6 @@ 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 */ - -#ifdef CONFIG_NSH_ARCHINIT - - mount(NULL, "/proc", "procfs", 0, NULL); - -#endif - - return OK; -#endif -} - /**************************************************************************** * Name: board_late_initialize * @@ -153,6 +111,7 @@ int board_app_initialize(uintptr_t arg) * ****************************************************************************/ +#ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { /* Mount the RAM Disk */ @@ -161,9 +120,6 @@ void board_late_initialize(void) /* Perform board-specific initialization */ -#ifdef CONFIG_NSH_ARCHINIT - mount(NULL, "/proc", "procfs", 0, NULL); - -#endif } +#endif diff --git a/boards/risc-v/k210/maix-bit/configs/knsh/defconfig b/boards/risc-v/k210/maix-bit/configs/knsh/defconfig index b4cbd171d52ac..4d133f304d9d4 100644 --- a/boards/risc-v/k210/maix-bit/configs/knsh/defconfig +++ b/boards/risc-v/k210/maix-bit/configs/knsh/defconfig @@ -29,7 +29,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_MM_KERNEL_HEAPSIZE=524288 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_NUTTX_USERSPACE=0x80100000 diff --git a/boards/risc-v/k210/maix-bit/configs/knsh_smp/defconfig b/boards/risc-v/k210/maix-bit/configs/knsh_smp/defconfig index 8b2b3eebc5895..7791f88c4b32e 100644 --- a/boards/risc-v/k210/maix-bit/configs/knsh_smp/defconfig +++ b/boards/risc-v/k210/maix-bit/configs/knsh_smp/defconfig @@ -29,7 +29,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_MM_KERNEL_HEAPSIZE=524288 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_NSH_STRERROR=y diff --git a/boards/risc-v/k210/maix-bit/configs/nsh/defconfig b/boards/risc-v/k210/maix-bit/configs/nsh/defconfig index 8df0b8b6e11d5..1544246f0375c 100644 --- a/boards/risc-v/k210/maix-bit/configs/nsh/defconfig +++ b/boards/risc-v/k210/maix-bit/configs/nsh/defconfig @@ -28,7 +28,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_DISABLE_MKDIR=y diff --git a/boards/risc-v/k210/maix-bit/configs/smp/defconfig b/boards/risc-v/k210/maix-bit/configs/smp/defconfig index 8dabebf18f3b5..b70a3fe724637 100644 --- a/boards/risc-v/k210/maix-bit/configs/smp/defconfig +++ b/boards/risc-v/k210/maix-bit/configs/smp/defconfig @@ -29,7 +29,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_DISABLE_MKDIR=y diff --git a/boards/risc-v/k210/maix-bit/configs/smp2/defconfig b/boards/risc-v/k210/maix-bit/configs/smp2/defconfig index 576bf7dc5befd..be371b54608b3 100644 --- a/boards/risc-v/k210/maix-bit/configs/smp2/defconfig +++ b/boards/risc-v/k210/maix-bit/configs/smp2/defconfig @@ -31,7 +31,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_MAX_EXITFUNS=32 CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_NSH_STRERROR=y diff --git a/boards/risc-v/k210/maix-bit/src/CMakeLists.txt b/boards/risc-v/k210/maix-bit/src/CMakeLists.txt index e3da05f111a32..d19f607e06af8 100644 --- a/boards/risc-v/k210/maix-bit/src/CMakeLists.txt +++ b/boards/risc-v/k210/maix-bit/src/CMakeLists.txt @@ -22,10 +22,6 @@ set(SRCS k210_bringup.c k210_boot.c) -if(CONFIG_BOARDCTL) - list(APPEND SRCS k210_appinit.c) -endif() - if(CONFIG_ARCH_LEDS) list(APPEND SRCS k210_leds.c) endif() diff --git a/boards/risc-v/k210/maix-bit/src/Makefile b/boards/risc-v/k210/maix-bit/src/Makefile index 8a66a5a2f1685..bb4a833a80950 100644 --- a/boards/risc-v/k210/maix-bit/src/Makefile +++ b/boards/risc-v/k210/maix-bit/src/Makefile @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = k210_bringup.c k210_boot.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += k210_appinit.c -endif - ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += k210_leds.c endif diff --git a/boards/risc-v/k210/maix-bit/src/k210_appinit.c b/boards/risc-v/k210/maix-bit/src/k210_appinit.c deleted file mode 100644 index 210c93a3fdd25..0000000000000 --- a/boards/risc-v/k210/maix-bit/src/k210_appinit.c +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** - * boards/risc-v/k210/maix-bit/src/k210_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 - -#include -#include -#include -#include - -#include - -#include "k210.h" -#include "maix-bit.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 k210_bringup(); -#endif -} diff --git a/boards/risc-v/k210/maix-bit/src/k210_boot.c b/boards/risc-v/k210/maix-bit/src/k210_boot.c index 96074ad2c65c0..200c3efe48a7b 100644 --- a/boards/risc-v/k210/maix-bit/src/k210_boot.c +++ b/boards/risc-v/k210/maix-bit/src/k210_boot.c @@ -31,6 +31,9 @@ #include #include +#include "k210.h" +#include "maix-bit.h" + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -58,3 +61,30 @@ void k210_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) +{ + k210_bringup(); +} +#endif diff --git a/boards/risc-v/k230/canmv230/configs/knsh/defconfig b/boards/risc-v/k230/canmv230/configs/knsh/defconfig index dead0ff5aefde..691aba8d61bd7 100644 --- a/boards/risc-v/k230/canmv230/configs/knsh/defconfig +++ b/boards/risc-v/k230/canmv230/configs/knsh/defconfig @@ -41,7 +41,6 @@ CONFIG_ARCH_USE_MMU=y CONFIG_ARCH_USE_MPU=y CONFIG_ARCH_USE_S_MODE=y CONFIG_BINFMT_ELF_EXECUTABLE=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=53291 CONFIG_BUILD_KERNEL=y CONFIG_DEBUG_ASSERTIONS=y @@ -65,7 +64,6 @@ CONFIG_LIBC_STRERROR=y CONFIG_LIBM=y CONFIG_MM_PGALLOC=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/k230/canmv230/configs/master/defconfig b/boards/risc-v/k230/canmv230/configs/master/defconfig index 569f41c22339e..d070f4719268b 100644 --- a/boards/risc-v/k230/canmv230/configs/master/defconfig +++ b/boards/risc-v/k230/canmv230/configs/master/defconfig @@ -41,7 +41,6 @@ CONFIG_ARCH_USE_MPU=y CONFIG_ARCH_USE_S_MODE=y CONFIG_BINFMT_ELF_EXECUTABLE=y CONFIG_BOARD_INITTHREAD_STACKSIZE=3072 -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=53291 CONFIG_BUILD_KERNEL=y CONFIG_DEBUG_ASSERTIONS=y @@ -72,7 +71,6 @@ CONFIG_LIBC_STRERROR=y CONFIG_LIBM=y CONFIG_MM_PGALLOC=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_PROMPT_STRING="" diff --git a/boards/risc-v/k230/canmv230/configs/nsbi/defconfig b/boards/risc-v/k230/canmv230/configs/nsbi/defconfig index 263f628af114b..c63d44daa7cce 100644 --- a/boards/risc-v/k230/canmv230/configs/nsbi/defconfig +++ b/boards/risc-v/k230/canmv230/configs/nsbi/defconfig @@ -40,7 +40,6 @@ CONFIG_ARCH_USE_MMU=y CONFIG_ARCH_USE_MPU=y CONFIG_ARCH_USE_S_MODE=y CONFIG_BINFMT_ELF_EXECUTABLE=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=53291 CONFIG_BUILD_KERNEL=y CONFIG_DEBUG_ASSERTIONS=y @@ -66,7 +65,6 @@ CONFIG_LIBC_STRERROR=y CONFIG_LIBM=y CONFIG_MM_PGALLOC=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/k230/canmv230/configs/nsh/defconfig b/boards/risc-v/k230/canmv230/configs/nsh/defconfig index da2d2363cc98a..3f084781af382 100644 --- a/boards/risc-v/k230/canmv230/configs/nsh/defconfig +++ b/boards/risc-v/k230/canmv230/configs/nsh/defconfig @@ -42,7 +42,6 @@ CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_LIBM=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/k230/canmv230/configs/pnsh/defconfig b/boards/risc-v/k230/canmv230/configs/pnsh/defconfig index 3fab49b6a54e8..c34a6218903ba 100644 --- a/boards/risc-v/k230/canmv230/configs/pnsh/defconfig +++ b/boards/risc-v/k230/canmv230/configs/pnsh/defconfig @@ -43,7 +43,6 @@ CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_LIBM=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/k230/canmv230/configs/remote/defconfig b/boards/risc-v/k230/canmv230/configs/remote/defconfig index 68aef4e535db4..b83c7a28b9a07 100644 --- a/boards/risc-v/k230/canmv230/configs/remote/defconfig +++ b/boards/risc-v/k230/canmv230/configs/remote/defconfig @@ -31,7 +31,6 @@ CONFIG_ARCH_USE_MPU=y CONFIG_ARCH_USE_S_MODE=y CONFIG_BINFMT_ELF_EXECUTABLE=y CONFIG_BOARD_INITTHREAD_STACKSIZE=3072 -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=106613 CONFIG_BUILD_KERNEL=y CONFIG_DEBUG_ASSERTIONS=y @@ -60,7 +59,6 @@ CONFIG_LIBC_STRERROR=y CONFIG_LIBM=y CONFIG_MM_PGALLOC=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_PROMPT_STRING="" diff --git a/boards/risc-v/k230/canmv230/src/canmv_init.c b/boards/risc-v/k230/canmv230/src/canmv_init.c index 2e8446abdd78f..42aba0b0bfac9 100644 --- a/boards/risc-v/k230/canmv230/src/canmv_init.c +++ b/boards/risc-v/k230/canmv230/src/canmv_init.c @@ -107,48 +107,6 @@ void rpmsg_serialinit(void) } #endif -/**************************************************************************** - * 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 */ - -#ifdef CONFIG_NSH_ARCHINIT - - mount(NULL, "/proc", "procfs", 0, NULL); - -#endif - debug_dumps(); - return OK; -#endif -} - /**************************************************************************** * Name: board_late_initialize * @@ -189,12 +147,8 @@ void board_late_initialize(void) } #endif /* CONFIG_BUILD_KERNEL */ -#ifdef CONFIG_NSH_ARCHINIT - mount(NULL, "/proc", "procfs", 0, NULL); -#endif - #ifdef CONFIG_RPTUN # ifdef CONFIG_K230_RPTUN_MASTER k230_rptun_init("remote"); diff --git a/boards/risc-v/litex/arty_a7/configs/knsh-tickless/defconfig b/boards/risc-v/litex/arty_a7/configs/knsh-tickless/defconfig index 313ff27923d26..8f734427482dd 100644 --- a/boards/risc-v/litex/arty_a7/configs/knsh-tickless/defconfig +++ b/boards/risc-v/litex/arty_a7/configs/knsh-tickless/defconfig @@ -35,7 +35,6 @@ CONFIG_ARCH_USE_S_MODE=y CONFIG_BINFMT_ELF_EXECUTABLE=y CONFIG_BOARDCTL_RESET=y CONFIG_BOARDCTL_ROMDISK=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=10000 CONFIG_BUILD_KERNEL=y CONFIG_ELF=y diff --git a/boards/risc-v/litex/arty_a7/configs/knsh/defconfig b/boards/risc-v/litex/arty_a7/configs/knsh/defconfig index 407017b5683fa..9396366431b81 100644 --- a/boards/risc-v/litex/arty_a7/configs/knsh/defconfig +++ b/boards/risc-v/litex/arty_a7/configs/knsh/defconfig @@ -34,7 +34,6 @@ CONFIG_ARCH_USE_S_MODE=y CONFIG_BINFMT_ELF_EXECUTABLE=y CONFIG_BOARDCTL_RESET=y CONFIG_BOARDCTL_ROMDISK=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=10000 CONFIG_BUILD_KERNEL=y CONFIG_ELF=y diff --git a/boards/risc-v/litex/arty_a7/configs/netnsh/defconfig b/boards/risc-v/litex/arty_a7/configs/netnsh/defconfig index 7a8f92942b7db..848f799763ee5 100644 --- a/boards/risc-v/litex/arty_a7/configs/netnsh/defconfig +++ b/boards/risc-v/litex/arty_a7/configs/netnsh/defconfig @@ -58,7 +58,6 @@ CONFIG_NET_UDP_CHECKSUMS=y CONFIG_NET_UDP_NPOLLWAITERS=8 CONFIG_NET_UDP_WRITE_BUFFERS=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=64 CONFIG_NSH_STRERROR=y diff --git a/boards/risc-v/litex/arty_a7/configs/nsh-tickless/defconfig b/boards/risc-v/litex/arty_a7/configs/nsh-tickless/defconfig index 2c88bdcff43a4..3fdb1800fc2c4 100644 --- a/boards/risc-v/litex/arty_a7/configs/nsh-tickless/defconfig +++ b/boards/risc-v/litex/arty_a7/configs/nsh-tickless/defconfig @@ -28,7 +28,6 @@ CONFIG_ARCH_CHIP_LITEX=y CONFIG_ARCH_INTERRUPTSTACK=8192 CONFIG_ARCH_RISCV=y CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARDCTL_RESET=y CONFIG_BOARD_LOOPSPERMSEC=10000 CONFIG_BUILTIN=y CONFIG_DEBUG_FULLOPT=y @@ -45,7 +44,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=64 CONFIG_NSH_STRERROR=y diff --git a/boards/risc-v/litex/arty_a7/configs/nsh-vexii/defconfig b/boards/risc-v/litex/arty_a7/configs/nsh-vexii/defconfig index 830eefba0b6a2..e2228297f38ee 100644 --- a/boards/risc-v/litex/arty_a7/configs/nsh-vexii/defconfig +++ b/boards/risc-v/litex/arty_a7/configs/nsh-vexii/defconfig @@ -29,7 +29,6 @@ CONFIG_ARCH_INTERRUPTSTACK=8192 CONFIG_ARCH_RISCV=y CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_USE_S_MODE=y -CONFIG_BOARDCTL_RESET=y CONFIG_BOARD_LOOPSPERMSEC=10000 CONFIG_BUILTIN=y CONFIG_DEBUG_FULLOPT=y @@ -51,7 +50,6 @@ CONFIG_LITEX_CUSTOM_MEMORY_MAP_PATH="../../../../boards/risc-v/litex/arty_a7/inc CONFIG_LITEX_USE_CUSTOM_IRQ_DEFINITIONS=y CONFIG_LITEX_USE_CUSTOM_MEMORY_MAP=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=64 CONFIG_NSH_STRERROR=y diff --git a/boards/risc-v/litex/arty_a7/configs/nsh/defconfig b/boards/risc-v/litex/arty_a7/configs/nsh/defconfig index a02e7037c6ae4..3e74163d99548 100644 --- a/boards/risc-v/litex/arty_a7/configs/nsh/defconfig +++ b/boards/risc-v/litex/arty_a7/configs/nsh/defconfig @@ -28,7 +28,6 @@ CONFIG_ARCH_CHIP_LITEX=y CONFIG_ARCH_INTERRUPTSTACK=8192 CONFIG_ARCH_RISCV=y CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARDCTL_RESET=y CONFIG_BOARD_LOOPSPERMSEC=10000 CONFIG_BUILTIN=y CONFIG_DEBUG_FULLOPT=y @@ -45,7 +44,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=64 CONFIG_NSH_STRERROR=y diff --git a/boards/risc-v/litex/arty_a7/configs/pwm/defconfig b/boards/risc-v/litex/arty_a7/configs/pwm/defconfig index 1b90033f61124..8e68a05fcf80f 100644 --- a/boards/risc-v/litex/arty_a7/configs/pwm/defconfig +++ b/boards/risc-v/litex/arty_a7/configs/pwm/defconfig @@ -46,7 +46,6 @@ CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_LITEX_PWM=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=64 CONFIG_NSH_STRERROR=y diff --git a/boards/risc-v/litex/arty_a7/configs/sdmmc/defconfig b/boards/risc-v/litex/arty_a7/configs/sdmmc/defconfig index 5ee0e4d97c24e..2a839e011ef9a 100644 --- a/boards/risc-v/litex/arty_a7/configs/sdmmc/defconfig +++ b/boards/risc-v/litex/arty_a7/configs/sdmmc/defconfig @@ -51,7 +51,6 @@ CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_LITEX_SDIO=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=64 CONFIG_NSH_STRERROR=y diff --git a/boards/risc-v/litex/arty_a7/src/Makefile b/boards/risc-v/litex/arty_a7/src/Makefile index 4d2aecfcb87e8..7ae8cc16ea5ad 100644 --- a/boards/risc-v/litex/arty_a7/src/Makefile +++ b/boards/risc-v/litex/arty_a7/src/Makefile @@ -22,11 +22,7 @@ include $(TOPDIR)/Make.defs -CSRCS = litex_bringup.c litex_boot.c - -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += litex_appinit.c -endif +CSRCS = litex_bringup.c litex_boot.c litex_boardinit.c ifeq ($(CONFIG_LITEX_SDIO),y) CSRCS += litex_sdio.c diff --git a/boards/risc-v/litex/arty_a7/src/litex_appinit.c b/boards/risc-v/litex/arty_a7/src/litex_boardinit.c similarity index 66% rename from boards/risc-v/litex/arty_a7/src/litex_appinit.c rename to boards/risc-v/litex/arty_a7/src/litex_boardinit.c index 095cd54cbc405..8862f0367ff0d 100644 --- a/boards/risc-v/litex/arty_a7/src/litex_appinit.c +++ b/boards/risc-v/litex/arty_a7/src/litex_boardinit.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/risc-v/litex/arty_a7/src/litex_appinit.c + * boards/risc-v/litex/arty_a7/src/litex_boardinit.c * * SPDX-License-Identifier: Apache-2.0 * @@ -40,42 +40,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) -{ -#ifdef CONFIG_BOARD_LATE_INITIALIZE - /* Board initialization already performed by board_late_initialize() */ - - return OK; -#else - /* Perform board-specific initialization */ - - return litex_bringup(); -#endif -} - /**************************************************************************** * Name: board_late_initialize * @@ -95,6 +59,7 @@ int board_app_initialize(uintptr_t arg) * ****************************************************************************/ +#ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { #ifdef CONFIG_LITEX_APPLICATION_RAMDISK @@ -103,3 +68,4 @@ void board_late_initialize(void) litex_bringup(); } +#endif /* CONFIG_BOARD_LATE_INITIALIZE */ diff --git a/boards/risc-v/mpfs/icicle/configs/hwtest/defconfig b/boards/risc-v/mpfs/icicle/configs/hwtest/defconfig index 920c86baac60a..eb81a2f9a9e51 100644 --- a/boards/risc-v/mpfs/icicle/configs/hwtest/defconfig +++ b/boards/risc-v/mpfs/icicle/configs/hwtest/defconfig @@ -85,7 +85,6 @@ CONFIG_NET_IGMP=y CONFIG_NET_SOCKOPTS=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_STRERROR=y CONFIG_PREALLOC_TIMERS=4 diff --git a/boards/risc-v/mpfs/icicle/configs/knsh/defconfig b/boards/risc-v/mpfs/icicle/configs/knsh/defconfig index a26a21bafd807..60de58df5f367 100644 --- a/boards/risc-v/mpfs/icicle/configs/knsh/defconfig +++ b/boards/risc-v/mpfs/icicle/configs/knsh/defconfig @@ -37,7 +37,6 @@ CONFIG_ARCH_TEXT_VBASE=0x00000000 CONFIG_ARCH_USE_MMU=y CONFIG_ARCH_USE_MPU=y CONFIG_ARCH_USE_S_MODE=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=54000 CONFIG_BUILD_KERNEL=y CONFIG_CXX_LOCALIZATION=y @@ -75,7 +74,6 @@ CONFIG_MM_SHM=y CONFIG_MPFS_ENABLE_DPFPU=y CONFIG_MPFS_ROMFS_MOUNT=y CONFIG_MPFS_UART1=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILE_APPS=y CONFIG_NSH_STRERROR=y CONFIG_NUTTSBI=y diff --git a/boards/risc-v/mpfs/icicle/configs/nsh/defconfig b/boards/risc-v/mpfs/icicle/configs/nsh/defconfig index ae7e2148a8778..ef1553cbbc63b 100644 --- a/boards/risc-v/mpfs/icicle/configs/nsh/defconfig +++ b/boards/risc-v/mpfs/icicle/configs/nsh/defconfig @@ -39,7 +39,6 @@ CONFIG_LIBC_STRERROR=y CONFIG_LINE_MAX=160 CONFIG_MPFS_ENABLE_DPFPU=y CONFIG_MPFS_UART1=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_DISABLE_MKDIR=y diff --git a/boards/risc-v/mpfs/icicle/configs/opensbi/defconfig b/boards/risc-v/mpfs/icicle/configs/opensbi/defconfig index 7f4baee61b698..37ab62086e7b4 100644 --- a/boards/risc-v/mpfs/icicle/configs/opensbi/defconfig +++ b/boards/risc-v/mpfs/icicle/configs/opensbi/defconfig @@ -17,7 +17,6 @@ CONFIG_ARCH_CHIP_MPFS=y CONFIG_ARCH_INTERRUPTSTACK=2048 CONFIG_ARCH_RISCV=y CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARDCTL_MKRD=y CONFIG_BOARD_LOOPSPERMSEC=54000 CONFIG_BUILTIN=y CONFIG_DEBUG_FEATURES=y @@ -48,7 +47,6 @@ CONFIG_MPFS_HART4_ENTRYPOINT=0x80200000 CONFIG_MPFS_HART4_SBI=y CONFIG_MPFS_OPENSBI=y CONFIG_MPFS_UART0=y -CONFIG_NSH_ARCHINIT=y CONFIG_OPENSBI=y CONFIG_RAM_SIZE=1048576 CONFIG_RAM_START=0x08000000 diff --git a/boards/risc-v/mpfs/icicle/configs/pnsh/defconfig b/boards/risc-v/mpfs/icicle/configs/pnsh/defconfig index 55cba2dc7f8e4..b05818d418447 100644 --- a/boards/risc-v/mpfs/icicle/configs/pnsh/defconfig +++ b/boards/risc-v/mpfs/icicle/configs/pnsh/defconfig @@ -43,7 +43,6 @@ CONFIG_LIBC_STRERROR=y CONFIG_LINE_MAX=160 CONFIG_MPFS_ENABLE_DPFPU=y CONFIG_MPFS_UART1=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_DISABLE_MKDIR=y diff --git a/boards/risc-v/mpfs/icicle/configs/rpmsg-ch1/defconfig b/boards/risc-v/mpfs/icicle/configs/rpmsg-ch1/defconfig index 0a9b0f0802e0a..e5ad790b50199 100644 --- a/boards/risc-v/mpfs/icicle/configs/rpmsg-ch1/defconfig +++ b/boards/risc-v/mpfs/icicle/configs/rpmsg-ch1/defconfig @@ -20,7 +20,6 @@ CONFIG_ARCH_CHIP_MPFS=y CONFIG_ARCH_INTERRUPTSTACK=2048 CONFIG_ARCH_RISCV=y CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARDCTL_MKRD=y CONFIG_BOARD_LOOPSPERMSEC=54000 CONFIG_BUILTIN=y CONFIG_DEBUG_ASSERTIONS=y @@ -52,7 +51,6 @@ CONFIG_MPFS_IHC_LINUX_ON_HART4=0 CONFIG_MPFS_IHC_NUTTX_ON_HART1=1 CONFIG_MPFS_IHC_NUTTX_ON_HART2=0 CONFIG_MPFS_UART1=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_BASENAME=y CONFIG_NSH_DISABLE_DF=y diff --git a/boards/risc-v/mpfs/icicle/configs/rpmsg-ch2/defconfig b/boards/risc-v/mpfs/icicle/configs/rpmsg-ch2/defconfig index 04aaac432ddab..012d84a04c54c 100644 --- a/boards/risc-v/mpfs/icicle/configs/rpmsg-ch2/defconfig +++ b/boards/risc-v/mpfs/icicle/configs/rpmsg-ch2/defconfig @@ -20,7 +20,6 @@ CONFIG_ARCH_CHIP_MPFS=y CONFIG_ARCH_INTERRUPTSTACK=2048 CONFIG_ARCH_RISCV=y CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARDCTL_MKRD=y CONFIG_BOARD_LOOPSPERMSEC=54000 CONFIG_BUILTIN=y CONFIG_DEBUG_ASSERTIONS=y @@ -51,7 +50,6 @@ CONFIG_MPFS_IHC_CLIENT=y CONFIG_MPFS_IHC_LINUX_ON_HART3=0 CONFIG_MPFS_IHC_RPMSG_CH2=y CONFIG_MPFS_UART2=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_BASENAME=y CONFIG_NSH_DISABLE_DF=y diff --git a/boards/risc-v/mpfs/icicle/configs/rpmsg-sbi/defconfig b/boards/risc-v/mpfs/icicle/configs/rpmsg-sbi/defconfig index 1427498603f5e..a30310550d082 100644 --- a/boards/risc-v/mpfs/icicle/configs/rpmsg-sbi/defconfig +++ b/boards/risc-v/mpfs/icicle/configs/rpmsg-sbi/defconfig @@ -19,7 +19,6 @@ CONFIG_ARCH_CHIP_MPFS=y CONFIG_ARCH_INTERRUPTSTACK=2048 CONFIG_ARCH_RISCV=y CONFIG_ARCH_STACKDUMP=y -CONFIG_BOARDCTL_MKRD=y CONFIG_BOARD_LOOPSPERMSEC=54000 CONFIG_BUILTIN=y CONFIG_DEBUG_FEATURES=y @@ -56,7 +55,6 @@ CONFIG_MPFS_IHC_SBI=y CONFIG_MPFS_IHC_TWO_RPMSG_CHANNELS=y CONFIG_MPFS_OPENSBI=y CONFIG_MPFS_UART0=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_OPENSBI=y CONFIG_RAM_SIZE=1048576 diff --git a/boards/risc-v/mpfs/icicle/src/Make.defs b/boards/risc-v/mpfs/icicle/src/Make.defs index b9d54b6903ac4..9b4fd55973f07 100644 --- a/boards/risc-v/mpfs/icicle/src/Make.defs +++ b/boards/risc-v/mpfs/icicle/src/Make.defs @@ -22,10 +22,6 @@ CSRCS = mpfs_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += mpfs_appinit.c -endif - ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += mpfs_autoleds.c endif diff --git a/boards/risc-v/mpfs/icicle/src/mpfs_appinit.c b/boards/risc-v/mpfs/icicle/src/mpfs_appinit.c deleted file mode 100644 index 4b3a462829daf..0000000000000 --- a/boards/risc-v/mpfs/icicle/src/mpfs_appinit.c +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** - * boards/risc-v/mpfs/icicle/src/mpfs_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 - -#include -#include -#include -#include - -#include - -#include "mpfs.h" -#include "board_config.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 mpfs_bringup(); -#endif -} diff --git a/boards/risc-v/mpfs/m100pfsevp/configs/nsh/defconfig b/boards/risc-v/mpfs/m100pfsevp/configs/nsh/defconfig index 095fa015bb0e4..01f66baea01a2 100644 --- a/boards/risc-v/mpfs/m100pfsevp/configs/nsh/defconfig +++ b/boards/risc-v/mpfs/m100pfsevp/configs/nsh/defconfig @@ -38,7 +38,6 @@ CONFIG_LIBC_STRERROR=y CONFIG_LINE_MAX=160 CONFIG_MPFS_ENABLE_DPFPU=y CONFIG_MPFS_UART1=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_DISABLE_MKDIR=y diff --git a/boards/risc-v/mpfs/m100pfsevp/src/Make.defs b/boards/risc-v/mpfs/m100pfsevp/src/Make.defs index c23e6aaa6721c..3ba9401864458 100644 --- a/boards/risc-v/mpfs/m100pfsevp/src/Make.defs +++ b/boards/risc-v/mpfs/m100pfsevp/src/Make.defs @@ -26,10 +26,6 @@ ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += mpfs_autoleds.c endif -ifeq ($(CONFIG_BOARDCTL),y) - CSRCS += mpfs_appinit.c -endif - DEPPATH += --dep-path board VPATH += :board -CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board \ No newline at end of file +CFLAGS += ${INCDIR_PREFIX}$(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src$(DELIM)board$(DELIM)board diff --git a/boards/risc-v/mpfs/m100pfsevp/src/mpfs_appinit.c b/boards/risc-v/mpfs/m100pfsevp/src/mpfs_appinit.c deleted file mode 100644 index 779c9f6be0b75..0000000000000 --- a/boards/risc-v/mpfs/m100pfsevp/src/mpfs_appinit.c +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** - * boards/risc-v/mpfs/m100pfsevp/src/mpfs_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 - -#include -#include -#include -#include - -#include - -#include "mpfs.h" -#include "board_config.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 mpfs_bringup(); -#endif -} diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/citest/defconfig b/boards/risc-v/qemu-rv/rv-virt/configs/citest/defconfig index b4cb9bb5916f3..4c02d991ce661 100644 --- a/boards/risc-v/qemu-rv/rv-virt/configs/citest/defconfig +++ b/boards/risc-v/qemu-rv/rv-virt/configs/citest/defconfig @@ -91,7 +91,6 @@ CONFIG_NETUTILS_NETINIT=y CONFIG_NET_LOCAL=y CONFIG_NET_USRSOCK=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/citest64/defconfig b/boards/risc-v/qemu-rv/rv-virt/configs/citest64/defconfig index 0c81ded059861..2117caf6d915e 100644 --- a/boards/risc-v/qemu-rv/rv-virt/configs/citest64/defconfig +++ b/boards/risc-v/qemu-rv/rv-virt/configs/citest64/defconfig @@ -57,7 +57,6 @@ CONFIG_NETDEV_LATEINIT=y CONFIG_NETUTILS_NETINIT=y CONFIG_NET_USRSOCK=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/fb/defconfig b/boards/risc-v/qemu-rv/rv-virt/configs/fb/defconfig index 4c368c58def1a..9f25404c0b422 100644 --- a/boards/risc-v/qemu-rv/rv-virt/configs/fb/defconfig +++ b/boards/risc-v/qemu-rv/rv-virt/configs/fb/defconfig @@ -59,7 +59,6 @@ CONFIG_LIBC_EXECFUNCS=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_MM_IOB=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_FILE_APPS=y diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/fb64/defconfig b/boards/risc-v/qemu-rv/rv-virt/configs/fb64/defconfig index 2009395814f66..233f14990b2f3 100644 --- a/boards/risc-v/qemu-rv/rv-virt/configs/fb64/defconfig +++ b/boards/risc-v/qemu-rv/rv-virt/configs/fb64/defconfig @@ -59,7 +59,6 @@ CONFIG_LIBC_EXECFUNCS=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_MM_IOB=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_FILE_APPS=y diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/flats/defconfig b/boards/risc-v/qemu-rv/rv-virt/configs/flats/defconfig index 10fdbaa8c91d3..e8538abc8d1ef 100644 --- a/boards/risc-v/qemu-rv/rv-virt/configs/flats/defconfig +++ b/boards/risc-v/qemu-rv/rv-virt/configs/flats/defconfig @@ -45,7 +45,6 @@ CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_LIBM=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/flats64/defconfig b/boards/risc-v/qemu-rv/rv-virt/configs/flats64/defconfig index 61b92da3841d2..c97cf4221e57b 100644 --- a/boards/risc-v/qemu-rv/rv-virt/configs/flats64/defconfig +++ b/boards/risc-v/qemu-rv/rv-virt/configs/flats64/defconfig @@ -48,7 +48,6 @@ CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_LIBM=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/kfb64/defconfig b/boards/risc-v/qemu-rv/rv-virt/configs/kfb64/defconfig index 5a10af514467b..8ddb820ddf13f 100644 --- a/boards/risc-v/qemu-rv/rv-virt/configs/kfb64/defconfig +++ b/boards/risc-v/qemu-rv/rv-virt/configs/kfb64/defconfig @@ -79,7 +79,6 @@ CONFIG_LIBC_STRERROR=y CONFIG_LIBM=y CONFIG_MM_PGALLOC=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/knetnsh64/defconfig b/boards/risc-v/qemu-rv/rv-virt/configs/knetnsh64/defconfig index 6910c9a236dc2..c1946db5b7117 100644 --- a/boards/risc-v/qemu-rv/rv-virt/configs/knetnsh64/defconfig +++ b/boards/risc-v/qemu-rv/rv-virt/configs/knetnsh64/defconfig @@ -105,7 +105,6 @@ CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 CONFIG_NFS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/knetnsh64_smp/defconfig b/boards/risc-v/qemu-rv/rv-virt/configs/knetnsh64_smp/defconfig index 69440f882fc97..99854ab0890bc 100644 --- a/boards/risc-v/qemu-rv/rv-virt/configs/knetnsh64_smp/defconfig +++ b/boards/risc-v/qemu-rv/rv-virt/configs/knetnsh64_smp/defconfig @@ -106,7 +106,6 @@ CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 CONFIG_NFS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/knsh/defconfig b/boards/risc-v/qemu-rv/rv-virt/configs/knsh/defconfig index 592c03cb39e49..686ef75d0398e 100644 --- a/boards/risc-v/qemu-rv/rv-virt/configs/knsh/defconfig +++ b/boards/risc-v/qemu-rv/rv-virt/configs/knsh/defconfig @@ -72,7 +72,6 @@ CONFIG_LIBM=y CONFIG_MM_KMAP=y CONFIG_MM_PGALLOC=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/knsh64/defconfig b/boards/risc-v/qemu-rv/rv-virt/configs/knsh64/defconfig index e3691d8deb420..247641f76dc14 100644 --- a/boards/risc-v/qemu-rv/rv-virt/configs/knsh64/defconfig +++ b/boards/risc-v/qemu-rv/rv-virt/configs/knsh64/defconfig @@ -71,7 +71,6 @@ CONFIG_LIBC_STRERROR=y CONFIG_LIBM=y CONFIG_MM_PGALLOC=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/knsh64_paging/defconfig b/boards/risc-v/qemu-rv/rv-virt/configs/knsh64_paging/defconfig index 1fca77a6dc48c..330baa5d52f48 100644 --- a/boards/risc-v/qemu-rv/rv-virt/configs/knsh64_paging/defconfig +++ b/boards/risc-v/qemu-rv/rv-virt/configs/knsh64_paging/defconfig @@ -46,7 +46,6 @@ CONFIG_ARCH_USE_MPU=y CONFIG_ARCH_USE_S_MODE=y CONFIG_BINFMT_ELF_EXECUTABLE=y CONFIG_BOARD_INITTHREAD_STACKSIZE=3072 -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=6366 CONFIG_BUILD_KERNEL=y CONFIG_DEBUG_FEATURES=y @@ -71,7 +70,6 @@ CONFIG_LIBC_STRERROR=y CONFIG_LIBM=y CONFIG_MM_PGALLOC=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/knsh_paging/defconfig b/boards/risc-v/qemu-rv/rv-virt/configs/knsh_paging/defconfig index bbe83b1a90891..100ddd65d8028 100644 --- a/boards/risc-v/qemu-rv/rv-virt/configs/knsh_paging/defconfig +++ b/boards/risc-v/qemu-rv/rv-virt/configs/knsh_paging/defconfig @@ -45,7 +45,6 @@ CONFIG_ARCH_USE_MMU=y CONFIG_ARCH_USE_MPU=y CONFIG_ARCH_USE_S_MODE=y CONFIG_BINFMT_ELF_EXECUTABLE=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=6366 CONFIG_BUILD_KERNEL=y CONFIG_DEBUG_FEATURES=y @@ -70,7 +69,6 @@ CONFIG_LIBC_STRERROR=y CONFIG_LIBM=y CONFIG_MM_PGALLOC=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/knsh_romfs/defconfig b/boards/risc-v/qemu-rv/rv-virt/configs/knsh_romfs/defconfig index b8afd306c7a58..6e23b6a3fcbf4 100644 --- a/boards/risc-v/qemu-rv/rv-virt/configs/knsh_romfs/defconfig +++ b/boards/risc-v/qemu-rv/rv-virt/configs/knsh_romfs/defconfig @@ -45,7 +45,6 @@ CONFIG_ARCH_USE_MMU=y CONFIG_ARCH_USE_MPU=y CONFIG_ARCH_USE_S_MODE=y CONFIG_BINFMT_ELF_EXECUTABLE=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=6366 CONFIG_BUILD_KERNEL=y CONFIG_ELF=y @@ -67,7 +66,6 @@ CONFIG_LIBC_STRERROR=y CONFIG_LIBM=y CONFIG_MM_PGALLOC=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/ksmp64/defconfig b/boards/risc-v/qemu-rv/rv-virt/configs/ksmp64/defconfig index 4b6c4ecd35edd..e838ea99f3631 100644 --- a/boards/risc-v/qemu-rv/rv-virt/configs/ksmp64/defconfig +++ b/boards/risc-v/qemu-rv/rv-virt/configs/ksmp64/defconfig @@ -71,7 +71,6 @@ CONFIG_LIBC_STRERROR=y CONFIG_LIBM=y CONFIG_MM_PGALLOC=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/leds/defconfig b/boards/risc-v/qemu-rv/rv-virt/configs/leds/defconfig index 96d12fb909deb..fce3860e0626b 100644 --- a/boards/risc-v/qemu-rv/rv-virt/configs/leds/defconfig +++ b/boards/risc-v/qemu-rv/rv-virt/configs/leds/defconfig @@ -27,7 +27,6 @@ CONFIG_ARCH_INTERRUPTSTACK=2048 CONFIG_ARCH_RISCV=y CONFIG_ARCH_STACKDUMP=y CONFIG_BOARDCTL_POWEROFF=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=6366 CONFIG_BUILTIN=y CONFIG_DEBUG_FEATURES=y @@ -46,7 +45,6 @@ CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_LIBM=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/leds64/defconfig b/boards/risc-v/qemu-rv/rv-virt/configs/leds64/defconfig index bea586e4f44e9..aaf7d79af256d 100644 --- a/boards/risc-v/qemu-rv/rv-virt/configs/leds64/defconfig +++ b/boards/risc-v/qemu-rv/rv-virt/configs/leds64/defconfig @@ -28,7 +28,6 @@ CONFIG_ARCH_RISCV=y CONFIG_ARCH_STACKDUMP=y CONFIG_BCH=y CONFIG_BOARDCTL_POWEROFF=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=6366 CONFIG_BUILTIN=y CONFIG_DEBUG_FEATURES=y @@ -49,7 +48,6 @@ CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_LIBM=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/leds64_rust/defconfig b/boards/risc-v/qemu-rv/rv-virt/configs/leds64_rust/defconfig index 9f1eec0c64088..93fa2225770af 100644 --- a/boards/risc-v/qemu-rv/rv-virt/configs/leds64_rust/defconfig +++ b/boards/risc-v/qemu-rv/rv-virt/configs/leds64_rust/defconfig @@ -28,7 +28,6 @@ CONFIG_ARCH_RISCV=y CONFIG_ARCH_STACKDUMP=y CONFIG_BCH=y CONFIG_BOARDCTL_POWEROFF=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=6366 CONFIG_BUILTIN=y CONFIG_DEBUG_FEATURES=y @@ -50,7 +49,6 @@ CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_LIBM=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/leds64_zig/defconfig b/boards/risc-v/qemu-rv/rv-virt/configs/leds64_zig/defconfig index 52f3713e6d8c3..729ebbbd0b1f5 100644 --- a/boards/risc-v/qemu-rv/rv-virt/configs/leds64_zig/defconfig +++ b/boards/risc-v/qemu-rv/rv-virt/configs/leds64_zig/defconfig @@ -28,7 +28,6 @@ CONFIG_ARCH_RISCV=y CONFIG_ARCH_STACKDUMP=y CONFIG_BCH=y CONFIG_BOARDCTL_POWEROFF=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=6366 CONFIG_BUILTIN=y CONFIG_DEBUG_FEATURES=y @@ -50,7 +49,6 @@ CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_LIBM=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/libcxx/defconfig b/boards/risc-v/qemu-rv/rv-virt/configs/libcxx/defconfig index 6f016ccdd82d7..69ea5bd652482 100644 --- a/boards/risc-v/qemu-rv/rv-virt/configs/libcxx/defconfig +++ b/boards/risc-v/qemu-rv/rv-virt/configs/libcxx/defconfig @@ -48,7 +48,6 @@ CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_LIBM=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/libcxx64/defconfig b/boards/risc-v/qemu-rv/rv-virt/configs/libcxx64/defconfig index 98e729d5b70d6..23b030c140441 100644 --- a/boards/risc-v/qemu-rv/rv-virt/configs/libcxx64/defconfig +++ b/boards/risc-v/qemu-rv/rv-virt/configs/libcxx64/defconfig @@ -48,7 +48,6 @@ CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_LIBM=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/lvgl64_vector/defconfig b/boards/risc-v/qemu-rv/rv-virt/configs/lvgl64_vector/defconfig index 96c31346e6656..1894388391a60 100644 --- a/boards/risc-v/qemu-rv/rv-virt/configs/lvgl64_vector/defconfig +++ b/boards/risc-v/qemu-rv/rv-virt/configs/lvgl64_vector/defconfig @@ -73,7 +73,6 @@ CONFIG_LV_USE_NUTTX=y CONFIG_LV_USE_NUTTX_TOUCHSCREEN=y CONFIG_MM_IOB=y CONFIG_MQ_MAXMSGSIZE=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_FILE_APPS=y diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/netnsh/defconfig b/boards/risc-v/qemu-rv/rv-virt/configs/netnsh/defconfig index ca7894bd146e8..3b4246a00fe26 100644 --- a/boards/risc-v/qemu-rv/rv-virt/configs/netnsh/defconfig +++ b/boards/risc-v/qemu-rv/rv-virt/configs/netnsh/defconfig @@ -81,7 +81,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NFS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_FILE_APPS=y diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/netnsh64/defconfig b/boards/risc-v/qemu-rv/rv-virt/configs/netnsh64/defconfig index b18af96cbe4dd..bb33afcb1a39d 100644 --- a/boards/risc-v/qemu-rv/rv-virt/configs/netnsh64/defconfig +++ b/boards/risc-v/qemu-rv/rv-virt/configs/netnsh64/defconfig @@ -81,7 +81,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NFS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_FILE_APPS=y diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/netnsh64_smp/defconfig b/boards/risc-v/qemu-rv/rv-virt/configs/netnsh64_smp/defconfig index bc6c971222073..e553a5df7f828 100644 --- a/boards/risc-v/qemu-rv/rv-virt/configs/netnsh64_smp/defconfig +++ b/boards/risc-v/qemu-rv/rv-virt/configs/netnsh64_smp/defconfig @@ -82,7 +82,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NFS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_FILE_APPS=y diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/netnsh_smp/defconfig b/boards/risc-v/qemu-rv/rv-virt/configs/netnsh_smp/defconfig index d61f3ceebb8ff..bfc085dd90b26 100644 --- a/boards/risc-v/qemu-rv/rv-virt/configs/netnsh_smp/defconfig +++ b/boards/risc-v/qemu-rv/rv-virt/configs/netnsh_smp/defconfig @@ -82,7 +82,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NFS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_FILE_APPS=y diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/nsbi/defconfig b/boards/risc-v/qemu-rv/rv-virt/configs/nsbi/defconfig index 00d8a2faac495..2f006a15a08dc 100644 --- a/boards/risc-v/qemu-rv/rv-virt/configs/nsbi/defconfig +++ b/boards/risc-v/qemu-rv/rv-virt/configs/nsbi/defconfig @@ -69,7 +69,6 @@ CONFIG_LIBC_STRERROR=y CONFIG_LIBM=y CONFIG_MM_PGALLOC=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/nsbi64/defconfig b/boards/risc-v/qemu-rv/rv-virt/configs/nsbi64/defconfig index 66702a0cd2b37..7a8a6ff39b8ea 100644 --- a/boards/risc-v/qemu-rv/rv-virt/configs/nsbi64/defconfig +++ b/boards/risc-v/qemu-rv/rv-virt/configs/nsbi64/defconfig @@ -69,7 +69,6 @@ CONFIG_LIBC_STRERROR=y CONFIG_LIBM=y CONFIG_MM_PGALLOC=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/nsh/defconfig b/boards/risc-v/qemu-rv/rv-virt/configs/nsh/defconfig index 2491f5a0fe6ff..546dc6fa3ec89 100644 --- a/boards/risc-v/qemu-rv/rv-virt/configs/nsh/defconfig +++ b/boards/risc-v/qemu-rv/rv-virt/configs/nsh/defconfig @@ -44,7 +44,6 @@ CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_LIBM=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/nsh64/defconfig b/boards/risc-v/qemu-rv/rv-virt/configs/nsh64/defconfig index f8bf9c5a5c82c..cf9364106bec5 100644 --- a/boards/risc-v/qemu-rv/rv-virt/configs/nsh64/defconfig +++ b/boards/risc-v/qemu-rv/rv-virt/configs/nsh64/defconfig @@ -47,7 +47,6 @@ CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_LIBM=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/pnsh/defconfig b/boards/risc-v/qemu-rv/rv-virt/configs/pnsh/defconfig index 88281a037a96a..c2b559e05b231 100644 --- a/boards/risc-v/qemu-rv/rv-virt/configs/pnsh/defconfig +++ b/boards/risc-v/qemu-rv/rv-virt/configs/pnsh/defconfig @@ -49,7 +49,6 @@ CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_LIBM=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/pnsh64/defconfig b/boards/risc-v/qemu-rv/rv-virt/configs/pnsh64/defconfig index 0b8ccae896116..353070577c61d 100644 --- a/boards/risc-v/qemu-rv/rv-virt/configs/pnsh64/defconfig +++ b/boards/risc-v/qemu-rv/rv-virt/configs/pnsh64/defconfig @@ -48,7 +48,6 @@ CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_LIBM=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/python/defconfig b/boards/risc-v/qemu-rv/rv-virt/configs/python/defconfig index 703c0d7c02e2c..4a467c3eab5cf 100644 --- a/boards/risc-v/qemu-rv/rv-virt/configs/python/defconfig +++ b/boards/risc-v/qemu-rv/rv-virt/configs/python/defconfig @@ -100,7 +100,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y CONFIG_NFS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_FILE_APPS=y diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/smp/defconfig b/boards/risc-v/qemu-rv/rv-virt/configs/smp/defconfig index 00c13282e896c..73534db452c77 100644 --- a/boards/risc-v/qemu-rv/rv-virt/configs/smp/defconfig +++ b/boards/risc-v/qemu-rv/rv-virt/configs/smp/defconfig @@ -62,7 +62,6 @@ CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_LIBM_TOOLCHAIN=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=64 CONFIG_RAM_SIZE=33554432 diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/smp64/defconfig b/boards/risc-v/qemu-rv/rv-virt/configs/smp64/defconfig index 13fa9bf746e0b..a199b282b2128 100644 --- a/boards/risc-v/qemu-rv/rv-virt/configs/smp64/defconfig +++ b/boards/risc-v/qemu-rv/rv-virt/configs/smp64/defconfig @@ -64,7 +64,6 @@ CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_LIBM_TOOLCHAIN=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=64 CONFIG_RAM_SIZE=33554432 diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/virt_nsh/defconfig b/boards/risc-v/qemu-rv/rv-virt/configs/virt_nsh/defconfig index e3c5a3a9b978d..3b8f77a9bfcff 100644 --- a/boards/risc-v/qemu-rv/rv-virt/configs/virt_nsh/defconfig +++ b/boards/risc-v/qemu-rv/rv-virt/configs/virt_nsh/defconfig @@ -43,7 +43,6 @@ CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_LIBM=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/qemu-rv/rv-virt/src/CMakeLists.txt b/boards/risc-v/qemu-rv/rv-virt/src/CMakeLists.txt index d17da82ab568a..810656072b941 100644 --- a/boards/risc-v/qemu-rv/rv-virt/src/CMakeLists.txt +++ b/boards/risc-v/qemu-rv/rv-virt/src/CMakeLists.txt @@ -20,7 +20,7 @@ # # ############################################################################## -set(SRCS qemu_rv_appinit.c) +set(SRCS qemu_rv_boardinit.c) if(CONFIG_ARCH_LEDS) list(APPEND SRCS qemu_rv_autoleds.c) diff --git a/boards/risc-v/qemu-rv/rv-virt/src/Makefile b/boards/risc-v/qemu-rv/rv-virt/src/Makefile index 7b350759335e1..bf19bc2c40b90 100644 --- a/boards/risc-v/qemu-rv/rv-virt/src/Makefile +++ b/boards/risc-v/qemu-rv/rv-virt/src/Makefile @@ -24,7 +24,7 @@ include $(TOPDIR)/Make.defs RCSRCS = etc/init.d/rc.sysinit etc/init.d/rcS -CSRCS = qemu_rv_appinit.c +CSRCS = qemu_rv_boardinit.c ifeq ($(CONFIG_BUILD_KERNEL),y) ifeq ($(CONFIG_RISCV_SEMIHOSTING_HOSTFS),) diff --git a/boards/risc-v/qemu-rv/rv-virt/src/qemu_rv_appinit.c b/boards/risc-v/qemu-rv/rv-virt/src/qemu_rv_boardinit.c similarity index 76% rename from boards/risc-v/qemu-rv/rv-virt/src/qemu_rv_appinit.c rename to boards/risc-v/qemu-rv/rv-virt/src/qemu_rv_boardinit.c index bcd9c8eb81fd7..584bd74ec394c 100644 --- a/boards/risc-v/qemu-rv/rv-virt/src/qemu_rv_appinit.c +++ b/boards/risc-v/qemu-rv/rv-virt/src/qemu_rv_boardinit.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/risc-v/qemu-rv/rv-virt/src/qemu_rv_appinit.c + * boards/risc-v/qemu-rv/rv-virt/src/qemu_rv_boardinit.c * * SPDX-License-Identifier: Apache-2.0 * @@ -92,74 +92,6 @@ static void qemu_virtio_register_mmio_devices(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 */ - -#ifdef CONFIG_NSH_ARCHINIT - -#ifdef CONFIG_FS_PROCFS - mount(NULL, "/proc", "procfs", 0, NULL); -#endif - -#ifdef CONFIG_FS_TMPFS - mount(NULL, CONFIG_LIBC_TMPDIR, "tmpfs", 0, NULL); -#endif - -#endif - -#ifdef CONFIG_DRIVERS_VIRTIO_MMIO -#ifndef CONFIG_BOARD_EARLY_INITIALIZE - qemu_virtio_register_mmio_devices(); -#endif -#endif - -#ifdef CONFIG_RPTUN - qemu_rptun_init(); -#endif - -#ifdef CONFIG_USERLED - /* Register the LED driver */ - - int ret = userled_lower_initialize("/dev/userleds"); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: userled_lower_initialize() failed: %d\n", ret); - } -#endif - - return OK; -#endif -} - /**************************************************************************** * Name: board_late_initialize * @@ -198,10 +130,22 @@ void board_late_initialize(void) } #endif /* CONFIG_BUILD_KERNEL && !CONFIG_RISCV_SEMIHOSTING_HOSTFS */ -#ifdef CONFIG_NSH_ARCHINIT - +#ifdef CONFIG_FS_PROCFS mount(NULL, "/proc", "procfs", 0, NULL); +#endif + +#ifdef CONFIG_FS_TMPFS + mount(NULL, CONFIG_LIBC_TMPDIR, "tmpfs", 0, NULL); +#endif +#ifdef CONFIG_DRIVERS_VIRTIO_MMIO +#ifndef CONFIG_BOARD_EARLY_INITIALIZE + qemu_virtio_register_mmio_devices(); +#endif +#endif + +#ifdef CONFIG_RPTUN + qemu_rptun_init(); #endif #ifdef CONFIG_USERLED diff --git a/boards/risc-v/rp23xx-rv/common/src/rp23xx_usbmsc.c b/boards/risc-v/rp23xx-rv/common/src/rp23xx_usbmsc.c index c27607d82a859..fdd952da765ab 100644 --- a/boards/risc-v/rp23xx-rv/common/src/rp23xx_usbmsc.c +++ b/boards/risc-v/rp23xx-rv/common/src/rp23xx_usbmsc.c @@ -52,8 +52,7 @@ int board_usbmsc_initialize(int port) { /* If system/usbmsc is built as an NSH command, then SD slot should - * already have been initialized in board_app_initialize() - * (see stm32_appinit.c). + * already have been initialized. * In this case, there is nothing further to be done here. */ diff --git a/boards/risc-v/rp23xx-rv/raspberrypi-pico-2-rv/configs/nsh/defconfig b/boards/risc-v/rp23xx-rv/raspberrypi-pico-2-rv/configs/nsh/defconfig index b0cf499ecb866..9641d87ecc3fc 100644 --- a/boards/risc-v/rp23xx-rv/raspberrypi-pico-2-rv/configs/nsh/defconfig +++ b/boards/risc-v/rp23xx-rv/raspberrypi-pico-2-rv/configs/nsh/defconfig @@ -33,7 +33,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=4096 CONFIG_IRQ_WORK_STACKSIZE=4096 CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_RAM_SIZE=532480 diff --git a/boards/risc-v/rp23xx-rv/raspberrypi-pico-2-rv/configs/usbnsh/defconfig b/boards/risc-v/rp23xx-rv/raspberrypi-pico-2-rv/configs/usbnsh/defconfig index f5f1f32b36511..4aaadfbbc4b13 100644 --- a/boards/risc-v/rp23xx-rv/raspberrypi-pico-2-rv/configs/usbnsh/defconfig +++ b/boards/risc-v/rp23xx-rv/raspberrypi-pico-2-rv/configs/usbnsh/defconfig @@ -35,7 +35,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=4096 CONFIG_IRQ_WORK_STACKSIZE=4096 CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_NSH_USBCONSOLE=y diff --git a/boards/risc-v/rp23xx-rv/raspberrypi-pico-2-rv/src/CMakeLists.txt b/boards/risc-v/rp23xx-rv/raspberrypi-pico-2-rv/src/CMakeLists.txt index d61f0c7e85ffc..0f3a8dd784dba 100644 --- a/boards/risc-v/rp23xx-rv/raspberrypi-pico-2-rv/src/CMakeLists.txt +++ b/boards/risc-v/rp23xx-rv/raspberrypi-pico-2-rv/src/CMakeLists.txt @@ -34,10 +34,6 @@ if(CONFIG_ARCH_BUTTONS) list(APPEND SRCS rp23xx_buttons.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS rp23xx_appinit.c) -endif() - target_sources(board PRIVATE ${SRCS}) if(CONFIG_BOOT_RUNFROMFLASH) diff --git a/boards/risc-v/rp23xx-rv/raspberrypi-pico-2-rv/src/Make.defs b/boards/risc-v/rp23xx-rv/raspberrypi-pico-2-rv/src/Make.defs index 54506c702c639..6c59b1f181804 100644 --- a/boards/risc-v/rp23xx-rv/raspberrypi-pico-2-rv/src/Make.defs +++ b/boards/risc-v/rp23xx-rv/raspberrypi-pico-2-rv/src/Make.defs @@ -21,7 +21,6 @@ include $(TOPDIR)/Make.defs CSRCS = rp23xx_boardinitialize.c -CSRCS += rp23xx_appinit.c CSRCS += rp23xx_bringup.c ifeq ($(CONFIG_DEV_GPIO),y) diff --git a/boards/risc-v/rp23xx-rv/raspberrypi-pico-2-rv/src/rp23xx_appinit.c b/boards/risc-v/rp23xx-rv/raspberrypi-pico-2-rv/src/rp23xx_appinit.c deleted file mode 100644 index 43ebdf5e8eac0..0000000000000 --- a/boards/risc-v/rp23xx-rv/raspberrypi-pico-2-rv/src/rp23xx_appinit.c +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** - * boards/risc-v/rp23xx-rv/raspberrypi-pico-2-rv/src/rp23xx_appinit.c - * - * 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 - -#include -#include - -#include "rp23xx_pico.h" - -/**************************************************************************** - * 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 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 rp23xx_bringup(); -#endif -} diff --git a/boards/risc-v/rp23xx-rv/raspberrypi-pico-2-rv/src/rp23xx_boardinitialize.c b/boards/risc-v/rp23xx-rv/raspberrypi-pico-2-rv/src/rp23xx_boardinitialize.c index c91cd6d645187..00c2ebf0f1779 100644 --- a/boards/risc-v/rp23xx-rv/raspberrypi-pico-2-rv/src/rp23xx_boardinitialize.c +++ b/boards/risc-v/rp23xx-rv/raspberrypi-pico-2-rv/src/rp23xx_boardinitialize.c @@ -29,6 +29,7 @@ #include #include +#include "rp23xx_pico.h" #include "rp23xx_gpio.h" #ifdef CONFIG_RP23XX_RV_PSRAM @@ -92,3 +93,30 @@ void rp23xx_boardinitialize(void) /* --- Place any board specific initialization here --- */ } + +/**************************************************************************** + * 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) +{ + rp23xx_bringup(); +} +#endif diff --git a/boards/risc-v/rv32m1/rv32m1-vega/configs/buttons/defconfig b/boards/risc-v/rv32m1/rv32m1-vega/configs/buttons/defconfig index bc74875697323..c73260d5644ac 100644 --- a/boards/risc-v/rv32m1/rv32m1-vega/configs/buttons/defconfig +++ b/boards/risc-v/rv32m1/rv32m1-vega/configs/buttons/defconfig @@ -58,7 +58,6 @@ CONFIG_LIBC_STRERROR=y CONFIG_LIBM_TOOLCHAIN=y CONFIG_LPUART0_SERIAL_CONSOLE=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=64 CONFIG_NSH_STRERROR=y diff --git a/boards/risc-v/rv32m1/rv32m1-vega/configs/nsh-itcm/defconfig b/boards/risc-v/rv32m1/rv32m1-vega/configs/nsh-itcm/defconfig index 8eb6c90c07678..eb78511444ba2 100644 --- a/boards/risc-v/rv32m1/rv32m1-vega/configs/nsh-itcm/defconfig +++ b/boards/risc-v/rv32m1/rv32m1-vega/configs/nsh-itcm/defconfig @@ -45,7 +45,6 @@ CONFIG_LIBC_STRERROR=y CONFIG_LIBM_TOOLCHAIN=y CONFIG_LPUART0_SERIAL_CONSOLE=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=64 CONFIG_NSH_STRERROR=y diff --git a/boards/risc-v/rv32m1/rv32m1-vega/configs/nsh/defconfig b/boards/risc-v/rv32m1/rv32m1-vega/configs/nsh/defconfig index a79c05393139c..2c7ac0a86077a 100644 --- a/boards/risc-v/rv32m1/rv32m1-vega/configs/nsh/defconfig +++ b/boards/risc-v/rv32m1/rv32m1-vega/configs/nsh/defconfig @@ -45,7 +45,6 @@ CONFIG_LIBC_STRERROR=y CONFIG_LIBM_TOOLCHAIN=y CONFIG_LPUART0_SERIAL_CONSOLE=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=64 CONFIG_NSH_STRERROR=y diff --git a/boards/risc-v/rv32m1/rv32m1-vega/src/Makefile b/boards/risc-v/rv32m1/rv32m1-vega/src/Makefile index fd3de5139c3fa..f706c52d52aba 100644 --- a/boards/risc-v/rv32m1/rv32m1-vega/src/Makefile +++ b/boards/risc-v/rv32m1/rv32m1-vega/src/Makefile @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = rv32m1_bringup.c rv32m1_boot.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += rv32m1_appinit.c -endif - ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += rv32m1_autoleds.c endif diff --git a/boards/risc-v/rv32m1/rv32m1-vega/src/rv32m1_appinit.c b/boards/risc-v/rv32m1/rv32m1-vega/src/rv32m1_appinit.c deleted file mode 100644 index a44a188dca52b..0000000000000 --- a/boards/risc-v/rv32m1/rv32m1-vega/src/rv32m1_appinit.c +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** - * boards/risc-v/rv32m1/rv32m1-vega/src/rv32m1_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 - -#include -#include -#include -#include - -#include - -#include "rv32m1.h" -#include "rv32m1-vega.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 rv32m1_bringup(); -#endif -} diff --git a/boards/risc-v/rv32m1/rv32m1-vega/src/rv32m1_boot.c b/boards/risc-v/rv32m1/rv32m1-vega/src/rv32m1_boot.c index 21a25e2b9d8f7..3da1edc71a59e 100644 --- a/boards/risc-v/rv32m1/rv32m1-vega/src/rv32m1_boot.c +++ b/boards/risc-v/rv32m1/rv32m1-vega/src/rv32m1_boot.c @@ -31,6 +31,8 @@ #include #include +#include "rv32m1-vega.h" + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -62,3 +64,30 @@ void rv32m1_boardinitialize(void) board_autoled_initialize(); #endif } + +/**************************************************************************** + * 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) +{ + rv32m1_bringup(); +} +#endif diff --git a/boards/risc-v/sg2000/milkv_duos/configs/nsh/defconfig b/boards/risc-v/sg2000/milkv_duos/configs/nsh/defconfig index d5f2f1dfb0f9f..ce1d455220411 100644 --- a/boards/risc-v/sg2000/milkv_duos/configs/nsh/defconfig +++ b/boards/risc-v/sg2000/milkv_duos/configs/nsh/defconfig @@ -40,7 +40,6 @@ CONFIG_ARCH_USE_MMU=y CONFIG_ARCH_USE_MPU=y CONFIG_ARCH_USE_S_MODE=y CONFIG_BOARDCTL_ROMDISK=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=1120 CONFIG_BUILD_KERNEL=y CONFIG_DEBUG_ASSERTIONS=y @@ -67,7 +66,6 @@ CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_MM_PGALLOC=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/risc-v/sg2000/milkv_duos/src/Makefile b/boards/risc-v/sg2000/milkv_duos/src/Makefile index 9103b16b8619a..9c82dcc629a29 100644 --- a/boards/risc-v/sg2000/milkv_duos/src/Makefile +++ b/boards/risc-v/sg2000/milkv_duos/src/Makefile @@ -24,6 +24,6 @@ include $(TOPDIR)/Make.defs RCSRCS = etc/init.d/rc.sysinit etc/init.d/rcS -CSRCS = sg2000_appinit.c +CSRCS = sg2000_boardinit.c include $(TOPDIR)/boards/Board.mk diff --git a/boards/risc-v/sg2000/milkv_duos/src/sg2000_appinit.c b/boards/risc-v/sg2000/milkv_duos/src/sg2000_boardinit.c similarity index 74% rename from boards/risc-v/sg2000/milkv_duos/src/sg2000_appinit.c rename to boards/risc-v/sg2000/milkv_duos/src/sg2000_boardinit.c index 5d4419402180b..da43ffd991a38 100644 --- a/boards/risc-v/sg2000/milkv_duos/src/sg2000_appinit.c +++ b/boards/risc-v/sg2000/milkv_duos/src/sg2000_boardinit.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/risc-v/sg2000/milkv_duos/src/sg2000_appinit.c + * boards/risc-v/sg2000/milkv_duos/src/sg2000_boardinit.c * * SPDX-License-Identifier: Apache-2.0 * @@ -92,48 +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 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 */ - -#ifdef CONFIG_NSH_ARCHINIT - - mount(NULL, "/proc", "procfs", 0, NULL); - -#endif - - return OK; -#endif -} - /**************************************************************************** * Name: board_late_initialize * @@ -153,6 +111,7 @@ int board_app_initialize(uintptr_t arg) * ****************************************************************************/ +#ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { /* Mount the RAM Disk */ @@ -161,9 +120,6 @@ void board_late_initialize(void) /* Perform board-specific initialization */ -#ifdef CONFIG_NSH_ARCHINIT - mount(NULL, "/proc", "procfs", 0, NULL); - -#endif } +#endif diff --git a/boards/sim/sim/sim/configs/adb/defconfig b/boards/sim/sim/sim/configs/adb/defconfig index 28bdb43e18780..9f3e4add2aa72 100644 --- a/boards/sim/sim/sim/configs/adb/defconfig +++ b/boards/sim/sim/sim/configs/adb/defconfig @@ -38,7 +38,6 @@ CONFIG_NET_USRSOCK_CUSTOM=y CONFIG_NET_USRSOCK_ICMP=y CONFIG_NET_USRSOCK_TCP=y CONFIG_NET_USRSOCK_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_CONSOLE_LOGIN=y CONFIG_NSH_READLINE=y diff --git a/boards/sim/sim/sim/configs/alsa/defconfig b/boards/sim/sim/sim/configs/alsa/defconfig index f7fb21582bc6f..5c579b333e258 100644 --- a/boards/sim/sim/sim/configs/alsa/defconfig +++ b/boards/sim/sim/sim/configs/alsa/defconfig @@ -39,7 +39,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LIBC_ENVPATH=y CONFIG_LIBC_EXECFUNCS=y CONFIG_LIBC_MAX_EXITFUNS=1 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/sim/sim/sim/configs/asan/defconfig b/boards/sim/sim/sim/configs/asan/defconfig index 03927d542ce78..87163824e260e 100644 --- a/boards/sim/sim/sim/configs/asan/defconfig +++ b/boards/sim/sim/sim/configs/asan/defconfig @@ -26,7 +26,6 @@ CONFIG_INIT_ARGS="\"-c\", \"ostest;poweroff\"" CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LIBC_MAX_EXITFUNS=1 CONFIG_MM_UMM_CUSTOMIZE_MANAGER=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_PTHREAD_MUTEX_TYPES=y diff --git a/boards/sim/sim/sim/configs/bas/defconfig b/boards/sim/sim/sim/configs/bas/defconfig index 657eb8b0d9c39..dfd03e179f477 100644 --- a/boards/sim/sim/sim/configs/bas/defconfig +++ b/boards/sim/sim/sim/configs/bas/defconfig @@ -30,7 +30,6 @@ CONFIG_LIBC_ENVPATH=y CONFIG_LIBC_EXECFUNCS=y CONFIG_LIBC_MAX_EXITFUNS=1 CONFIG_LIBM=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/sim/sim/sim/configs/bastest/defconfig b/boards/sim/sim/sim/configs/bastest/defconfig index ea7d4a271ff52..940cacb8396d7 100644 --- a/boards/sim/sim/sim/configs/bastest/defconfig +++ b/boards/sim/sim/sim/configs/bastest/defconfig @@ -42,7 +42,6 @@ CONFIG_LIBC_EXECFUNCS=y CONFIG_LIBC_MAX_EXITFUNS=1 CONFIG_LIBC_STRERROR=y CONFIG_LIBM=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_CONSOLE_LOGIN=y CONFIG_NSH_FILE_APPS=y diff --git a/boards/sim/sim/sim/configs/bluetooth/defconfig b/boards/sim/sim/sim/configs/bluetooth/defconfig index 27c814af69430..ee833a5d1804f 100644 --- a/boards/sim/sim/sim/configs/bluetooth/defconfig +++ b/boards/sim/sim/sim/configs/bluetooth/defconfig @@ -48,7 +48,6 @@ CONFIG_NETDEV_WIRELESS_IOCTL=y CONFIG_NETINIT_NETLOCAL=y CONFIG_NET_BLUETOOTH=y CONFIG_NET_STATISTICS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/sim/sim/sim/configs/bthcisock/defconfig b/boards/sim/sim/sim/configs/bthcisock/defconfig index c8e0b55955fcd..d691d28a0fe53 100644 --- a/boards/sim/sim/sim/configs/bthcisock/defconfig +++ b/boards/sim/sim/sim/configs/bthcisock/defconfig @@ -49,7 +49,6 @@ CONFIG_NETDEV_WIRELESS_IOCTL=y CONFIG_NETINIT_NETLOCAL=y CONFIG_NET_BLUETOOTH=y CONFIG_NET_STATISTICS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/sim/sim/sim/configs/btuart/defconfig b/boards/sim/sim/sim/configs/btuart/defconfig index 94e4e0a063286..d99ae5f48e93b 100644 --- a/boards/sim/sim/sim/configs/btuart/defconfig +++ b/boards/sim/sim/sim/configs/btuart/defconfig @@ -21,7 +21,6 @@ CONFIG_ETC_ROMFS=y CONFIG_FS_PROCFS=y CONFIG_FS_ROMFS=y CONFIG_INIT_ENTRYPOINT="nsh_main" -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_SCHED_HAVE_PARENT=y diff --git a/boards/sim/sim/sim/configs/can/defconfig b/boards/sim/sim/sim/configs/can/defconfig index 670ffe5b95968..ab194989c83fd 100644 --- a/boards/sim/sim/sim/configs/can/defconfig +++ b/boards/sim/sim/sim/configs/can/defconfig @@ -34,7 +34,6 @@ CONFIG_NET_CAN=y CONFIG_NET_CAN_ERRORS=y CONFIG_NET_CAN_EXTID=y CONFIG_NET_CAN_SOCK_OPTS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_PS=y CONFIG_NSH_READLINE=y diff --git a/boards/sim/sim/sim/configs/citest/defconfig b/boards/sim/sim/sim/configs/citest/defconfig index 3de935a4d9d9a..168ba984984fc 100644 --- a/boards/sim/sim/sim/configs/citest/defconfig +++ b/boards/sim/sim/sim/configs/citest/defconfig @@ -97,7 +97,6 @@ CONFIG_NETDEV_IFINDEX=y CONFIG_NETDEV_LATEINIT=y CONFIG_NET_LOCAL=y CONFIG_NET_USRSOCK=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_DATE=y CONFIG_NSH_DISABLE_TIMEDATECTL=y diff --git a/boards/sim/sim/sim/configs/duktape/defconfig b/boards/sim/sim/sim/configs/duktape/defconfig index 2fbb4bcc2b6b7..e9e2a0bd01ea5 100644 --- a/boards/sim/sim/sim/configs/duktape/defconfig +++ b/boards/sim/sim/sim/configs/duktape/defconfig @@ -38,7 +38,6 @@ CONFIG_LIBC_ENVPATH=y CONFIG_LIBC_EXECFUNCS=y CONFIG_LIBC_MAX_EXITFUNS=1 CONFIG_LIBM=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_CONSOLE_LOGIN=y CONFIG_NSH_FILE_APPS=y diff --git a/boards/sim/sim/sim/configs/dynconns/defconfig b/boards/sim/sim/sim/configs/dynconns/defconfig index 51f7fbeda04f4..34223b6c914c8 100644 --- a/boards/sim/sim/sim/configs/dynconns/defconfig +++ b/boards/sim/sim/sim/configs/dynconns/defconfig @@ -108,7 +108,6 @@ CONFIG_NET_UDP_ALLOC_CONNS=1 CONFIG_NET_UDP_WRITE_BUFFERS=y CONFIG_NET_USRSOCK=y CONFIG_NET_USRSOCK_ALLOC_CONNS=1 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_READLINE_TABCOMPLETION=y diff --git a/boards/sim/sim/sim/configs/elf/defconfig b/boards/sim/sim/sim/configs/elf/defconfig index e4bfeabdd902e..bcec7bf16db41 100644 --- a/boards/sim/sim/sim/configs/elf/defconfig +++ b/boards/sim/sim/sim/configs/elf/defconfig @@ -38,7 +38,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LIBC_ENVPATH=y CONFIG_LIBC_MAX_EXITFUNS=1 CONFIG_LIBC_STRERROR=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILE_APPS=y CONFIG_NSH_MOTD=y diff --git a/boards/sim/sim/sim/configs/fb/defconfig b/boards/sim/sim/sim/configs/fb/defconfig index 7a7f93db9993f..84ca617026b21 100644 --- a/boards/sim/sim/sim/configs/fb/defconfig +++ b/boards/sim/sim/sim/configs/fb/defconfig @@ -10,7 +10,6 @@ CONFIG_ARCH_BOARD="sim" CONFIG_ARCH_BOARD_SIM=y CONFIG_ARCH_CHIP="sim" CONFIG_ARCH_SIM=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_DEBUG_SYMBOLS=y CONFIG_DISABLE_ENVIRON=y CONFIG_DISABLE_MOUNTPOINT=y diff --git a/boards/sim/sim/sim/configs/foc/defconfig b/boards/sim/sim/sim/configs/foc/defconfig index 128f384213fc1..97eee196dcbd8 100644 --- a/boards/sim/sim/sim/configs/foc/defconfig +++ b/boards/sim/sim/sim/configs/foc/defconfig @@ -77,7 +77,6 @@ CONFIG_MOTOR=y CONFIG_MOTOR_FOC=y CONFIG_MOTOR_FOC_DUMMY=y CONFIG_MOTOR_FOC_INST=4 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILE_APPS=y CONFIG_NSH_MOTD=y diff --git a/boards/sim/sim/sim/configs/ipforward/defconfig b/boards/sim/sim/sim/configs/ipforward/defconfig index ca7dca918e2fb..459451ebd545e 100644 --- a/boards/sim/sim/sim/configs/ipforward/defconfig +++ b/boards/sim/sim/sim/configs/ipforward/defconfig @@ -47,7 +47,6 @@ CONFIG_NET_SOCKOPTS=y CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_TUN=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/sim/sim/sim/configs/libcxxtest/defconfig b/boards/sim/sim/sim/configs/libcxxtest/defconfig index 86df52f1db1f1..b343cdd2ff5a7 100644 --- a/boards/sim/sim/sim/configs/libcxxtest/defconfig +++ b/boards/sim/sim/sim/configs/libcxxtest/defconfig @@ -71,7 +71,6 @@ CONFIG_NET_TCP_NOTIFIER=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_NOTIFIER=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_PATH_INITIAL="/bin" diff --git a/boards/sim/sim/sim/configs/linuxi2c/defconfig b/boards/sim/sim/sim/configs/linuxi2c/defconfig index 655e453fa44e8..6f37387569fa6 100644 --- a/boards/sim/sim/sim/configs/linuxi2c/defconfig +++ b/boards/sim/sim/sim/configs/linuxi2c/defconfig @@ -24,7 +24,6 @@ CONFIG_IDLETHREAD_STACKSIZE=4096 CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LIBC_EXECFUNCS=y CONFIG_LIBC_MAX_EXITFUNS=1 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_READLINE_TABCOMPLETION=y diff --git a/boards/sim/sim/sim/configs/loadable/defconfig b/boards/sim/sim/sim/configs/loadable/defconfig index e071c0ba5075a..d0da2b6eb154d 100644 --- a/boards/sim/sim/sim/configs/loadable/defconfig +++ b/boards/sim/sim/sim/configs/loadable/defconfig @@ -12,7 +12,6 @@ CONFIG_ARCH_CHIP="sim" CONFIG_ARCH_SIM=y CONFIG_BOARDCTL_APP_SYMTAB=y CONFIG_BOARDCTL_POWEROFF=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BUILTIN=y CONFIG_DEBUG_FEATURES=y CONFIG_DEBUG_SYMBOLS=y @@ -37,7 +36,6 @@ CONFIG_LIBC_ENVPATH=y CONFIG_LIBC_EXECFUNCS=y CONFIG_LIBC_MAX_EXITFUNS=1 CONFIG_LINE_MAX=128 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y @@ -49,4 +47,4 @@ CONFIG_SCHED_WAITPID=y CONFIG_SIM_HOSTFS=y CONFIG_START_MONTH=6 CONFIG_START_YEAR=2008 -CONFIG_SYSTEM_NSH=m +CONFIG_SYSTEM_NSH=y diff --git a/boards/sim/sim/sim/configs/login/defconfig b/boards/sim/sim/sim/configs/login/defconfig index 77883e7617dc3..fc1213045e4c5 100644 --- a/boards/sim/sim/sim/configs/login/defconfig +++ b/boards/sim/sim/sim/configs/login/defconfig @@ -46,7 +46,6 @@ CONFIG_LIBC_LOCALE_CATALOG=y CONFIG_LIBC_LOCALE_GETTEXT=y CONFIG_LIBC_MAX_EXITFUNS=1 CONFIG_LIBC_NUMBERED_ARGS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_CONSOLE_LOGIN=y CONFIG_NSH_FILE_APPS=y diff --git a/boards/sim/sim/sim/configs/lua/defconfig b/boards/sim/sim/sim/configs/lua/defconfig index a9f924a8ab33e..20571ae2c6039 100644 --- a/boards/sim/sim/sim/configs/lua/defconfig +++ b/boards/sim/sim/sim/configs/lua/defconfig @@ -53,7 +53,6 @@ CONFIG_NETDEV_IFINDEX=y CONFIG_NET_SOCKOPTS=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/sim/sim/sim/configs/matter/defconfig b/boards/sim/sim/sim/configs/matter/defconfig index 1ff1864352951..6af80c8d20958 100644 --- a/boards/sim/sim/sim/configs/matter/defconfig +++ b/boards/sim/sim/sim/configs/matter/defconfig @@ -93,7 +93,6 @@ CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_NOTIFIER=y CONFIG_NET_UDP_WRITE_BUFFERS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILE_APPS=y CONFIG_NSH_MOTD=y diff --git a/boards/sim/sim/sim/configs/minibasic/defconfig b/boards/sim/sim/sim/configs/minibasic/defconfig index 00f1e712c3d2b..0bdacd42e569c 100644 --- a/boards/sim/sim/sim/configs/minibasic/defconfig +++ b/boards/sim/sim/sim/configs/minibasic/defconfig @@ -36,7 +36,6 @@ CONFIG_LIBC_ENVPATH=y CONFIG_LIBC_EXECFUNCS=y CONFIG_LIBC_MAX_EXITFUNS=1 CONFIG_LIBM=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/sim/sim/sim/configs/minmea/defconfig b/boards/sim/sim/sim/configs/minmea/defconfig index 3310da1e4e17b..10664d38e3d52 100644 --- a/boards/sim/sim/sim/configs/minmea/defconfig +++ b/boards/sim/sim/sim/configs/minmea/defconfig @@ -47,7 +47,6 @@ CONFIG_LIBC_LOCALE_CATALOG=y CONFIG_LIBC_LOCALE_GETTEXT=y CONFIG_LIBC_MAX_EXITFUNS=1 CONFIG_LIBC_NUMBERED_ARGS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_CONSOLE_LOGIN=y CONFIG_NSH_FILE_APPS=y diff --git a/boards/sim/sim/sim/configs/mnemofs/defconfig b/boards/sim/sim/sim/configs/mnemofs/defconfig index 7894f88cfbbd5..1743d0b688afe 100644 --- a/boards/sim/sim/sim/configs/mnemofs/defconfig +++ b/boards/sim/sim/sim/configs/mnemofs/defconfig @@ -56,7 +56,6 @@ CONFIG_MTD_NAND_RAM_DEBUG=y CONFIG_MTD_NAND_RAM_STATUS=5 CONFIG_MTD_NAND_WRAPPER=y CONFIG_MTD_NAND_WRAPPER_DEBUG_LEVEL=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_CONSOLE_LOGIN=y CONFIG_NSH_FILE_APPS=y diff --git a/boards/sim/sim/sim/configs/module/defconfig b/boards/sim/sim/sim/configs/module/defconfig index 89790e3c8044d..04416d40d2498 100644 --- a/boards/sim/sim/sim/configs/module/defconfig +++ b/boards/sim/sim/sim/configs/module/defconfig @@ -55,7 +55,6 @@ CONFIG_NET_TCP_NOTIFIER=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_NOTIFIER=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_READLINE_TABCOMPLETION=y diff --git a/boards/sim/sim/sim/configs/module32/defconfig b/boards/sim/sim/sim/configs/module32/defconfig index 0e500970e1ba2..2a7f78f84de85 100644 --- a/boards/sim/sim/sim/configs/module32/defconfig +++ b/boards/sim/sim/sim/configs/module32/defconfig @@ -53,7 +53,6 @@ CONFIG_NET_TCP_NOTIFIER=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_NOTIFIER=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_READLINE_TABCOMPLETION=y diff --git a/boards/sim/sim/sim/configs/nand/defconfig b/boards/sim/sim/sim/configs/nand/defconfig index e03700a517dcf..90225d3b6393d 100644 --- a/boards/sim/sim/sim/configs/nand/defconfig +++ b/boards/sim/sim/sim/configs/nand/defconfig @@ -55,7 +55,6 @@ CONFIG_MTD_NAND_RAM_DEBUG=y CONFIG_MTD_NAND_RAM_STATUS=5 CONFIG_MTD_NAND_WRAPPER=y CONFIG_MTD_NAND_WRAPPER_DEBUG_LEVEL=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_CONSOLE_LOGIN=y CONFIG_NSH_FILE_APPS=y diff --git a/boards/sim/sim/sim/configs/nimble/defconfig b/boards/sim/sim/sim/configs/nimble/defconfig index a678de27d62f9..8ba91fe9567e2 100644 --- a/boards/sim/sim/sim/configs/nimble/defconfig +++ b/boards/sim/sim/sim/configs/nimble/defconfig @@ -54,7 +54,6 @@ CONFIG_NET_BLUETOOTH=y CONFIG_NET_STATISTICS=y CONFIG_NIMBLE=y CONFIG_NIMBLE_ROLE_PERIPHERAL=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/sim/sim/sim/configs/note/defconfig b/boards/sim/sim/sim/configs/note/defconfig index 2a8423683b5e9..59a4d0e7094ff 100644 --- a/boards/sim/sim/sim/configs/note/defconfig +++ b/boards/sim/sim/sim/configs/note/defconfig @@ -26,7 +26,6 @@ CONFIG_FS_BINFS=y CONFIG_FS_PROCFS=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LIBC_MAX_EXITFUNS=1 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_READLINE_TABCOMPLETION=y diff --git a/boards/sim/sim/sim/configs/nsh/defconfig b/boards/sim/sim/sim/configs/nsh/defconfig index 8517209444075..c44d9f32031dd 100644 --- a/boards/sim/sim/sim/configs/nsh/defconfig +++ b/boards/sim/sim/sim/configs/nsh/defconfig @@ -51,7 +51,6 @@ CONFIG_LIBC_LOCALE_GETTEXT=y CONFIG_LIBC_MAX_EXITFUNS=1 CONFIG_LIBC_NUMBERED_ARGS=y CONFIG_NDEBUG=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/sim/sim/sim/configs/nsh2/defconfig b/boards/sim/sim/sim/configs/nsh2/defconfig index 8517209444075..c44d9f32031dd 100644 --- a/boards/sim/sim/sim/configs/nsh2/defconfig +++ b/boards/sim/sim/sim/configs/nsh2/defconfig @@ -51,7 +51,6 @@ CONFIG_LIBC_LOCALE_GETTEXT=y CONFIG_LIBC_MAX_EXITFUNS=1 CONFIG_LIBC_NUMBERED_ARGS=y CONFIG_NDEBUG=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/sim/sim/sim/configs/nshcromfs/defconfig b/boards/sim/sim/sim/configs/nshcromfs/defconfig index 00aed0844561f..4356609e3c2e6 100644 --- a/boards/sim/sim/sim/configs/nshcromfs/defconfig +++ b/boards/sim/sim/sim/configs/nshcromfs/defconfig @@ -33,7 +33,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LIBC_ENVPATH=y CONFIG_LIBC_EXECFUNCS=y CONFIG_LIBC_MAX_EXITFUNS=1 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/sim/sim/sim/configs/nxcamera/defconfig b/boards/sim/sim/sim/configs/nxcamera/defconfig index b50ed02b2cd5e..f2e7ed1a7903b 100644 --- a/boards/sim/sim/sim/configs/nxcamera/defconfig +++ b/boards/sim/sim/sim/configs/nxcamera/defconfig @@ -46,7 +46,6 @@ CONFIG_LIBC_LOCALE_GETTEXT=y CONFIG_LIBC_MAX_EXITFUNS=1 CONFIG_LIBC_NUMBERED_ARGS=y CONFIG_LIBYUV=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/sim/sim/sim/configs/nxlines/defconfig b/boards/sim/sim/sim/configs/nxlines/defconfig index f614d4acadf06..47553b792b350 100644 --- a/boards/sim/sim/sim/configs/nxlines/defconfig +++ b/boards/sim/sim/sim/configs/nxlines/defconfig @@ -37,7 +37,6 @@ CONFIG_IDLETHREAD_STACKSIZE=8192 CONFIG_INIT_ENTRYPOINT="nxlines_main" CONFIG_LIBC_MAX_EXITFUNS=1 CONFIG_MQ_MAXMSGSIZE=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_LIBRARY=y CONFIG_NSH_READLINE=y CONFIG_NX=y diff --git a/boards/sim/sim/sim/configs/nxscope/defconfig b/boards/sim/sim/sim/configs/nxscope/defconfig index 691dd1b45a330..5068a109bdf98 100644 --- a/boards/sim/sim/sim/configs/nxscope/defconfig +++ b/boards/sim/sim/sim/configs/nxscope/defconfig @@ -39,7 +39,6 @@ CONFIG_LOGGING_NXSCOPE_DIVIDER=y CONFIG_LOGGING_NXSCOPE_INTF_SERIAL=y CONFIG_LOGGING_NXSCOPE_USERTYPES=y CONFIG_NDEBUG=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/sim/sim/sim/configs/pf_ieee802154/defconfig b/boards/sim/sim/sim/configs/pf_ieee802154/defconfig index edd642acb5dbe..d2b145b088b90 100644 --- a/boards/sim/sim/sim/configs/pf_ieee802154/defconfig +++ b/boards/sim/sim/sim/configs/pf_ieee802154/defconfig @@ -50,7 +50,6 @@ CONFIG_NETINIT_NOMAC=y CONFIG_NET_IEEE802154=y CONFIG_NET_SOCKOPTS=y CONFIG_NET_STATISTICS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/sim/sim/sim/configs/pktradio/defconfig b/boards/sim/sim/sim/configs/pktradio/defconfig index ddff4f256c139..62ddfca1b0cce 100644 --- a/boards/sim/sim/sim/configs/pktradio/defconfig +++ b/boards/sim/sim/sim/configs/pktradio/defconfig @@ -71,7 +71,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/sim/sim/sim/configs/posix_spawn/defconfig b/boards/sim/sim/sim/configs/posix_spawn/defconfig index 256a90b606d62..acc2562cca532 100644 --- a/boards/sim/sim/sim/configs/posix_spawn/defconfig +++ b/boards/sim/sim/sim/configs/posix_spawn/defconfig @@ -39,7 +39,6 @@ CONFIG_LIBC_ENVPATH=y CONFIG_LIBC_EXECFUNCS=y CONFIG_LIBC_MAX_EXITFUNS=1 CONFIG_LIBC_STRERROR=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILE_APPS=y CONFIG_NSH_MOTD=y diff --git a/boards/sim/sim/sim/configs/posix_test/defconfig b/boards/sim/sim/sim/configs/posix_test/defconfig index 50a255c6dddc4..e1f89f739d9e7 100644 --- a/boards/sim/sim/sim/configs/posix_test/defconfig +++ b/boards/sim/sim/sim/configs/posix_test/defconfig @@ -61,7 +61,6 @@ CONFIG_MQ_MAXMSGSIZE=64 CONFIG_NDEBUG=y CONFIG_NET=y CONFIG_NET_SOCKOPTS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILE_APPS=y CONFIG_NSH_MOTD=y diff --git a/boards/sim/sim/sim/configs/quickjs/defconfig b/boards/sim/sim/sim/configs/quickjs/defconfig index 421c077fd0eac..74a012147419b 100644 --- a/boards/sim/sim/sim/configs/quickjs/defconfig +++ b/boards/sim/sim/sim/configs/quickjs/defconfig @@ -47,7 +47,6 @@ CONFIG_LIBC_LOCALE_CATALOG=y CONFIG_LIBC_LOCALE_GETTEXT=y CONFIG_LIBC_MAX_EXITFUNS=1 CONFIG_LIBC_NUMBERED_ARGS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/sim/sim/sim/configs/rc/defconfig b/boards/sim/sim/sim/configs/rc/defconfig index c33e21e4e2fa0..b4a979550376b 100644 --- a/boards/sim/sim/sim/configs/rc/defconfig +++ b/boards/sim/sim/sim/configs/rc/defconfig @@ -29,7 +29,6 @@ CONFIG_LIBC_ENVPATH=y CONFIG_LIBC_EXECFUNCS=y CONFIG_LIBC_FLOATINGPOINT=y CONFIG_LIBC_MAX_EXITFUNS=1 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/sim/sim/sim/configs/romfs/defconfig b/boards/sim/sim/sim/configs/romfs/defconfig index 46e20c4f28337..17e7579f9fcb8 100644 --- a/boards/sim/sim/sim/configs/romfs/defconfig +++ b/boards/sim/sim/sim/configs/romfs/defconfig @@ -38,7 +38,6 @@ CONFIG_LIBC_ENVPATH=y CONFIG_LIBC_EXECFUNCS=y CONFIG_LIBC_MAX_EXITFUNS=1 CONFIG_LIBC_STRERROR=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_CONSOLE_LOGIN=y CONFIG_NSH_FILE_APPS=y diff --git a/boards/sim/sim/sim/configs/rpproxy/defconfig b/boards/sim/sim/sim/configs/rpproxy/defconfig index e50354dd83d30..18a95878d7f02 100644 --- a/boards/sim/sim/sim/configs/rpproxy/defconfig +++ b/boards/sim/sim/sim/configs/rpproxy/defconfig @@ -47,7 +47,6 @@ CONFIG_NET_USRSOCK_RPMSG=y CONFIG_NET_USRSOCK_RPMSG_CPUNAME="server" CONFIG_NET_USRSOCK_TCP=y CONFIG_NET_USRSOCK_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_PROMPT_STRING="proxy> " CONFIG_NSH_READLINE=y diff --git a/boards/sim/sim/sim/configs/rpproxy_uart/defconfig b/boards/sim/sim/sim/configs/rpproxy_uart/defconfig index 546b52572531b..1837d1357a001 100644 --- a/boards/sim/sim/sim/configs/rpproxy_uart/defconfig +++ b/boards/sim/sim/sim/configs/rpproxy_uart/defconfig @@ -45,7 +45,6 @@ CONFIG_NET_USRSOCK_RPMSG=y CONFIG_NET_USRSOCK_RPMSG_CPUNAME="server" CONFIG_NET_USRSOCK_TCP=y CONFIG_NET_USRSOCK_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_PROMPT_STRING="proxy> " CONFIG_NSH_READLINE=y diff --git a/boards/sim/sim/sim/configs/rpproxy_virtio/defconfig b/boards/sim/sim/sim/configs/rpproxy_virtio/defconfig index a3c8456af6456..76b2f8d8f7c60 100644 --- a/boards/sim/sim/sim/configs/rpproxy_virtio/defconfig +++ b/boards/sim/sim/sim/configs/rpproxy_virtio/defconfig @@ -45,7 +45,6 @@ CONFIG_NET_USRSOCK_RPMSG=y CONFIG_NET_USRSOCK_RPMSG_CPUNAME="server" CONFIG_NET_USRSOCK_TCP=y CONFIG_NET_USRSOCK_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_PROMPT_STRING="proxy> " CONFIG_NSH_READLINE=y diff --git a/boards/sim/sim/sim/configs/rpserver/defconfig b/boards/sim/sim/sim/configs/rpserver/defconfig index cb85a146274fa..c794040084ff0 100644 --- a/boards/sim/sim/sim/configs/rpserver/defconfig +++ b/boards/sim/sim/sim/configs/rpserver/defconfig @@ -61,7 +61,6 @@ CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_WRITE_BUFFERS=y CONFIG_NET_USRSOCK_RPMSG_SERVER=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_PROMPT_STRING="server> " CONFIG_NSH_READLINE=y diff --git a/boards/sim/sim/sim/configs/rpserver_uart/defconfig b/boards/sim/sim/sim/configs/rpserver_uart/defconfig index a5157d9c2fea4..2be6b52044bf0 100644 --- a/boards/sim/sim/sim/configs/rpserver_uart/defconfig +++ b/boards/sim/sim/sim/configs/rpserver_uart/defconfig @@ -59,7 +59,6 @@ CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_WRITE_BUFFERS=y CONFIG_NET_USRSOCK_RPMSG_SERVER=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_PROMPT_STRING="server> " CONFIG_NSH_READLINE=y diff --git a/boards/sim/sim/sim/configs/rpserver_virtio/defconfig b/boards/sim/sim/sim/configs/rpserver_virtio/defconfig index ad166d43efafa..c27eeec015767 100644 --- a/boards/sim/sim/sim/configs/rpserver_virtio/defconfig +++ b/boards/sim/sim/sim/configs/rpserver_virtio/defconfig @@ -59,7 +59,6 @@ CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_WRITE_BUFFERS=y CONFIG_NET_USRSOCK_RPMSG_SERVER=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_PROMPT_STRING="server> " CONFIG_NSH_READLINE=y diff --git a/boards/sim/sim/sim/configs/rtptools/defconfig b/boards/sim/sim/sim/configs/rtptools/defconfig index 9fd0a77146879..12e71d8a88bd2 100644 --- a/boards/sim/sim/sim/configs/rtptools/defconfig +++ b/boards/sim/sim/sim/configs/rtptools/defconfig @@ -75,7 +75,6 @@ CONFIG_NET_TUN=y CONFIG_NET_TUN_PKTSIZE=1500 CONFIG_NET_UDP=y CONFIG_NET_UDP_WRITE_BUFFERS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/sim/sim/sim/configs/rust/defconfig b/boards/sim/sim/sim/configs/rust/defconfig index d12fb83ca7d0a..c40d8dd6b50b1 100644 --- a/boards/sim/sim/sim/configs/rust/defconfig +++ b/boards/sim/sim/sim/configs/rust/defconfig @@ -44,7 +44,6 @@ CONFIG_LIBC_LOCALE=y CONFIG_LIBC_LOCALE_CATALOG=y CONFIG_LIBC_LOCALE_GETTEXT=y CONFIG_LIBC_MAX_EXITFUNS=1 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_CONSOLE_LOGIN=y CONFIG_NSH_FILE_APPS=y diff --git a/boards/sim/sim/sim/configs/segger/defconfig b/boards/sim/sim/sim/configs/segger/defconfig index 63f1522c50dd9..18821221117aa 100644 --- a/boards/sim/sim/sim/configs/segger/defconfig +++ b/boards/sim/sim/sim/configs/segger/defconfig @@ -48,7 +48,6 @@ CONFIG_LIBC_LOCALE_CATALOG=y CONFIG_LIBC_LOCALE_GETTEXT=y CONFIG_LIBC_MAX_EXITFUNS=1 CONFIG_NOTE_RTT=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILE_APPS=y CONFIG_NSH_MOTD=y diff --git a/boards/sim/sim/sim/configs/sensor/defconfig b/boards/sim/sim/sim/configs/sensor/defconfig index dffbb64fb8474..b1310c1c65366 100644 --- a/boards/sim/sim/sim/configs/sensor/defconfig +++ b/boards/sim/sim/sim/configs/sensor/defconfig @@ -29,7 +29,6 @@ CONFIG_LIBC_ENVPATH=y CONFIG_LIBC_EXECFUNCS=y CONFIG_LIBC_FLOATINGPOINT=y CONFIG_LIBC_MAX_EXITFUNS=1 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/sim/sim/sim/configs/sixlowpan/defconfig b/boards/sim/sim/sim/configs/sixlowpan/defconfig index 8fea3490285a6..a4261390ea604 100644 --- a/boards/sim/sim/sim/configs/sixlowpan/defconfig +++ b/boards/sim/sim/sim/configs/sixlowpan/defconfig @@ -72,7 +72,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/sim/sim/sim/configs/smartfs/defconfig b/boards/sim/sim/sim/configs/smartfs/defconfig index cee09a6f2c11a..08377bac0e0df 100644 --- a/boards/sim/sim/sim/configs/smartfs/defconfig +++ b/boards/sim/sim/sim/configs/smartfs/defconfig @@ -41,7 +41,6 @@ CONFIG_MTD_M25P=y CONFIG_MTD_N25QXXX=y CONFIG_MTD_PARTITION=y CONFIG_MTD_SMART=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_CONSOLE_LOGIN=y CONFIG_NSH_DISABLE_LOSMART=y diff --git a/boards/sim/sim/sim/configs/smp/defconfig b/boards/sim/sim/sim/configs/smp/defconfig index bd290323abc55..08ded82c85778 100644 --- a/boards/sim/sim/sim/configs/smp/defconfig +++ b/boards/sim/sim/sim/configs/smp/defconfig @@ -19,7 +19,6 @@ CONFIG_DEBUG_SYMBOLS=y CONFIG_EXAMPLES_HELLO=y CONFIG_FS_PROCFS=y CONFIG_INIT_ENTRYPOINT="nsh_main" -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_READLINE_CMD_HISTORY=y diff --git a/boards/sim/sim/sim/configs/sotest/defconfig b/boards/sim/sim/sim/configs/sotest/defconfig index beaa6e7c4596a..5c79de61d7958 100644 --- a/boards/sim/sim/sim/configs/sotest/defconfig +++ b/boards/sim/sim/sim/configs/sotest/defconfig @@ -51,7 +51,6 @@ CONFIG_NET_TCP_NOTIFIER=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_NOTIFIER=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_READLINE_TABCOMPLETION=y diff --git a/boards/sim/sim/sim/configs/sotest32/defconfig b/boards/sim/sim/sim/configs/sotest32/defconfig index dbfb1580ee779..ea21faf6d5082 100644 --- a/boards/sim/sim/sim/configs/sotest32/defconfig +++ b/boards/sim/sim/sim/configs/sotest32/defconfig @@ -51,7 +51,6 @@ CONFIG_NET_TCP_NOTIFIER=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_NOTIFIER=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_READLINE_TABCOMPLETION=y diff --git a/boards/sim/sim/sim/configs/spiffs/defconfig b/boards/sim/sim/sim/configs/spiffs/defconfig index 3f5f72c99f7fb..d86d8f8470816 100644 --- a/boards/sim/sim/sim/configs/spiffs/defconfig +++ b/boards/sim/sim/sim/configs/spiffs/defconfig @@ -11,7 +11,6 @@ CONFIG_ARCH_BOARD="sim" CONFIG_ARCH_BOARD_SIM=y CONFIG_ARCH_CHIP="sim" CONFIG_ARCH_SIM=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_DEBUG_ASSERTIONS=y CONFIG_DEBUG_FEATURES=y CONFIG_DEBUG_SYMBOLS=y diff --git a/boards/sim/sim/sim/configs/sqlite/defconfig b/boards/sim/sim/sim/configs/sqlite/defconfig index d1f8d55f199da..766373b33530c 100644 --- a/boards/sim/sim/sim/configs/sqlite/defconfig +++ b/boards/sim/sim/sim/configs/sqlite/defconfig @@ -40,7 +40,6 @@ CONFIG_LIBC_ENVPATH=y CONFIG_LIBC_EXECFUNCS=y CONFIG_LIBC_MAX_EXITFUNS=1 CONFIG_LIB_SQLITE=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/sim/sim/sim/configs/tcpblaster/defconfig b/boards/sim/sim/sim/configs/tcpblaster/defconfig index 69df2ebf07e3e..0308a5e9deebd 100644 --- a/boards/sim/sim/sim/configs/tcpblaster/defconfig +++ b/boards/sim/sim/sim/configs/tcpblaster/defconfig @@ -74,7 +74,6 @@ CONFIG_NET_TUN=y CONFIG_NET_TUN_PKTSIZE=1500 CONFIG_NET_UDP=y CONFIG_NET_UDP_WRITE_BUFFERS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/sim/sim/sim/configs/tcploop/defconfig b/boards/sim/sim/sim/configs/tcploop/defconfig index a50b6d4bfd07d..ab4e6130709f3 100644 --- a/boards/sim/sim/sim/configs/tcploop/defconfig +++ b/boards/sim/sim/sim/configs/tcploop/defconfig @@ -49,7 +49,6 @@ CONFIG_NET_SOCKOPTS=y CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_TUN=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/sim/sim/sim/configs/tflm/defconfig b/boards/sim/sim/sim/configs/tflm/defconfig index e688f5d9a2866..8aadd6b7c0266 100644 --- a/boards/sim/sim/sim/configs/tflm/defconfig +++ b/boards/sim/sim/sim/configs/tflm/defconfig @@ -42,7 +42,6 @@ CONFIG_LIBC_NUMBERED_ARGS=y CONFIG_MATH_GEMMLOWP=y CONFIG_MATH_KISSFFT=y CONFIG_MATH_RUY=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILE_APPS=y CONFIG_NSH_MAXARGUMENTS=15 diff --git a/boards/sim/sim/sim/configs/touchscreen/defconfig b/boards/sim/sim/sim/configs/touchscreen/defconfig index 170064350a592..c826806d9e30c 100644 --- a/boards/sim/sim/sim/configs/touchscreen/defconfig +++ b/boards/sim/sim/sim/configs/touchscreen/defconfig @@ -13,7 +13,6 @@ CONFIG_ARCH_BOARD_SIM=y CONFIG_ARCH_CHIP="sim" CONFIG_ARCH_SIM=y CONFIG_BOARDCTL=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_DISABLE_ENVIRON=y CONFIG_DISABLE_MOUNTPOINT=y CONFIG_DISABLE_POSIX_TIMERS=y diff --git a/boards/sim/sim/sim/configs/toywasm/defconfig b/boards/sim/sim/sim/configs/toywasm/defconfig index 282abafe4b201..36d6a990749be 100644 --- a/boards/sim/sim/sim/configs/toywasm/defconfig +++ b/boards/sim/sim/sim/configs/toywasm/defconfig @@ -57,7 +57,6 @@ CONFIG_NET_TCP_NOTIFIER=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_NOTIFIER=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_PATH_INITIAL="/bin" diff --git a/boards/sim/sim/sim/configs/udgram/defconfig b/boards/sim/sim/sim/configs/udgram/defconfig index 60f75396cb2f0..79d80f21a758b 100644 --- a/boards/sim/sim/sim/configs/udgram/defconfig +++ b/boards/sim/sim/sim/configs/udgram/defconfig @@ -37,7 +37,6 @@ CONFIG_LIBC_EXECFUNCS=y CONFIG_LIBC_MAX_EXITFUNS=1 CONFIG_NET=y CONFIG_NET_LOCAL=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/sim/sim/sim/configs/unionfs/defconfig b/boards/sim/sim/sim/configs/unionfs/defconfig index 4bc7d6b745acd..8ba9e7b8db447 100644 --- a/boards/sim/sim/sim/configs/unionfs/defconfig +++ b/boards/sim/sim/sim/configs/unionfs/defconfig @@ -34,7 +34,6 @@ CONFIG_LIBC_ENVPATH=y CONFIG_LIBC_EXECFUNCS=y CONFIG_LIBC_MAX_EXITFUNS=1 CONFIG_LIBC_STRERROR=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/sim/sim/sim/configs/usbdev/defconfig b/boards/sim/sim/sim/configs/usbdev/defconfig index 89131042e0497..8328fdfb6bcaf 100644 --- a/boards/sim/sim/sim/configs/usbdev/defconfig +++ b/boards/sim/sim/sim/configs/usbdev/defconfig @@ -8,7 +8,6 @@ # CONFIG_SIM_UART_DMA is not set CONFIG_ADBD_FILE_SERVICE=y CONFIG_ADBD_SHELL_SERVICE=y -CONFIG_ADBD_USB_BOARDCTL=y CONFIG_ADBD_USB_SERVER=y CONFIG_ARCH="sim" CONFIG_ARCH_BOARD="sim" @@ -16,7 +15,6 @@ CONFIG_ARCH_BOARD_SIM=y CONFIG_ARCH_CHIP="sim" CONFIG_ARCH_SIM=y CONFIG_BOARDCTL_POWEROFF=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BUILTIN=y CONFIG_CDCACM=y CONFIG_CDCACM_COMPOSITE=y @@ -86,7 +84,6 @@ CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_NOTIFIER=y CONFIG_NET_UDP_WRITE_BUFFERS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_PSEUDOFS_SOFTLINKS=y diff --git a/boards/sim/sim/sim/configs/usbhost/defconfig b/boards/sim/sim/sim/configs/usbhost/defconfig index 7622929f25258..afdde97ade76c 100644 --- a/boards/sim/sim/sim/configs/usbhost/defconfig +++ b/boards/sim/sim/sim/configs/usbhost/defconfig @@ -27,7 +27,6 @@ CONFIG_FS_TMPFS=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LIBC_DLFCN=y CONFIG_LIBC_EXECFUNCS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_PSEUDOFS_SOFTLINKS=y diff --git a/boards/sim/sim/sim/configs/userfs/defconfig b/boards/sim/sim/sim/configs/userfs/defconfig index f9992be92a9b1..342b672a03342 100644 --- a/boards/sim/sim/sim/configs/userfs/defconfig +++ b/boards/sim/sim/sim/configs/userfs/defconfig @@ -40,7 +40,6 @@ CONFIG_NET=y CONFIG_NET_LOCAL=y CONFIG_NET_LOOPBACK=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/sim/sim/sim/configs/usrsocktest/defconfig b/boards/sim/sim/sim/configs/usrsocktest/defconfig index 84444588b7ca9..5b09567f5281a 100644 --- a/boards/sim/sim/sim/configs/usrsocktest/defconfig +++ b/boards/sim/sim/sim/configs/usrsocktest/defconfig @@ -23,7 +23,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_MM_IOB=y CONFIG_NET=y CONFIG_NET_USRSOCK=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_READLINE_TABCOMPLETION=y diff --git a/boards/sim/sim/sim/configs/ustream/defconfig b/boards/sim/sim/sim/configs/ustream/defconfig index 7fe126ca4167f..3abbacc00c787 100644 --- a/boards/sim/sim/sim/configs/ustream/defconfig +++ b/boards/sim/sim/sim/configs/ustream/defconfig @@ -37,7 +37,6 @@ CONFIG_LIBC_EXECFUNCS=y CONFIG_LIBC_MAX_EXITFUNS=1 CONFIG_NET=y CONFIG_NET_LOCAL=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/sim/sim/sim/configs/vncserver/defconfig b/boards/sim/sim/sim/configs/vncserver/defconfig index 3b51cc68da7d6..57efe069d8265 100644 --- a/boards/sim/sim/sim/configs/vncserver/defconfig +++ b/boards/sim/sim/sim/configs/vncserver/defconfig @@ -11,7 +11,6 @@ CONFIG_ARCH_BOARD="sim" CONFIG_ARCH_BOARD_SIM=y CONFIG_ARCH_CHIP="sim" CONFIG_ARCH_SIM=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_DEBUG_SYMBOLS=y CONFIG_DRIVERS_VIDEO=y CONFIG_EXAMPLES_FB=y diff --git a/boards/sim/sim/sim/configs/vpnkit/defconfig b/boards/sim/sim/sim/configs/vpnkit/defconfig index b89d1bc2628c8..0a88c72ce4884 100644 --- a/boards/sim/sim/sim/configs/vpnkit/defconfig +++ b/boards/sim/sim/sim/configs/vpnkit/defconfig @@ -58,7 +58,6 @@ CONFIG_NET_TCP_NOTIFIER=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_NOTIFIER=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_PATH_INITIAL="/bin" diff --git a/boards/sim/sim/sim/configs/wakaama/defconfig b/boards/sim/sim/sim/configs/wakaama/defconfig index 34e2b7a94ca7c..c9b1e86a9c638 100644 --- a/boards/sim/sim/sim/configs/wakaama/defconfig +++ b/boards/sim/sim/sim/configs/wakaama/defconfig @@ -47,7 +47,6 @@ CONFIG_NET_USRSOCK_ICMP=y CONFIG_NET_USRSOCK_ICMPv6=y CONFIG_NET_USRSOCK_TCP=y CONFIG_NET_USRSOCK_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_MOTD=y CONFIG_NSH_MOTD_STRING="This is an example NuttX Message Of The Day (MOTD). Have fun!" diff --git a/boards/sim/sim/sim/configs/wamr/defconfig b/boards/sim/sim/sim/configs/wamr/defconfig index ed0310f487952..9c59cc357bbd1 100644 --- a/boards/sim/sim/sim/configs/wamr/defconfig +++ b/boards/sim/sim/sim/configs/wamr/defconfig @@ -64,7 +64,6 @@ CONFIG_NET=y CONFIG_NET_BINDTODEVICE=y CONFIG_NET_SOCKOPTS=y CONFIG_NET_TUN=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILE_APPS=y CONFIG_NSH_READLINE=y diff --git a/boards/sim/sim/sim/configs/windows/defconfig b/boards/sim/sim/sim/configs/windows/defconfig index 6661775ba090f..f734204fbec51 100644 --- a/boards/sim/sim/sim/configs/windows/defconfig +++ b/boards/sim/sim/sim/configs/windows/defconfig @@ -11,7 +11,6 @@ CONFIG_ARCH_BOARD_SIM=y CONFIG_ARCH_CHIP="sim" CONFIG_ARCH_SIM=y CONFIG_BOARDCTL_POWEROFF=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BUILTIN=y CONFIG_DEBUG_CUSTOMOPT=y CONFIG_DEV_LOOP=y @@ -52,7 +51,6 @@ CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_WRITE_BUFFERS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_PREALLOC_CHILDSTATUS=2 diff --git a/boards/sim/sim/sim/configs/windows64/defconfig b/boards/sim/sim/sim/configs/windows64/defconfig index 6ab5213ec3833..26a7968ad2847 100644 --- a/boards/sim/sim/sim/configs/windows64/defconfig +++ b/boards/sim/sim/sim/configs/windows64/defconfig @@ -11,7 +11,6 @@ CONFIG_ARCH_BOARD_SIM=y CONFIG_ARCH_CHIP="sim" CONFIG_ARCH_SIM=y CONFIG_BOARDCTL_POWEROFF=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BUILTIN=y CONFIG_DEBUG_CUSTOMOPT=y CONFIG_DEV_LOOP=y @@ -51,7 +50,6 @@ CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_WRITE_BUFFERS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_PREALLOC_CHILDSTATUS=2 diff --git a/boards/sim/sim/sim/configs/zipfs/defconfig b/boards/sim/sim/sim/configs/zipfs/defconfig index 081932627163c..cb5d5f058984c 100644 --- a/boards/sim/sim/sim/configs/zipfs/defconfig +++ b/boards/sim/sim/sim/configs/zipfs/defconfig @@ -48,7 +48,6 @@ CONFIG_LIBC_LOCALE_GETTEXT=y CONFIG_LIBC_MAX_EXITFUNS=1 CONFIG_LIBC_NUMBERED_ARGS=y CONFIG_LIB_ZLIB=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILE_APPS=y CONFIG_NSH_MOTD=y diff --git a/boards/sim/sim/sim/src/CMakeLists.txt b/boards/sim/sim/sim/src/CMakeLists.txt index cbf3cc7168c79..590f08d462800 100644 --- a/boards/sim/sim/sim/src/CMakeLists.txt +++ b/boards/sim/sim/sim/src/CMakeLists.txt @@ -26,10 +26,6 @@ if(CONFIG_BOARD_LATE_INITIALIZE) list(APPEND SRCS sim_boot.c) endif() -if(CONFIG_BOARDCTL) - list(APPEND SRCS sim_appinit.c) -endif() - if(CONFIG_BOARD_LATE_INITIALIZE) list(APPEND SRCS sim_bringup.c) if(CONFIG_LIBC_ZONEINFO_ROMFS) diff --git a/boards/sim/sim/sim/src/Makefile b/boards/sim/sim/sim/src/Makefile index 6fe51cd401e24..168d9022e0c0a 100644 --- a/boards/sim/sim/sim/src/Makefile +++ b/boards/sim/sim/sim/src/Makefile @@ -30,10 +30,6 @@ ifeq ($(CONFIG_BOARD_LATE_INITIALIZE),y) CSRCS += sim_boot.c endif -ifeq ($(CONFIG_BOARDCTL),y) - CSRCS += sim_appinit.c -endif - ifeq ($(CONFIG_BOARD_LATE_INITIALIZE),y) CSRCS += sim_bringup.c ifeq ($(CONFIG_LIBC_ZONEINFO_ROMFS),y) diff --git a/boards/sim/sim/sim/src/sim_appinit.c b/boards/sim/sim/sim/src/sim_appinit.c deleted file mode 100644 index f4208a663be80..0000000000000 --- a/boards/sim/sim/sim/src/sim_appinit.c +++ /dev/null @@ -1,70 +0,0 @@ -/**************************************************************************** - * boards/sim/sim/sim/src/sim_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 -#include - -#include "sim.h" - -/**************************************************************************** - * 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 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. - * - ****************************************************************************/ - -#ifdef CONFIG_BOARDCTL -int board_app_initialize(uintptr_t arg) -{ -#ifndef CONFIG_BOARD_LATE_INITIALIZE - sim_bringup(); -#endif - - return 0; -} -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/sim/sim/sim/src/sim_foc.c b/boards/sim/sim/sim/src/sim_foc.c index 1e0095c8b0c26..d46a139fb7c11 100644 --- a/boards/sim/sim/sim/src/sim_foc.c +++ b/boards/sim/sim/sim/src/sim_foc.c @@ -70,8 +70,6 @@ static void sim_foc_interrupt(wdparm_t arg) * Description: * Initialize the FOC device. * - * This function should be call by board_app_initialize(). - * * Returned Value: * 0 on success, a negated errno value on failure * diff --git a/boards/sparc/bm3803/xx3803/configs/nsh/defconfig b/boards/sparc/bm3803/xx3803/configs/nsh/defconfig index ba92fa983b775..3f4802978829c 100644 --- a/boards/sparc/bm3803/xx3803/configs/nsh/defconfig +++ b/boards/sparc/bm3803/xx3803/configs/nsh/defconfig @@ -55,7 +55,6 @@ CONFIG_LIBC_MEMSET_64BIT=y CONFIG_LIBC_MEMSET_OPTSPEED=y CONFIG_LIBM=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLEBG=y CONFIG_NSH_DISABLESCRIPT=y diff --git a/boards/sparc/bm3803/xx3803/src/Makefile b/boards/sparc/bm3803/xx3803/src/Makefile index f970f8d9566dd..95a09a6e16eb5 100644 --- a/boards/sparc/bm3803/xx3803/src/Makefile +++ b/boards/sparc/bm3803/xx3803/src/Makefile @@ -25,12 +25,9 @@ ASRCS = CSRCS = bm3803_boot.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += bm3803_appinit.c ifeq ($(CONFIG_BOARDCTL_RESET),y) CSRCS += bm3803_reset.c endif -endif ifeq ($(CONFIG_MTD_AM29LV),y) CSRCS += bm3803_am29lv.c diff --git a/boards/sparc/bm3803/xx3803/src/bm3803_appinit.c b/boards/sparc/bm3803/xx3803/src/bm3803_appinit.c deleted file mode 100644 index 3564610833f1c..0000000000000 --- a/boards/sparc/bm3803/xx3803/src/bm3803_appinit.c +++ /dev/null @@ -1,159 +0,0 @@ -/**************************************************************************** - * boards/sparc/bm3803/xx3803/src/bm3803_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 -#include -#include -#include - -#include -#include -#include "bm3803_wdg.h" -#include "bm3803.h" -#include "xx3803.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Configuration ************************************************************/ - -/* Assume that we support everything until convinced otherwise */ - -#define HAVE_AM29LV 1 - -/* Can't support the AM29LV device if it AM29LV support is not enabled */ - -#if !defined(CONFIG_MTD_AM29LV) -# undef HAVE_AM29LV -#endif - -/* Can't support AM29LV features if mountpoints are disabled */ - -#ifdef CONFIG_DISABLE_MOUNTPOINT -# undef HAVE_AM29LV -#endif - -/* Default AM29LV minor number */ - -#if defined(HAVE_AM29LV) && !defined(CONFIG_NSH_AM29LVMINOR) -# define CONFIG_NSH_AM29LVMINOR 0 -#endif - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * 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 cold 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_ONESHOT - struct oneshot_lowerhalf_s *os = NULL; -#endif - int ret; - - /* Initialize and register the AM29LV FLASH file system. */ - -#ifdef HAVE_AM29LV - ret = bm3803_am29lv_initialize(CONFIG_NSH_AM29LVMINOR); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: Failed to initialize AM29LV minor %d: %d\n", - CONFIG_NSH_AM29LVMINOR, ret); - return ret; - } -#endif - -#ifdef CONFIG_ONESHOT - os = oneshot_initialize(1, 10); - if (os) - { - ret = oneshot_register("/dev/oneshot", os); - } -#endif - -#ifdef CONFIG_BM3803_WDG - /* Initialize the watchdog timer */ - - bm3803_wdginitialize("/dev/watchdog0"); -#endif - -#ifdef CONFIG_XX3803_WDG - /* Start WDG kicker thread */ - - ret = xx3803_watchdog_initialize(); - if (ret != OK) - { - syslog(LOG_ERR, "Failed to start watchdog thread: %d\n", ret); - return ret; - } -#endif - -#ifdef CONFIG_FS_PROCFS - /* Mount the procfs file system */ - - ret = mount(NULL, BM3803_PROCFS_MOUNTPOINT, "procfs", 0, NULL); - if (ret < 0) - { - syslog(LOG_ERR, "Failed to mount procfs at %s: %d\n", - BM3803_PROCFS_MOUNTPOINT, ret); - } -#endif - - return ret; -} diff --git a/boards/sparc/bm3803/xx3803/src/bm3803_boot.c b/boards/sparc/bm3803/xx3803/src/bm3803_boot.c index 2c2fd5291699c..e0f2f47412b9f 100644 --- a/boards/sparc/bm3803/xx3803/src/bm3803_boot.c +++ b/boards/sparc/bm3803/xx3803/src/bm3803_boot.c @@ -28,16 +28,47 @@ #include +#include +#include +#include + #include +#include +#include #include "sparc_internal.h" +#include "bm3803_wdg.h" #include "bm3803.h" #include "xx3803.h" /**************************************************************************** - * Definitions + * Pre-processor Definitions ****************************************************************************/ +/* Configuration ************************************************************/ + +/* Assume that we support everything until convinced otherwise */ + +#define HAVE_AM29LV 1 + +/* Can't support the AM29LV device if it AM29LV support is not enabled */ + +#if !defined(CONFIG_MTD_AM29LV) +# undef HAVE_AM29LV +#endif + +/* Can't support AM29LV features if mountpoints are disabled */ + +#ifdef CONFIG_DISABLE_MOUNTPOINT +# undef HAVE_AM29LV +#endif + +/* Default AM29LV minor number */ + +#if defined(HAVE_AM29LV) && !defined(CONFIG_NSH_AM29LVMINOR) +# define CONFIG_NSH_AM29LVMINOR 0 +#endif + /**************************************************************************** * Private Functions ****************************************************************************/ @@ -73,3 +104,74 @@ void bm3803_boardinitialize(void) BM3803_REG.timer_cnt1 = 0; BM3803_REG.timer_load1 = 0; } + +/**************************************************************************** + * 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ +#ifdef CONFIG_ONESHOT + struct oneshot_lowerhalf_s *os = NULL; +#endif + int ret; + + /* Initialize and register the AM29LV FLASH file system. */ + +#ifdef HAVE_AM29LV + ret = bm3803_am29lv_initialize(CONFIG_NSH_AM29LVMINOR); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: Failed to initialize AM29LV minor %d: %d\n", + CONFIG_NSH_AM29LVMINOR, ret); + return; + } +#endif + +#ifdef CONFIG_ONESHOT + os = oneshot_initialize(1, 10); + if (os) + { + ret = oneshot_register("/dev/oneshot", os); + } +#endif + +#ifdef CONFIG_BM3803_WDG + /* Initialize the watchdog timer */ + + bm3803_wdginitialize("/dev/watchdog0"); +#endif + +#ifdef CONFIG_XX3803_WDG + /* Start WDG kicker thread */ + + ret = xx3803_watchdog_initialize(); + if (ret != OK) + { + syslog(LOG_ERR, "Failed to start watchdog thread: %d\n", ret); + return; + } +#endif + +#ifdef CONFIG_FS_PROCFS + /* Mount the procfs file system */ + + ret = mount(NULL, BM3803_PROCFS_MOUNTPOINT, "procfs", 0, NULL); + if (ret < 0) + { + syslog(LOG_ERR, "Failed to mount procfs at %s: %d\n", + BM3803_PROCFS_MOUNTPOINT, ret); + } +#endif +} +#endif /* CONFIG_BOARD_LATE_INITIALIZE */ diff --git a/boards/sparc/bm3823/xx3823/configs/nsh/defconfig b/boards/sparc/bm3823/xx3823/configs/nsh/defconfig index e9a0cb2aafbd2..21e017c9b7f3f 100644 --- a/boards/sparc/bm3823/xx3823/configs/nsh/defconfig +++ b/boards/sparc/bm3823/xx3823/configs/nsh/defconfig @@ -32,7 +32,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=4096 CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_EXECFUNCS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILE_APPS=y CONFIG_NUNGET_CHARS=0 diff --git a/boards/sparc/bm3823/xx3823/src/Makefile b/boards/sparc/bm3823/xx3823/src/Makefile index 7079b5fd50ff4..c510a066faaaf 100644 --- a/boards/sparc/bm3823/xx3823/src/Makefile +++ b/boards/sparc/bm3823/xx3823/src/Makefile @@ -25,10 +25,6 @@ ASRCS = CSRCS = bm3823_boot.c bm3823_leds.c -ifeq ($(CONFIG_LIB_BOARDCTL),y) -CSRCS += bm3823_appinit.c -endif - ifeq ($(CONFIG_MTD_AM29LV),y) CSRCS += bm3823_am29lv.c endif diff --git a/boards/sparc/bm3823/xx3823/src/bm3823_appinit.c b/boards/sparc/bm3823/xx3823/src/bm3823_appinit.c deleted file mode 100644 index 61ebbe507bc91..0000000000000 --- a/boards/sparc/bm3823/xx3823/src/bm3823_appinit.c +++ /dev/null @@ -1,119 +0,0 @@ -/**************************************************************************** - * boards/sparc/bm3823/xx3823/src/bm3823_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 - -#include -#include - -#include - -#include "bm3823.h" -#include "xx3823.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Configuration ************************************************************/ - -/* Assume that we support everything until convinced otherwise */ - -#define HAVE_AM29LV 1 - -/* Can't support the AM29LV device if it AM29LV support is not enabled */ - -#if !defined(CONFIG_MTD_AM29LV) -# undef HAVE_AM29LV -#endif - -/* Can't support AM29LV features if mountpoints are disabled */ - -#ifdef CONFIG_DISABLE_MOUNTPOINT -# undef HAVE_AM29LV -#endif - -/* Default AM29LV minor number */ - -#if defined(HAVE_AM29LV) && !defined(CONFIG_NSH_AM29LVMINOR) -# define CONFIG_NSH_AM29LVMINOR 0 -#endif - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * 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 cold 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) -{ - int ret; - - /* Initialize and register the AM29LV FLASH file system. */ - -#ifdef HAVE_AM29LV - ret = bm3823_am29lv_initialize(CONFIG_NSH_AM29LVMINOR); - if (ret < 0) - { - syslog(LOG_ERR, "ERROR: Failed to initialize AM29LV minor %d: %d\n", - CONFIG_NSH_AM29LVMINOR, ret); - return ret; - } -#endif - - return ret; -} diff --git a/boards/sparc/bm3823/xx3823/src/bm3823_boot.c b/boards/sparc/bm3823/xx3823/src/bm3823_boot.c index 321be8c8a4bd4..43932f79dd131 100644 --- a/boards/sparc/bm3823/xx3823/src/bm3823_boot.c +++ b/boards/sparc/bm3823/xx3823/src/bm3823_boot.c @@ -28,16 +28,45 @@ #include +#include +#include +#include + #include +#include #include "sparc_internal.h" #include "bm3823.h" #include "xx3823.h" /**************************************************************************** - * Definitions + * Pre-processor Definitions ****************************************************************************/ +/* Configuration ************************************************************/ + +/* Assume that we support everything until convinced otherwise */ + +#define HAVE_AM29LV 1 + +/* Can't support the AM29LV device if it AM29LV support is not enabled */ + +#if !defined(CONFIG_MTD_AM29LV) +# undef HAVE_AM29LV +#endif + +/* Can't support AM29LV features if mountpoints are disabled */ + +#ifdef CONFIG_DISABLE_MOUNTPOINT +# undef HAVE_AM29LV +#endif + +/* Default AM29LV minor number */ + +#if defined(HAVE_AM29LV) && !defined(CONFIG_NSH_AM29LVMINOR) +# define CONFIG_NSH_AM29LVMINOR 0 +#endif + /**************************************************************************** * Private Functions ****************************************************************************/ @@ -69,3 +98,35 @@ void bm3823_boardinitialize(void) bm3823_led_initialize(); #endif } + +/**************************************************************************** + * 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ + int ret; + + /* Initialize and register the AM29LV FLASH file system. */ + +#ifdef HAVE_AM29LV + ret = bm3823_am29lv_initialize(CONFIG_NSH_AM29LVMINOR); + if (ret < 0) + { + syslog(LOG_ERR, "ERROR: Failed to initialize AM29LV minor %d: %d\n", + CONFIG_NSH_AM29LVMINOR, ret); + return; + } +#endif +} +#endif /* CONFIG_BOARD_LATE_INITIALIZE */ diff --git a/boards/sparc/s698pm/s698pm-dkit/configs/nsh/defconfig b/boards/sparc/s698pm/s698pm-dkit/configs/nsh/defconfig index 68c11fc99466c..0ac9a17350cd8 100644 --- a/boards/sparc/s698pm/s698pm-dkit/configs/nsh/defconfig +++ b/boards/sparc/s698pm/s698pm-dkit/configs/nsh/defconfig @@ -45,7 +45,6 @@ CONFIG_LIBC_MEMSET_64BIT=y CONFIG_LIBC_MEMSET_OPTSPEED=y CONFIG_LIBM=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLEBG=y CONFIG_NSH_DISABLESCRIPT=y diff --git a/boards/sparc/s698pm/s698pm-dkit/configs/smp/defconfig b/boards/sparc/s698pm/s698pm-dkit/configs/smp/defconfig index 529f162f22906..c69f2dc19b533 100644 --- a/boards/sparc/s698pm/s698pm-dkit/configs/smp/defconfig +++ b/boards/sparc/s698pm/s698pm-dkit/configs/smp/defconfig @@ -46,7 +46,6 @@ CONFIG_LIBC_MEMSET_64BIT=y CONFIG_LIBC_MEMSET_OPTSPEED=y CONFIG_LIBM=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLEBG=y CONFIG_NSH_DISABLESCRIPT=y diff --git a/boards/sparc/s698pm/s698pm-dkit/src/Makefile b/boards/sparc/s698pm/s698pm-dkit/src/Makefile index 4965f146f74d1..7f70cdf5f019d 100644 --- a/boards/sparc/s698pm/s698pm-dkit/src/Makefile +++ b/boards/sparc/s698pm/s698pm-dkit/src/Makefile @@ -25,10 +25,6 @@ ASRCS = CSRCS = s698pm_boot.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += s698pm_appinit.c -endif - ifeq ($(CONFIG_S698PM_WDG),y) CSRCS += s698pm_wdt.c endif diff --git a/boards/sparc/s698pm/s698pm-dkit/src/s698pm_appinit.c b/boards/sparc/s698pm/s698pm-dkit/src/s698pm_appinit.c deleted file mode 100644 index caf703c1dc23d..0000000000000 --- a/boards/sparc/s698pm/s698pm-dkit/src/s698pm_appinit.c +++ /dev/null @@ -1,110 +0,0 @@ -/**************************************************************************** - * boards/sparc/s698pm/s698pm-dkit/src/s698pm_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 -#include -#include -#include - -#include -#include "s698pm.h" -#include "s698pm-dkit.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * 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 cold 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) -{ - int ret; - -#ifdef CONFIG_S698PM_WDG - /* Initialize the watchdog timer */ - - s698pm_wdginitialize("/dev/watchdog0"); -#endif - -#ifdef CONFIG_S698PM_DKIT_WDG - /* Start WDG kicker thread */ - - ret = s698pm_dkit_watchdog_initialize(); - if (ret != OK) - { - syslog(LOG_ERR, "Failed to start watchdog thread: %d\n", ret); - return ret; - } -#endif - -#ifdef CONFIG_FS_PROCFS - /* Mount the procfs file system */ - - ret = mount(NULL, S698PM_PROCFS_MOUNTPOINT, "procfs", 0, NULL); - if (ret < 0) - { - syslog(LOG_ERR, "Failed to mount procfs at %s: %d\n", - S698PM_PROCFS_MOUNTPOINT, ret); - } -#endif - - return ret; -} diff --git a/boards/sparc/s698pm/s698pm-dkit/src/s698pm_boot.c b/boards/sparc/s698pm/s698pm-dkit/src/s698pm_boot.c index 98455b9b42373..773a11d045e6b 100644 --- a/boards/sparc/s698pm/s698pm-dkit/src/s698pm_boot.c +++ b/boards/sparc/s698pm/s698pm-dkit/src/s698pm_boot.c @@ -28,14 +28,20 @@ #include +#include +#include +#include +#include + #include +#include #include "sparc_internal.h" #include "s698pm.h" #include "s698pm-dkit.h" /**************************************************************************** - * Definitions + * Pre-processor Definitions ****************************************************************************/ /**************************************************************************** @@ -65,3 +71,51 @@ void s698pm_boardinitialize(void) board_autoled_initialize(); #endif } + +/**************************************************************************** + * 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ + int ret; + +#ifdef CONFIG_S698PM_WDG + /* Initialize the watchdog timer */ + + s698pm_wdginitialize("/dev/watchdog0"); +#endif + +#ifdef CONFIG_S698PM_DKIT_WDG + /* Start WDG kicker thread */ + + ret = s698pm_dkit_watchdog_initialize(); + if (ret != OK) + { + syslog(LOG_ERR, "Failed to start watchdog thread: %d\n", ret); + return; + } +#endif + +#ifdef CONFIG_FS_PROCFS + /* Mount the procfs file system */ + + ret = mount(NULL, S698PM_PROCFS_MOUNTPOINT, "procfs", 0, NULL); + if (ret < 0) + { + syslog(LOG_ERR, "Failed to mount procfs at %s: %d\n", + S698PM_PROCFS_MOUNTPOINT, ret); + } +#endif +} +#endif /* CONFIG_BOARD_LATE_INITIALIZE */ diff --git a/boards/tricore/tc397/a2g-tc397-5v-tft/configs/nsh/defconfig b/boards/tricore/tc397/a2g-tc397-5v-tft/configs/nsh/defconfig index 24926672785be..45dae69b73fb7 100644 --- a/boards/tricore/tc397/a2g-tc397-5v-tft/configs/nsh/defconfig +++ b/boards/tricore/tc397/a2g-tc397-5v-tft/configs/nsh/defconfig @@ -30,7 +30,6 @@ CONFIG_FS_TMPFS=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LIBC_MEMFD_ERROR=y CONFIG_NDEBUG=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/tricore/tc397/a2g-tc397-5v-tft/src/CMakeLists.txt b/boards/tricore/tc397/a2g-tc397-5v-tft/src/CMakeLists.txt index 503675f17e93c..d034097f8b7d4 100644 --- a/boards/tricore/tc397/a2g-tc397-5v-tft/src/CMakeLists.txt +++ b/boards/tricore/tc397/a2g-tc397-5v-tft/src/CMakeLists.txt @@ -20,7 +20,7 @@ # # ############################################################################## -set(SRCS tc397_appinit.c tc397_boardinit.c tc397_bringup.c) +set(SRCS tc397_boardinit.c tc397_bringup.c) target_sources(board PRIVATE ${SRCS}) diff --git a/boards/tricore/tc397/a2g-tc397-5v-tft/src/Makefile b/boards/tricore/tc397/a2g-tc397-5v-tft/src/Makefile index 3b9c5308c6371..49a3beb29c94c 100644 --- a/boards/tricore/tc397/a2g-tc397-5v-tft/src/Makefile +++ b/boards/tricore/tc397/a2g-tc397-5v-tft/src/Makefile @@ -24,8 +24,4 @@ include $(TOPDIR)/Make.defs CSRCS = tc397_boardinit.c tc397_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += tc397_appinit.c -endif - include $(TOPDIR)/boards/Board.mk diff --git a/boards/tricore/tc397/a2g-tc397-5v-tft/src/tc397_appinit.c b/boards/tricore/tc397/a2g-tc397-5v-tft/src/tc397_appinit.c deleted file mode 100644 index d576157a4d5ec..0000000000000 --- a/boards/tricore/tc397/a2g-tc397-5v-tft/src/tc397_appinit.c +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** - * boards/tricore/tc397/a2g-tc397-5v-tft/src/tc397_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 - -#include - -#include - -#include "tc397.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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 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) -{ -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board initialization */ - - return tc397_bringup(); -#else - return OK; -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/tricore/tc397/a2g-tc397-5v-tft/src/tc397_boardinit.c b/boards/tricore/tc397/a2g-tc397-5v-tft/src/tc397_boardinit.c index ce0dd9d570c4e..9c789ca129d85 100644 --- a/boards/tricore/tc397/a2g-tc397-5v-tft/src/tc397_boardinit.c +++ b/boards/tricore/tc397/a2g-tc397-5v-tft/src/tc397_boardinit.c @@ -114,8 +114,6 @@ void tc397_board_initialize(void) #ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { - /* Perform board initialization */ - tc397_bringup(); } #endif /* CONFIG_BOARD_LATE_INITIALIZE */ diff --git a/boards/tricore/tc4da/triboard_tc4x9_com/src/CMakeLists.txt b/boards/tricore/tc4da/triboard_tc4x9_com/src/CMakeLists.txt index bcadeea22ba18..3ed0a4855edbb 100644 --- a/boards/tricore/tc4da/triboard_tc4x9_com/src/CMakeLists.txt +++ b/boards/tricore/tc4da/triboard_tc4x9_com/src/CMakeLists.txt @@ -20,7 +20,7 @@ # # ############################################################################## -set(SRCS tc4da_appinit.c tc4da_boardinit.c tc4da_bringup.c) +set(SRCS tc4da_boardinit.c tc4da_bringup.c) target_sources(board PRIVATE ${SRCS}) diff --git a/boards/tricore/tc4da/triboard_tc4x9_com/src/Makefile b/boards/tricore/tc4da/triboard_tc4x9_com/src/Makefile index 3203a4e0d9990..30abecc8728ae 100644 --- a/boards/tricore/tc4da/triboard_tc4x9_com/src/Makefile +++ b/boards/tricore/tc4da/triboard_tc4x9_com/src/Makefile @@ -24,8 +24,4 @@ include $(TOPDIR)/Make.defs CSRCS = tc4da_boardinit.c tc4da_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += tc4da_appinit.c -endif - include $(TOPDIR)/boards/Board.mk diff --git a/boards/tricore/tc4da/triboard_tc4x9_com/src/tc4da_appinit.c b/boards/tricore/tc4da/triboard_tc4x9_com/src/tc4da_appinit.c deleted file mode 100644 index b239a347fc52d..0000000000000 --- a/boards/tricore/tc4da/triboard_tc4x9_com/src/tc4da_appinit.c +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** - * boards/tricore/tc4da/triboard_tc4x9_com/src/tc4da_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 - -#include - -#include - -#include "tc4da.h" - -#ifdef CONFIG_BOARDCTL - -/**************************************************************************** - * 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 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) -{ -#ifndef CONFIG_BOARD_LATE_INITIALIZE - /* Perform board initialization */ - - return tc4da_bringup(); -#else - return OK; -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/x86/qemu/qemu-i486/configs/nsh/defconfig b/boards/x86/qemu/qemu-i486/configs/nsh/defconfig index 4ea424bdaf7f0..2d9696102bf11 100644 --- a/boards/x86/qemu/qemu-i486/configs/nsh/defconfig +++ b/boards/x86/qemu/qemu-i486/configs/nsh/defconfig @@ -34,7 +34,6 @@ CONFIG_FS_ROMFS=y CONFIG_IDLETHREAD_STACKSIZE=2048 CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/x86/qemu/qemu-i486/src/Makefile b/boards/x86/qemu/qemu-i486/src/Makefile index e8653b6a2160d..5a6c130d33ea5 100644 --- a/boards/x86/qemu/qemu-i486/src/Makefile +++ b/boards/x86/qemu/qemu-i486/src/Makefile @@ -24,9 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = qemu_boot.c -ifeq ($(CONFIG_BOARDCTL),y) - CSRCS += qemu_appinit.c -endif ifeq ($(CONFIG_QEMU_VGA),y) CSRCS += qemu_vga_lcd.c endif diff --git a/boards/x86/qemu/qemu-i486/src/qemu_appinit.c b/boards/x86/qemu/qemu-i486/src/qemu_appinit.c deleted file mode 100644 index 91997ccc8c4ae..0000000000000 --- a/boards/x86/qemu/qemu-i486/src/qemu_appinit.c +++ /dev/null @@ -1,102 +0,0 @@ -/**************************************************************************** - * boards/x86/qemu/qemu-i486/src/qemu_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 -#include -#include - -#include -#include -#include - -#include "x86_internal.h" -#include "qemu_vga.h" - -/**************************************************************************** - * 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 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. - * - ****************************************************************************/ - -#ifdef CONFIG_BOARDCTL -int board_app_initialize(uintptr_t arg) -{ - int ret = OK; - -#ifdef CONFIG_FS_PROCFS - /* Mount the proc filesystem */ - - ret = nx_mount(NULL, "/proc", "procfs", 0, NULL); - if (ret < 0) - { - serr("ERROR: Failed to mount procfs at %s: %d\n", "/proc", ret); - } -#endif - -#ifdef CONFIG_QEMU_VGA - ret = qemu_vga(); - if (ret < 0) - { - serr("ERROR: Failed to initialize QEMU VGA: %d\n", ret); - } -#endif - -#ifdef CONFIG_VIDEO_FB - /* Initialize and register the framebuffer driver */ - - ret = fb_register(0, 0); - if (ret < 0) - { - serr("ERROR: fb_register() failed: %d\n", ret); - } -#endif - - return ret; -} -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/x86/qemu/qemu-i486/src/qemu_boot.c b/boards/x86/qemu/qemu-i486/src/qemu_boot.c index 6fc224ab9572f..381dcf8a984da 100644 --- a/boards/x86/qemu/qemu-i486/src/qemu_boot.c +++ b/boards/x86/qemu/qemu-i486/src/qemu_boot.c @@ -28,6 +28,10 @@ #include +#include +#include + +#include #include #include @@ -66,3 +70,33 @@ void x86_boardinitialize(void) board_autoled_initialize(); #endif } + +/**************************************************************************** + * 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. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_LATE_INITIALIZE +void board_late_initialize(void) +{ +#ifdef CONFIG_FS_PROCFS + int ret = OK; + + /* Mount the proc filesystem */ + + ret = nx_mount(NULL, "/proc", "procfs", 0, NULL); + if (ret < 0) + { + serr("ERROR: Failed to mount procfs at %s: %d\n", "/proc", ret); + } +#endif +} +#endif /* CONFIG_BOARD_LATE_INITIALIZE */ diff --git a/boards/x86_64/qemu/qemu-intel64/configs/earlyfb/defconfig b/boards/x86_64/qemu/qemu-intel64/configs/earlyfb/defconfig index 469dcb0a77a8f..c0aa44d8e4581 100644 --- a/boards/x86_64/qemu/qemu-intel64/configs/earlyfb/defconfig +++ b/boards/x86_64/qemu/qemu-intel64/configs/earlyfb/defconfig @@ -32,7 +32,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LIBM=y CONFIG_MULTBOOT2_FB=y CONFIG_MULTBOOT2_FB_TERM=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFCONFIG=y CONFIG_NSH_DISABLE_IFUPDOWN=y diff --git a/boards/x86_64/qemu/qemu-intel64/configs/fb/defconfig b/boards/x86_64/qemu/qemu-intel64/configs/fb/defconfig index b0ae34dbdf0f2..7d0635ec26eda 100644 --- a/boards/x86_64/qemu/qemu-intel64/configs/fb/defconfig +++ b/boards/x86_64/qemu/qemu-intel64/configs/fb/defconfig @@ -43,7 +43,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LIBM=y CONFIG_MQ_MAXMSGSIZE=64 CONFIG_MULTBOOT2_FB=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFCONFIG=y CONFIG_NSH_DISABLE_IFUPDOWN=y diff --git a/boards/x86_64/qemu/qemu-intel64/configs/jumbo/defconfig b/boards/x86_64/qemu/qemu-intel64/configs/jumbo/defconfig index 1a1b855c7e22b..8304a6b9eb865 100644 --- a/boards/x86_64/qemu/qemu-intel64/configs/jumbo/defconfig +++ b/boards/x86_64/qemu/qemu-intel64/configs/jumbo/defconfig @@ -105,7 +105,6 @@ CONFIG_NET_PKT=y CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_READLINE=y CONFIG_NXMODBUS_ASCII=y diff --git a/boards/x86_64/qemu/qemu-intel64/configs/knsh_romfs/defconfig b/boards/x86_64/qemu/qemu-intel64/configs/knsh_romfs/defconfig index 1fa3461c84757..b9c40fb6080d7 100644 --- a/boards/x86_64/qemu/qemu-intel64/configs/knsh_romfs/defconfig +++ b/boards/x86_64/qemu/qemu-intel64/configs/knsh_romfs/defconfig @@ -38,7 +38,6 @@ CONFIG_ARCH_TEXT_VBASE=0x800000000 CONFIG_ARCH_X86_64=y CONFIG_BOARDCTL_APP_SYMTAB=y CONFIG_BOARDCTL_ROMDISK=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=4687108 CONFIG_BOOT_RUNFROMEXTSRAM=y CONFIG_BUILD_KERNEL=y @@ -62,7 +61,6 @@ CONFIG_LIBC_EXECFUNCS=y CONFIG_LIBM=y CONFIG_MM_KERNEL_HEAPSIZE=16384 CONFIG_MM_PGALLOC=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_DISABLE_IFCONFIG=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILE_APPS=y diff --git a/boards/x86_64/qemu/qemu-intel64/configs/knsh_romfs_pci/defconfig b/boards/x86_64/qemu/qemu-intel64/configs/knsh_romfs_pci/defconfig index 57cbbb40df976..3b9793d9fcbea 100644 --- a/boards/x86_64/qemu/qemu-intel64/configs/knsh_romfs_pci/defconfig +++ b/boards/x86_64/qemu/qemu-intel64/configs/knsh_romfs_pci/defconfig @@ -38,7 +38,6 @@ CONFIG_ARCH_X86_64=y CONFIG_BOARDCTL_APP_SYMTAB=y CONFIG_BOARDCTL_RESET=y CONFIG_BOARDCTL_ROMDISK=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=999 CONFIG_BOOT_RUNFROMEXTSRAM=y CONFIG_BUILD_KERNEL=y @@ -63,7 +62,6 @@ CONFIG_LIBC_EXECFUNCS=y CONFIG_LIBM=y CONFIG_MM_KERNEL_HEAPSIZE=16384 CONFIG_MM_PGALLOC=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_DISABLE_IFCONFIG=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILE_APPS=y diff --git a/boards/x86_64/qemu/qemu-intel64/configs/lvgl/defconfig b/boards/x86_64/qemu/qemu-intel64/configs/lvgl/defconfig index 2df35e393bf44..b63e95cf7bba3 100644 --- a/boards/x86_64/qemu/qemu-intel64/configs/lvgl/defconfig +++ b/boards/x86_64/qemu/qemu-intel64/configs/lvgl/defconfig @@ -44,7 +44,6 @@ CONFIG_LV_USE_LOG=y CONFIG_LV_USE_NUTTX=y CONFIG_LV_USE_NUTTX_TOUCHSCREEN=y CONFIG_MULTBOOT2_FB=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFCONFIG=y CONFIG_NSH_DISABLE_IFUPDOWN=y diff --git a/boards/x86_64/qemu/qemu-intel64/configs/nsh/defconfig b/boards/x86_64/qemu/qemu-intel64/configs/nsh/defconfig index 78877566c1bfa..dea7aa3295f6e 100644 --- a/boards/x86_64/qemu/qemu-intel64/configs/nsh/defconfig +++ b/boards/x86_64/qemu/qemu-intel64/configs/nsh/defconfig @@ -38,7 +38,6 @@ CONFIG_FS_PROCFS=y CONFIG_IDLETHREAD_STACKSIZE=4194304 CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LIBM=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFCONFIG=y CONFIG_NSH_DISABLE_IFUPDOWN=y diff --git a/boards/x86_64/qemu/qemu-intel64/configs/nsh_pci/defconfig b/boards/x86_64/qemu/qemu-intel64/configs/nsh_pci/defconfig index 31b67e7d41222..b212905677e55 100644 --- a/boards/x86_64/qemu/qemu-intel64/configs/nsh_pci/defconfig +++ b/boards/x86_64/qemu/qemu-intel64/configs/nsh_pci/defconfig @@ -39,7 +39,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTEL64_HPET_MIN_DELAY=10 CONFIG_INTEL64_ONESHOT=y CONFIG_LIBM=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_PCI=y CONFIG_PCI_MSIX=y diff --git a/boards/x86_64/qemu/qemu-intel64/configs/nsh_pci_smp/defconfig b/boards/x86_64/qemu/qemu-intel64/configs/nsh_pci_smp/defconfig index 4981cca81f2f6..c9cabb9144ea5 100644 --- a/boards/x86_64/qemu/qemu-intel64/configs/nsh_pci_smp/defconfig +++ b/boards/x86_64/qemu/qemu-intel64/configs/nsh_pci_smp/defconfig @@ -41,7 +41,6 @@ CONFIG_INTEL64_ONESHOT=y CONFIG_IOB_NCHAINS=255 CONFIG_LIBM=y CONFIG_MM_IOB=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_PCI=y CONFIG_PCI_MSIX=y diff --git a/boards/x86_64/qemu/qemu-intel64/src/CMakeLists.txt b/boards/x86_64/qemu/qemu-intel64/src/CMakeLists.txt index 32157581292f5..3ab2d5cd52a05 100644 --- a/boards/x86_64/qemu/qemu-intel64/src/CMakeLists.txt +++ b/boards/x86_64/qemu/qemu-intel64/src/CMakeLists.txt @@ -20,11 +20,7 @@ # # ############################################################################## -set(SRCS qemu_boot.c qemu_bringup.c qemu_net.c) - -if(CONFIG_BOARDCTL) - list(APPEND SRCS qemu_appinit.c) -endif() +set(SRCS qemu_boot.c qemu_bringup.c qemu_net.c qemu_boardinit.c) if(CONFIG_BOARDCTL_RESET) list(APPEND SRCS qemu_reset.c) diff --git a/boards/x86_64/qemu/qemu-intel64/src/Makefile b/boards/x86_64/qemu/qemu-intel64/src/Makefile index 45f3f9f23b357..41518289d38e0 100644 --- a/boards/x86_64/qemu/qemu-intel64/src/Makefile +++ b/boards/x86_64/qemu/qemu-intel64/src/Makefile @@ -22,13 +22,9 @@ include $(TOPDIR)/Make.defs -CSRCS = qemu_boot.c qemu_bringup.c qemu_net.c +CSRCS = qemu_boot.c qemu_bringup.c qemu_net.c qemu_boardinit.c CSRCS += $(if $(wildcard romfs_boot.c), romfs_boot.c, romfs_stub.c) -ifeq ($(CONFIG_BOARDCTL),y) - CSRCS += qemu_appinit.c -endif - ifeq ($(CONFIG_BOARDCTL_RESET),y) CSRCS += qemu_reset.c endif diff --git a/boards/x86_64/qemu/qemu-intel64/src/qemu_appinit.c b/boards/x86_64/qemu/qemu-intel64/src/qemu_boardinit.c similarity index 69% rename from boards/x86_64/qemu/qemu-intel64/src/qemu_appinit.c rename to boards/x86_64/qemu/qemu-intel64/src/qemu_boardinit.c index 82c7ea250d390..550b80de56896 100644 --- a/boards/x86_64/qemu/qemu-intel64/src/qemu_appinit.c +++ b/boards/x86_64/qemu/qemu-intel64/src/qemu_boardinit.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/x86_64/qemu/qemu-intel64/src/qemu_appinit.c + * boards/x86_64/qemu/qemu-intel64/src/qemu_boardinit.c * * SPDX-License-Identifier: Apache-2.0 * @@ -54,44 +54,6 @@ * 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 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 qemu_bringup(); -#endif -} - /**************************************************************************** * Name: board_late_initialize * @@ -111,6 +73,7 @@ int board_app_initialize(uintptr_t arg) * ****************************************************************************/ +#ifdef CONFIG_BOARD_LATE_INITIALIZE void board_late_initialize(void) { int ret = OK; @@ -137,3 +100,4 @@ void board_late_initialize(void) } } } +#endif diff --git a/boards/xtensa/esp32/esp32-2432S028/configs/lvgl/defconfig b/boards/xtensa/esp32/esp32-2432S028/configs/lvgl/defconfig index e842db569c234..6bc2e7264a3df 100644 --- a/boards/xtensa/esp32/esp32-2432S028/configs/lvgl/defconfig +++ b/boards/xtensa/esp32/esp32-2432S028/configs/lvgl/defconfig @@ -49,7 +49,6 @@ CONFIG_LV_USE_NUTTX=y CONFIG_LV_USE_NUTTX_LCD=y CONFIG_LV_USE_NUTTX_TOUCHSCREEN=y CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-2432S028/configs/nsh/defconfig b/boards/xtensa/esp32/esp32-2432S028/configs/nsh/defconfig index 829c691761f3c..11894d0b44493 100644 --- a/boards/xtensa/esp32/esp32-2432S028/configs/nsh/defconfig +++ b/boards/xtensa/esp32/esp32-2432S028/configs/nsh/defconfig @@ -31,7 +31,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-2432S028/src/Make.defs b/boards/xtensa/esp32/esp32-2432S028/src/Make.defs index 2a1195a79c767..b1c9c38b3dedd 100644 --- a/boards/xtensa/esp32/esp32-2432S028/src/Make.defs +++ b/boards/xtensa/esp32/esp32-2432S028/src/Make.defs @@ -22,12 +22,9 @@ CSRCS = esp32_boot.c esp32_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += esp32_appinit.c ifeq ($(CONFIG_BOARDCTL_RESET),y) CSRCS += esp32_reset.c endif -endif DEPPATH += --dep-path board VPATH += :board diff --git a/boards/xtensa/esp32/esp32-2432S028/src/esp32-2432S028.h b/boards/xtensa/esp32/esp32-2432S028/src/esp32-2432S028.h index 027ec6c2d5727..2223bcff29fca 100644 --- a/boards/xtensa/esp32/esp32-2432S028/src/esp32-2432S028.h +++ b/boards/xtensa/esp32/esp32-2432S028/src/esp32-2432S028.h @@ -87,9 +87,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 esp32_bringup(void); diff --git a/boards/xtensa/esp32/esp32-2432S028/src/esp32_appinit.c b/boards/xtensa/esp32/esp32-2432S028/src/esp32_appinit.c deleted file mode 100644 index 11620018d9ba6..0000000000000 --- a/boards/xtensa/esp32/esp32-2432S028/src/esp32_appinit.c +++ /dev/null @@ -1,82 +0,0 @@ -/**************************************************************************** - * boards/xtensa/esp32/esp32-2432S028/src/esp32_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 - -#include -#include - -#include "esp32-2432S028.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 esp32_bringup(); -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/xtensa/esp32/esp32-audio-kit/configs/audio/defconfig b/boards/xtensa/esp32/esp32-audio-kit/configs/audio/defconfig index d1797ff4e0b3b..026c9c1293ce2 100644 --- a/boards/xtensa/esp32/esp32-audio-kit/configs/audio/defconfig +++ b/boards/xtensa/esp32/esp32-audio-kit/configs/audio/defconfig @@ -92,7 +92,6 @@ CONFIG_NET_TCP=y CONFIG_NET_TCP_DELAYED_ACK=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-audio-kit/configs/nsh/defconfig b/boards/xtensa/esp32/esp32-audio-kit/configs/nsh/defconfig index 09ce681345e1c..3de646f9a14ab 100644 --- a/boards/xtensa/esp32/esp32-audio-kit/configs/nsh/defconfig +++ b/boards/xtensa/esp32/esp32-audio-kit/configs/nsh/defconfig @@ -32,7 +32,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-audio-kit/configs/wifi/defconfig b/boards/xtensa/esp32/esp32-audio-kit/configs/wifi/defconfig index 9f827f3575189..18c57f34ccd29 100644 --- a/boards/xtensa/esp32/esp32-audio-kit/configs/wifi/defconfig +++ b/boards/xtensa/esp32/esp32-audio-kit/configs/wifi/defconfig @@ -66,7 +66,6 @@ CONFIG_NET_TCP=y CONFIG_NET_TCP_DELAYED_ACK=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-audio-kit/src/Make.defs b/boards/xtensa/esp32/esp32-audio-kit/src/Make.defs index 08b0e170c4e3b..bbfe360d7364e 100644 --- a/boards/xtensa/esp32/esp32-audio-kit/src/Make.defs +++ b/boards/xtensa/esp32/esp32-audio-kit/src/Make.defs @@ -26,12 +26,9 @@ ifeq ($(CONFIG_USERLED),y) CSRCS += esp32_userleds.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += esp32_appinit.c ifeq ($(CONFIG_BOARDCTL_RESET),y) CSRCS += esp32_reset.c endif -endif ifeq ($(CONFIG_DEV_GPIO),y) CSRCS += esp32_gpio.c diff --git a/boards/xtensa/esp32/esp32-audio-kit/src/esp32-audio-kit.h b/boards/xtensa/esp32/esp32-audio-kit/src/esp32-audio-kit.h index a042aa708dd85..f8e3786cbbe6f 100644 --- a/boards/xtensa/esp32/esp32-audio-kit/src/esp32-audio-kit.h +++ b/boards/xtensa/esp32/esp32-audio-kit/src/esp32-audio-kit.h @@ -99,9 +99,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 esp32_bringup(void); diff --git a/boards/xtensa/esp32/esp32-audio-kit/src/esp32_appinit.c b/boards/xtensa/esp32/esp32-audio-kit/src/esp32_appinit.c deleted file mode 100644 index 06c43572d40c3..0000000000000 --- a/boards/xtensa/esp32/esp32-audio-kit/src/esp32_appinit.c +++ /dev/null @@ -1,82 +0,0 @@ -/**************************************************************************** - * boards/xtensa/esp32/esp32-audio-kit/src/esp32_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 - -#include -#include - -#include "esp32-audio-kit.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 esp32_bringup(); -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/adc/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/adc/defconfig index c00de04173ffc..b8ca459b6a634 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/adc/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/adc/defconfig @@ -35,7 +35,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/audio/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/audio/defconfig index d865248dcab77..5e7de2a295861 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/audio/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/audio/defconfig @@ -92,7 +92,6 @@ CONFIG_NET_TCP=y CONFIG_NET_TCP_DELAYED_ACK=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/autopm/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/autopm/defconfig index 34a23d971b4a1..dde80539d8b02 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/autopm/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/autopm/defconfig @@ -56,7 +56,6 @@ CONFIG_NET_ETH_PKTSIZE=1514 CONFIG_NET_ICMP_SOCKET=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/ble/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/ble/defconfig index c50eb3ad70847..f9794f948040b 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/ble/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/ble/defconfig @@ -41,13 +41,12 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_MM_REGIONS=3 +CONFIG_MM_REGIONS=4 CONFIG_MTD_PARTITION_NAMES=y CONFIG_NETDEV_LATEINIT=y CONFIG_NET_BLUETOOTH=y CONFIG_NET_SOCKOPTS=y CONFIG_NET_TCP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/blewifi/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/blewifi/defconfig index b35bd5a3b1095..9370c728d6182 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/blewifi/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/blewifi/defconfig @@ -75,7 +75,6 @@ CONFIG_NET_TCP=y CONFIG_NET_TCP_DELAYED_ACK=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/bmp280/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/bmp280/defconfig index 42b780ced38b1..604e39e9c16c3 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/bmp280/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/bmp280/defconfig @@ -41,7 +41,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/brickmatch/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/brickmatch/defconfig index de0cf482f5d5b..cc0d78b594f42 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/brickmatch/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/brickmatch/defconfig @@ -20,7 +20,6 @@ CONFIG_ARCH_MINIMAL_VECTORTABLE_DYNAMIC=y CONFIG_ARCH_NUSER_INTERRUPTS=2 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_XTENSA=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y CONFIG_DRIVERS_VIDEO=y @@ -42,7 +41,6 @@ CONFIG_LCD_FRAMEBUFFER=y CONFIG_LCD_NOGETRUN=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/buttons/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/buttons/defconfig index 7a03e43e2db6f..ad889f0eefd23 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/buttons/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/buttons/defconfig @@ -38,7 +38,6 @@ CONFIG_INPUT_BUTTONS=y CONFIG_INPUT_BUTTONS_LOWER=y CONFIG_INTELHEX_BINARY=y CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/capture/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/capture/defconfig index 7f6c6d5333e2d..5481e2a54f4eb 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/capture/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/capture/defconfig @@ -37,7 +37,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/crypto/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/crypto/defconfig index 31e8fd864a61f..1c2f3fd19c574 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/crypto/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/crypto/defconfig @@ -42,7 +42,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/cxx/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/cxx/defconfig index 2b933afeac698..ddd5e0cb85c26 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/cxx/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/cxx/defconfig @@ -38,7 +38,6 @@ CONFIG_LIBC_MAX_EXITFUNS=1 CONFIG_LIBM=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/dac/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/dac/defconfig index 18f58144abd21..df21d7eaf6b68 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/dac/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/dac/defconfig @@ -35,7 +35,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/efuse/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/efuse/defconfig index bb19f9d83aa00..5d8eff474324e 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/efuse/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/efuse/defconfig @@ -37,7 +37,6 @@ CONFIG_LINE_MAX=300 CONFIG_MM_REGIONS=3 CONFIG_NAME_MAX=48 CONFIG_NETUTILS_CJSON=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/elf/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/elf/defconfig index d805be003e548..9399c469df681 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/elf/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/elf/defconfig @@ -45,7 +45,6 @@ CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/espnow/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/espnow/defconfig index e3a127df96010..1c3ade1effc96 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/espnow/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/espnow/defconfig @@ -63,7 +63,6 @@ CONFIG_NET_STATISTICS=y CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/i2schar/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/i2schar/defconfig index c5124a41251ea..7a212290e7476 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/i2schar/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/i2schar/defconfig @@ -48,7 +48,6 @@ CONFIG_INIT_STACKSIZE=4096 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/knsh/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/knsh/defconfig index 074741effeca5..4bb681003f68d 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/knsh/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/knsh/defconfig @@ -42,7 +42,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 CONFIG_NDEBUG=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/leds/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/leds/defconfig index 922e86a72d5b8..dd315f668b2dc 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/leds/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/leds/defconfig @@ -33,7 +33,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/match4/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/match4/defconfig index 3de79d233cad8..9753505e6162a 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/match4/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/match4/defconfig @@ -20,7 +20,6 @@ CONFIG_ARCH_MINIMAL_VECTORTABLE_DYNAMIC=y CONFIG_ARCH_NUSER_INTERRUPTS=2 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_XTENSA=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y CONFIG_DEV_GPIO=y @@ -39,7 +38,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/max6675/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/max6675/defconfig index d1b0aa4a2cbe2..cd2a729ad2c0b 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/max6675/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/max6675/defconfig @@ -35,7 +35,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/mcp2515/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/mcp2515/defconfig index 2d68e5782dca3..1bda8bea194a3 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/mcp2515/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/mcp2515/defconfig @@ -39,7 +39,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/mcuboot_nsh/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/mcuboot_nsh/defconfig index ff76998156582..075e4498eca35 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/mcuboot_nsh/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/mcuboot_nsh/defconfig @@ -33,7 +33,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/mcuboot_slot_confirm/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/mcuboot_slot_confirm/defconfig index 95abbd6730ddf..9fb3770a45788 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/mcuboot_slot_confirm/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/mcuboot_slot_confirm/defconfig @@ -37,7 +37,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_MOTD=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/mcuboot_update_agent/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/mcuboot_update_agent/defconfig index e4dcbce029eae..45f8feb6ea1a4 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/mcuboot_update_agent/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/mcuboot_update_agent/defconfig @@ -48,7 +48,7 @@ CONFIG_IOB_NBUFFERS=100 CONFIG_IOB_NCHAINS=32 CONFIG_IOB_THROTTLE=40 CONFIG_LINE_MAX=64 -CONFIG_MM_REGIONS=4 +CONFIG_MM_REGIONS=5 CONFIG_NAME_MAX=48 CONFIG_NETDB_DNSCLIENT=y CONFIG_NETDB_DNSCLIENT_NAMESIZE=64 @@ -68,7 +68,6 @@ CONFIG_NET_TCP=y CONFIG_NET_TCP_DELAYED_ACK=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_MOTD=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/modbus/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/modbus/defconfig index c99b2fff83adf..6aee3c997b799 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/modbus/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/modbus/defconfig @@ -42,7 +42,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/module/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/module/defconfig index 42753590d3b28..5bfb093237f4c 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/module/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/module/defconfig @@ -45,7 +45,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 CONFIG_MODULE=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/motor/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/motor/defconfig index 925dafb1c77c8..9e247469d574d 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/motor/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/motor/defconfig @@ -36,7 +36,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/mqttc/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/mqttc/defconfig index 4d3d1b6eea3f6..37798e0d2fbe3 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/mqttc/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/mqttc/defconfig @@ -59,7 +59,6 @@ CONFIG_NET_TCP=y CONFIG_NET_TCP_NOTIFIER=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/ms5611/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/ms5611/defconfig index fef8e2169acea..8a5067252a7eb 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/ms5611/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/ms5611/defconfig @@ -41,7 +41,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 CONFIG_MS56XX_I2C_FREQUENCY=100000 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/nsh/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/nsh/defconfig index 7229836adddda..40c3293875bac 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/nsh/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/nsh/defconfig @@ -32,7 +32,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/nvblk/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/nvblk/defconfig index 5e2e8aaf5b325..519b8ea019d7b 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/nvblk/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/nvblk/defconfig @@ -45,7 +45,6 @@ CONFIG_LIBC_STRERROR=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 CONFIG_MTD_NVBLK=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/nxdiag/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/nxdiag/defconfig index a0f0a6a95bfc4..4458f7433ccac 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/nxdiag/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/nxdiag/defconfig @@ -32,7 +32,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/nxlooper/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/nxlooper/defconfig index 85b6d4e3ce2fc..71c0575997fd4 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/nxlooper/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/nxlooper/defconfig @@ -93,7 +93,6 @@ CONFIG_NET_TCP=y CONFIG_NET_TCP_DELAYED_ACK=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/oneshot/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/oneshot/defconfig index efdef29a9e2c7..9ce19e38476ad 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/oneshot/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/oneshot/defconfig @@ -39,7 +39,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/ostest/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/ostest/defconfig index 80274fc731da4..62d74361d29ac 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/ostest/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/ostest/defconfig @@ -33,7 +33,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/pm/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/pm/defconfig index 454424f7366a9..0c8fc2a6ee98d 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/pm/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/pm/defconfig @@ -33,7 +33,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/psram/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/psram/defconfig index d87efcca7d3b5..9425a67ebbf53 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/psram/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/psram/defconfig @@ -41,7 +41,6 @@ CONFIG_IOB_THROTTLE=8 CONFIG_LINE_MAX=64 CONFIG_MM_IOB=y CONFIG_MM_REGIONS=5 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/psram_usrheap/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/psram_usrheap/defconfig index be80b959edce8..3abf1e2f22df0 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/psram_usrheap/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/psram_usrheap/defconfig @@ -21,7 +21,6 @@ CONFIG_ARCH_MINIMAL_VECTORTABLE_DYNAMIC=y CONFIG_ARCH_NUSER_INTERRUPTS=2 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_XTENSA=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y CONFIG_ESP32_SPIFLASH=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/pwm/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/pwm/defconfig index 6636af7ad868a..12bd8c90c61de 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/pwm/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/pwm/defconfig @@ -41,7 +41,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/qemu_openeth/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/qemu_openeth/defconfig index 2235c0516f5bb..e138babc2a848 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/qemu_openeth/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/qemu_openeth/defconfig @@ -50,7 +50,6 @@ CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_NPOLLWAITERS=8 CONFIG_NET_UDP_WRITE_BUFFERS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/qencoder/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/qencoder/defconfig index eca38fb91a634..a51da27ae1e46 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/qencoder/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/qencoder/defconfig @@ -41,7 +41,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/random/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/random/defconfig index 963056498d32b..e77ea0d6ea8d1 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/random/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/random/defconfig @@ -34,7 +34,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/rmt/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/rmt/defconfig index 6a6087c4fbc94..595419655d383 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/rmt/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/rmt/defconfig @@ -35,7 +35,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/romfs/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/romfs/defconfig index 62c050b45cd26..6a2280e1a3a12 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/romfs/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/romfs/defconfig @@ -34,7 +34,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/rtc/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/rtc/defconfig index fb8fecd026a5d..8a3a8d5e2d405 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/rtc/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/rtc/defconfig @@ -33,7 +33,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/sdm/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/sdm/defconfig index a7a80389a8b2d..be29e64742bd6 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/sdm/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/sdm/defconfig @@ -34,7 +34,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/sdmmc_spi/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/sdmmc_spi/defconfig index a9e39b5a1773e..01172aa810791 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/sdmmc_spi/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/sdmmc_spi/defconfig @@ -42,7 +42,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MMCSD=y CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_MMCSDSPIPORTNO=3 diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/smp/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/smp/defconfig index e1fbe7c830dba..635735e8d3c6a 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/smp/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/smp/defconfig @@ -36,8 +36,7 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_MM_REGIONS=4 -CONFIG_NSH_ARCHINIT=y +CONFIG_MM_REGIONS=5 CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/snake/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/snake/defconfig index 2811e201e7afd..2d0a7689c8e1f 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/snake/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/snake/defconfig @@ -20,7 +20,6 @@ CONFIG_ARCH_MINIMAL_VECTORTABLE_DYNAMIC=y CONFIG_ARCH_NUSER_INTERRUPTS=2 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_XTENSA=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y CONFIG_DEV_GPIO=y @@ -40,7 +39,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/softap/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/softap/defconfig index 5f6574438e537..9d8ba60acfb78 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/softap/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/softap/defconfig @@ -58,7 +58,6 @@ CONFIG_NET_BROADCAST=y CONFIG_NET_ETH_PKTSIZE=1514 CONFIG_NET_ICMP_SOCKET=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/sotest/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/sotest/defconfig index 4613278bfbe23..303941504c932 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/sotest/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/sotest/defconfig @@ -46,7 +46,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_DLFCN=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/spiflash/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/spiflash/defconfig index e666a7c4a4fdd..634e3e17050c2 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/spiflash/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/spiflash/defconfig @@ -33,8 +33,7 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_MM_REGIONS=4 -CONFIG_NSH_ARCHINIT=y +CONFIG_MM_REGIONS=5 CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_LOSMART=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/sta_softap/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/sta_softap/defconfig index d43e2d6f3a46d..a206cbba6ec13 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/sta_softap/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/sta_softap/defconfig @@ -46,7 +46,7 @@ CONFIG_IOB_NBUFFERS=100 CONFIG_IOB_NCHAINS=32 CONFIG_IOB_THROTTLE=40 CONFIG_LINE_MAX=300 -CONFIG_MM_REGIONS=4 +CONFIG_MM_REGIONS=5 CONFIG_NAME_MAX=48 CONFIG_NETDB_DNSCLIENT=y CONFIG_NETDB_DNSCLIENT_NAMESIZE=64 @@ -64,7 +64,6 @@ CONFIG_NET_TCP=y CONFIG_NET_TCP_DELAYED_ACK=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/tickless/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/tickless/defconfig index dc94c00b8ff4c..1981a2f0bbe02 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/tickless/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/tickless/defconfig @@ -33,7 +33,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/timer/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/timer/defconfig index e168dbd6fbf7a..f997fbe39042f 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/timer/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/timer/defconfig @@ -37,7 +37,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/twai/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/twai/defconfig index ac8bd5cb54483..0b3c60e880353 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/twai/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/twai/defconfig @@ -34,7 +34,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/wamr_wasi_debug/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/wamr_wasi_debug/defconfig index 69706fac65f31..cfe838323d776 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/wamr_wasi_debug/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/wamr_wasi_debug/defconfig @@ -86,7 +86,6 @@ CONFIG_NET_SOLINGER=y CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_PRINTF=y CONFIG_NSH_DISABLE_TRUNCATE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/watchdog/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/watchdog/defconfig index f3606881e4ee9..89c9e4273d622 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/watchdog/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/watchdog/defconfig @@ -36,7 +36,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/watcher/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/watcher/defconfig index b8efc346f4679..f8a6386432528 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/watcher/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/watcher/defconfig @@ -36,7 +36,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/wifi/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/wifi/defconfig index 3fc57e92d63b6..66fe62b7dd81c 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/wifi/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/wifi/defconfig @@ -44,7 +44,7 @@ CONFIG_IOB_NBUFFERS=100 CONFIG_IOB_NCHAINS=32 CONFIG_IOB_THROTTLE=40 CONFIG_LINE_MAX=300 -CONFIG_MM_REGIONS=4 +CONFIG_MM_REGIONS=5 CONFIG_NAME_MAX=48 CONFIG_NETDB_DNSCLIENT=y CONFIG_NETDB_DNSCLIENT_NAMESIZE=64 @@ -61,7 +61,6 @@ CONFIG_NET_TCP=y CONFIG_NET_TCP_DELAYED_ACK=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/wifi_smp/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/wifi_smp/defconfig index 5b171f93e1eb0..7b5c910ff3343 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/wifi_smp/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/wifi_smp/defconfig @@ -52,7 +52,7 @@ CONFIG_IOB_NBUFFERS=100 CONFIG_IOB_NCHAINS=32 CONFIG_IOB_THROTTLE=40 CONFIG_LINE_MAX=300 -CONFIG_MM_REGIONS=4 +CONFIG_MM_REGIONS=5 CONFIG_NAME_MAX=48 CONFIG_NETDB_DNSCLIENT=y CONFIG_NETDB_DNSCLIENT_NAMESIZE=64 @@ -76,7 +76,6 @@ CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NFS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_CODECS_BUFSIZE=2048 CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/wifinsh/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/wifinsh/defconfig index 3fc38c9a13cf5..588965479a820 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/wifinsh/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/wifinsh/defconfig @@ -63,7 +63,6 @@ CONFIG_NET_TCP=y CONFIG_NET_TCP_DELAYED_ACK=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/wifishare/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/wifishare/defconfig index b0c36e803e233..5d53e4acdfb90 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/wifishare/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/wifishare/defconfig @@ -73,7 +73,6 @@ CONFIG_NET_TCP=y CONFIG_NET_TCP_DELAYED_ACK=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-devkitc/src/Make.defs b/boards/xtensa/esp32/esp32-devkitc/src/Make.defs index 16b4cddaa6689..8b6af076f9875 100644 --- a/boards/xtensa/esp32/esp32-devkitc/src/Make.defs +++ b/boards/xtensa/esp32/esp32-devkitc/src/Make.defs @@ -22,12 +22,9 @@ CSRCS = esp32_boot.c esp32_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += esp32_appinit.c ifeq ($(CONFIG_BOARDCTL_RESET),y) CSRCS += esp32_reset.c endif -endif ifeq ($(CONFIG_DEV_GPIO),y) CSRCS += esp32_gpio.c diff --git a/boards/xtensa/esp32/esp32-devkitc/src/esp32-devkitc.h b/boards/xtensa/esp32/esp32-devkitc/src/esp32-devkitc.h index cb3aa58609f66..9a7708bd56501 100644 --- a/boards/xtensa/esp32/esp32-devkitc/src/esp32-devkitc.h +++ b/boards/xtensa/esp32/esp32-devkitc/src/esp32-devkitc.h @@ -104,9 +104,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 esp32_bringup(void); diff --git a/boards/xtensa/esp32/esp32-devkitc/src/esp32_appinit.c b/boards/xtensa/esp32/esp32-devkitc/src/esp32_appinit.c deleted file mode 100644 index a6ae085adaa25..0000000000000 --- a/boards/xtensa/esp32/esp32-devkitc/src/esp32_appinit.c +++ /dev/null @@ -1,82 +0,0 @@ -/**************************************************************************** - * boards/xtensa/esp32/esp32-devkitc/src/esp32_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 - -#include -#include - -#include "esp32-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 esp32_bringup(); -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/xtensa/esp32/esp32-ethernet-kit/configs/autopm/defconfig b/boards/xtensa/esp32/esp32-ethernet-kit/configs/autopm/defconfig index c4d2b0109aa57..556fd96dcac4c 100644 --- a/boards/xtensa/esp32/esp32-ethernet-kit/configs/autopm/defconfig +++ b/boards/xtensa/esp32/esp32-ethernet-kit/configs/autopm/defconfig @@ -55,7 +55,6 @@ CONFIG_NET_ETH_PKTSIZE=1514 CONFIG_NET_ICMP_SOCKET=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-ethernet-kit/configs/buttons/defconfig b/boards/xtensa/esp32/esp32-ethernet-kit/configs/buttons/defconfig index 65621a1ad25cb..ff99b9c3e79dd 100644 --- a/boards/xtensa/esp32/esp32-ethernet-kit/configs/buttons/defconfig +++ b/boards/xtensa/esp32/esp32-ethernet-kit/configs/buttons/defconfig @@ -38,7 +38,6 @@ CONFIG_INPUT_BUTTONS_LOWER=y CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-ethernet-kit/configs/ethernet/defconfig b/boards/xtensa/esp32/esp32-ethernet-kit/configs/ethernet/defconfig index e8a99d074db94..3a44089dc12c7 100644 --- a/boards/xtensa/esp32/esp32-ethernet-kit/configs/ethernet/defconfig +++ b/boards/xtensa/esp32/esp32-ethernet-kit/configs/ethernet/defconfig @@ -47,7 +47,6 @@ CONFIG_NET_ICMP_SOCKET=y CONFIG_NET_TCP=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-ethernet-kit/configs/nsh/defconfig b/boards/xtensa/esp32/esp32-ethernet-kit/configs/nsh/defconfig index 0370a7727f0bb..cca737a14e5b7 100644 --- a/boards/xtensa/esp32/esp32-ethernet-kit/configs/nsh/defconfig +++ b/boards/xtensa/esp32/esp32-ethernet-kit/configs/nsh/defconfig @@ -31,7 +31,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-ethernet-kit/configs/oneshot/defconfig b/boards/xtensa/esp32/esp32-ethernet-kit/configs/oneshot/defconfig index 6421764a44740..e4c786eff6a39 100644 --- a/boards/xtensa/esp32/esp32-ethernet-kit/configs/oneshot/defconfig +++ b/boards/xtensa/esp32/esp32-ethernet-kit/configs/oneshot/defconfig @@ -38,7 +38,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-ethernet-kit/configs/rtc/defconfig b/boards/xtensa/esp32/esp32-ethernet-kit/configs/rtc/defconfig index bcdc0adad4717..fa53ecf5543e8 100644 --- a/boards/xtensa/esp32/esp32-ethernet-kit/configs/rtc/defconfig +++ b/boards/xtensa/esp32/esp32-ethernet-kit/configs/rtc/defconfig @@ -32,7 +32,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-ethernet-kit/configs/wifi/defconfig b/boards/xtensa/esp32/esp32-ethernet-kit/configs/wifi/defconfig index 695083abb9fd6..09552fa21d17b 100644 --- a/boards/xtensa/esp32/esp32-ethernet-kit/configs/wifi/defconfig +++ b/boards/xtensa/esp32/esp32-ethernet-kit/configs/wifi/defconfig @@ -54,7 +54,6 @@ CONFIG_NET_ETH_PKTSIZE=1514 CONFIG_NET_ICMP_SOCKET=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-ethernet-kit/src/Make.defs b/boards/xtensa/esp32/esp32-ethernet-kit/src/Make.defs index 863d57f96cd98..7be02889f1a3e 100644 --- a/boards/xtensa/esp32/esp32-ethernet-kit/src/Make.defs +++ b/boards/xtensa/esp32/esp32-ethernet-kit/src/Make.defs @@ -22,12 +22,9 @@ CSRCS = esp32_boot.c esp32_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += esp32_appinit.c ifeq ($(CONFIG_BOARDCTL_RESET),y) CSRCS += esp32_reset.c endif -endif ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += esp32_buttons.c diff --git a/boards/xtensa/esp32/esp32-ethernet-kit/src/esp32-ethernet-kit.h b/boards/xtensa/esp32/esp32-ethernet-kit/src/esp32-ethernet-kit.h index 288914677291a..e12c0080da449 100644 --- a/boards/xtensa/esp32/esp32-ethernet-kit/src/esp32-ethernet-kit.h +++ b/boards/xtensa/esp32/esp32-ethernet-kit/src/esp32-ethernet-kit.h @@ -76,9 +76,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 esp32_bringup(void); diff --git a/boards/xtensa/esp32/esp32-ethernet-kit/src/esp32_appinit.c b/boards/xtensa/esp32/esp32-ethernet-kit/src/esp32_appinit.c deleted file mode 100644 index cb24b96828e84..0000000000000 --- a/boards/xtensa/esp32/esp32-ethernet-kit/src/esp32_appinit.c +++ /dev/null @@ -1,82 +0,0 @@ -/**************************************************************************** - * boards/xtensa/esp32/esp32-ethernet-kit/src/esp32_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 - -#include -#include - -#include "esp32-ethernet-kit.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 esp32_bringup(); -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/xtensa/esp32/esp32-lyrat/configs/audio/defconfig b/boards/xtensa/esp32/esp32-lyrat/configs/audio/defconfig index eac5fe096a208..f0c163ab32240 100644 --- a/boards/xtensa/esp32/esp32-lyrat/configs/audio/defconfig +++ b/boards/xtensa/esp32/esp32-lyrat/configs/audio/defconfig @@ -91,7 +91,6 @@ CONFIG_NET_TCP=y CONFIG_NET_TCP_DELAYED_ACK=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-lyrat/configs/buttons/defconfig b/boards/xtensa/esp32/esp32-lyrat/configs/buttons/defconfig index 0d3fa0d35c0c9..dc256c29f27ad 100644 --- a/boards/xtensa/esp32/esp32-lyrat/configs/buttons/defconfig +++ b/boards/xtensa/esp32/esp32-lyrat/configs/buttons/defconfig @@ -42,7 +42,6 @@ CONFIG_INPUT_BUTTONS_LOWER=y CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-lyrat/configs/nsh/defconfig b/boards/xtensa/esp32/esp32-lyrat/configs/nsh/defconfig index d351fbac6c607..8bf938dcf5c2a 100644 --- a/boards/xtensa/esp32/esp32-lyrat/configs/nsh/defconfig +++ b/boards/xtensa/esp32/esp32-lyrat/configs/nsh/defconfig @@ -32,7 +32,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-lyrat/configs/nxrecorder/defconfig b/boards/xtensa/esp32/esp32-lyrat/configs/nxrecorder/defconfig index 6065c2e632f5a..90b5443d0935a 100644 --- a/boards/xtensa/esp32/esp32-lyrat/configs/nxrecorder/defconfig +++ b/boards/xtensa/esp32/esp32-lyrat/configs/nxrecorder/defconfig @@ -66,7 +66,6 @@ CONFIG_LINE_MAX=300 CONFIG_MMCSD=y CONFIG_MM_REGIONS=3 CONFIG_NAME_MAX=48 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_MMCSDSPIPORTNO=2 diff --git a/boards/xtensa/esp32/esp32-lyrat/configs/rtptools/defconfig b/boards/xtensa/esp32/esp32-lyrat/configs/rtptools/defconfig index 45dcf427807e4..eac1817eb736e 100644 --- a/boards/xtensa/esp32/esp32-lyrat/configs/rtptools/defconfig +++ b/boards/xtensa/esp32/esp32-lyrat/configs/rtptools/defconfig @@ -99,7 +99,6 @@ CONFIG_NET_TCP_DELAYED_ACK=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_WRITE_BUFFERS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-lyrat/configs/sdmmc_spi/defconfig b/boards/xtensa/esp32/esp32-lyrat/configs/sdmmc_spi/defconfig index c50407f9536b4..673332b1f4843 100644 --- a/boards/xtensa/esp32/esp32-lyrat/configs/sdmmc_spi/defconfig +++ b/boards/xtensa/esp32/esp32-lyrat/configs/sdmmc_spi/defconfig @@ -46,7 +46,6 @@ CONFIG_LINE_MAX=64 CONFIG_MMCSD=y CONFIG_MMCSD_SPICLOCK=4000000 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_MMCSDSPIPORTNO=2 diff --git a/boards/xtensa/esp32/esp32-lyrat/configs/wifi/defconfig b/boards/xtensa/esp32/esp32-lyrat/configs/wifi/defconfig index b262f72b2e5c8..8c308ff466fb7 100644 --- a/boards/xtensa/esp32/esp32-lyrat/configs/wifi/defconfig +++ b/boards/xtensa/esp32/esp32-lyrat/configs/wifi/defconfig @@ -66,7 +66,6 @@ CONFIG_NET_TCP=y CONFIG_NET_TCP_DELAYED_ACK=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-lyrat/src/Make.defs b/boards/xtensa/esp32/esp32-lyrat/src/Make.defs index 151ba475de3d8..4d0b9eb99f0e1 100644 --- a/boards/xtensa/esp32/esp32-lyrat/src/Make.defs +++ b/boards/xtensa/esp32/esp32-lyrat/src/Make.defs @@ -26,12 +26,9 @@ ifeq ($(CONFIG_USERLED),y) CSRCS += esp32_userleds.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += esp32_appinit.c ifeq ($(CONFIG_BOARDCTL_RESET),y) CSRCS += esp32_reset.c endif -endif ifeq ($(CONFIG_DEV_GPIO),y) CSRCS += esp32_gpio.c diff --git a/boards/xtensa/esp32/esp32-lyrat/src/esp32-lyrat.h b/boards/xtensa/esp32/esp32-lyrat/src/esp32-lyrat.h index dad3cc92e24e2..80130f76df6e5 100644 --- a/boards/xtensa/esp32/esp32-lyrat/src/esp32-lyrat.h +++ b/boards/xtensa/esp32/esp32-lyrat/src/esp32-lyrat.h @@ -95,9 +95,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 esp32_bringup(void); diff --git a/boards/xtensa/esp32/esp32-lyrat/src/esp32_appinit.c b/boards/xtensa/esp32/esp32-lyrat/src/esp32_appinit.c deleted file mode 100644 index 71f05bdeddb98..0000000000000 --- a/boards/xtensa/esp32/esp32-lyrat/src/esp32_appinit.c +++ /dev/null @@ -1,82 +0,0 @@ -/**************************************************************************** - * boards/xtensa/esp32/esp32-lyrat/src/esp32_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 - -#include -#include - -#include "esp32-lyrat.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 esp32_bringup(); -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/xtensa/esp32/esp32-pico-kit/configs/nsh/defconfig b/boards/xtensa/esp32/esp32-pico-kit/configs/nsh/defconfig index 7cb9469402a9c..9cd97c7ae6371 100644 --- a/boards/xtensa/esp32/esp32-pico-kit/configs/nsh/defconfig +++ b/boards/xtensa/esp32/esp32-pico-kit/configs/nsh/defconfig @@ -31,7 +31,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-pico-kit/src/Make.defs b/boards/xtensa/esp32/esp32-pico-kit/src/Make.defs index 8f56dcc3419b2..6cefbb7345350 100644 --- a/boards/xtensa/esp32/esp32-pico-kit/src/Make.defs +++ b/boards/xtensa/esp32/esp32-pico-kit/src/Make.defs @@ -22,12 +22,9 @@ CSRCS = esp32_boot.c esp32_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += esp32_appinit.c ifeq ($(CONFIG_BOARDCTL_RESET),y) CSRCS += esp32_reset.c endif -endif ifeq ($(CONFIG_DEV_GPIO),y) CSRCS += esp32_gpio.c diff --git a/boards/xtensa/esp32/esp32-pico-kit/src/esp32-pico-kit.h b/boards/xtensa/esp32/esp32-pico-kit/src/esp32-pico-kit.h index 9b4a79cd17a38..7fc8722ccdfb4 100644 --- a/boards/xtensa/esp32/esp32-pico-kit/src/esp32-pico-kit.h +++ b/boards/xtensa/esp32/esp32-pico-kit/src/esp32-pico-kit.h @@ -91,9 +91,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 esp32_bringup(void); diff --git a/boards/xtensa/esp32/esp32-pico-kit/src/esp32_appinit.c b/boards/xtensa/esp32/esp32-pico-kit/src/esp32_appinit.c deleted file mode 100644 index b1c36f604e8fd..0000000000000 --- a/boards/xtensa/esp32/esp32-pico-kit/src/esp32_appinit.c +++ /dev/null @@ -1,82 +0,0 @@ -/**************************************************************************** - * boards/xtensa/esp32/esp32-pico-kit/src/esp32_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 - -#include -#include - -#include "esp32-pico-kit.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 esp32_bringup(); -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/xtensa/esp32/esp32-sparrow-kit/configs/ble/defconfig b/boards/xtensa/esp32/esp32-sparrow-kit/configs/ble/defconfig index 06433e7cb8f82..2dec45c4af1c7 100644 --- a/boards/xtensa/esp32/esp32-sparrow-kit/configs/ble/defconfig +++ b/boards/xtensa/esp32/esp32-sparrow-kit/configs/ble/defconfig @@ -79,7 +79,6 @@ CONFIG_MMCSD_SPICLOCK=4000000 CONFIG_MM_REGIONS=3 CONFIG_NETDEV_LATEINIT=y CONFIG_NET_BLUETOOTH=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_MMCSDSPIPORTNO=2 diff --git a/boards/xtensa/esp32/esp32-sparrow-kit/configs/mqttc/defconfig b/boards/xtensa/esp32/esp32-sparrow-kit/configs/mqttc/defconfig index 72be12dde513d..8d0e40b3d652a 100644 --- a/boards/xtensa/esp32/esp32-sparrow-kit/configs/mqttc/defconfig +++ b/boards/xtensa/esp32/esp32-sparrow-kit/configs/mqttc/defconfig @@ -100,7 +100,6 @@ CONFIG_NET_TCP=y CONFIG_NET_TCP_NOTIFIER=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_MMCSDSPIPORTNO=2 diff --git a/boards/xtensa/esp32/esp32-sparrow-kit/configs/nsh/defconfig b/boards/xtensa/esp32/esp32-sparrow-kit/configs/nsh/defconfig index 6e3fd40b456a1..ea7c1a67a4d12 100644 --- a/boards/xtensa/esp32/esp32-sparrow-kit/configs/nsh/defconfig +++ b/boards/xtensa/esp32/esp32-sparrow-kit/configs/nsh/defconfig @@ -78,7 +78,6 @@ CONFIG_LINE_MAX=64 CONFIG_MMCSD=y CONFIG_MMCSD_SPICLOCK=4000000 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_MMCSDSPIPORTNO=2 diff --git a/boards/xtensa/esp32/esp32-sparrow-kit/configs/wifi/defconfig b/boards/xtensa/esp32/esp32-sparrow-kit/configs/wifi/defconfig index 2f617f8b1a0d4..6a1963b4813d0 100644 --- a/boards/xtensa/esp32/esp32-sparrow-kit/configs/wifi/defconfig +++ b/boards/xtensa/esp32/esp32-sparrow-kit/configs/wifi/defconfig @@ -103,7 +103,6 @@ CONFIG_NET_TCP=y CONFIG_NET_TCP_DELAYED_ACK=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_MMCSDSPIPORTNO=2 diff --git a/boards/xtensa/esp32/esp32-sparrow-kit/src/Make.defs b/boards/xtensa/esp32/esp32-sparrow-kit/src/Make.defs index ebcaac6be4a64..e1fe357c94984 100644 --- a/boards/xtensa/esp32/esp32-sparrow-kit/src/Make.defs +++ b/boards/xtensa/esp32/esp32-sparrow-kit/src/Make.defs @@ -28,12 +28,9 @@ else CSRCS += esp32_userleds.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += esp32_appinit.c ifeq ($(CONFIG_BOARDCTL_RESET),y) CSRCS += esp32_reset.c endif -endif ifeq ($(CONFIG_DEV_GPIO),y) CSRCS += esp32_gpio.c diff --git a/boards/xtensa/esp32/esp32-sparrow-kit/src/esp32-sparrow-kit.h b/boards/xtensa/esp32/esp32-sparrow-kit/src/esp32-sparrow-kit.h index c73afcf32d91a..84483062e80cb 100644 --- a/boards/xtensa/esp32/esp32-sparrow-kit/src/esp32-sparrow-kit.h +++ b/boards/xtensa/esp32/esp32-sparrow-kit/src/esp32-sparrow-kit.h @@ -82,9 +82,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 esp32_bringup(void); diff --git a/boards/xtensa/esp32/esp32-sparrow-kit/src/esp32_appinit.c b/boards/xtensa/esp32/esp32-sparrow-kit/src/esp32_appinit.c deleted file mode 100644 index 8e678300a6ed2..0000000000000 --- a/boards/xtensa/esp32/esp32-sparrow-kit/src/esp32_appinit.c +++ /dev/null @@ -1,82 +0,0 @@ -/**************************************************************************** - * boards/xtensa/esp32/esp32-sparrow-kit/src/esp32_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 - -#include -#include - -#include "esp32-sparrow-kit.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 esp32_bringup(); -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/xtensa/esp32/esp32-wrover-kit/configs/autopm/defconfig b/boards/xtensa/esp32/esp32-wrover-kit/configs/autopm/defconfig index c60f8540fe994..85e52fab90800 100644 --- a/boards/xtensa/esp32/esp32-wrover-kit/configs/autopm/defconfig +++ b/boards/xtensa/esp32/esp32-wrover-kit/configs/autopm/defconfig @@ -56,7 +56,6 @@ CONFIG_NET_ETH_PKTSIZE=1514 CONFIG_NET_ICMP_SOCKET=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-wrover-kit/configs/bmp180/defconfig b/boards/xtensa/esp32/esp32-wrover-kit/configs/bmp180/defconfig index 023094565696a..f3b3c902d7572 100644 --- a/boards/xtensa/esp32/esp32-wrover-kit/configs/bmp180/defconfig +++ b/boards/xtensa/esp32/esp32-wrover-kit/configs/bmp180/defconfig @@ -34,7 +34,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-wrover-kit/configs/buttons/defconfig b/boards/xtensa/esp32/esp32-wrover-kit/configs/buttons/defconfig index 1d869095a59a8..11e42eab968ea 100644 --- a/boards/xtensa/esp32/esp32-wrover-kit/configs/buttons/defconfig +++ b/boards/xtensa/esp32/esp32-wrover-kit/configs/buttons/defconfig @@ -39,7 +39,6 @@ CONFIG_INPUT_BUTTONS_LOWER=y CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-wrover-kit/configs/gpio/defconfig b/boards/xtensa/esp32/esp32-wrover-kit/configs/gpio/defconfig index a8aa54f7a93e5..8cdfebae6d91e 100644 --- a/boards/xtensa/esp32/esp32-wrover-kit/configs/gpio/defconfig +++ b/boards/xtensa/esp32/esp32-wrover-kit/configs/gpio/defconfig @@ -35,7 +35,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-wrover-kit/configs/lcd1602/defconfig b/boards/xtensa/esp32/esp32-wrover-kit/configs/lcd1602/defconfig index 5f6d5e7544336..22a11474d3a80 100644 --- a/boards/xtensa/esp32/esp32-wrover-kit/configs/lcd1602/defconfig +++ b/boards/xtensa/esp32/esp32-wrover-kit/configs/lcd1602/defconfig @@ -35,7 +35,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LCD_BACKPACK=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-wrover-kit/configs/leds/defconfig b/boards/xtensa/esp32/esp32-wrover-kit/configs/leds/defconfig index 7d656058f5066..d2f00cc56463b 100644 --- a/boards/xtensa/esp32/esp32-wrover-kit/configs/leds/defconfig +++ b/boards/xtensa/esp32/esp32-wrover-kit/configs/leds/defconfig @@ -33,7 +33,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-wrover-kit/configs/lua/defconfig b/boards/xtensa/esp32/esp32-wrover-kit/configs/lua/defconfig index ec37c1bea7119..ba7ae2af9fcab 100644 --- a/boards/xtensa/esp32/esp32-wrover-kit/configs/lua/defconfig +++ b/boards/xtensa/esp32/esp32-wrover-kit/configs/lua/defconfig @@ -60,7 +60,6 @@ CONFIG_LINE_MAX=64 CONFIG_MMCSD=y CONFIG_MMCSD_SPICLOCK=4000000 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_MMCSDSPIPORTNO=2 diff --git a/boards/xtensa/esp32/esp32-wrover-kit/configs/lvgl/defconfig b/boards/xtensa/esp32/esp32-wrover-kit/configs/lvgl/defconfig index f874799e432e0..76f931eec4f41 100644 --- a/boards/xtensa/esp32/esp32-wrover-kit/configs/lvgl/defconfig +++ b/boards/xtensa/esp32/esp32-wrover-kit/configs/lvgl/defconfig @@ -54,7 +54,6 @@ CONFIG_LV_USE_LOG=y CONFIG_LV_USE_NUTTX=y CONFIG_LV_USE_NUTTX_LCD=y CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-wrover-kit/configs/nsh/defconfig b/boards/xtensa/esp32/esp32-wrover-kit/configs/nsh/defconfig index af7ef9bd23e7a..a2f53dabee13b 100644 --- a/boards/xtensa/esp32/esp32-wrover-kit/configs/nsh/defconfig +++ b/boards/xtensa/esp32/esp32-wrover-kit/configs/nsh/defconfig @@ -32,7 +32,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-wrover-kit/configs/nx/defconfig b/boards/xtensa/esp32/esp32-wrover-kit/configs/nx/defconfig index 8a1b15ad1bc8a..945fe4296fe63 100644 --- a/boards/xtensa/esp32/esp32-wrover-kit/configs/nx/defconfig +++ b/boards/xtensa/esp32/esp32-wrover-kit/configs/nx/defconfig @@ -52,7 +52,6 @@ CONFIG_LCD_ILI9341_IFACE0=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 CONFIG_MQ_MAXMSGSIZE=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-wrover-kit/configs/oneshot/defconfig b/boards/xtensa/esp32/esp32-wrover-kit/configs/oneshot/defconfig index 31ab3ac413b7f..71848a1caf3eb 100644 --- a/boards/xtensa/esp32/esp32-wrover-kit/configs/oneshot/defconfig +++ b/boards/xtensa/esp32/esp32-wrover-kit/configs/oneshot/defconfig @@ -38,7 +38,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-wrover-kit/configs/rtc/defconfig b/boards/xtensa/esp32/esp32-wrover-kit/configs/rtc/defconfig index 553825a6bd251..4acc75f5bb647 100644 --- a/boards/xtensa/esp32/esp32-wrover-kit/configs/rtc/defconfig +++ b/boards/xtensa/esp32/esp32-wrover-kit/configs/rtc/defconfig @@ -33,7 +33,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-wrover-kit/configs/sdmmc_spi/defconfig b/boards/xtensa/esp32/esp32-wrover-kit/configs/sdmmc_spi/defconfig index 05fcbb3fc3026..00c356cc0ef4d 100644 --- a/boards/xtensa/esp32/esp32-wrover-kit/configs/sdmmc_spi/defconfig +++ b/boards/xtensa/esp32/esp32-wrover-kit/configs/sdmmc_spi/defconfig @@ -46,7 +46,6 @@ CONFIG_LINE_MAX=64 CONFIG_MMCSD=y CONFIG_MMCSD_SPICLOCK=4000000 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_MMCSDSPIPORTNO=2 diff --git a/boards/xtensa/esp32/esp32-wrover-kit/configs/wifi/defconfig b/boards/xtensa/esp32/esp32-wrover-kit/configs/wifi/defconfig index c0619d0bb5655..5032c3ecc0cdf 100644 --- a/boards/xtensa/esp32/esp32-wrover-kit/configs/wifi/defconfig +++ b/boards/xtensa/esp32/esp32-wrover-kit/configs/wifi/defconfig @@ -54,7 +54,6 @@ CONFIG_NET_ETH_PKTSIZE=1514 CONFIG_NET_ICMP_SOCKET=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/esp32-wrover-kit/src/Make.defs b/boards/xtensa/esp32/esp32-wrover-kit/src/Make.defs index 1b50c05b12d52..123b71affd77d 100644 --- a/boards/xtensa/esp32/esp32-wrover-kit/src/Make.defs +++ b/boards/xtensa/esp32/esp32-wrover-kit/src/Make.defs @@ -28,12 +28,9 @@ else CSRCS += esp32_userleds.c endif -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += esp32_appinit.c ifeq ($(CONFIG_BOARDCTL_RESET),y) CSRCS += esp32_reset.c endif -endif ifeq ($(CONFIG_DEV_GPIO),y) CSRCS += esp32_gpio.c diff --git a/boards/xtensa/esp32/esp32-wrover-kit/src/esp32-wrover-kit.h b/boards/xtensa/esp32/esp32-wrover-kit/src/esp32-wrover-kit.h index 862cf630fedd1..0b350e8c109a8 100644 --- a/boards/xtensa/esp32/esp32-wrover-kit/src/esp32-wrover-kit.h +++ b/boards/xtensa/esp32/esp32-wrover-kit/src/esp32-wrover-kit.h @@ -85,9 +85,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 esp32_bringup(void); diff --git a/boards/xtensa/esp32/esp32-wrover-kit/src/esp32_appinit.c b/boards/xtensa/esp32/esp32-wrover-kit/src/esp32_appinit.c deleted file mode 100644 index 3869cc494783b..0000000000000 --- a/boards/xtensa/esp32/esp32-wrover-kit/src/esp32_appinit.c +++ /dev/null @@ -1,82 +0,0 @@ -/**************************************************************************** - * boards/xtensa/esp32/esp32-wrover-kit/src/esp32_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 - -#include -#include - -#include "esp32-wrover-kit.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 esp32_bringup(); -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/xtensa/esp32/heltec_wifi_lora32/configs/nsh/defconfig b/boards/xtensa/esp32/heltec_wifi_lora32/configs/nsh/defconfig index 89b40d74d7f6c..6d819aed8db55 100644 --- a/boards/xtensa/esp32/heltec_wifi_lora32/configs/nsh/defconfig +++ b/boards/xtensa/esp32/heltec_wifi_lora32/configs/nsh/defconfig @@ -33,7 +33,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/heltec_wifi_lora32/configs/sx1276/defconfig b/boards/xtensa/esp32/heltec_wifi_lora32/configs/sx1276/defconfig index dae1d22ad16fc..11b1544ed96a2 100644 --- a/boards/xtensa/esp32/heltec_wifi_lora32/configs/sx1276/defconfig +++ b/boards/xtensa/esp32/heltec_wifi_lora32/configs/sx1276/defconfig @@ -53,7 +53,6 @@ CONFIG_LPWAN_SX127X_RXSUPPORT=y CONFIG_LPWAN_SX127X_TXPOWER_DEFAULT=20 CONFIG_LPWAN_SX127X_TXSUPPORT=y CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/heltec_wifi_lora32/src/Make.defs b/boards/xtensa/esp32/heltec_wifi_lora32/src/Make.defs index 84953ece1ac5d..5fb022e2e28a4 100644 --- a/boards/xtensa/esp32/heltec_wifi_lora32/src/Make.defs +++ b/boards/xtensa/esp32/heltec_wifi_lora32/src/Make.defs @@ -22,10 +22,6 @@ CSRCS = esp32_boot.c esp32_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += esp32_appinit.c -endif - ifeq ($(CONFIG_LPWAN_SX127X),y) CSRCS += esp32_sx127x.c endif diff --git a/boards/xtensa/esp32/heltec_wifi_lora32/src/esp32_appinit.c b/boards/xtensa/esp32/heltec_wifi_lora32/src/esp32_appinit.c deleted file mode 100644 index 60deced58efbd..0000000000000 --- a/boards/xtensa/esp32/heltec_wifi_lora32/src/esp32_appinit.c +++ /dev/null @@ -1,82 +0,0 @@ -/**************************************************************************** - * boards/xtensa/esp32/heltec_wifi_lora32/src/esp32_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 - -#include -#include - -#include "heltec_wifi_lora32.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 esp32_bringup(); -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/xtensa/esp32/heltec_wifi_lora32/src/heltec_wifi_lora32.h b/boards/xtensa/esp32/heltec_wifi_lora32/src/heltec_wifi_lora32.h index 4fcec67960999..86335c75a55b1 100644 --- a/boards/xtensa/esp32/heltec_wifi_lora32/src/heltec_wifi_lora32.h +++ b/boards/xtensa/esp32/heltec_wifi_lora32/src/heltec_wifi_lora32.h @@ -109,9 +109,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 esp32_bringup(void); diff --git a/boards/xtensa/esp32/lilygo_tbeam_lora_gps/configs/gps/defconfig b/boards/xtensa/esp32/lilygo_tbeam_lora_gps/configs/gps/defconfig index 509bfe5b94c55..e20323f84b25b 100644 --- a/boards/xtensa/esp32/lilygo_tbeam_lora_gps/configs/gps/defconfig +++ b/boards/xtensa/esp32/lilygo_tbeam_lora_gps/configs/gps/defconfig @@ -39,7 +39,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/lilygo_tbeam_lora_gps/configs/nsh/defconfig b/boards/xtensa/esp32/lilygo_tbeam_lora_gps/configs/nsh/defconfig index 7e275f3d7a25a..e1f9ce3d58b48 100644 --- a/boards/xtensa/esp32/lilygo_tbeam_lora_gps/configs/nsh/defconfig +++ b/boards/xtensa/esp32/lilygo_tbeam_lora_gps/configs/nsh/defconfig @@ -34,7 +34,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/lilygo_tbeam_lora_gps/configs/sx127x/defconfig b/boards/xtensa/esp32/lilygo_tbeam_lora_gps/configs/sx127x/defconfig index ac74a03e6a7b3..2a3521a04aa49 100644 --- a/boards/xtensa/esp32/lilygo_tbeam_lora_gps/configs/sx127x/defconfig +++ b/boards/xtensa/esp32/lilygo_tbeam_lora_gps/configs/sx127x/defconfig @@ -48,7 +48,6 @@ CONFIG_LPWAN_SX127X_RFFREQ_DEFAULT=868000000 CONFIG_LPWAN_SX127X_RXSUPPORT=y CONFIG_LPWAN_SX127X_TXSUPPORT=y CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/lilygo_tbeam_lora_gps/src/Make.defs b/boards/xtensa/esp32/lilygo_tbeam_lora_gps/src/Make.defs index 5ca47e0a20ca9..a89a815474900 100644 --- a/boards/xtensa/esp32/lilygo_tbeam_lora_gps/src/Make.defs +++ b/boards/xtensa/esp32/lilygo_tbeam_lora_gps/src/Make.defs @@ -22,12 +22,9 @@ CSRCS = esp32_boot.c esp32_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += esp32_appinit.c ifeq ($(CONFIG_BOARDCTL_RESET),y) CSRCS += esp32_reset.c endif -endif ifeq ($(CONFIG_MMCSD),y) CSRCS += esp32_mmcsd.c diff --git a/boards/xtensa/esp32/lilygo_tbeam_lora_gps/src/esp32_appinit.c b/boards/xtensa/esp32/lilygo_tbeam_lora_gps/src/esp32_appinit.c deleted file mode 100644 index 33afd1756877a..0000000000000 --- a/boards/xtensa/esp32/lilygo_tbeam_lora_gps/src/esp32_appinit.c +++ /dev/null @@ -1,82 +0,0 @@ -/**************************************************************************** - * boards/xtensa/esp32/lilygo_tbeam_lora_gps/src/esp32_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 - -#include -#include - -#include "lilygo_tbeam_lora_gps.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 esp32_bringup(); -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/xtensa/esp32/lilygo_tbeam_lora_gps/src/lilygo_tbeam_lora_gps.h b/boards/xtensa/esp32/lilygo_tbeam_lora_gps/src/lilygo_tbeam_lora_gps.h index a7bc8b3560d7a..aa9c8947a85ba 100644 --- a/boards/xtensa/esp32/lilygo_tbeam_lora_gps/src/lilygo_tbeam_lora_gps.h +++ b/boards/xtensa/esp32/lilygo_tbeam_lora_gps/src/lilygo_tbeam_lora_gps.h @@ -99,9 +99,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 esp32_bringup(void); diff --git a/boards/xtensa/esp32/ttgo_eink5_v2/configs/fb/defconfig b/boards/xtensa/esp32/ttgo_eink5_v2/configs/fb/defconfig index 3350bb967cb79..b3da0a27ec94f 100644 --- a/boards/xtensa/esp32/ttgo_eink5_v2/configs/fb/defconfig +++ b/boards/xtensa/esp32/ttgo_eink5_v2/configs/fb/defconfig @@ -19,7 +19,6 @@ CONFIG_ARCH_MINIMAL_VECTORTABLE_DYNAMIC=y CONFIG_ARCH_NUSER_INTERRUPTS=2 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_XTENSA=y -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y CONFIG_ESP32_SPI3=y @@ -36,7 +35,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LCD_PORTRAIT=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/ttgo_eink5_v2/src/Make.defs b/boards/xtensa/esp32/ttgo_eink5_v2/src/Make.defs index 967db5dfa7ed8..4b3d9ac712834 100644 --- a/boards/xtensa/esp32/ttgo_eink5_v2/src/Make.defs +++ b/boards/xtensa/esp32/ttgo_eink5_v2/src/Make.defs @@ -22,12 +22,9 @@ CSRCS = esp32_boot.c esp32_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += esp32_appinit.c ifeq ($(CONFIG_BOARDCTL_RESET),y) CSRCS += esp32_reset.c endif -endif ifeq ($(CONFIG_DEV_GPIO),y) CSRCS += esp32_gpio.c diff --git a/boards/xtensa/esp32/ttgo_eink5_v2/src/esp32_appinit.c b/boards/xtensa/esp32/ttgo_eink5_v2/src/esp32_appinit.c deleted file mode 100644 index f14c13c8a2c00..0000000000000 --- a/boards/xtensa/esp32/ttgo_eink5_v2/src/esp32_appinit.c +++ /dev/null @@ -1,82 +0,0 @@ -/**************************************************************************** - * boards/xtensa/esp32/ttgo_eink5_v2/src/esp32_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 - -#include -#include - -#include "ttgo_eink5_v2.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 esp32_bringup(); -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/xtensa/esp32/ttgo_eink5_v2/src/ttgo_eink5_v2.h b/boards/xtensa/esp32/ttgo_eink5_v2/src/ttgo_eink5_v2.h index b8033d050f5f5..507296e9ea391 100644 --- a/boards/xtensa/esp32/ttgo_eink5_v2/src/ttgo_eink5_v2.h +++ b/boards/xtensa/esp32/ttgo_eink5_v2/src/ttgo_eink5_v2.h @@ -93,9 +93,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 esp32_bringup(void); diff --git a/boards/xtensa/esp32/ttgo_lora_esp32/configs/nsh/defconfig b/boards/xtensa/esp32/ttgo_lora_esp32/configs/nsh/defconfig index 0dc9c5463e845..75d48223ad38a 100644 --- a/boards/xtensa/esp32/ttgo_lora_esp32/configs/nsh/defconfig +++ b/boards/xtensa/esp32/ttgo_lora_esp32/configs/nsh/defconfig @@ -35,7 +35,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/ttgo_lora_esp32/configs/sx127x/defconfig b/boards/xtensa/esp32/ttgo_lora_esp32/configs/sx127x/defconfig index 8d5d08348cd23..351617f68f506 100644 --- a/boards/xtensa/esp32/ttgo_lora_esp32/configs/sx127x/defconfig +++ b/boards/xtensa/esp32/ttgo_lora_esp32/configs/sx127x/defconfig @@ -49,7 +49,6 @@ CONFIG_LPWAN_SX127X_RFFREQ_DEFAULT=868000000 CONFIG_LPWAN_SX127X_RXSUPPORT=y CONFIG_LPWAN_SX127X_TXSUPPORT=y CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/ttgo_lora_esp32/src/Make.defs b/boards/xtensa/esp32/ttgo_lora_esp32/src/Make.defs index 71533332164ed..74788f01d0e53 100644 --- a/boards/xtensa/esp32/ttgo_lora_esp32/src/Make.defs +++ b/boards/xtensa/esp32/ttgo_lora_esp32/src/Make.defs @@ -22,12 +22,9 @@ CSRCS = esp32_boot.c esp32_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += esp32_appinit.c ifeq ($(CONFIG_BOARDCTL_RESET),y) CSRCS += esp32_reset.c endif -endif ifeq ($(CONFIG_MMCSD),y) CSRCS += esp32_mmcsd.c diff --git a/boards/xtensa/esp32/ttgo_lora_esp32/src/esp32_appinit.c b/boards/xtensa/esp32/ttgo_lora_esp32/src/esp32_appinit.c deleted file mode 100644 index f95c7a51d7164..0000000000000 --- a/boards/xtensa/esp32/ttgo_lora_esp32/src/esp32_appinit.c +++ /dev/null @@ -1,82 +0,0 @@ -/**************************************************************************** - * boards/xtensa/esp32/ttgo_lora_esp32/src/esp32_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 - -#include -#include - -#include "ttgo_lora_esp32.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 esp32_bringup(); -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/xtensa/esp32/ttgo_lora_esp32/src/ttgo_lora_esp32.h b/boards/xtensa/esp32/ttgo_lora_esp32/src/ttgo_lora_esp32.h index 25c0e2ff0402b..7e8e8b546b162 100644 --- a/boards/xtensa/esp32/ttgo_lora_esp32/src/ttgo_lora_esp32.h +++ b/boards/xtensa/esp32/ttgo_lora_esp32/src/ttgo_lora_esp32.h @@ -92,9 +92,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 esp32_bringup(void); diff --git a/boards/xtensa/esp32/ttgo_t_display_esp32/configs/lvgl_fb/defconfig b/boards/xtensa/esp32/ttgo_t_display_esp32/configs/lvgl_fb/defconfig index 0de23c07cd562..fb2cec9673582 100644 --- a/boards/xtensa/esp32/ttgo_t_display_esp32/configs/lvgl_fb/defconfig +++ b/boards/xtensa/esp32/ttgo_t_display_esp32/configs/lvgl_fb/defconfig @@ -55,7 +55,6 @@ CONFIG_LV_USE_LOG=y CONFIG_LV_USE_NUTTX=y CONFIG_LV_USE_NUTTX_TOUCHSCREEN=y CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/ttgo_t_display_esp32/configs/lvgl_lcd/defconfig b/boards/xtensa/esp32/ttgo_t_display_esp32/configs/lvgl_lcd/defconfig index 74b35b6b61f7e..e9fbc7e2bbd97 100644 --- a/boards/xtensa/esp32/ttgo_t_display_esp32/configs/lvgl_lcd/defconfig +++ b/boards/xtensa/esp32/ttgo_t_display_esp32/configs/lvgl_lcd/defconfig @@ -56,7 +56,6 @@ CONFIG_LV_USE_NUTTX=y CONFIG_LV_USE_NUTTX_LCD=y CONFIG_LV_USE_NUTTX_TOUCHSCREEN=y CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/ttgo_t_display_esp32/configs/nsh/defconfig b/boards/xtensa/esp32/ttgo_t_display_esp32/configs/nsh/defconfig index c9b204a8d92d7..fb361364f8b0f 100644 --- a/boards/xtensa/esp32/ttgo_t_display_esp32/configs/nsh/defconfig +++ b/boards/xtensa/esp32/ttgo_t_display_esp32/configs/nsh/defconfig @@ -32,7 +32,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32/ttgo_t_display_esp32/src/Make.defs b/boards/xtensa/esp32/ttgo_t_display_esp32/src/Make.defs index 722539876db30..3fb80894f6f5d 100644 --- a/boards/xtensa/esp32/ttgo_t_display_esp32/src/Make.defs +++ b/boards/xtensa/esp32/ttgo_t_display_esp32/src/Make.defs @@ -22,12 +22,9 @@ CSRCS = esp32_boot.c esp32_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += esp32_appinit.c ifeq ($(CONFIG_BOARDCTL_RESET),y) CSRCS += esp32_reset.c endif -endif ifeq ($(CONFIG_DEV_GPIO),y) CSRCS += esp32_gpio.c diff --git a/boards/xtensa/esp32/ttgo_t_display_esp32/src/esp32_appinit.c b/boards/xtensa/esp32/ttgo_t_display_esp32/src/esp32_appinit.c deleted file mode 100644 index 14edb17d82d2a..0000000000000 --- a/boards/xtensa/esp32/ttgo_t_display_esp32/src/esp32_appinit.c +++ /dev/null @@ -1,82 +0,0 @@ -/**************************************************************************** - * boards/xtensa/esp32/ttgo_t_display_esp32/src/esp32_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 - -#include -#include - -#include "ttgo_t_display_esp32.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 esp32_bringup(); -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/xtensa/esp32/ttgo_t_display_esp32/src/ttgo_t_display_esp32.h b/boards/xtensa/esp32/ttgo_t_display_esp32/src/ttgo_t_display_esp32.h index f9b6a675c90e3..805928f078fa1 100644 --- a/boards/xtensa/esp32/ttgo_t_display_esp32/src/ttgo_t_display_esp32.h +++ b/boards/xtensa/esp32/ttgo_t_display_esp32/src/ttgo_t_display_esp32.h @@ -87,9 +87,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 esp32_bringup(void); diff --git a/boards/xtensa/esp32s2/esp32s2-kaluga-1/configs/audio/defconfig b/boards/xtensa/esp32s2/esp32s2-kaluga-1/configs/audio/defconfig index 093d58e7edd7e..f194fbefef247 100644 --- a/boards/xtensa/esp32s2/esp32s2-kaluga-1/configs/audio/defconfig +++ b/boards/xtensa/esp32s2/esp32s2-kaluga-1/configs/audio/defconfig @@ -59,7 +59,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s2/esp32s2-kaluga-1/configs/buttons/defconfig b/boards/xtensa/esp32s2/esp32s2-kaluga-1/configs/buttons/defconfig index e7175324aa306..18eed988ae4ec 100644 --- a/boards/xtensa/esp32s2/esp32s2-kaluga-1/configs/buttons/defconfig +++ b/boards/xtensa/esp32s2/esp32s2-kaluga-1/configs/buttons/defconfig @@ -40,7 +40,6 @@ CONFIG_INPUT_BUTTONS=y CONFIG_INPUT_BUTTONS_LOWER=y CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s2/esp32s2-kaluga-1/configs/i2c/defconfig b/boards/xtensa/esp32s2/esp32s2-kaluga-1/configs/i2c/defconfig index 90f498d9c6260..f6aeb143741ee 100644 --- a/boards/xtensa/esp32s2/esp32s2-kaluga-1/configs/i2c/defconfig +++ b/boards/xtensa/esp32s2/esp32s2-kaluga-1/configs/i2c/defconfig @@ -38,7 +38,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s2/esp32s2-kaluga-1/configs/lvgl_ili9341/defconfig b/boards/xtensa/esp32s2/esp32s2-kaluga-1/configs/lvgl_ili9341/defconfig index f2c96f04839ac..18423378f0321 100644 --- a/boards/xtensa/esp32s2/esp32s2-kaluga-1/configs/lvgl_ili9341/defconfig +++ b/boards/xtensa/esp32s2/esp32s2-kaluga-1/configs/lvgl_ili9341/defconfig @@ -52,7 +52,6 @@ CONFIG_LV_USE_LOG=y CONFIG_LV_USE_NUTTX=y CONFIG_LV_USE_NUTTX_LCD=y CONFIG_LV_USE_NUTTX_TOUCHSCREEN=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s2/esp32s2-kaluga-1/configs/lvgl_st7789/defconfig b/boards/xtensa/esp32s2/esp32s2-kaluga-1/configs/lvgl_st7789/defconfig index 579724d5b9018..2f2d743e9ee26 100644 --- a/boards/xtensa/esp32s2/esp32s2-kaluga-1/configs/lvgl_st7789/defconfig +++ b/boards/xtensa/esp32s2/esp32s2-kaluga-1/configs/lvgl_st7789/defconfig @@ -54,7 +54,6 @@ CONFIG_LV_USE_LOG=y CONFIG_LV_USE_NUTTX=y CONFIG_LV_USE_NUTTX_LCD=y CONFIG_LV_USE_NUTTX_TOUCHSCREEN=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s2/esp32s2-kaluga-1/configs/nsh/defconfig b/boards/xtensa/esp32s2/esp32s2-kaluga-1/configs/nsh/defconfig index b425cee3f3398..544a9a917ffec 100644 --- a/boards/xtensa/esp32s2/esp32s2-kaluga-1/configs/nsh/defconfig +++ b/boards/xtensa/esp32s2/esp32s2-kaluga-1/configs/nsh/defconfig @@ -31,7 +31,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s2/esp32s2-kaluga-1/configs/nxlooper/defconfig b/boards/xtensa/esp32s2/esp32s2-kaluga-1/configs/nxlooper/defconfig index 128b1af6510ad..ec6e1e328fd7e 100644 --- a/boards/xtensa/esp32s2/esp32s2-kaluga-1/configs/nxlooper/defconfig +++ b/boards/xtensa/esp32s2/esp32s2-kaluga-1/configs/nxlooper/defconfig @@ -57,7 +57,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s2/esp32s2-kaluga-1/configs/rtc/defconfig b/boards/xtensa/esp32s2/esp32s2-kaluga-1/configs/rtc/defconfig index da61c4fddd1af..7001ab60ddaf2 100644 --- a/boards/xtensa/esp32s2/esp32s2-kaluga-1/configs/rtc/defconfig +++ b/boards/xtensa/esp32s2/esp32s2-kaluga-1/configs/rtc/defconfig @@ -33,7 +33,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s2/esp32s2-kaluga-1/configs/twai/defconfig b/boards/xtensa/esp32s2/esp32s2-kaluga-1/configs/twai/defconfig index 5062ef7ae3df0..e39c7850af58f 100644 --- a/boards/xtensa/esp32s2/esp32s2-kaluga-1/configs/twai/defconfig +++ b/boards/xtensa/esp32s2/esp32s2-kaluga-1/configs/twai/defconfig @@ -33,7 +33,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s2/esp32s2-kaluga-1/configs/watchdog/defconfig b/boards/xtensa/esp32s2/esp32s2-kaluga-1/configs/watchdog/defconfig index f017f5dcc48ce..01cb4daaa0fda 100644 --- a/boards/xtensa/esp32s2/esp32s2-kaluga-1/configs/watchdog/defconfig +++ b/boards/xtensa/esp32s2/esp32s2-kaluga-1/configs/watchdog/defconfig @@ -36,7 +36,6 @@ CONFIG_IDLETHREAD_STACKSIZE=3072 CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s2/esp32s2-kaluga-1/src/Make.defs b/boards/xtensa/esp32s2/esp32s2-kaluga-1/src/Make.defs index e867d1ee64b6a..ce30c47112a4a 100644 --- a/boards/xtensa/esp32s2/esp32s2-kaluga-1/src/Make.defs +++ b/boards/xtensa/esp32s2/esp32s2-kaluga-1/src/Make.defs @@ -22,12 +22,9 @@ CSRCS = esp32s2_boot.c esp32s2_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += esp32s2_appinit.c ifeq ($(CONFIG_BOARDCTL_RESET),y) CSRCS += esp32s2_reset.c endif -endif ifeq ($(CONFIG_DEV_GPIO),y) CSRCS += esp32s2_gpio.c diff --git a/boards/xtensa/esp32s2/esp32s2-kaluga-1/src/esp32s2-kaluga-1.h b/boards/xtensa/esp32s2/esp32s2-kaluga-1/src/esp32s2-kaluga-1.h index bc8eb010f035a..ac9917331f29a 100644 --- a/boards/xtensa/esp32s2/esp32s2-kaluga-1/src/esp32s2-kaluga-1.h +++ b/boards/xtensa/esp32s2/esp32s2-kaluga-1/src/esp32s2-kaluga-1.h @@ -87,9 +87,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 esp32s2_bringup(void); diff --git a/boards/xtensa/esp32s2/esp32s2-kaluga-1/src/esp32s2_appinit.c b/boards/xtensa/esp32s2/esp32s2-kaluga-1/src/esp32s2_appinit.c deleted file mode 100644 index 9803c1f27226c..0000000000000 --- a/boards/xtensa/esp32s2/esp32s2-kaluga-1/src/esp32s2_appinit.c +++ /dev/null @@ -1,82 +0,0 @@ -/**************************************************************************** - * boards/xtensa/esp32s2/esp32s2-kaluga-1/src/esp32s2_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 - -#include -#include - -#include "esp32s2-kaluga-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 esp32s2_bringup(); -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/adc/defconfig b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/adc/defconfig index a5c5f0c62b964..7478efac0e68a 100644 --- a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/adc/defconfig +++ b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/adc/defconfig @@ -34,7 +34,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/audio/defconfig b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/audio/defconfig index d51049cde67f0..534ef3b6e03de 100644 --- a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/audio/defconfig +++ b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/audio/defconfig @@ -57,7 +57,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/buttons/defconfig b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/buttons/defconfig index 0db930b57b753..7f486834070c4 100644 --- a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/buttons/defconfig +++ b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/buttons/defconfig @@ -38,7 +38,6 @@ CONFIG_INPUT_BUTTONS=y CONFIG_INPUT_BUTTONS_LOWER=y CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/crypto/defconfig b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/crypto/defconfig index 02974336ad2b6..9be17fc8004d1 100644 --- a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/crypto/defconfig +++ b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/crypto/defconfig @@ -42,7 +42,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/cxx/defconfig b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/cxx/defconfig index 58ed474928ce4..10f9f36ce6492 100644 --- a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/cxx/defconfig +++ b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/cxx/defconfig @@ -37,7 +37,6 @@ CONFIG_LIBC_LOCALE=y CONFIG_LIBC_MAX_EXITFUNS=1 CONFIG_LIBM=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/gpio/defconfig b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/gpio/defconfig index 1ae44c5cb31e5..88682ca5c637c 100644 --- a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/gpio/defconfig +++ b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/gpio/defconfig @@ -34,7 +34,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/i2c/defconfig b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/i2c/defconfig index ae6a03b7609d5..17c669af4acde 100644 --- a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/i2c/defconfig +++ b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/i2c/defconfig @@ -43,7 +43,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/i2schar/defconfig b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/i2schar/defconfig index ef0cb8029c4cb..c2c5e9123fb7b 100644 --- a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/i2schar/defconfig +++ b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/i2schar/defconfig @@ -44,7 +44,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=4096 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/mcuboot_nsh/defconfig b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/mcuboot_nsh/defconfig index aefcf129ceecb..91f2a758044b3 100644 --- a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/mcuboot_nsh/defconfig +++ b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/mcuboot_nsh/defconfig @@ -32,7 +32,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/mcuboot_update_agent/defconfig b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/mcuboot_update_agent/defconfig index 91aa0e44da01b..78a4d9c44fcab 100644 --- a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/mcuboot_update_agent/defconfig +++ b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/mcuboot_update_agent/defconfig @@ -61,7 +61,6 @@ CONFIG_NET_TCP_DELAYED_ACK=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_WRITE_BUFFERS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_MOTD=y diff --git a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/nsh/defconfig b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/nsh/defconfig index 59fccc990660c..a3dcb1e5fc3c4 100644 --- a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/nsh/defconfig +++ b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/nsh/defconfig @@ -31,7 +31,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/nxlooper/defconfig b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/nxlooper/defconfig index f60a050ca2aaa..f4f1d06c72e1a 100644 --- a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/nxlooper/defconfig +++ b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/nxlooper/defconfig @@ -50,7 +50,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=4096 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/oneshot/defconfig b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/oneshot/defconfig index 5be888763c922..8a52cdb1afcba 100644 --- a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/oneshot/defconfig +++ b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/oneshot/defconfig @@ -34,7 +34,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/ostest/defconfig b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/ostest/defconfig index 77037030c2aae..c49654ff0a8c3 100644 --- a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/ostest/defconfig +++ b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/ostest/defconfig @@ -32,7 +32,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/pm/defconfig b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/pm/defconfig index b8bf517253fc8..6ae0955c97b86 100644 --- a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/pm/defconfig +++ b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/pm/defconfig @@ -30,7 +30,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/pwm/defconfig b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/pwm/defconfig index 4a04afcd3d25b..665cfac29bdd2 100644 --- a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/pwm/defconfig +++ b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/pwm/defconfig @@ -37,7 +37,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/qencoder/defconfig b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/qencoder/defconfig index 63643da8870b5..5bbcbdbf1985a 100644 --- a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/qencoder/defconfig +++ b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/qencoder/defconfig @@ -40,7 +40,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/random/defconfig b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/random/defconfig index 04102bff59a3e..27ba62200e547 100644 --- a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/random/defconfig +++ b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/random/defconfig @@ -33,7 +33,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/rmt/defconfig b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/rmt/defconfig index ba524fafc1e93..2e26154f5174b 100644 --- a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/rmt/defconfig +++ b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/rmt/defconfig @@ -36,7 +36,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/romfs/defconfig b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/romfs/defconfig index 27caf4e742f26..118c5ee4e18a7 100644 --- a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/romfs/defconfig +++ b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/romfs/defconfig @@ -33,7 +33,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/rtc/defconfig b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/rtc/defconfig index 33170aaca4af5..0d1c8834395db 100644 --- a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/rtc/defconfig +++ b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/rtc/defconfig @@ -33,7 +33,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/sdm/defconfig b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/sdm/defconfig index 53379492e568f..d61f8a4ee8fc6 100644 --- a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/sdm/defconfig +++ b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/sdm/defconfig @@ -33,7 +33,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/sdmmc_spi/defconfig b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/sdmmc_spi/defconfig index 649acf113cda5..585aa1389ea3d 100644 --- a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/sdmmc_spi/defconfig +++ b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/sdmmc_spi/defconfig @@ -42,7 +42,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MMCSD=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_MMCSDSPIPORTNO=2 diff --git a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/sotest/defconfig b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/sotest/defconfig index 9710b931084fb..64cb76419e1ef 100644 --- a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/sotest/defconfig +++ b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/sotest/defconfig @@ -38,7 +38,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_DLFCN=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/spi/defconfig b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/spi/defconfig index 6499b27eba25b..afb6077ba2e50 100644 --- a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/spi/defconfig +++ b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/spi/defconfig @@ -32,7 +32,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/spiflash/defconfig b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/spiflash/defconfig index a097b183c3e10..f96d348997fdd 100644 --- a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/spiflash/defconfig +++ b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/spiflash/defconfig @@ -32,7 +32,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/sta_softap/defconfig b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/sta_softap/defconfig index 24fe5af68ef29..7dca8987bb0fd 100644 --- a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/sta_softap/defconfig +++ b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/sta_softap/defconfig @@ -57,7 +57,6 @@ CONFIG_NET_TCP_DELAYED_ACK=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_WRITE_BUFFERS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/temperature_sensor/defconfig b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/temperature_sensor/defconfig index 3d4e33135afde..7f2c0595df615 100644 --- a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/temperature_sensor/defconfig +++ b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/temperature_sensor/defconfig @@ -34,7 +34,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_FLOATINGPOINT=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/timer/defconfig b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/timer/defconfig index fc0e9e5def756..ca36036914199 100644 --- a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/timer/defconfig +++ b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/timer/defconfig @@ -36,7 +36,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/twai/defconfig b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/twai/defconfig index 2f7693ddcdfc1..f9f210abdde7f 100644 --- a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/twai/defconfig +++ b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/twai/defconfig @@ -33,7 +33,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/ulp/defconfig b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/ulp/defconfig index 8d3220384c3fa..2709917a44aaa 100644 --- a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/ulp/defconfig +++ b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/ulp/defconfig @@ -35,7 +35,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/watchdog/defconfig b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/watchdog/defconfig index f52204ef75068..8928e205f7505 100644 --- a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/watchdog/defconfig +++ b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/watchdog/defconfig @@ -37,7 +37,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/wifi/defconfig b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/wifi/defconfig index f74b812e722f5..8261d8ea2bf62 100644 --- a/boards/xtensa/esp32s2/esp32s2-saola-1/configs/wifi/defconfig +++ b/boards/xtensa/esp32s2/esp32s2-saola-1/configs/wifi/defconfig @@ -53,7 +53,6 @@ CONFIG_NET_TCP_DELAYED_ACK=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_WRITE_BUFFERS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s2/esp32s2-saola-1/src/Make.defs b/boards/xtensa/esp32s2/esp32s2-saola-1/src/Make.defs index d75e972c5685e..172483bf26d6a 100644 --- a/boards/xtensa/esp32s2/esp32s2-saola-1/src/Make.defs +++ b/boards/xtensa/esp32s2/esp32s2-saola-1/src/Make.defs @@ -22,12 +22,9 @@ CSRCS = esp32s2_boot.c esp32s2_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += esp32s2_appinit.c ifeq ($(CONFIG_BOARDCTL_RESET),y) CSRCS += esp32s2_reset.c endif -endif ifeq ($(CONFIG_DEV_GPIO),y) CSRCS += esp32s2_gpio.c diff --git a/boards/xtensa/esp32s2/esp32s2-saola-1/src/esp32s2-saola-1.h b/boards/xtensa/esp32s2/esp32s2-saola-1/src/esp32s2-saola-1.h index e242ba00af2b2..c9ff483eaea6d 100644 --- a/boards/xtensa/esp32s2/esp32s2-saola-1/src/esp32s2-saola-1.h +++ b/boards/xtensa/esp32s2/esp32s2-saola-1/src/esp32s2-saola-1.h @@ -89,9 +89,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 esp32s2_bringup(void); diff --git a/boards/xtensa/esp32s2/esp32s2-saola-1/src/esp32s2_appinit.c b/boards/xtensa/esp32s2/esp32s2-saola-1/src/esp32s2_appinit.c deleted file mode 100644 index 7f51a08c14db3..0000000000000 --- a/boards/xtensa/esp32s2/esp32s2-saola-1/src/esp32s2_appinit.c +++ /dev/null @@ -1,82 +0,0 @@ -/**************************************************************************** - * boards/xtensa/esp32s2/esp32s2-saola-1/src/esp32s2_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 - -#include -#include - -#include "esp32s2-saola-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 esp32s2_bringup(); -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/xtensa/esp32s2/franzininho-wifi/configs/nsh/defconfig b/boards/xtensa/esp32s2/franzininho-wifi/configs/nsh/defconfig index 6c1c046385cca..670bb19a7f20e 100644 --- a/boards/xtensa/esp32s2/franzininho-wifi/configs/nsh/defconfig +++ b/boards/xtensa/esp32s2/franzininho-wifi/configs/nsh/defconfig @@ -31,7 +31,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s2/franzininho-wifi/src/Make.defs b/boards/xtensa/esp32s2/franzininho-wifi/src/Make.defs index c57cd6166eb38..e42bf4af75aab 100644 --- a/boards/xtensa/esp32s2/franzininho-wifi/src/Make.defs +++ b/boards/xtensa/esp32s2/franzininho-wifi/src/Make.defs @@ -22,12 +22,9 @@ CSRCS = esp32s2_boot.c esp32s2_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += esp32s2_appinit.c ifeq ($(CONFIG_BOARDCTL_RESET),y) CSRCS += esp32s2_reset.c endif -endif ifeq ($(CONFIG_ONESHOT),y) CSRCS += esp32s2_oneshot.c diff --git a/boards/xtensa/esp32s2/franzininho-wifi/src/esp32s2_appinit.c b/boards/xtensa/esp32s2/franzininho-wifi/src/esp32s2_appinit.c deleted file mode 100644 index 4825f4c62662e..0000000000000 --- a/boards/xtensa/esp32s2/franzininho-wifi/src/esp32s2_appinit.c +++ /dev/null @@ -1,82 +0,0 @@ -/**************************************************************************** - * boards/xtensa/esp32s2/franzininho-wifi/src/esp32s2_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 - -#include -#include - -#include "franzininho-wifi.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 esp32s2_bringup(); -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/xtensa/esp32s2/franzininho-wifi/src/franzininho-wifi.h b/boards/xtensa/esp32s2/franzininho-wifi/src/franzininho-wifi.h index ca4323f41b9fd..dbc8d7daccbb9 100644 --- a/boards/xtensa/esp32s2/franzininho-wifi/src/franzininho-wifi.h +++ b/boards/xtensa/esp32s2/franzininho-wifi/src/franzininho-wifi.h @@ -74,9 +74,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 esp32s2_bringup(void); diff --git a/boards/xtensa/esp32s3/common/src/esp32s3_usbmsc.c b/boards/xtensa/esp32s3/common/src/esp32s3_usbmsc.c index a008e9216d0bf..b980764b318df 100644 --- a/boards/xtensa/esp32s3/common/src/esp32s3_usbmsc.c +++ b/boards/xtensa/esp32s3/common/src/esp32s3_usbmsc.c @@ -53,10 +53,5 @@ int board_usbmsc_initialize(int port) { - /* If system/usbmsc is built as an NSH command, then SD slot should - * already have been initialized in board_app_initialize() - * In this case, there is nothing further to be done here. - */ - return OK; } diff --git a/boards/xtensa/esp32s3/esp32s3-8048S043/configs/gpio/defconfig b/boards/xtensa/esp32s3/esp32s3-8048S043/configs/gpio/defconfig index f4be7cdcea3e2..00b8d207052d3 100644 --- a/boards/xtensa/esp32s3/esp32s3-8048S043/configs/gpio/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-8048S043/configs/gpio/defconfig @@ -36,7 +36,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-8048S043/configs/i2c/defconfig b/boards/xtensa/esp32s3/esp32s3-8048S043/configs/i2c/defconfig index 23c9511d42b10..df1a54fcf3f46 100644 --- a/boards/xtensa/esp32s3/esp32s3-8048S043/configs/i2c/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-8048S043/configs/i2c/defconfig @@ -42,7 +42,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-8048S043/configs/lcd/defconfig b/boards/xtensa/esp32s3/esp32s3-8048S043/configs/lcd/defconfig index a1bced925d540..2b139879652b8 100644 --- a/boards/xtensa/esp32s3/esp32s3-8048S043/configs/lcd/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-8048S043/configs/lcd/defconfig @@ -76,7 +76,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 CONFIG_NDEBUG=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-8048S043/configs/nsh/defconfig b/boards/xtensa/esp32s3/esp32s3-8048S043/configs/nsh/defconfig index e3cd0c45df2b7..a34b2eaf14b16 100644 --- a/boards/xtensa/esp32s3/esp32s3-8048S043/configs/nsh/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-8048S043/configs/nsh/defconfig @@ -33,7 +33,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-8048S043/configs/sdmmc/defconfig b/boards/xtensa/esp32s3/esp32s3-8048S043/configs/sdmmc/defconfig index 3f63d05717eef..f09c1cd2475fb 100644 --- a/boards/xtensa/esp32s3/esp32s3-8048S043/configs/sdmmc/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-8048S043/configs/sdmmc/defconfig @@ -37,7 +37,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MMCSD_CHECK_READY_STATUS_WITHOUT_SLEEP=y CONFIG_MMCSD_MULTIBLOCK_LIMIT=128 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-8048S043/configs/spi/defconfig b/boards/xtensa/esp32s3/esp32s3-8048S043/configs/spi/defconfig index 1b0259e906e5d..096eaceced704 100644 --- a/boards/xtensa/esp32s3/esp32s3-8048S043/configs/spi/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-8048S043/configs/spi/defconfig @@ -33,7 +33,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-8048S043/configs/touchscreen/defconfig b/boards/xtensa/esp32s3/esp32s3-8048S043/configs/touchscreen/defconfig index c98d6c1b63480..bda07c9274e20 100644 --- a/boards/xtensa/esp32s3/esp32s3-8048S043/configs/touchscreen/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-8048S043/configs/touchscreen/defconfig @@ -42,7 +42,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-8048S043/src/Make.defs b/boards/xtensa/esp32s3/esp32s3-8048S043/src/Make.defs index 7d7e93e7e6700..03ac82e811b6a 100644 --- a/boards/xtensa/esp32s3/esp32s3-8048S043/src/Make.defs +++ b/boards/xtensa/esp32s3/esp32s3-8048S043/src/Make.defs @@ -22,12 +22,9 @@ CSRCS = esp32s3_boot.c esp32s3_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += esp32s3_appinit.c ifeq ($(CONFIG_BOARDCTL_RESET),y) CSRCS += esp32s3_reset.c endif -endif ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += esp32s3_buttons.c diff --git a/boards/xtensa/esp32s3/esp32s3-8048S043/src/esp32s3-8048S043.h b/boards/xtensa/esp32s3/esp32s3-8048S043/src/esp32s3-8048S043.h index 43364f0833ea1..22ff2c668a5a7 100644 --- a/boards/xtensa/esp32s3/esp32s3-8048S043/src/esp32s3-8048S043.h +++ b/boards/xtensa/esp32s3/esp32s3-8048S043/src/esp32s3-8048S043.h @@ -77,9 +77,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 esp32s3_bringup(void); @@ -165,4 +162,4 @@ int board_lcd_initialize(void); #endif #endif /* __ASSEMBLY__ */ -#endif /* __BOARDS_XTENSA_ESP32S3_ESP32S3_8048S043_SRC_ESP32S3_8048S043_H */ \ No newline at end of file +#endif /* __BOARDS_XTENSA_ESP32S3_ESP32S3_8048S043_SRC_ESP32S3_8048S043_H */ diff --git a/boards/xtensa/esp32s3/esp32s3-8048S043/src/esp32s3_appinit.c b/boards/xtensa/esp32s3/esp32s3-8048S043/src/esp32s3_appinit.c deleted file mode 100644 index 2140a4f17a110..0000000000000 --- a/boards/xtensa/esp32s3/esp32s3-8048S043/src/esp32s3_appinit.c +++ /dev/null @@ -1,82 +0,0 @@ -/**************************************************************************** - * boards/xtensa/esp32s3/esp32s3-8048S043/src/esp32s3_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 - -#include -#include - -#include "esp32s3-8048S043.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 esp32s3_bringup(); -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/xtensa/esp32s3/esp32s3-box/configs/buttons/defconfig b/boards/xtensa/esp32s3/esp32s3-box/configs/buttons/defconfig index 13b00fb039957..7216dfdf27edc 100644 --- a/boards/xtensa/esp32s3/esp32s3-box/configs/buttons/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-box/configs/buttons/defconfig @@ -44,7 +44,6 @@ CONFIG_INPUT_BUTTONS=y CONFIG_INPUT_BUTTONS_LOWER=y CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-box/configs/lvgl-3/defconfig b/boards/xtensa/esp32s3/esp32s3-box/configs/lvgl-3/defconfig index 76188d6d84bb1..0757055a1c217 100644 --- a/boards/xtensa/esp32s3/esp32s3-box/configs/lvgl-3/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-box/configs/lvgl-3/defconfig @@ -67,7 +67,6 @@ CONFIG_LV_USE_NUTTX_LCD=y CONFIG_LV_USE_NUTTX_TOUCHSCREEN=y CONFIG_MM_REGIONS=2 CONFIG_NDEBUG=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-box/configs/lvgl/defconfig b/boards/xtensa/esp32s3/esp32s3-box/configs/lvgl/defconfig index d02c00a129920..188c3e4a14921 100644 --- a/boards/xtensa/esp32s3/esp32s3-box/configs/lvgl/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-box/configs/lvgl/defconfig @@ -70,7 +70,6 @@ CONFIG_LV_USE_NUTTX_LCD=y CONFIG_LV_USE_NUTTX_TOUCHSCREEN=y CONFIG_MM_REGIONS=2 CONFIG_NDEBUG=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-box/configs/nsh/defconfig b/boards/xtensa/esp32s3/esp32s3-box/configs/nsh/defconfig index 4a2b4b3477f18..8de0f8e66859d 100644 --- a/boards/xtensa/esp32s3/esp32s3-box/configs/nsh/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-box/configs/nsh/defconfig @@ -35,7 +35,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-box/configs/touchscreen/defconfig b/boards/xtensa/esp32s3/esp32s3-box/configs/touchscreen/defconfig index ec00392fe973a..7946c2d3cb4a2 100644 --- a/boards/xtensa/esp32s3/esp32s3-box/configs/touchscreen/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-box/configs/touchscreen/defconfig @@ -35,7 +35,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-box/src/Make.defs b/boards/xtensa/esp32s3/esp32s3-box/src/Make.defs index ecf6e87dee8c3..4e4fff8857e18 100644 --- a/boards/xtensa/esp32s3/esp32s3-box/src/Make.defs +++ b/boards/xtensa/esp32s3/esp32s3-box/src/Make.defs @@ -22,12 +22,9 @@ CSRCS = esp32s3_boot.c esp32s3_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += esp32s3_appinit.c ifeq ($(CONFIG_BOARDCTL_RESET),y) CSRCS += esp32s3_reset.c endif -endif ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += esp32s3_buttons.c diff --git a/boards/xtensa/esp32s3/esp32s3-box/src/esp32s3-box.h b/boards/xtensa/esp32s3/esp32s3-box/src/esp32s3-box.h index 1ff4ef5d98ba4..f44e466acc57b 100644 --- a/boards/xtensa/esp32s3/esp32s3-box/src/esp32s3-box.h +++ b/boards/xtensa/esp32s3/esp32s3-box/src/esp32s3-box.h @@ -101,9 +101,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 esp32s3_bringup(void); diff --git a/boards/xtensa/esp32s3/esp32s3-box/src/esp32s3_appinit.c b/boards/xtensa/esp32s3/esp32s3-box/src/esp32s3_appinit.c deleted file mode 100644 index b053b74d6ad0e..0000000000000 --- a/boards/xtensa/esp32s3/esp32s3-box/src/esp32s3_appinit.c +++ /dev/null @@ -1,82 +0,0 @@ -/**************************************************************************** - * boards/xtensa/esp32s3/esp32s3-box/src/esp32s3_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 - -#include -#include - -#include "esp32s3-box.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 esp32s3_bringup(); -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/adc/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/adc/defconfig index aa2c203a299b6..56f627d94b08d 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/adc/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/adc/defconfig @@ -37,7 +37,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/audio/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/audio/defconfig index 21668047a19d5..d0921758caf77 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/audio/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/audio/defconfig @@ -76,7 +76,6 @@ CONFIG_NET_TCP_DELAYED_ACK=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_WRITE_BUFFERS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/ble/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/ble/defconfig index e40302c0e9917..941abfd40c69a 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/ble/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/ble/defconfig @@ -50,7 +50,6 @@ CONFIG_NET_BLUETOOTH=y CONFIG_NET_ETH_PKTSIZE=1514 CONFIG_NET_SOCKOPTS=y CONFIG_NET_TCP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/blewifi/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/blewifi/defconfig index a0adca64f434e..378c6f41130de 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/blewifi/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/blewifi/defconfig @@ -72,7 +72,6 @@ CONFIG_NET_TCP_DELAYED_ACK=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_WRITE_BUFFERS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/buttons/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/buttons/defconfig index bc05cd9a63d48..2cb92fc465a6e 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/buttons/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/buttons/defconfig @@ -44,7 +44,6 @@ CONFIG_INPUT_BUTTONS=y CONFIG_INPUT_BUTTONS_LOWER=y CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/capture/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/capture/defconfig index 8f4d6bfd0de6b..021654d8afac7 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/capture/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/capture/defconfig @@ -36,7 +36,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/crypto/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/crypto/defconfig index 0917cc9a4a6d1..0ee928c1fb718 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/crypto/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/crypto/defconfig @@ -43,7 +43,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/cxx/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/cxx/defconfig index 7f3ffd3179817..cff3fb18658a8 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/cxx/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/cxx/defconfig @@ -40,7 +40,6 @@ CONFIG_LIBC_LOCALE=y CONFIG_LIBC_MAX_EXITFUNS=1 CONFIG_LIBM=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/efuse/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/efuse/defconfig index 30d2dcd068f3b..b6242cca56f41 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/efuse/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/efuse/defconfig @@ -33,7 +33,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/elf/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/elf/defconfig index 9fe081e517ba3..2e3a7f447eca8 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/elf/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/elf/defconfig @@ -44,7 +44,6 @@ CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y CONFIG_LIBC_STRERROR_ERRNUM=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/eth_lan9250/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/eth_lan9250/defconfig index 3a5d0032c817f..cf659edadaaf1 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/eth_lan9250/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/eth_lan9250/defconfig @@ -53,7 +53,6 @@ CONFIG_NET_ICMP_SOCKET=y CONFIG_NET_LAN9250=y CONFIG_NET_TCP=y CONFIG_NET_UDP=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/fastboot/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/fastboot/defconfig index e8789c32425eb..cb30053f046fe 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/fastboot/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/fastboot/defconfig @@ -67,7 +67,6 @@ CONFIG_NET_TCP_DELAYED_ACK=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_WRITE_BUFFERS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/fastboot_tcp/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/fastboot_tcp/defconfig index b24c11c7b5cb9..61e5294637a48 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/fastboot_tcp/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/fastboot_tcp/defconfig @@ -60,7 +60,6 @@ CONFIG_NET_TCP_DELAYED_ACK=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_WRITE_BUFFERS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/gpio/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/gpio/defconfig index 8bc58d04f569f..aff6d1aa74459 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/gpio/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/gpio/defconfig @@ -37,7 +37,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/i2c/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/i2c/defconfig index 47d7ae031ebb9..6ac4bb432436e 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/i2c/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/i2c/defconfig @@ -44,7 +44,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/i2schar/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/i2schar/defconfig index 7778391160f65..bb31e351c7663 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/i2schar/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/i2schar/defconfig @@ -49,7 +49,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=4096 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/knsh/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/knsh/defconfig index 029795e3e9ce6..26a4b3fcb979f 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/knsh/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/knsh/defconfig @@ -38,7 +38,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/ksta_softap/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/ksta_softap/defconfig index 761af027a3e1d..93935d04a8230 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/ksta_softap/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/ksta_softap/defconfig @@ -67,7 +67,6 @@ CONFIG_NET_TCP_DELAYED_ACK=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_WRITE_BUFFERS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/mbedtls/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/mbedtls/defconfig index 48c228c1e5dac..7371be1a16b24 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/mbedtls/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/mbedtls/defconfig @@ -75,7 +75,6 @@ CONFIG_NET_TCP_DELAYED_ACK=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_WRITE_BUFFERS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/mcuboot_nsh/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/mcuboot_nsh/defconfig index 5280806f3bac2..7aac4b3ffa4c7 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/mcuboot_nsh/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/mcuboot_nsh/defconfig @@ -35,7 +35,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/mcuboot_update_agent/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/mcuboot_update_agent/defconfig index 36f924e3873d1..963c7366edf14 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/mcuboot_update_agent/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/mcuboot_update_agent/defconfig @@ -66,7 +66,6 @@ CONFIG_NET_TCP_DELAYED_ACK=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_WRITE_BUFFERS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_MOTD=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/motor/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/motor/defconfig index 202010edc54ff..d22cfc0b345d0 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/motor/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/motor/defconfig @@ -36,7 +36,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/nsh/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/nsh/defconfig index 33a0591324130..5650959cbbf44 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/nsh/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/nsh/defconfig @@ -34,7 +34,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/nxlooper/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/nxlooper/defconfig index ed5c723355fcc..27f05105b619c 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/nxlooper/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/nxlooper/defconfig @@ -59,7 +59,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/oneshot/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/oneshot/defconfig index de75191a3ea79..6c980ea2a77ee 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/oneshot/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/oneshot/defconfig @@ -41,7 +41,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/ostest/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/ostest/defconfig index 068996aebd77d..8ab15c318845d 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/ostest/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/ostest/defconfig @@ -35,7 +35,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/pm/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/pm/defconfig index 4230f6fb2cb89..4f3e936e1f15f 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/pm/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/pm/defconfig @@ -35,7 +35,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/psram_octal/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/psram_octal/defconfig index c6414d7e7fde0..72f42f75d8f6d 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/psram_octal/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/psram_octal/defconfig @@ -38,7 +38,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/psram_quad/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/psram_quad/defconfig index 3e9513bd97ed8..44dd4c25c44a1 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/psram_quad/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/psram_quad/defconfig @@ -37,7 +37,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/psram_usrheap/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/psram_usrheap/defconfig index 34fd44f797731..43ea61037fbc0 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/psram_usrheap/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/psram_usrheap/defconfig @@ -40,7 +40,6 @@ CONFIG_IOB_THROTTLE=8 CONFIG_LINE_MAX=64 CONFIG_MM_IOB=y CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/pwm/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/pwm/defconfig index d8b57c241d9b9..6b3360e509500 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/pwm/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/pwm/defconfig @@ -40,7 +40,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/python/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/python/defconfig index 2b5342cb3c079..be1838f78a641 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/python/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/python/defconfig @@ -81,7 +81,6 @@ CONFIG_NET_TCP_DELAYED_ACK=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_WRITE_BUFFERS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/qemu_debug/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/qemu_debug/defconfig index d835f2b82cf94..38ffc83b05fcd 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/qemu_debug/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/qemu_debug/defconfig @@ -67,7 +67,6 @@ CONFIG_NET_TCP_DELAYED_ACK=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_WRITE_BUFFERS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/qemu_openeth/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/qemu_openeth/defconfig index 9262b87134a29..0a6fc488fc568 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/qemu_openeth/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/qemu_openeth/defconfig @@ -50,7 +50,6 @@ CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_NPOLLWAITERS=8 CONFIG_NET_UDP_WRITE_BUFFERS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/qemu_toywasm/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/qemu_toywasm/defconfig index 4f8291a03e02f..87eb706a6368b 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/qemu_toywasm/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/qemu_toywasm/defconfig @@ -68,7 +68,6 @@ CONFIG_NET_TCP_DELAYED_ACK=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_WRITE_BUFFERS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/qencoder/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/qencoder/defconfig index 55cd4643110ce..d1f63138d3e3c 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/qencoder/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/qencoder/defconfig @@ -43,7 +43,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/random/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/random/defconfig index 563ead80bb886..2b470e0a7771d 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/random/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/random/defconfig @@ -36,7 +36,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/rmt/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/rmt/defconfig index 799ff569c6fa0..93205f1b19c0c 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/rmt/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/rmt/defconfig @@ -37,7 +37,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/romfs/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/romfs/defconfig index 975fb2dab5efe..2d79b92f11fa9 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/romfs/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/romfs/defconfig @@ -36,7 +36,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/rtc/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/rtc/defconfig index ca7556c4b3384..d1bced57f705e 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/rtc/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/rtc/defconfig @@ -34,7 +34,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=3 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/sdm/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/sdm/defconfig index 0dbc391bafd5a..a676a72296bbc 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/sdm/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/sdm/defconfig @@ -36,7 +36,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/sdmmc/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/sdmmc/defconfig index 6c7502434e1d6..e5a3b5471680c 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/sdmmc/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/sdmmc/defconfig @@ -38,7 +38,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MMCSD_CHECK_READY_STATUS_WITHOUT_SLEEP=y CONFIG_MMCSD_MULTIBLOCK_LIMIT=128 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/sdmmc_spi/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/sdmmc_spi/defconfig index cb4a5ab8a2d0b..0b372df26d7f9 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/sdmmc_spi/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/sdmmc_spi/defconfig @@ -40,7 +40,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MMCSD=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_MMCSDSPIPORTNO=2 diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/smp/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/smp/defconfig index 2123b0c3024be..48bab78dd1dcf 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/smp/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/smp/defconfig @@ -35,7 +35,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/sotest/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/sotest/defconfig index fbd3e6a5f7f8e..c7f27624c1da7 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/sotest/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/sotest/defconfig @@ -39,7 +39,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_DLFCN=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/spi/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/spi/defconfig index 04d998093f0e9..c95c3209eecb3 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/spi/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/spi/defconfig @@ -34,7 +34,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/spiflash/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/spiflash/defconfig index 826d981741636..c3ed27f09c453 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/spiflash/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/spiflash/defconfig @@ -35,7 +35,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_LOSMART=y CONFIG_NSH_FILEIOSIZE=512 diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/spislv/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/spislv/defconfig index 5beeccc3eb3b3..b63b21a9903cd 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/spislv/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/spislv/defconfig @@ -34,7 +34,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/sta_softap/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/sta_softap/defconfig index 506df24ab2641..7cc2e08574520 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/sta_softap/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/sta_softap/defconfig @@ -59,7 +59,6 @@ CONFIG_NET_TCP_DELAYED_ACK=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_WRITE_BUFFERS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/stack/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/stack/defconfig index c44494db3c315..ba3be1e6d360f 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/stack/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/stack/defconfig @@ -35,7 +35,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/temperature_sensor/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/temperature_sensor/defconfig index b6a2777d8cc20..0d49cbb1d95df 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/temperature_sensor/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/temperature_sensor/defconfig @@ -36,7 +36,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/tickless/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/tickless/defconfig index 78d1747cdfd47..2e52406ddc693 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/tickless/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/tickless/defconfig @@ -35,7 +35,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/timer/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/timer/defconfig index 33d4c358cdaa9..17a267ea7a54b 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/timer/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/timer/defconfig @@ -39,7 +39,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/toywasm/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/toywasm/defconfig index 01accd8dca242..116a4a872413f 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/toywasm/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/toywasm/defconfig @@ -67,7 +67,6 @@ CONFIG_NET_TCP_DELAYED_ACK=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_WRITE_BUFFERS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/twai/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/twai/defconfig index dd16896f8311a..ef3db9c21e631 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/twai/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/twai/defconfig @@ -36,7 +36,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/ulp/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/ulp/defconfig index d98305e766e49..bb3b4006443c4 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/ulp/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/ulp/defconfig @@ -37,7 +37,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/usb_device/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/usb_device/defconfig index dafea25637050..9a892c88451ed 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/usb_device/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/usb_device/defconfig @@ -37,7 +37,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=4096 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/usbnsh/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/usbnsh/defconfig index 6a365c2164756..27334d522c42b 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/usbnsh/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/usbnsh/defconfig @@ -39,7 +39,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=4096 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/watchdog/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/watchdog/defconfig index c12c8b8800c95..2096abc4b19bf 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/watchdog/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/watchdog/defconfig @@ -38,7 +38,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/wifi/defconfig b/boards/xtensa/esp32s3/esp32s3-devkit/configs/wifi/defconfig index d1f5b7e317f79..030ebafff3ad5 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/wifi/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/wifi/defconfig @@ -55,7 +55,6 @@ CONFIG_NET_TCP_DELAYED_ACK=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_WRITE_BUFFERS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/src/Make.defs b/boards/xtensa/esp32s3/esp32s3-devkit/src/Make.defs index 65e5a421f3e41..496bb5d4323ae 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/src/Make.defs +++ b/boards/xtensa/esp32s3/esp32s3-devkit/src/Make.defs @@ -22,12 +22,9 @@ CSRCS = esp32s3_boot.c esp32s3_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += esp32s3_appinit.c ifeq ($(CONFIG_BOARDCTL_RESET),y) CSRCS += esp32s3_reset.c endif -endif ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += esp32s3_buttons.c diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/src/esp32s3-devkit.h b/boards/xtensa/esp32s3/esp32s3-devkit/src/esp32s3-devkit.h index 215722a6b65f7..d08c982b78a67 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/src/esp32s3-devkit.h +++ b/boards/xtensa/esp32s3/esp32s3-devkit/src/esp32s3-devkit.h @@ -89,9 +89,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 esp32s3_bringup(void); diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/src/esp32s3_appinit.c b/boards/xtensa/esp32s3/esp32s3-devkit/src/esp32s3_appinit.c deleted file mode 100644 index f95282cf3b12a..0000000000000 --- a/boards/xtensa/esp32s3/esp32s3-devkit/src/esp32s3_appinit.c +++ /dev/null @@ -1,82 +0,0 @@ -/**************************************************************************** - * boards/xtensa/esp32s3/esp32s3-devkit/src/esp32s3_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 - -#include -#include - -#include "esp32s3-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 esp32s3_bringup(); -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/xtensa/esp32s3/esp32s3-eye/configs/gpio/defconfig b/boards/xtensa/esp32s3/esp32s3-eye/configs/gpio/defconfig index bbd23859db25c..2422d87f8a80f 100644 --- a/boards/xtensa/esp32s3/esp32s3-eye/configs/gpio/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-eye/configs/gpio/defconfig @@ -39,7 +39,6 @@ CONFIG_INPUT_BUTTONS=y CONFIG_INPUT_BUTTONS_LOWER=y CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-eye/configs/i2c/defconfig b/boards/xtensa/esp32s3/esp32s3-eye/configs/i2c/defconfig index 16dd6d3423ab7..be9f03925ebfc 100644 --- a/boards/xtensa/esp32s3/esp32s3-eye/configs/i2c/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-eye/configs/i2c/defconfig @@ -37,7 +37,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-eye/configs/lcd/defconfig b/boards/xtensa/esp32s3/esp32s3-eye/configs/lcd/defconfig index 7f44e77c9bce3..30c9b29dbcdb0 100644 --- a/boards/xtensa/esp32s3/esp32s3-eye/configs/lcd/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-eye/configs/lcd/defconfig @@ -45,7 +45,6 @@ CONFIG_LCD_ST7789_BGR=y CONFIG_LCD_ST7789_FREQUENCY=40000000 CONFIG_LCD_ST7789_YRES=240 CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-eye/configs/nsh/defconfig b/boards/xtensa/esp32s3/esp32s3-eye/configs/nsh/defconfig index b15511fd4745a..15fe107378da1 100644 --- a/boards/xtensa/esp32s3/esp32s3-eye/configs/nsh/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-eye/configs/nsh/defconfig @@ -33,7 +33,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-eye/configs/usbnsh/defconfig b/boards/xtensa/esp32s3/esp32s3-eye/configs/usbnsh/defconfig index 366deb3add57e..bc7122c69c5e0 100644 --- a/boards/xtensa/esp32s3/esp32s3-eye/configs/usbnsh/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-eye/configs/usbnsh/defconfig @@ -38,7 +38,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=4096 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-eye/configs/wifi/defconfig b/boards/xtensa/esp32s3/esp32s3-eye/configs/wifi/defconfig index af8890892c3e7..dcc98d90f2c4a 100644 --- a/boards/xtensa/esp32s3/esp32s3-eye/configs/wifi/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-eye/configs/wifi/defconfig @@ -59,7 +59,6 @@ CONFIG_NET_TCP_DELAYED_ACK=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_WRITE_BUFFERS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-eye/src/Make.defs b/boards/xtensa/esp32s3/esp32s3-eye/src/Make.defs index 8bb59118672d4..2857f3340491c 100644 --- a/boards/xtensa/esp32s3/esp32s3-eye/src/Make.defs +++ b/boards/xtensa/esp32s3/esp32s3-eye/src/Make.defs @@ -22,12 +22,9 @@ CSRCS = esp32s3_boot.c esp32s3_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += esp32s3_appinit.c ifeq ($(CONFIG_BOARDCTL_RESET),y) CSRCS += esp32s3_reset.c endif -endif ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += esp32s3_buttons.c diff --git a/boards/xtensa/esp32s3/esp32s3-eye/src/esp32s3-eye.h b/boards/xtensa/esp32s3/esp32s3-eye/src/esp32s3-eye.h index 0be1fd2dfdb55..3005a0bb383a7 100644 --- a/boards/xtensa/esp32s3/esp32s3-eye/src/esp32s3-eye.h +++ b/boards/xtensa/esp32s3/esp32s3-eye/src/esp32s3-eye.h @@ -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() - * ****************************************************************************/ int esp32s3_bringup(void); diff --git a/boards/xtensa/esp32s3/esp32s3-eye/src/esp32s3_appinit.c b/boards/xtensa/esp32s3/esp32s3-eye/src/esp32s3_appinit.c deleted file mode 100644 index c582f0959c160..0000000000000 --- a/boards/xtensa/esp32s3/esp32s3-eye/src/esp32s3_appinit.c +++ /dev/null @@ -1,82 +0,0 @@ -/**************************************************************************** - * boards/xtensa/esp32s3/esp32s3-eye/src/esp32s3_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 - -#include -#include - -#include "esp32s3-eye.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 esp32s3_bringup(); -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/xtensa/esp32s3/esp32s3-korvo-2/configs/audio/defconfig b/boards/xtensa/esp32s3/esp32s3-korvo-2/configs/audio/defconfig index 2d9fb77d7e682..55948faa0db52 100644 --- a/boards/xtensa/esp32s3/esp32s3-korvo-2/configs/audio/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-korvo-2/configs/audio/defconfig @@ -84,7 +84,6 @@ CONFIG_NET_TCP_DELAYED_ACK=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_WRITE_BUFFERS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_PROMPT_MAX=32 diff --git a/boards/xtensa/esp32s3/esp32s3-korvo-2/configs/nsh/defconfig b/boards/xtensa/esp32s3/esp32s3-korvo-2/configs/nsh/defconfig index 0f922d001790c..0d074419d5c02 100644 --- a/boards/xtensa/esp32s3/esp32s3-korvo-2/configs/nsh/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-korvo-2/configs/nsh/defconfig @@ -36,7 +36,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-korvo-2/configs/rtptools/defconfig b/boards/xtensa/esp32s3/esp32s3-korvo-2/configs/rtptools/defconfig index 23df8e5044a3a..5965c3e3e0694 100644 --- a/boards/xtensa/esp32s3/esp32s3-korvo-2/configs/rtptools/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-korvo-2/configs/rtptools/defconfig @@ -86,7 +86,6 @@ CONFIG_NET_TCP_DELAYED_ACK=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_WRITE_BUFFERS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_PROMPT_MAX=32 diff --git a/boards/xtensa/esp32s3/esp32s3-korvo-2/configs/sdmmc/defconfig b/boards/xtensa/esp32s3/esp32s3-korvo-2/configs/sdmmc/defconfig index 05f0c31263632..135731cb942d9 100644 --- a/boards/xtensa/esp32s3/esp32s3-korvo-2/configs/sdmmc/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-korvo-2/configs/sdmmc/defconfig @@ -43,7 +43,6 @@ CONFIG_LINE_MAX=64 CONFIG_MMCSD_CHECK_READY_STATUS_WITHOUT_SLEEP=y CONFIG_MMCSD_MULTIBLOCK_LIMIT=128 CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-korvo-2/src/Make.defs b/boards/xtensa/esp32s3/esp32s3-korvo-2/src/Make.defs index c94f85d79e084..1f1d7b1103c10 100644 --- a/boards/xtensa/esp32s3/esp32s3-korvo-2/src/Make.defs +++ b/boards/xtensa/esp32s3/esp32s3-korvo-2/src/Make.defs @@ -22,12 +22,9 @@ CSRCS = esp32s3_boot.c esp32s3_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += esp32s3_appinit.c ifeq ($(CONFIG_BOARDCTL_RESET),y) CSRCS += esp32s3_reset.c endif -endif ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += esp32s3_buttons.c diff --git a/boards/xtensa/esp32s3/esp32s3-korvo-2/src/esp32s3-korvo-2.h b/boards/xtensa/esp32s3/esp32s3-korvo-2/src/esp32s3-korvo-2.h index 9b1ce39e1e153..e5e4aa9955d12 100644 --- a/boards/xtensa/esp32s3/esp32s3-korvo-2/src/esp32s3-korvo-2.h +++ b/boards/xtensa/esp32s3/esp32s3-korvo-2/src/esp32s3-korvo-2.h @@ -73,9 +73,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 esp32s3_bringup(void); diff --git a/boards/xtensa/esp32s3/esp32s3-korvo-2/src/esp32s3_appinit.c b/boards/xtensa/esp32s3/esp32s3-korvo-2/src/esp32s3_appinit.c deleted file mode 100644 index 38b1224d30e19..0000000000000 --- a/boards/xtensa/esp32s3/esp32s3-korvo-2/src/esp32s3_appinit.c +++ /dev/null @@ -1,82 +0,0 @@ -/**************************************************************************** - * boards/xtensa/esp32s3/esp32s3-korvo-2/src/esp32s3_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 - -#include -#include - -#include "esp32s3-korvo-2.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 esp32s3_bringup(); -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/xtensa/esp32s3/esp32s3-lcd-ev/configs/audio/defconfig b/boards/xtensa/esp32s3/esp32s3-lcd-ev/configs/audio/defconfig index 5ee3f77b703d8..0d46dba971381 100644 --- a/boards/xtensa/esp32s3/esp32s3-lcd-ev/configs/audio/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-lcd-ev/configs/audio/defconfig @@ -79,7 +79,6 @@ CONFIG_NET_TCP_DELAYED_ACK=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_WRITE_BUFFERS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-lcd-ev/configs/buttons/defconfig b/boards/xtensa/esp32s3/esp32s3-lcd-ev/configs/buttons/defconfig index 38dbd7e5ad12e..8c4639d4a90ee 100644 --- a/boards/xtensa/esp32s3/esp32s3-lcd-ev/configs/buttons/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-lcd-ev/configs/buttons/defconfig @@ -43,7 +43,6 @@ CONFIG_INPUT_BUTTONS=y CONFIG_INPUT_BUTTONS_LOWER=y CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-lcd-ev/configs/lcd/defconfig b/boards/xtensa/esp32s3/esp32s3-lcd-ev/configs/lcd/defconfig index 95a4f1de23f3f..38c963e64c0cb 100644 --- a/boards/xtensa/esp32s3/esp32s3-lcd-ev/configs/lcd/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-lcd-ev/configs/lcd/defconfig @@ -47,7 +47,6 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 CONFIG_NDEBUG=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-lcd-ev/configs/lvgl/defconfig b/boards/xtensa/esp32s3/esp32s3-lcd-ev/configs/lvgl/defconfig index 2bbc86d2a99a1..650102ce1ab49 100644 --- a/boards/xtensa/esp32s3/esp32s3-lcd-ev/configs/lvgl/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-lcd-ev/configs/lvgl/defconfig @@ -60,7 +60,6 @@ CONFIG_LV_USE_NUTTX=y CONFIG_LV_USE_NUTTX_TOUCHSCREEN=y CONFIG_MM_REGIONS=2 CONFIG_NDEBUG=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-lcd-ev/configs/nsh/defconfig b/boards/xtensa/esp32s3/esp32s3-lcd-ev/configs/nsh/defconfig index bef08fe21b5a5..0c726545e5b0b 100644 --- a/boards/xtensa/esp32s3/esp32s3-lcd-ev/configs/nsh/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-lcd-ev/configs/nsh/defconfig @@ -34,7 +34,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-lcd-ev/configs/ws2812/defconfig b/boards/xtensa/esp32s3/esp32s3-lcd-ev/configs/ws2812/defconfig index 88c69e36b56b1..cb1dd6156ad18 100644 --- a/boards/xtensa/esp32s3/esp32s3-lcd-ev/configs/ws2812/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-lcd-ev/configs/ws2812/defconfig @@ -37,7 +37,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-lcd-ev/src/Make.defs b/boards/xtensa/esp32s3/esp32s3-lcd-ev/src/Make.defs index f98a5fed35412..ebdce620fcfb1 100644 --- a/boards/xtensa/esp32s3/esp32s3-lcd-ev/src/Make.defs +++ b/boards/xtensa/esp32s3/esp32s3-lcd-ev/src/Make.defs @@ -22,12 +22,9 @@ CSRCS = esp32s3_boot.c esp32s3_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += esp32s3_appinit.c ifeq ($(CONFIG_BOARDCTL_RESET),y) CSRCS += esp32s3_reset.c endif -endif ifeq ($(CONFIG_ARCH_BUTTONS),y) CSRCS += esp32s3_buttons.c diff --git a/boards/xtensa/esp32s3/esp32s3-lcd-ev/src/esp32s3-lcd-ev.h b/boards/xtensa/esp32s3/esp32s3-lcd-ev/src/esp32s3-lcd-ev.h index c2347cd3502de..3967fc53d4fad 100644 --- a/boards/xtensa/esp32s3/esp32s3-lcd-ev/src/esp32s3-lcd-ev.h +++ b/boards/xtensa/esp32s3/esp32s3-lcd-ev/src/esp32s3-lcd-ev.h @@ -73,9 +73,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 esp32s3_bringup(void); diff --git a/boards/xtensa/esp32s3/esp32s3-lcd-ev/src/esp32s3_appinit.c b/boards/xtensa/esp32s3/esp32s3-lcd-ev/src/esp32s3_appinit.c deleted file mode 100644 index 86ff333d464e6..0000000000000 --- a/boards/xtensa/esp32s3/esp32s3-lcd-ev/src/esp32s3_appinit.c +++ /dev/null @@ -1,82 +0,0 @@ -/**************************************************************************** - * boards/xtensa/esp32s3/esp32s3-lcd-ev/src/esp32s3_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 - -#include -#include - -#include "esp32s3-lcd-ev.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 esp32s3_bringup(); -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/xtensa/esp32s3/esp32s3-lhcbit/configs/usbnsh/defconfig b/boards/xtensa/esp32s3/esp32s3-lhcbit/configs/usbnsh/defconfig index 6f282a57b32e3..b916a5eda7283 100644 --- a/boards/xtensa/esp32s3/esp32s3-lhcbit/configs/usbnsh/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-lhcbit/configs/usbnsh/defconfig @@ -38,7 +38,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=4096 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-lhcbit/src/Make.defs b/boards/xtensa/esp32s3/esp32s3-lhcbit/src/Make.defs index 1aa31c3d291d7..e7879dee49d25 100644 --- a/boards/xtensa/esp32s3/esp32s3-lhcbit/src/Make.defs +++ b/boards/xtensa/esp32s3/esp32s3-lhcbit/src/Make.defs @@ -22,12 +22,9 @@ CSRCS = esp32s3_boot.c esp32s3_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += esp32s3_appinit.c ifeq ($(CONFIG_BOARDCTL_RESET),y) CSRCS += esp32s3_reset.c endif -endif DEPPATH += --dep-path board VPATH += :board diff --git a/boards/xtensa/esp32s3/esp32s3-lhcbit/src/esp32s3-lhcbit.h b/boards/xtensa/esp32s3/esp32s3-lhcbit/src/esp32s3-lhcbit.h index a91556c9b0978..1c1e85bc74139 100644 --- a/boards/xtensa/esp32s3/esp32s3-lhcbit/src/esp32s3-lhcbit.h +++ b/boards/xtensa/esp32s3/esp32s3-lhcbit/src/esp32s3-lhcbit.h @@ -58,9 +58,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 esp32s3_bringup(void); diff --git a/boards/xtensa/esp32s3/esp32s3-lhcbit/src/esp32s3_appinit.c b/boards/xtensa/esp32s3/esp32s3-lhcbit/src/esp32s3_appinit.c deleted file mode 100644 index 0501ee688639d..0000000000000 --- a/boards/xtensa/esp32s3/esp32s3-lhcbit/src/esp32s3_appinit.c +++ /dev/null @@ -1,82 +0,0 @@ -/**************************************************************************** - * boards/xtensa/esp32s3/esp32s3-lhcbit/src/esp32s3_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 - -#include -#include - -#include "esp32s3-lhcbit.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 esp32s3_bringup(); -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/xtensa/esp32s3/esp32s3-meadow/configs/nsh/defconfig b/boards/xtensa/esp32s3/esp32s3-meadow/configs/nsh/defconfig index 498e2b8d4e2ed..0c0c36a32f4ad 100644 --- a/boards/xtensa/esp32s3/esp32s3-meadow/configs/nsh/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-meadow/configs/nsh/defconfig @@ -33,7 +33,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-meadow/configs/usbnsh/defconfig b/boards/xtensa/esp32s3/esp32s3-meadow/configs/usbnsh/defconfig index ae45ab07eba34..390cc3b252171 100644 --- a/boards/xtensa/esp32s3/esp32s3-meadow/configs/usbnsh/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-meadow/configs/usbnsh/defconfig @@ -38,7 +38,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=4096 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-meadow/src/Make.defs b/boards/xtensa/esp32s3/esp32s3-meadow/src/Make.defs index bdcb207ae1a25..5553ea6721c17 100644 --- a/boards/xtensa/esp32s3/esp32s3-meadow/src/Make.defs +++ b/boards/xtensa/esp32s3/esp32s3-meadow/src/Make.defs @@ -22,12 +22,9 @@ CSRCS = esp32s3_boot.c esp32s3_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += esp32s3_appinit.c ifeq ($(CONFIG_BOARDCTL_RESET),y) CSRCS += esp32s3_reset.c endif -endif DEPPATH += --dep-path board VPATH += :board diff --git a/boards/xtensa/esp32s3/esp32s3-meadow/src/esp32s3-meadow.h b/boards/xtensa/esp32s3/esp32s3-meadow/src/esp32s3-meadow.h index d2bcaeda7c5c9..48b484070479b 100644 --- a/boards/xtensa/esp32s3/esp32s3-meadow/src/esp32s3-meadow.h +++ b/boards/xtensa/esp32s3/esp32s3-meadow/src/esp32s3-meadow.h @@ -58,9 +58,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 esp32s3_bringup(void); diff --git a/boards/xtensa/esp32s3/esp32s3-meadow/src/esp32s3_appinit.c b/boards/xtensa/esp32s3/esp32s3-meadow/src/esp32s3_appinit.c deleted file mode 100644 index b99776d8f6e74..0000000000000 --- a/boards/xtensa/esp32s3/esp32s3-meadow/src/esp32s3_appinit.c +++ /dev/null @@ -1,82 +0,0 @@ -/**************************************************************************** - * boards/xtensa/esp32s3/esp32s3-meadow/src/esp32s3_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 - -#include -#include - -#include "esp32s3-meadow.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 esp32s3_bringup(); -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/xtensa/esp32s3/esp32s3-ws-lcd128/configs/notouch-lvgl/defconfig b/boards/xtensa/esp32s3/esp32s3-ws-lcd128/configs/notouch-lvgl/defconfig index 8cebfe094408d..d1168981e5596 100644 --- a/boards/xtensa/esp32s3/esp32s3-ws-lcd128/configs/notouch-lvgl/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-ws-lcd128/configs/notouch-lvgl/defconfig @@ -21,7 +21,6 @@ CONFIG_ARCH_NUSER_INTERRUPTS=2 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_XTENSA=y CONFIG_BOARD_INITTHREAD_STACKSIZE=8192 -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y CONFIG_DEBUG_FULLOPT=y diff --git a/boards/xtensa/esp32s3/esp32s3-ws-lcd128/configs/touch-lvgl/defconfig b/boards/xtensa/esp32s3/esp32s3-ws-lcd128/configs/touch-lvgl/defconfig index a81c3338a5aa4..82ea889a3670d 100644 --- a/boards/xtensa/esp32s3/esp32s3-ws-lcd128/configs/touch-lvgl/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-ws-lcd128/configs/touch-lvgl/defconfig @@ -22,7 +22,6 @@ CONFIG_ARCH_NUSER_INTERRUPTS=2 CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_XTENSA=y CONFIG_BOARD_INITTHREAD_STACKSIZE=8192 -CONFIG_BOARD_LATE_INITIALIZE=y CONFIG_BOARD_LOOPSPERMSEC=16717 CONFIG_BUILTIN=y CONFIG_DEBUG_FULLOPT=y diff --git a/boards/xtensa/esp32s3/esp32s3-ws-lcd128/src/Make.defs b/boards/xtensa/esp32s3/esp32s3-ws-lcd128/src/Make.defs index a8b6eb27f1640..a6443c18e3a66 100644 --- a/boards/xtensa/esp32s3/esp32s3-ws-lcd128/src/Make.defs +++ b/boards/xtensa/esp32s3/esp32s3-ws-lcd128/src/Make.defs @@ -23,7 +23,6 @@ CSRCS = esp32s3_boot.c esp32s3_bringup.c ifeq ($(CONFIG_BOARDCTL),y) - CSRCS += esp32s3_appinit.c ifeq ($(CONFIG_BOARDCTL_RESET),y) CSRCS += esp32s3_reset.c endif diff --git a/boards/xtensa/esp32s3/esp32s3-ws-lcd128/src/esp32s3-ws-lcd128.h b/boards/xtensa/esp32s3/esp32s3-ws-lcd128/src/esp32s3-ws-lcd128.h index e99534fea82a2..41396ad1281ed 100644 --- a/boards/xtensa/esp32s3/esp32s3-ws-lcd128/src/esp32s3-ws-lcd128.h +++ b/boards/xtensa/esp32s3/esp32s3-ws-lcd128/src/esp32s3-ws-lcd128.h @@ -97,12 +97,6 @@ * Description: * Perform architecture-specific initialization * - * 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 esp32s3_bringup(void); diff --git a/boards/xtensa/esp32s3/esp32s3-ws-lcd128/src/esp32s3_appinit.c b/boards/xtensa/esp32s3/esp32s3-ws-lcd128/src/esp32s3_appinit.c deleted file mode 100644 index 6ec0a750d94bf..0000000000000 --- a/boards/xtensa/esp32s3/esp32s3-ws-lcd128/src/esp32s3_appinit.c +++ /dev/null @@ -1,82 +0,0 @@ -/**************************************************************************** - * boards/xtensa/esp32s3/esp32s3-ws-lcd128/src/esp32s3_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 - -#include -#include - -#include "esp32s3-ws-lcd128.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 esp32s3_bringup(); -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/xtensa/esp32s3/esp32s3-xiao/configs/combo/defconfig b/boards/xtensa/esp32s3/esp32s3-xiao/configs/combo/defconfig index 8d4ebbfbaa2ad..b41c3015748ce 100644 --- a/boards/xtensa/esp32s3/esp32s3-xiao/configs/combo/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-xiao/configs/combo/defconfig @@ -43,7 +43,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=4096 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-xiao/configs/usbnsh/defconfig b/boards/xtensa/esp32s3/esp32s3-xiao/configs/usbnsh/defconfig index df085f67251ac..f631e45164fa9 100644 --- a/boards/xtensa/esp32s3/esp32s3-xiao/configs/usbnsh/defconfig +++ b/boards/xtensa/esp32s3/esp32s3-xiao/configs/usbnsh/defconfig @@ -38,7 +38,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=4096 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/esp32s3-xiao/src/Make.defs b/boards/xtensa/esp32s3/esp32s3-xiao/src/Make.defs index cd086ae4c5f69..05bf52fb1870d 100644 --- a/boards/xtensa/esp32s3/esp32s3-xiao/src/Make.defs +++ b/boards/xtensa/esp32s3/esp32s3-xiao/src/Make.defs @@ -22,12 +22,9 @@ CSRCS = esp32s3_boot.c esp32s3_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += esp32s3_appinit.c ifeq ($(CONFIG_BOARDCTL_RESET),y) CSRCS += esp32s3_reset.c endif -endif ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += esp32s3_autoleds.c diff --git a/boards/xtensa/esp32s3/esp32s3-xiao/src/esp32s3-xiao.h b/boards/xtensa/esp32s3/esp32s3-xiao/src/esp32s3-xiao.h index d51784cea245f..eed55595c0091 100644 --- a/boards/xtensa/esp32s3/esp32s3-xiao/src/esp32s3-xiao.h +++ b/boards/xtensa/esp32s3/esp32s3-xiao/src/esp32s3-xiao.h @@ -58,9 +58,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 esp32s3_bringup(void); diff --git a/boards/xtensa/esp32s3/esp32s3-xiao/src/esp32s3_appinit.c b/boards/xtensa/esp32s3/esp32s3-xiao/src/esp32s3_appinit.c deleted file mode 100644 index a8f0482be9547..0000000000000 --- a/boards/xtensa/esp32s3/esp32s3-xiao/src/esp32s3_appinit.c +++ /dev/null @@ -1,82 +0,0 @@ -/**************************************************************************** - * boards/xtensa/esp32s3/esp32s3-xiao/src/esp32s3_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 - -#include -#include - -#include "esp32s3-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 esp32s3_bringup(); -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/fastboot/defconfig b/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/fastboot/defconfig index db3d3e2805506..dd26a4dccb16f 100644 --- a/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/fastboot/defconfig +++ b/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/fastboot/defconfig @@ -67,7 +67,6 @@ CONFIG_NET_TCP_DELAYED_ACK=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_WRITE_BUFFERS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/fastboot_tcp/defconfig b/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/fastboot_tcp/defconfig index 601e4c7d4ceec..f024e2c65c2e8 100644 --- a/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/fastboot_tcp/defconfig +++ b/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/fastboot_tcp/defconfig @@ -58,7 +58,6 @@ CONFIG_NET_TCP_DELAYED_ACK=y CONFIG_NET_TCP_WRITE_BUFFERS=y CONFIG_NET_UDP=y CONFIG_NET_UDP_WRITE_BUFFERS=y -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/gpio/defconfig b/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/gpio/defconfig index 2d883c63f6704..16808e0334fca 100644 --- a/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/gpio/defconfig +++ b/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/gpio/defconfig @@ -37,7 +37,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/lcd/defconfig b/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/lcd/defconfig index edb55c91d8347..20a579e80f96d 100644 --- a/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/lcd/defconfig +++ b/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/lcd/defconfig @@ -66,7 +66,6 @@ CONFIG_LCD_ST7789=y CONFIG_LCD_ST7789_DATA_ENDIAN_LITTLE=y CONFIG_LCD_ST7789_FREQUENCY=40000000 CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/lvgl/defconfig b/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/lvgl/defconfig index eca401825e720..2ca158ce9bca2 100644 --- a/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/lvgl/defconfig +++ b/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/lvgl/defconfig @@ -98,7 +98,6 @@ CONFIG_LV_USE_NUTTX_LCD=y CONFIG_LV_USE_NUTTX_TOUCHSCREEN=y CONFIG_LV_USE_ST7789=y CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/nsh/defconfig b/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/nsh/defconfig index 0b46e8cf7e0ed..bebd68fc275cd 100644 --- a/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/nsh/defconfig +++ b/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/nsh/defconfig @@ -34,7 +34,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/pca9557/defconfig b/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/pca9557/defconfig index cc5dbe9882a9e..e9b132ff14de9 100644 --- a/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/pca9557/defconfig +++ b/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/pca9557/defconfig @@ -45,7 +45,6 @@ CONFIG_IOEXPANDER=y CONFIG_IOEXPANDER_NPINS=8 CONFIG_IOEXPANDER_PCA9557=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/psram/defconfig b/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/psram/defconfig index 8710dd56af82c..60fffd9780463 100644 --- a/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/psram/defconfig +++ b/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/psram/defconfig @@ -37,7 +37,6 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 CONFIG_MM_REGIONS=2 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/pwm/defconfig b/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/pwm/defconfig index 2423fc888b513..6a6a4c0455cf0 100644 --- a/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/pwm/defconfig +++ b/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/pwm/defconfig @@ -38,7 +38,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/qmi8658/defconfig b/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/qmi8658/defconfig index 54334c4872fb5..5a8f895d41ed2 100644 --- a/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/qmi8658/defconfig +++ b/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/qmi8658/defconfig @@ -36,7 +36,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/usb_device/defconfig b/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/usb_device/defconfig index b69fb541a6d3a..525679fd2e094 100644 --- a/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/usb_device/defconfig +++ b/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/usb_device/defconfig @@ -37,7 +37,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INIT_STACKSIZE=4096 CONFIG_INTELHEX_BINARY=y CONFIG_LINE_MAX=64 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/src/Make.defs b/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/src/Make.defs index 8c0dace97277a..69ec9e3727b1b 100644 --- a/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/src/Make.defs +++ b/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/src/Make.defs @@ -22,12 +22,9 @@ CSRCS = esp32s3_boot.c esp32s3_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += esp32s3_appinit.c ifeq ($(CONFIG_BOARDCTL_RESET),y) CSRCS += esp32s3_reset.c endif -endif ifeq ($(CONFIG_ESP32S3_SPI),y) CSRCS += esp32s3_board_spi.c diff --git a/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/src/esp32s3-szpi.h b/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/src/esp32s3-szpi.h index 544c15586f0da..859ee6b93ddba 100644 --- a/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/src/esp32s3-szpi.h +++ b/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/src/esp32s3-szpi.h @@ -76,9 +76,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 esp32s3_bringup(void); diff --git a/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/src/esp32s3_appinit.c b/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/src/esp32s3_appinit.c deleted file mode 100644 index 1d35812866465..0000000000000 --- a/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/src/esp32s3_appinit.c +++ /dev/null @@ -1,82 +0,0 @@ -/**************************************************************************** - * boards/xtensa/esp32s3/lckfb-szpi-esp32s3/src/esp32s3_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 - -#include -#include - -#include "esp32s3-szpi.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 esp32s3_bringup(); -#endif -} - -#endif /* CONFIG_BOARDCTL */ diff --git a/boards/z16/z16f/z16f2800100zcog/src/Makefile b/boards/z16/z16f/z16f2800100zcog/src/Makefile index 9f244f1b0c701..a093b244be7b3 100644 --- a/boards/z16/z16f/z16f2800100zcog/src/Makefile +++ b/boards/z16/z16f/z16f2800100zcog/src/Makefile @@ -24,8 +24,4 @@ include $(TOPDIR)/Make.defs CSRCS = z16f_boot.c z16f_leds.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += z16f_appinit.c -endif - include $(TOPDIR)/boards/Board.mk diff --git a/boards/z16/z16f/z16f2800100zcog/src/z16f_appinit.c b/boards/z16/z16f/z16f2800100zcog/src/z16f_appinit.c deleted file mode 100644 index b641e0a455e0b..0000000000000 --- a/boards/z16/z16f/z16f2800100zcog/src/z16f_appinit.c +++ /dev/null @@ -1,70 +0,0 @@ -/**************************************************************************** - * boards/z16/z16f/z16f2800100zcog/src/z16f_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 - -#include -#include - -#include - -/**************************************************************************** - * 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 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) -{ - return OK; -} diff --git a/boards/z80/ez80/makerlisp/configs/nsh_flash/defconfig b/boards/z80/ez80/makerlisp/configs/nsh_flash/defconfig index b187d17980933..30a91109a883c 100644 --- a/boards/z80/ez80/makerlisp/configs/nsh_flash/defconfig +++ b/boards/z80/ez80/makerlisp/configs/nsh_flash/defconfig @@ -31,7 +31,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=64 CONFIG_MMCSD=y CONFIG_MMCSD_MULTIBLOCK_LIMIT=1 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/z80/ez80/makerlisp/configs/nsh_ram/defconfig b/boards/z80/ez80/makerlisp/configs/nsh_ram/defconfig index 2bd4be5b45753..d6b79c086db55 100644 --- a/boards/z80/ez80/makerlisp/configs/nsh_ram/defconfig +++ b/boards/z80/ez80/makerlisp/configs/nsh_ram/defconfig @@ -32,7 +32,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=64 CONFIG_MMCSD=y CONFIG_MMCSD_MULTIBLOCK_LIMIT=1 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/z80/ez80/makerlisp/src/Makefile b/boards/z80/ez80/makerlisp/src/Makefile index 79a870e8cab58..8d12c0374cf53 100644 --- a/boards/z80/ez80/makerlisp/src/Makefile +++ b/boards/z80/ez80/makerlisp/src/Makefile @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = ez80_boot.c ez80_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += ez80_appinit.c -endif - ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += ez80_leds.c endif diff --git a/boards/z80/ez80/makerlisp/src/ez80_appinit.c b/boards/z80/ez80/makerlisp/src/ez80_appinit.c deleted file mode 100644 index 52d1f2ca7c5a0..0000000000000 --- a/boards/z80/ez80/makerlisp/src/ez80_appinit.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/z80/ez80/makerlisp/src/ez80_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 - -#include -#include - -#include "makerlisp.h" - -/**************************************************************************** - * 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 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 ez80_bringup(); -#endif -} diff --git a/boards/z80/ez80/z20x/configs/nsh/defconfig b/boards/z80/ez80/z20x/configs/nsh/defconfig index 6d9e70792c89a..3b54d1bffaf7c 100644 --- a/boards/z80/ez80/z20x/configs/nsh/defconfig +++ b/boards/z80/ez80/z20x/configs/nsh/defconfig @@ -32,7 +32,6 @@ CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LINE_MAX=64 CONFIG_MMCSD=y CONFIG_MMCSD_MULTIBLOCK_LIMIT=1 -CONFIG_NSH_ARCHINIT=y CONFIG_NSH_DISABLE_IFUPDOWN=y CONFIG_NSH_FILEIOSIZE=512 CONFIG_NSH_READLINE=y diff --git a/boards/z80/ez80/z20x/src/Makefile b/boards/z80/ez80/z20x/src/Makefile index 8463ef5a753b4..e659ec2c8ef96 100644 --- a/boards/z80/ez80/z20x/src/Makefile +++ b/boards/z80/ez80/z20x/src/Makefile @@ -24,10 +24,6 @@ include $(TOPDIR)/Make.defs CSRCS = ez80_boot.c ez80_bringup.c -ifeq ($(CONFIG_BOARDCTL),y) -CSRCS += ez80_appinit.c -endif - ifeq ($(CONFIG_EZ80_SPI),y) CSRCS += ez80_spi.c ifeq ($(CONFIG_MMCSD_SPI),y) diff --git a/boards/z80/ez80/z20x/src/ez80_appinit.c b/boards/z80/ez80/z20x/src/ez80_appinit.c deleted file mode 100644 index fb6f7d7da9da0..0000000000000 --- a/boards/z80/ez80/z20x/src/ez80_appinit.c +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - * boards/z80/ez80/z20x/src/ez80_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 - -#include -#include - -#include "z20x.h" - -/**************************************************************************** - * 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 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 ez80_bringup(); -#endif -} diff --git a/drivers/lcd/pcf8574_lcd_backpack_readme.txt b/drivers/lcd/pcf8574_lcd_backpack_readme.txt index 2f13cf7afd115..f4a88da4d2c35 100644 --- a/drivers/lcd/pcf8574_lcd_backpack_readme.txt +++ b/drivers/lcd/pcf8574_lcd_backpack_readme.txt @@ -23,7 +23,7 @@ Contents Summary for Those Who Don't Like to Read ======================================== -To use, in your board_app_initialize(), +To use: 1) instantiate an I2C bus: diff --git a/include/nuttx/board.h b/include/nuttx/board.h index 4656104b993f2..e89f95922c2a3 100644 --- a/include/nuttx/board.h +++ b/include/nuttx/board.h @@ -169,33 +169,6 @@ void board_early_initialize(void); void board_late_initialize(void); #endif -/**************************************************************************** - * 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 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); - /**************************************************************************** * Name: board_app_finalinitialize * diff --git a/include/sys/boardctl.h b/include/sys/boardctl.h index 23cd8f61e3087..00716bbcc4c70 100644 --- a/include/sys/boardctl.h +++ b/include/sys/boardctl.h @@ -60,23 +60,6 @@ ****************************************************************************/ /* Common commands - * - * CMD: BOARDIOC_INIT - * DESCRIPTION: Perform one-time application initialization. - * 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. - * CONFIGURATION: CONFIG_BOARDCTL - * DEPENDENCIES: Board logic must provide board_app_initialize() - * * CMD: BOARDIOC_POWEROFF * DESCRIPTION: Power off the board * ARG: Integer value providing power off status information diff --git a/sched/Kconfig b/sched/Kconfig index a3860afc1b0c2..8f07859d397a2 100644 --- a/sched/Kconfig +++ b/sched/Kconfig @@ -1490,7 +1490,7 @@ config BOARD_EARLY_INITIALIZE config BOARD_LATE_INITIALIZE bool "Custom board late initialization" - default n + default y ---help--- There are three points in time where you can insert custom, board-specific initialization logic: