Commit Graph

38637 Commits

Author SHA1 Message Date
chao.an
d78bf36740 net/tcp: fix tcp socket close timeout if loss wireless connection
In the current net stack implementation, there is no mechanism
for notifying the loss of the wireless connection, if the network
is disconnected then application sends data packets through tcp,
the tcp_timer will keep retrying fetch the ack for awhile, the
connection status will not be able to be switched timely.

Change-Id: I84d1121527edafc6ee6ad56ba164838694e7e11c
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-10-28 11:41:16 -07:00
Masayuki Ishikawa
1e321ca032 drivers: wireless: Fix tcp/udp connect with heavy bulk data traffic in gs2200m.c
Summary:
- During network stress testing, ASSERT happened in gs2200m_ioctl_connect()
- The test was nxplayer (http audio streaming) and repeating wget every 0.5sec
- gs2200m_ioctl_connect() calls gs2200m_send_cmd() to send an AT command
- Then it waits for a synchronous command response.
- However, if heavy tcp traffic happens on another socket, it can receive a bulk packet
- With this commit, if it receives such a packet then the packet is duplicated.
- After that, the duplicated packet is added to the packet queue and notify the userland.

Impact:
- Affect almost all use cases with gs2200m

Testing:
- Tested with both spresense:wifi and spresense:wifi_smp
- Tested with nxplayer (http audio streaming) and repeat wget

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-10-28 11:36:17 -07:00
Brennan Ashton
162da1169e CI: Store artifacts durring build
Add new option -A is added to tools/testbuild.sh that will take the
created build executable and store it in a folder for the config
that generated it under $ARTIFACTDIR which can be set via an
environment variable or defaulted to $(TOPDIR)/buildartifacts

This is also helpful for local testing because you can now run
tools/testbuild.sh -A sim.dat and have all of the simulation
targets generated without having to rebuild along the way.

In the GitHub Actions workflow the artifacs are uploaded
two two bundles one for macOS and one for Linux

Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
2020-10-28 11:32:21 -07:00
chao.an
d0bde1114d sched/task: do not migrate the task state to INVALID
which still on used in task/nxmq_recover()

Change-Id: I31273aadd9e09c283cc3d0420dfc854ca8ae1899
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-10-28 11:15:22 -07:00
YAMAMOTO Takashi
ff3fa805a4 libxx: Use Kconfig "choice" to specify an implemenetation
It doesn't make sense to enable both of LIBCXX and UCLIBCXX.
This commit reflects it to Kconfig.
2020-10-28 14:10:30 -03:00
zhongan
c9dd19f4c9 sim:rpproxy/rpserver: force use 'CONFIG_SIM_M32' for 64bit system.
Change-Id: I3f240bd7761b42bddfb8c899dad63a0df5a6ac7f
Signed-off-by: zhongan <zhongan@xiaomi.com>
2020-10-28 10:08:47 -07:00
Juha Niskanen
8c464b0e7a sched: use nx_close instead of close
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2020-10-28 09:11:50 -07:00
Juha Niskanen
1577726f05 fs/inode/fs_fileopen.c: use nx_close instead of close
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2020-10-28 09:11:50 -07:00
Juha Niskanen
1115452061 drivers/pipes: nx_pipe syscall takes three params, also use nx_close on error path
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2020-10-28 09:11:05 -07:00
Alin Jerpelea
bc8ea75580 tools: cxd56: mkspk: automate mkspk build
the mkspk tool will automaticaly be built if CONFIG_CXD56_BINARY
is set.

Test:
nuttx.spk was succesfully generated

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2020-10-28 12:50:02 +01:00
Xiang Xiao
7901ad6959 tools/testbuild.sh: Support regular expression in blacklist
and prepend 'uname -s' to config for filtering config by host

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-10-28 00:18:03 -07:00
Yoshinori Sugino
079737dd0c libs/libc/signal/sig_pause.c: Fix a comment 2020-10-28 07:12:46 +01:00
Sara Souza
ddc0d30063 xtensa/esp32: Added Userled support 2020-10-27 15:38:03 -03:00
GAEHWILER Reto
83745652c4 TCP-stack fix for stalled tcp sockets due to broken keepalive
Fixes an issue where tcp sockets with activated keepalives stalled and
were not properly closed. Poll would not indicate a POLLHUP and therefore
locks down the application.

