Commit Graph

38766 Commits

Author SHA1 Message Date
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
Masayuki Ishikawa
3098b61776 Revert "arch/sim: Make the SIGUSR1 host signal to use the NuttX irq logic"
This reverts commit d6210fcd84.
2020-10-26 08:42:52 +09:00
Abdelatif Guettouche
9b98f20969 arch/xtensa: Fix the naming of the internal heap functions. They should
be prefixed by xtensa_ instead of up_.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-25 20:20:01 -03:00
Abdelatif Guettouche
34ad33c8b2 arch/xtensa/Kconfig: Add help for the seperate internal heap.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-25 20:20:01 -03:00
Abdelatif Guettouche
5ac5655fa4 arch/xtensa/src/esp32/esp32_spi&spiflash: Free the correct buffer.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-25 20:20:01 -03:00
Abdelatif Guettouche
0182e6e8bb arch/xtensa/src/commin/xtensa_usestack&createstack.c: Set the alignment
to be 4 bytes.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-25 20:20:01 -03:00
Abdelatif Guettouche
172896728f arch/xtensa/src/esp32/esp32_spi.c: Instead of returning with no error
code, assert the return of the imm_malloc function.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-25 20:20:01 -03:00
Abdelatif Guettouche
2fa5d65355 arch/xtensa/src/common: Refactor the mm_ macros into a separate file.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-25 20:20:01 -03:00
Abdelatif Guettouche
c91db9eb40 baords/xtensa/esp32/esp32-core: Refresh all the defconfigs
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-25 20:20:01 -03:00
Abdelatif Guettouche
f0ae1dd54a arch/xtensa/src/esp32: Fix PR #1958 nxstyle issues.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-10-25 20:20:01 -03:00