Commit Graph

38625 Commits

Author SHA1 Message Date
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 e7d9260014
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
dongjiuzhu
d452a05910 pollnotify: we should send poll events before semaphore incrementes.
There is a good case on sim platform:
When we input some cmd and click enter key to start application in terminal,
this context will change to application from IDLE loop. Althrough entey key '\r'
has been received to recv buffer and complete post semaphore of reader, but
pollnotify may not be called because context change. So when application run
poll function, because no events happend and poll enter wait, context will
again change to IDLE loop, this pollnotify of IDLE loop will run to send poll
events, poll function of applicaton will wake up. It's wrong!

Change-Id: I812a889f2e90781a9c3cb4b0251cccc4d32bebd1
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-10-26 08:27:09 -03:00
Simon Piriou
13e10504c9 arch: stm32: nxstyle check for otghs driver 2020-10-26 08:17:25 -03:00
Simon Piriou
3eb3b0da4d arch: stm32: fix otghs logic to support interface requests 2020-10-26 08:17:25 -03:00
Masayuki Ishikawa
72b182d3d3 boards: sim: Update smp/defconfig
Summary:
- Add CONFIG_DRIVER_NOTE=y
- Add CONFIG_NSH_READLINE=y
- Add CONFIG_READLINE_CMD_HISTORY=y
- Add CONFIG_SCHED_INSTRUMENTATION=y

Impact:
- Affects sim:smp only

Testing:
- Tested with uname/ps/free/hello/smp/ostest

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-10-26 03:06:46 -07:00
Masayuki Ishikawa
df952074eb drivers: wireless: Add support for ioctl(fd, SIOCGIFADDR, ...) to gs2200m.c
Summary:
- This commit adds support for ioctl(fd, SIOCGIFADDR, ...) to gs2200m.c

Impact:
- Only affects ioctl(fd, SIOCGIFADDR, ...) with gs2200m
- Need to update apps/wireless/gs2200m as well

Testing:
- Tested with spresense:wifi
- Tested with dhcpc

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-10-26 10:53:34 +01:00
Masayuki Ishikawa
f12d49076c drivers: wireless: Fix to handle address info in accept() in gs2200m.c
Summary:
- This commit fixes to handle address info in accept() in gs2200m.c

Impact:
- All use cases which use accept() with gs2200m
- Need to update apps/wireless/gs2200m as well

Testing:
- Tested with spresene:wifi
- Tested with telnet daemon

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>>
2020-10-26 10:53:34 +01:00
Masayuki Ishikawa
02b08590a1 drivers: wireless: Fix to handle UDP connect() with bind() in gs2200m.c
Summary:
- This commit fixes to handle UDP connect() with bind() to a local port.

Impact:
- All UDP cases which use connect() with gs2200m
- Need to update apps/wireless/gs2200m as well

Testing:
- Tested with spresense:wifi
- Create a UDP socket and bind() to a local port.
- Then connect() to remote address with port and send()

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-10-26 10:53:34 +01:00
YAMAMOTO Takashi
6a2bd9a75b Change the default value of SIGPIPE
To avoid the conflicting default with SIGQUIT.
2020-10-25 20:35:41 -07:00
YAMAMOTO Takashi
ad5c168b30 signalh.h: Use the right config for SIGPIPE 2020-10-25 20:35:41 -07:00
YAMAMOTO Takashi
d8bee6769a esp32_flash.ld: Avoid having too many sections
Fixes an issue I saw when trying libcxx.

esptool.py has a limit of 16 sections.

It complains like:

    A fatal error occurred: Invalid segment count 23 (max 16).
    Usually this indicates a linker script problem.
2020-10-25 19:42:21 -07:00
Matias N
5386f972fa bluetooth: Add support for HCI RAW channel; make host layer optional 2020-10-25 17:04:25 -07:00
Brennan Ashton
1080d3f411 Bluetooth: Start implementing BTPROTO_HCI socket support
Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
2020-10-25 17:04:25 -07:00