You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ce...@apache.org on 2024/10/25 14:13:36 UTC

(nuttx-apps) branch releases/12.7 updated (42f2b444a -> a2e76247f)

This is an automated email from the ASF dual-hosted git repository.

cederom pushed a change to branch releases/12.7
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git


    from 42f2b444a Revert "lvgl: upgrade to release/v9.2.1"
     new a7011eb6f examples: fix noteprint compile error
     new 0ed4ca176 noteprintf: fix compile warnings
     new 833b36cdd system/gcov: supports generating device-side code coverage
     new 2b11886c9 system: adjust gcov configuration name
     new 9aedfdd4f gcov.c: deal compile warming
     new 82fb1a451 nsh_syscmds.c: upadate rpmsg ping help
     new bbba2448c nsh_syscmds/rpmsg: include <nuttx/rpmsg/rpmsg.h> to fix compile error
     new 734baae5a test case update follow the regualtor framework
     new 8e938957c gpio:add example for wakeup gpio type
     new 893ac88f9 batterydump:move to system dir
     new 789371262 drivertest:add include file depended by cmocka
     new e0989d950 pmconfig:fix coverity scan issue which is unsigned_compare
     new a2e76247f resetcause:restore to factory, factory to factory_inquiry

The 13 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:
 examples/gpio/gpio_main.c                          | 12 ++++++
 examples/noteprintf/noteprintf_main.c              | 45 ++++++++--------------
 nshlib/nsh_syscmds.c                               | 18 +++++----
 {testing => system}/batterydump/Kconfig            | 12 +++---
 .../libmad => system/batterydump}/Make.defs        |  6 +--
 {testing => system}/batterydump/Makefile           | 10 ++---
 {testing => system}/batterydump/batterydump.c      |  2 +-
 system/gcov/Kconfig                                |  2 +-
 system/gcov/gcov.c                                 | 36 +++++++++++++++--
 testing/batterydump/Make.defs                      | 23 -----------
 testing/drivertest/drivertest_pm_runtime.c         |  4 +-
 testing/drivertest/drivertest_regulator.c          | 12 +++---
 12 files changed, 98 insertions(+), 84 deletions(-)
 rename {testing => system}/batterydump/Kconfig (70%)
 copy {audioutils/libmad => system/batterydump}/Make.defs (88%)
 rename {testing => system}/batterydump/Makefile (81%)
 rename {testing => system}/batterydump/batterydump.c (99%)
 delete mode 100644 testing/batterydump/Make.defs


(nuttx-apps) 04/13: system: adjust gcov configuration name

Posted by ce...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

cederom pushed a commit to branch releases/12.7
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git

commit 2b11886c9a8692a95cd8ee5ed1ca07d76d8d9b82
Author: yinshengkai <yi...@xiaomi.com>
AuthorDate: Mon Apr 8 15:42:18 2024 +0800

    system: adjust gcov configuration name
    
    Signed-off-by: yinshengkai <yi...@xiaomi.com>
---
 system/gcov/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/system/gcov/Kconfig b/system/gcov/Kconfig
index 6c951954d..5eca78114 100644
--- a/system/gcov/Kconfig
+++ b/system/gcov/Kconfig
@@ -5,7 +5,7 @@
 
 config SYSTEM_GCOV
 	tristate "gcov tool"
-	depends on ARCH_COVERAGE
+	depends on SCHED_GCOV
 	---help---
 		Enable support for the 'gcov' command.
 


(nuttx-apps) 13/13: resetcause:restore to factory, factory to factory_inquiry

Posted by ce...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

cederom pushed a commit to branch releases/12.7
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git

commit a2e76247fbddfbe761061e97c1f177227ce88020
Author: wanggang26 <wa...@xiaomi.com>
AuthorDate: Thu Nov 9 22:44:07 2023 +0800

    resetcause:restore to factory, factory to factory_inquiry
    
    Signed-off-by: wanggang26 <wa...@xiaomi.com>
---
 nshlib/nsh_syscmds.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/nshlib/nsh_syscmds.c b/nshlib/nsh_syscmds.c
