8470 Commits

Author SHA1 Message Date
Tim Hardisty
e6a335ded0 Fix Compiler warnings 2025-07-03 10:42:11 +08:00
Tim Hardisty
8c9e126f91 netutils/thttpd-fix-broken-CGI-and-fixup-Kconfig 2025-07-03 10:42:11 +08:00
wangjianyu3
c3e628c45a nshlib/md5: Support reading from standard input
Sometimes users may want to calculate the MD5 of part of a file(e.g. check
partition contents for debug after flashing, size of which may be greater
than image). This can be done with the "dd" command and pipes, the "md5"
command just needs to support reading from standard input. For example:
`dd if=/dev/virtblk0 bs=512 count=1 | md5`.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-07-02 10:59:40 -03:00
Eren Terzioglu
ecd7b84871 games/snake: Enchacements for snake game
Add high score feature into snake game

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-07-02 10:16:04 -03:00
Tang Meng
971a7374d6 examples/i2schar: fix spelling mistakes 2025-06-27 21:42:02 +08:00
Alan Carvalho de Assis
63c86438fb apps/can: Replace fprintf with dprint
This modification will remove the dependency on
CONFIG_FILE_STREAM, useful for small devices.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2025-06-27 09:41:29 +08:00
Jean THOMAS
c7b395e7da system/settings: Add spaces after each switch 'case' 2025-06-26 13:22:47 -03:00
Jean THOMAS
4be82876e4 system/settings: general code cleaning
* Remove duplicate checks, use switch/case whenever possible
* Remove assertions just before if () condition checking the exact
  same thing
* Replace if (condition) assert(0) with assert(condition)

Signed-off-by: Jean THOMAS <jean@lambdaconcept.com>
2025-06-26 13:22:47 -03:00
wangmingrong1
92c490579d gcov: Output mode judgment is implemented in the kernel layer
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-06-26 23:48:01 +08:00
wangmingrong1
dfbaedd5c2 gcov: Refactoring the implementation framework of gcov
All implementations of gcov are sunk to the kernel implementation
1. Support three dump modes: serial port output, single file output, standard output

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-06-26 23:48:01 +08:00
wangmingrong1
25d43c65db apps/gcov: Alloc to strip 0
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-06-26 23:48:01 +08:00
Jean THOMAS
bb508520f1 system/settings: fix assertion triggered by uninitialized variables
Fix non-NULL pointer assertion in `get_setting()` caused by
uninitialized pointer variables.

Signed-off-by: Jean THOMAS <jean@lambdaconcept.com>
2025-06-26 19:23:02 +08:00
wangjianyu3
c4ff19a7e4 system/fastboot: fix typos of response error log
Fix typos of sparse header comments and download/upload response error log.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-06-25 10:01:27 +02:00
wangjianyu3
9df322d938 system/fastboot: add disconn for usb transport
Disconnect usbdev when deinit USB transport.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-06-25 10:01:27 +02:00
wangjianyu3
4b5af957ac system/fastboot: remove interest and close epoll
Remove fds from the interest list and close epoll if need.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-06-25 10:01:27 +02:00
Xiang Xiao
ee33688aca Fix /.github/ISSUE_TEMPLATE/001_bug_report.yml:122: Intertial ==> Inertial
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2025-06-24 22:19:00 +08:00
Brennan Ashton
f97274611f docs: Include released 10.x and 11.x versions under security policy.
Fixes #7514
2025-06-24 22:19:00 +08:00
Abdelatif Guettouche
f1b78948db .github/SECURITY.md: Fix a typo.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2025-06-24 22:19:00 +08:00
Brennan Ashton
b6f554c3e2 Add project GitHub Security Policy page
Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
2025-06-24 22:19:00 +08:00
Xiang Xiao
433765bbc8 .github/linters: Ignore E704 warning
since black and flake8 disagree on code style:
https://github.com/pyvista/pyvista/issues/5591

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2025-06-24 22:19:00 +08:00
xuxingliang
23d5abeb76 tools: make isort and black formatters to work together
Config multi line output to mode 3, so isort and black can agree with
each other:
```
3 - Vertical Hanging Indent

from third_party import (
    lib1,
    lib2,
    lib3,
    lib4,
)
```

Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2025-06-24 22:19:00 +08:00
Tomasz 'CeDeROM' CEDRO
559dcf5a90 Contributing and PR template fix.
* Fix CONTRIBUTING.md github link reference.
* Full URL is provided to avoid relative/fork reference issues.
* Minor update on full contributing documentation.

Signed-off-by: Tomasz 'CeDeROM' CEDRO <tomek@cedro.info>
2025-06-24 22:19:00 +08:00
Tomasz 'CeDeROM' CEDRO
0ff820e614 Update github pull request template.
* Update CONTRIBUTING.md guide with hints and examples.
* Minor GitHub Pull Request Template update hinting expected information.

