You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "zhaoxingyu12 (via GitHub)" <gi...@apache.org> on 2026/01/12 02:53:12 UTC

[PR] optimize nvs module [nuttx]

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

   *Note: Please adhere to [Contributing Guidelines](https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md).*
   
   ## Summary
   
   *Update this section with information on why change is necessary,
    what it exactly does and how, if new feature shows up, provide
    references (dependencies, similar problems and solutions), etc.*
   
   ## Impact
   
   *Update this section, where applicable, on how change affects users,
    build process, hardware, documentation, security, compatibility, etc.*
   
   ## Testing
   
   *This section should provide a detailed description of what you did
   to verify your changes work and do not break existing code.*
   
   *Please provide information about your host machine, the board(s) you
   tested your changes on, and how you tested. Logs should be included.*
   
   *For example, when changing something in the core OS functions, you
   may want to run the OSTest application to verify that there are no
   regressions. Changes to ADC code may warrant running the `adc`
   example. Adding a new uORB driver may require that you run
   `uorb_listener` to verify correct operation.*
   
   *Pure documentation changes can just be tested with `make html`
   (see docs) and verification of the correct format in your
   browser.*
   
   **_PRs without testing information will not be accepted. We will
   request test logs._**
   


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

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


Re: [PR] mtd/nvs: optimize nvs module [nuttx]

Posted by "zhaoxingyu12 (via GitHub)" <gi...@apache.org>.
zhaoxingyu12 commented on PR #17829:
URL: https://github.com/apache/nuttx/pull/17829#issuecomment-3758668912

   > @zhaoxingyu12 please rebase and push your change.
   
   got it, thanks


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

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


Re: [PR] optimize nvs module [nuttx]

Posted by "zhaoxingyu12 (via GitHub)" <gi...@apache.org>.
zhaoxingyu12 commented on PR #17829:
URL: https://github.com/apache/nuttx/pull/17829#issuecomment-3736866610

   > fix check error:
   > 
   > ```
   > ../nuttx/tools/checkpatch.sh -c -u -m -g a22e26924d63cbbfc1ea4faa96b04cac030ed928..HEAD
   > ❌ Missing git commit message
   > ❌ Missing git commit message
   > ❌ Missing git commit message
   > Used config files:
   >     1: .codespellrc
   > Some checks failed. For contributing guidelines, see:
   >   https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md
   > ```
   
   done


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

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


Re: [PR] mtd/nvs: optimize nvs module [nuttx]

Posted by "zhaoxingyu12 (via GitHub)" <gi...@apache.org>.
zhaoxingyu12 commented on PR #17829:
URL: https://github.com/apache/nuttx/pull/17829#issuecomment-3744462708

   > Error: mtd_config_fs_test_main.c:75:5: error: "CONFIG_MTD_WRITE_ALIGN_SIZE" is not defined, evaluates to 0 [-Werror=undef]
   
   1. the error in mtd/mtd_config_fs.c has fixed
   2. the errors in mtd_config_fs_test_main.c, fixed in https://github.com/apache/nuttx-apps/pull/3310
   


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

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


Re: [PR] mtd/nvs: optimize nvs module [nuttx]

Posted by "simbit18 (via GitHub)" <gi...@apache.org>.
simbit18 commented on PR #17829:
URL: https://github.com/apache/nuttx/pull/17829#issuecomment-3737749445

   Hi @zhaoxingyu12, please note this error.
   
   ```
   ====================================================================================
   Configuration/Tool: esp32c3-legacy-devkit/nvcfgdata
   2026-01-12 03:35:35
   ------------------------------------------------------------------------------------
     Cleaning...
     Configuring...
     Building NuttX...
   mtd/mtd_config_fs.c: In function 'mtdconfig_ioctl':
   Error: mtd/mtd_config_fs.c:2203:9: error: 'ret' undeclared (first use in this function)
    2203 |         ret = nvs_write(fs, pdata);
         |         ^~~
   mtd/mtd_config_fs.c:2203:9: note: each undeclared identifier is reported only once for each function it appears in
   make[1]: *** [Makefile:109: mtd_config_fs.o] Error 1
   make[1]: Target 'libdrivers.a' not remade because of errors.
   make: *** [tools/LibTargets.mk:107: drivers/libdrivers.a] Error 2
   Error: mtd_config_fs_test_main.c:75:5: error: "CONFIG_MTD_WRITE_ALIGN_SIZE" is not defined, evaluates to 0 [-Werror=undef]
      75 | #if CONFIG_MTD_WRITE_ALIGN_SIZE <= 4
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   Error: mtd_config_fs_test_main.c:53:41: error: 'CONFIG_MTD_WRITE_ALIGN_SIZE' undeclared here (not in a function)
      53 | #define NVS_ALIGN_SIZE                  CONFIG_MTD_WRITE_ALIGN_SIZE
         |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   mtd_config_fs_test_main.c:78:20: note: in expansion of macro 'NVS_ALIGN_SIZE'
      78 |   uint8_t  expired[NVS_ALIGN_SIZE];
         |                    ^~~~~~~~~~~~~~
   mtd_config_fs_test_main.c: In function 'test_nvs_corrupted_sector_close':
   Error: mtd_config_fs_test_main.c:1342:11: error: unused variable 'wr_buf' [-Werror=unused-variable]
    1342 |   uint8_t wr_buf[NVS_ALIGN_UP(512) - sizeof(key1)];
         |           ^~~~~~
   Error: mtd_config_fs_test_main.c:1341:11: error: unused variable 'rd_buf' [-Werror=unused-variable]
    1341 |   uint8_t rd_buf[NVS_ALIGN_UP(512) - sizeof(key1)];
         |           ^~~~~~
   cc1: all warnings being treated as errors
   make[2]: *** [/github/workspace/sources/apps/Application.mk:330: mtd_config_fs_test_main.c.github.workspace.sources.apps.testing.fs.mtd_config_fs.o] Error 1
   make[2]: Target 'all' not remade because of errors.
   make[1]: *** [Makefile:54: /github/workspace/sources/apps/testing/fs/mtd_config_fs_all] Error 2
   make[1]: Target 'all' not remade because of errors.
   make: *** [tools/LibTargets.mk:248: /github/workspace/sources/apps/libapps.a] Error 2
   make: Target 'all' not remade because of errors.
   /github/workspace/sources/nuttx/tools/testbuild.sh: line 385: /github/workspace/sources/nuttx/../nuttx/nuttx.manifest: No such file or directory
     [1/1] Normalize esp32c3-legacy-devkit/nvcfgdata
   ====================================================================================
   ```


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

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


