Commit Graph

4931 Commits

Author SHA1 Message Date
YAMAMOTO Takashi
aa0aa73250 nsh_netcmds.c: Adapt to the new webclient api
As a bonus, check and report errors from write().

tested as: "nsh> wget http://example.com/"
2020-10-01 15:32:25 +08:00
YAMAMOTO Takashi
a1db71fa43 webclient improvements
Highlights:

* TLS support (a hook to allow users to provide TLS implementation)
* ability to add extra request headers
* ability to use PUT method
* ability to report http status
* error handling improvements

Proposed on the ML while ago:
https://www.mail-archive.com/dev@nuttx.apache.org/msg03803.html

The original API is kept for now.
I plan to remove them after adapting the existing users.
(examples in this repo)
2020-10-01 15:32:25 +08:00
Bhindhiya
07f2318fae Add renesas precheck 2020-10-01 12:19:14 +08:00
David Sidrane
ff866b9527 fsutils:ipcfg Fix fd propagation as return value in bin mode
With CONFIG_IPCFG_BINARY lit. ipcfg_open needs to return
   the fd or an -errno. It was returning OK not the fd.
2020-09-30 14:09:18 -06:00
David Sidrane
17c34df3b9 fsutils:ipcfg Fix range checking for PRTOCOL in bin mode 2020-09-30 14:09:18 -06:00
David Sidrane
16dc85417b fsutils:ipcfg Add extern 'C' under cpp 2020-09-30 14:09:18 -06:00
YAMAMOTO Takashi
39a1950098 wgetjson: Fix a super confusing printf message 2020-09-30 08:22:16 +02:00
YAMAMOTO Takashi
b05a1f61e2 wgetjson_json_item_scan: fix a NULL dereference
I'm not sure if this is the correct fix.
wgetjson_json_item_callback seems to expect it to be formatted
as "(null)".
2020-09-30 08:22:16 +02:00
YAMAMOTO Takashi
b5d7004a8d examples/wgetjson/Kconfig: fix a typo 2020-09-30 08:22:16 +02:00
YAMAMOTO Takashi
b78370dbf2 webclient: move WGET_USE_URLENCODE definiton to the header
Because it's used by the header.

This fixes warnings while building wgetjson.
2020-09-30 08:22:16 +02:00
Gregory Nutt
5e1ba408b4 Add IPv4 Configuration File Access Helper
This commit adds support to access an IPv4 Configuration file similar to the Linux dhpc.client ipfcg file.  This version, tailored for deeply embedded systems supports several options to tailor the file and file access to different environments.  It supports:

- Writable as well as read-only configuration files.
- ASCII human readable files as well as smaller binary files.
- It supports using character driver access to constrained media (such as EEPROM).
- Add examples/ipcfg to exercise IPv4 Configuration File support
2020-09-29 12:24:07 -07:00
Huang Qi
1efc805b4e interpreters/wamr: Bump to latest release.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2020-09-29 08:45:31 +01:00
YAMAMOTO Takashi
f9ae5608ef examples/wgetjson/wgetjson_main.c: nxstyle fixes
The rest of errors are about cJSON identifiers:

    wgetjson_main.c:181:2: error: Mixed case identifier found
    wgetjson_main.c:183:9: error: Mixed case identifier found
    wgetjson_main.c:186:37: error: Mixed case identifier found
    wgetjson_main.c:190:12: error: Mixed case identifier found
    wgetjson_main.c:191:6: error: Mixed case identifier found
    wgetjson_main.c:203:39: error: Mixed case identifier found
    wgetjson_main.c:256:36: error: Mixed case identifier found
    wgetjson_main.c:283:2: error: Mixed case identifier found
    wgetjson_main.c:286:9: error: Mixed case identifier found
    wgetjson_main.c:289:37: error: Mixed case identifier found
    wgetjson_main.c:295:6: error: Mixed case identifier found
