Commit Graph

7690 Commits

Author SHA1 Message Date
cuiziwei
dcf1a05956 fix build warning to [-Wstringop-overflow=].
mbedtls/library/alignment.h:98:5: warning: writing 4 bytes into a region of size 0 [-Wstringop-overflow=]
   98 |     memcpy(p, &x, sizeof(x));
      |     ^~~~~~~~~~~~~~~~~~~~~~~~
mbedtls/library/cmac.c: In function 'mbedtls_cipher_cmac_finish':
mbedtls/library/cmac.c:288:19: note: at offset 20 into destination object 'M_last' of size 16
  288 |     unsigned char M_last[MBEDTLS_CIPHER_BLKSIZE_MAX];
      |                   ^~~~~~

Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-08-20 15:27:34 +08:00
SPRESENSE
fb17471673 netutils/webclient: Fix the coding style 2024-08-20 15:23:59 +08:00
SPRESENSE
66f6e5f048 netutils/webclient: Fix bug that the socket is not close
Fix to close socket when it fails to resolve hostname.
2024-08-20 15:23:59 +08:00
liuhongchao
913792c7be libyuv: Export libyuv include
Signed-off-by: liuhongchao <liuhongchao@xiaomi.com>
2024-08-20 14:48:50 +08:00
liuhongchao
c054dfef76 libyuv: Add CMake for libyuv
Signed-off-by: liuhongchao <liuhongchao@xiaomi.com>
2024-08-20 14:48:50 +08:00
xuxin19
b79727c985 cmake:change lvgl CMake porting scripts
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-08-20 14:48:50 +08:00
Xu Xingliang
9bffd840b9 lvgl/cmake: export lvgl header
Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
2024-08-20 14:48:50 +08:00
Xu Xingliang
5165ad8422 lvgl/cmake: link external library if required
Signed-off-by: Xu Xingliang <xuxingliang@xiaomi.com>
2024-08-20 14:48:50 +08:00
pengyiqiang
bdc0c006bd lvgl/Makefile: add LV_SYSMON_GET_IDLE and LV_PROFILER porting
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
2024-08-20 13:37:56 +08:00
meijian
a9ff36b2a4 nng/clock: fix the timer clock is affected by UTC update bug
Signed-off-by: meijian <meijian@xiaomi.com>
2024-08-19 16:49:57 -03:00
meijian
68577f76f0 netutils/nng: add cmake for nng
Signed-off-by: meijian <meijian@xiaomi.com>
2024-08-19 16:49:57 -03:00
meijian
35a26eafea netutils/nng: fix nng compile warnings on some platforms
Signed-off-by: meijian <meijian@xiaomi.com>
2024-08-19 16:49:57 -03:00
meijian
8fa5fd8adc netutils: porting NNG-v1.5.2 for nuttx
1.fix build warings
2.add thread name for nuttx
3.add config to set thread stack-size
4.fix urandom memleak

Signed-off-by: meijian <meijian@xiaomi.com>
2024-08-19 16:49:57 -03:00
xuxin19
cfa6c5deb8 Make.dep:ensure that Make.dep in the .depend phase is always regenerated
according to the dependency of the .depend target, Make.dep is always generated additionally when src is modified.
this will cause the Make.dep file to gradually increase in size during each incremental compilation, causing the Makefile to take longer to load.

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-08-19 16:48:45 -03:00
xuxin19
6770bcc61d Application.mk:bugfix mkdep result was Overwritten when there are too many files
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-08-19 16:48:45 -03:00
liuhongchao
ad95f7306f apps: Fix input simulates touch reporting error
Signed-off-by: liuhongchao <liuhongchao@xiaomi.com>
2024-08-20 02:51:01 +08:00
liuhongchao
3291c43db3 drivertest: Fix cmocka_driver_framebuffer is not displayed
Signed-off-by: liuhongchao <liuhongchao@xiaomi.com>
2024-08-20 02:50:29 +08:00
liuhongchao
23278f4558 apps/dirvertest: Fix cmocka --list serial port hang
Signed-off-by: liuhongchao <liuhongchao@xiaomi.com>
2024-08-20 02:50:29 +08:00
liuhongchao
7efa80aa51 apps/drivertest: Fix run cmocka_driver_framebuffer No display on the screen
Signed-off-by: liuhongchao <liuhongchao@xiaomi.com>
2024-08-20 02:50:29 +08:00
liuhongchao
0d9b8a8fbf drivertest: Fix run cmocka_driver_touchpanel crash
Signed-off-by: liuhongchao <liuhongchao@xiaomi.com>
2024-08-20 02:50:29 +08:00
liuhongchao
6ec9d880c4 drivertest: Fix No display when running cmocka_driver_framebuffer
Signed-off-by: liuhongchao <liuhongchao@xiaomi.com>
2024-08-20 02:50:29 +08:00
guoshichao
573008244c greenhills: fix the variable unused warning
"nsh_parse.c", line 1565: warning #550-D: variable "quoted" was set but never
          used
    bool quoted;
         ^

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-08-20 02:50:13 +08:00
guoshichao
fa22160cb0 apps: update .gitignore rule to exclude "*.inf" file
the "*.inf" file are intermediate compilation output from greenhills
compiler, we do not need to trace these files

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-08-20 02:50:13 +08:00
guoshichao
7b5e54cd7b ostest/fpu.c: fix the greenhills compile warning
CC:  binfmt_unregister.c "fpu.c", line 98: warning #1160-D: a reduction in alignment without the
          "packed" attribute is ignored
    uintptr_t save1[XCPTCONTEXT_REGS] aligned_data(XCPTCONTEXT_ALIGN);
              ^

