Re: [PR] Bring up changes from nuttx/pci branch [nuttx]

2024-01-21 Thread via GitHub


raiden00pl commented on PR #11570:
URL: https://github.com/apache/nuttx/pull/11570#issuecomment-1903430149

   @xiaoxiang781216 what do you think about applying this pcie implementation 
first (with the changes from Brennan included). When your implementation goes 
upstream we can mark this work as legacy, port what is needed to the new 
version and when everything is ported, remove the legacy version. 


-- 
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] IEEE802.15.4 support for nRF52 and nRF53 [nuttx]

2024-01-21 Thread via GitHub


raiden00pl commented on issue #11297:
URL: https://github.com/apache/nuttx/issues/11297#issuecomment-1903398146

   This issue is about IEEE802.15.4 support for nRF5x using the build-in radio. 
The only purpose why I need mrf24j40 is for testing and a better understanding 
of how MAC layer works on NuttX. 


-- 
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: rv-virt/configs: avoid build errors

2024-01-21 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 b46ee08230 rv-virt/configs: avoid build errors
b46ee08230 is described below

commit b46ee082307b689ff08d786a7dacd3813882ad80
Author: Yanfeng Liu 
AuthorDate: Sun Jan 21 20:08:44 2024 +0800

rv-virt/configs: avoid build errors

- disable NSH_SYMTAB to avoid build errors with cmake.
- enable LIBM to avoid build errors with Ubuntu stock
  gcc-riscv64-unknown-elf toolchain.
- use HELLO=y for easy use within qemu console.

Signed-off-by: Yanfeng Liu 
---
 boards/risc-v/qemu-rv/rv-virt/configs/nsh/defconfig   | 5 ++---
 boards/risc-v/qemu-rv/rv-virt/configs/nsh64/defconfig | 4 +---
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/nsh/defconfig 
b/boards/risc-v/qemu-rv/rv-virt/configs/nsh/defconfig
index 4aa6358ebd..2cfe94289b 100644
--- a/boards/risc-v/qemu-rv/rv-virt/configs/nsh/defconfig
+++ b/boards/risc-v/qemu-rv/rv-virt/configs/nsh/defconfig
@@ -32,7 +32,7 @@ CONFIG_DEBUG_FULLOPT=y
 CONFIG_DEBUG_SYMBOLS=y
 CONFIG_DEV_ZERO=y
 CONFIG_ELF=y
-CONFIG_EXAMPLES_HELLO=m
+CONFIG_EXAMPLES_HELLO=y
 CONFIG_FS_HOSTFS=y
 CONFIG_FS_PROCFS=y
 CONFIG_IDLETHREAD_STACKSIZE=2048
@@ -42,13 +42,12 @@ CONFIG_LIBC_ENVPATH=y
 CONFIG_LIBC_EXECFUNCS=y
 CONFIG_LIBC_PERROR_STDOUT=y
 CONFIG_LIBC_STRERROR=y
+CONFIG_LIBM=y
 CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6
 CONFIG_NSH_ARCHINIT=y
 CONFIG_NSH_BUILTIN_APPS=y
 CONFIG_NSH_FILEIOSIZE=512
 CONFIG_NSH_READLINE=y
-CONFIG_NSH_SYMTAB=y
-CONFIG_NSH_SYMTAB_ARRAYNAME="g_symtab"
 CONFIG_PATH_INITIAL="/system/bin"
 CONFIG_RAM_SIZE=33554432
 CONFIG_RAM_START=0x8000
diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/nsh64/defconfig 
b/boards/risc-v/qemu-rv/rv-virt/configs/nsh64/defconfig
index 37cd640d5f..b094543439 100644
--- a/boards/risc-v/qemu-rv/rv-virt/configs/nsh64/defconfig
+++ b/boards/risc-v/qemu-rv/rv-virt/configs/nsh64/defconfig
@@ -45,14 +45,12 @@ CONFIG_LIBC_ENVPATH=y
 CONFIG_LIBC_EXECFUNCS=y
 CONFIG_LIBC_PERROR_STDOUT=y
 CONFIG_LIBC_STRERROR=y
+CONFIG_LIBM=y
 CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6
 CONFIG_NSH_ARCHINIT=y
 CONFIG_NSH_BUILTIN_APPS=y
 CONFIG_NSH_FILEIOSIZE=512
 CONFIG_NSH_READLINE=y
-CONFIG_NSH_SYMTAB=y
-CONFIG_NSH_SYMTAB_ARRAYNAME="g_symtab"
-CONFIG_NSH_SYMTAB_COUNTNAME="g_nsymbols"
 CONFIG_PATH_INITIAL="/system/bin"
 CONFIG_RAM_SIZE=33554432
 CONFIG_RAM_START=0x8000



Re: [PR] rv-virt/configs: avoid build errors with cmake or stock gcc 10.2 [nuttx]

2024-01-21 Thread via GitHub


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


-- 
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] Support to ARP Address Conflict Detection [nuttx]

2024-01-21 Thread via GitHub


anchao commented on code in PR #11578:
URL: https://github.com/apache/nuttx/pull/11578#discussion_r1461388327


##
net/arp/arp.h:
##
@@ -128,9 +128,12 @@ struct arp_iphdr_s
  * operated upon from the network driver poll.
  */
 
+typedef CODE void (*arp_send_finish_cb_t)(FAR struct net_driver_s *dev,
+int result);

Review Comment:
   align



