Re: [PR] xtensa/esp32s3: Support reading encrypted partitions [nuttx]

2023-12-22 Thread via GitHub


anchao merged PR #11434:
URL: https://github.com/apache/nuttx/pull/11434


-- 
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-unsubscr...@nuttx.apache.org

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



Re: [PR] espressif/mcuboot: Fix dependency of the Espressif's port MCUboot. [nuttx]

2023-12-22 Thread via GitHub


anchao merged PR #11437:
URL: https://github.com/apache/nuttx/pull/11437


-- 
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-unsubscr...@nuttx.apache.org

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



(nuttx) branch master updated: xtensa/esp32s3: Support reading encrypted partitions

2023-12-22 Thread archer
This is an automated email from the ASF dual-hosted git repository.

archer pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
 new 2cb14c55f0 xtensa/esp32s3: Support reading encrypted partitions
2cb14c55f0 is described below

commit 2cb14c55f03e8bc8c3fc1f011ef164db1c3ff16c
Author: chen...@espressif.com 
AuthorDate: Fri Dec 15 20:49:16 2023 +0800

xtensa/esp32s3: Support reading encrypted partitions

Signed-off-by: chen...@espressif.com 
---
 arch/xtensa/src/esp32s3/esp32s3_partition.c | 98 ++---
 arch/xtensa/src/esp32s3/esp32s3_partition.h | 13 
 arch/xtensa/src/esp32s3/esp32s3_spiflash.c  | 38 +++
 arch/xtensa/src/esp32s3/esp32s3_spiflash.h  | 16 +
 4 files changed, 143 insertions(+), 22 deletions(-)

diff --git a/arch/xtensa/src/esp32s3/esp32s3_partition.c 
b/arch/xtensa/src/esp32s3/esp32s3_partition.c
index 3a2e254ab4..857f588021 100644
--- a/arch/xtensa/src/esp32s3/esp32s3_partition.c
+++ b/arch/xtensa/src/esp32s3/esp32s3_partition.c
@@ -32,6 +32,8 @@
 #include 
 
 #include "esp32s3_spiflash_mtd.h"
+#include "esp32s3_partition.h"
+#include "esp32s3_spiflash.h"
 
 /
  * Pre-processor Definitions
@@ -70,6 +72,10 @@
 
 #define PARTITION_MOUNT_POINT CONFIG_ESP32S3_PARTITION_MOUNTPT
 
+/* Partition encrypted flag */
+
+#define PARTITION_FLAG_ENCRYPTED  (1 << 0)
+
 /
  * Private Types
  /
@@ -162,9 +168,11 @@ struct mtd_dev_priv_s
   uint8_t  type;/* Partition type */
   uint8_t  subtype; /* Partition sub-type */
   uint32_t flags;   /* Partition flags */
-
+  uint32_t offset;  /* Partition offset in SPI Flash */
+  uint32_t size;/* Partition size in SPI Flash */
   struct mtd_dev_s  *ll_mtd;/* Low-level MTD data */
   struct mtd_dev_s  *part_mtd;  /* Partition MTD data */
+  struct mtd_geometry_s   geo;  /* Partition geometry information */
 };
 
 /* OTA data entry */
@@ -621,8 +629,11 @@ int esp32s3_partition_init(void)
   int i;
   struct partition_info_priv_s *info;
   uint8_t *pbuf;
+  bool encrypt;
+  uint32_t flags;
   struct mtd_dev_s *mtd;
-  struct mtd_dev_s *mtd_part;
+  struct mtd_dev_s *mtd_ll;
+  struct mtd_dev_s *mtd_encrypt;
   struct mtd_geometry_s geo;
   struct mtd_dev_priv_s *mtd_priv;
   int ret = 0;
@@ -632,7 +643,7 @@ int esp32s3_partition_init(void)
   char path[PARTITION_LABEL_LEN + sizeof(PARTITION_MOUNT_POINT)];
 
   pbuf = kmm_malloc(PARTITION_MAX_SIZE);
-  if (pbuf == NULL)
+  if (!pbuf)
 {
   ferr("ERROR: Failed to allocate %d byte\n", PARTITION_MAX_SIZE);
   ret = -ENOMEM;
@@ -640,22 +651,27 @@ int esp32s3_partition_init(void)
 }
 
   mtd = esp32s3_spiflash_mtd();
-  if (mtd == NULL)
+  if (!mtd)
 {
   ferr("ERROR: Failed to get SPI flash MTD\n");
-  ret = -EIO;
+  ret = -ENOSYS;
   goto errout_with_mtd;
 }
 
-  ret = MTD_IOCTL(mtd, MTDIOC_GEOMETRY, (unsigned long)&geo);
-  if (ret < 0)
+  mtd_encrypt = esp32s3_spiflash_encrypt_mtd();
+  if (!mtd_encrypt)
 {
-  ferr("ERROR: Failed to get info from MTD\n");
-  ret = -EIO;
+  ferr("ERROR: Failed to get SPI flash encrypted MTD\n");
+  ret = -ENOSYS;
   goto errout_with_mtd;
 }
 
-  ret = MTD_READ(mtd, PARTITION_TABLE_OFFSET, PARTITION_MAX_SIZE, pbuf);
+  /* Even without SPI Flash encryption, we can also use encrypted
+   * MTD to read no-encrypted data.
+   */
+
+  ret = MTD_READ(mtd_encrypt, PARTITION_TABLE_OFFSET,
+ PARTITION_MAX_SIZE, pbuf);
   if (ret != PARTITION_MAX_SIZE)
 {
   ferr("ERROR: Failed to get read data from MTD\n");
@@ -664,7 +680,7 @@ int esp32s3_partition_init(void)
 }
 
   info = (struct partition_info_priv_s *)pbuf;
