xiaoxiang781216 commented on code in PR #9853:
URL: https://github.com/apache/nuttx/pull/9853#discussion_r1270897265


##########
arch/arm/Kconfig:
##########
@@ -523,6 +523,7 @@ config ARCH_CHIP_STM32U5
        select ARM_HAVE_DSP
        select ARCH_HAVE_FETCHADD
        select ARCH_HAVE_HEAPCHECK
+  select ARCH_HAVE_HEAP2

Review Comment:
   tab



##########
arch/arm/src/stm32u5/Kconfig:
##########
@@ -457,18 +498,38 @@ config STM32U5_UART5
 config STM32U5_I2C1
        bool "I2C1"
        default n
+   select STM32U5_I2C

Review Comment:
   tab



##########
arch/arm/src/stm32u5/Kconfig:
##########
@@ -457,18 +498,38 @@ config STM32U5_UART5
 config STM32U5_I2C1
        bool "I2C1"
        default n
+   select STM32U5_I2C
 
 config STM32U5_I2C2
        bool "I2C2"
        default n
+   select STM32U5_I2C
 
-config STM32U5_CRS
-       bool "CRS"
+config STM32U5_I2C3
+       bool "I2C3"
        default n
+   select STM32U5_I2C

Review Comment:
   tab



##########
arch/arm/src/stm32u5/Kconfig:
##########
@@ -20,10 +20,29 @@ config ARCH_CHIP_STM32U585AI
        ---help---
                STM32 U5 Cortex M33, 2048 Kb FLASH, 768 Kb SRAM
 
-endchoice # STM32 L5 Chip Selection
+config ARCH_CHIP_STM32U5A5ZJT
+       bool "STM32U5A5ZJT"
+   select STM32U5_STM32U5A5XX

Review Comment:
   tab



##########
arch/arm/src/stm32u5/stm32_allocateheap.c:
##########
@@ -350,6 +357,26 @@ void arm_addregion(void)
 
 #endif /* SRAM3 */
 
+#ifdef CONFIG_STM32U5_SRAM5_HEAP
+
+#if defined(CONFIG_BUILD_PROTECTED) && defined(CONFIG_MM_KERNEL_HEAP)

Review Comment:
   ```suggestion
   #  if defined(CONFIG_BUILD_PROTECTED) && defined(CONFIG_MM_KERNEL_HEAP)
   ```



##########
boards/arm/stm32u5/nucleo-u5a5zj-q/src/stm32_bringup.c:
##########
@@ -0,0 +1,158 @@
+/****************************************************************************
+ * boards/arm/stm32u5/nucleo-u5a5zj-q/src/stm32_bringup.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 <sys/mount.h>
+#include <sys/types.h>
+#include <debug.h>
+
+#include <nuttx/input/buttons.h>
+#include <nuttx/leds/userled.h>
+#include <nuttx/spi/spi_transfer.h>
+#include <nuttx/board.h>
+#include <nuttx/clock.h>
+
+#include "nucleo-u5a5zj-q.h"
+
+#include <arch/board/board.h>
+
+#include <stm32_spi.h>
+
+#if defined(CONFIG_I2C)
+#include "stm32_i2c.h"
+FAR struct i2c_master_s *i2c1_m;
+FAR struct i2c_master_s *i2c2_m;
+#ifdef CONFIG_RTC_DSXXXX
+    #include <nuttx/timers/rtc.h>
+    #include <nuttx/timers/ds3231.h>
+#endif /* CONFIG_RTC_DSXXXX */
+
+#endif /* CONFIG_I2C */
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+#define DEVNO_ZERO                             0
+#define DEVNO_ONE                                      1

Review Comment:
   change tab to space and align



##########
arch/arm/src/stm32u5/Kconfig:
##########
@@ -457,18 +498,38 @@ config STM32U5_UART5
 config STM32U5_I2C1
        bool "I2C1"
        default n
+   select STM32U5_I2C
 
 config STM32U5_I2C2
        bool "I2C2"
        default n
+   select STM32U5_I2C
 
-config STM32U5_CRS
-       bool "CRS"
+config STM32U5_I2C3
+       bool "I2C3"
        default n