"fpu.c", line 99: warning #1160-D: a reduction in alignment without the
          "packed" attribute is ignored
    uintptr_t save2[XCPTCONTEXT_REGS] aligned_data(XCPTCONTEXT_ALIGN);
              ^

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-08-20 02:50:13 +08:00
jianglianfang
7abd0a7303 lvgldemo: fix uninit_use_in_call
Signed-off-by: jianglianfang <jianglianfang@xiaomi.com>
2024-08-20 02:49:34 +08:00
zhanghongyu
acf9e3679e netutils/iptables: add cmake support.
add cmake support for xtables.c, solves the problem of missing symbols
when compiling with cmake

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-08-20 02:48:49 +08:00
meijian
2e929bdf15 netutils/mqttc: add cmake support
Signed-off-by: meijian <meijian@xiaomi.com>
2024-08-20 02:48:22 +08:00
zhanghongyu
972594604c libcoap: fix makefile compile error after menuconfig
correct the LIBCOAP_VERSION format

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-08-20 02:46:43 +08:00
jinxiuxu
8ebab7657f apps/nxplayer: add ioctl stop when play completed
Signed-off-by: jinxiuxu <jinxiuxu@xiaomi.com>
2024-08-20 01:43:20 +08:00
guoshichao
9bfe138087 greenhills: fix the unknow build options warning
CC:  symtab_apps.c ccarm: Warning: Unknown option "-fno-lto" passed to linker
ccarm: Warning: Unknown option "-fno-builtin" ignored.  Did you mean "-fno-common"?

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-08-18 20:15:10 +08:00
guoshichao
a6094d81bb apps/canutils: fix the build warning on greenhills compiler
CC:  stdlib/lib_srand.c "candump.c", line 231: warning #550-D: variable "ret" was set but never used
  	int opt, ret;
  	         ^

"candump.c", line 101: warning #550-D: variable "cmdlinename" was set but
          never used
  static char *cmdlinename[MAXSOCK];
               ^

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-08-18 20:05:46 +08:00
guoshichao
8cb59a75ea ltp: fix the build warning
the warning are:
ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/18-1.c:163: warning: "NSIG" redefined
  163 | #define NSIG (sizeof(signals)/sizeof(int))
      |
In file included from /home/guoshichao/work_profile/vela_os/vela_ltp_1/nuttx/include/pthread.h:35,
                 from ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_sigmask/18-1.c:31:
/home/guoshichao/work_profile/vela_os/vela_ltp_1/nuttx/include/signal.h:53: note: this is the location of the previous definition
   53 | #define NSIG            _NSIG           /* _NSIG variant commonly used */

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-08-18 20:00:57 +08:00
guoshichao
4e9ae2d45a ltp: fix the link error raised by "proc.h" inclusion error
the link error are:
arm-none-eabi-ld: /home/guoshichao/work_profile/vela_os/vela_ltp_1/nuttx/staging/libapps.a(1-4.c.home.guoshichao.work_profile.vela_os.vela_ltp_1.apps.testing.ltp_3.o): in function `tst_process_state_wait3':
/home/guoshichao/work_profile/vela_os/vela_ltp_1/apps/testing/ltp/ltp/testcases/open_posix_testsuite/include/proc.h:63: multiple definition of `tst_process_state_wait3'; /home/guoshichao/work_profile/vela_os/vela_ltp_1/nuttx/staging/libapps.a(1-3.c.home.guoshichao.work_profile.vela_os.vela_ltp_1.apps.testing.ltp_3.o):/home/guoshichao/work_profile/vela_os/vela_ltp_1/apps/testing/ltp/ltp/testcases/open_posix_testsuite/include/proc.h:63: first defined here

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2024-08-18 20:00:57 +08:00
chenrun1
12012f2276 cachespeed:Fixed the problem of printing variables in 32/64-bit environment
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-08-18 03:14:24 +08:00
chenrun1
57cb20b63a ramtest:Fixed the problem of printing variables in 32/64-bit environment
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-08-18 03:14:24 +08:00
zhangchao53
204326c236 porting fake function framework 2024-08-17 13:46:03 +08:00
zhangchao53
f841ca16eb enable superpi cmake 2024-08-17 00:08:22 +08:00
Shoukui Zhang
7df20ea1bb nshlib: Optimize the size of the recursive stack
Signed-off-by: Shoukui Zhang <zhangshoukui@xiaomi.com>
2024-08-16 19:48:18 +08:00
zhangshoukui
7503f7bf33 popen: Replace fcntl with ioctl
The fcntl interface sets the O_CLOEXEC property by calling the ioctl interface. Let's call the ioctl interface directly.