##
net/arp/arp_acd.c:
##
@@ -0,0 +1,275 @@
+/
+ * net/arp/arp_acd.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 "arp/arp.h"
+#include "netlink/netlink.h"
+#include "utils/utils.h"
+
+/
+ * Private Data
+ /
+
+/
+ * Private Function Prototypes
+ /
+
+static void arp_acd_try_announce(FAR void *net_dev);
+
+/
+ * Private Functions
+ /
+
+/
+ * Name: arp_acd_arrange_announce
+ *
+ * Description:
+ *   creat work_queue to send ARP announce
+ *
+ * Input Parameters:
+ *   dev - The device driver structure to use in the send operation
+ *
+ * Returned Value:
+ *   none
+ *
+ /
+
+static void arp_acd_arrange_announce(FAR struct net_driver_s *dev)
+{
+  if (dev->d_acd.need_announce == true)
+{
+  return;
+}
+
+  int ret = work_queue(LPWORK, >d_acd.work, arp_acd_try_announce,

Review Comment:
   check work active



##
net/arp/arp_acd.c:
##
@@ -0,0 +1,275 @@
+/
+ * net/arp/arp_acd.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 "arp/arp.h"
+#include "netlink/netlink.h"
+#include "utils/utils.h"
+
+/
+ * Private Data
+ /
+
+/
+ * Private Function Prototypes
+ /
+
+static void arp_acd_try_announce(FAR void *net_dev);
+

[PR] Support to ARP Address Conflict Detection [nuttx]

2024-01-21 Thread via GitHub


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

   ## Summary
   Support to ARP Address Conflict Detection
   ## Impact
   ARP
   ## Testing
   set CONFIG_NET_ARP_ACD to built-in this function
   The following figure
   
![image](https://github.com/apache/nuttx/assets/129070278/74d2affd-236a-4f21-93e2-d4186c6e457b)
   
   when set ipv4 addr,The module will send arp announce 
   The following figure:
   
![image](https://github.com/apache/nuttx/assets/129070278/6b9fb6a2-3a92-48b3-9aeb-14396f2fa6ca)
   
   If in the same local area network,other device set the same ip,and send arp 
packet,the device with with this feature enabled detect other device has the 
same ip,the device will send arp reply and arp announce;The address conflict 
info will add int the device network info 
   The following figure:
   
   
![image](https://github.com/apache/nuttx/assets/129070278/2b2e77ac-7774-4bb4-83d3-f70eb8240532)
   
   
![image](https://github.com/apache/nuttx/assets/129070278/0fd017e7-89c8-446e-bde9-e31aa3bdb927)
   
   
   
   
   
   


-- 
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 dependabot/github_actions/actions/cache-4 created (now cb478109b3)

2024-01-21 Thread github-bot
This is an automated email from the ASF dual-hosted git repository.

github-bot pushed a change to branch dependabot/github_actions/actions/cache-4
in repository https://gitbox.apache.org/repos/asf/nuttx.git


  at cb478109b3 build(deps): bump actions/cache from 3 to 4

No new revisions were added by this update.



[PR] build(deps): bump actions/cache from 3 to 4 [nuttx]

2024-01-21 Thread via GitHub


dependabot[bot] opened a new pull request, #11577:
URL: https://github.com/apache/nuttx/pull/11577

   Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4.
   
   Release notes
   Sourced from https://github.com/actions/cache/releases;>actions/cache's 
releases.
   
   v4.0.0
   What's Changed
   
   Update action to node20 by https://github.com/takost;>@​takost in https://redirect.github.com/actions/cache/pull/1284;>actions/cache#1284
   feat: save-always flag by https://github.com/to-s;>@​to-s in https://redirect.github.com/actions/cache/pull/1242;>actions/cache#1242
   
   New Contributors
   
   https://github.com/takost;>@​takost made their 
first contribution in https://redirect.github.com/actions/cache/pull/1284;>actions/cache#1284
   https://github.com/to-s;>@​to-s made their 
first contribution in https://redirect.github.com/actions/cache/pull/1242;>actions/cache#1242
   
   Full Changelog: https://github.com/actions/cache/compare/v3...v4.0.0;>https://github.com/actions/cache/compare/v3...v4.0.0
   v3.3.3
   What's Changed
   
   Cache v3.3.3 by https://github.com/robherley;>@​robherley in https://redirect.github.com/actions/cache/pull/1302;>actions/cache#1302
   
   New Contributors
   
   https://github.com/robherley;>@​robherley made 
their first contribution in https://redirect.github.com/actions/cache/pull/1302;>actions/cache#1302
   
   Full Changelog: https://github.com/actions/cache/compare/v3...v3.3.3;>https://github.com/actions/cache/compare/v3...v3.3.3
   v3.3.2
   What's Changed
   
   Fixed readme with new segment timeout values by https://github.com/kotewar;>@​kotewar in https://redirect.github.com/actions/cache/pull/1133;>actions/cache#1133
   Readme fixes by https://github.com/kotewar;>@​kotewar in https://redirect.github.com/actions/cache/pull/1134;>actions/cache#1134
   Updated description of the lookup-only input for main action by https://github.com/kotewar;>@​kotewar in https://redirect.github.com/actions/cache/pull/1130;>actions/cache#1130
   Change two new actions mention as quoted text by https://github.com/bishal-pdMSFT;>@​bishal-pdMSFT in https://redirect.github.com/actions/cache/pull/1131;>actions/cache#1131
   Update Cross-OS Caching tips by https://github.com/pdotl;>@​pdotl in https://redirect.github.com/actions/cache/pull/1122;>actions/cache#1122
   Bazel example (Take https://redirect.github.com/actions/cache/issues/2;>#2️⃣) by https://github.com/vorburger;>@​vorburger in https://redirect.github.com/actions/cache/pull/1132;>actions/cache#1132
   Remove actions to add new PRs and issues to a project board by https://github.com/jorendorff;>@​jorendorff in https://redirect.github.com/actions/cache/pull/1187;>actions/cache#1187
   Consume latest toolkit and fix dangling promise bug by https://github.com/chkimes;>@​chkimes in https://redirect.github.com/actions/cache/pull/1217;>actions/cache#1217
   Bump action version to 3.3.2 by https://github.com/bethanyj28;>@​bethanyj28 in https://redirect.github.com/actions/cache/pull/1236;>actions/cache#1236
   
   New Contributors
   
   https://github.com/vorburger;>@​vorburger made 
their first contribution in https://redirect.github.com/actions/cache/pull/1132;>actions/cache#1132
   https://github.com/jorendorff;>@​jorendorff 
made their first contribution in https://redirect.github.com/actions/cache/pull/1187;>actions/cache#1187
   https://github.com/chkimes;>@​chkimes made 
their first contribution in https://redirect.github.com/actions/cache/pull/1217;>actions/cache#1217
   https://github.com/bethanyj28;>@​bethanyj28 
made their first contribution in https://redirect.github.com/actions/cache/pull/1236;>actions/cache#1236
   
   Full Changelog: https://github.com/actions/cache/compare/v3...v3.3.2;>https://github.com/actions/cache/compare/v3...v3.3.2
   v3.3.1
   What's Changed
   
   Reduced download segment size to 128 MB and timeout to 10 minutes by https://github.com/kotewar;>@​kotewar in https://redirect.github.com/actions/cache/pull/1129;>actions/cache#1129
   
   Full Changelog: https://github.com/actions/cache/compare/v3...v3.3.1;>https://github.com/actions/cache/compare/v3...v3.3.1
   v3.3.0
   What's Changed
   
   Bug: Permission is missing in cache delete example by https://github.com/kotokaze;>@​kotokaze in https://redirect.github.com/actions/cache/pull/1123;>actions/cache#1123
   
   
   
   ... (truncated)
   
   
   Changelog
   Sourced from https://github.com/actions/cache/blob/main/RELEASES.md;>actions/cache's 
changelog.
   
   Releases
   3.0.0
   
   Updated minimum runner version support from node 12 - node 16
   
   3.0.1
   
   Added support for caching from GHES 3.5.
   Fixed download issue for files  2GB during restore.
   
   3.0.2
   
   Added support for dynamic cache size cap on GHES.
   
   3.0.3
   
   Fixed avoiding empty cache save when no files are available for caching. 
(https://redirect.github.com/actions/cache/issues/624;>issue)
   
   3.0.4
   
   Fixed tar creation 

Re: [I] esp32s3/smp: Dual Core Scheduling Problem. [nuttx]

2024-01-21 Thread via GitHub


masayuki2009 commented on issue #11567:
URL: https://github.com/apache/nuttx/issues/11567#issuecomment-1902945782

   @acassis 
   > @masayuki2009 since you did many improvements over original SMP, maybe you 
can have some suggestion to help here.
   
   I think @tmedicci's comments are correct.
   However, we should clarify which version of the nuttx  @w2016561536 is using.
   Also, we should clarify the defconfig (i.e. esp32s3-devkit:smp) that 
@w2016561536 modified.
   


-- 
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] IEEE802.15.4 support for nRF52 and nRF53 [nuttx]

2024-01-21 Thread via GitHub


maxikrie commented on issue #11297:
URL: https://github.com/apache/nuttx/issues/11297#issuecomment-1902881139

   Ok, too bad. In the title and your original post you mention nRF52x chips. 
Did you also work on these or only mrf24j40 modules?


-- 
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] rv-virt/configs: avoid build errors with cmake or stock gcc 10.2 [nuttx]

2024-01-21 Thread via GitHub


yf13 commented on PR #11576:
URL: https://github.com/apache/nuttx/pull/11576#issuecomment-1902847191

   @anchao I am unfamiliar with the CI stuffs, but I will try to make 
`rv-virt/nsh(64)` work with CMake later.
   
   BTW, do you know why my local run of "tools/refresh.sh --silent" missed 
errors related to "NSH_SYMTAB_ARRAYNAME"? is the tool in CI different?
   


-- 
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] rv-virt/configs: avoid build errors with cmake or stock gcc 10.2 [nuttx]

2024-01-21 Thread via GitHub


anchao commented on PR #11576:
URL: https://github.com/apache/nuttx/pull/11576#issuecomment-1902845228

   
   > BTW, do you know why my local run of "tools/refresh.sh --silent" failed to 
catch errors related to "NSH_SYMTAB_ARRAYNAME"? is the "tools/refresh.sh" in CI 
different from the one on "master"?
   
   
   No difference AFAIK. CI also uses this script. You could try to run the 
issued board configuration separately.
   `./tools/refresh.sh --silent rv-virt/nsh`


-- 
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] rv-virt/configs: avoid build errors with cmake or stock gcc 10.2 [nuttx]

2024-01-21 Thread via GitHub


yf13 commented on PR #11576:
URL: https://github.com/apache/nuttx/pull/11576#issuecomment-1902839506

   @anchao I am unfamiliar with the CI stuffs, but I will try to make 
`rv-virt/nsh(64)` work with CMake+gcc-10.2 later.
   
   BTW, do you know why my local run of "tools/refresh.sh --silent" failed to 
catch errors related to "NSH_SYMTAB_ARRAYNAME"? is the "tools/refresh.sh" in CI 
different from the one on "master"?


-- 
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] rv-virt/configs: avoid build errors with cmake or stock gcc 10.2 [nuttx]

2024-01-21 Thread via GitHub


anchao commented on PR #11576:
URL: https://github.com/apache/nuttx/pull/11576#issuecomment-1902818261

   Maybe you can migrate the ci of rv-virt/nsh(64) to cmake? 
   https://github.com/apache/nuttx/blob/master/tools/ci/testlist/risc-v.dat


-- 
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/rv-virt: usage error with Ubuntu stock gcc-riscv64-unknown-elf toolchain [nuttx]

2024-01-21 Thread via GitHub


anchao commented on issue #11573:
URL: https://github.com/apache/nuttx/issues/11573#issuecomment-1902812814

   You need to update your toolchain to a newer version. These processor 
modules are only supported in gcc versions after 12:
   
https://github.com/apache/nuttx/blob/282feec9a3560304b1248e6df8063ea510909fab/tools/ci/cibuild.sh#L357-L361


-- 
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] esp32: Explicitly fail on boot-up for unsupported ESP32 versions [nuttx]

2024-01-21 Thread via GitHub


masayuki2009 commented on PR #11563:
URL: https://github.com/apache/nuttx/pull/11563#issuecomment-1902810086

   @tmedicci 
   
   Also, `esp32-devkitc:elf` does not work with qemu-esp-develop-8.1.3-20231206.
   
   ```
   
/home/ishikawa/opensource/QEMU/qemu-esp-develop-8.1.3-20231206/build/qemu-system-xtensa
 -nographic -M esp32 -smp 2 -drive 
file=./nuttx/nuttx.merged.bin,if=mtd,format=raw
   ==1776403==WARNING: ASan doesn't fully support makecontext/swapcontext 
functions and may produce false positives in some cases!
   Adding SPI flash device
   ets Jul 29 2019 12:21:46
   
   rst:0x1 (POWERON_RESET),boot:0x12 (SPI_FAST_FLASH_BOOT)
   configsip: 0, SPIWP:0xee
   clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
   mode:DIO, clock div:2
   load:0x3fff0030,len:6952
   load:0x40078000,len:15488
   load:0x40080400,len:4
   ho 8 tail 4 room 4
   load:0x40080404,len:3752
   entry 0x40080648
   I (1048) boot: ESP-IDF v5.1-dev-3972-g1559b6309f 2nd stage bootloader
   I (1059) boot: compile time Mar 15 2023 12:14:05
   I (1118) boot: chip revision: v0.0
   I (1141) boot.esp32: SPI Speed  : 40MHz
   I (1143) boot.esp32: SPI Mode   : DIO
   I (1144) boot.esp32: SPI Flash Size : 4MB
   I (1183) boot: Enabling RNG early entropy source...
   I (1243) boot: Partition Table:
   I (1244) boot: ## LabelUsage  Type ST Offset   Length
   I (1246) boot:  0 factory  factory app  00 00 0001 0010
   I (1263) boot: End of partition table
   I (1283) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=29890h 
(170128) map
   I (1548) esp_image: segment 1: paddr=000398b8 vaddr=3ffb15f0 size=00278h (   
632) load
   I (1590) esp_image: segment 2: paddr=00039b38 vaddr=4008 size=025a0h (  
9632) load
   I (1652) esp_image: segment 3: paddr=0003c0e0 vaddr= size=03f38h ( 
16184)
   I (1713) esp_image: segment 4: paddr=00040020 vaddr=400d0020 size=26b1ch 
(158492) map
   I (1964) boot: Loaded app from partition at offset 0x1
   I (1966) boot: Disabling RNG early entropy source...
   ERROR: NuttX supports ESP32 chip revision >= v3.0 (chip revision is v0.0)
   xtensa_user_panic: User Exception: EXCCAUSE=001c task:
   xtensa_user_panic: User Exception: EXCCAUSE=001c task:
   
   ```


-- 
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] esp32: Explicitly fail on boot-up for unsupported ESP32 versions [nuttx]

2024-01-21 Thread via GitHub


masayuki2009 commented on PR #11563:
URL: https://github.com/apache/nuttx/pull/11563#issuecomment-1902806943

   @tmedicci 
   
   I noticed that my esp32-devkitc board does not boot withi this PR.
   The esptool says that the board has `ESP32-D0WD (revision v1.0)`.
   Is it no longer supported?
   
   ```
   esptool.py v3.3.3
   Serial port 
/dev/serial/by-id/usb-Silicon_Labs_CP2102N_USB_to_UART_Bridge_Controller_18c6af91956ee911b0ad8811cd81828a-if00-port0
   Connecting
   Chip is ESP32-D0WD (revision v1.0)
   Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding 
Scheme None
   Crystal is 40MHz
   MAC: fc:f5:c4:45:a8:9c
   Uploading stub...
   Running stub...
   Stub running...
   Changing baud rate to 921600
   Changed.
   Configuring flash size...
   Auto-detected Flash size: 4MB
   Flash will be erased from 0x1000 to 0x7fff...
   Flash will be erased from 0x8000 to 0x8fff...
   Flash will be erased from 0x0001 to 0x00066fff...
   Compressed 26288 bytes to 16480...
   Writing at 0x1000... (50 %)
   Writing at 0x762a... (100 %)
   Wrote 26288 bytes (16480 compressed) at 0x1000 in 0.7 seconds (effective 
311.5 kbit/s)...
   Hash of data verified.
   Compressed 3072 bytes to 69...
   Writing at 0x8000... (100 %)
   Wrote 3072 bytes (69 compressed) at 0x8000 in 0.1 seconds (effective 
399.1 kbit/s)...
   Hash of data verified.
   Compressed 355168 bytes to 174997...
   Writing at 0x0001... (9 %)
   Writing at 0x00019c8d... (18 %)
   Writing at 0x0002823a... (27 %)
   Writing at 0x00035802... (36 %)
   Writing at 0x00040794... (45 %)
   Writing at 0x00045e1f... (54 %)
   Writing at 0x0004b80a... (63 %)
   Writing at 0x000511d8... (72 %)
   Writing at 0x00056bcc... (81 %)
   Writing at 0x0005c825... (90 %)
   Writing at 0x00062bf6... (100 %)
   Wrote 355168 bytes (174997 compressed) at 0x0001 in 3.1 seconds 
(effective 929.0 kbit/s)...
   Hash of data verified.
   
   Leaving...
   Hard resetting via RTS pin...
   
   $ picocom -q -b 115200  
/dev/serial/by-id/usb-Silicon_Labs_CP2102N_USB_to_UART_Bridge_Controller_18c6af91956ee911b0ad8811cd81828a-if00-port0
   ```
   
   


-- 
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] esp32s3/spi-dma: Fix spi dma transfer. [nuttx]

