Commit Graph

5847 Commits

Author SHA1 Message Date
Xiang Xiao
2385718f1c graphics/nxwidgets: Fix the compiler warning
src/cprogressbar.cxx: In member function 'virtual void NXWidgets::CProgressBar::drawContents(NXWidgets::CGraphicsPort*)':
Error: src/cprogressbar.cxx:185:22: error: '%d' directive writing between 1 and 8 bytes into a region of size 6 [-Werror=format-overflow=]
  185 |       sprintf(text, "%d%%", (100 * m_value) / (m_maximumValue - m_minimumValue));
      |                      ^~
src/cprogressbar.cxx:185:21: note: directive argument in the range [-3276800, 3276800]
  185 |       sprintf(text, "%d%%", (100 * m_value) / (m_maximumValue - m_minimumValue));
      |                     ^~~~~~
src/cprogressbar.cxx:185:14: note: 'sprintf' output between 3 and 10 bytes into a destination of size 6
  185 |       sprintf(text, "%d%%", (100 * m_value) / (m_maximumValue - m_minimumValue));
      |       ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-07 00:58:19 +08:00
Xiang Xiao
18bb3331f3 netutils/webserver: Fix the compiler warning
httpd_dirlist.c: In function 'httpd_dirlist':
Error: httpd_dirlist.c:199:40: error: '%s' directive output may be truncated writing up to 255 bytes into a region of size 128 [-Werror=format-truncation=]
  199 |       snprintf(path, CONFIG_NAME_MAX, "%s/%s",
      |                                        ^~
httpd_dirlist.c:199:7: note: 'snprintf' output between 2 and 385 bytes into a destination of size 128
  199 |       snprintf(path, CONFIG_NAME_MAX, "%s/%s",
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  200 |                file->path, dent->d_name);
      |                ~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-07 00:58:19 +08:00
Xiang Xiao
65a02ba9f9 system/nxplayer: Fix the compiler warning
nxplayer.c: In function 'nxplayer_playinternal':
Error: nxplayer.c:209:36: error: '%s' directive output may be truncated writing up to 99 bytes into a region of size 59 [-Werror=format-truncation=]
  209 |   snprintf(buf, sizeof(buf), "GET /%s HTTP/1.0\r\n\r\n", relurl);
      |                                    ^~                    ~~~~~~
nxplayer.c:209:3: note: 'snprintf' output between 19 and 118 bytes into a destination of size 64
  209 |   snprintf(buf, sizeof(buf), "GET /%s HTTP/1.0\r\n\r\n", relurl);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: nxplayer.c:1809:42: error: 'snprintf' output may be truncated before the last format character [-Werror=format-truncation=]
 1809 |       snprintf(path, sizeof(path), "%s/%s", pplayer->mediadir, pfilename);
      |                                          ^
nxplayer.c:1809:7: note: 'snprintf' output 2 or more bytes (assuming 129) into a destination of size 128
 1809 |       snprintf(path, sizeof(path), "%s/%s", pplayer->mediadir, pfilename);
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: nxplayer.c:359:53: error: '%s' directive output may be truncated writing up to 128 bytes into a region of size 53 [-Werror=format-truncation=]
  359 |           snprintf(path,  sizeof(path), "/dev/audio/%s", pdevice->d_name);
      |                                                     ^~
nxplayer.c:359:11: note: 'snprintf' output between 12 and 140 bytes into a destination of size 64
  359 |           snprintf(path,  sizeof(path), "/dev/audio/%s", pdevice->d_name);
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-07 00:58:19 +08:00
Xiang Xiao
44b92d9254 Fix readline_common.c:277:19: error: 'strncpy' destination unchanged after copying no bytes
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-06 00:40:06 +08:00
Xiang Xiao
d4290b3e93 Fix error: 'memset' forming offset [16, 27] is out of the bounds [0, 16] of object 'inaddr' with type 'union <anonymous>'
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-05 17:02:43 +01:00
Xiang Xiao
3afd1234e0 netutils/netlib: Fix error: 'strncpy' specified bound 16 equals destination size
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-04 22:05:14 +02:00
Xiang Xiao
f31cc67da8 netutils/usrsock_rpmsg: Switch the nonblocking mode by psock_ioctl instead
since it's more simpler than psock_ioctl

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-04 14:00:29 +02:00
Xiang Xiao
02a095bb76 system/adb: Download the last version of microADB
commit aa9c64896c7d47478656928d4dcf9b1a5e346da7
Author: Xiang Xiao <xiaoxiang@xiaomi.com>
Date:   Sat Jan 22 16:41:23 2022 +0800

    remove NuttX special code

    since the new libuv porting for NuttX doesn't need the special process

    Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-04 09:00:30 +02:00
Xiang Xiao
29374c96c3 system/adb: Replace NuttX special shell service with microADB builtin one
since the new libuv porting support uv_proccess_t now

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-04 09:00:30 +02:00
Xiang Xiao
77382e7209 process-spawn.c: switch uv_socketpair to uv_pipe
to remove the socket dependence

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-04 09:00:30 +02:00
Xiang Xiao
997379d14e netutils/webserver: Fix the compiler error when -no-builtin is removed
Error: httpd.c:671:7: error: 'strncpy' output truncated before terminating nul copying 12 bytes from a string of the same length [-Werror=stringop-truncation]
  671 |       strncpy(pstate->ht_filename, "/" CONFIG_NETUTILS_HTTPD_INDEX,
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  672 |               strlen("/" CONFIG_NETUTILS_HTTPD_INDEX));
      |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-03 12:49:35 +02:00
Xiang Xiao
f0bb6cf914 system/libuv: Switch process.c to process_spawn.c
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-02 23:41:32 +08:00
Huang Qi
9439fd8c79 Ignore .context (follow NuttX main repo)
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-03-02 15:54:45 +08:00
Xiang Xiao
82b94fc76f Simplify DEFAULT_SMALL usage in Kconfig
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-01 22:46:47 +08:00
Xiang Xiao
7872332284 libuv: Remove unsupported case from test list
And some minor changes:
* Remove no-proctitle.c from CSRCS since there is a implementation in nuttx.c
* Add sysinfo-[loadavg|memory].c to CSRCS to provide system info

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-03-01 13:52:34 +08:00
Huang Qi
cc156b908e ostest: Introduce basic setjmp/longjmp test
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-03-01 12:03:31 +08:00
Huang Qi
9351ab50d5 system/libuv: Bump to v1.42.0
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-02-28 18:05:00 +08:00
Huang Qi
a79195a048 system/adb: Remove unsed macro __NUTTX__
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-02-28 18:05:00 +08:00
Piet
aa2c9e7c33 hello_rust: changes for target support 2022-02-25 23:22:24 +08:00
Alan C. Assis
0baf524def apps: Modify oneshot example to let users see it working 2022-02-25 11:55:10 +08:00
Alin Jerpelea
18609ab1df mlearning: cmsis: enable FPU support
In case of HW with FPU we can benefit from the FPU support.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-02-24 11:26:27 -03:00
zhanghu6
18b5902a3e apps/trace: add switch and dump instrumentation
usage:
    trace switch switch [+|-]
                             Configure switch trace filter

    trace print [+|-]
                             Configure dump trace filter

Signed-off-by: zhanghu6 <zhanghu6@xiaomi.com>
2022-02-24 10:23:50 -03:00
anjiahao
4680a25a8c cmd_dd:if read nbyte less than bs,must write nbyte
if a file size is 10
use dd if=a of=b bs = 8
b file size will 16, is a error
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-02-24 10:21:33 -03:00
Jiuzhu Dong
283b1a4dfc nshlib/cmd_memdump: support new command: memdump
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-02-24 02:16:00 +08:00
Jiuzhu Dong
372621ed06 nshlib/ps: support display heap info for every task by cmd ps
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-02-24 02:16:00 +08:00
Alin Jerpelea
67c05f172b mlearning: cmsis: libcmsisdsp: simplify config naming
the extra function configuration name can be simplified
for better readability

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-02-24 00:56:22 +08:00
Alin Jerpelea
a943184ab2 NNABLA: build as a module
NNABLA_RT should compile as a module to provide the necessary support
for the dnn test application

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-02-23 21:57:25 +08:00
Alin Jerpelea
0ee15da565 cmsis: build CMSIS support as a module
CMSIS should compile as a module to provide the necessary support
for the dnn test application

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-02-23 21:57:25 +08:00
Alin Jerpelea
0c69ccea18 libcmsisnn: add the new CHW functionality
The patch for CHW functionality has been added as a result we
can compile the new functions

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-02-23 21:57:25 +08:00
Ville Juven
c1453b589d BUILD_KERNEL: Include CPP libraries only if configured to do so
Otherwise build without HAVE_CXX flag fails
2022-02-23 19:47:32 +08:00
Xiang Xiao
0b722cc864 nshlib: Remove format variable from date_showtime
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-23 01:21:44 +08:00
Xiang Xiao
4cc0c755bf Remove CONFIG_CLOCK_MONOTONIC special code
since this opion doesn't exist anymore

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-23 01:21:44 +08:00
Xiang Xiao
bc5d1165aa Replace cygpath with CONVERT_PATH
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-20 16:08:10 +01:00
Xiang Xiao
45af16099b interpreters/duktape: Remove v from tar command
to avoid the verbose unzip message

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-20 15:53:27 +01:00
Xiang Xiao
497c69c514 graphics/nxwidgets: Rename ARCHCPUFLAGS[XX] to ARCHC[XX]FLAGS
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-20 15:52:43 +01:00
raiden00pl
fbb09ff128 foclib/fixed16: add support for observers 2022-02-20 21:55:14 +08:00
raiden00pl
52beb5f717 industry/foc/float: cosmetics 2022-02-20 21:55:14 +08:00
Piet
c1757660a6 apps: hello_rust example program 2022-02-20 07:37:29 +08:00
raiden00pl
7df20da96c industry/foc: refactor and fixes for angle observers 2022-02-20 07:36:36 +08:00
raiden00pl
8422f9c3f9 industry/foc: remove choice option for angle observers 2022-02-20 07:36:36 +08:00
raiden00pl
c16f1408a6 industry/foc: update comments 2022-02-20 07:36:36 +08:00
raiden00pl
d76a7c242b industry/foc: fix compilation for smo 2022-02-20 07:36:36 +08:00
raiden00pl
d6cdc5a423 industry/foc: rename dir to sensor_dir to be clear that it relates to the direction of the sensor, no movement direction 2022-02-20 07:36:36 +08:00
zouboan
34e4da2304 industry/foc: add support for angle from sensorless observer 2022-02-19 15:37:35 +01:00
Piet
df6b892c4b apps: Enable Rust based application. 2022-02-19 17:59:13 +08:00
Alin Jerpelea
02a50ccb1f mlearning: CMSIS NN: add support for the CHW tensor layout
- support float version of convolution
 - support the CHW tensor layout

following function prototypes are added:
 - arm_convolve_CHW_f32_basic_nonsquare()
 - arm_convolve_CHW_q15_basic_nonsquare()
 - arm_convolve_CHW_q7_basic_nonsquare()
 - arm_nn_CHW_mat_mult_kernel_q7_q15()

NOTE:this patch will be contributed to SMSIS and reverted later from NuttX
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-02-19 00:54:49 +08:00
Xiang Xiao
a6773a8412 tools/mksymtab.sh: Disable the mismatch warning of builtin declaration
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-18 09:04:57 +01:00
raiden00pl
81f15936c1 examples/foc/foc_parseargs.c: fix help message 2022-02-17 10:30:41 +01:00
raiden00pl
95b1625a6d examples/foc/foc_motor: store the configured FOC run mode in a separate variable
The controller mode can change during example execution and depends on the thread state (IDENT [not yet upstream] / ALIGN / RUN)
2022-02-17 10:30:41 +01:00
Xiang Xiao
b1276ea1b4 system/adb: Change the default value of ADBD_PAYLOAD_SIZE to 1024
improve the speed of "adb push" and "adb pull"

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-17 05:26:27 +01:00