Renaming "modlib" to "libelf" is more in line with the implementation content,
which makes it easier for individual developers to understand the capabilities of this module.
CONFIG_LIBC_MODLIB -> CONFIG_LIBC_ELF
Signed-off-by: chao an <anchao.archer@bytedance.com>
Changed the NUTTX dependency branch to 'main' for consistency with repository updates.
Updated pixel format check to use FB_FMT_RGB16_565 for better clarity and accuracy.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
* examples/xmlrpc/calls.c used 80 bytes call buffers.
* update buffers to CONFIG_XMLRPC_STRINGSIZE+1 that is build time configurable.
* this keeps buffers size coherent with configuration.
* updated internal variable names to pass lint checks.
Signed-off-by: Tomasz 'CeDeROM' CEDRO <tomek@cedro.info>
fix Relative file path does not match actual file.
EOL Conversion -> Unix (LF)
Adding the message header to the Kconfig file
Signed-off-by: simbit18 <simbit18@gmail.com>
Summary:
- Added a basic Slint example for NuttX, demonstrating how to integrate Slint UI framework with Rust on NuttX
- Includes a simple UI with a counter and touchscreen input handling
- Provides CMake, Kconfig, and Makefile configurations for building the example
Impact:
- Introduces a new example showcasing Slint UI framework usage on NuttX
- Enables developers to explore Rust-based UI development on embedded systems
- Demonstrates integration with NuttX framebuffer and touchscreen drivers
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Summary:
- Added `codegen-units = 1` and `opt-level = 'z'` to the release profile in `Cargo.toml`
- These changes optimize the build for minimal binary size
Impact:
- Reduces the final binary size by ~7% (244316 -> 228380 bytes)
- Improves resource utilization for embedded systems
- No functional changes to the application behavior
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Summary:
- Renamed hello_rust example to rust/baremetal to better reflect its purpose
- Updated file headers and Makefile paths
- Maintained all existing Kconfig options and functionality
- Prepares for future Rust development patterns where Cargo will be the
mainstream approach, with baremetal demonstrating traditional build method
- Creates clearer structure for Rust examples as we expand Rust support
Impact:
- No functional changes to the example itself
- Better organization of Rust examples under examples/rust/
- Existing configurations using this example will continue to work
- Build system will now look for the example in the new location
Testing:
- Confirmed Kconfig options remain unchanged
- GitHub CI passed and local build tested
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
- Break long preprocessor conditionals across multiple lines
- Add spaces around operators for better readability
- Reformat long string literals to fit within line length limits
- Improve consistency in spacing around parentheses and brackets
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Build Rust applictions with cargo is the most commn way,
and it's more easy to cooporate with Rust ecosystem.
This example shows how to use cargo to build a simple hello world
application.
And please notice that you need to install nighly version of rustc
to support this feature, any version after https://github.com/rust-lang/rust/pull/127755
is merged, can use NuttX as cargo target directly.
Build
-----
To build hello_rust_cargo application, you can use any target that based
on RISCV32IMAC, for example:
```
cmake -B build -DBOARD_CONFIG=rv-virt:nsh -GNinja .
```
And disable ARCH_FPU in menuconfig, since the hard coded target triple
in this demo is `riscv32imac`.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Clean up code by removing redundant and unused header file includes that were identified through static analysis.
This improves code readability and reduces unnecessary dependencies.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
`posix_spawn` depends on these configurations:
- !BINFMT_DISABLE
- !DISABLE_MOUNTPOINT
- BOARDCTL
- BOARDCTL_APP_SYMTAB
- ELF
- FS_ROMFS
Check them in compile time may waste some time if the dependencies are not met,
move them to Kconfig to avoid this.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
libuv:
CC: pthread/pthread_mutexattr_setrobust.c libuv/src/unix/thread.c: In function ‘uv_thread_create_ex’:
libuv/src/unix/thread.c:174:24: error: storage size of ‘param’ isn’t known
174 | struct sched_param param;
| ^~~~~
btsak_main:
In file included from btsak_main.c:39:
btsak.h:149:1: error: unknown type name ‘bool’
149 | bool btsak_str2bool(FAR const char *str);
pipe_main.c:
CC: sim/sim_registerdump.c pipe_main.c:44:30: error: unknown type name ‘pthread_addr_t’
44 | static void *open_write_only(pthread_addr_t pvarg)
| ^~~~~~~~~~~~~~
pipe_main.c: In function ‘pipe_main’:
pipe_main.c:81:3: error: unknown type name ‘pthread_t’
81 | pthread_t writeonly;
redirect_test.c: In function ‘redirection_test’:
redirect_test.c:205:3: error: unknown type name ‘pthread_t’
205 | pthread_t readerid;
| ^~~~~~~~~
redirect_test.c:206:3: error: unknown type name ‘pthread_t’
206 | pthread_t writerid;
| ^~~~~~~~~
drivertest_posix_timer.c:48:29: error: ‘optarg’ undeclared (first use in this function)
48 | value = (type)strtoul(optarg, &ptr, base); \
drivertest_posix_timer.c:208:3: warning: implicit declaration of function ‘sleep’ [-Wimplicit-function-declaration]
208 | sleep(SLEEPSECONDS);
| ^~~~~
drivertest_uart.c:92:13: warning: implicit declaration of function ‘read’; did you mean ‘fread’? [-Wimplicit-function-declaration]
92 | len = read(fd, &tmp_char, 1);
| ^~~~
| fread
drivertest_uart.c:323:44: error: ‘optopt’ undeclared (first use in this function)
323 | printf("Unknown option: %c\n", optopt);
kernel/fs/cases/fs_getfilep_test.c:71:9: warning: implicit declaration of function ‘fs_getfilep’ [-Wimplicit-function-declaration]
71 | ret = fs_getfilep(fileno(fp), &filep);
| ^~~~~~~~~~~
kernel/mm/cases/mm_test_008.c:148:9: warning: implicit declaration of function ‘task_create’; did you mean ‘timer_create’? [-Wimplicit-function-declaration]
148 | pid = task_create("TestNuttx08_routine_1",
| ^~~~~~~~~~~
| timer_create
/home/ajh/work/nuttxwork/apps/testing/cmocka/cmocka_main.c:171:11: warning: implicit declaration of function ‘setenv’ [-Wimplicit-function-declaration]
171 | setenv("CMOCKA_XML_FILE", xml_path, 1);
| ^~~~~~
drivertest_pm_runtime.c:123:7: warning: implicit declaration of function ‘usleep’ [-Wimplicit-function-declaration]
123 | usleep(210 * 1000);
| ^~~~~~
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
write returns in case some bytes were written but not everything can
fit.
This wasn't the case in NuttX but commit
d0680fd1bc51b7ead0b068fb24a31a144d22dc6c introduced this standard
behavior.
Summary
---------------------------------------------------------------------------------------------------------
Created a minimal demo application for Bluetooth. It works by displaying some data over Bluetooth and the
user can connect to the device running it on NuttX and read this data.
This can work in 2 scenarios: a real scenario, in which data from the BME680 (temperature, humidity, etc..)
is used and the user will be able to read it. The second scenario involves displaying some dummy data
(hardcoded values) for testing purposes.
This application can serve as an example for users implementing more complex applications using Bluetooth on NuttX.
Testing
---------------------------------------------------------------------------------------------------------
I used the ESP32-Sparrow (which includes the BME680 sensor) and the ESP32-devkitc boards for testing.
The Bluetooth stack starts by default with advertising when it initializes, however I noticed that enabling
advertising in the stack does not work (at least on ESP32). However, when scanning is also enabled, the
device starts advertising. Therefore, in our application, during the BLE services initialization part, I also
enable scanning as a temporary workaround in order to make sure the device advertises and the user can see it
and connect to it.
the current usage description is incorrect,
ifname must follow ethercat. The number of transfers can be specified
only after ifname is specified.
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
Memory leak can be detected when simply change the while(1) loop to exit. The lv_nuttx_deinit will free resources including display, input etc.
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
This application continuously reads the file system of the spislv. Each received message will be written to the user in hexadecimal form, and the same received data will be sent back. In this way, the user can test if their spislv driver and hardware setup are working properly before proceeding further.
On a master device, using the SPI tool, when sending the message: spi exch -x 4 deadbeef
The slave device will output:
Slave: 4 Bytes read
Value in hex form from /dev/spislv2: de ad be ef
Slave: Writing value back to /dev/spislv2