xuxin19
ba56c6c102
cmake(bugfix):make sure the extra_lib only added once
...
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-11-04 18:19:15 +08:00
Kian Karas
832a76542f
net/netlink: improve comments
2024-11-04 18:18:28 +08:00
Kian Karas
105dd04ee5
net/netlink: fix netlink poll return value on success
...
Make sure the return value is zero on success - as described in the
documentation of the function.
It doesn't look like the "error" affected any code.
2024-11-04 18:18:28 +08:00
Kian Karas
92f001ee0c
sched/wqueue: improve comments
2024-11-04 18:18:04 +08:00
Kian Karas
fa841237dc
sched/wqueue: fix work_notifier_setup() false failure
...
Be consistent with the datatype used for the 'key'. As the API in
in the .h file uses int, I chose to replace uint32_t with int
everywhere.
This change ensures that work_notifier_setup() will not return a
negative value indicating error to the caller, when in fact the
notifier was correctly setup. This would happen when
work_notifier_setup() had been called 0x8000000 times, and that
many keys allocated.
2024-11-04 18:18:04 +08:00
ligd
561e1fc879
x86_64: fix compile warning
...
In function ‘void* std::__1::__libcpp_operator_new(_Args ...) [with _Args = {long unsigned int}]’,
inlined from ‘void* std::__1::__libcpp_allocate(size_t, size_t)’ at /home/ligd/platform/trunk/nuttx/include/libcxx/new:294:31,
inlined from ‘_Tp* std::__1::allocator<_Tp>::allocate(size_t) [with _Tp = char]’ at /home/ligd/platform/trunk/nuttx/include/libcxx/__memory/allocator.h:114:62,
inlined from ‘constexpr std::__1::__allocation_result<typename std::__1::allocator_traits<_Alloc>::pointer> std::__1::__allocate_at_least(_Alloc&, size_t) [with _Alloc = allocator<char>]’ at /home/ligd/platform/trunk/nuttx/include/libcxx/__memory/allocate_at_least.h:55:27,
inlined from ‘void std::__1::basic_string<_CharT, _Traits, _Allocator>::__grow_by_and_replace(size_type, size_type, size_type, size_type, size_type, size_type, const value_type*) [with _CharT = char; _Traits = std::__1::char_traits<char>; _Allocator = std::__1::allocator<char>]’ at /home/ligd/platform/trunk/nuttx/include/libcxx/string:2325:49,
inlined from ‘std::__1::basic_string<_CharT, _Traits, _Allocator>& std::__1::basic_string<_CharT, _Traits, _Allocator>::__assign_external(const value_type*, size_type) [with _CharT = char; _Traits = std::__1::char_traits<char>; _Allocator = std::__1::allocator<char>]’ at /home/ligd/platform/trunk/nuttx/include/libcxx/string:2431:26,
inlined from ‘std::__1::basic_string<_CharT, _Traits, _Allocator>& std::__1::basic_string<_CharT, _Traits, _Allocator>::assign(const value_type*, size_type) [with _CharT = char; _Traits = std::__1::char_traits<char>; _Allocator = std::__1::allocator<char>]’ at /home/ligd/platform/trunk/nuttx/include/libcxx/string:2444:35:
/home/ligd/platform/trunk/nuttx/include/libcxx/new:270:24: warning: argument 1 value ‘18446744073709551599’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
270 | return ::operator new(__args...);
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-11-04 18:06:09 +08:00
hujun5
76d2a9443b
sched/sched: change [FIRST|LAST]_ASSIGNED_STATE to [FIRST|LAST]_READY_TO_RUN_STATE in nxsched_set_affinity
...
reason:
In smp, It's possible that in a scenario where CONFIG_SMP_DEFAULT_CPUSET is set to 1,
when taskA is created with a relatively low priority,
it gets added to the g_readytorun queue with an affinity of 0x1.
Meanwhile, CPUs 1~n are in an idle state.
Subsequently, when we attempt to change the affinity property of taskA using nxsched_set_affinity,
the scheduling mechanism might not be triggered due to the lack of a proper condition check.
This can result in taskA remaining unscheduled and therefore unable to run.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-11-04 17:19:59 +08:00
Xiang Xiao
a96a4de19a
timers: Replace DEBUGASSERT with the error code
...
fix the issue report here:
https://lists.apache.org/thread/sys37yf63rq501fd1v8y3zyh6vk10v1d
when driver no support for ops, should not panic, prefer errno.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-11-04 10:05:52 +01:00
ligd
91b228fcdd
arm64: fix compile failed when build ELF apps
...
aarch64-none-elf-gcc -c -D_LDBL_EQ_DBL -fno-common -Wall -Wstrict-prototypes -Wshadow -Wundef -Werror -Wno-attributes -Wno-unknown-pragmas -Wno-psabi "-O3" -fno-strict-aliasing -fno-omit-frame-pointer -fno-optimize-sibling-calls -fstack-protector-all -fsanitize=kernel-address --param asan-globals=1 -ffunction-sections -fdata-sections "-g3" -mcpu=cortex-a53 -isystem /home/ligd/platform/trunk/nuttx/include -D__NuttX__ -pipe -I /home/ligd/platform/trunk/apps/crypto/mbedtls/include -I /home/ligd/platform/trunk/apps/crypto/mbedtls/mbedtls/include -I /home/ligd/platform/trunk/apps/crypto/openssl_mbedtls_wrapper/include -I /home/ligd/platform/trunk/apps/external/android/frameworks/native/libs/binder/include_rpc_unstable -I /home/ligd/platform/trunk/apps/external/android/frameworks/native/libs/binder/ndk/include_ndk -I /home/ligd/platform/trunk/apps/external/android/frameworks/native/libs/binder/ndk/include_platform -I /home/ligd/platform/trunk/apps/external/android/system/chre/chre/chre_api/include/chre_api -DCHRE_MESSAGE_TO_HOST_MAX_SIZE=2048 -I /home/ligd/platform/trunk/apps/external/android/system/core/libcutils/include -I /home/ligd/platform/trunk/apps/frameworks/graphics/uikit/include -I /home/ligd/platform/trunk/apps/frameworks/runtimes/feature/include -I /home/ligd/platform/trunk/apps/frameworks/runtimes/feature/src -I /home/ligd/platform/trunk/apps/frameworks/security/include -I /home/ligd/platform/trunk/apps/frameworks/system/dfx/include -I /home/ligd/platform/trunk/apps/frameworks/system/topics/include -I /home/ligd/platform/trunk/apps/frameworks/system/utils/include -I /home/ligd/platform/trunk/apps/graphics/lvgl -I /home/ligd/platform/trunk/apps/graphics/lvgl/lvgl -I "/home/ligd/platform/trunk/apps/system/argtable3/argtable3/src" -I /home/ligd/platform/trunk/apps/system/libuv/libuv/include -DUV_HANDLE_BACKTRACE=CONFIG_LIBUV_HANDLE_BACKTRACE -I /home/ligd/platform/trunk/apps/system/uorb/ -I /home/ligd/platform/trunk/nuttx/arch/arm64/src/board/include -I /home/ligd/platform/trunk/nuttx/arch/arm64/src/chip -I /home/ligd/platform/trunk/apps/vendor/bes/drivers/best1600_ep/miwear_drivers/display -I /home/ligd/platform/trunk/apps/vendor/bes/drivers/best1600_ep/miwear_drivers/boards -I /home/ligd/platform/trunk/apps/vendor/bes/drivers/best1600_ep/miwear_drivers/include -I "/home/ligd/platform/trunk/apps/include" -fvisibility=hidden -mlong-calls modprint.c -o modprint.c.home.ligd.platform.trunk.apps.examples.sotest.modprint.o
aarch64-none-elf-gcc: error: unrecognized command-line option '-mlong-calls'
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-11-04 16:24:29 +08:00
38fbb4e286
CI: Check out the correct branch of nuttx repo when compiling nuttx-apps
...
When compiling the Release Branch of `nuttx-apps`, our CI Workflow `build.yml` checks out the Master Branch of `nuttx` repo, which is incorrect. This happens due to a typo in `build.yml`: https://github.com/apache/nuttx/issues/14513
This PR fixes the typo in `build.yml` to checkout the correct branch of `nuttx` repo.
2024-11-04 12:51:56 +08:00
Matteo Golin
f9a2dc50b1
Created documentation page under contribution guidelines about the NuttX release process, copied from Alin Jerpelea's gist documentation.
2024-11-04 12:47:40 +08:00
Matteo Golin
bcebcacd90
rp2040 docs: Updated all RP2040 documentation pages to use the 2.0.0
...
version of the Pico SDK in their install instructions. All information
in the board README.txt files are now moved into the RST files to help
with the removal of the old READMEs.
2024-11-04 12:44:47 +08:00
hujun5
fa25b2ea4a
fix regression caused by remove sync pause
...
reason:
If we need to handle a tcb that is running on another CPU,
we need to process it through the smpcall method.
This commit fixes the regression from https://github.com/apache/nuttx/pull/13863
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-11-04 11:05:20 +08:00
da4f4e550d
CI: Disable the CI Build on push to master branch
...
Due to the [recent cost-cutting](https://github.com/apache/nuttx/issues/14376 ), we are no longer running PR Merge Jobs in the `nuttx` and `nuttx-apps` repos. For this to happen, I am now running a script on my computer that will cancel any PR Merge Jobs that appear: [kill-push-master.sh](https://github.com/lupyuen/nuttx-release/blob/main/kill-push-master.sh )
This PR disables PR Merge Jobs permanently, so that we no longer need to run the script. This prevents our CI Charges from over-running, in case the script fails to operate properly.
2024-11-04 09:32:59 +08:00
Xiang Xiao
11960fd8e7
libc/mtdoutstream: Fix the in insufficient erase in byte write case
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-11-04 08:37:31 +08:00
Xiang Xiao
cccc413cb9
libc/mtdoutstream: Remove the redundant check and compute
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-11-04 08:37:31 +08:00
Xiang Xiao
1e343a884b
libc/mtdoutstream: Replace stream->geo.erasesize with erasesize
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-11-04 08:37:31 +08:00
Xiang Xiao
fa57289d68
libc/blkoutstream: Zero the cache to avoid random data
...
and skip zero cache in lib_mtdoutstream_open since it's aleady done ih mtdoutstream_puts
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-11-04 08:37:31 +08:00
Xiang Xiao
00529f1626
libc/blkoutstream: Remove the redundant check and compute
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-11-04 08:37:31 +08:00
Xiang Xiao
9f1af300cb
libc/blkoutstream: Replace stream->geo.geo_sectorsize with sectorsize
...
and sblock with sector to make the code more readable.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-11-04 08:37:31 +08:00
Xiang Xiao
bce5dee0da
Fix error: implicit declaration of function 'up_mdelay'
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-11-03 21:08:50 +08:00
Xiang Xiao
9882e0e9c3
fs: Fix mtd/sector512.c:554:19: error: incomplete definition of type 'struct partition_info_s'
...
by moving geometry and partition_info_s to include/fs/ioctl.h
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-11-03 21:08:50 +08:00
raiden00pl
6ba8c1e9f9
cmake: don't include syslog files if CONFIG_SYSLOG=n
...
don't include syslog files if CONFIG_SYSLOG=n
2024-11-03 20:54:49 +08:00
raiden00pl
48a327d0ed
.github/labeler.yml: add missing drivers label
...
add missing drivers label for labeler.yml
2024-11-03 20:54:39 +08:00
raiden00pl
cd4e53c28a
sched/misc/assert.c: don't compile dump_task logic if CONFIG_DEBUG_ALERT=n
...
Don't compile dump_task logic if CONFIG_DEBUG_ALERT=n.
With _alert() disabled this logic does nothing, but the compiler
is not smart enough to optimize this code.
on minimal stm32f3 configuration it saves 396B of flash.
2024-11-03 19:35:36 +08:00
Saurav Pal
4e53ee4486
fs/mnemofs: Fix open and rmdir return value and seek out of bounds.
...
- Update open return value to ENOTDIR when ancestor is a file.
- Update rmdir return value to ENOTDIR when path is not a directory.
- Better logs for file and dir operations.
Signed-off-by: Saurav Pal <resyfer.dev@gmail.com>
2024-11-03 16:01:58 +08:00
hujun5
a1bb967941
remove nxsched_lock_irq/nxsched_unlock_irq
...
reason:
nxsched_lock_irq has the same functionality as sched_lock
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-11-03 16:00:17 +08:00
xuxin19
1bb01d40fd
cmake(build):add the specified armclang compiler to the cmake Toolchain file
...
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-11-03 14:06:40 +08:00
Xiang Xiao
e777234714
Fix Error: implicit declaration of function 'enter_critical_section'
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-11-03 11:26:44 +08:00
Xiang Xiao
c5381c3eb2
Replace __attribute__((packed)) with [begin|end]_packed_struct
...
since the different compiler express the packed structure in the different way
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-11-03 10:20:38 +08:00
xuxin19
299ef6234f
cmake(bugfix):add xtensa libc machine function build
...
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-11-03 09:16:24 +08:00
wangchen
90e2395d6c
netlink:add tls cleanup protection to protect waitsem in netlink_get_response
...
Signed-off-by: wangchen <wangchen41@xiaomi.com>
2024-11-03 02:55:43 +08:00
wangchen
807c3a16e3
tcp:set NET_TCP_NPOLLWAITERS default value to 2 & add warning of different events having same event bit
...
Signed-off-by: wangchen <wangchen41@xiaomi.com>
2024-11-03 02:55:02 +08:00
chenrun1
1fce345481
libc/machine/CMakeLists: should alaways build arch_atomic.c
...
Summary:
This issue comes from https://github.com/apache/nuttx/pull/14570 . In the previous Atomic implementation https://github.com/apache/nuttx/pull/13044 , we have removed the CONFIG_LIBC_ARCH_ATOMIC macro, so arch_atomic.c should always be compiled.
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-11-03 02:33:03 +08:00
hujun5
2c0e5e872b
pthread_cond remove csection
...
reason:
We decouple semcount from business logic by using an independent counting variable,
which allows us to remove critical sections in many cases.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-11-02 09:40:19 -03:00
7f84a64109
CI: Enable builds for msys2, msvc, arm-08, arm-10, arm-13 for Complex PRs
...
This PR enables the CI Builds for msys2, msvc, arm-08, arm-10, arm-13 for Complex PRs. We disable the CI Builds for arm-01, arm-09, arm-11.
This will help to fix the recent breakage of builds: https://github.com/apache/nuttx/issues/14598
2024-11-02 09:25:12 -03:00
ouyangxiangzhen@xiaomi.com
b5a215879c
drivers: Fix the missing headers.
...
This commit added the missing headers for some drivers.
Signed-off-by: ouyangxiangzhen@xiaomi.com <ouyangxiangzhen@xiaomi.com>
2024-11-02 09:23:46 -03:00
xuxin19
6e81b1ed91
cmake:implement CMake build of xtensa arch
...
configure:cmake -B build -DBOARD_CONFIG=iss-hifi4:nsh
build:cmake --build build
run:xt-run build/nuttx
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-11-02 18:08:38 +08:00
zhangyuan29
b294fd3c8a
libc/unistd: fixed tasking build issue
...
CC: pthread/pthread_mutexattr_getrobust.c artc I800: creating archive libsched.a
CC: unistd/lib_getopterrp.c ctc W505: ["unistd/lib_getoptargp.c" 48/29] implicit declaration of function "getoptvars"
ctc W577: ["unistd/lib_getoptargp.c" 48/39] calling a function without a prototype
ctc W524: ["unistd/lib_getoptargp.c" 48/27] conversion of integer to pointer at assignment
ctc E212: ["unistd/lib_getoptargp.c" 49/13] access to incomplete type
ctc W523: ["unistd/lib_getoptargp.c" 49/13] pointers to different types at return
Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
2024-11-01 23:03:23 +08:00
wangmingrong1
d13dc86f16
libxx/patch: Remove jira information and change-id
...
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-11-01 23:01:16 +08:00
yinshengkai
e04853536d
mm: fix tlsf compiler error
...
error: ‘nodesize’ undeclared (first use in this function)
518 | memset(mem, MM_FREE_MAGIC, nodesize);
tlsf/mm_tlsf.c:1288:10: warning: unused variable ‘newsize’ [-Wunused-variable]
1288 | size_t newsize;
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-11-01 11:44:14 -03:00
Eren Terzioglu
3796f56748
esp32[s2|s3]: Add I2C bitbang support
2024-11-01 11:41:46 -03:00
Eren Terzioglu
4afaef1a30
esp32[c3|c6|h2]: Add I2C bitbang supoort
2024-11-01 11:41:46 -03:00
Michal Lenc
9930a64de7
docs: add nxboot documentation entry
...
This commit adds documentation entry for NuttX based bootloader nxboot.
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2024-11-01 11:32:44 -03:00
nuttxs
3818ce8268
sys/socket: use __attribute__((packed)) to avoid changes in
...
the size of struct sockaddr_storage due to struct alignment
2024-11-01 11:15:54 -03:00
yinshengkai
a14b97b98b
sim: add note related configuration
...
Ensure that CI can cover all note code
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-11-01 17:00:11 +08:00
ouyangxiangzhen
17c51c0667
userspace: Exclude nuttx/arch.h
...
This patch fixed userspace headers conflict. Architecture-related definition and API should not be exposed to users.
Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2024-11-01 16:59:37 +08:00
Alin Jerpelea
b271507c9f
AUTHORS: add Felipe Moura Oliveira
...
Felipe Moura Oliveira has submitted the ICLA and should be added to
the AUTHORS file
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-11-01 11:52:07 +08:00
dongjiuzhu1
47478e543d
fs/shm: support shm_open with flags O_TRUNC
...
testcase:
https://fossies.org/linux/posixtestsuite/conformance/interfaces/shm_open/25-1.c
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-10-31 18:47:51 -03:00
cuiziwei
d1e5b38b9b
nuttx/semaphore: Move define CONFIG_SEM_PREALLOCHOLDERS to include/semaphore.h.
...
Move CONFIG_SEM_PREALLOCHOLDERS to include/semaphore.h to avoid undefined issues from occurring in other places as well.
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-10-31 18:37:53 +08:00