Re: [PR] mtd/nvs: optimize nvs module [nuttx]

Posted by "zhaoxingyu12 (via GitHub)" <gi...@apache.org>.
zhaoxingyu12 commented on PR #17829:
URL: https://github.com/apache/nuttx/pull/17829#issuecomment-3758521264

   Error: mtd_config_fs_test_main.c:75:5: error: "CONFIG_MTD_WRITE_ALIGN_SIZE" is not defined, evaluates to 0 [-Werror=undef]
      75 | #if CONFIG_MTD_WRITE_ALIGN_SIZE <= 4
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   Error: mtd_config_fs_test_main.c:53:41: error: 'CONFIG_MTD_WRITE_ALIGN_SIZE' undeclared here (not in a function)
      53 | #define NVS_ALIGN_SIZE                  CONFIG_MTD_WRITE_ALIGN_SIZE
         |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   mtd_config_fs_test_main.c:78:20: note: in expansion of macro 'NVS_ALIGN_SIZE'
      78 |   uint8_t  expired[NVS_ALIGN_SIZE];
         |                    ^~~~~~~~~~~~~~
   mtd_config_fs_test_main.c: In function 'test_nvs_corrupted_sector_close':
   Error: mtd_config_fs_test_main.c:1342:11: error: unused variable 'wr_buf' [-Werror=unused-variable]
    1342 |   uint8_t wr_buf[NVS_ALIGN_UP(512) - sizeof(key1)];
         |           ^~~~~~
   Error: mtd_config_fs_test_main.c:1341:11: error: unused variable 'rd_buf' [-Werror=unused-variable]
    1341 |   uint8_t rd_buf[NVS_ALIGN_UP(512) - sizeof(key1)];
         |           ^~~~~~
   cc1: all warnings being treated as errors
   
   
   
   pls help to retrigger CICT, these errors have already fixed in mtd_config_fs_test_main.c, thanks @xiaoxiang781216 
   
   


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

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


Re: [PR] mtd/nvs: optimize nvs module [nuttx]

Posted by "GUIDINGLI (via GitHub)" <gi...@apache.org>.
GUIDINGLI merged PR #17829:
URL: https://github.com/apache/nuttx/pull/17829


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

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


Re: [PR] mtd/nvs: optimize nvs module [nuttx]

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on PR #17829:
URL: https://github.com/apache/nuttx/pull/17829#issuecomment-3758543734

   @zhaoxingyu12 please rebase and push your change.


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

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


Re: [PR] optimize nvs module [nuttx]

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on PR #17829:
URL: https://github.com/apache/nuttx/pull/17829#issuecomment-3736784180

   fix check error:
   ```
   ../nuttx/tools/checkpatch.sh -c -u -m -g a22e26924d63cbbfc1ea4faa96b04cac030ed928..HEAD
   ❌ Missing git commit message
   ❌ Missing git commit message
   ❌ Missing git commit message
   Used config files:
       1: .codespellrc
   Some checks failed. For contributing guidelines, see:
     https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md
   ```


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

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


Re: [PR] mtd/nvs: optimize nvs module [nuttx]

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on PR #17829:
URL: https://github.com/apache/nuttx/pull/17829#issuecomment-3739852212

   @zhaoxingyu12 please fix:
   ```
   ../nuttx/tools/checkpatch.sh -c -u -m -g 38378149edcc7b767fe4fce4087801288d52271b..HEAD
   ❌ Remove Gerrit Change-ID's before submitting upstream
   ❌ Missing git commit message
   Used config files:
       1: .codespellrc
   ```


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

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