* tcp_conn_s.tcp_conn_s & tcp_conn_s.keepintvl changed to uint32_t
  According RFC1122 keepidle MUST have a default of 2 hours.
2020-10-27 11:21:56 -07:00
Nathan Hartman
892c6b254a tiva/cc13x2_cc26x2: Fix nxstyle errors
arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_aon_pmctl.h:

    * Fix nxstyle errors.
2020-10-27 09:54:02 -07:00
Daniel P. Carvalho
8339bac6e4 Replaces BSD license by Apache License. 2020-10-27 11:11:40 -03:00
Daniel P. Carvalho
8c04cc86c0 Improvements on ADC driver
* Add option to start adc at setup
  * Add option to cofigure ADC resolution
  * Add option to cofigure ADC sample time
  * Add option to cofigure ADC DMA
  * Add suport for low level operations.
2020-10-27 11:11:40 -03:00
Dong Heng
d86fd84a8e xtensa/esp32: Add real-time timer support for WiFi 2020-10-27 10:36:34 -03:00
ligd
d0966b800f usrsock.h: add reserved value to usrsock struct
N/A

access (struct usrsock_message_req_ack_s)->result can caused
unaligend-access, add reserved value to avoid this

Change-Id: I6c7d49c57bf898fbf8459b5db9a219122494e254
Signed-off-by: ligd <liguiding1@xiaomi.com>
2020-10-27 01:20:52 -07:00
Brennan Ashton
bfe1e2c148 ci: Don't fail the build due to linkcheck failure
Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
2020-10-27 01:20:05 -07:00
Masayuki Ishikawa
46659d5a14 sched: Fix sched_lock() logic for SMP
Summary:
- I noticed sched_lock() logic is different from sched_unlock()
- I think sched_lock() should use critical section
- Also, the code should be simple like sched_unlock()
- This commit fixes these issues

Impact:
- Affects SMP only

Testing:
- Tested with spresense:wifi_smp (both NCPUS=2 and 3)
- Tested with lc823450-xgevk:rndis
- Tested with maix-bit:smp (QEMU)
- Tested with esp32-core:smp (QEMU)
- Tested with sabre-6quad:smp (QEMU)

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-10-26 22:22:31 -07:00
Masayuki Ishikawa
0820549223 sched: Fix DEBUGASSERT() in sched_unlock() for SMP
Summary:
- I noticed DEBUGASSERT() happens in sched_unlock()
- The test was Wi-Fi audio streaming stress test with spresense 3cores
- Actually, g_cpu_schedlock was locked but g_cpu_lockset was incorrect
- Finally, I found that cpu was obtained before enter_critical_section()
- And the task was moved from one cpu to another cpu
- However, that call should be done within the critical section
- This commit fixes this issue

Impact:
- Affects SMP only

Testing:
- Tested with spresense:wifi_smp (both NCPUS=2 and 3)
- Tested with lc823450-xgevk:rndis
- Tested with maix-bit:smp (QEMU)
- Tested with esp32-core:smp (QEMU)
- Tested with sabre-6quad:smp (QEMU)

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-10-26 22:22:31 -07:00
Xiang Xiao
2b9282d5ee libc: Skip close stdin/stdout/stderr in fclose
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-10-26 22:16:53 -07:00
ligd
b69c587dc9 stdio: remove depends on setbuf setvbuf
N/A

Cause the function realize will handle this

Change-Id: I154c21c7a40667afae423bb0ebb67de8f5fc42fd
Signed-off-by: ligd <liguiding1@xiaomi.com>
2020-10-26 22:12:02 -07:00
YAMAMOTO Takashi
07fc24ba99 libxx: Suppress -Wmissing-exception-spec on operator new 2020-10-26 22:08:40 -07:00
YAMAMOTO Takashi
4c7bf29e35 libxx: Add exception specifier to operator delete
CXX:  libxx_delete.cxx
libxx_delete.cxx:52:6: error: 'operator delete' is missing exception
      specification 'throw()' [-Werror,-Wmissing-exception-spec]