index dc31238ac..7c7156aad 100644
--- a/nshlib/nsh_syscmds.c
+++ b/nshlib/nsh_syscmds.c
@@ -119,6 +119,7 @@ static FAR const char * const g_resetflag[] =
   "panic",
   "bootloader",
   "recovery",
+  "restore",
   "factory",
   NULL
 };


(nuttx-apps) 09/13: gpio:add example for wakeup gpio type

Posted by ce...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

cederom pushed a commit to branch releases/12.7
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git

commit 8e938957c2d66a35274d0c8a800b595c02b181af
Author: dulibo1 <du...@xiaomi.com>
AuthorDate: Wed Nov 8 11:14:54 2023 +0800

    gpio:add example for wakeup gpio type
    
    Signed-off-by: dulibo1 <du...@xiaomi.com>
---
 examples/gpio/gpio_main.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/examples/gpio/gpio_main.c b/examples/gpio/gpio_main.c
index 9793fbba4..c097a265f 100644
--- a/examples/gpio/gpio_main.c
+++ b/examples/gpio/gpio_main.c
@@ -67,6 +67,12 @@ static void show_usage(FAR const char *progname)
   fprintf(stderr, "\t 8: GPIO_INTERRUPT_RISING_PIN\n");
   fprintf(stderr, "\t 9: GPIO_INTERRUPT_FALLING_PIN\n");
   fprintf(stderr, "\t10: GPIO_INTERRUPT_BOTH_PIN\n");