+   select STM32U5_I2C
 
 config STM32U5_I2C4
        bool "I2C4"
        default n
+   select STM32U5_I2C

Review Comment:
   tab



##########
arch/arm/src/stm32u5/Kconfig:
##########
@@ -457,18 +498,38 @@ config STM32U5_UART5
 config STM32U5_I2C1
        bool "I2C1"
        default n
+   select STM32U5_I2C
 
 config STM32U5_I2C2
        bool "I2C2"
        default n
+   select STM32U5_I2C

Review Comment:
   tab



##########
arch/arm/src/stm32u5/Kconfig:
##########
@@ -457,18 +498,38 @@ config STM32U5_UART5
 config STM32U5_I2C1
        bool "I2C1"
        default n
+   select STM32U5_I2C
 
 config STM32U5_I2C2
        bool "I2C2"
        default n
+   select STM32U5_I2C
 
-config STM32U5_CRS
-       bool "CRS"
+config STM32U5_I2C3
+       bool "I2C3"
        default n
+   select STM32U5_I2C
 
 config STM32U5_I2C4
        bool "I2C4"
        default n
+   select STM32U5_I2C
+   
+config STM32U5_I2C5
+       bool "I2C5"
+   depends on STM32U5_STM32U59XX || STM32U5_STM32U59AXX || STM32U5_STM32U5A5XX 
|| STM32U5_STM32U5A9XX
+       default n
+   select STM32U5_I2C
+   
+config STM32U5_I2C6
+       bool "I2C6"
+   depends on STM32U5_STM32U59XX || STM32U5_STM32U59AXX || STM32U5_STM32U5A5XX 
|| STM32U5_STM32U5A9XX
+       default n
+   select STM32U5_I2C

Review Comment:
   tab



##########
arch/arm/src/stm32u5/Kconfig:
##########
@@ -457,18 +498,38 @@ config STM32U5_UART5
 config STM32U5_I2C1
        bool "I2C1"
        default n
+   select STM32U5_I2C
 
 config STM32U5_I2C2
        bool "I2C2"
        default n
+   select STM32U5_I2C
 
-config STM32U5_CRS
-       bool "CRS"
+config STM32U5_I2C3
+       bool "I2C3"
        default n
+   select STM32U5_I2C
 
 config STM32U5_I2C4
        bool "I2C4"
        default n
+   select STM32U5_I2C
+   
+config STM32U5_I2C5
+       bool "I2C5"
+   depends on STM32U5_STM32U59XX || STM32U5_STM32U59AXX || STM32U5_STM32U5A5XX 
|| STM32U5_STM32U5A9XX

Review Comment:
   tab



##########
arch/arm/src/stm32u5/Kconfig:
##########
@@ -3171,13 +3223,17 @@ config STM32U5_SPI_DMA
 
 endmenu
 
+config STM32U5_I2C
+       bool
+       default n
+
 menu "I2C Configuration"
        depends on STM32U5_I2C
 
 config STM32U5_I2C_DYNTIMEO
        bool "Use dynamic timeouts"
        default n
-       depends on STM32U5_I2C
+# depends on STM32U5_I2C

Review Comment:
   why comment out



##########
boards/Kconfig:
##########
@@ -3106,6 +3114,7 @@ config ARCH_BOARD
        default "b-l072z-lrwan1"            if ARCH_BOARD_B_L072Z_LRWAN1
        default "b-l475e-iot01a"            if ARCH_BOARD_B_L475E_IOT01A
        default "b-u585i-iot02a"            if ARCH_BOARD_B_U585I_IOT02A
+  default "nucleo-u5a5zj-q"           if ARCH_BOARD_NUCLEO_U5A5ZJ_Q

Review Comment:
   ```suggestion
        default "nucleo-u5a5zj-q"           if ARCH_BOARD_NUCLEO_U5A5ZJ_Q
   ```



##########
arch/arm/src/stm32u5/Make.defs:
##########
@@ -54,6 +54,6 @@ endif
 
 # Required chip type specific files
 
-ifeq ($(CONFIG_STM32U5_STM32U585XX),y)
-CHIP_CSRCS += stm32u585xx_rcc.c
-endif
+ifeq ($(CONFIG_USBDEV),y)
+CHIP_CSRCS += stm32_otgdev.c
+endif