Signed-off-by: Tomasz 'CeDeROM' CEDRO <tomek@cedro.info>
2025-06-24 22:19:00 +08:00
Lars Kruse
b1fcf50410 ci: enable spelling checks (via codespell) 2025-06-24 22:19:00 +08:00
Eren Terzioglu
6bc5e71a13 .github/ISSUE_TEMPLATE: Add host_info command section into bug report template 2025-06-24 22:19:00 +08:00
Tomasz 'CeDeROM' CEDRO
2dcad906bc github: master branch protection tune.
* Strict master branch protection requires all PR to be in sync with latest
  master even if changes are not related and there are no conflicts.
* Because we have lots of daily merges this blocks most of the PRs as they
  are forced to be rebased on top of current master.
* This also causes unnecessary automatic CI rebuild of each rebase.
* Therefore we are setting strict status checks setting to false.
* required_signatures in github means not only `git commit -s` but also
  cryptographic signature which is not required by us, setting false.
* Disable "contexts" checks enforcement, that cause CI problems, mark TODO.

References:
https://github.com/apache/infrastructure-asfyaml?tab=readme-ov-file
https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification
https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits

Signed-off-by: Tomasz 'CeDeROM' CEDRO <tomek@cedro.info>
2025-06-24 22:19:00 +08:00
Tomasz 'CeDeROM' CEDRO
fa0e073baf github: Setup protection for master branch.
* We do not have "Settings" tab in the Apache's owned repository,
  thus we need to update .asf.yaml file with repository settings.
* No direct push to master branch is possible.
* Require status checks to pass before merge.
* Setup reviews parameters.
* Require signatures.
* Require conversation resolution.
* Require linear history.

Signed-off-by: Tomasz 'CeDeROM' CEDRO <tomek@cedro.info>
2025-06-24 22:19:00 +08:00
simbit18
1e053ee936 check.yml: fix cvt2utf not found sync with nuttx repository
This PR add missing cvt2utf installation on our CI
see apache/nuttx#16561

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-06-24 08:02:07 +08:00
wangjianyu3
6afed10118 system/fastboot: add depends for TCP poll
Add TCP backlog dependence for poll(),
network related configurations referenced to may has not enable it,
without which the TCP handshake will fail.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-06-23 15:45:51 +08:00
wangjianyu3
11cf4211ab system/fastboot: enable usb and tcp the same time
Add support for enabling USB and TCP transport at the same time.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-06-23 15:45:51 +08:00
wangjianyu3
abf9fbee30 system/fastboot: switch to epoll
Switch from poll() to epoll().

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-06-23 15:45:51 +08:00
wangjianyu3
e23ba4891d system/fastboot: rename argument context to ctx
Rename argument "context" to "ctx" for all functions.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-06-23 15:45:51 +08:00
wangjianyu3
7790894bb6 system/fastboot: add support for fastboot tcp
Add TCP network transport support for fastboot, users can
add "-s tcp:HOST[:PORT]" option to specify a network device.

Examples

  fastboot -s tcp:192.168.100.2 getvar version
  fastboot -s tcp:192.168.100.2 flash virtblk0 fastboot.c
  fastboot -s tcp:192.168.100.2 oem shell "uname -a"

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-06-18 22:06:08 +08:00
wangjianyu3
75033b7d26 system/fastboot: add func for context and usbdev
fastboot_context_initialize : initialize fastboot context
fastboot_context_deinit     : deinitialize fastboot context
fastboot_usbdev_initialize  : initialize usbdev and open USB endpoint
fastboot_usbdev_deinit      : close USB endpoint

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-06-18 22:06:08 +08:00
wangjianyu3
88fea63ff4 system/fastboot: replace GETUINT32 with be32toh
Replace macro `FASTBOOT_GETUINT32` with function `be32toh()`.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-06-18 22:06:08 +08:00
raiden00pl
faea03f1fd add system/adcscope - streaming tool for ADC
add adcscope app allowing to stream data from ADC device with logging/nxscope.
Useful for testing ADC drivers.

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-06-17 14:29:08 -03:00
Michal Lenc
7b42dfc53e boot/nxboot: fix compile errors caused by nxboot_progress
Function nxboot_progress is located in nxboot_main.c, but this file
is not compiled when NXboot is used as a library to an existing
application and not as a bootloader. Therefore, the declaration of
nxboot_progress function should be dependent on NXBOOT_PROGRESS
config option.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2025-06-17 21:25:22 +08:00
wangjianyu3
38bd6accea system/fastboot: add const for memdump_print_t
Add qualifier "const" to the declaration of `memdump_print_t`,
the value of the 2nd argument will not be changed.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-06-17 20:57:23 +08:00
Matteo Golin
5e50e2c1f9 system/syslogd: Initial implementation
Initial implementation of syslogd including version information, simple
usage help and UDP transmission. The current implementation transmits
RFC 5424 formatted syslog entries over UDP for consumption by a syslog
collector. Only some options from the manpage are implemented since
NuttX doesn't currently have the ability for some of the more complex
features (-l, etc.).

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2025-06-17 20:43:58 +08:00
wangjianyu3
7375f6574e system/fastboot: move usbdev init after help
Move initialization of usbdev to after help().

