Commit Graph

4620 Commits

Author SHA1 Message Date
Xiang Xiao
650b58d6b2 nshlib: Fix nxstyle warning
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-19 08:07:06 -06:00
Xiang Xiao
de8a56d149 nshlib: Split shell functionality from nsh to sh
1.Improve the compatiblity as other OS
2.Avoid call nsh_initialize more than once

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-19 08:07:06 -06:00
Xiang Xiao
3f9302561c nshlib: Enhance nsh to execute the shell script
and support the interactive shell too

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-19 08:07:06 -06:00
Xiang Xiao
d307758c3c nshlib: Rename 'sh' command to 'source' command
since this command change the parent environment variable and
add new '.' command which has the same functionality as 'source'

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-19 08:07:06 -06:00
Xiang Xiao
9ab5e2ff45 nshlib: Add login argument to nsh_session for controling the login process
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-19 08:07:06 -06:00
Xiang Xiao
7b4d34e352 system/taskset: Call system to launch application instead of nsh_system
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-19 08:07:06 -06:00
Xiang Xiao
9dbdc73df6 nshlib: Reset NSH_NP_SET_OPTIONS_INIT in nsh_initscript
to ensure the reset get executed in all console implementation

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-19 08:07:06 -06:00
Xiang Xiao
ac5632fc50 nshlib: Move BOARDIOC_FINALINIT into nsh_initscript
1.Avoid the code duplication
2.Call BOARDIOC_FINALINIT onnce and only once
3.Ensure BOARDIOC_FINALINIT get called in all case

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-19 08:07:06 -06:00
Xiang Xiao
6c4dc44e04 nshlib: Ensure nsh_initscript always follow usbtrace_enable immediately
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-19 08:07:06 -06:00
Xiang Xiao
b813944a7a example/nettest: tcpclient and tcpserver to .gitignore
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-19 21:48:38 +08:00
chao.an
4adb83c754 nshlib: remove the dependency of date on RTC
Change-Id: I98bd022fdc901ecb4e2e45a0faf779d83c260844
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-04-18 07:35:40 -06:00
Brennan Ashton
f2fb8c8a42 Add retry to pull docker image
Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
2020-04-17 15:20:24 -06:00
liuhaitao
a0a2c40c79 Fix bas_program.c nxstyle complaints
Note that mixed case identifier still keep in use.

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-04-17 17:06:01 +08:00
liuhaitao
5a29e86847 Fix bas_program.c build warning under macos
bas_program.c:234:35: error: adding 'size_t' (aka 'unsigned long') to a string does not append to the string [-Werror,-Wstring-plus-int]
      FS_putChars(chn, "        " + len);
                       ~~~~~~~~~~~^~~~~
bas_program.c:234:35: note: use array indexing to silence this warning
      FS_putChars(chn, "        " + len);
                                  ^
                       &          [    ]
1 error generated.

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-04-17 17:06:01 +08:00
YAMAMOTO Takashi
1b572ff169 Use MODULESTRIP where appropriate 2020-04-17 14:43:33 +08:00
Alan C. Assis
6e403fc343 Fix remaining issues with nxstyle 2020-04-16 20:39:47 -06:00
Alan C. Assis
04856ccfde Rescue incorrectly removed line 2020-04-16 20:39:47 -06:00
Alan C. Assis
d10eb2ae3a Fix nxstyle issue for Juha patch 2020-04-16 20:39:47 -06:00
Juha Niskanen
89b981bdb6 nshlib/nsh_codeccmd.c: fix potential NULL dereference and check malloc return values 2020-04-16 20:39:47 -06:00
liuhaitao
d2625c8b9d CI: refine checkpatch commits in check.yml
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-04-16 21:09:54 +08:00
Xiang Xiao
e4b101d2ef system/cu: Echo NULL char too
since zero is also a valid character

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-16 20:50:40 +09:00
Qi Huang
5018ee264c graphics/littlevgl: Fix lvgl internal warning with patch
examples/lvgldemo: Fix build warning with specific config

Signed-off-by: Qi Huang <huangqi3@xiaomi.com>
2020-04-16 19:06:05 +08:00
liuhaitao
b8dc15f646 examples/thttpd: align to elf/posix_spawn exmaples to fix depend build warning
Build warning logs as below:
arm-none-eabi-gcc: warning: ./hello/Makefile: linker input file unused because linking not done

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-04-15 11:39:15 -03:00
Qi Huang
771811c1d7 examples/lvgldemo: Fix nxstyle
Signed-off-by: Qi Huang <huangqi3@xiaomi.com>
2020-04-15 11:38:24 -03:00
Qi Huang
a749b42164 graphics/littlevgl: Fix nxstyle
Signed-off-by: Qi Huang <huangqi3@xiaomi.com>
2020-04-15 11:38:24 -03:00
Qi Huang
4555e73b3e graphics/littlevgl: Change tarball version from 5.3 to 6.1.2
Signed-off-by: Qi Huang <huangqi3@xiaomi.com>
2020-04-15 11:38:24 -03:00
Qi Huang
972a31c16a graphics/littlevgl: Update theme config symbol name in Kconfig
Signed-off-by: Qi Huang <huangqi3@xiaomi.com>
Change-Id: I34be5049fb42a0e293f088dfefe6e9025838403b
2020-04-15 11:38:24 -03:00
Qi Huang
2bb4cbf9ca examples/littlevgl: Add missing btn event handler
Signed-off-by: Qi Huang <huangqi3@xiaomi.com>
Change-Id: I4048fbd4907e465fe8f3a1a57c8ff830730a5bc3
2020-04-15 11:38:24 -03:00
Qi Huang
1775ccde1b graphics/littlevgl: Correct color depth description
Signed-off-by: Qi Huang <huangqi3@xiaomi.com>
Change-Id: Ice795f62179d5762cd46c5c9495997ccde0d021e
2020-04-15 11:38:24 -03:00
Qi Huang
94b8dbe7aa examples/lvgldemo: Port all demos to LVGL V6.1.2
Signed-off-by: Qi Huang <huangqi3@xiaomi.com>
Change-Id: Ie139af71e88d887bffefcd9b97977124c5a9e1c3
2020-04-15 11:38:24 -03:00
Qi Huang
13606dc253 apps/examples/lvgldemo: Port new simple demo from LVGL V6.1.2
Signed-off-by: Qi Huang <huangqi3@xiaomi.com>
Change-Id: I1051edc15b6f66ce34d2f813964e0e8630ec351f
2020-04-15 11:38:24 -03:00
Qi Huang
5bee0377cb graphics/littlevgl:Fix nxstyle for lv_conf.h
Signed-off-by: Qi Huang <huangqi3@xiaomi.com>
Change-Id: Icdf39551357d32f2af57c6cffe10a07101e3aebe
2020-04-15 11:38:24 -03:00
Qi Huang
b7e96b473d apps/examples/lvgldemo: Update the lvgl init procedure
Signed-off-by: Qi Huang <huangqi3@xiaomi.com>
Change-Id: I36d250d7839a86d486dcb8f720fcf12f9b954327
2020-04-15 11:38:24 -03:00
Qi Huang
1fa30e59d3 apps/examples/lvgldemo: Port tp_cal.c for LVGL V6.1.2
Signed-off-by: Qi Huang <huangqi3@xiaomi.com>
Change-Id: I1fead13274822276e08d3f54016b079b174a1544
2020-04-15 11:38:24 -03:00
Qi Huang
6f2ed3dfd4 apps/graphics/littlevgl: Update include guard macro of lv_conf.h
Signed-off-by: Qi Huang <huangqi3@xiaomi.com>
Change-Id: I467354c5a26407eee6d1bc780f6accd091e9b3d2
2020-04-15 11:38:24 -03:00
Qi Huang
25876e8222 apps/examples/lvgldemo: Update fb flush callback for LVGL V6.1.2
Signed-off-by: Qi Huang <huangqi3@xiaomi.com>
Change-Id: I72a6ff628f2ea2b0b505e444c84b266ba3a28d87
2020-04-15 11:38:24 -03:00
Qi Huang
20f3db7317 apps/examples/lvgldemo: Update touchpad read callback for LittleVGL V6.1
Signed-off-by: Qi Huang <huangqi3@xiaomi.com>
Change-Id: I8df8ff81832ce651a4c2678d534a6aeb85cff6a7
2020-04-15 11:38:24 -03:00
Qi Huang
abdc745412 graphics/littlevgl: Migrate part of Kconfig/lv_conf.h to LittleVGL V6.1.2, such as basic setting and font, etc.
Signed-off-by: Qi Huang <huangqi3@xiaomi.com>
Change-Id: Ib3dc31d95acf646dd26d41be873082ea107c6616
2020-04-15 11:38:24 -03:00
YAMAMOTO Takashi
e0a61da5cc Rename workflows to match build.yml 2020-04-15 17:02:05 +08:00
YAMAMOTO Takashi
91700e4ce9 Sync with testing repo
Namely the following change:

commit 2b69b0b2bb78ad50e9051ed07d096930a4f0918a
Author: YAMAMOTO Takashi <yamamoto@midokura.com>
Date:   Tue Apr 14 14:54:13 2020 +0900

    CI: Make job descriptions less redundant

    From:
        PR Check CI (build) / build-linux (arm-02) (pull_request)
    To:
        Build / Linux (arm-02) (pull_request)