2020-09-29 14:15:26 +08:00
saramonteiro
c4ed4445f4 fixed dev name size 2020-09-27 18:18:13 -03:00
saramonteiro
d2463021a9 fixed some coding styles issues 2020-09-27 18:18:13 -03:00
saramonteiro
32f193a7e2 Added timer device path as a CLI option 2020-09-27 18:18:13 -03:00
Huang Qi
c26d662951 interpreters/wamr: Add configs for heap pool & custom name sections
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2020-09-27 19:42:08 +01:00
y
51a96ce935 system/nxplayer/nxplayer_main.c: fix '%d' missing in sscanf
Change-Id: Ie69c9d4c38c7d6fe926788c67b992d3922b74d8c
2020-09-27 04:57:12 -07:00
licheng
a375f64f81 nxplayer&nxrecoder: add channel map support
Change-Id: I5e5534e7330d816533a6894cf3cd8c4e19984c6f
Signed-off-by: ligd <liguiding1@xiaomi.com>
2020-09-27 00:35:49 -07:00
Gregory Nutt
ad233b5a97 apps/examples/nxterm: Remove duplicated fflush() call.
fflush(stdout) was called twice to back-to-back.
2020-09-22 10:28:54 -07:00
ligd
df389bc332 apps/Application.mk: fix compile assmbely error
Change-Id: Ia611ed0753dbfd861cc8f5e2bff71bc305a47657
2020-09-21 09:16:02 +02:00
Masayuki Ishikawa
e8a353af05 netutils: dhcpc: Fix dhcpc.c
Summary:
- dhcpc now uses gethostname() but the hostname might be empty
- This commit fixes this issue

Impact:
- All use cases which use dhcpc

Testing:
- Tested with spresense:wifi

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-09-20 08:19:38 -07:00
dongjiuzhu
d635fcb2d8 application.mk: fix multi MAINSRC match suffix in single Makefile
Change-Id: I998defe7208e4f3a9ae6aede33c54297ee27bd5f
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-09-19 08:05:47 -07:00
ligd
3c4089ef30 apps/MAKE: Add register staging to context
context -> context
           register

Change-Id: Ief13064cd2faac31fbaf7140ae2e144d0881b2a1
Signed-off-by: ligd <liguiding1@xiaomi.com>
2020-09-19 10:44:17 -03:00
chao.an
3061dbf2f8 wireless/wapi: add option to associate with bssid
Change-Id: I68ef42edfc50ef5baf0f02a570d0e7f79669659f
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-09-19 04:20:43 -07:00
chao.an
a0f6b14c0d wireless/wapi: add scan partial channel support
Change-Id: I2279406a9ca0cc3a9535ce79fbf651dbaf14ad4c
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-09-19 01:14:45 -07:00
chao.an
77aa0e8908 netutils/dhcpc: try to get the host name via syscall first
Change-Id: I22aa8316f5c126bf3bafe9476a27a43c01da6129
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-09-19 01:13:05 -07:00
chao.an
40f559bffc wireless/wapi: ignore the fail case
do not break the show process if some cases failure

Change-Id: I5d5768ba116a9e8a8ea62ae9455d773838328bd5
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-09-19 01:12:04 -07:00
chao.an
1b9c307ecc make/import: lost ARCHCPUFLAGS in cxx command line
Change-Id: I90ba64852b9d06ad713a4696c451f72029da1cf3
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-09-19 01:10:52 -07:00
Huang Qi
69956020b4 interpreters/wamr: Add missing options
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Change-Id: Id1783f42842288a8f9c6ddf6105b6718dde757a1
2020-09-17 18:28:17 +01:00
chao.an
0f524ca013 examples/fb: correct the munmap(2) parameter type
fb_main.c: In function 'fb_main':
fb_main.c:473:15: warning: passing argument 1 of 'munmap' makes pointer from integer without a cast [-Wint-conversion]
  473 |   munmap(state.fd, state.fbmem);
      |          ~~~~~^~~
      |               |
      |               int
In file included from fb_main.c:43:
/home/archer/code/upload/incubator-nuttx/include/sys/mman.h:177:22: note: expected 'void *' but argument is of type 'int'
  177 | int munmap(FAR void *start, size_t length);
      |                ~~~~~~^~~~~
fb_main.c:473:25: warning: passing argument 2 of 'munmap' makes integer from pointer without a cast [-Wint-conversion]
  473 |   munmap(state.fd, state.fbmem);
      |                    ~~~~~^~~~~~
      |                         |
      |                         void *
