[checkkconfig.py] is a tool that simulates the effects of modifying a CONFIG item,
Can be used to check whether my config changes are what I expected.
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
- fix chip/imxrt_clockconfig_ver1.h:23: error: header guard '__ARCH_ARM_SRC_IMXRT_IMXRT_CLOCKCONFIG_VER1_H' followed by '#define' of a different macro [-Werror=header-guard]
Signed-off-by: simbit18 <simbit18@gmail.com>
the MTD ERASE interface has inconsistent return values.
Some implementations return the number of erased sectors,
while others return OK (0). It is currently recommended
to uniformly treat ERASE success as OK. Therefore, the
logic for judging the return value of MTD_ERASE in the
FTL erase interface should be changed to check if it is
greater than 0.
Signed-off-by: jingfei <jingfei@xiaomi.com>
Since there is a storage device like RRAM that doesn't
require erasing, the MTD erase function may not exist.
Here, we should first check whether the erase interface
exists before performing the erasing operation.
Signed-off-by: jingfei <jingfei@xiaomi.com>
Accessing RRAM/MRAM from the FTL interface can
cause errors because RRAM lacks an erase interface.
To make RRAM/MRAM compatible with FTL, the FTL layer
erase interface needs to be modified.
Signed-off-by: jingfei <jingfei@xiaomi.com>
When there's no erase function for mtd, we decide if we
need erase_buffer based on this:
1. If we've got bad block marking, we still need the erase buffer.
If a write fails, it's used to read back the entire bad block's
contents before writing to a new block.
2. If we don't have bad block marking, the erase buffer isn't
needed and can be skipped.
Signed-off-by: jingfei <jingfei@xiaomi.com>
the -ffunction-sections and -fdata-sections are also supported by
greenhills, and these two compile options can benefit with section
layout optimization, and thus reduce the final image size
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
According to the Greenhills documentation, the "-Wall" option is
deprecated for use. Instead, the "-ghstd=last" option is recommended.
Compared with "-Wall", the "-ghstd=last" option can capture more
warnings and has stricter rules.
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
Add the generic _IO() macro and aliases for FS_IOC_GETFLAGS and FS_IOC_SETFLAGS,
aligning the ioctl.h definitions with the Linux kernel API to improve source
compatibility when porting LTP linux kernel testcase code to NuttX
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
This fix forces libcxxabi to parse typeinfo ptr in absolute relocation instead of GOT-REL.
Signed-off-by: v-zhangxiaomeng5 <v-zhangxiaomeng5@xiaomi.com>
To simplify the handling of Block devices and MTD devices,
the unique_chardev and unique_blkdev functions now use local
variable names instead of allocating device names from the heap.
Signed-off-by: jingfei <jingfei@xiaomi.com>
Fix typo in CMakeLists.txt: CONFIG_LIB_USRWORK → CONFIG_LIBC_USRWORK.
This ensures work_usrthread.c, work_queue.c, and work_cancel.c are compiled
when the user work queue feature is enabled.
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
In Green Hills, if the name of the file to be preprocessed ends with ".ld",
this file must be renamed to ".ld.i". Otherwise, the following error will be reported:
ccarm: Error: -o out/build/cmake_out/mann_dcu_evb_ghs_ap/gnu-elf.ld has wrong suffix for -P option (expect .i)
Currently, based on the documentation and actual operations, only files
ending with "*.ld" can trigger this preprocessing error. There are no such
issues in other cases.
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
Add WLAN_STA_STATE_DISCONNECTED state to prevent race conditions or invalid state handling during disconnect.
Signed-off-by: liqinhui <liqinhui@xiaomi.com>
This commit removes the dependency of the fakesensor API on
`SENSORS_GNSS`. All of the logic for handling fake GNSS sensors is
conditionally compiled only if GNSS features are enabled. Other fake
sensors can be used without GNSS logic being included in the build.
Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
according to the posix standard: the default action for SIGURG is to
ignore the signal, we need to add the default sigaction handler for
SIGURG
this fix the /tset/ANSI.os/signal/signal_X/T.signal_X testcase
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
During the autoconfig process, if the user modifies the link local
address while waiting for the Router Advertisement message, a crash will
occur when sending the ICMPv6 Neighbor Advertisement message because
netdev_ipv6_lladdr returns NULL.
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
Use arc4random_buf instead of rand() to improve randomness quality and avoid using weak PRNG for MAC generation.
Signed-off-by: liqinhui <liqinhui@xiaomi.com>
The hrtimer is designed to replace the wdog timer in future, so it
should have the callback function in its API. The evaluation results showed there is no any
performance degradation since the CPU pipeline can hide the latency.
This commit also decoupled the rb-tree implementation with the pending
state checking.
Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
the -fmacro-prefix-map compile option is gcc/clang/armclang specific
compile option, and greenhills do not recognize this compile option, if
we add this option is CMakeLists.txt, the following warning will be
reported when each file is being compiled:
ccarm: Warning: Unknown option "-fmacro-prefix-map=/home/guoshichao/work_profile/vela_os/vela_car_5/nuttx=" passed to linker
ccarm: Warning: Unknown option "-fmacro-prefix-map=/home/guoshichao/work_profile/vela_os/vela_car_5/apps=" passed to linker
ccarm: Warning: Unknown option "-fmacro-prefix-map=/home/guoshichao/work_profile/vela_os/vela_car_5/vendor/flagchip/boards/mann/dcu/fc4150f1m-labm_a1=" passed to linker
ccarm: Warning: Unknown option "-fmacro-prefix-map=/home/guoshichao/work_profile/vela_os/vela_car_5/vendor/flagchip/chips/fc4150=" passed to linker
ccarm: Warning: Unknown option "-fmacro-prefix-map=/home/guoshichao/work_profile/vela_os/vela_car_5/nuttx=" passed to linker
ccarm: Warning: Unknown option "-fmacro-prefix-map=/home/guoshichao/work_profile/vela_os/vela_car_5/apps=" passed to linker
ccarm: Warning: Unknown option "-fmacro-prefix-map=/home/guoshichao/work_profile/vela_os/vela_car_5/vendor/flagchip/boards/mann/dcu/fc4150f1m-labm_a1=" passed to linker
ccarm: Warning: Unknown option "-fmacro-prefix-map=/home/guoshichao/work_profile/vela_os/vela_car_5/vendor/flagchip/chips/fc4150=" passed to linker
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
Avoid the errno changed after interrupt in sim and make return value
mistake when according to errno.
Move host_errno_convert from macro to sim_errno.c.
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
We will remove the API in next commit, so remove the errno manual save
API and save errno more commonly.
After whole pull request, should no longer need to care about errno.
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
This reverts commit ac5b38c9e5.
Keep host_errno_convert as a common interface in sim_internal.h
Keep the up_irq_save & up_irq_restore as common interface
Signed-off-by: buxiasen <buxiasen@xiaomi.com>