boards/sim/sim/sim/nsh: enable CONFIG_RTC for host time sync#19048
boards/sim/sim/sim/nsh: enable CONFIG_RTC for host time sync#19048Zepp-Hanzj wants to merge 1 commit into
Conversation
| CONFIG_SYSTEM_NSH=y | ||
| CONFIG_TESTING_OSTEST=y | ||
|
|
||
| CONFIG_RTC=y |
There was a problem hiding this comment.
need normalize by ./tools/refresh.sh --silent sim:nsh
linguini1
left a comment
There was a problem hiding this comment.
Can you please follow the PR template? It makes PRs consistent so they are much easier to search through.
Are you AI-generating the test logs? Why does it say NuttX 3.6.1?
|
Also, this doesn't verify that it actually closes the issue. The issue is that newly created files don't have dates. Can you also try to reproduce the issue test? |
hanzj-mi@hanzj-mi: NuttShell (NSH) NuttX-3.6.1 This is my actual execution log. uttX 3.6.1 is the version of your local nuttx repository's current master branch. The version comes from the .version file: |
5d9a74e to
75a0916
Compare
|
Done. Ran |
|
Hmmm @Zepp-Hanzj this version string is a bug, since NuttX is actually at 13.0.0 (or getting ready for it's release). Could you open an issue for it? |
This was a stale local |
75a0916 to
e31466d
Compare
…time The default sim:nsh config has no RTC, causing NSH_DISABLE_DATE to be auto-enabled (default: DEFAULT_SMALL || !RTC). This means the date command is not compiled in, and the system time defaults to a hardcoded value instead of syncing with the host. Enable CONFIG_RTC, CONFIG_RTC_DRIVER, and CONFIG_RTC_ARCH in the sim:nsh defconfig so the date command is available and shows the correct host time out of the box. Signed-off-by: hanzj <hanzjian@zepp.com>
e31466d to
707645d
Compare
Ah I see, this feature is added in the PR pending merge. Then maybe for now we don't say that this PR closes that issue but should fix it, and wait for the other author to confirm. |


Note: Please adhere to Contributing Guidelines.
Summary
The default
sim:nshconfiguration does not enableCONFIG_RTC. As a result, theNSH_DISABLE_DATEoption defaults toy(its default isDEFAULT_SMALL || !RTC), which causes thedatecommand to not be compiled in. Users seensh: date: command not foundand the system time defaults to a hardcoded value instead of syncing with the host.This patch adds
CONFIG_RTC=y,CONFIG_RTC_DRIVER=y, andCONFIG_RTC_ARCH=ytoboards/sim/sim/sim/configs/nsh/defconfigso thedatecommand is available and shows the correct host time out of the box.Should fix apache/nuttx-apps#3410.
Impact
datecommand in sim:nsh without manual config changes)Testing
Host: Linux x86_64
Build and run:
Before fix:
After fix: