Commit Graph

51669 Commits

Author SHA1 Message Date
Stuart Ianna
5fa1819492 arch/risc-v/litex/litex-emac: Add support for phy interrupts.
Add support for PHY interrupts in the architecture layer of the Litex emac driver. Boards need to add handling for interrupt lines, if supported.
2023-10-26 09:02:23 +08:00
Stuart Ianna
fe468b276e Documentation: Add entry for sd_bench tool. 2023-10-26 09:00:29 +08:00
simbit18
37729540c0 Fix Kconfig style
Remove spaces from Kconfig
Add comments
2023-10-26 01:53:58 +08:00
simbit18
fa7d0bbd45 Fix nuttx coding style
Remove TABs
2023-10-26 01:53:48 +08:00
dongjiuzhu1
a7e448c57e modlib/modlib_load: fix compile warning
CC:  icmp/icmp_input.c modlib/modlib_load.c: In function 'modlib_elfsize':
modlib/modlib_load.c:87:30: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
   87 |                   textaddr = (FAR void *)phdr->p_vaddr;
      |                              ^
cc1: all warnings being treated as errors

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-10-26 01:53:38 +08:00
dongjiuzhu1
db13ff2dd5 libs/libc: fix compile warning about modlib_depend when CONFIG_MODLIB_MAXDEPEND = 0
modlib/modlib_symbols.c: In function ‘modlib_symcallback’:
modlib/modlib_symbols.c:215:13: warning: implicit declaration of function ‘modlib_depend’; did you mean ‘modlib_read’? [-Wimplicit-function-declaration]
  215 |       ret = modlib_depend(exportinfo->modp, modp);
      |             ^~~~~~~~~~~~~
      |             modlib_read

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-10-26 01:53:38 +08:00
dongjiuzhu1
e88a36fa92 libs/modlib: Adding architecture-specific memory allocator for dynamic data loading
Arch can specific the memory allocator for data to optimize access speed.

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-10-26 01:53:38 +08:00
dongjiuzhu1
81717a59ea libs/modlib: remove dupliate define about modlib_dumpbuffer
CP:  nuttx/include/nuttx/config.h
modlib/modlib_init.c:53: warning: "modlib_dumpbuffer" redefined
   53 | #  define modlib_dumpbuffer(m,b,n) binfodumpbuffer(m,b,n)
      |
In file included from modlib/modlib_init.c:36:
nuttx/include/nuttx/lib/modlib.h:64: note: this is the location of the previous definition
   64 | #  define modlib_dumpbuffer(m,b,n) sinfodumpbuffer(m,b,n)
      |

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-10-26 01:53:38 +08:00
dongjiuzhu1
6efdd50d5a arch/sim: Remove executable bit from the normal heap
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-10-26 01:53:38 +08:00
dongjiuzhu1
861220f649 arch/sim: Simplify the implementation of textheap by reuse the heap manager
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-10-26 01:53:38 +08:00
dongjiuzhu1
dcc006035d fs/rename: fix use after free issue about rename
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-10-26 01:04:23 +08:00
dongjiuzhu1
968e89303f env_dup: fix issue about USE_AFTER_FREE
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-10-26 00:11:14 +08:00
simbit18
6c4c09eb44 tools/cfgdefine.c: Resolve compile warning array subscript has type ‘char’
In file included from cfgdefine.c:26:
cfgdefine.c: In function ‘skip_space’:
cfgdefine.c:91:26: warning: array subscript has type ‘char’ [-Wchar-subscripts]
   91 |   while (*ptr && isspace(*ptr)) ptr++;
      |                          ^~~~
cfgdefine.c: In function ‘find_name_end’:
cfgdefine.c:99:27: warning: array subscript has type ‘char’ [-Wchar-subscripts]
   99 |   while (*ptr && (isalnum(*ptr) || *ptr == '_')) ptr++;
      |                           ^~~~
cfgdefine.c: In function ‘find_value_end’:
cfgdefine.c:107:27: warning: array subscript has type ‘char’ [-Wchar-subscripts]
  107 |   while (*ptr && !isspace(*ptr))
      |                           ^~~~
cfgdefine.c:116:45: warning: array subscript has type ‘char’ [-Wchar-subscripts]
  116 |           do ptr++; while (*ptr && !isspace(*ptr) && *ptr != '"');
      |
2023-10-26 00:10:57 +08:00
dongjiuzhu1
fbd6484532 libc/localtime: fix the timezone error caused by minor error
align: https://github.com/eggert/tz/blob/main/localtime.c

correct timeone in test:

server> timedatectl set-timezone Pacific/Auckland
server> timedatectl
      TimeZone: NZDT, 46800
    Local time: Sat, Oct 21 21:47:34 2023 NZDT