-
+  encrypt = esp32s3_flash_encryption_enabled();
   for (i = 0; i < num; i++)
 {
   if (info->magic != PARTITION_MAGIC)
@@ -674,6 +690,23 @@ int esp32s3_partition_init(void)
 
   strlcpy(label, (char *)info->label, sizeof(label));
   snprintf(path, sizeof(path), "%s%s", path_base, label);
+  mtd_ll = mtd;
+
+  /* If SPI Flash encryption is enable, "APP", "OTA data" and "NVS keys"
+   * are force to set as encryption partition.
+   */
+
+  flags = info->flags;
+  if (encrypt)
+{
+  if ((info->type == PARTITION_TYPE_DATA &&
+  info->subtype == PARTITION_SUBTYPE_DATA_OTA) ||
+  (info->type == PARTITION_TYPE_DATA &&
+  info->subtype == PARTITION_SUBTYPE_DATA_NVS_KEYS))
+{
+  flags |= PARTITION_FLAG_ENCRYPTED;
+}
+}
 
   finfo("INFO: [l

(nuttx) branch master updated: espressif/mcuboot: Fix dependency of the Espressif's port MCUboot.

2023-12-22 Thread archer
This is an automated email from the ASF dual-hosted git repository.

archer pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
 new daec4cf408 espressif/mcuboot: Fix dependency of the Espressif's port 
MCUboot.
daec4cf408 is described below

commit daec4cf4082d0391ac5ca2ad73e6c866d29e6d2c
Author: Tiago Medicci Serrano 
AuthorDate: Wed Dec 20 16:50:07 2023 -0300

espressif/mcuboot: Fix dependency of the Espressif's port MCUboot.

If the MCUboot (from nuttx-apps) is selected, the Espressif's port
of the MCUboot is not used as the 2nd stage bootloader.
---
 arch/risc-v/src/esp32c3/Kconfig | 1 +
 arch/xtensa/src/esp32/Kconfig   | 1 +
 arch/xtensa/src/esp32s2/Kconfig | 1 +
 arch/xtensa/src/esp32s3/Kconfig | 1 +
 4 files changed, 4 insertions(+)

diff --git a/arch/risc-v/src/esp32c3/Kconfig b/arch/risc-v/src/esp32c3/Kconfig
index 354187bcdf..a8b1caa8f3 100644
--- a/arch/risc-v/src/esp32c3/Kconfig
+++ b/arch/risc-v/src/esp32c3/Kconfig
@@ -1051,6 +1051,7 @@ config ESP32C3_APP_FORMAT_LEGACY
 
 config ESP32C3_APP_FORMAT_MCUBOOT
bool "MCUboot-bootable format"
+   depends on !MCUBOOT_BOOTLOADER
select ESP32C3_HAVE_OTA_PARTITION
---help---
The Espressif port of MCUboot supports the loading of 
unsegmented firmware
diff --git a/arch/xtensa/src/esp32/Kconfig b/arch/xtensa/src/esp32/Kconfig
index 9794746ce1..0e374b24d9 100644
--- a/arch/xtensa/src/esp32/Kconfig
+++ b/arch/xtensa/src/esp32/Kconfig
@@ -2462,6 +2462,7 @@ config ESP32_APP_FORMAT_LEGACY
 
 config ESP32_APP_FORMAT_MCUBOOT
bool "MCUboot-bootable format"
+   depends on !MCUBOOT_BOOTLOADER
select ESP32_HAVE_OTA_PARTITION
---help---
The ESP32 port of MCUboot supports the loading of unsegmented 
firmware
diff --git a/arch/xtensa/src/esp32s2/Kconfig b/arch/xtensa/src/esp32s2/Kconfig
index bdda62eb02..5f40582572 100644
--- a/arch/xtensa/src/esp32s2/Kconfig
+++ b/arch/xtensa/src/esp32s2/Kconfig
@@ -1211,6 +1211,7 @@ config ESP32S2_APP_FORMAT_LEGACY
 
 config ESP32S2_APP_FORMAT_MCUBOOT
bool "MCUboot-bootable format"
+   depends on !MCUBOOT_BOOTLOADER
select ESP32S2_HAVE_OTA_PARTITION
---help---
The Espressif port of MCUboot supports the loading of 
unsegmented firmware
diff --git a/arch/xtensa/src/esp32s3/Kconfig b/arch/xtensa/src/esp32s3/Kconfig
index 8cb56eb8c4..88e3c892ef 100644
--- a/arch/xtensa/src/esp32s3/Kconfig
+++ b/arch/xtensa/src/esp32s3/Kconfig
@@ -2169,6 +2169,7 @@ config ESP32S3_APP_FORMAT_LEGACY
 
 config ESP32S3_APP_FORMAT_MCUBOOT
bool "MCUboot-bootable format"
+   depends on !MCUBOOT_BOOTLOADER
select ESP32S3_HAVE_OTA_PARTITION
---help---
The Espressif port of MCUboot supports the loading of 
unsegmented firmware



Re: [PR] fs/fat: Fix number of data clusters usable for fat driver [nuttx]

2023-12-22 Thread via GitHub


jerpelea merged PR #11433:
URL: https://github.com/apache/nuttx/pull/11433


-- 
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-unsubscr...@nuttx.apache.org

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



(nuttx) branch master updated: fs/fat: Fix number of data clusters usable for fat driver

2023-12-22 Thread jerpelea
This is an automated email from the ASF dual-hosted git repository.

jerpelea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
 new 26b7de0f34 fs/fat: Fix number of data clusters usable for fat driver
26b7de0f34 is described below

commit 26b7de0f3496a0300a817788d127e21ddcd82189
Author: Jukka Laitinen 
AuthorDate: Thu Dec 21 11:51:13 2023 +0200

fs/fat: Fix number of data clusters usable for fat driver

Fix the issue where fat driver is not using the last two clusters in
the file system.

The fat parameter fs->fs_nclusters is the maximum number of data clusters;
this doesn't include the two in the beginning. Many checks in the fat driver
treat the fs->fs_nclusters-1 as being the last accessible cluster, which is 
not
right, the last accessible one is actually this number + 2 when the cluster
count includes the two first ones.

Normally this is not an issue when writes are being done through the same
driver, the last two clusters are just never used. But if the filesystem is
modified by external driver, for example with a populated fat created with 
PC,
or modifying the FS via USB-MSC, this leads to the fat driver not being 
able to
read anything that uses the last two clusters.

Signed-off-by: Jukka Laitinen 
---
 fs/fat/fs_fat32.c |  6 +++---
 fs/fat/fs_fat32util.c | 24 
 2 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/fs/fat/fs_fat32.c b/fs/fat/fs_fat32.c
index f5c53715c9..1edb7167ed 100644
--- a/fs/fat/fs_fat32.c
+++ b/fs/fat/fs_fat32.c
@@ -583,7 +583,7 @@ static ssize_t fat_read(FAR struct file *filep, FAR char 
*buffer,
   /* Find the next cluster in the FAT. */
 
   cluster = fat_getcluster(fs, ff->ff_currentcluster);
-  if (cluster < 2 || cluster >= fs->fs_nclusters)
+  if (cluster < 2 || cluster >= fs->fs_nclusters + 2)
 {
   ret = -EINVAL; /* Not the right error */
   goto errout_with_lock;
@@ -835,7 +835,7 @@ static ssize_t fat_write(FAR struct file *filep, FAR const 
char *buffer,
   ret = cluster;
   goto errout_with_lock;
 }
-  else if (cluster < 2 || cluster >= fs->fs_nclusters)
+  else if (cluster < 2 || cluster >= fs->fs_nclusters + 2)
 {
   ret = -ENOSPC;
   goto errout_with_lock;
@@ -1213,7 +1213,7 @@ static off_t fat_seek(FAR struct file *filep, off_t 
offset, int whence)
   break;
 }
 
-  if (cluster >= fs->fs_nclusters)
+  if (cluster >= fs->fs_nclusters + 2)
 {
   ret = -ENOSPC;
   goto errout_with_lock;
diff --git a/fs/fat/fs_fat32util.c b/fs/fat/fs_fat32util.c
index a4a01d2f79..a1b8c2d7fb 100644
--- a/fs/fat/fs_fat32util.c
+++ b/fs/fat/fs_fat32util.c
@@ -782,7 +782,7 @@ int fat_hwwrite(struct fat_mountpt_s *fs, uint8_t *buffer, 
off_t sector,
 off_t fat_cluster2sector(FAR struct fat_mountpt_s *fs,  uint32_t cluster)
 {
   cluster -= 2;
-  if (cluster >= fs->fs_nclusters - 2)
+  if (cluster >= fs->fs_nclusters)
 {
   return -EINVAL;
 }
@@ -805,7 +805,7 @@ off_t fat_getcluster(struct fat_mountpt_s *fs, uint32_t 
clusterno)
 {
   /* Verify that the cluster number is within range */
 
-  if (clusterno >= 2 && clusterno < fs->fs_nclusters)
+  if (clusterno >= 2 && clusterno < fs->fs_nclusters + 2)
 {
   /* Okay.. Read the next cluster from the FAT.  The way we will do
* this depends on the type of FAT filesystem we are dealing with.
@@ -945,7 +945,7 @@ int fat_putcluster(struct fat_mountpt_s *fs, uint32_t 
clusterno,
* cluster.
*/
 
-  if (clusterno == 0 || (clusterno >= 2 && clusterno < fs->fs_nclusters))
+  if (clusterno == 0 || (clusterno >= 2 && clusterno < fs->fs_nclusters + 2))
 {
   /* Okay.. Write the next cluster into the FAT.  The way we will do
* this depends on the type of FAT filesystem we are dealing with.
@@ -1113,7 +1113,7 @@ int fat_removechain(struct fat_mountpt_s *fs, uint32_t 
cluster)
 
   /* Loop while there are clusters in the chain */
 
-  while (cluster >= 2 && cluster < fs->fs_nclusters)
+  while (cluster >= 2 && cluster < fs->fs_nclusters + 2)
 {
   /* Get the next cluster after the current one */
 
@@ -1177,7 +1177,7 @@ int32_t fat_extendchain(struct fat_mountpt_s *fs, 
uint32_t cluster)
*/
 
   startcluster = fs->fs_fsinextfree;
-  if (startcluster == 0 || startcluster >= fs->fs_nclusters)
+  if (startcluster == 0 || startcluster >= fs->fs_nclusters + 2)
 {
   /* But it is bad.. we have to start at the beginning */
 
@@ -1203,7 +1203,7 @@ int32_t fat_extendchain(struct fat_mountpt_s *fs, 
uint32_t cluster)
 
   return 0;
 }
-  else if (startsector < fs->fs_nclusters)
+  else if (st

[PR] Update riscv_mmu.h to fix typo in comment [nuttx]

2023-12-22 Thread via GitHub


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

   fix typo in comment of mmu_get_region_size function
   
   
   
   


-- 
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-unsubscr...@nuttx.apache.org

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



Re: [PR] xtensa/esp32s2: Add xtwdt and rwdt support [nuttx]

2023-12-22 Thread via GitHub


xiaoxiang781216 merged PR #11431:
URL: https://github.com/apache/nuttx/pull/11431


-- 
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-unsubscr...@nuttx.apache.org

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



(nuttx) branch master updated: xtensa/esp32s2: Add xtwdt and rwdt support

2023-12-22 Thread xiaoxiang
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
 new c15392d9b7 xtensa/esp32s2: Add xtwdt and rwdt support
c15392d9b7 is described below

commit c15392d9b723f7d8add299c75c0fc95a146f0950
Author: Eren Terzioglu 
AuthorDate: Mon Nov 27 14:12:45 2023 +0300

xtensa/esp32s2: Add xtwdt and rwdt support
---
 .../esp32s2/boards/esp32s2-kaluga-1/index.rst  |  18 ++
 .../esp32s2/boards/esp32s2-saola-1/index.rst   |   5 +
 arch/xtensa/src/esp32s2/Kconfig|  22 ++
 arch/xtensa/src/esp32s2/esp32s2_rtc.c  | 214 ++-
 arch/xtensa/src/esp32s2/esp32s2_rtc.h  |   5 +-
 arch/xtensa/src/esp32s2/esp32s2_wdt.c  | 294 +
 arch/xtensa/src/esp32s2/esp32s2_wdt.h  |  24 +-
 arch/xtensa/src/esp32s2/esp32s2_wdt_lowerhalf.c| 214 ++-
 arch/xtensa/src/esp32s2/hardware/esp32s2_rtccntl.h |   7 +
 .../xtensa/esp32s2/common/scripts/esp32s2_rom.ld   |   1 +
 .../xtensa/esp32s2/common/src/esp32s2_board_wdt.c  |  11 +-
 .../configs/watchdog/defconfig |   6 +-
 .../esp32s2-saola-1/configs/watchdog/defconfig |   1 +
 13 files changed, 693 insertions(+), 129 deletions(-)

diff --git 
a/Documentation/platforms/xtensa/esp32s2/boards/esp32s2-kaluga-1/index.rst 
b/Documentation/platforms/xtensa/esp32s2/boards/esp32s2-kaluga-1/index.rst
index 00f373e7ec..5e1abc2d5f 100644
--- a/Documentation/platforms/xtensa/esp32s2/boards/esp32s2-kaluga-1/index.rst
+++ b/Documentation/platforms/xtensa/esp32s2/boards/esp32s2-kaluga-1/index.rst
@@ -330,3 +330,21 @@ the ``Device Drivers -> CAN Driver Support -> CAN loopback 
mode`` option and run
   TSEG2: 4
 SJW: 3
   ID:1 DLC: 1
+
+watchdog
+
+
+This config test the watchdog timers. It includes the 2 MWDTs,
+adds driver support, registers the WDTs as devices and includes the watchdog
+example.
+
+To test it, just run the following::
+
+nsh> wdog -i /dev/watchdogx
+
+Where x is the watchdog instance.
+
+To test the XTWDT(/dev/watchdog3) an interrupt handler needs to be
+implemented because XTWDT does not have system reset feature. To implement
+an interrupt handler `WDIOC_CAPTURE` command can be used. When interrupt
+rises, XTAL32K clock can be restored with `WDIOC_RSTCLK` command.
diff --git 
a/Documentation/platforms/xtensa/esp32s2/boards/esp32s2-saola-1/index.rst 
b/Documentation/platforms/xtensa/esp32s2/boards/esp32s2-saola-1/index.rst
index aa6404f671..36d622b138 100644
--- a/Documentation/platforms/xtensa/esp32s2/boards/esp32s2-saola-1/index.rst
+++ b/Documentation/platforms/xtensa/esp32s2/boards/esp32s2-saola-1/index.rst
@@ -394,3 +394,8 @@ To test it, just run the following::
 nsh> wdog -i /dev/watchdogx
 
 Where x is the watchdog instance.
+
+To test the XTWDT(/dev/watchdog3) an interrupt handler needs to be
+implemented because XTWDT does not have system reset feature. To implement
+an interrupt handler `WDIOC_CAPTURE` command can be used. When interrupt
+rises, XTAL32K clock can be restored with `WDIOC_RSTCLK` command.
diff --git a/arch/xtensa/src/esp32s2/Kconfig b/arch/xtensa/src/esp32s2/Kconfig
index 5f40582572..0cf493e409 100644
--- a/arch/xtensa/src/esp32s2/Kconfig
+++ b/arch/xtensa/src/esp32s2/Kconfig
@@ -420,6 +420,28 @@ config ESP32S2_RWDT
to have the RTC module reset, please, use the Timers' Module 
WDTs.
They will only reset Main System.
 
+config ESP32S2_XTWDT
+   bool "XTAL32K Watchdog Timer"
+   depends on ESP32S2_RTC_CLK_EXT_OSC || ESP32S2_RTC_CLK_EXT_XTAL
+   default n
+   select ESP32S2_WDT
+   select ESP32S2_RTCIO_IRQ
+   ---help---
+   Includes XTWDT. This watchdog timer monitors the status of the
+   external 32 kHz crystal oscillator (XTAL32K). When XTAL32K_CLK 
works
+   as the clock source of RTC_SLOW_CLK and it stops oscillating, 
the
+   XTAL32K watchdog timer first switches to BACKUP32K_CLK derived 
from
+   RC_SLOW_CLK (if ESP32S2_XTWDT_BACKUP_CLK_ENABLE) and, then, 
generates
+   an interrupt that could be captured by WDIOC_CAPTURE.
+
+config ESP32S2_XTWDT_BACKUP_CLK_ENABLE
+   bool "Automatically switch to BACKUP32K_CLK when timer expires"
+   depends on ESP32S2_XTWDT
+   default y
+   ---help---
+   Enable this to automatically switch to BACKUP32K_CLK as the 
source of
+   RTC_SLOW_CLK when the watchdog timer expires.
+
 config ESP32S2_RTC
bool "Real Time Clock (RTC)"
default y
diff --git a/arch/xtensa/src/esp32s2/esp32s2_rtc.c 
b/arch/xtensa/src/esp32s2/esp32s2_rtc.c
index 35851ea357..9f61ad1912 100644
--- a/arch/xtensa/src/esp32s2/esp32s2_rtc.c
+++ b/arch/xtensa/src/esp32s2/esp32s2_rtc.c
@@ -131,23 +131,32 @@
 
 #define RT

Re: [PR] xtensa/espressif/rmt: Implement a common RMT (Remote Control) driver for xtensa-based devices. [nuttx]

2023-12-22 Thread via GitHub


xiaoxiang781216 commented on PR #11428:
URL: https://github.com/apache/nuttx/pull/11428#issuecomment-1867604232

   but, it's good to use the vendor hal file directly


-- 
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-unsubscr...@nuttx.apache.org

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



Re: [PR] xtensa/espressif/rmt: Implement a common RMT (Remote Control) driver for xtensa-based devices. [nuttx]

2023-12-22 Thread via GitHub


tmedicci commented on PR #11428:
URL: https://github.com/apache/nuttx/pull/11428#issuecomment-1867668719

   > but, it's good to use the vendor hal file directly
   
   I'm sorry, I didn't understand what you meant. Could you please elaborate a 
little further?


-- 
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-unsubscr...@nuttx.apache.org

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



Re: [PR] apps: Select PIPES when enabling system popen [nuttx-apps]

2023-12-22 Thread via GitHub


acassis commented on PR #2239:
URL: https://github.com/apache/nuttx-apps/pull/2239#issuecomment-1867679286

   > here is some recommendation for `select` from zephyr: 
https://docs.zephyrproject.org/latest/build/kconfig/tips.html#select-recommendations
   
   @xiaoxiang781216 in this case CONFIG_SYSTEM_POPEN is selecting a feature 
that doesn't "slip" or get "out of sync". This is a clear case where the 
feature popen() requires SCHED_WAITPID and PIPES to work correctly:
   
   ```
   select SCHED_WAITPID
   select PIPES
   ``` 
   
   Also PIPES doesn't have external dependencies that could create confusion or 
circular dependence!
   
   I think what people from zephyr is trying to avoid are those other cases 
where "select" could create problems cause by symbols that many dependencies.
   
   In this case here we don't have this risk, because CONFIG_SYSTEM_POPEN is 
not enabled by default and PIPES doesn't have other dependencies.


-- 
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-unsubscr...@nuttx.apache.org

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



Re: [PR] xtensa/espressif/rmt: Implement a common RMT (Remote Control) driver for xtensa-based devices. [nuttx]

2023-12-22 Thread via GitHub


acassis commented on code in PR #11428:
URL: https://github.com/apache/nuttx/pull/11428#discussion_r1435064219


##
drivers/leds/ws2812.c:
##
@@ -55,15 +55,7 @@
  * Pre-processor Definitions
  /
 
-#ifdef WS2812_HAS_WHITE
-#  define WS2812_RW_PIXEL_SIZE  4
-#else 
-#  define WS2812_RW_PIXEL_SIZE  3
-#endif
-
-#ifdef CONFIG_WS2812_NON_SPI_DRIVER
-
-#else /* CONFIG_WS2812_NON_SPI_DRIVER */

Review Comment:
   @tmedicci I think there are some models of WS2812 that doesn't have WHITE 
LED, so instead of using 32-bit it uses 24-bit.
   
   @vbenso could you please confirm/verify?



-- 
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-unsubscr...@nuttx.apache.org

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



Re: [PR] xtensa/espressif/rmt: Implement a common RMT (Remote Control) driver for xtensa-based devices. [nuttx]

2023-12-22 Thread via GitHub


tmedicci commented on code in PR #11428:
URL: https://github.com/apache/nuttx/pull/11428#discussion_r1435073212


##
drivers/leds/ws2812.c:
##
@@ -55,15 +55,7 @@
  * Pre-processor Definitions
  /
 
-#ifdef WS2812_HAS_WHITE
-#  define WS2812_RW_PIXEL_SIZE  4
-#else 
-#  define WS2812_RW_PIXEL_SIZE  3
-#endif
-
-#ifdef CONFIG_WS2812_NON_SPI_DRIVER
-
-#else /* CONFIG_WS2812_NON_SPI_DRIVER */

Review Comment:
   Hi @acassis !
   
   Yes, I know (in fact, the "real" ws2812 doesn't contain 4 LEDs at all, only 
variants that use the same protocol and sometimes are sold as ws2812 RGBW), but 
the variable that the LED driver uses is 4-byte long (independent of the LED). 
The lower-half driver should handle that. I explained in the commit message:
   
   > Although the LED might be RGB-only, the LED data is packed in a 32-bit 
long variable and, then, this is the default size of a LED pixel to define the 
'WS2812_RW_PIXEL_SIZE' macro. Please note that the lower-half driver will deal 
with the case of the addressable LED being 3 or 4-pixel sized.



-- 
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-unsubscr...@nuttx.apache.org

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



Re: [PR] Add MTD for AT25 eeprom [nuttx]

2023-12-22 Thread via GitHub


acassis commented on code in PR #11423:
URL: https://github.com/apache/nuttx/pull/11423#discussion_r1435077054


##
drivers/mtd/Kconfig:
##
@@ -382,10 +384,10 @@ config AT24XX_SIZE
int "AT24xx size (Kbit)"
default 64
---help---
-   This is the XX in the AT24Cxx part number.  For example, if you 
have a
-   AT 24C512, then the correct value is 512.  This value is also 
the capacity
-   of the part in kilobits.  For example, the 24C512 supports 512 
Kbits or
-   512 /8 = 64 KiB.
+   This is the XX in the AT24Cxx part number.  For example, if you 
have
+   an AT24C512, then the correct value is 512.
+   This value is also the capacity of the part in kilobits.
+   For example, the 24C512 supports 512 Kbits or 512 /8 = 64 KiB.

Review Comment:
   @TimJTi This is the point: AT24C512 is 512Kbit but the default value is set 
to 64Kbit according with the prompt message: "AT24xx size (Kbit)", understood 
now?
   
   The prompt should be: "AT24xx size (in KiB)" and the Help message also need 
to be updated, it says that the entered value is in Kilo Bit, but actually it 
is in KiB.



-- 
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-unsubscr...@nuttx.apache.org

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



Re: [I] use SDCard on NuttX question。 [nuttx]

2023-12-22 Thread via GitHub


acassis commented on issue #11420:
URL: https://github.com/apache/nuttx/issues/11420#issuecomment-1867735114

   @GC-20-20 please double check you board config, I suggest you to look the 
SDCARD examples for stm32f4discovery and stm32f401rc-rs485. Double checkout all 
pins and notice that your board doesn't have the Card Dection (CD) pin 
connected to the MCU. 
   
   Also you can enable the debug options to collect more information:
   
   ```
   Build Setup  --->
   Debug Options  --->
   [*] Enable Debug Features
   ...
   [*]   File System Debug Features
   [*] File System Error Output
   [*] File System Warnings Output
   ...
   [*]   Memory Card Driver Debug Features
   [*] Memory Card Driver Error Output
   [*] Memory Card Driver Warnings Output
   [*] Memory Card Driver Informational Output
   ```


-- 
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-unsubscr...@nuttx.apache.org

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



Re: [PR] apps: Select PIPES when enabling system popen [nuttx-apps]

2023-12-22 Thread via GitHub


xiaoxiang781216 commented on PR #2239:
URL: https://github.com/apache/nuttx-apps/pull/2239#issuecomment-1867747126

   We found that select expose some bad effect, for example:
   
   1. Feature A depends on Feature C
   2. Feature B select Feature C
   
   The initial defconfig set both A and C to y to get feature A. Next, he wants 
feature B and enable it, defconfig contain just contains A and B. In the later, 
B feature doesn't need and then remove B from defconfig, but defconfig fail 
since C is removed from step 2.


-- 
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-unsubscr...@nuttx.apache.org

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



Re: [PR] boards/fvp-armv8r: Update defconfig after running refresh.sh [nuttx]

2023-12-22 Thread via GitHub


xiaoxiang781216 commented on PR #11440:
URL: https://github.com/apache/nuttx/pull/11440#issuecomment-1867750958

   it's strange that ci doesn't catch this problem.


-- 
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-unsubscr...@nuttx.apache.org

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



Re: [PR] Add MTD for AT25 eeprom [nuttx]

2023-12-22 Thread via GitHub


TimJTi commented on code in PR #11423:
URL: https://github.com/apache/nuttx/pull/11423#discussion_r1435117709


##
drivers/mtd/at25ee.c:
##
@@ -0,0 +1,1033 @@
+/
+ * drivers/mtd/at25ee.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 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#ifdef CONFIG_MTD_AT25EE
+
+/
+ * Pre-processor Definitions
+ /
+
+#ifndef CONFIG_AT25EE_SPIMODE
+#  define CONFIG_AT25EE_SPIMODE 0
+#endif
+
+/* EEPROM commands
+ * High bit of low nibble used for A8 in 25xx040/at25040 products
+ */
+
+#define AT25EE_CMD_WRSR  0x01
+#define AT25EE_CMD_WRITE 0x02
+#define AT25EE_CMD_READ  0x03
+#define AT25EE_CMD_WRDIS 0x04
+#define AT25EE_CMD_RDSR  0x05
+#define AT25EE_CMD_WREN  0x06
+
+/* Following commands will be available some day via IOCTLs
+ *   PE0x42 Page erase (25xx512/1024)
+ *   SE0xD8 Sector erase (25xx512/1024)
+ *   CE0xC7 Chip erase (25xx512/1024)
+ *   RDID  0xAB Wake up and read electronic signature (25xx512/1024)
+ *   DPD   0xB9 Sleep (25xx512/1024)
+ *
+ * Identification page access for ST devices
+ *   RDID/RDLS 0x83 Read identification page / Read ID page lock status
+ *   WRID/LID  0x82 Write identification page / Lock ID page
+ */
+
+/* SR bits definitions */
+
+#define AT25EE_SR_WIP  0x01 /* Write in Progress*/
+#define AT25EE_SR_WEL  0x02 /* Write Enable Latch   */
+#define AT25EE_SR_BP0  0x04 /* First Block Protect bit  */
+#define AT25EE_SR_BP1  0x08 /* Second Block Protect bit */
+#define AT25EE_SR_WPEN 0x80 /* Write Protect Enable */
+
+#define AT25EE_DUMMY   0xFF
+
+/* For applications where a file system is used on the AT25EE, the tiny page
+ * sizes will result in very inefficient EEPROM usage.  In such cases, it is
+ * better if blocks are comprised of "clusters" of pages so that the file
+ * system block size is, say, 256 or 512 bytes.
+ * In any event, the block size *must* be an even multiple of the pages.
+ */
+
+/
+ * Private Types
+ /
+
+/* Device geometry description, compact form (2 bytes per entry) */
+
+struct at25ee_geom_s
+{
+  uint8_t bytes: 4; /* Power of 2 of 128 bytes (0:128 1:256 2:512 etc)  */
+  uint8_t pagesize : 4; /* Power of 2 of   8 bytes (0:8 1:16 2:32 3:64 etc) */
+  uint8_t addrlen  : 4; /* Number of bytes in command address field */
+  uint8_t flags: 4; /* Addr. management for 25xx040, 1=A8 in inst   */
+};
+
+/* This type represents the state of the MTD device.  The struct mtd_dev_s
+ * must appear at the beginning of the definition so that you can freely
+ * cast between pointers to struct mtd_dev_s and struct at25ee_dev_s.
+ */
+
+struct at25ee_dev_s
+{
+  struct mtd_dev_s mtd;   /* MTD interface  */
+  struct spi_dev_s *spi;  /* SPI device where the EEPROM is attached*/
+  uint32_t size;  /* in bytes, expanded from geometry   */
+  uint16_t pgsize;/* write block size, in bytes, expanded from
+   * geometry
+   */
+  uint16_t npages;/* numpages, derived from geometry*/
+  uint16_t addrlen;   /* number of BITS in data addresses   */
+  uint16_t blocksize; /* Block sized to report  */
+  mutex_t  lock;  /* file access serialization  */
+  uint8_t  readonly;  /* Flags  */

Re: [PR] Add MTD for AT25 eeprom [nuttx]

2023-12-22 Thread via GitHub


TimJTi commented on code in PR #11423:
URL: https://github.com/apache/nuttx/pull/11423#discussion_r1435124953


##
drivers/mtd/Kconfig:
##
@@ -382,10 +384,10 @@ config AT24XX_SIZE
int "AT24xx size (Kbit)"
default 64
---help---
-   This is the XX in the AT24Cxx part number.  For example, if you 
have a
-   AT 24C512, then the correct value is 512.  This value is also 
the capacity
-   of the part in kilobits.  For example, the 24C512 supports 512 
Kbits or
-   512 /8 = 64 KiB.
+   This is the XX in the AT24Cxx part number.  For example, if you 
have
+   an AT24C512, then the correct value is 512.
+   This value is also the capacity of the part in kilobits.
+   For example, the 24C512 supports 512 Kbits or 512 /8 = 64 KiB.

Review Comment:
   I disagree; or I am being very stupid!
   
   The value you enter in Kconfig is in kbits as it says. The default is 64 
kbits.
   
   The example in the help is for an AT24C512, 512bits, which is 64KiB.
   
   It might be inconsistent that the help example doesn't match the default, 
but it is not wrong as such.
   
   Would you like me to change the example - in part of the Kconfig that is 
unrelated to this PR - to be for an AT24C64, 64kbit and therefore 8KiB?



-- 
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-unsubscr...@nuttx.apache.org

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



Re: [PR] boards/fvp-armv8r: Update defconfig after running refresh.sh [nuttx]

2023-12-22 Thread via GitHub


raiden00pl commented on code in PR #11440:
URL: https://github.com/apache/nuttx/pull/11440#discussion_r1435148421


##
boards/arm64/fvp-v8r/fvp-armv8r/configs/nsh/defconfig:
##
@@ -5,74 +5,46 @@
 # You can then do "make savedefconfig" to generate a new defconfig file that 
includes your
 # modifications.
 #
-CONFIG_ARCH="arm64"
-CONFIG_ARCH_ARM64=y
-CONFIG_ARCH_BOARD="fvp-armv8r"
-CONFIG_ARCH_BOARD_FVP_ARMV8R=y
-CONFIG_ARCH_CHIP="fvp-v8r"
-CONFIG_ARCH_CHIP_FVP_ARMV8R=y
-CONFIG_ARCH_CHIP_FVP_R82=y
-CONFIG_ARCH_EARLY_PRINT=y
-CONFIG_ARCH_INTERRUPTSTACK=4096
-CONFIG_ARM64_STRING_FUNCTION=y
+# CONFIG_ARCH_FPU is not set
+# CONFIG_NSH_ARGCAT is not set
+# CONFIG_NSH_CMDOPT_HEXDUMP is not set
+CONFIG_ARCH="arm"
+CONFIG_ARCH_BOARD="stm32f4discovery"

Review Comment:
   this doesn't look good :)



-- 
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-unsubscr...@nuttx.apache.org

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



Re: [PR] boards/fvp-armv8r: Update defconfig after running refresh.sh [nuttx]

2023-12-22 Thread via GitHub


acassis commented on code in PR #11440:
URL: https://github.com/apache/nuttx/pull/11440#discussion_r1435152381


##
boards/arm64/fvp-v8r/fvp-armv8r/configs/nsh/defconfig:
##
@@ -5,74 +5,46 @@
 # You can then do "make savedefconfig" to generate a new defconfig file that 
includes your
 # modifications.
 #
-CONFIG_ARCH="arm64"
-CONFIG_ARCH_ARM64=y
-CONFIG_ARCH_BOARD="fvp-armv8r"
-CONFIG_ARCH_BOARD_FVP_ARMV8R=y
-CONFIG_ARCH_CHIP="fvp-v8r"
-CONFIG_ARCH_CHIP_FVP_ARMV8R=y
-CONFIG_ARCH_CHIP_FVP_R82=y
-CONFIG_ARCH_EARLY_PRINT=y
-CONFIG_ARCH_INTERRUPTSTACK=4096
-CONFIG_ARM64_STRING_FUNCTION=y
+# CONFIG_ARCH_FPU is not set
+# CONFIG_NSH_ARGCAT is not set
+# CONFIG_NSH_CMDOPT_HEXDUMP is not set
+CONFIG_ARCH="arm"
+CONFIG_ARCH_BOARD="stm32f4discovery"

Review Comment:
   wow! Good finding!
   
   I just run ./tools/refresh.sh and it created these modifications!



-- 
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-unsubscr...@nuttx.apache.org

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



Re: [PR] boards/fvp-armv8r: Update defconfig after running refresh.sh [nuttx]

2023-12-22 Thread via GitHub


acassis commented on PR #11440:
URL: https://github.com/apache/nuttx/pull/11440#issuecomment-1867805024

   > it's strange that ci doesn't catch this problem.
   
   Could you please run:
   ```
   ./tools/refresh.sh --silent --defaults all
   ```
   
   And see if same issue file will be updated?


-- 
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-unsubscr...@nuttx.apache.org

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



Re: [PR] boards/fvp-armv8r: Update defconfig after running refresh.sh [nuttx]

2023-12-22 Thread via GitHub


acassis commented on PR #11440:
URL: https://github.com/apache/nuttx/pull/11440#issuecomment-1867807624

   I will close this PR, but please guys run the same build script to confirm 
it is failing. I don't remember if I ran make distclean before running it, 
probably it was configured to stm32f4discovery.


-- 
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-unsubscr...@nuttx.apache.org

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



Re: [PR] apps: Select PIPES when enabling system popen [nuttx-apps]

2023-12-22 Thread via GitHub


acassis commented on PR #2239:
URL: https://github.com/apache/nuttx-apps/pull/2239#issuecomment-1868064014

   @xiaoxiang781216 right, but in this case here it is a direct dependence:
   Let's say assume Features:
   A = popen example app
   B = system popen
   C = pipes
   
   -> A depends on B (so user needs to example B first to see A)
   -> When user enable B, it automatically will select C.
   
   In this case defconfig with end up with A, B and C.
   
   The only way it could fail is if the user manually disable PIPES, but are 
want to improve beginner users experience and reduce their friction. So users 
that follow the common path will not face this issue.


-- 
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-unsubscr...@nuttx.apache.org

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



Re: [I] Make OPEN option select FIFO and named pipes configuration [nuttx]

2023-12-22 Thread via GitHub


acassis commented on issue #11435:
URL: https://github.com/apache/nuttx/issues/11435#issuecomment-1868068167

   @xiaoxiang781216 actually the issue that @gus-soares19 was facing should 
exist according with current Kconfig settings:
   
   -> CONFIG_EXAMPLES_POPEN depends on CONFIG_SYSTEM_POPEN
   -> CONFIG_SYSTEM_POPEN depends on CONFIG_NSH_LIBRARY && CONFIG_PIPES
   
   So, I don't understand how he has enabled CONFIG_EXAMPLES_POPEN and 
CONFIG_SYSTEM_POPEN without enabling CONFIG_PIPES ?
   
   @gus-soares19 did you edit the .config or defconfig file manually to enable 
these two options? Instead using menuconfig?


-- 
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-unsubscr...@nuttx.apache.org

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



Re: [I] CMake version.h compilation error [nuttx]

2023-12-22 Thread via GitHub


acassis commented on issue #11438:
URL: https://github.com/apache/nuttx/issues/11438#issuecomment-1868071409

   @maxikrie thank you for reporting, I think the error is here:
   ```
   cmake/nuttx_mkversion.cmake:
   file(APPEND ${VERSION_H} "#define CONFIG_VERSION_STRING 
\"${NUTTX_VERSION}\"\n")
   ```
   
   Could you please replace it with:
   ```
   file(APPEND ${VERSION_H} "#define CONFIG_VERSION_STRING 
\"${NUTTX_VERSION}\"\")
   ```
   
   And test again.


-- 
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-unsubscr...@nuttx.apache.org

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



Re: [PR] Update riscv_mmu.h to fix typo in comment [nuttx]

2023-12-22 Thread via GitHub


acassis merged PR #11439:
URL: https://github.com/apache/nuttx/pull/11439


-- 
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-unsubscr...@nuttx.apache.org

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



Re: [I] Make OPEN option select FIFO and named pipes configuration [nuttx]

2023-12-22 Thread via GitHub


gus-soares19 commented on issue #11435:
URL: https://github.com/apache/nuttx/issues/11435#issuecomment-1868072093

   No, I did not. I enabled both CONFIG_EXAMPLES_POPEN and CONFIG_SYSTEM_POPEN 
using menuconfig.


-- 
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-unsubscr...@nuttx.apache.org

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



(nuttx) branch master updated: Update riscv_mmu.h to fix typo in comment

2023-12-22 Thread acassis
This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
 new 804f713c86 Update riscv_mmu.h to  fix typo in comment
804f713c86 is described below

commit 804f713c862cc5e8c1dae5067b8f8781165b1bd2
Author: yf13 
AuthorDate: Fri Dec 22 19:23:55 2023 +0800

Update riscv_mmu.h to  fix typo in comment

fix typo in comment of mmu_get_region_size function
---
 arch/risc-v/src/common/riscv_mmu.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/risc-v/src/common/riscv_mmu.h 
b/arch/risc-v/src/common/riscv_mmu.h
index a1d3de36b1..0e6e1b2b38 100644
--- a/arch/risc-v/src/common/riscv_mmu.h
+++ b/arch/risc-v/src/common/riscv_mmu.h
@@ -451,7 +451,7 @@ void mmu_ln_map_region(uint32_t ptlevel, uintptr_t lnvaddr, 
uintptr_t paddr,
uintptr_t vaddr, size_t size, uint64_t mmuflags);
 
 /
- * Name: mmu_ln_map_region
+ * Name: mmu_get_region_size
  *
  * Description:
  *   Get (giga/mega) page size for level n.



(nuttx-website) branch asf-site updated: Publishing web: 36ddd7c60a8230335eda886c909bc938739114a2 docs: 804f713c862cc5e8c1dae5067b8f8781165b1bd2

2023-12-22 Thread github-bot
This is an automated email from the ASF dual-hosted git repository.

github-bot pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/nuttx-website.git


The following commit(s) were added to refs/heads/asf-site by this push:
 new 9f84c75d Publishing web: 36ddd7c60a8230335eda886c909bc938739114a2 
docs: 804f713c862cc5e8c1dae5067b8f8781165b1bd2
9f84c75d is described below

commit 9f84c75d12ec20e2416b9efdb026e5e8d098c293
Author: Alin Jerpelea 
AuthorDate: Sat Dec 23 00:14:03 2023 +

Publishing web: 36ddd7c60a8230335eda886c909bc938739114a2 docs: 
804f713c862cc5e8c1dae5067b8f8781165b1bd2
---
 content/docs/10.0.0/index.html |   2 +-
 content/docs/10.0.0/searchindex.js |   2 +-
 content/docs/10.0.1/index.html |   2 +-
 content/docs/10.0.1/searchindex.js |   2 +-
 content/docs/10.1.0/index.html |   2 +-
 content/docs/10.1.0/searchindex.js |   2 +-
 content/docs/10.2.0/index.html |   2 +-
 content/docs/10.2.0/searchindex.js |   2 +-
 content/docs/10.3.0/index.html |   2 +-
 content/docs/10.3.0/searchindex.js |   2 +-
 content/docs/11.0.0/index.html |   2 +-
 content/docs/11.0.0/searchindex.js |   2 +-
 content/docs/12.0.0/index.html |   2 +-
 content/docs/12.0.0/searchindex.js |   2 +-
 content/docs/12.1.0/index.html |   2 +-
 content/docs/12.1.0/searchindex.js |   2 +-
 content/docs/12.2.0/index.html |   2 +-
 content/docs/12.2.0/searchindex.js |   2 +-
 content/docs/12.2.1/index.html |   2 +-
 content/docs/12.2.1/searchindex.js |   2 +-
 content/docs/12.3.0/index.html |   2 +-
 content/docs/12.3.0/searchindex.js |   2 +-
 .../esp32s2/boards/esp32s2-kaluga-1/index.rst.txt  |  18 ++
 .../esp32s2/boards/esp32s2-saola-1/index.rst.txt   |   5 +
 content/docs/latest/index.html |   2 +-
 content/docs/latest/objects.inv| Bin 109750 -> 109761 bytes
 .../esp32s2/boards/esp32s2-kaluga-1/index.html |  15 +++
 .../esp32s2/boards/esp32s2-saola-1/index.html  |   4 
 content/docs/latest/searchindex.js |   2 +-
 content/feed.xml   |   4 ++--
 30 files changed, 68 insertions(+), 26 deletions(-)

diff --git a/content/docs/10.0.0/index.html b/content/docs/10.0.0/index.html
index 749c3cbf..0ce6fa0a 100644
--- a/content/docs/10.0.0/index.html
+++ b/content/docs/10.0.0/index.html
@@ -131,7 +131,7 @@ by following these 
 NuttX Documentation
 NuttX is a real-time operating system (RTOS) with an emphasis on standards 
compliance and small footprint. Scalable from 8-bit to 32-bit microcontroller 
environments, the primary governing standards in NuttX are Posix and ANSI 
standards. Additional standard APIs from Unix and other common RTOS’s (such as 
VxWorks) are adopted for functionality not available under these standards, or 
for functionality that is not appropriate for deeply-embedded environments 
(such as fork()).
-Last Updated: 22 December 23 at 00:10
+Last Updated: 23 December 23 at 00:09
 
 Table of 
Contents
 
diff --git a/content/docs/10.0.0/searchindex.js 
b/content/docs/10.0.0/searchindex.js
index b1ea1c9c..955259a7 100644
--- a/content/docs/10.0.0/searchindex.js
+++ b/content/docs/10.0.0/searchindex.js
@@ -1 +1 @@
-Search.setIndex({"docnames": ["applications/index", "boards/index", 
"components/binfmt", "components/drivers/block/index", 
"components/drivers/character/analog", "components/drivers/character/can", 
"components/drivers/character/index", "components/drivers/character/keypad", 
"components/drivers/character/pwm", "components/drivers/character/quadrature", 
"components/drivers/character/rtc", "components/drivers/character/serial", 
"components/drivers/character/timer", "components/drivers/chara [...]
\ No newline at end of file
+Search.setIndex({"docnames": ["applications/index", "boards/index", 
"components/binfmt", "components/drivers/block/index", 
"components/drivers/character/analog", "components/drivers/character/can", 
"components/drivers/character/index", "components/drivers/character/keypad", 
"components/drivers/character/pwm", "components/drivers/character/quadrature", 
"components/drivers/character/rtc", "components/drivers/character/serial", 
"components/drivers/character/timer", "components/drivers/chara [...]
\ No newline at end of file
diff --git a/content/docs/10.0.1/index.html b/content/docs/10.0.1/index.html
index 87db6714..b1546a76 100644
--- a/content/docs/10.0.1/index.html
+++ b/content/docs/10.0.1/index.html
@@ -153,7 +153,7 @@ by following these 
 NuttX Documentation
 NuttX is a real-time operating system (RTOS) with an emphasis on

Re: [I] use SDCard on NuttX question。 [nuttx]

2023-12-22 Thread via GitHub


GC-20-20 commented on issue #11420:
URL: https://github.com/apache/nuttx/issues/11420#issuecomment-1868170193

   @acassis Thanks for your reply, I have now successfully mounted it. The 
cause was a hardware problem, two modules were mounted on the SDIO bus, masking 
one of them worked.


-- 
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-unsubscr...@nuttx.apache.org

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



[PR] Update mode.h to add CSR_TVEC [nuttx]

2023-12-22 Thread via GitHub


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

   ## Summary
   
   this adds CSR_TVEC definition for trap vector base address register to 
risc-v mode.h
   
   ## Impact
   
   None for existing RiscV ports
   


-- 
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-unsubscr...@nuttx.apache.org

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



Re: [I] use SDCard on NuttX question。 [nuttx]

2023-12-22 Thread via GitHub


xiaoxiang781216 closed issue #11420: use SDCard on NuttX question。
URL: https://github.com/apache/nuttx/issues/11420


-- 
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-unsubscr...@nuttx.apache.org

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



Re: [I] Make OPEN option select FIFO and named pipes configuration [nuttx]

2023-12-22 Thread via GitHub


xiaoxiang781216 commented on issue #11435:
URL: https://github.com/apache/nuttx/issues/11435#issuecomment-1868182241

   But you must enable CONFIG_PIPES in defconfig, otherwise 
CONFIG_EXAMPLES_POPEN/CONFIG_SYSTEM_POPEN will be ignored by kconfig tool since 
the dependence requirement isn't matched. It's strange that you hit a linker 
error, not lose popen function and example. Could you reproduce the problem in 
a clear repo?


-- 
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-unsubscr...@nuttx.apache.org

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



Re: [PR] apps: Select PIPES when enabling system popen [nuttx-apps]

2023-12-22 Thread via GitHub


xiaoxiang781216 commented on PR #2239:
URL: https://github.com/apache/nuttx-apps/pull/2239#issuecomment-1868183721

   But, there are other path which directly use pipes, if someday the project 
decides to avoid use popen to save the code size, the end user will surprise 
that the linker can't find pipes after he disable popen a related feature. So, 
it's prefer to use `depends on` over  `select`:
   
   1. Both `depends on` and `select` can describe the relationship correctly
   2. And `depends on` doesn't hide the relationship (user still need enable in 
defconfig explicitly)
   3. But `select` hide the relationship which introduce many problems in the 
engineering process


-- 
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-unsubscr...@nuttx.apache.org

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