Commit Graph

4944 Commits

Author SHA1 Message Date
Jaroslav Beran
a0f5892be9 can: Add CAN FD flags to CAN message header
EDL, BRS and ESI bits added to struct can_hdr_s.

The `ch_unused' field is useless (adjacent fields in
packed structs are aligned to the next byte), but some
drivers explicitly set this field to zero, so it is kept there
for API backward compatibility.

Signed-off-by: Jaroslav Beran <jara.beran@gmail.com>
2021-03-19 23:00:07 -07:00
mage1
635cfadc25 mm: Move mm_heap_s related stuff to private header file
since it will improve the modularity and reduce the inforamtion explosion

Change-Id: I085b36adb38993a979625a1f4c252d364a15afa1
2021-03-19 09:56:39 -07:00
Alan C. Assis
be572c11b6 lcd/hd4478ou: Fix MIxED case 2021-03-17 19:51:11 -07:00
Matheus Castello
85edf0f49d tools/version.sh: Add the remaining cut to VERSION
The idea is to have something like EXTRAVERSION. This is useful for
getting RC tags, development tags and for customizing the version. For
example using the tag `nuttx-10.0.0-RC0` the VERSION will be
`10.0.0-RC0`

Signed-off-by: Matheus Castello <matheus@castello.eng.br>
2021-03-17 19:19:58 -03:00
Jiuzhu Dong
e96c8b9283 fs: allocate file/socket dynamically
Change-Id: I8aea63eaf0275f47f21fc8d5482b51ffecd5c906
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-03-17 06:46:42 -07:00
Byron Ellacott
c9db653c8d symtabs: improve handling of symbol lookups
When CONFIG_SYMTAB_ORDEREDBYNAME is selected most code will use
the ordered search function. When it is not selected no code will
use the ordered search function. This change merges the two
functions and varies its behaviour based on the config setting,
such that all callers can simply call the one search function
and get the best behaviour.

An additional configuration option allows leading underscores to
be stripped from symbols being relocated in loaded objects. This
allows toolchains which prefix C symbol with underscores to make
loadable ELF objects.
2021-03-16 10:18:17 -07:00
buyuer
c0f9c7b48c vfs: Fix epoll cannot work under 64-bit operating system
by switching to the real file handle

Signed-off-by: buyuer <dingddding@163.com>
2021-03-13 10:55:41 -08:00
David Sidrane
0c57351f78 mmcsd:Stuck in 1-bit mode, Removed CONFIG_ARCH_HAVE_SDIO_DELAYED_INVLDT
mmcsd:Remove CONFIG_ARCH_HAVE_SDIO_DELAYED_INVLDT
   stm32h7:sdmmc remove CONFIG_ARCH_HAVE_SDIO_DELAYED_INVLDT
   stm32f7:sdmmc remove CONFIG_ARCH_HAVE_SDIO_DELAYED_INVLDT
   stm32f7:sdmmc WRITE COMPLETE prevent false triggers
   stm32h7:sdmmc WRITE COMPLETE prevent false triggers

   While testing PR #2989 on the H7 I noticed that the cards
   were staying in 1-bit mode. The root cause was that the
   scr read path was using DMA without an invlidate.

   This was caused by CONFIG_ARCH_HAVE_SDIO_DELAYED_INVLDT,
   but the sdmmc driver, did not use the delayed invalidate
   nor would it work on 8 bytes.

   The driver fully supported dcache mgt on runt buffers, but
   the #ifdef CONFIG_ARCH_HAVE_SDIO_DELAYED_INVLDT blocked it.

   Reviewing the PR that added CONFIG_ARCH_HAVE_SDIO_DELAYED_INVLDT
   it may have been valid at the time. But after the dcache operations
   we fixed. It is not necessary and offers no benefit.
2021-03-12 16:42:16 -03:00
Xiang Xiao
d2d7b6d24d net: Add sendmsg and recvmsg to syscall list
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-03-11 03:17:35 -08:00
buyuer
097df2669c drivers/sensor: fakesensor support batch.
Signed-off-by: buyuer <dingddding@163.com>
2021-03-10 14:16:38 +08:00
Gustavo Henrique Nihei
330eff36d7 sourcefiles: Fix relative path in file header 2021-03-09 23:18:28 +08:00
ligd
70442d1f9d net/socket_rpmsg: add net socket rpmsg support
Change-Id: Ie23ee4c0052cf2fc66972ea9bc5f11c070fbcf8a
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-03-07 01:45:51 -08:00
Peter Bee
e223f60c09 net/socket: move si_send/recv into sendmsg/recvmsg
Implement si_send/sendto/recvfrom with si_sendmsg/recvmsg, instead of
the other way round.

Change-Id: I7b858556996e0862df22807a6edf6d7cfe6518fc
Signed-off-by: Peter Bee <bijunda1@xiaomi.com>
2021-03-05 04:46:13 -08:00
Xiang Xiao
90be95bb89 sched: Remove all group id related stuff
it is wrong to define a new grpid_t, but not reuse pid_t,
because it make getpid(parent) == getppid(child) impossible.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-03-05 20:35:22 +08:00
ligd
1d66d5c297 debug tools: add heap & stack check in idle thread
N/A

Change-Id: Iba6f5cdffb1336697096c71fca86c9ece584225f
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-03-04 18:38:05 -08:00
Gustavo Henrique Nihei
49147fbe3c include: Add iso646.h for alternative spellings 2021-03-04 18:32:12 -08:00
Xiang Xiao
d9cfeb0bc3 sched: Don't forward gettid to getpid directly
prepare to implement the right semantics:
getpid should return the main thread id
gettid should return the current thread id
2021-03-04 17:17:41 -06:00
ligd
48d49e5a7c mqueue: add poll support
Change-Id: I7e908f6a6c00158c0946587dd79ae3dc5d279d37
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-03-04 07:11:43 -08:00
Jiuzhu Dong
4d5a964f29 net: unify socket into file descriptor
Change-Id: I9bcd21564e6c97d3edbb38aed1748c114160ea36
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-03-03 19:01:41 -08:00
Xiang Xiao
c8d4a4c76a mtd/progmem: Add up_progmem_read callback guarded by ARCH_HAVE_PROGMEM_READ
since sometime platform code need do some special action during memcpy

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Id108ef4232376feab3e37e9b3aee9a7927a03bd4
2021-03-03 13:47:59 -08:00
Michael Jung
cbe3fb5c60 libs/libc: License Clearance
Change the copyright header of assorted source files in libs/libc to the
ASF version.  I was listed as the author in these files.  I did also
check the heritage of those files and besides me they have only been
changed by the following people, all of whom did sign a CLA to the best
of my knowledge:

Alin Jerpelea
Haitao Liu
Gregory Nutt
Yamamoto Takashi
Xiang Xiao

Signed-off-by: Michael Jung <mijung@gmx.net>
2021-03-02 03:44:06 -08:00
Xiang Xiao
cf73496d9e fs/fs.h: Reference the argumnet 'r' in _NX_SETERRNO
to avoid the unused variable warning

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-03-01 09:23:09 +09:00
Jiuzhu Dong
355956fb57 umm_heap/valloc: support valloc (LEGACY)
Reference:
https://pubs.opengroup.org/onlinepubs/7908799/xsh/valloc.html

Change-Id: Ieb425a77b0a8d758956996d201223a0050ae4920
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-02-26 11:47:11 -08:00
Jiuzhu Dong
48050c9425 signal: set SIGRTMIN to SIGUSR1 because signo 0 don't catch.
Change-Id: I600fed48d25e19c229aac899508b86ddfebb24f6
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-02-25 22:27:24 -08:00
Gustavo Henrique Nihei
b9f231cdca include: Fix typos reported by codespell 2021-02-25 11:30:38 -08:00
Byron Ellacott
3e3af5b73d net: fix a few DP83848C and DP83825I constants 2021-02-24 19:04:05 -08:00
Jiuzhu Dong
936ce77d21 driver/sensor: gets the capacity of the hardware fifo
to hold the number of events

Change-Id: I58a9ad07913c7b189e1fd229ab22e91e220e01f6
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-02-24 15:26:15 -03:00
Jiuzhu Dong
54ea96da6b driver/sensor: replace lower->buffer_size with lower->buffer_number
more efficient

Change-Id: I0823b10248caf75e4dd6a5086ad230ba4a7298f6
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-02-24 15:26:15 -03:00
Gustavo Henrique Nihei
07900cdce9 Fix typo in "repetitions" word 2021-02-23 07:18:33 -08:00
Xiang Xiao
e7c97ce7f0 fs: Merge fs_poll into poll_fdsetup
to avoid the user misuse the wrong funciton

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-02-23 08:39:48 -03:00
Xiang Xiao
35ec84ffca Remove the duplicated _NX_ and _MQ_ macro
reuse the definition come from include/nuttx/fs/fs.h

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-02-21 12:33:02 +00:00
YAMAMOTO Takashi
33005897ba netdb.h: Add NI_MAXHOST and NI_MAXSERV
* These are not parts of the standards as far as I know.
* These are provided by many platforms. (GLIBC, BSD, Windows, etc)
* These are convenient.
2021-02-19 09:34:09 -08:00
Xiang Xiao
a4c6b179bb mqueue: Add _MQ_OPEN, _MQ_CLOSE and _MQ_UNLINK macro
and replace mq_open, mq_close and mq_unlink with these in libnx

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-02-19 09:59:39 +00:00
Byron Ellacott
9a1b726bae fs: change geometry types from size_t to blkcnt_t and blksize_t
This change reflects that the geometry isn't related to the largest
allocatable unit on the platform.

Calls to read and write block devices are also affected and have
been updated.
2021-02-18 20:38:22 -08:00
Gustavo Henrique Nihei
7750de72bb stdint.h: Use conversion macros for the definition of MIN and MAX constants 2021-02-18 18:35:35 -08:00
YAMAMOTO Takashi
f305cefe82 procfs: Add procfs_register_meminfo
This allows subsystems to register their mallinfo-like functions
to be shown in /proc/meminfo.
2021-02-12 03:16:03 -08:00
buyuer
a2c79bed20 Add fakesensor driver.
This driver can read sensor data from csv file.

Signed-off-by: buyuer <dingddding@163.com>
2021-02-11 09:28:55 -08:00
Masayuki Ishikawa
611dbb6d22 include: nuttx: Introduce spinlock_t for #ifndef CONFIG_SPINLOCK
Summary:
- This commit introduces spinlock_t for #ifndef CONFIG_SPINLOCK
  which is useful for the non-SMP case because it does not consume
  memory

Impact:
- None:

Testing:
- N/A

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-02-09 11:29:18 -08:00
Masayuki Ishikawa
d87f350831 arch, boards, drivers, include, sched, wireless: Change spinlock APIs.
Summary:
- This commit changes spinlock APIs (spin_lock_irqsave/spin_unlock_irqrestore)
- In the previous implementation, the global spinlock (i.e. g_irq_spin) was used.
- This commit allows to use caller specific spinlock but also supports to use
  g_irq_spin for backword compatibility (In this case, NULL must be specified)

Impact:
- None

Testing:
- Tested with the following configurations
- spresnse:wifi, spresense:wifi_smp
- esp32-devkitc:smp (QEMU), sabre6-quad:smp (QEMU)
- maxi-bit:smp (QEMU), sim:smp
- stm32f4discovery:wifi

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-02-07 21:28:56 -08:00
Masayuki Ishikawa
ad2e85433a boards, include, sched: Remove CONFIG_SPINLOCK_IRQ
Summary:
- This commit removes CONFIG_SPINLOCK_IRQ to avoid complexity

Impact:
- None

Testing:
- Tested with the following configs
- spresense:wifi, spresense:smp
- esp32-devkitc:smp (QEMU), sabre-6quad:smp (QEMU)
- maix-bit:smp (QEMU), sim:smp
- stm32f4discovery:wifi
2021-02-05 22:50:04 -08:00
Alin Jerpelea
9b9be7e1f0 include: Author: Gregory Nutt: update licenses to Apache 2.0
Update files from Gregory Nutt to Apache 2.0 license.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-02-04 03:33:58 -08:00
Alin Jerpelea
f9c6eb3e99 include: Author: Alan Carvalho de Assis: update licenses to Apache 2.0
Update files from Alan Carvalho de Assis to Apache 2.0 license.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-02-04 03:33:58 -08:00
Alin Jerpelea
861c0071bd include: nuttx: fix nxstyle errors
Fix nxstyle errors to pass CI

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-02-04 03:33:58 -08:00
Alin Jerpelea
a8a1308240 include: nuttx: update licenses to Apache 2.0
The SGA from Gregory Nutt had been submitted and we can replace
the licenses to Apache 2.0

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-02-01 11:21:57 -03:00
Alin Jerpelea
88a48bbde3 include: nuttx: sensors: max31855.h: fix nxstyle errors
Nxstyle errors fix to pass CI.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-02-01 11:21:57 -03:00
Alin Jerpelea
d49e0f56c6 include: nuttx: net: telnet.h: fix nxstyle errors
Nxstyle errors fix to pass CI.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-02-01 11:21:57 -03:00
Alin Jerpelea
3a566af4bb include: nuttx: addrenv.h: fix nxstyle errors
Nxstyle errors fix to pass CI.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-02-01 11:21:57 -03:00
Alin Jerpelea
b288986ccd include: nuttx: usb: nxstyle error fix
Nxstyle error fix to silence the CI.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-29 10:40:46 -08:00
Alin Jerpelea
30a5a3edad include: nuttx: timers: nxstyle error fix
Nxstyle error fix to silence the CI.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-29 10:40:46 -08:00
Alin Jerpelea
3bdf98cc33 include: nuttx: syslog: nxstyle error fix
Nxstyle error fix to silence the CI.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-29 10:40:46 -08:00