You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "duduita (via GitHub)" <gi...@apache.org> on 2023/01/24 15:15:00 UTC

[GitHub] [nuttx] duduita opened a new pull request, #8228: Add initial support to Meadow F7Micro board

duduita opened a new pull request, #8228:
URL: https://github.com/apache/nuttx/pull/8228

   ## Summary
   Add support to Wilderness Labs F7Micro board.
   
   ## Impact
   Users will be able to use this board in the NuttX mainline.
   
   ## Testing
   -
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

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


[GitHub] [nuttx] acassis commented on a diff in pull request #8228: Add initial support to Meadow F7Micro board

Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis commented on code in PR #8228:
URL: https://github.com/apache/nuttx/pull/8228#discussion_r1086976928


##########
boards/Kconfig:
##########
@@ -2920,6 +2929,7 @@ config ARCH_BOARD
 	default "steval-eth001v1"           if ARCH_BOARD_STEVAL_ETH001V1
 	default "stm32h747i-disco"          if ARCH_BOARD_STM32H747I_DISCO
 	default "stm32f746-ws"              if ARCH_BOARD_STM32F746_WS
+    default "stm32f777zit6-meadow"      if ARCH_BOARD_MEADOW_F7MICRO

Review Comment:
   Please align this line with surround lines



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

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


[GitHub] [nuttx] xiaoxiang781216 merged pull request #8228: Add initial support to Meadow F7Micro board

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 merged PR #8228:
URL: https://github.com/apache/nuttx/pull/8228


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

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


[GitHub] [nuttx] acassis commented on a diff in pull request #8228: Add initial support to Meadow F7Micro board

Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis commented on code in PR #8228:
URL: https://github.com/apache/nuttx/pull/8228#discussion_r1086583319


##########
boards/arm/stm32f7/stm32f777zit6-meadow/src/stm32_autoleds.c:
##########
@@ -86,14 +86,14 @@ void board_autoled_initialize(void)
       stm32_configgpio(g_ledmap[i]);
       phy_set_led(i, false);
     }
-/*
-  while(1) {
-    phy_set_led(0, true);
-    for (i = 0; i < 10000000; i++);
-    phy_set_led(0, false);
-    for (i = 0; i < 10000000; i++);
-  }
-  */
+
+  /* while(1) {
+   *   phy_set_led(0, true);
+   *   for (i = 0; i < 10000000; i++);
+   *   phy_set_led(0, false);
+   *   for (i = 0; i < 10000000; i++);
+   * }
+   */

Review Comment:
   Please remove these lines, seems like some internal test



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

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


[GitHub] [nuttx] acassis commented on a diff in pull request #8228: Add initial support to Meadow F7Micro board

Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis commented on code in PR #8228:
URL: https://github.com/apache/nuttx/pull/8228#discussion_r1085639051


