Commit Graph

46815 Commits

Author SHA1 Message Date
raiden00pl 00aa822546 libs/libc/netdb/Kconfig: allow to enable LIBC_NETDB directly from menuconfig 2022-10-02 22:29:41 +08:00
Xiang Xiao 2a574427c6 boards: Remove CONFIG_NETDEVICES=y from board defconfig
since it's enabled by default now

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-01 19:12:15 +02:00
Xiang Xiao 486a6f81d1 drivers/net: Enable NETDEVICES by default
since there are many net drivers doesn't depend on phy

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-01 19:12:15 +02:00
Tiago Medicci Serrano fc9b9f70ac xtensa/esp32: add documentation of the I2S/audio support on ESP32 2022-09-30 17:23:17 -03:00
Tiago Medicci Serrano 06bc2220b9 xtensa/esp32: add support for the CS4344 audio codec
Include i2schar and audio drivers defconfigs for ESP32-DevKitC board.
2022-09-30 17:23:17 -03:00
Tiago Medicci Serrano 18c715ba92 xtensa/esp32: add initial support for I2S
Add initial support for the I2S peripheral on ESP32.
Add I2S character driver and generic I2S audio driver.
Include i2schar defconfig for ESP32-DevKitC board.
2022-09-30 17:23:17 -03:00
Xiang Xiao d906c2ff3b sim/adb: Enable netdb
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-09-30 15:37:48 -03:00
Xiang Xiao e38248ee08 Return -EINVAL for the internal API
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-09-30 17:54:56 +02:00
Xiang Xiao bdeaea3742 Remove the unnessary empty line after label
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-09-30 17:54:56 +02:00
Carlos Sanchez 6e490759d6 s32k1xx: Fix FlexIO timer register access macros 2022-09-30 23:38:59 +08:00
Carlos Sanchez 68db81ab4f s32k1xx: Allow building with debug features and no console. 2022-09-30 15:15:55 +02:00
Xiang Xiao 53dcddc9e3 arch/armv[7|8]-m: Implement up_invalidate_icache
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-09-30 08:07:45 +02:00
Xiang Xiao 0fa17f32f2 drivers/telnet: Remove io work thread
The thread isn't really needed but complicate the workflow

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-09-30 12:54:29 +09:00
Xiang Xiao c3b6d35290 drivers/telnet: Let psock_poll check the valid of td_psock instead
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-09-30 12:54:29 +09:00
Xiang Xiao a52fbe87eb drivers/telnet: Return the partial sent bytes in telnet_write
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-09-30 12:54:29 +09:00
Xiang Xiao d6bb08f6fd boards/sim: Enable telnetd in adb config
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-09-29 19:12:33 -03:00
Gustavo Henrique Nihei c0cd56a758 risc-v/esp32c3: Fix retrieval for linker-defined symbol
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-09-29 23:31:48 +02:00
chao an 6bc4baa4ca arch/makefile: preprocess link script to make configure more flexibly
Signed-off-by: chao an <anchao@xiaomi.com>
2022-09-29 17:06:47 +08:00
yinshengkai 5c9b094d65 tools: Replace mkallsyms.sh with mkallsyms.py
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-09-29 08:33:04 +08:00
yinshengkai 3c8773a854 tools: Optimizing mkallsyms scripts with python
When compiling my project, the time to generate allsyms decreased from tens of seconds to 2 seconds

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-09-29 08:33:04 +08:00
Ville Juven 7c003162a6 libelf/libelf_symbols.c: Fix compilation warning about void* arithmetics
Fixes minor issue with a trace (build failure with -Werror):
libelf/libelf_symbols.c:310:41: error: pointer of type 'void *' used in arithmetic [-Werror=pointer-arith]
  310 |               (uintptr_t)(sym->st_value + symbol->sym_value));
2022-09-28 20:35:31 +08:00
Xiang Xiao 386547676d net: Return -ENOPROTOOPT for unsupported/unknown socket option
so usrsock implementation could support more option than built-in stack

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-09-28 20:47:48 +09:00
zhangyuan21 85d013f69a sched: mqueue wait list optimize 2022-09-28 18:08:37 +08:00
zhangyuan21 838309313e sched: semaphore wait list optimize 2022-09-28 18:08:37 +08:00
yinshengkai d9065f29aa tools/ci: add pyelftools and cxxfilt 2022-09-28 14:08:13 +08:00
Fotis Panagiotopoulos 41b4af1ec3 Style fixes. 2022-09-28 09:38:55 +08:00
Fotis Panagiotopoulos bbf3f2866d Fixed non-UTF8 characters. 2022-09-28 09:38:55 +08:00
ligd 078a0486f5 armv7-a: SMP hande all cores start at same time
In SMP mode, if all cores start at same time, all from __start(),
then only primary need do initialize, so others core should wait
primary, use 'sev' let the non-primary continue to __cpuN_start().

Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-09-28 10:33:13 +09:00
wangbowen6 589647308c arm/tlsr82: move peripherals pin config to board.h
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2022-09-28 09:30:06 +08:00
Xiang Xiao 764540267e sched/clock: Rename g_system_timer to g_system_ticks
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-09-27 17:45:44 -03:00
Jukka Laitinen 24ea8ee3e9 arch/risc-v/src/mpfs/mpfs_ddr.c: Use DDR type selection macros to flag out code
The DDR type can be determined at compile time, remove code which is not used

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-09-28 02:09:02 +08:00
Jukka Laitinen 0ba3bc66be arch/risc-v/src/mpfs/Kconfig: Add configuration flags for DDR type selection
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-09-28 02:09:02 +08:00
Masayuki Ishikawa 00ce58963f boards: icicle: Fix license information to use the OpenSBI
Summary:
- I noticed that the OpenSBI library depends on the BSD license
- This commit fixes this issue

Impact:
- None

Testing:
- Build only

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-09-27 18:29:09 +02:00
Masayuki Ishikawa 0cd896b1d5 arch: risc-v: Fix license information to use the OpenSBI
Summary:
- I noticed that the OpenSBI library depends on the BSD license
- This commit fixes this issue

Impact:
- CONFIG_OPENSBI=y only

Testing:
- Build with icicle:opensbi (will be updated later)

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-09-27 18:29:09 +02:00
yinshengkai ae38e3eb10 sched: Optimize sched_note_begin/end
Optimize sched_note_begin/end, replace note_printf with note_string
sched_note_begin/end optimized from 50us to 1us per consumption

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-09-27 21:32:35 +08:00
chao an aa42f29465 net/local: remove dead code
Signed-off-by: chao an <anchao@xiaomi.com>
2022-09-27 21:31:48 +08:00
ligd 059497d1d1 armv7-a/r: NON-primary core should invalidate dacache level1
NON-primary cpu will invalidate cpu0's cache L2, that will caused cpu0's data mismatch, and then system crash

Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-09-27 14:41:39 +08:00
David Sidrane a1ebd499ea stm32h7:SDMMC fix unaligned access for buffers not on 32 bit boundaries
The IDMA needs to have 32 bit word alignment, in fact it will
   AND off the lower 2 bits of the value stored in IDMABASE0R.
   This bug was masked by CONFIG_ARMV7M_DCACHE causing proper word alignment
   and also FAT_DMAMEMORY being aligned.

   This commit extends the unaligned logic (used for dcache) to take into account
   the need for a buffer copy when the buffer is ot 32 bit word.

    It leverages the fact that when CONFIG_ARMV7M_DCACHE is not defined the up_xxxxx_dcache are nops.
2022-09-27 09:43:29 +08:00
Jukka Laitinen dd2ffbc768 Fixes for GPT partition parsing
1. Don't handle invalid or empty pte entries

num_partition_entries field in GPT typically means number of maximum entries
and not the number of used entries. Empty entries are indentified with
"0" partition type guid. Loop through all the entries

2. Fix the GPT partition size calculation

"ending_lba" is included in the partition, it is not the start of the next one.
Thus the correct size of the partition is end-start+1

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2022-09-27 09:42:39 +08:00
chao an 98724477e7 net/procfs: fix runtime error AddressSanitizer(global-buffer-overflow)
NuttShell (NSH) NuttX-10.3.0
ap> ifconfig
=================================================================
Program received signal SIGSEGV, Segmentation fault.
==3920365==ERROR: AddressSanitizer: global-buffer-overflow on address 0x57fb4f2a at pc 0x57177067 bp 0xf1ffebb8 sp 0xf1ffeba8
READ of size 1 at 0x57fb4f2a thread T0

...................
| #10 0xf7ac4339 in __asan::__asan_report_load1 (addr=1476087594) at ../../../../../src/libsanitizer/asan/asan_rtl.cpp:117
| #11 0x57177067 in strncmp (cs=0x57fb4f2a "", ct=0x582d36e0 "stat", nb=4) at string/lib_strncmp.c:40
| #12 0x57f3b467 in netprocfs_opendir (relpath=0x57fb4f26 "net", dir=0xf1ffed80) at procfs/net_procfs.c:398
| #13 0x572b3ae1 in procfs_opendir (mountpt=0xf4602c20, relpath=0x57fb4f26 "net", dir=0xf1ffed80) at procfs/fs_procfs.c:625
| #14 0x572879ff in open_mountpoint (inode=0xf4602c20, relpath=0x57fb4f26 "net", dir=0xf1ffed80) at vfs/fs_dir.c:127
...................

Signed-off-by: chao an <anchao@xiaomi.com>
2022-09-27 09:41:55 +08:00
wangbowen6 5e46a9908a vfs/fs_poll: not clear POLLIN event if POLLHUP or POLLERR set
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2022-09-27 08:24:33 +09:00
Rajvinder Kaur 2e1c522a79 stm32h7\stm32_fdcan_sock: reserve space for timeval struct in the intermediate storage of tx and rx CAN frames when timestamp is enabled 2022-09-26 20:05:44 -03:00
chao an aa51629bd2 arm/armv7-r: redefine the linker symbols as armlink style
Fix build break:

Error: L6218E: Undefined symbol _sbss (referred from arm_head.o).
Error: L6218E: Undefined symbol _ebss (referred from arm_head.o).
Error: L6218E: Undefined symbol _eronly (referred from arm_head.o).
Error: L6218E: Undefined symbol _sdata (referred from arm_head.o).
Error: L6218E: Undefined symbol _edata (referred from arm_head.o).

Signed-off-by: chao an <anchao@xiaomi.com>
2022-09-26 19:04:25 +02:00
chao an a2cd1b0db3 arm/armlink: add support of link time optimization(lto)
Optimization goal(Code size)

Smaller                           GCC(-Os) GCC(-flto -Os) CLANG(-flto -Oz) ARMCLANG(-flto -Oz/-Omin)
lm3s6965-ek/qemu-flat(Cortex-M3)   208662      193893           199525             195464
                                               -7.07%           -4.37%             -6.32%
sabre-6quad/smp(Cortex-A9)         131360      122500            N/A               123988
                                               -6.74%            N/A               -5.61%

Faster performance                GCC(-O3) GCC(-flto -O3) CLANG(-flto -Ofast) ARMCLANG(-flto -Ofast) ARMCLANG(-flto -Omax)
lm3s6965-ek/qemu-flat(Cortex-M3)   257502      296364           369465             346696                  384204
                                              +15.00%          +43.40%            +34.60%                 +49.20%
sabre-6quad/smp(Cortex-A9)         166520      196004             N/A              207908                  224140
                                              +17.70%             N/A             +24.85%                 +34.60%

Reference:
https://developer.arm.com/documentation/101754/0618/armclang-Reference/armclang-Command-line-Options/-O--armclang-

Signed-off-by: chao an <anchao@xiaomi.com>
2022-09-26 18:23:27 +08:00
Xiang Xiao 40ef5bc6db libc: Move queue.h from include to include/nuttx
to avoid the conflict with libuv's queue.h

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-09-26 08:04:58 +02:00
nietingting 8b3a936588 ci: enable pytest on docker file
Signed-off-by: nietingting <nietingting@xiaomi.com>
2022-09-26 13:47:23 +08:00
wangbowen6 344c8be049 poll: add poll_notify() api and call it in all drivers
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2022-09-26 12:06:32 +08:00
chao an 74842880f9 compiler.h: add MSVC(Microsoft Visual C++)-specific definitions
Signed-off-by: chao an <anchao@xiaomi.com>
2022-09-26 04:40:34 +08:00
chao an 09c006b9c8 libs: fix visual studio Compiler Error C2124
D:\code\incubator-nuttx\libs\libc\stdlib\lib_strtod.c: error C2124: divide or mod by zero

Windows MSVC restrictions, MSVC doesn't allow division through a
zero literal, but allows it through non-const variable set to zero

Reference:
https://docs.microsoft.com/en-us/cpp/error-messages/compiler-errors-1/compiler-error-c2124?view=msvc-170

Signed-off-by: chao an <anchao@xiaomi.com>
2022-09-26 04:40:09 +08:00
Nathan Hartman 34192c07de boards/tm4c129e-launchpad: Expand README.txt
* boards/arm/tiva/tm4c129e-launchpad/README.txt:
  Expand this documentation with information about: toolchains,
  debugging (including the elusive openocd incantation to flash program
  the board), MCU clocking, more details about the Virtual COM port
  exposed via ICDI, and a description of the recently added ostest
  configuration.
2022-09-26 04:36:56 +08:00