Universal time: Sat, Oct 21 08:47:34 2023 UTC
      RTC time: Sat, Oct 21 08:47:35 2023

error timezone:

server> timedatectl set-timezone Pacific/Auckland
server> timedatectl
      TimeZone: NZST, 43200
    Local time: Sat, Oct 21 20:52:27 2023 NZST
Universal time: Sat, Oct 21 08:52:27 2023 UTC
      RTC time: Sat, Oct 21 08:52:27 2023

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-10-26 00:10:04 +08:00
crafcat7
3d78859737 applications:Move the test tools in the system directory to the testing directory.
by pr#2161

The following four tools were moved:
1.memstress
2.ramtest
3.ramspeed
4.cachespeed

Signed-off-by: crafcat7 <crafcat7@outlook.com>
2023-10-26 00:09:28 +08:00
raiden00pl
afef047c6f Documentation: fix warning introduced by sd_stress
nuttx/Documentation/applications/testing/sd_stress/index.rst:1: WARNING: Title overline too short.
2023-10-26 00:08:54 +08:00
raiden00pl
9bef53bbdd Documentation: migrate /drivers 2023-10-26 00:08:54 +08:00
raiden00pl
8e40cfd1b6 Documentation: migrate /arch 2023-10-26 00:08:54 +08:00
raiden00pl
8a330ca0bc Documentation: migrate /tools 2023-10-26 00:08:54 +08:00
raiden00pl
64b924d18c Documentation: migrate /syscall 2023-10-26 00:08:54 +08:00
raiden00pl
00d14665d1 Documentation: migrate /mm 2023-10-26 00:08:54 +08:00
raiden00pl
ebcf8f0d16 Documentation: migrate /net 2023-10-26 00:08:54 +08:00
raiden00pl
61cdd105ef Documentation: migrate /libs 2023-10-26 00:08:54 +08:00
raiden00pl
6448135f65 Documentation: migrate /fs 2023-10-26 00:08:54 +08:00
raiden00pl
1822b1c37f Documentation: migrate /audio 2023-10-26 00:08:54 +08:00
Ville Juven
ab78e3817a sched/task_[posix]spawn: Simplify how spawn attributes are handled
Handle task spawn attributes as task spawn file actions are handled.

Why? This removes the need for sched_lock() when the task is being
spawned. When loading the new task from a file the scheduler can be
locked for a VERY LONG time, in the order of hundreds of milliseconds!

This is unacceptable for real time operation.

Also fixes a latent bug in exec_module, spawn_file_actions is executed
at a bad location; when CONFIG_ARCH_ADDRENV=y actions will point to the
new process's address environment (as it is temporarily instantiated at
that point). Fix this by moving it to after addrenv_restore.
2023-10-25 11:55:44 -03:00
David Sidrane
def7a34733 s32k1xx:lpi2c DMA transaction only need the status conditioned
With DMA enabled on some I2C channels but not all
   the Non DMA channels were failing.

   The cause was condition the status with only the enabled
   interrupts on non DMA chennels. This conditioning needs
   to only happen in DMA enabled channels
2023-10-25 17:22:47 +03:00
David Sidrane
506f725a19 s32k3xx:lpi2c DMA transaction only need the status conditioned
With DMA enabled on some I2C channels but not all
   the Non DMA channels were failing.

   The cause was condition the status with only the enabled
   interrupts on non DMA chennels. This conditioning needs
   to only happen in DMA enabled channels
2023-10-25 17:22:47 +03:00
David Sidrane
1b5aeb1a08 imxrt:lpi2c DMA transaction only need the status conditioned
With DMA enabled on some I2C channels but not all
   the Non DMA channels were failing.

   The cause was condition the status with only the enabled
   interrupts on non DMA chennels. This conditioning needs
   to only happen in DMA enabled channels
2023-10-25 17:22:47 +03:00
David Sidrane
611309b956 imxrt:serial Ensure the cache is updated if the DMA has updated again
The DMA can bring in more rx data, than the number of
   DMA completions call backs. The call back happen on
   idle, 1/2 and full events. But in between these events
   the DMA can write more data to the buffers memory that
   need to be brought in to the cache. (invalidate)

   We do the invalidate on the reads from the fifo memory
   if the the DMA as commited since the last read.
2023-10-25 16:14:45 +03:00
chao an
87d6084f31 sched: fix the minor style issue
and remove the unused return value

Signed-off-by: chao an <anchao@xiaomi.com>
2023-10-25 15:46:45 +08:00
chao an
50b17fb3fc group/killchildren: replace syscall(2) to kernel api
syscall(2) cannot be called from kernel space