2024-01-21 Thread via GitHub


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

   I'll double-check it tomorrow. Please don't merge it yet.


-- 
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) 03/04: esp32: Explicitly fail on boot-up for unsupported ESP32 versions.

2024-01-21 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

commit 0ecc3aaad27ee3bb9ea862dee2a832f985a81385
Author: Tiago Medicci Serrano 
AuthorDate: Fri Dec 22 10:23:27 2023 -0300

esp32: Explicitly fail on boot-up for unsupported ESP32 versions.

ESP32 is supported on NuttX starting from chip revision 3.0. This,
however, didn't prevent the user from using older chip revisions,
which caused unexpected behaviors. This commit checks chip revision
before finishing booting NuttX.
---
 arch/xtensa/src/esp32/Make.defs |   2 +-
 arch/xtensa/src/esp32/esp32_efuse.c | 103 
 arch/xtensa/src/esp32/esp32_efuse.h |  30 +++
 arch/xtensa/src/esp32/esp32_start.c |  26 -
 4 files changed, 159 insertions(+), 2 deletions(-)

diff --git a/arch/xtensa/src/esp32/Make.defs b/arch/xtensa/src/esp32/Make.defs
index b71e77879e..2b4f908cfd 100644
--- a/arch/xtensa/src/esp32/Make.defs
+++ b/arch/xtensa/src/esp32/Make.defs
@@ -111,8 +111,8 @@ CHIP_CSRCS += esp32_himem.c
 CHIP_CSRCS += esp32_himem_chardev.c
 endif
 
