casaroli commented on code in PR #21480:
URL: https://github.com/apache/nuttx/pull/21480#discussion_r4696537794


##########
boards/xtensa/esp32s3/esp32s3-r8/src/esp32s3_board_lcd.c:
##########
@@ -0,0 +1,155 @@
+/****************************************************************************
+ * boards/xtensa/esp32s3/esp32s3-r8/src/esp32s3_board_lcd.c
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS 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 <stdio.h>
+#include <stdbool.h>
+#include <debug.h>
+#include <errno.h>
+
+#include <nuttx/arch.h>
+#include <nuttx/board.h>
+#include <nuttx/signal.h>
+#include <nuttx/spi/spi.h>
+#include <nuttx/lcd/lcd.h>
+#include <nuttx/lcd/st7789.h>
+
+#include <arch/board/board.h>
+
+#include "espressif/esp_gpio.h"
+#include "esp32s3_spi.h"
+#include "hardware/esp32s3_gpio_sigmap.h"
+
+#include "esp32s3-r8.h"
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Private Data
+ ****************************************************************************/
+
+static struct spi_dev_s *g_spidev;
+static struct lcd_dev_s *g_lcd;
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name:  board_lcd_initialize
+ *
+ * Description:
+ *   Initialize the LCD video hardware.  The initial state of the LCD is
+ *   fully initialized, display memory cleared, and the LCD ready to use, but
+ *   with the power setting at 0 (full off).
+ *
+ * Returned Value:
+ *   Zero (OK) on success; a negated errno value on failure.
+ *
+ ****************************************************************************/
+
+int board_lcd_initialize(void)
+{
+  /* Initialize non-SPI GPIOs */
+
+  esp32s3_configgpio(ESP32S3_R8_DISPLAY_DC, OUTPUT);

Review Comment:
   `esp32s3_configgpio()` and `esp32s3_gpiowrite()` do not exist on master, so 
esp32s3-r8:lcd and esp32s3-r8:openvela do not build again: 
`esp32s3_board_lcd.c:81:3: error: implicit declaration of function 
'esp32s3_configgpio'; did you mean 'esp_configgpio'?` (CI xtensa-03).
   
   Fix: use `esp_configgpio()` and `esp_gpiowrite()` on lines 81, 82 and 86, as 
in the 20 November push.



##########
boards/xtensa/esp32s3/esp32s3-r8/Kconfig:
##########
@@ -0,0 +1,99 @@
+#
+# For a description of the syntax of this configuration file,
+# see the file kconfig-language.txt in the NuttX tools repository.
+#
+
+if ARCH_BOARD_ESP32S3_R8
+
+config ESP32S3_STORAGE_MTD_OFFSET
+       hex "Storage MTD base address in SPI Flash"
+       default 0x180000
+       depends on ESP32S3_MTD
+       ---help---
+               MTD base address in SPI Flash.
+
+config ESP32S3_STORAGE_MTD_SIZE
+       hex "Storage MTD size in SPI Flash"
+       default 0x100000
+       range 0x0 0x400000 if ESP32S3_FLASH_4M
+       range 0x0 0x800000 if ESP32S3_FLASH_8M
+       range 0x0 0x1000000 if ESP32S3_FLASH_16M
+       range 0x0 0x2000000 if ESP32S3_FLASH_32M
+       depends on ESP32S3_MTD
+       ---help---
+               MTD size in SPI Flash.
+
+choice ESP32S3_SPIFLASH_FS
+       prompt "Mount SPI Flash MTD on bring-up"
+       default ESP32S3_SPIFLASH_SMARTFS
+       depends on ESP32S3_MTD
+       optional

Review Comment:
   This copy of the `ESP32S3_SPIFLASH_FS` choice with `optional` is back. A 
named choice is shared, so SmartFS is no longer the default for every ESP32-S3 
board: CI xtensa-03 shows `< CONFIG_NSH_DISABLE_LOSMART=y` for 
esp32s3-devkit:spiflash, kernel_n8r2 and kernel_oct.
   
   Fix: delete lines 8-54 again, as in the 20 November push.



##########
boards/xtensa/esp32s3/esp32s3-r8/configs/nsh/defconfig:
##########
@@ -0,0 +1,56 @@
+#
+# This file is autogenerated: PLEASE DO NOT EDIT IT.
+#
+# You can use "make menuconfig" to make any modifications to the installed 
.config file.
+# You can then do "make savedefconfig" to generate a new defconfig file that 
includes your
+# modifications.
+#
+# CONFIG_ARCH_LEDS is not set
+# CONFIG_NSH_ARGCAT is not set
+# CONFIG_NSH_CMDOPT_HEXDUMP is not set
+CONFIG_ARCH="xtensa"
+CONFIG_ARCH_BOARD="esp32s3-r8"
+CONFIG_ARCH_BOARD_COMMON=y
+CONFIG_ARCH_BOARD_ESP32S3_R8=y
+CONFIG_ARCH_CHIP="esp32s3"
+CONFIG_ARCH_CHIP_ESP32S3=y
+CONFIG_ARCH_CHIP_ESP32S3WROOM1N4=y

Review Comment:
   All seven defconfigs select `CONFIG_ARCH_CHIP_ESP32S3WROOM1N4` again (4 MB 
quad flash, no PSRAM), but the board has the ESP32-S3-WROOM-2-N32R8V 
(index.rst, boards/Kconfig). On its octal flash, `esp32s3_start.c` stops with 
"Octal Flash chip detected!".
   
   Fix: select `CONFIG_ARCH_CHIP_ESP32S3WROOM2N32R8V` and 
`CONFIG_ESP32S3_FLASH_MODE_OCT=y` in every defconfig, as in the 20 November 
push.



##########
boards/xtensa/esp32s3/esp32s3-r8/src/esp32s3_bringup.c:
##########
@@ -0,0 +1,255 @@
+/****************************************************************************
+ * boards/xtensa/esp32s3/esp32s3-r8/src/esp32s3_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 <nuttx/config.h>
+
+#include <stdio.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <syslog.h>
+#include <sys/stat.h>
+#include <sys/ioctl.h>
+#include <sys/types.h>
+#include <syslog.h>
+#include <debug.h>
+#include <stdio.h>
+
+#include <errno.h>
+#include <nuttx/fs/fs.h>
+
+#ifdef CONFIG_ESP32S3_TIMER
+#  include "esp32s3_board_tim.h"
+#endif
+
+#ifdef CONFIG_ESP32S3_WIFI

Review Comment:
   `CONFIG_ESP32S3_WIFI`, `CONFIG_ESP32S3_WIRELESS`, `CONFIG_ESP32S3_BLE` and 
`CONFIG_ESP32S3_WIFI_BT_COEXIST` do not exist on master. The wifi defconfig 
sets `CONFIG_ESPRESSIF_WIFI=y`, so `board_wlan_init()` (line 195) is never 
called and the wifi configuration has no Wi-Fi.
   
   Fix: use the bringup of the 20 November push (the `CONFIG_ESPRESSIF_*` names 
and `esp_hr_timer_init()`).



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