In file included from fb_main.c:43:
/home/archer/code/upload/incubator-nuttx/include/sys/mman.h:177:36: note: expected 'size_t' {aka 'unsigned int'} but argument is of type 'void *'
  177 | int munmap(FAR void *start, size_t length);
      |                             ~~~~~~~^~~~~~

Signed-off-by: chao.an <anchao@xiaomi.com>
2020-09-17 04:42:06 -07:00
Huang Qi
0b4fa2f66a interpreters: Inroduce support for WAMR
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2020-09-16 20:53:31 +01:00
Matias N
053ca8fcca export APPDIR using 'export' keyword (TOPDIR already exported by nuttx/) 2020-09-16 06:20:06 -07:00
Masayuki Ishikawa
03c3b2ed0f system: nxplayer: Fix a compile error if CONFIG_DEBUG_AUDIO_ERROR=y
Summary:
- This commit fixes a compile error

Impact:
- Affects nxplayer with CONFIG_DEBUG_AUDIO_ERROR=y

Testing:
- Tested with spresense:rndis

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-09-15 21:15:58 -07:00
Huang Qi
e5e3c36b35 build: Support both .s & .S files
Change-Id: I61d213f28e542d7a5df388312281b7601af2f86a
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2020-09-15 15:07:27 +08:00
Pierre-Olivier Vauboin
bd537f286d ntpclient: fix NTP daemon state in case of DNS failure 2020-09-15 01:18:37 +08:00
Matias N
18137c0fec Fix: ensure archive files do not carry object files from prior builds
This is the corresponding change to the one on main NuttX repo. In this
case this involves splitting the build of libapps.a into: a) building
all applications (which is safely parallelizable), b) adding each
application's object files to the archive in turns (serial by nature).

This removes the need for the flock used to protect the parallel build.
2020-09-14 15:55:06 +08:00
Huang Qi
52b28ed484 interpreters: Initial wasm3 WebAssembly runtime support
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Change-Id: Ib97d7d95a3a5e350e5856e1bb2462dbee7185691
2020-09-14 10:35:29 +08:00
Matias N
282e565676 Remove -x from cibuild.sh call in CI since this will abort the build
on first error and we do not want that.
2020-09-13 10:30:06 -07:00
Matias N
5e20ccd366 CI: don't cache sources, use artifacts only 2020-09-12 12:51:11 -07:00
Xiang Xiao
ecae66fe59 Replace all CONFIG_NFILE_STREAMS with CONFIG_FILE_STREAM
follow up the kernel side change

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ic27ad65d7cc2ea570921e0c17098dcb6bfe1893a
2020-09-11 17:57:58 +08:00
Xiang Xiao
3edfb4a3ac system/readline: Fix the stack overflow when application name is too long
shouldn't zero the memory after tmp_name

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I527001af08da0865c4054b7a5b6ccaf60f585c06
2020-09-04 08:57:03 +02:00
Brennan Ashton
bef5dc32a7 CI: Fix check patch to handle renames / deletes
Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
2020-09-03 20:08:01 -03:00
Huang Qi
d121168fb0 interpreters/quickjs: Initial QuickJS support
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Change-Id: Ie6cb7a37c34ef3bd63390eed905b6fb76c31a3d9
2020-09-01 09:14:05 -03:00
Brennan Ashton
d38351cfd0 nxstyle: Fixup existing long lines 2020-08-29 14:04:44 -06:00
Brennan Ashton
14c6d976fc Bluetooth: Use the new l2cap socket address type 2020-08-29 14:04:44 -06:00
Huang Qi
b989914b16 interpreters/duktape: Add duktape to global search path
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2020-08-30 01:25:25 +08:00
Xiang Xiao
68c8a0f708 Fix nxstyle warning
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-08-23 15:44:32 -06:00
Xiang Xiao
837b405624 Change all files come from Xiaomi/Pinecone to Apache License 2.0
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-08-23 15:44:32 -06:00
spiriou
06c7f06b1d nshlib: remove NSH_HAVE_WRITABLE_MOUNTPOINT to enable mkrd again 2020-08-23 11:38:08 -07:00