Signed-off-by: chao an <anchao@xiaomi.com>
2023-10-25 15:46:45 +08:00
chao an
2b06142232 kernel: replace all sem_* to nxsem_*: in kernel space
syscall cannot be called from kernel space

Signed-off-by: chao an <anchao@xiaomi.com>
2023-10-25 15:46:03 +08:00
chao an
3cadf6642a kernel: replace all usleep to nxsig_usleep in kernel space
syscall cannot be called from kernel space

Signed-off-by: chao an <anchao@xiaomi.com>
2023-10-25 15:46:03 +08:00
Stuart Ianna
ee84ea3875 arch/risc-v/litex/litex_gpio: Fix ISR dispatch when using higher GPIO indexes.
Previously, GPIO interrupts were not correctly mapped to the peripheral base register responsible for the interrupt.

Change the IRQ number calculation so the interrupts work correctly on all GPIO peripheral bases.
2023-10-25 15:42:25 +08:00
jinxiuxu
cd851b3144 audio: add amr format support
Signed-off-by: jinxiuxu <jinxiuxu@xiaomi.com>
2023-10-25 13:33:21 +08:00
Stuart Ianna
ac5800386c arch/risc-v/litex/litex_emac: Add support for KSZ8061 ethernet PHY.
Adds support for using the microchip KSZ8061 ethernet PHY instead of the default DP83848C.
2023-10-25 13:33:03 +08:00
chao an
cdec5c80c2 sched/pthread/barrierwait: replace syscall(2) to kernel api
syscall(2) cannot be called from kernel space

Signed-off-by: chao an <anchao@xiaomi.com>
2023-10-25 09:18:55 +08:00
Stuart Ianna
c19c943835 Documentation: Add entry for sd_stress tool. 2023-10-25 09:16:50 +08:00
Zhe Weng
9ef2a48919 net/local: Support SO_SNDBUF option in getsockopt
For datagram unix sockets, the `SO_SNDBUF` value imposes an upper limit on the size of outgoing datagrams.

Note: We don't support to change the buffer size yet, so only add support to getsockopt now.
Refs: https://man7.org/linux/man-pages/man7/unix.7.html

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-10-25 01:13:56 +08:00
zhanghongyu
5374af077b tun: Fix the error of calling tun_close when tun_txavail or tun_txavail_work is executed
When tun_txavail_work is running, switch to tun_close thread and priv->lock will be destroyed, then switch back to tun_txavail_work thread, an error will occur when nxmutex_unlock(&priv->lock)

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-10-25 01:13:21 +08:00
zhanghongyu
3b469271d7 Revert "tun: Fix the error of calling tun_close when tun_txavail or tun_txavail_work is executed"
This reverts commit 0f1a49bba5.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-10-25 01:13:21 +08:00
David Sidrane
8cb65d9b3b s32k1xx:lpi2c end only on stop with end of packet 2023-10-24 19:27:03 +03:00
David Sidrane
b2b5826b80 s32k3xx:lpi2c end only on stop with end of packet 2023-10-24 19:27:03 +03:00
David Sidrane
119bf660a4 imxrt:lpi2c end only on stop with end of packet 2023-10-24 19:27:03 +03:00
raiden00pl
962d46186d Documentation/netutils: ignore header for TOC 2023-10-25 00:25:58 +08:00
raiden00pl
d1ebe6cd24 Documentation: add dummy apps descriptions
The apps description is empty for now but allows to generate nice tables of content with all nuttx-apps functionalities.
2023-10-25 00:25:58 +08:00
Tiago Medicci Serrano
0616796185 esp32-devkitc/ble: Enable SMP for BLE defconfig
This defconfig also pins the HCI TX thread to the same core of the
BLE task.
2023-10-24 22:41:44 +08:00
Tiago Medicci Serrano
41c1b153e3 esp32/bluetooth: Select option to pin the HCI TX thread to CPU core
When ESP32's BLE is enabled, select the option to pin the HCI TX
thread to a specific core. This is necessary to avoid problems
with the BLE task that runs pinned to the PRO CPU (core 0) while
running with SMP enabled.
2023-10-24 22:41:44 +08:00
Tiago Medicci Serrano
fe156a40e3 wireless/bluetooth: Add option to set the HCI TX thread affinity
By enabling the config `CONFIG_BLUETOOTH_TXCMD_PINNED_TO_CORE` and
setting the value of `CONFIG_BLUETOOTH_TXCMD_CORE`, it's possible
to pin the HCI TX thread to a specific core on a SMP-enabled setup.
This is necessary for devices that require that the function that
sends data (`bt_send`) to be called from a specific core.
2023-10-24 22:41:44 +08:00