Signed-off-by: zhangshoukui <zhangshoukui@xiaomi.com>
2024-08-16 19:48:18 +08:00
zhangshoukui
ff85c8c0d9 fstest: If the file is deleted it will not be opened
Signed-off-by: zhangshoukui <zhangshoukui@xiaomi.com>
2024-08-16 19:48:18 +08:00
Xin Xu
fe51fed1e6 Revert "cmake:builtin register support NONE srcs target"
This reverts commit bcf655e196.
2024-08-16 15:21:50 +08:00
xuxin19
bcf655e196 cmake:builtin register support NONE srcs target
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-08-15 13:37:24 +08:00
Daniel Jasinski
1fdf13478f build: Missing CMakeLists.txt for bas
This correctly enables BASIC interpreter in CMake based
build for at least sim:bas board configuration.

Signed-off-by: Daniel Jasinski <jasinskidaniel95szcz@gmail.com>
2024-08-11 10:22:34 +08:00
Marco Casaroli
0797ee2312 fix(nsh_parse): handle env variables correctly
The PR #2469 broke handling of environment variables because an
error in the if/else if control flow.

This fixes it.
2024-08-10 11:08:18 -03:00
Marco Casaroli
e46347ec1b nsh_fileapp: handle input redirection 2024-08-08 19:19:18 -03:00
Marco Casaroli
8fba726a7d feat(nsh_cat): allow cat to read from stdin
Now, if we run cat without arguments, it will just read from stdin.

It can be used with redirect like `cat < infile > outfile`.
2024-08-08 19:19:18 -03:00
Marco Casaroli
4104019e1c feat(nsh): add console read
This allows programs such as `cat` to read from the console (that could be redirected).
2024-08-08 19:19:18 -03:00
Marco Casaroli
96100b30f2 feat(nsh): input (stdin) redirection
This adds support for `<` to redirect input on nsh commands.
2024-08-08 19:19:18 -03:00
chenrun1
875f2fcc1e ramspeed:Fix memleak due to double malloc.
if (allocate_rw_address)
    {
      info->dest = malloc(info->size);
      info->src = malloc(info->size);
    }
  if ((info->dest == NULL && !info->allocate_rw_address) || info->size == 0)
    {
      printf(RAMSPEED_PREFIX "Missing required arguments\n");
      goto out;
    }
  else
    {
      /* We need to automatically apply for memory */
      printf(RAMSPEED_PREFIX "Allocate RW buffers on heap\n");
      info->dest = malloc(info->size);
      if (info->dest == NULL)
        {
          printf(RAMSPEED_PREFIX "Dest Alloc Memory Failed!\n");
          goto out;
        }
      info->src = malloc(info->size);
      if (info->src == NULL)
        {
          printf(RAMSPEED_PREFIX "Src Alloc Memory Failed!\n");
          goto out;
        }
    }

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-08-08 09:51:55 +08:00
chenrun1
e04782816f ramspeed:Add log printing & improve test accuracy & optional test cases
1.Add more print logs

ramspeed -w 0x61ba15c0 -s 524288 -n 10000 -i
RAM Speed: Write address: 0x0x61ba15c0
RAM Speed: Read address: 0x0
RAM Speed: Size: 524288 bytes
RAM Speed: Value: 0x00
RAM Speed: Repeat number: 10000
RAM Speed: Interrupts disabled: true

2.Improve test accuracy, now print in double type in us time unit

______Perform 32 Bytes access______
RAM Speed: system memset():      Rate = 625000.000 KB/s [cost: 0.500 ms]
RAM Speed: internal memset():    Rate = 240384.615 KB/s [cost: 1.300 ms]

3. Optional test item, if we do not pass in the src address, only memset will be executed

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-08-08 09:51:55 +08:00