2020-04-15 17:02:05 +08:00
Qi Huang
4c151dfef6 graphics/littlevgl: Change lvgl tarball download source to GitHub
Signed-off-by: Qi Huang <huangqi3@xiaomi.com>
2020-04-14 11:21:05 -03:00
Masayuki Ishikawa
efcbd2d842 wireless: gs2200m: Fix nxstyle warnings in gs2200m_main.c
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-04-14 11:22:10 +02:00
Masayuki Ishikawa
c126732799 wireless: gs2200m: Add support for UDP connect in gs2200m_main.c
NOTE: gs2200m driver needs to be updated as well

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-04-14 11:22:10 +02:00
YAMAMOTO Takashi
f58d607ad2
Merge pull request #173 from xiaoxiang781216/ci-macos
CI: build arm-11 instead of arm-13 for macOS
2020-04-14 17:01:36 +09:00
Xiang Xiao
fdb35a9a35 CI: build arm-11 instead of arm-13 for macOS
to reduce the building time from ~50m to ~30m

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-14 02:01:26 +08:00
Xiang Xiao
8fd8aad5c4 Fix nxstyle warning
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-13 08:32:42 -06:00
Xiang Xiao
5720d72b71 apps: Fix the nightly build warning
src/cwindowfactory.cxx: In member function 'void Twm4Nx::CWindowFactory::redrawIcons(const nxgl_rect_s*)':
src/cwindowfactory.cxx:461:38: warning: 'iconPos.nxgl_point_s::y' may be used uninitialized in this function [-Wmaybe-uninitialized]
  461 |           iconBounds.pt2.y = iconPos.y + iconSize.h - 1;
      |                              ~~~~~~~~^
src/cwindowfactory.cxx:460:38: warning: 'iconPos.nxgl_point_s::x' may be used uninitialized in this function [-Wmaybe-uninitialized]
  460 |           iconBounds.pt2.x = iconPos.x + iconSize.w - 1;
      |                              ~~~~~~~~^

nsh_netcmds.c:424:20: warning: 'nsh_addrconv' defined but not used [-Wunused-function]
 static inline bool nsh_addrconv(FAR const char *hwstr,
                    ^
nsh_netcmds.c:446:20: warning: 'nsh_sethwaddr' defined but not used [-Wunused-function]
 static inline void nsh_sethwaddr(FAR const char *ifname,
                    ^

nsh_envcmds.c:94:21: warning: 'nsh_getdirpath' defined but not used [-Wunused-function]
 static inline char *nsh_getdirpath(FAR struct nsh_vtbl_s *vtbl,
                     ^

In file included from bas.c:84:0:
bas.c: In function 'bas_interpreter':
bas_error.h:110:37: warning: left-hand operand of comma expression has no effect [-Wunused-value]
 #define NOSUCHLINE         STATIC+40, _("No such line")
                                     ^
bas.c:2425:52: note: in expansion of macro 'NOSUCHLINE'
                           FS_putChars(STDCHANNEL, (NOSUCHLINE));
                                                    ^~~~~~~~~~
bas_fs.c:107:22: warning: 'g_vt100_colormap' defined but not used [-Wunused-const-variable=]
 static const uint8_t g_vt100_colormap[8] =
                      ^~~~~~~~~~~~~~~~
<stdout>:4048:16: warning: 'input' defined but not used [-Wunused-function]

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I62610b4c90e67637250cbd0107c2935c8abc542f
2020-04-13 08:32:42 -06:00
Gregory Nutt
58085e5983 Run nxstyle against files modified in previous commit. 2020-04-12 19:17:49 +01:00
Gregory Nutt
f95d753759 Fix warnings noted in PR build checks.
userfs_main.c:547:7: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
      if (*relpath == '\0')
          ^~~~~~~~~~~~~~~~
    userfs_main.c:564:10: note: uninitialized use occurs here
      return ret;
             ^~~
    userfs_main.c:547:3: note: remove the 'if' if its condition is always false
      if (*relpath == '\0')
      ^~~~~~~~~~~~~~~~~~~~~
    userfs_main.c:543:10: note: initialize the variable 'ret' to silence this warning
      int ret;
             ^
              = 0

    test_motor.c:1068:14: warning: explicitly assigning value of variable of type 'float' to itself [-Wself-assign]
      expected_e = expected_e;
      ~~~~~~~~~~ ^ ~~~~~~~~~~
2020-04-12 19:17:49 +01:00
Gregory Nutt
3e73991857 nxstyle fixes for PR 170 2020-04-11 20:32:53 +01:00