-ifeq ($(CONFIG_ESP32_EFUSE),y)
 CHIP_CSRCS += esp32_efuse.c
+ifeq ($(CONFIG_ESP32_EFUSE),y)
 CHIP_CSRCS += esp32_efuse_table.c
 CHIP_CSRCS += esp32_efuse_lowerhalf.c
 endif
diff --git a/arch/xtensa/src/esp32/esp32_efuse.c 
b/arch/xtensa/src/esp32/esp32_efuse.c
index 12f2ddd514..df7518520c 100644
--- a/arch/xtensa/src/esp32/esp32_efuse.c
+++ b/arch/xtensa/src/esp32/esp32_efuse.c
@@ -68,6 +68,7 @@ uint32_t g_start_efuse_wrreg[4] =
  * Private Prototypes
  /
 
+#ifdef CONFIG_ESP32_EFUSE
 static int esp_efuse_set_timing(void);
 void esp_efuse_burn_efuses(void);
 static uint32_t get_mask(uint32_t bit_count, uint32_t shift);
@@ -90,11 +91,17 @@ static int esp_efuse_fill_buff(uint32_t num_reg, int 
bit_offset,
int *bits_counter);
 static void esp_efuse_write_reg(uint32_t blk, uint32_t num_reg,
 uint32_t value);
+#endif /* CONFIG_ESP32_EFUSE */
+
+static uint32_t efuse_hal_get_major_chip_version(void);
+static uint32_t efuse_hal_get_minor_chip_version(void);
 
 /
  * Private Functions
  /
 
+#ifdef CONFIG_ESP32_EFUSE
+
 static int esp_efuse_set_timing(void)
 {
   uint32_t apb_freq_mhz = esp_clk_apb_freq() / 100;
@@ -429,10 +436,105 @@ static void esp_efuse_write_reg(uint32_t blk, uint32_t 
num_reg,
   putreg32(reg_to_write, addr_wr_reg);
 }
 
+#endif /* CONFIG_ESP32_EFUSE */
+
+/
+ * Name: efuse_hal_get_major_chip_version
+ *
+ * Description:
+ *   Retrieves the major version of the chip. It reads the version
+ *   information from specific registers and combines them to determine
+ *   the major version.
+ *
+ * Input Parameters:
+ *   None
+ *
+ * Returned Value:
+ *   The major version of the chip as an unsigned 32-bit integer.
+ *
+ /
+
+IRAM_ATTR static uint32_t efuse_hal_get_major_chip_version(void)
+{
+  uint8_t eco_bit0;
+  uint8_t eco_bit1;
+  uint8_t eco_bit2;
+  uint32_t combine_value;
+  uint32_t chip_ver = 0;
+
+  eco_bit0 = REG_GET_FIELD(EFUSE_BLK0_RDATA3_REG, EFUSE_RD_CHIP_VER_REV1);
+  eco_bit1 = REG_GET_FIELD(EFUSE_BLK0_RDATA5_REG, EFUSE_RD_CHIP_VER_REV2);
+  eco_bit2 = (getreg32(APB_CTRL_DATE_REG) & 0x8000) >> 31;
+  combine_value = (eco_bit2 << 2) | (eco_bit1 << 1) | eco_bit0;
+
+  switch (combine_value)
+{
+  case 0:
+  chip_ver = 0;
+  break;
+  case 1:
+  chip_ver = 1;
+  break;
+  case 3:
+  chip_ver = 2;
+  break;
+  case 7:
+  chip_ver = 3;
+  break;
+  default:
+  chip_ver = 0;
+  break;
+}
+
+  return chip_ver;
+}
+
+/
+ * Name: efuse_hal_get_minor_chip_version
+ *
+ * Description:
+ *   Retrieves the minor version of the chip. It reads the version
+ *   information from a specific register.
+ *
+ * Input Parameters:
+ *   None
+ *
+ * Returned Value:
+ *   The minor version of the chip as an unsigned 32-bit integer.
+ *
+ /
+
+IRAM_ATTR static uint32_t efuse_hal_get_minor_chip_version(void)
+{
+  return REG_GET_FIELD(EFUSE_BLK0_RDATA5_REG, EFUSE_RD_WAFER_VERSION_MINOR);
+}
+
 /
  * Public Functions
  /
 

(nuttx) 01/04: esp32/hardware: Rename `efuse_reg.h` to `esp32_efuse.h`.

2024-01-21 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

commit 8752e6d863f04b0468920562a38878b1569ca274
Author: Tiago Medicci Serrano 
AuthorDate: Thu Dec 21 16:00:17 2023 -0300

esp32/hardware: Rename `efuse_reg.h` to `esp32_efuse.h`.
---
 arch/xtensa/src/esp32/esp32_efuse.c   | 2 +-
 arch/xtensa/src/esp32/esp32_psram.c   | 2 +-
 arch/xtensa/src/esp32/esp32_spiflash.c| 2 +-
 arch/xtensa/src/esp32/hardware/{efuse_reg.h => esp32_efuse.h} | 8 
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch/xtensa/src/esp32/esp32_efuse.c 
b/arch/xtensa/src/esp32/esp32_efuse.c
index 27815ac045..210097a175 100644
--- a/arch/xtensa/src/esp32/esp32_efuse.c
+++ b/arch/xtensa/src/esp32/esp32_efuse.c
@@ -32,7 +32,7 @@
 #include "xtensa.h"
 #include "esp32_efuse.h"
 #include "esp32_clockconfig.h"
-#include "hardware/efuse_reg.h"
+#include "hardware/esp32_efuse.h"
 
 /
  * Pre-processor Definitions
diff --git a/arch/xtensa/src/esp32/esp32_psram.c 
b/arch/xtensa/src/esp32/esp32_psram.c
index fb87e0ed8e..99e1504ca1 100644
--- a/arch/xtensa/src/esp32/esp32_psram.c
+++ b/arch/xtensa/src/esp32/esp32_psram.c
@@ -44,7 +44,7 @@
 
 #include "rom/esp32_efuse.h"
 #include "rom/esp32_spiflash.h"
-#include "hardware/efuse_reg.h"
+#include "hardware/esp32_efuse.h"
 
 #ifdef CONFIG_ESP32_SPIRAM
 
diff --git a/arch/xtensa/src/esp32/esp32_spiflash.c 
b/arch/xtensa/src/esp32/esp32_spiflash.c
index 241679f0ab..b9c709acb2 100644
--- a/arch/xtensa/src/esp32/esp32_spiflash.c
+++ b/arch/xtensa/src/esp32/esp32_spiflash.c
@@ -51,7 +51,7 @@
 #include "hardware/esp32_soc.h"
 #include "hardware/esp32_spi.h"
 #include "hardware/esp32_dport.h"
-#include "hardware/efuse_reg.h"
+#include "hardware/esp32_efuse.h"
 
 #include "esp32_spicache.h"
 #ifdef CONFIG_ESP32_SPIRAM
diff --git a/arch/xtensa/src/esp32/hardware/efuse_reg.h 
b/arch/xtensa/src/esp32/hardware/esp32_efuse.h
similarity index 99%
rename from arch/xtensa/src/esp32/hardware/efuse_reg.h
rename to arch/xtensa/src/esp32/hardware/esp32_efuse.h
index 8ec7b6ea21..0364ffb270 100644
--- a/arch/xtensa/src/esp32/hardware/efuse_reg.h
+++ b/arch/xtensa/src/esp32/hardware/esp32_efuse.h
@@ -1,5 +1,5 @@
 /
- * arch/xtensa/src/esp32/hardware/efuse_reg.h
+ * arch/xtensa/src/esp32/hardware/esp32_efuse.h
  *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -18,8 +18,8 @@
  *
  /
 
-#ifndef __ARCH_XTENSA_SRC_ESP32_HARDWARE_EFUSE_REG_H
-#define __ARCH_XTENSA_SRC_ESP32_HARDWARE_EFUSE_REG_H
+#ifndef __ARCH_XTENSA_SRC_ESP32_HARDWARE_ESP32_EFUSE_H
+#define __ARCH_XTENSA_SRC_ESP32_HARDWARE_ESP32_EFUSE_H
 
 /
  * Included Files
@@ -1824,4 +1824,4 @@
 #define EFUSE_DATE_V   0x
 #define EFUSE_DATE_S   0
 
-#endif /* __ARCH_XTENSA_SRC_ESP32_HARDWARE_EFUSE_REG_H */
+#endif /* __ARCH_XTENSA_SRC_ESP32_HARDWARE_ESP32_EFUSE_H */



(nuttx) branch master updated (5d40882d4c -> 282feec9a3)

2024-01-21 Thread xiaoxiang
This is an automated email from the ASF dual-hosted git repository.

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


from 5d40882d4c Documentation: update doc for etc romfs
 new 8752e6d863 esp32/hardware: Rename `efuse_reg.h` to `esp32_efuse.h`.
 new 2954551ef6 esp32/hardware/esp32_efuse.h: Update macros for registers.
 new 0ecc3aaad2 esp32: Explicitly fail on boot-up for unsupported ESP32 
versions.
 new 282feec9a3 esp32-devkitc/mcuboot_update_agent: Update defconfig

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 arch/xtensa/src/esp32/Make.defs|2 +-
 arch/xtensa/src/esp32/esp32_efuse.c|  106 +-
 arch/xtensa/src/esp32/esp32_efuse.h|   30 +
 arch/xtensa/src/esp32/esp32_efuse_table.c  |2 +-
 arch/xtensa/src/esp32/esp32_pm.c   |   15 +-
 arch/xtensa/src/esp32/esp32_psram.c|   23 +-
 arch/xtensa/src/esp32/esp32_rtc.c  |1 +
 arch/xtensa/src/esp32/esp32_spiflash.c |2 +-
 arch/xtensa/src/esp32/esp32_start.c|   26 +-
 arch/xtensa/src/esp32/hardware/efuse_reg.h | 1827 
 arch/xtensa/src/esp32/hardware/esp32_apb_ctrl.h|  422 +
 arch/xtensa/src/esp32/hardware/esp32_efuse.h   | 1503 
 arch/xtensa/src/esp32/hardware/esp32_efuse_defs.h  |   73 +
 arch/xtensa/src/esp32/hardware/esp32_soc.h |   90 +-
 .../configs/mcuboot_update_agent/defconfig |2 +-
 15 files changed, 2182 insertions(+), 1942 deletions(-)
 delete mode 100644 arch/xtensa/src/esp32/hardware/efuse_reg.h
 create mode 100644 arch/xtensa/src/esp32/hardware/esp32_apb_ctrl.h
 create mode 100644 arch/xtensa/src/esp32/hardware/esp32_efuse.h
 create mode 100644 arch/xtensa/src/esp32/hardware/esp32_efuse_defs.h



(nuttx) 04/04: esp32-devkitc/mcuboot_update_agent: Update defconfig

2024-01-21 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

commit 282feec9a3560304b1248e6df8063ea510909fab
Author: Tiago Medicci Serrano 
AuthorDate: Mon Jan 8 14:39:11 2024 -0300

esp32-devkitc/mcuboot_update_agent: Update defconfig

Espressif's MCUboot should be built from sources.
---
 .../xtensa/esp32/esp32-devkitc/configs/mcuboot_update_agent/defconfig   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/boards/xtensa/esp32/esp32-devkitc/configs/mcuboot_update_agent/defconfig 
b/boards/xtensa/esp32/esp32-devkitc/configs/mcuboot_update_agent/defconfig
index 7e4a46965b..6c82428d8e 100644
--- a/boards/xtensa/esp32/esp32-devkitc/configs/mcuboot_update_agent/defconfig
+++ b/boards/xtensa/esp32/esp32-devkitc/configs/mcuboot_update_agent/defconfig
@@ -27,6 +27,7 @@ CONFIG_DEBUG_SYMBOLS=y
 CONFIG_DRIVERS_IEEE80211=y
 CONFIG_DRIVERS_WIRELESS=y
 CONFIG_ESP32_APP_FORMAT_MCUBOOT=y
+CONFIG_ESP32_BOOTLOADER_BUILD_FROM_SOURCE=y
 CONFIG_ESP32_SPIFLASH=y
 CONFIG_ESP32_UART0=y
 CONFIG_ESP32_WIFI=y
@@ -35,7 +36,6 @@ CONFIG_EXAMPLES_MCUBOOT_UPDATE_AGENT_DL_BUFFER_SIZE=4096
 CONFIG_FS_PROCFS=y
 CONFIG_HAVE_CXX=y
 CONFIG_HAVE_CXXINITIALIZE=y
-CONFIG_HOST_MACOS=y
 CONFIG_IDLETHREAD_STACKSIZE=3072
 CONFIG_INIT_ENTRYPOINT="nsh_main"
 CONFIG_INTELHEX_BINARY=y



Re: [PR] esp32: Explicitly fail on boot-up for unsupported ESP32 versions [nuttx]

2024-01-21 Thread via GitHub


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


-- 
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] Bring up changes from nuttx/pci branch [nuttx]