Review Comment:
   add blank line



##########
arch/arm/src/stm32u5/hardware/stm32_flash.h:
##########
@@ -70,11 +71,18 @@
 #else
 #  error "unknown flash configuration!"
 #endif
+#endif
 
 #ifdef STM32_FLASH_PAGESIZE
 #  define STM32_FLASH_SIZE        (STM32_FLASH_NPAGES * STM32_FLASH_PAGESIZE)
 #endif
 
+#if defined(CONFIG_STM32U5_STM32U5A5XX)
+#define STM32_FLASH_NPAGES             512

Review Comment:
   ```suggestion
   #  define STM32_FLASH_NPAGES     512
   ```



##########
arch/arm/src/stm32u5/Kconfig:
##########
@@ -457,18 +498,38 @@ config STM32U5_UART5
 config STM32U5_I2C1
        bool "I2C1"
        default n
+   select STM32U5_I2C
 
 config STM32U5_I2C2
        bool "I2C2"
        default n
+   select STM32U5_I2C
 
-config STM32U5_CRS
-       bool "CRS"
+config STM32U5_I2C3
+       bool "I2C3"
        default n
+   select STM32U5_I2C
 
 config STM32U5_I2C4
        bool "I2C4"
        default n
+   select STM32U5_I2C
+   
+config STM32U5_I2C5
+       bool "I2C5"
+   depends on STM32U5_STM32U59XX || STM32U5_STM32U59AXX || STM32U5_STM32U5A5XX 
|| STM32U5_STM32U5A9XX
+       default n
+   select STM32U5_I2C
+   
+config STM32U5_I2C6
+       bool "I2C6"
+   depends on STM32U5_STM32U59XX || STM32U5_STM32U59AXX || STM32U5_STM32U5A5XX 
|| STM32U5_STM32U5A9XX

Review Comment:
   tab



##########
arch/arm/src/stm32u5/Kconfig:
##########
@@ -457,18 +498,38 @@ config STM32U5_UART5
 config STM32U5_I2C1
        bool "I2C1"
        default n
+   select STM32U5_I2C
 
 config STM32U5_I2C2
        bool "I2C2"
        default n
+   select STM32U5_I2C
 
-config STM32U5_CRS
-       bool "CRS"
+config STM32U5_I2C3
+       bool "I2C3"
        default n
+   select STM32U5_I2C
 
 config STM32U5_I2C4
        bool "I2C4"
        default n
+   select STM32U5_I2C
+   
+config STM32U5_I2C5
+       bool "I2C5"
+   depends on STM32U5_STM32U59XX || STM32U5_STM32U59AXX || STM32U5_STM32U5A5XX 
|| STM32U5_STM32U5A9XX
+       default n
+   select STM32U5_I2C

Review Comment:
   tab



##########
arch/arm/src/stm32u5/hardware/stm32_flash.h:
##########
@@ -41,6 +41,7 @@
  *   Parts STM32U585 and STM32U575 have 2048Kb of FLASH
  */
 
+#if defined(CONFIG_ARCH_CHIP_STM32U585AI)
 #if !defined(CONFIG_STM32U5_FLASH_OVERRIDE_DEFAULT) && \

Review Comment:
   ```suggestion
   #if  defined(CONFIG_ARCH_CHIP_STM32U585AI) && \
         !defined(CONFIG_STM32U5_FLASH_OVERRIDE_DEFAULT) && \
   ```



##########
arch/arm/src/stm32u5/hardware/stm32_memorymap.h:
##########
@@ -43,12 +43,35 @@
 
 /* Code Base Addresses ******************************************************/
 
+#if defined(CONFIG_STM32U5_STM32U535XX) || defined(CONFIG_STM32U5_STM32U545XX)
+#define STM32_BOOT_BASE         0x00000000  /* 0x00000000-0x000fffff: Aliased 
boot memory */

Review Comment:
   ```suggestion
   #  define STM32_BOOT_BASE       0x00000000  /* 0x00000000-0x000fffff: 
Aliased boot memory */
   ```



-- 
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