##########
boards/arm/stm32f7/stm32f777zit6-meadow/kernel/Makefile:
##########
@@ -0,0 +1,108 @@
+############################################################################
+# boards/arm/stm32f7/stm32f777zit6-meadow/kernel/Makefile
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.  The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+include $(TOPDIR)/Make.defs
+
+# The entry point name (if none is provided in the .config file)
+
+CONFIG_INIT_ENTRYPOINT ?= user_start
+ENTRYPT = $(patsubst "%",%,$(CONFIG_INIT_ENTRYPOINT))
+
+# Get the paths to the libraries and the links script path in format that
+# is appropriate for the host OS
+
+USER_LIBPATHS = $(addprefix -L,$(call CONVERT_PATH,$(addprefix $(TOPDIR)$(DELIM),$(dir $(USERLIBS)))))
+USER_LDSCRIPT = -T $(call CONVERT_PATH,$(BOARD_DIR)$(DELIM)scripts$(DELIM)memory.ld)
+USER_LDSCRIPT += -T $(call CONVERT_PATH,$(BOARD_DIR)$(DELIM)scripts$(DELIM)user-space.ld)
+USER_HEXFILE += $(call CONVERT_PATH,$(TOPDIR)$(DELIM)nuttx_user.hex)
+USER_SRECFILE += $(call CONVERT_PATH,$(TOPDIR)$(DELIM)nuttx_user.srec)
+USER_BINFILE += $(call CONVERT_PATH,$(TOPDIR)$(DELIM)nuttx_user.bin)
+
+USER_LDFLAGS = --undefined=$(ENTRYPT) --entry=$(ENTRYPT) $(USER_LDSCRIPT)
+USER_LDLIBS = $(patsubst lib%,-l%,$(basename $(notdir $(USERLIBS))))
+USER_LIBGCC = "${shell "$(CC_NOCCACHE)" $(ARCHCPUFLAGS) -print-libgcc-file-name}"
+
+# Source files
+
+CSRCS = stm32_userspace.c
+COBJS = $(CSRCS:.c=$(OBJEXT))
+OBJS  = $(COBJS)
+
+# Targets:
+
+all: $(TOPDIR)$(DELIM)nuttx_user.elf $(TOPDIR)$(DELIM)User.map
+.PHONY: nuttx_user.elf depend clean distclean
+
+$(COBJS): %$(OBJEXT): %.c
+	$(call COMPILE, $<, $@)
+
+# Create the nuttx_user.elf file containing all of the user-mode code
+
+MONO_DIR = /Users/plasma/Work/wl/meadow/mono/mono
+MONO_AOBJS = $(MONO_DIR)/sgen/.libs/libmonosgen.a \
+             $(MONO_DIR)/mini/.libs/libmini.a \
+             $(MONO_DIR)/mini/.libs/libmono-dbg.a \
+             $(MONO_DIR)/mini/.libs/libmono-ee-interp.a \
+             $(MONO_DIR)/utils/.libs/libmonoutils.a \
+             $(MONO_DIR)/dis/libmonodis.a \
+             $(MONO_DIR)/eglib/.libs/libeglib.a \
+             $(MONO_DIR)/metadata/.libs/libmonoruntime-config.a \
+             $(MONO_DIR)/metadata/.libs/libmonoruntimesgen.a \
+             $(MONO_DIR)/metadata/.libs/libmono-system-native.a
+
+MONO_LIBM = /usr/local/Caskroom/gcc-arm-embedded/7-2017-q4-major/gcc-arm-none-eabi-7-2017-q4-major/arm-none-eabi/lib/hard/libm.a
+MONO_LIBM=

Review Comment:
   Please remove



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

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


[GitHub] [nuttx] acassis commented on a diff in pull request #8228: Add initial support to Meadow F7Micro board

Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis commented on code in PR #8228:
URL: https://github.com/apache/nuttx/pull/8228#discussion_r1085651532


