hartmannathan commented on code in PR #17298:
URL: https://github.com/apache/nuttx/pull/17298#discussion_r2508149317


##########
boards/arm/stm32h7/portenta-h7/Kconfig:
##########
@@ -0,0 +1,17 @@
+#
+# For a description of the syntax of this configuration file,
+# see the file kconfig-language.txt in the NuttX tools repository.
+#
+
+if ARCH_BOARD_PORTENTA_H7
+
+config PORTENTAH7_ARDUINO_BOOTLOADER
+       bool "Use Arduino bootloader"
+       default y
+       ---help---
+               Use the Arduino bootloader to load the NuttX binary.
+               Don't disable this option unless you know exactly what you're 
doing!
+               It may cause the boards to brick because the bootloader 
initialize

Review Comment:
   ```suggestion
                It may cause the boards to brick because the bootloader 
initializes
   ```



##########
Documentation/platforms/arm/stm32h7/boards/portenta-h7/index.rst:
##########
@@ -0,0 +1,114 @@
+===================
+Arduino Portenta H7
+===================
+
+This page discusses issues unique to NuttX configurations for the
+Arduino Portenta H7 board. This port applies to all versions of
+Portenta H7:
+
+* Portenta H7
+* Portenta H7 Little
+* Portenta H7 Little Connected
+
+Features
+========
+
+Arduino Portenta H7 boards come with:
+
+* STM32H747 dual-core processor
+* 8 MB SDRAM
+* 16 MB NOR Flash
+* 10/100 Ethernet Phy
+* PMIC MC34PF1550A0EP
+* Fuel Gauge Bat MAX1726
+* USB HS
+* Secure element: NXP SE0502 (Portenta H7) or Microchip ATECC608 (H7 Little and
+  H7 Little Connected)
+* Wi-Fi/Bluetooth Module (except H7 Lite)
+* DisplayPort over USB-C (Portenta H7 only)
+
+Documentation: https://docs.arduino.cc/hardware/portenta-h7/
+
+Status
+======
+
+- NSH works on USART1.
+
+Pin Mapping
+===========
+
+====== ============ ============== ================== =================
+Pin    Pin Arduino  Signal Arduino Signal STM32       Notes
+====== ============ ============== ================== =================
+J1-33  D14          UART1_TX       USART1_TX (PA10)   Default Console
+J1-35  D13          UART1_RX       USART1_RX (PA9)    Default Console
+J1-34  N/A          UART0_TX       UART4_TX (PA0)
+J1-36  N/A          UART0_RX       UART4_RX (PI9)
+J1-43  N/A          I2C1_SDA       I2C1_SDA (PB7)
+J1-45  N/A          I2C1_SCL       I2C1_SCL (PB6)
+J1-44  D11          I2C0_SDA       I2C3_SDA (PH8)
+J1-46  D12          I2C0_SDL       I2C3_SDC (PH7)
+I2-40  D10          SPI1_CIPO      SPI2_MISO (PC2)
+I2-38  D9           SPI1_CK        SPI2_SCK (PI1)
+I2-42  D8           SPI1_COPI      SPI2_MOSI (PC3)
+I2-36  D7           SPI1_CS        SPI2_NSS (PI0)
+J1-49  N/A          CAN1_TX        FDCAN1_TX (PH13)
+J1-51  N/A          CAN1_RX        FDCAN1_RX (PH13)
+====== ============ ============== ================== =================
+
+Flashing
+========
+
+.. note::
+   The on-board PMIC isn't supported yet, so we rely on the Arduino bootloader.
+   DO NOT ERASE the default bootloader, or you'll brick the board!
+
+Flashing with dfu-utils
+-----------------------
+
+1. Press the reset button twice. The green LED should start flashing rapidly.
+   You can check if dfu works with the ``dfu-util -l`` command. It should 
return::
+
+     Found DFU: [2341:035b] ver=0200, devnum=75, cfg=1, intf=0, path="3-6.3", 
alt=3, name="@Arduino  boot  v.25   /0x00000000/0*4Kg", 
serial="003D00473133511137323532"
+     Found DFU: [2341:035b] ver=0200, devnum=75, cfg=1, intf=0, path="3-6.3", 
alt=2, name="@Ext File Flash  0MB   /0x00000000/0*4Kg", 
serial="003D00473133511137323532"
+     Found DFU: [2341:035b] ver=0200, devnum=75, cfg=1, intf=0, path="3-6.3", 
alt=1, name="@Ext RAW  Flash 16MB   /0x90000000/4096*4Kg", 
serial="003D00473133511137323532"
+     Found DFU: [2341:035b] ver=0200, devnum=75, cfg=1, intf=0, path="3-6.3", 
alt=0, name="@Internal Flash  2MB   /0x08000000/01*128Ka,15*128Kg", 
serial="003D00473133511137323532"
+
+2. Flash firmware after bootloader code (offset = 0x08040000)::
+
+     dfu-util --device 0x2341:0x035b -D nuttx.bin -a0 
--dfuse-address=0x08040000:leave
+
+Flashing with debugger
+----------------------
+
+To connect an external debugger to Portent H7 you need Portenta Breakout and
+20-pin MIPI connector. Another option is to solder directly to the test pins
+on the board.
+
+OpenOCD works with ``target/stm32h7x_dual_bank.cfg``.
+
+Configurations
+==============
+
+Each portenta-h7 configuration is maintained in a sub-directory and
+can be selected as follow::
+
+    tools/configure.sh portenta-h7:<subdir>
+
+Where <subdir> is one of the following:
+
+nsh_cm7
+-------
+
+Configures the NuttShell (nsh) located at apps/examples/nsh. This
+configuration enables a serial console on UART1.
+Configuration dedicated for CM7 core.
+
+jumbo_cm7
+---------
+
+This configuration enables many Apache NuttX features.  This is
+mostly to help provide additional code coverage in CI, but also
+allows for a users to see a wide range of features that are

Review Comment:
   ```suggestion
   allows for users to see a wide range of features that are
   ```
   
   or, alternatively:
   
   ```suggestion
   allows for a user to see a wide range of features that are
   ```



##########
boards/arm/stm32h7/portenta-h7/include/board.h:
##########
@@ -0,0 +1,363 @@
+/****************************************************************************
+ * boards/arm/stm32h7/portenta-h7/include/board.h
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ ****************************************************************************/
+
+#ifndef __BOARDS_ARM_STM32H7_PORTENTA_H7_INCLUDE_BOARD_H
+#define __BOARDS_ARM_STM32H7_PORTENTA_H7_INCLUDE_BOARD_H
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+
+#ifndef __ASSEMBLY__
+# include <stdint.h>
+#endif
+
+/* Do not include STM32 H7 header files here */
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+/* Clocking *****************************************************************/
+
+/* The Portenta-H7 board provides the following clock sources:
+ *
+ *   U18: 25MHz HSE MEMS Oscillator
+ *   Y1:  32768Hz LSE crystal oscillator
+ *
+ * So we have these clock source available within the STM32

Review Comment:
   ```suggestion
    * So we have these clock sources available within the STM32
   ```



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to