-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
Arch: risc-vIssues related to the RISC-V (32-bit or 64-bit) architectureIssues related to the RISC-V (32-bit or 64-bit) architectureArea: ApplicationsIssues related to ApplicationsIssues related to ApplicationsOS: MacIssues related to MacOS (building system, etc)Issues related to MacOS (building system, etc)Type: BugSomething isn't workingSomething isn't working
Description
Description / Steps to reproduce the issue
When we print a Static Char Array in a NuttX App: hello_main.c
static char test_static[] = "Testing Static Var";
int main(int argc, FAR char *argv[]) {
printf("test_static=%s\n", test_static);
printf("Address of test_static=%p\n", test_static);
return 0;
}The Static Char Array appears as Empty for rv-virt:knsh and rv-virt:knsh64:
## NuttX Source: https://github.com/apache/nuttx/tree/c94a99326ecd9dab1c56b0aaa2f0abe82148a405
## NuttX Apps: https://github.com/apache/nuttx-apps/tree/04f0b8e19274ff65ad8744d4b5b37f522c0097c0
$ qemu-system-riscv32 -semihosting -M virt,aclint=on -cpu rv32 -kernel nuttx -bios opensbi-1.5-rv-bin/share/opensbi/ilp32/generic/firmware/fw_dynamic.bin -nographic
QEMU emulator version 9.2.0
OpenSBI v1.5
NuttShell (NSH) NuttX-12.8.0
nsh> hello
test_static=
Address of test_static=0xc0100200
nsh> uname -a
NuttX 12.8.0 risc-v rv-virtAlso note that the Commit Hash is missing for uname -a, because it uses a Static Char Array. See the discussion here:
Update: Here's how the Missing Commit Hash is linked to the Empty Static Vars:
On which OS does this issue occur?
[OS: Mac]
What is the version of your OS?
macOS 15.2 24C101 arm64
NuttX Version
master
Issue Architecture
[Arch: risc-v]
Issue Area
[Area: Applications]
Verification
- I have verified before submitting the report.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Arch: risc-vIssues related to the RISC-V (32-bit or 64-bit) architectureIssues related to the RISC-V (32-bit or 64-bit) architectureArea: ApplicationsIssues related to ApplicationsIssues related to ApplicationsOS: MacIssues related to MacOS (building system, etc)Issues related to MacOS (building system, etc)Type: BugSomething isn't workingSomething isn't working