2024-01-21 Thread via GitHub


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

   Yes, it will upstream once it's mature.


-- 
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-apps) branch master updated: Zig: revise apps build support

2024-01-21 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-apps.git


The following commit(s) were added to refs/heads/master by this push:
 new 14d405915 Zig: revise apps build support
14d405915 is described below

commit 14d4059159413f8b773bedbbe84612a195744014
Author: Yanfeng Liu 
AuthorDate: Sat Jan 20 16:27:03 2024 +0800

Zig: revise apps build support

This requires nuttx/pull/11548 to work.

- Zig apps can use normal entrance "main()" now as we
- added RENAMEMAIN for none BUILD_MODULE case.
- enabled Zig program building in BUILD_MODULE case.

Note the Zig main source need to have "fn main(" pattern as
renaming is implemented via `sed`.

Signed-off-by: Yanfeng Liu 
---
 Application.mk   | 23 ++-
 examples/hello_zig/Makefile  |  2 +-
 examples/hello_zig/hello_zig.zig | 40 
 3 files changed, 59 insertions(+), 6 deletions(-)

diff --git a/Application.mk b/Application.mk
index 923407800..b482ea347 100644
--- a/Application.mk
+++ b/Application.mk
@@ -94,7 +94,7 @@ ifneq ($(BUILD_MODULE),y)
 endif
 
 ifneq ($(strip $(PROGNAME)),)
-  PROGOBJ := $(MAINCOBJ) $(MAINCXXOBJ) $(MAINRUSTOBJ)
+  PROGOBJ := $(MAINCOBJ) $(MAINCXXOBJ) $(MAINRUSTOBJ) $(MAINZIGOBJ)
   PROGLIST := $(addprefix $(BINDIR)$(DELIM),$(PROGNAME))
   REGLIST := $(addprefix $(BUILTIN_REGISTRY)$(DELIM),$(addsuffix 
.bdat,$(PROGNAME)))
 
@@ -168,9 +168,9 @@ define ELFCOMPILERUST
$(ECHO_END)
 endef
 
+# Remove target suffix here since zig compiler add .o automatically
 define ELFCOMPILEZIG
$(ECHO_BEGIN)"ZIG: $1 "
-   # Remove target suffix here since zig compiler add .o automatically
$(Q) $(ZIG) build-obj $(ZIGELFFLAGS) $($(strip $1)_ZIGELFFLAGS) --name 
$(basename $2) $1
$(ECHO_END)
 endef
@@ -181,6 +181,13 @@ define ELFLD
$(ECHO_END)
 endef
 
+# rename "main()" in $1 to "xxx_main()" and save to $2
+define RENAMEMAIN
+   $(ECHO_BEGIN)"Rename main() in $1 and save to $2"
+   $(Q) ${shell cat $1 | sed -e "s/fn[ ]\+main/fn $(addsuffix 
_main,$(PROGNAME_$@))/" > $2}
+   $(ECHO_END)
+endef
+
 $(RAOBJS): %.s$(SUFFIX)$(OBJEXT): %.s
$(if $(and $(CONFIG_BUILD_LOADABLE),$(AELFFLAGS)), \
$(call ELFASSEMBLE, $<, $@), $(call ASSEMBLE, $<, $@))
@@ -235,9 +242,13 @@ $(MAINCOBJ): %.c$(SUFFIX)$(OBJEXT): %.c
$(if $(and $(CONFIG_BUILD_LOADABLE),$(CELFFLAGS)), \
$(call ELFCOMPILE, $<, $@), $(call COMPILE, $<, $@))
 
-$(PROGLIST): $(MAINCOBJ) $(MAINCXXOBJ) $(MAINRUSTOBJ)
+$(MAINZIGOBJ): %$(ZIGEXT)$(SUFFIX)$(OBJEXT): %$(ZIGEXT)
+   $(if $(and $(CONFIG_BUILD_LOADABLE),$(CELFFLAGS)), \
+   $(call ELFCOMPILEZIG, $<, $@), $(call COMPILEZIG, $<, $@))
+
+$(PROGLIST): $(MAINCOBJ) $(MAINCXXOBJ) $(MAINRUSTOBJ) $(MAINZIGOBJ)
$(Q) mkdir -p $(BINDIR)
-   $(call ELFLD,$(PROGOBJ_$@),$(call CONVERT_PATH,$@))
+   $(call ELFLD, $(PROGOBJ_$@), $(call CONVERT_PATH,$@))
$(Q) chmod +x $@
 ifneq ($(CONFIG_DEBUG_SYMBOLS),y)
$(Q) $(STRIP) $@
@@ -265,8 +276,10 @@ $(MAINRUSTOBJ): %$(RUSTEXT)$(SUFFIX)$(OBJEXT): %$(RUSTEXT)
$(call ELFCOMPILERUST, $<, $@), $(call COMPILERUST, $<, $@))
 
 $(MAINZIGOBJ): %$(ZIGEXT)$(SUFFIX)$(OBJEXT): %$(ZIGEXT)
+   $(Q) $(call RENAMEMAIN, $<, $(basename $<)_tmp.zig)
$(if $(and $(CONFIG_BUILD_LOADABLE),$(CELFFLAGS)), \
-   $(call ELFCOMPILEZIG, $<, $@), $(call COMPILEZIG, $<, $@))
+   $(call ELFCOMPILEZIG, $(basename $<)_tmp.zig, $@), 
$(call COMPILEZIG, $(basename $<)_tmp.zig, $@))
+   $(Q) rm -f $(basename $<)_tmp.zig
 
 install::