+  fprintf(stderr, "\t11: GPIO_INTERRUPT_PIN_WAKEUP\n");
+  fprintf(stderr, "\t12: GPIO_INTERRUPT_HIGH_PIN_WAKEUP\n");
+  fprintf(stderr, "\t13: GPIO_INTERRUPT_LOW_PIN_WAKEUP\n");
+  fprintf(stderr, "\t14: GPIO_INTERRUPT_RISING_PIN_WAKEUP\n");
+  fprintf(stderr, "\t15: GPIO_INTERRUPT_FALLING_PIN_WAKEUP\n");
+  fprintf(stderr, "\t16: GPIO_INTERRUPT_BOTH_PIN_WAKEUP\n");
 }
 
 /****************************************************************************
@@ -308,6 +314,12 @@ int main(int argc, FAR char *argv[])
       case GPIO_INTERRUPT_RISING_PIN:
       case GPIO_INTERRUPT_FALLING_PIN:
       case GPIO_INTERRUPT_BOTH_PIN:
+      case GPIO_INTERRUPT_PIN_WAKEUP:
+      case GPIO_INTERRUPT_HIGH_PIN_WAKEUP:
+      case GPIO_INTERRUPT_LOW_PIN_WAKEUP:
+      case GPIO_INTERRUPT_RISING_PIN_WAKEUP:
+      case GPIO_INTERRUPT_FALLING_PIN_WAKEUP:
+      case GPIO_INTERRUPT_BOTH_PIN_WAKEUP:
         {
           printf("  Interrupt pin: Value=%u\n", invalue);
 


(nuttx-apps) 06/13: nsh_syscmds.c: upadate rpmsg ping help

Posted by ce...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

cederom pushed a commit to branch releases/12.7
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git

commit 82fb1a4511feccb38b66fd390a6d0e6b8c5c5f04
Author: Yongrong Wang <wa...@xiaomi.com>
AuthorDate: Mon Jul 22 20:02:24 2024 +0800

    nsh_syscmds.c: upadate rpmsg ping help
    
    1. struct rpmsg_ping_s ack change to cmd;
    2. Update the help descrption based on the new cmd
       meaning;
    
    Signed-off-by: Yongrong Wang <wa...@xiaomi.com>
    Signed-off-by: Bowen Wang <wa...@xiaomi.com>
---
 nshlib/nsh_syscmds.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/nshlib/nsh_syscmds.c b/nshlib/nsh_syscmds.c
index ac14c79ce..9cd6bead8 100644
--- a/nshlib/nsh_syscmds.c
+++ b/nshlib/nsh_syscmds.c
@@ -581,7 +581,7 @@ static int cmd_rpmsg_once(FAR struct nsh_vtbl_s *vtbl,
 
       ping.times = atoi(argv[3]);
       ping.len   = atoi(argv[4]);
-      ping.ack   = atoi(argv[5]);
+      ping.cmd   = atoi(argv[5]);
       ping.sleep = atoi(argv[6]);
 
       cmd = RPMSGIOC_PING;
@@ -640,15 +640,17 @@ static int cmd_rpmsg_help(FAR struct nsh_vtbl_s *vtbl, int argc,
 {
   nsh_output(vtbl, "%s <panic|dump> <path>\n", argv[0]);
 #ifdef CONFIG_RPMSG_PING
-  nsh_output(vtbl, "%s ping <path> <times> <length> <ack> "
+  nsh_output(vtbl, "%s ping <path> <times> <length> <cmd> "
              "<period(ms)>\n\n", argv[0]);
   nsh_output(vtbl, "<times>      Number of ping operations.\n");
   nsh_output(vtbl, "<length>     The length of each ping packet.\n");
-  nsh_output(vtbl, "<ack>        Whether the peer acknowlege or "
+  nsh_output(vtbl, "<cmd>        Whether the peer acknowlege or "
              "check data.\n");
-  nsh_output(vtbl, "             0 - No acknowledge and check.\n");
-  nsh_output(vtbl, "             1 - Acknowledge, no data check.\n");
-  nsh_output(vtbl, "             2 - Acknowledge and data check.\n");
+  nsh_output(vtbl, "             Bit0 - Request need ack or not.\n");
+  nsh_output(vtbl, "             Bit1 - Check the data or not.\n");
+  nsh_output(vtbl, "             Bit2 - Random length or not.\n");
+  nsh_output(vtbl, "             Bit4~7 - Request or response or other"
+                                          "command for future use.\n");
   nsh_output(vtbl, "<sleep(ms)>  Sleep interval between two operations.\n");
 #endif
   nsh_output(vtbl, "<path>       Rpmsg device path.\n\n");


(nuttx-apps) 02/13: noteprintf: fix compile warnings

Posted by ce...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

cederom pushed a commit to branch releases/12.7
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git

commit 0ed4ca1767f5bbf723a2b2fc9e25f39353b960a0
Author: Neo Xu <ne...@gmail.com>
AuthorDate: Fri Oct 11 15:15:20 2024 +0800

    noteprintf: fix compile warnings
    
    noteprintf_main.c:52:7: warning: unused variable 'binary' [-Wunused-variable]
       52 |     } binary =
    
    Fix typo of sched.
    
    Signed-off-by: Neo Xu <ne...@gmail.com>
---
 examples/noteprintf/noteprintf_main.c | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

diff --git a/examples/noteprintf/noteprintf_main.c b/examples/noteprintf/noteprintf_main.c
index 5a9df5d4a..6e1e73a9b 100644
--- a/examples/noteprintf/noteprintf_main.c
+++ b/examples/noteprintf/noteprintf_main.c
@@ -45,17 +45,7 @@
 
 int main(int argc, FAR char *argv[])
 {
-  struct binary
-    {
-      uint8_t val1;
-      uint8_t val2;
-    } binary =
-      {
-        .val1        = 0x01,
-        .val2        = 0x02
-      };
-
-  char *str      = "shced note test";
+  char *str      = "sched note test";
   int count      = 0;
   char c         = 1;
   short s        = 2;
@@ -80,7 +70,7 @@ int main(int argc, FAR char *argv[])
   while (1)
     {
       sched_note_printf(NOTE_TAG_ALWAYS,
-                        "shced note test count = %d.", count++);
+                        "sched note test count = %d.", count++);
       sched_note_mark(NOTE_TAG_ALWAYS, str);
       sched_note_printf(NOTE_TAG_ALWAYS, "%hhd", c);
       sched_note_printf(NOTE_TAG_ALWAYS, "%hd", s);


(nuttx-apps) 03/13: system/gcov: supports generating device-side code coverage

Posted by ce...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

cederom pushed a commit to branch releases/12.7
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git

commit 833b36cddc756b4de135356c1aa7ba3ffdaa01b9
Author: yinshengkai <yi...@xiaomi.com>
AuthorDate: Wed Mar 27 21:24:24 2024 +0800

    system/gcov: supports generating device-side code coverage
    
    Signed-off-by: yinshengkai <yi...@xiaomi.com>
---
 system/gcov/gcov.c | 36 ++++++++++++++++++++++++++++++++----
 1 file changed, 32 insertions(+), 4 deletions(-)

diff --git a/system/gcov/gcov.c b/system/gcov/gcov.c
index bf4dbf549..9506cadb1 100644
--- a/system/gcov/gcov.c
+++ b/system/gcov/gcov.c
@@ -23,6 +23,7 @@
  ****************************************************************************/
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <unistd.h>
 
 /****************************************************************************
@@ -35,11 +36,13 @@
 
 static void show_usage(FAR const char *progname)
 {
-  printf("\nUsage: %s [-d] [-r] [-h]\n", progname);
+  printf("\nUsage: %s [-d path] [-t strip] [-r] [-h]\n", progname);
   printf("\nWhere:\n");
-  printf("  -d dump the coverage.\n");
+  printf("  -d dump the coverage, path is the path to the coverage file\n");
+  printf("  -t strip the path prefix number\n");
   printf("  -r reset the coverage\n");
   printf("  -h show this text and exits.\n");
+  exit(EXIT_FAILURE);
 }
 
 /****************************************************************************
@@ -49,12 +52,31 @@ static void show_usage(FAR const char *progname)
 void __gcov_dump(void);
 void __gcov_reset(void);
 
+/****************************************************************************
+ * Private Functions
+ ****************************************************************************/
+
+static void gcov_dump(FAR const char * path, FAR const char *strip)
+{
+  if (path == NULL || access(path, F_OK) != 0 || atoi(strip) <= 0)
+    {
+      fprintf(stderr, "ERROR: Invalid parameter\n");
+      return;
+    }
+
+  setenv("GCOV_PREFIX_STRIP", strip, 1);
+  setenv("GCOV_PREFIX", path, 1);
+  __gcov_dump();
+}
+
 /****************************************************************************
  * Public Functions
  ****************************************************************************/
 
 int main(int argc, FAR char *argv[])
 {
+  FAR const char *strip = "99";
+  FAR const char *path;
   int option;
 
   if (argc < 2)
@@ -62,12 +84,17 @@ int main(int argc, FAR char *argv[])
       show_usage(argv[0]);
     }
 