void operator delete(FAR void *ptr)
     ^
                                    throw()
1 error generated.
2020-10-26 22:08:40 -07:00
YAMAMOTO Takashi
6aef245523 libxx: Stop mentioning libs not integrated with this version of libxx 2020-10-26 22:07:39 -07:00
YAMAMOTO Takashi
caf67c817f libxx: Update README
This doc seems a bit outdated to me.
This commit is my best attempt to update it.
2020-10-26 22:07:39 -07:00
Xiang Xiao
1aed34182a tools/testbuild.sh: Don't support to change size_t type in datlist
since it doesn't need anymore with the follow patch:
commit e7d92600147c1bb1e5160360fde33e744e385544
Author: Xiang Xiao <xiaoxiang@xiaomi.com>
Date:   Mon Feb 17 20:19:25 2020 +0800

    arch: Customize the typedef of size_t instead of intptr_t

    To ensure size_t same as toolchain definition in the first place and
    rename CXX_NEWLONG to ARCH_SIZET_LONG.  The change also check whether
    __SIZE_TYPE__ exist before CONFIG_ARCH_SIZET_LONG so our definition
    can align with toolchain(gcc/clang) definition automatically.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-10-26 21:45:11 -07:00
liuhaitao
8342d2932f sim: update loadable/module/sotest configs readme
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-10-26 21:42:59 -07:00
Abdelatif Guettouche
58655d1efd arch/xtensa/src/esp32: SMP case of interruptstack.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-27 07:44:20 +09:00
Abdelatif Guettouche
c97d11aa7b arch/xtensa: Add the optional interrupt stack.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-27 07:44:20 +09:00
Huang Qi
15d658403a sim/duktape: Increase stack size to fix broken
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2020-10-26 18:20:02 -03:00
Sebastian Ene
efbcb2cd31 arch/sim: Enable SIM_WALLTIME option by default
### Summary of Changes ###

Running the NuttX simulation 'as fast as possible' breaks the features
that depend on timing: eg. the Bluetooth stack. Enabling this option by
default SIM_WALLTIME=y will introduce delays and will tick the simulation at
a real pace.
Refresh defconfigs for sim targets and add depends on SIM_WALLTIME for
SIM_HCISOCKET.

Signed-off-by: Sebastian Ene <sene@apache.org>
2020-10-26 11:01:40 -07:00
Nathan Hartman
6f029174f2 tiva/cc13x2_cc26x2: Fix nxstyle errors
arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_aon_rtc.h:

    * Fix nxstyle errors.
2020-10-26 10:39:32 -07:00
ligd
90f3d2851c net/devif/devif_callback.c: remove harmful debug check
N/A

Cause of curr maybe NULL, and following logic can handle this

Change-Id: I999c051a8f2e2698400fc8793ba068073a306972
Signed-off-by: ligd <liguiding1@xiaomi.com>
2020-10-26 14:19:01 -03:00
Masayuki Ishikawa
904a602c74 arm: armv7-a: Fix kernel stack dump in arm_assert.c
Summary:
- This commit fixes kernel stack dump information

Impact:
- Affects armv7-a with kernel build

Testing:
- Built with sama5d4-ek:knsh
- Not tested

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-10-26 09:05:49 -07:00
Masayuki Ishikawa
3c4bf1a2bf arch: armv6-m: Refactor interrupt stack related code
Summary:
- Apply the same logic for armv7-m
- NOTE: stack pointer alignment is 4-byte

Impact:
- Affects armv6-m with interrupt stack enabled

Testing:
- Built with freedom-kl25z:nsh (CONFIG_ARCH_INTERRUPTSTACK=2048)
- Not tested but should work

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-10-26 09:05:49 -07:00
Masayuki Ishikawa
0b73eec5cd arch: armv8-m: Refactor interrupt stack related code
Summary:
- Apply the same logic for armv7-m
- NOTE: stack pointer alignment is 8-byte

Impact:
- Affects armv8-m with interrupt stack enabled