##########
boards/arm/stm32f7/stm32f777zit6-meadow/src/stm32_boot.c:
##########
@@ -0,0 +1,227 @@
+/****************************************************************************
+ * boards/arm/stm32f7/stm32f777zit6-meadow/src/stm32_boot.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 <nuttx/config.h>
+
+#include <debug.h>
+
+#include <nuttx/board.h>
+#include <arch/board/board.h>
+#include <nuttx/mtd/mtd.h>
+#include <nuttx/spi/qspi.h>
+
+#include "stm32f777zit6-meadow.h"
+
+#ifdef CONFIG_STM32F7_QUADSPI
+#  include <nuttx/mtd/mtd.h>
+#  include "stm32_qspi.h"
+
+#  ifdef CONFIG_FS_FAT
+#    include <sys/mount.h>
+#    include <nuttx/fs/fat.h>
+#  endif
+//MEADOW FIXME: header clash?
+extern FAR struct qspi_dev_s *stm32f7_qspi_initialize(int intf);
+#endif
+
+/************************************************************************************
+ * Pre-processor Definitions
+ ************************************************************************************/
+
+/************************************************************************************
+ * Private Functions
+ ************************************************************************************/
+
+/************************************************************************************
+ * Public Functions
+ ************************************************************************************/
+
+/************************************************************************************
+ * Name: stm32_boardinitialize
+ *
+ * Description:
+ *   All STM32 architectures must provide the following entry point.  This entry point
+ *   is called early in the initialization -- after all memory has been configured
+ *   and mapped but before any devices have been initialized.
+ *
+ ************************************************************************************/
+
+void up_netinitialize(void)
+{
+}
+
+void stm32_boardinitialize(void)
+{
+#if defined(CONFIG_STM32F7_SPI1) || defined(CONFIG_STM32F7_SPI2) || \
+    defined(CONFIG_STM32F7_SPI3) || defined(CONFIG_STM32F7_SPI4) || \
+    defined(CONFIG_STM32F7_SPI5)
+  /* Configure SPI chip selects if 1) SPI is not disabled, and 2) the weak
+   * function stm32_spidev_initialize() has been brought into the link.
+   */
+
+  if (stm32_spidev_initialize)
+    {
+      stm32_spidev_initialize();
+    }
+#endif
+
+#ifdef CONFIG_SPORADIC_INSTRUMENTATION
+  /* This configuration has been used for evaluating the NuttX sporadic
+   * scheduler.
+   * The following call initializes the sporadic scheduler monitor.
+   */
+
+  arch_sporadic_initialize();
+#endif
+
+#ifdef CONFIG_ARCH_LEDS
+  /* Configure on-board LEDs if LED support has been selected. */
+
+  board_autoled_initialize();
+#endif
+
+#ifdef CONFIG_STM32F7_FMC
+  stm32_sdram_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_STM32F7_QUADSPI
+  FAR struct qspi_dev_s *qspi;
+  FAR struct mtd_dev_s *mtd;
+#endif
+
+#ifdef CONFIG_STM32F7_QUADSPI
+  {
+
+    struct qspi_meminfo_s meminfo;
+
+    int ret;
+
+    qspi = stm32f7_qspi_initialize(0);
+    if (!qspi)
+      {
+        syslog(LOG_ERR, "ERROR: sam_qspi_initialize muiled\n");
+        return;
+      }
+
+    mtd = s25fl5_initialize(qspi, true);
+    if (!mtd)
+      {
+        syslog(LOG_ERR, "ERROR: s25fl5_initialize failed\n");
+        //return;

Review Comment:
   remove C++ comment



##########
boards/arm/stm32f7/stm32f777zit6-meadow/src/stm32_boot.c:
##########
@@ -0,0 +1,227 @@
+/****************************************************************************
+ * boards/arm/stm32f7/stm32f777zit6-meadow/src/stm32_boot.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 <nuttx/config.h>
+
+#include <debug.h>
+
+#include <nuttx/board.h>
+#include <arch/board/board.h>
+#include <nuttx/mtd/mtd.h>
+#include <nuttx/spi/qspi.h>
+
+#include "stm32f777zit6-meadow.h"
+
+#ifdef CONFIG_STM32F7_QUADSPI
+#  include <nuttx/mtd/mtd.h>
+#  include "stm32_qspi.h"
+
+#  ifdef CONFIG_FS_FAT
+#    include <sys/mount.h>
+#    include <nuttx/fs/fat.h>
+#  endif
+//MEADOW FIXME: header clash?
+extern FAR struct qspi_dev_s *stm32f7_qspi_initialize(int intf);
+#endif
+
+/************************************************************************************
+ * Pre-processor Definitions
+ ************************************************************************************/
+
+/************************************************************************************
+ * Private Functions
+ ************************************************************************************/
+
+/************************************************************************************
+ * Public Functions
+ ************************************************************************************/
+
+/************************************************************************************
+ * Name: stm32_boardinitialize
+ *
+ * Description:
+ *   All STM32 architectures must provide the following entry point.  This entry point
+ *   is called early in the initialization -- after all memory has been configured
+ *   and mapped but before any devices have been initialized.
+ *
+ ************************************************************************************/
+
+void up_netinitialize(void)
+{
+}
+
+void stm32_boardinitialize(void)
+{
+#if defined(CONFIG_STM32F7_SPI1) || defined(CONFIG_STM32F7_SPI2) || \
+    defined(CONFIG_STM32F7_SPI3) || defined(CONFIG_STM32F7_SPI4) || \
+    defined(CONFIG_STM32F7_SPI5)
+  /* Configure SPI chip selects if 1) SPI is not disabled, and 2) the weak
+   * function stm32_spidev_initialize() has been brought into the link.
+   */
+
+  if (stm32_spidev_initialize)
+    {
+      stm32_spidev_initialize();
+    }
+#endif
+
+#ifdef CONFIG_SPORADIC_INSTRUMENTATION
+  /* This configuration has been used for evaluating the NuttX sporadic
+   * scheduler.
+   * The following call initializes the sporadic scheduler monitor.
+   */
+
+  arch_sporadic_initialize();
+#endif
+
+#ifdef CONFIG_ARCH_LEDS
+  /* Configure on-board LEDs if LED support has been selected. */
+
+  board_autoled_initialize();
+#endif
+
+#ifdef CONFIG_STM32F7_FMC
+  stm32_sdram_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_STM32F7_QUADSPI
+  FAR struct qspi_dev_s *qspi;
+  FAR struct mtd_dev_s *mtd;
+#endif
+
+#ifdef CONFIG_STM32F7_QUADSPI
+  {
+
+    struct qspi_meminfo_s meminfo;
+
+    int ret;
+
+    qspi = stm32f7_qspi_initialize(0);
+    if (!qspi)
+      {
+        syslog(LOG_ERR, "ERROR: sam_qspi_initialize muiled\n");
+        return;
+      }
+
+    mtd = s25fl5_initialize(qspi, true);
+    if (!mtd)
+      {
+        syslog(LOG_ERR, "ERROR: s25fl5_initialize failed\n");
+        //return;
+      }
+
+    ret = ftl_initialize(0, mtd);
+    if (ret < 0)
+      {
+        ferr("ERROR: Initialize the FTL layer\n");
+        //return ret;

Review Comment:
   remove C++ comment



##########
boards/arm/stm32f7/stm32f777zit6-meadow/src/stm32_boot.c:
##########
@@ -0,0 +1,227 @@
+/****************************************************************************
+ * boards/arm/stm32f7/stm32f777zit6-meadow/src/stm32_boot.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 <nuttx/config.h>
+
+#include <debug.h>
+
+#include <nuttx/board.h>
+#include <arch/board/board.h>
+#include <nuttx/mtd/mtd.h>
+#include <nuttx/spi/qspi.h>
+
+#include "stm32f777zit6-meadow.h"
+
+#ifdef CONFIG_STM32F7_QUADSPI
+#  include <nuttx/mtd/mtd.h>
+#  include "stm32_qspi.h"
+
+#  ifdef CONFIG_FS_FAT
+#    include <sys/mount.h>
+#    include <nuttx/fs/fat.h>
+#  endif
+//MEADOW FIXME: header clash?
+extern FAR struct qspi_dev_s *stm32f7_qspi_initialize(int intf);
+#endif
+
+/************************************************************************************
+ * Pre-processor Definitions
+ ************************************************************************************/
+
+/************************************************************************************
+ * Private Functions
+ ************************************************************************************/
+
+/************************************************************************************
+ * Public Functions
+ ************************************************************************************/
+
+/************************************************************************************
+ * Name: stm32_boardinitialize
+ *
+ * Description:
+ *   All STM32 architectures must provide the following entry point.  This entry point
+ *   is called early in the initialization -- after all memory has been configured
+ *   and mapped but before any devices have been initialized.
+ *
+ ************************************************************************************/
+
+void up_netinitialize(void)
+{
+}
+
+void stm32_boardinitialize(void)
+{
+#if defined(CONFIG_STM32F7_SPI1) || defined(CONFIG_STM32F7_SPI2) || \
+    defined(CONFIG_STM32F7_SPI3) || defined(CONFIG_STM32F7_SPI4) || \
+    defined(CONFIG_STM32F7_SPI5)
+  /* Configure SPI chip selects if 1) SPI is not disabled, and 2) the weak
+   * function stm32_spidev_initialize() has been brought into the link.
+   */
+
+  if (stm32_spidev_initialize)
+    {
+      stm32_spidev_initialize();
+    }
+#endif
+
+#ifdef CONFIG_SPORADIC_INSTRUMENTATION
+  /* This configuration has been used for evaluating the NuttX sporadic
+   * scheduler.
+   * The following call initializes the sporadic scheduler monitor.
+   */
+
+  arch_sporadic_initialize();
+#endif
+
+#ifdef CONFIG_ARCH_LEDS
+  /* Configure on-board LEDs if LED support has been selected. */
+
+  board_autoled_initialize();
+#endif
+
+#ifdef CONFIG_STM32F7_FMC
+  stm32_sdram_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_STM32F7_QUADSPI
+  FAR struct qspi_dev_s *qspi;
+  FAR struct mtd_dev_s *mtd;
+#endif
+
+#ifdef CONFIG_STM32F7_QUADSPI
+  {
+
+    struct qspi_meminfo_s meminfo;
+
+    int ret;
+
+    qspi = stm32f7_qspi_initialize(0);
+    if (!qspi)
+      {
+        syslog(LOG_ERR, "ERROR: sam_qspi_initialize muiled\n");
+        return;
+      }
+
+    mtd = s25fl5_initialize(qspi, true);
+    if (!mtd)
+      {
+        syslog(LOG_ERR, "ERROR: s25fl5_initialize failed\n");
+        //return;
+      }
+
+    ret = ftl_initialize(0, mtd);
+    if (ret < 0)
+      {
+        ferr("ERROR: Initialize the FTL layer\n");
+        //return ret;
+      }
+ /*
+    ret = nxffs_initialize(mtd);
+    if (ret < 0)
+      {
+        ferr("ERROR: NXFFS initialization failed: %d\n", -ret);
+        return;
+      }
+
+    ret = mount(NULL, "/mnt/meadow0", "nxffs", 0, NULL);
+    if (ret < 0)
+      {
+        ferr("ERROR: Failed to mount the NXFFS volume: %d\n", errno);
+        return;
+      }
+*/

Review Comment:
   remove



##########
boards/arm/stm32f7/stm32f777zit6-meadow/src/stm32_boot.c:
##########
@@ -0,0 +1,227 @@
+/****************************************************************************
+ * boards/arm/stm32f7/stm32f777zit6-meadow/src/stm32_boot.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 <nuttx/config.h>
+
+#include <debug.h>
+
+#include <nuttx/board.h>
+#include <arch/board/board.h>
+#include <nuttx/mtd/mtd.h>
+#include <nuttx/spi/qspi.h>
+
+#include "stm32f777zit6-meadow.h"
+
+#ifdef CONFIG_STM32F7_QUADSPI
+#  include <nuttx/mtd/mtd.h>
+#  include "stm32_qspi.h"
+
+#  ifdef CONFIG_FS_FAT
+#    include <sys/mount.h>
+#    include <nuttx/fs/fat.h>
+#  endif
+//MEADOW FIXME: header clash?
+extern FAR struct qspi_dev_s *stm32f7_qspi_initialize(int intf);
+#endif
+
+/************************************************************************************
+ * Pre-processor Definitions
+ ************************************************************************************/
+
+/************************************************************************************
+ * Private Functions
+ ************************************************************************************/
+
+/************************************************************************************
+ * Public Functions
+ ************************************************************************************/
+
+/************************************************************************************
+ * Name: stm32_boardinitialize
+ *
+ * Description:
+ *   All STM32 architectures must provide the following entry point.  This entry point
+ *   is called early in the initialization -- after all memory has been configured
+ *   and mapped but before any devices have been initialized.
+ *
+ ************************************************************************************/
+
+void up_netinitialize(void)
+{
+}
+
+void stm32_boardinitialize(void)
+{
+#if defined(CONFIG_STM32F7_SPI1) || defined(CONFIG_STM32F7_SPI2) || \
+    defined(CONFIG_STM32F7_SPI3) || defined(CONFIG_STM32F7_SPI4) || \
+    defined(CONFIG_STM32F7_SPI5)
+  /* Configure SPI chip selects if 1) SPI is not disabled, and 2) the weak
+   * function stm32_spidev_initialize() has been brought into the link.
+   */
+
+  if (stm32_spidev_initialize)
+    {
+      stm32_spidev_initialize();
+    }
+#endif
+
+#ifdef CONFIG_SPORADIC_INSTRUMENTATION
+  /* This configuration has been used for evaluating the NuttX sporadic
+   * scheduler.
+   * The following call initializes the sporadic scheduler monitor.
+   */
+
+  arch_sporadic_initialize();
+#endif
+
+#ifdef CONFIG_ARCH_LEDS
+  /* Configure on-board LEDs if LED support has been selected. */
+
+  board_autoled_initialize();
+#endif
+
+#ifdef CONFIG_STM32F7_FMC
+  stm32_sdram_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_STM32F7_QUADSPI
+  FAR struct qspi_dev_s *qspi;
+  FAR struct mtd_dev_s *mtd;
+#endif
+
+#ifdef CONFIG_STM32F7_QUADSPI
+  {
+
+    struct qspi_meminfo_s meminfo;
+
+    int ret;
+
+    qspi = stm32f7_qspi_initialize(0);
+    if (!qspi)
+      {
+        syslog(LOG_ERR, "ERROR: sam_qspi_initialize muiled\n");
+        return;
+      }
+
+    mtd = s25fl5_initialize(qspi, true);
+    if (!mtd)
+      {
+        syslog(LOG_ERR, "ERROR: s25fl5_initialize failed\n");
+        //return;
+      }
+
+    ret = ftl_initialize(0, mtd);
+    if (ret < 0)
+      {
+        ferr("ERROR: Initialize the FTL layer\n");
+        //return ret;
+      }
+ /*
+    ret = nxffs_initialize(mtd);
+    if (ret < 0)
+      {
+        ferr("ERROR: NXFFS initialization failed: %d\n", -ret);
+        return;
+      }
+
+    ret = mount(NULL, "/mnt/meadow0", "nxffs", 0, NULL);
+    if (ret < 0)
+      {
+        ferr("ERROR: Failed to mount the NXFFS volume: %d\n", errno);
+        return;
+      }
+*/
+
+#if 0
+      // Lets do some tests on the flash:
+      {
+        uint8_t *buffer = (uint8_t*) malloc (4096);
+        const uint8_t payload[8] = { 0xf8, 0xc8, 0x10, 0xa8, 0xe7, 0x6f, 0x9e, 0x8c };
+        size_t bytes;
+        int i;
+        //struct fat_format_s fmt = FAT_FORMAT_INITIALIZER;
+
+        // read the first block
+        bytes = MTD_BREAD(mtd, 0, 1, buffer);
+        printf ("\nboot up -- dumping first 16 bytes\n");
+        for (i = 0; i < 16; i++) {
+          printf ("%02x ", buffer[i]);
+        }
+        printf("\n");
+
+        memcpy(buffer, payload, sizeof(payload));
+        memcpy(buffer+sizeof(payload), payload, sizeof(payload));
+
+        // write back the block
+        bytes = MTD_BWRITE(mtd, 0, 1, buffer);
+        printf ("wrote block\n");
+
+        bytes = MTD_BREAD(mtd, 0, 1, buffer);
+        printf ("\nread back -- dumping first 16 bytes\n");
+        for (i = 0; i < 16; i++) {
+          printf ("%02x ", buffer[i]);
+        }
+        printf("\n");
+
+        //mkfatfs /dev/mtdblock0
+        //mkfatfs("/dev/mtdblock0", &fmt);
+      }
+#endif

Review Comment:
   remove



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

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


[GitHub] [nuttx] xiaoxiang781216 commented on pull request #8228: Add initial support to Meadow F7Micro board

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on PR #8228:
URL: https://github.com/apache/nuttx/pull/8228#issuecomment-1403980002

   @duduita please squash your change into one patch by `git rebase --interactive HEAD~6` and change all pick to squash except the first one.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

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