@:
diff --git a/examples/hello_zig/Makefile b/examples/hello_zig/Makefile
index a1657034b..5413dc580 100644
--- a/examples/hello_zig/Makefile
+++ b/examples/hello_zig/Makefile
@@ -22,7 +22,7 @@ include $(APPDIR)/Make.defs
 
 # Hello, Zig! Example
 
-MAINSRC = hello_zig_main.zig
+MAINSRC = hello_zig.zig
 
 # Hello, Zig! built-in application info
 
diff --git a/examples/hello_zig/hello_zig.zig b/examples/hello_zig/hello_zig.zig
new file mode 100644
index 0..6d7f271eb
--- /dev/null
+++ b/examples/hello_zig/hello_zig.zig
@@ -0,0 +1,40 @@
+//***
+// examples/hello_zig/hello_zig.zig
+//
+// 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 

Re: [PR] Zig apps: add kernel mode build support [nuttx-apps]

2024-01-21 Thread via GitHub


xiaoxiang781216 merged PR #2260:
URL: https://github.com/apache/nuttx-apps/pull/2260


-- 
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] Zig apps: add kernel mode build support [nuttx-apps]

2024-01-21 Thread via GitHub


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

   > @xiaoxiang781216 please check the latest update, which contains a newly 
added "RENAMEMAIN" function to allow Zig apps to use normal "main()" entrance 
even for flat build.
   
   It's bad that zig doesn't support the preprocess step.


-- 
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] esp32s3/spi-dma: Fix spi dma transfer. [nuttx]

2024-01-21 Thread via GitHub


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