-  while ((option = getopt(argc, argv, "drh")) != ERROR)
+  while ((option = getopt(argc, argv, "d:t:rh")) != ERROR)
     {
       switch (option)
         {
           case 'd':
-            __gcov_dump();
+            path = optarg;
+            break;
+
+          case 't':
+            strip = optarg;
+
             break;
 
           case 'r':
@@ -83,5 +110,6 @@ int main(int argc, FAR char *argv[])
         }
     }
 
+  gcov_dump(path, strip);
   return 0;
 }


(nuttx-apps) 08/13: test case update follow the regualtor framework

Posted by ce...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

cederom pushed a commit to branch releases/12.7
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git

commit 734baae5a20c510a0f3dc22b569c6a94b5de88ea
Author: dulibo1 <du...@xiaomi.com>
AuthorDate: Fri Oct 13 16:54:42 2023 +0800

    test case update follow the regualtor framework
    
    Signed-off-by: dulibo1 <du...@xiaomi.com>
---
 testing/drivertest/drivertest_regulator.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/testing/drivertest/drivertest_regulator.c b/testing/drivertest/drivertest_regulator.c
index 4310fdf48..212c6805a 100644
--- a/testing/drivertest/drivertest_regulator.c
+++ b/testing/drivertest/drivertest_regulator.c
@@ -446,10 +446,8 @@ static void test_regulator_supply_4(FAR void **state)
                                              &g_fake_regulator);
   assert_false(NULL == g_fake_regulator.rdev);
   test = regulator_get(REGULATOR_ID);
-  assert_false(NULL == test);
+  assert_true(NULL == test);
   g_fake_regulator_supply.state = 0;