This patch fix that even users just run `fastbootd -h`,
the usbdev will also be (re)initialized,
and if the daemon is running the status will be broken.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-06-15 11:19:49 +08:00
wangjianyu3
4c605ac43f system/fastboot: dump all memory regions
Add examples for oem memdump dumping all memory regions.

Host side

  $ fastboot oem memdump
  fastboot oem memdump 0x20000 0x28000
  fastboot get_staged 0x20000.bin
  fastboot oem memdump 0x40000000 0xf590000
  fastboot get_staged 0x40000000.bin
  fastboot oem memdump 0x4ff30000 0xd0000
  fastboot get_staged 0x4ff30000.bin
  FAILED (remote: 'Invalid argument')
  fastboot: error: Command failed

Device side

  nsh> fastbootd -h
  Usage: fastbootd [wait_ms]

  memdump:
      fastboot oem memdump 0x20000 0x28000
      fastboot get_staged 0x20000.bin
      fastboot oem memdump 0x40000000 0xf590000
      fastboot get_staged 0x40000000.bin
      fastboot oem memdump 0x4ff30000 0xd0000
      fastboot get_staged 0x4ff30000.bin

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-06-15 11:19:21 +08:00
Michal Lenc
7ca3656c3e benchmarks/osperf/osperf.c: add pipe read-write performance test
This adds a simple pip read-write performance test.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2025-06-14 17:20:23 +08:00
Michal Lenc
9a73fb7f4b benchmarks/osperf/osperf.c: fix spelling mistakes
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2025-06-14 17:20:23 +08:00
dongjiuzhu1
4f5c283438 testing/fs: update api name fs_getfilep/fs_putfilep to file_get/file_put
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2025-06-12 18:12:32 +08:00
Tim Hardisty
bcd1b46946 apps/boot/nxboot: Enhancements to add progress messages and copy-to-RAM feature
This adds Kconfig-enabled progress messages that are output to stdout.

It also adds Kconfig-enabled option to copy the validated and bootable image to RAM

Signed-off by: Tim Hardisty <timh@jti.uk.com>
2025-06-05 20:06:51 +08:00
wangjianyu3
4b8b96f060 system/uORB: fix orb_subscribe_multi undefined
Fix `orb_subscribe_multi` undefined error.

/workspace/prebuilts/gcc/linux/arm64/bin/../lib/gcc/aarch64-none-elf/13.2.1/../../../../aarch64-none-elf/bin/ld: apps/system/uorb/libapps_uorb_listener.a(listener.c.o): in function `listener_monitor':
/workspace/apps/system/uorb/listener.c:803:(.text.listener_monitor.constprop.0+0xe4): undefined reference to `orb_subscribe_multi'
/workspace/apps/system/uorb/listener.c:803:(.text.listener_monitor.constprop.0+0xe4): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `orb_subscribe_multi'

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-06-05 19:43:10 +08:00
ouyangxiangzhen
a03ed46947 ostest/wdog: Remove periodical wdog test cases.
The peridiodical wdog test cases should be removed after removing of the periodical wdog APIs.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-06-05 19:42:52 +08:00
Tim Hardisty
f0eb00ffd9 examples: add mdnsd example application to accompany netutils/mdns library
This commit adds a new example app to allow the newly added netutils/mdns
library and associated daemon to be exeercised.

Signed-off-by: Tim Hardisty <timh@jti.uk.com>
2025-06-02 23:18:24 +08:00
Tim Hardisty
30b1c024a1 apps/netutils: add mdns library support
This commit allows an external mDNS library to be included in NuttX.

It originates from here: <https://github.com/mjansson/mdns>

It is declared as being in the Public Domain as per <http://unlicense.org>

Signed-off-by: Tim Hardisty <timh@jti.uk.com>
2025-06-02 23:18:24 +08:00
vrmay23
8ff533beb3 examples/posix_stdio: Fix Kconfig to define default stack size
Fix the Kconfig file for the posix_stdio example by adding
the STACKSIZE symbol and setting it to DEFAULT_TASK_STACKSIZE.

This change ensures that the example builds properly and
respects system-wide stack size configuration.

Signed-off-by: Vinicius May <vmay.sweden@gmail.com>
nuttx-12.10.0-RC0
2025-06-01 09:21:15 -03:00