##
arch/xtensa/src/esp32s3/esp32s3_spi.c:
##
@@ -979,6 +988,14 @@ static void esp32s3_spi_dma_exchange(struct 
esp32s3_spi_priv_s *priv,
 static uint32_t esp32s3_spi_poll_send(struct esp32s3_spi_priv_s *priv,
   uint32_t wd)
 {
+#ifdef CONFIG_ESP32S3_SPI_DMA
+  esp32s3_spi_clr_regbits(SPI_DMA_CONF_REG(priv->config->id),
+  SPI_DMA_TX_ENA_M);
+
+  esp32s3_spi_clr_regbits(SPI_DMA_CONF_REG(priv->config->id),
+  SPI_DMA_RX_ENA_M);

Review Comment:
   ```suggestion
 SPI_DMA_RX_ENA_M);
   ```



##
arch/xtensa/src/esp32s3/esp32s3_spi.c:
##
@@ -979,6 +988,14 @@ static void esp32s3_spi_dma_exchange(struct 
esp32s3_spi_priv_s *priv,
 static uint32_t esp32s3_spi_poll_send(struct esp32s3_spi_priv_s *priv,
   uint32_t wd)
 {
+#ifdef CONFIG_ESP32S3_SPI_DMA
+  esp32s3_spi_clr_regbits(SPI_DMA_CONF_REG(priv->config->id),
+  SPI_DMA_TX_ENA_M);

Review Comment:
   ```suggestion
 SPI_DMA_TX_ENA_M);
   ```



##
arch/xtensa/src/esp32s3/esp32s3_spi.c:
##
@@ -1059,6 +1076,14 @@ static void esp32s3_spi_poll_exchange(struct 
esp32s3_spi_priv_s *priv,
   void *rxbuffer,
   size_t nwords)
 {
+#ifdef CONFIG_ESP32S3_SPI_DMA
+  esp32s3_spi_clr_regbits(SPI_DMA_CONF_REG(priv->config->id),
+  SPI_DMA_TX_ENA_M);

Review Comment:
   ditto



##
arch/xtensa/src/esp32s3/esp32s3_spi.c:
##
@@ -1059,6 +1076,14 @@ static void esp32s3_spi_poll_exchange(struct 
esp32s3_spi_priv_s *priv,
   void *rxbuffer,
   size_t nwords)
 {
+#ifdef CONFIG_ESP32S3_SPI_DMA
+  esp32s3_spi_clr_regbits(SPI_DMA_CONF_REG(priv->config->id),
+  SPI_DMA_TX_ENA_M);
+
+  esp32s3_spi_clr_regbits(SPI_DMA_CONF_REG(priv->config->id),
+  SPI_DMA_RX_ENA_M);

Review Comment:
   ditto



-- 
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 (2ff700de92 -> 5d40882d4c)

2024-01-21 Thread xiaoxiang
This is an automated email from the ASF dual-hosted git repository.

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


from 2ff700de92 Documentation: migrate x86_64 readme to rst
 add 5d40882d4c Documentation: update doc for etc romfs

No new revisions were added by this update.

Summary of changes:
 Documentation/applications/nsh/config.rst  |  32 +---
 Documentation/applications/nsh/installation.rst| 174 
 Documentation/applications/nsh/nsh.rst | 120 --
 Documentation/guides/etcromfs.rst  | 177 +
 Documentation/guides/index.rst |   1 +
 Documentation/guides/pysimcoder.rst|   2 +-
 .../arm/sama5/boards/sama5d4-ek/README.txt |  10 +-
 .../renesas/rx65n/boards/rx65n-grrose/ROMFS.txt|   2 +-
 .../renesas/rx65n/boards/rx65n-rsk2mb/ROMFS.txt|   2 +-
 .../risc-v/esp32c3/boards/esp32c3-devkit/ROMFS.txt |   2 +-
 .../platforms/sim/sim/boards/sim/README.txt|   2 +-
 .../platforms/sim/sim/boards/sim/index.rst |   2 +-
 12 files changed, 190 insertions(+), 336 deletions(-)
 create mode 100644 Documentation/guides/etcromfs.rst



Re: [PR] Documentation: update doc for etc romfs [nuttx]

2024-01-21 Thread via GitHub


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


-- 
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: Documentation: migrate x86_64 readme to rst

2024-01-21 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 2ff700de92 Documentation: migrate x86_64 readme to rst
2ff700de92 is described below

commit 2ff700de921d5bb3bb29e3d80087454aa981b099
Author: raiden00pl 
AuthorDate: Thu Dec 21 19:15:47 2023 +0100

Documentation: migrate x86_64 readme to rst
---
 .../x86_64/qemu/boards/qemu-intel64/README.txt | 184 -
 .../x86_64/qemu/boards/qemu-intel64/index.rst  | 163 +-
 2 files changed, 161 insertions(+), 186 deletions(-)

diff --git a/Documentation/platforms/x86_64/qemu/boards/qemu-intel64/README.txt 
b/Documentation/platforms/x86_64/qemu/boards/qemu-intel64/README.txt
deleted file mode 100644
index b76337c675..00
--- a/Documentation/platforms/x86_64/qemu/boards/qemu-intel64/README.txt
+++ /dev/null
@@ -1,184 +0,0 @@
-README
-==
-
-This README file describes the contents of the build configurations available
-for the NuttX QEMU x86_64 port.
-
-Contents
-
-
-  * Creating a bootable disk
-  * QEMU/KVM
-- Running QEMU/KVM
-  * Bochs
-- Building Bochs
-- Running Bochs
-  * Real machine
-  * Toolchain
-  * FAQ
-  * Configurations
-- ostest
-
-Creating a bootable disk
-
-
-This build supports multiboot2, which means that usual multiboot2 bootlaoders, 
e.g. grub can be used.
-To create a bootable disk with grub2, create a directory named `iso` with grub 
configuration file and the compiled nuttx.elf.
-
-# Directory and file hierarchy
-```
- - iso/
-   - boot/
- - grub/
-   - grub.cfg
- - nuttx.elf
-```
-
-# grub.cfg
-
-The grub.cfg should contain the boot entry of NuttX.
-```
-set timeout=0
-set default=0
-menuentry "kernel" {
-  multiboot2 /boot/nuttx.elf
-}
-```
-
-# Making the disk
-
-Use the following command to create the disk.
-P.S. In some distros, `grub-mkrescue` is called `grub2-mkrescue`
-```
-grub-mkrescue -o boot.iso iso
-```
-
-QEMU/KVM
-
-
-QEMU is a generic and open source machine emulator and virtual machine.  Here 
are
-some links (which will probably be mostly outdated by the time your read this):
-
-  Home Page: http://wiki.qemu.org/Main_Page
-  Downloads: http://wiki.qemu.org/Download
-  Documentation: http://wiki.qemu.org/Manual
-
-KVM is the Linux kernel hypervisor.
-It supports creations of virtual machines in Linux systems.
-It is usually coupled with Qemu as its I/O supporting layer.
-
-The qemu can be build from source or downloaded from distro repositories.
-However, a modern CPU and KVM support are mandatory because the X2APIC is not 
available
-in pure emulator mode.
-This mean using this build with qemu in windows or old x86 machine can be 
frustrating.
-In such case, looks the next section and use bochs emulator instead.
-
-Running QEMU
-
-
-  In the top-level NuttX directory:
-
-qemu-system-x86_64 -cpu host -enable-kvm -m 2G -cdrom boot.iso -nographic 
-serial mon:stdio
-
-  This multiplex the qemu console and COM1 to your console.
-  Use control-a 1 and 2 to switch between.
-  Use control-a x to terminate the emulation.
-
-  P.S. Make sure that you CPU supports the mandatory features. Look at Real 
machine
-  section for more information.
-
-Bochs
-=
-
-Bochs is also a generic and open source machine emulator and virtualizer.
-It does very comprehensive emulation of x86 platform, even the state-of-art 
processors.
-Here are some links (which will probably be mostly outdated by the time your 
read this):
-
-  Home Page: http://bochs.sourceforge.net
-
-The bochs can be build from source.
-Unlike qemu, it does not rely on KVM to support modern hardware features, 
therefore it can
-also be used under Windows.
-When building bochs, remember to enable x86-64 support with "--enable-x86-64".
-If you also want support for SIMD instructions, enable them with "--enable-avx 
--enable-evex".
-
-Running Bochs
-
-
-  First edit/check the .bochsrc
-  You can create one in the top-level NuttX directory or bochs will use the 
one in your $HOME.
-  Remember to change the CPU model to one with mandatory features and enable 
the COM port.
-
-  * Find and edit (You might adjust the IPS as you machine perform):
-  ```
-  cpu: model=broadwell_ult, count=1, ips=5000, reset_on_triple_fault=0, 
ignore_bad_msrs=0, msrs="msrs.def"  
  a
-  ata0-master: type=cdrom, path="", status=inserted
-
-  ```
-
-  * Add:
-  ```
-  com1: enabled=1, mode=file, dev=com1.out
-  ```
-
-  In the top-level NuttX directory:
-
-  ```
-  bochs
-  ```
-
-  The emulator will drop into debugger mode.
-  Enter 'c' to start the emulation.
-  COM port output will be in the com1.out file.
-
-Real machine
-
-
-This port should work on real x86-64 machine 

Re: [PR] Documentation: migrate x86_64 readme to rst [nuttx]

2024-01-21 Thread via GitHub


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


-- 
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] rv-virt/configs: avoid build errors with cmake or stock gcc 10.2 [nuttx]

2024-01-21 Thread via GitHub


yf13 commented on PR #11576:
URL: https://github.com/apache/nuttx/pull/11576#issuecomment-1902639407

   @pkarashchenko 
   
   Yes I mean the `gcc-riscv64-unknown-elf` toolchain on Ubuntu  Jammy, which 
is easy to install via `apt`. actually I checked both Ubuntu toolchain and the 
xpack toolchain 13.2, they both are fine when using makefile system during my 
check. 
   
   So this PR is not to tight to a particular toolchain, it is just to enable 
more.
   


-- 
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] rv-virt/configs: avoid build errors with cmake or stock gcc 10.2 [nuttx]

2024-01-21 Thread via GitHub


yf13 commented on PR #11576:
URL: https://github.com/apache/nuttx/pull/11576#issuecomment-1902638817

   @pkarashchenko 
   
   Yes I mean the `gcc-riscv64-unknown-elf` toolchain on Ubuntu  Jammy, which 
is easy to install via `apt`. actually I checked both that toolchain and the 
xpack toolchain 13.2, they both working fine with makefile system during my 
check. So this PR is not to tight to that particular version, it actually 
enables more toolchains lacking libm.
   


-- 
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] rv-virt/configs: avoid build errors with cmake or stock gcc 10.2 [nuttx]

2024-01-21 Thread via GitHub


pkarashchenko commented on PR #11576:
URL: https://github.com/apache/nuttx/pull/11576#issuecomment-1902624022

   I'm not sure about the libm change. I think by "stock" you mean the Ubuntu 
package of some version? I'm really not sure that we should be tight to the 
particular version of a toolchain.


-- 
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] rv-virt/configs: avoid build errors [nuttx]

2024-01-21 Thread via GitHub


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

   
   ## Summary
   
   Revised rv-virt/nsh and rv-virt/nsh64 defconfigs for  following changes:
   
   - disable NSH_SYMTAB to avoid build errors with cmake system.
   - enable LIBM to avoid build errors with stock `gcc-riscv64-unknown-elf` 
toolchain and makefile system.
   - use HELLO=y for easy use within qemu console.
   
   ## Impact
   
   rv-virt/nsh and rv-virt/nsh64 
   
   ## Testing
   
   checked `rv-virt/nsh` and `rv-virt/nsh64` on Linux
   
   


-- 
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] esp32s3/spi-dma: Fix spi dma transfer. [nuttx]

2024-01-21 Thread via GitHub


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

   ## Summary
   Fix esp32s3 spi dma transfer.
   
   ## Impact
   
   ## 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-unsubscr...@nuttx.apache.org

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



Re: [PR] Bring up changes from nuttx/pci branch [nuttx]

2024-01-21 Thread via GitHub


raiden00pl commented on PR #11570:
URL: https://github.com/apache/nuttx/pull/11570#issuecomment-1902557940

   > Looks like my changes may have gotten dropped? I made quite a few fixes 
around the PCI stuff to the point were I was able to use it on my laptop and 
enumerate real devices. Let me see if I can find this.
   
   THB, this is the first time I see your 
https://github.com/btashton/incubator-nuttx/commits/pci-btashton/ branch and 
these commits where not included on nuttx/pic branch. I'll be happy to include 
these changes.
   
   > @raiden00pl we are developing a pcie driver framework, which may better 
than this one.
   
   @xiaoxiang781216 do you have any plans to add this to the upstream in the 
near future?


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