-  ret = regulator_enable(test);
-  assert_true(ret < 0);
   g_fake_regulator_supply.rdev = regulator_register(
                                              &g_fake_regulator_supply_desc,
                                              &g_fake_regulator_ops,
@@ -457,7 +455,8 @@ static void test_regulator_supply_4(FAR void **state)
   assert_false(NULL == g_fake_regulator_supply.rdev);
   assert_int_equal(g_fake_regulator_supply.state, 0);
   assert_int_equal(g_fake_regulator.state, 0);
-
+  test = regulator_get(REGULATOR_ID);
+  assert_false(NULL == test);
   while (cnt--)
     {
       ret = regulator_enable(test);
@@ -499,6 +498,7 @@ static void test_regulator_mode(FAR void **state)
   int ret = 0;
 
   g_fake_regulator.lpmode = 0;
+  g_fake_regulator_desc.supply_name = NULL;
   g_fake_regulator.rdev = regulator_register(&g_fake_regulator_desc,
                                              &g_fake_regulator_ops,
                                              &g_fake_regulator);


(nuttx-apps) 12/13: pmconfig:fix coverity scan issue which is unsigned_compare

Posted by ce...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

cederom pushed a commit to branch releases/12.7
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git

commit e0989d950f675a714698473292a36f4abca98632
Author: dulibo1 <du...@xiaomi.com>
AuthorDate: Mon Mar 11 18:27:37 2024 +0800

    pmconfig:fix coverity scan issue which is unsigned_compare
    
    Signed-off-by: dulibo1 <du...@xiaomi.com>
---
 nshlib/nsh_syscmds.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nshlib/nsh_syscmds.c b/nshlib/nsh_syscmds.c
index 71f604bc4..dc31238ac 100644
--- a/nshlib/nsh_syscmds.c
+++ b/nshlib/nsh_syscmds.c
@@ -291,7 +291,7 @@ int cmd_pmconfig(FAR struct nsh_vtbl_s *vtbl, int argc, FAR char **argv)
       if (argc == 4)
         {
           ctrl.domain = atoi(argv[3]);
-          if (ctrl.domain < 0 || ctrl.domain >= CONFIG_PM_NDOMAINS)
+          if (ctrl.domain >= CONFIG_PM_NDOMAINS)
             {
               nsh_error(vtbl, g_fmtargrange, argv[3]);
               return ERROR;


(nuttx-apps) 11/13: drivertest:add include file depended by cmocka

Posted by ce...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

cederom pushed a commit to branch releases/12.7
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git

commit 78937126227f00cd8af595a20e06c6f276ac8520
Author: dulibo1 <du...@xiaomi.com>
AuthorDate: Mon Dec 4 20:55:03 2023 +0800

    drivertest:add include file depended by cmocka
    
    from the cmocka.h:
     * These headers or their equivalents MUST be included prior to including
     * this header file.
     * @code
     * #include <stdarg.h>
     * #include <stddef.h>
     * #include <stdint.h>
     * #include <setjmp.h>
     * @endcode
    
    Signed-off-by: dulibo1 <du...@xiaomi.com>
    Signed-off-by: buxiasen <bu...@xiaomi.com>
---
 testing/drivertest/drivertest_pm_runtime.c | 4 +++-
 testing/drivertest/drivertest_regulator.c  | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/testing/drivertest/drivertest_pm_runtime.c b/testing/drivertest/drivertest_pm_runtime.c
index 11e6ae66e..9e80a0f42 100644
--- a/testing/drivertest/drivertest_pm_runtime.c
+++ b/testing/drivertest/drivertest_pm_runtime.c
@@ -28,8 +28,10 @@
 #include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <stdarg.h>
+#include <stddef.h>
+#include <setjmp.h>
 #include <string.h>
-#include <pthread.h>
 #include <cmocka.h>
 #include <nuttx/power/pm_runtime.h>
 
diff --git a/testing/drivertest/drivertest_regulator.c b/testing/drivertest/drivertest_regulator.c
index 212c6805a..aa53a693e 100644
--- a/testing/drivertest/drivertest_regulator.c
+++ b/testing/drivertest/drivertest_regulator.c
@@ -28,8 +28,10 @@
 #include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <stdarg.h>
+#include <stddef.h>
+#include <setjmp.h>
 #include <string.h>
-#include <pthread.h>
 #include <cmocka.h>
 #include <nuttx/power/consumer.h>
 


(nuttx-apps) 05/13: gcov.c: deal compile warming

Posted by ce...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

cederom pushed a commit to branch releases/12.7
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git

commit 9aedfdd4f7fdd5bd1aadeee9ec4e473ab023c7f5
Author: wangmingrong1 <wa...@xiaomi.com>
AuthorDate: Tue Jul 16 14:59:34 2024 +0800

    gcov.c: deal compile warming
    
    gcov.c:61:6: warning: 'path' may be used uninitialized [-Wmaybe-uninitialized]
       61 |   if (path == NULL || access(path, F_OK) != 0 || atoi(strip) <= 0)
          |      ^
    gcov.c: In function 'gcov_main':
    gcov.c:79:19: note: 'path' was declared here
       79 |   FAR const char *path;
    
    Signed-off-by: wangmingrong1 <wa...@xiaomi.com>
---
 system/gcov/gcov.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/system/gcov/gcov.c b/system/gcov/gcov.c
index 9506cadb1..53b88a121 100644
--- a/system/gcov/gcov.c
+++ b/system/gcov/gcov.c
@@ -76,7 +76,7 @@ static void gcov_dump(FAR const char * path, FAR const char *strip)
 int main(int argc, FAR char *argv[])
 {
   FAR const char *strip = "99";
-  FAR const char *path;
+  FAR const char *path = NULL;
   int option;
 
   if (argc < 2)


(nuttx-apps) 10/13: batterydump:move to system dir

Posted by ce...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

cederom pushed a commit to branch releases/12.7
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git

commit 893ac88f97092b739aae94f634ffb04cf76ab6d9
Author: dulibo1 <du...@xiaomi.com>
AuthorDate: Tue Nov 7 09:53:22 2023 +0800

    batterydump:move to system dir
    
    Signed-off-by: dulibo1 <du...@xiaomi.com>
---
 {testing => system}/batterydump/Kconfig       | 12 ++++++------
 {testing => system}/batterydump/Make.defs     |  6 +++---
 {testing => system}/batterydump/Makefile      | 10 +++++-----
 {testing => system}/batterydump/batterydump.c |  2 +-
 4 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/testing/batterydump/Kconfig b/system/batterydump/Kconfig
similarity index 70%
rename from testing/batterydump/Kconfig
rename to system/batterydump/Kconfig
index 61d9b16e7..1e8e87ca2 100644
--- a/testing/batterydump/Kconfig
+++ b/system/batterydump/Kconfig
@@ -3,26 +3,26 @@
 # see the file kconfig-language.txt in the NuttX tools repository.
 #
 #
-config TESTING_BATTERYDUMP
-	tristate "Battery dump for test"
+config SYSTEM_BATTERYDUMP
+	tristate "Battery dump system tool"
 	default n
 	---help---
 		Enable the battery dump
 
-if TESTING_BATTERYDUMP
+if SYSTEM_BATTERYDUMP
 
-config TESTING_BATTERYDUMP_PROGNAME
+config SYSTEM_BATTERYDUMP_PROGNAME
 	string "Program name"
 	default "batterydump"
 	---help---
 		This is the name of the program that will be used when the NSH ELF
 		program is installed.
 
-config TESTING_BATTERYDUMP_PRIORITY
+config SYSTEM_BATTERYDUMP_PRIORITY
 	int "Battery dump task priority"
 	default 100
 
-config TESTING_BATTERYDUMP_STACKSIZE
+config SYSTEM_BATTERYDUMP_STACKSIZE
 	int "Battery dump stack size"
 	default DEFAULT_TASK_STACKSIZE
 
diff --git a/testing/batterydump/Make.defs b/system/batterydump/Make.defs
similarity index 88%
rename from testing/batterydump/Make.defs
rename to system/batterydump/Make.defs
index 4f5db37fd..07126ab10 100644
--- a/testing/batterydump/Make.defs
+++ b/system/batterydump/Make.defs
@@ -1,5 +1,5 @@
 ############################################################################
-# apps/testing/batterydump/Make.defs
+# apps/system/batterydump/Make.defs
 #
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
@@ -18,6 +18,6 @@
 #
 ############################################################################
 
-ifneq ($(CONFIG_TESTING_BATTERYDUMP),)
-CONFIGURED_APPS += $(APPDIR)/testing/batterydump
+ifneq ($(CONFIG_SYSTEM_BATTERYDUMP),)
+CONFIGURED_APPS += $(APPDIR)/system/batterydump
 endif
diff --git a/testing/batterydump/Makefile b/system/batterydump/Makefile
similarity index 81%
rename from testing/batterydump/Makefile
rename to system/batterydump/Makefile
index 00549b141..5f4a4a1ad 100644
--- a/testing/batterydump/Makefile
+++ b/system/batterydump/Makefile
@@ -1,5 +1,5 @@
 ############################################################################
-# apps/testing/batterydump/Makefile
+# apps/system/batterydump/Makefile
 #
 # Licensed to the Apache Software Foundation (ASF) under one or more
 # contributor license agreements.  See the NOTICE file distributed with
@@ -20,10 +20,10 @@
 
 include $(APPDIR)/Make.defs
 
-PROGNAME  = $(CONFIG_TESTING_BATTERYDUMP_PROGNAME)
-PRIORITY  = $(CONFIG_TESTING_BATTERYDUMP_PRIORITY)
-STACKSIZE = $(CONFIG_TESTING_BATTERYDUMP_STACKSIZE)
-MODULE    = $(CONFIG_TESTING_BATTERYDUMP)
+PROGNAME  = $(CONFIG_SYSTEM_BATTERYDUMP_PROGNAME)
+PRIORITY  = $(CONFIG_SYSTEM_BATTERYDUMP_PRIORITY)
+STACKSIZE = $(CONFIG_SYSTEM_BATTERYDUMP_STACKSIZE)
+MODULE    = $(CONFIG_SYSTEM_BATTERYDUMP)
 
 MAINSRC = batterydump.c
 
diff --git a/testing/batterydump/batterydump.c b/system/batterydump/batterydump.c
similarity index 99%
rename from testing/batterydump/batterydump.c
rename to system/batterydump/batterydump.c
index 7ef02faa6..0649c0f6c 100644
--- a/testing/batterydump/batterydump.c
+++ b/system/batterydump/batterydump.c
@@ -1,5 +1,5 @@
 /****************************************************************************
- * apps/testing/batterydump/batterydump.c
+ * apps/system/batterydump/batterydump.c
  *
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with


(nuttx-apps) 01/13: examples: fix noteprint compile error

Posted by ce...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

cederom pushed a commit to branch releases/12.7
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git

commit a7011eb6f68ac6228b468ecedb44f735415bc589
Author: yinshengkai <yi...@xiaomi.com>
AuthorDate: Tue Oct 8 19:58:24 2024 +0800

    examples: fix noteprint compile error
    
    The sched_note_string/bprintf/dump interfaces have been removed and replaced with printf and event
    
    Signed-off-by: yinshengkai <yi...@xiaomi.com>
---
 examples/noteprintf/noteprintf_main.c | 31 +++++++++++++++----------------
 1 file changed, 15 insertions(+), 16 deletions(-)

diff --git a/examples/noteprintf/noteprintf_main.c b/examples/noteprintf/noteprintf_main.c
index 8fa628340..5a9df5d4a 100644
--- a/examples/noteprintf/noteprintf_main.c
+++ b/examples/noteprintf/noteprintf_main.c
@@ -81,30 +81,29 @@ int main(int argc, FAR char *argv[])
     {
       sched_note_printf(NOTE_TAG_ALWAYS,
                         "shced note test count = %d.", count++);
-      sched_note_string(NOTE_TAG_ALWAYS, str);
-      sched_note_dump(NOTE_TAG_ALWAYS, 1, &binary, sizeof(struct binary));
-      sched_note_bprintf(NOTE_TAG_ALWAYS, 2, "%hhd", c);
-      sched_note_bprintf(NOTE_TAG_ALWAYS, 3, "%hd", s);
-      sched_note_bprintf(NOTE_TAG_ALWAYS, 4, "%d", i);
-      sched_note_bprintf(NOTE_TAG_ALWAYS, 5, "%ld", l);
+      sched_note_mark(NOTE_TAG_ALWAYS, str);
+      sched_note_printf(NOTE_TAG_ALWAYS, "%hhd", c);
+      sched_note_printf(NOTE_TAG_ALWAYS, "%hd", s);
+      sched_note_printf(NOTE_TAG_ALWAYS, "%d", i);
+      sched_note_printf(NOTE_TAG_ALWAYS, "%ld", l);
 #ifdef CONFIG_HAVE_LONG_LONG
-      sched_note_bprintf(NOTE_TAG_ALWAYS, 6, "%lld", ll);
+      sched_note_printf(NOTE_TAG_ALWAYS, "%lld", ll);
 #endif
-      sched_note_bprintf(NOTE_TAG_ALWAYS, 7, "%jd", im);
-      sched_note_bprintf(NOTE_TAG_ALWAYS, 8, "%zd", sz);
-      sched_note_bprintf(NOTE_TAG_ALWAYS, 9, "%td", ptr);
+      sched_note_printf(NOTE_TAG_ALWAYS, "%jd", im);
+      sched_note_printf(NOTE_TAG_ALWAYS, "%zd", sz);
+      sched_note_printf(NOTE_TAG_ALWAYS, "%td", ptr);
 #ifdef CONFIG_HAVE_FLOAT
-      sched_note_bprintf(NOTE_TAG_ALWAYS, 10, "%e", f);
+      sched_note_printf(NOTE_TAG_ALWAYS, "%e", f);
 #endif
 #ifdef CONFIG_HAVE_DOUBLE
-      sched_note_bprintf(NOTE_TAG_ALWAYS, 11, "%le", d);
+      sched_note_printf(NOTE_TAG_ALWAYS, "%le", d);
 #endif
 #ifdef CONFIG_HAVE_LONG_DOUBLE
-      sched_note_bprintf(NOTE_TAG_ALWAYS, 12, "%Le", ld);
+      sched_note_printf(NOTE_TAG_ALWAYS, "%Le", ld);
 #endif
-      sched_note_bprintf(NOTE_TAG_ALWAYS, 13,
-                         "%hhd  %hd  %d  %ld  %lld  %jd  %zd  %td",
-                          c,    s,   i,  l,    ll,  im,  sz,  ptr);
+      sched_note_printf(NOTE_TAG_ALWAYS,
+                        "%hhd  %hd  %d  %ld  %lld  %jd  %zd  %td",
+                        c,    s,   i,  l,    ll,  im,  sz,  ptr);
       usleep(10);
     }
 


(nuttx-apps) 07/13: nsh_syscmds/rpmsg: include to fix compile error

Posted by ce...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

cederom pushed a commit to branch releases/12.7
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git

commit bbba2448cdb7e2fac76dce2421f709a75e59a616
Author: Bowen Wang <wa...@xiaomi.com>
AuthorDate: Fri Oct 11 11:07:15 2024 +0800

    nsh_syscmds/rpmsg: include <nuttx/rpmsg/rpmsg.h> to fix compile error
    
    nsh_syscmds.c: In function ‘cmd_rpmsg_once’:
    nsh_syscmds.c:567:13: error: ‘RPMSGIOC_PANIC’ undeclared (first use in this function)
      567 |       cmd = RPMSGIOC_PANIC;
          |             ^~~~~~~~~~~~~~
    nsh_syscmds.c:567:13: note: each undeclared identifier is reported only once for each function it appears in
    nsh_syscmds.c:571:13: error: ‘RPMSGIOC_DUMP’ undeclared (first use in this function); did you mean ‘FIOC_DUMP’?
      571 |       cmd = RPMSGIOC_DUMP;
    
    Signed-off-by: Bowen Wang <wa...@xiaomi.com>
---
 nshlib/nsh_syscmds.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/nshlib/nsh_syscmds.c b/nshlib/nsh_syscmds.c
index 9cd6bead8..71f604bc4 100644
--- a/nshlib/nsh_syscmds.c
+++ b/nshlib/nsh_syscmds.c
@@ -25,6 +25,7 @@
 #include <nuttx/config.h>
 
 #include <nuttx/power/pm.h>
+#include <nuttx/rpmsg/rpmsg.h>
 #include <nuttx/rptun/rptun.h>
 #include <nuttx/streams.h>
 #include <sys/boardctl.h>