Testing:
- Not tested but should work

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-10-26 09:05:49 -07:00
Masayuki Ishikawa
d553515758 armv7-m, cxd56xx, lc823450: Refactor interrupt stack related code
Summary:
- Remove +4/-8 offset coding
- Also, fix alignments for g_intstackalloc
- NOTE: stack pointer alignment is 8-byte

Impact:
- Affects armv7-m with interrupt stack enabled

Testing:
- Tested with spresense:wifi_smp
- Tested with lc823450:smp
- Tested with stm32f4discovery:wifi

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-10-26 09:05:49 -07:00
Masayuki Ishikawa
8547ea2c72 boards: stm32f4discovery: Update wifi/defconfig
Summary:
- Add CONFIG_ARCH_INTERRUPTSTACK=2048
- Add CONFIG_ARMV7M_LAZYFPU=y
- Add CONFIG_TESTING_OSTEST_FPUSIZE=132

Impact:
- Affects stm32f4discovery:wifi only

Testing:
- Tested with ostest, uSD card, Wi-Fi

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-10-26 09:05:49 -07:00
Masayuki Ishikawa
32563b15ac arch: armv7-r: Refactor interrupt stack related code
Summary:
- Apply the same logic for armv7-a
- NOTE: stack pointer alignment is 8-byte

Impact:
- Affects armv7-r with interrupt stack enabled

Testing:
- Not tested but should work

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-10-26 09:05:49 -07:00
Masayuki Ishikawa
973a6c49b6 arm, c5471: Refactor interrupt stack related code
Summary:
- Apply the same logic for armv7-a
- NOTE: stack pointer alignment is 4-byte

Impact:
- Affects arm (arm7/9) and c5471 with interrupt stack enabled

Testing:
- Built with c5471evm.nsh (CONFIG_ARCH_INTERRUPTSTACK=2048)
- Built with ea3131:nsh (CONFIG_ARCH_INTERRUPTSTACK=2048)
- Not tested but should work

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-10-26 09:05:49 -07:00
Masayuki Ishikawa
6e12f3c782 armv7-a, imx6: Refactor interrupt stack related code
Summary:
- Remove -4/-8 offset coding in imx_irq.c and arm_vectors.S
- Instead, add SP adjustment after calling setirqstack/setfiqstack
- Fix off-by-one irq/fiq stack allocation in 8-byte aligned arch
- Fix comments on the user stack pointer in arm_vectors.S
- Also, fix up_dumpstate() to extract the user stack pointer
- NOTE: stack pointer alignment is 8-byte

Impact:
- Affects armv7-a with interrupt stack enabled

Testing:
- Tested with sabre-6quad:smp with QEMU
- Tested with sabre-6quad:nsh with QEMU

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-10-26 09:05:49 -07:00
Masayuki Ishikawa
d550e39b9e boards: sabre-6quad: Update nsh/defconfig
Summary:
- Add CONFIG_DEBUG_FULLOPT=y
- Add CONFIG_DEBUG_SYMBOLS=y
- Remove CONFIG_HOST_WINDOWS=y
- Add CONFIG_READLINE_CMD_HISTORY=y
- Add CONFIG_STACK_COLORATION=y

Impact:
- Affects sabre-6quad:nsh only

Testing:
- Tested with QEMU

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-10-26 09:05:49 -07:00
Masayuki Ishikawa
eddf1189be arch: armv7-a: Fix CPUx IDLE stack top for SMP
Summary:
- This commit fixes CPUx IDLE stack top for SMP
- Also removes SMP_STACK_TOP from smp.h

Impact:
- Affects armv7-a SMP only

Testing:
- Tested with sabre-6quad:smp (QEMU)

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-10-26 09:05:49 -07:00
Masayuki Ishikawa
9120a3022d arch: armv7-a: Fix style warnings in arm_cpuidlestack.c
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-10-26 09:05:49 -07:00
Masayuki Ishikawa
92ebbd7d21 arch: armv7-a: Fix style warnings in smp.h
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-10-26 09:05:49 -07:00
Alan C. Assis
34df2126b3 Fix missing 'ret' reported by Frank-Christian Kruegel 2020-10-26 15:26:49 +01:00
Simon Piriou
b405722276 usbdev: add Android Debug Bridge driver 2020-10-26 08:28:48 -03:00