Commit Graph

37798 Commits

Author SHA1 Message Date
Xiang Xiao
05f6445493 arch: Move *_getsp to the common place arch/arch.h
so other place can get the stack pointer easily

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-07-09 13:51:09 +01:00
Xiang Xiao
5da9cb3ae6 libxx: Eanble HAVE_CXXINITIALIZE automatically if LIBCXX or UCLIBCXX enable
otherwise the user is shocked that using cin/cout/cerr will crash the system

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I453427261f3e2a6e60f7dd2398f7d3bd1043a0d5
2020-07-09 13:19:54 +01:00
Xiang Xiao
6b316edcda sim: add __cxa_atexit into the name list
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I81e75532db1953584124142763f9d07ddb788898
2020-07-09 15:17:12 +09:00
Xiang Xiao
a62b45380b spresense:example_camera: Remove CONFIG_SYSTEM_NSH_CXXINITIALIZE
since it doesn't exist anymore

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-07-09 12:41:19 +09:00
Alin Jerpelea
5d0b93a0d9 boards: arm: cxd56xx: enable basic snapshot camera example
This camera example grabs a specified number of pictures
and saves them on the available storage

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2020-07-08 23:59:29 +01:00
Xiang Xiao
1bca457b28 libc: Always declare getenv, link/symlink and atexit/on_exit
since many c++ library implementation reference these symbols by using ::xxx but never
really use them, the declaration avoid the unused code is pulled into the final binary

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Idd7bf9a1e09b77a6b21f900cd3ede08a1cc82d86
2020-07-08 12:07:22 +01:00
Beat Küng
a349595316 gpio: extend gpio_pintype_e for pulldown/up and opendrain
- fix code style
- fix bool conversion when calling go_read()
2020-07-07 08:34:25 -05:00
Xiang Xiao
67ef70d460 vfs/dirread: Should return the same file type as lstat
by extend the possible value of d_type for the special file

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-07-07 13:41:10 +01:00
Xiang Xiao
91ed14c631 vfs/stat: Make the flag defintion more confirm POSIX standard
specified here:
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_stat.h.html

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-07-07 13:41:10 +01:00
Ouss4
1a523e5519 tools/zipme.sh: Remove the option to exclude patterns based on the VCS'
"ignore" file.
2020-07-06 20:11:13 -07:00
Xiang Xiao
0f235bc0b0 board/sim: Don't ignore any files under src/etc/ folder
see the discussion here:
https://github.com/apache/incubator-nuttx/issues/1363
2020-07-06 20:09:49 -07:00
Adam Feuer
b994d1f0b6 fixing problem with trap not removing tempdir
- needs to be in original dir to work
2020-07-06 21:24:19 -05:00
Adam Feuer
1076b748a2 changed header comment filename to match current 2020-07-06 21:24:19 -05:00
Adam Feuer
dbc025bb88 add examples to usage info
- as per PR feedback
2020-07-06 21:24:19 -05:00
Adam Feuer
ef3ba54c9c cleanup unneeded cd and rm commands 2020-07-06 21:24:19 -05:00
Adam Feuer
5fb9356eca changing script name to match checkpatch.sh
- as per PR feedback
2020-07-06 21:24:19 -05:00
Adam Feuer
407c5db66b check-release-candidate.sh script
Squashed commit of the following:

commit 40b788f8a0e79aa90734813a557c17f90fb9cdbe
Author: Adam Feuer <adam@adamfeuer.com>
Date:   Sat Jul 4 14:45:13 2020 -0700

    updated license header to APL 2.0; updated usage

commit 81984aeeb503d90f30cb1d0c62a888e2a23235ed
Author: Adam Feuer <adam@adamfeuer.com>
Date:   Thu Jul 2 18:32:05 2020 -0700

move tar.gz files to current dir

- for convenience, so user can untar them and build

commit e1a3100402e39703ea08daa16e2388d4572413dc
Author: Adam Feuer <adam@adamfeuer.com>
Date:   Wed Jul 1 13:17:37 2020 -0700

added trap; copyright header; can take release name

- instead of URL, optionally

commit e0109214c5b887b4b662120ce59c59520d8a5918
Author: Adam Feuer <adam@adamfeuer.com>
Date:   Wed Jul 1 12:54:54 2020 -0700

trap and remove tempfile; set -e to catch errors

commit 196dc4ca4285b821cce644561296a2034e9a671e
Author: Adam Feuer <adam@adamfeuer.com>
Date:   Wed Jul 1 12:15:01 2020 -0700

using wget recursive and cut-dir to download files

- as per PR feedback

commit 127c22bbc14cabe2a59b238b75c21711b000e41b
Author: Adam Feuer <adam@adamfeuer.com>
Date:   Wed Jul 1 11:35:01 2020 -0700

intial addition
2020-07-06 21:24:19 -05:00
Xiang Xiao
3472de3500 Revert "sched/sched/sched_releasetcb.c: Handle custom stack allocations."
Since up_release_stack auto detect whether the memory come from builtin heap
if (ttype == TCB_FLAG_TTYPE_KERNEL)
  {
    if (kmm_heapmember(dtcb->stack_alloc_ptr))
      {
        kmm_free(dtcb->stack_alloc_ptr);
      }
  }
else
  {
    /* Use the user-space allocator if this is a task or pthread */
    if (umm_heapmember(dtcb->stack_alloc_ptr))
      {
        kumm_free(dtcb->stack_alloc_ptr);
      }
  }

This reverts commit 124e6ee53d.
2020-07-07 00:21:46 +01:00
Oleg Evseev
1798383a2d drivers/can: correct checking sem is locked
Object filled by nxsem_get_value can be zero or a negative number
fix for 190782c2959de2b28867022941e52f429d5d07fb

issue #1354
2020-07-06 09:53:22 -03:00
Oleg Evseev
908ee31e7d drivers/can: enter_critical_section in can_poll 2020-07-05 14:38:55 -03:00
Oleg Evseev
247bc10c26 drivers/can: fix wrong use of nxsem_getvalue
Bug caused increase of fifo->rx_sem with each received msg until finally after 32767 messages get into
DEBUGASSERT(sem->semcount<SEM_VALUE_MAX);
or stopping receiving anything at all without debug, while tx was working.

issue #1354
2020-07-05 14:38:55 -03:00
Gregory Nutt
2481b1bfd5 Do not ignore .asm files that are tracked. 2020-07-04 17:52:42 +01:00
Xiang Xiao
95aa3a11d1 arch/tms570: Remove the unused frac variable
and change the type of divb7 from float32_t to float

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-07-04 08:31:06 -07:00
Oleg Evseev
9761235408 libs/libc/semaphore/sem_getvalue: correct get_value descriptions
avoid possible confusion and follow the description POSIX.1-2017
https://pubs.opengroup.org/onlinepubs/9699919799/functions/sem_getvalue.html
2020-07-04 00:36:02 -05:00
YAMAMOTO Takashi
749e871e15 sim: Fix 32-bit module build
Specify -mcmodel=large only on 64-bit case. (x86-64)
The code model is not available for 32-bit.

This fixes the following error:

    MODULECC: chardev.c
    cc1: error: code model 'large' not supported in the 32 bit mode
    Makefile:79: recipe for target 'chardev.o' failed
2020-07-03 23:48:48 -05:00
Xiang Xiao
60fe0a0f96 libc: Refine the inline handling
1.Remove CONFIG_HAVE_INLINE macro
2.Change the ANSI C function to normal function
3.Other simple non ANSI function to macro

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-07-04 11:10:29 +09:00
Xiang Xiao
993591dca1 arch/x86_64: Fix Warning: ignoring changed section attributes
chip/intel64_head.S: Assembler messages:
chip/intel64_head.S:281: Warning: ignoring changed section attributes for .text
chip/intel64_head.S:485: Warning: ignoring changed section attributes for .bss

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-07-03 10:20:39 +01:00
Gregory Nutt
deb3b13759 Udate TODO List
Remove an issues that has recently be resolved.
2020-07-02 20:58:37 +01:00
Xiang Xiao
b984534255 lib/math: Remove float32 and float64 definition
since they aren't defined by standard and never supported by other POSIX OS

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-07-02 10:53:34 -03:00
chao.an
9d7856192b make/POSTBUILD: make BIN directory configurable
enhance the post build can support configurable BIN directory

Change-Id: I64f286b6eb5ed77e91b67a27d815d62c345ac589
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-07-02 12:29:16 +01:00
chao.an
30d2b6c89c make/export: export post build script
post build processing is also necessary for import compilation

Change-Id: Ie27e25b84e2212e9c86358c30ca1a5b7c2adffc5
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-07-02 12:29:16 +01:00
chao.an
628a352973 make/export: use LDNAME instead of LDSCRIPT
use LDNAME instead of LDSCRIPT to avoid invalid native path
exported to the import build

Change-Id: I1ba3cfdbfca02447941dc32a292fe4d76c1ced04
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-07-02 12:29:16 +01:00
chao.an
d938e2cd46 CI check: fix nxstyle warning
nxstyle fixes to reduce the CI warnings

Signed-off-by: chao.an <anchao@xiaomi.com>
2020-07-02 01:53:23 -05:00
chao.an
3fbdc213b7 syscall/prctl: fix PR_SET_NAME failure if without <pid> arg
add PR_SET_NAME_EXT/PR_GET_NAME_EXT extension to avoid semantic
conflicts, use extened version for pthread_setname_np/pthread_getname_np

Change-Id: I40404c737977a623130dcd37feb4061b5526e466
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-07-01 21:52:18 -05:00
Xiang Xiao
310b572116 board/olimex-stm32-p407: Remove CONFIG_SYSTEM_NSH_CXXINITIALIZE
forget in commit 49020acfdc

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-07-01 11:00:33 -06:00
Xiang Xiao
49020acfdc boards: Remove the unused CONFIG_xxx_CXXINITIALIZE=y
since cxx initialization is controlled by CONFIG_HAVE_CXXINITIALIZE now

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I39438dc3006d0a0b810052ecef50cd3c92f09d83
2020-07-01 10:41:37 -06:00
Xiang Xiao
8153e31753 sched: Call c++ global variables constructor inside nxtask_startup
to avoid the similar code spread around each application

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I8967d647eaf2ecae47f29f83e7fa322ef1b42a02
2020-07-01 07:55:33 -06:00
Xiang Xiao
e9c7df4769 sched: Rename task_startup to nxtask_startup
to follow the naming convention

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I3594d12a65e8cacea99bc295d622628304c3f9f8
2020-07-01 07:55:33 -06:00
Jari van Ewijk
b84ce844c6 S32K additional style fixes 2020-07-01 13:45:38 +01:00
Jari van Ewijk
3db090a210 S32K - Expand FlexTimer header file and add PWM support 2020-07-01 13:45:38 +01:00
Xiang Xiao
651eefc8f7 fs: Rename link to symlink
since the current implementation is really a symoblic link not hard link

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I59d30d0a620b0b5714fe91bbe90d4405cf53d187
2020-07-01 11:58:12 +02:00
YAMAMOTO Takashi
028d0c0d15 sim: Disable stack protector for CMODULEFLAGS
On Linux, we (ab)use the host compiler to compile binaries for NuttX.
Explicitly disable features which might be default on the host while
not available on NuttX.

On macOS, this is not necessary because we use a cross compiler,
which has safer defaults for our purpose, to build binaries to
run on NuttX. But this doesn't hurt either.
2020-07-01 01:06:15 -05:00
YAMAMOTO Takashi
b8b2ac4f2c sim: Sync Linux CMODULEFLAGS with macOS
Namely, always use -mcmodel=large.

NuttX modules are loaded into the NuttX heap, which can be out of
range for 32-bit relocations generated with -mcmodel=small.

A possible alternative would be to use MAP_32BIT to allocate sim heap.
But I prefer this approach because it's very convenient for me to
be able to share modules between Linux and macOS sim.
2020-07-01 01:06:15 -05:00
chao.an
e7f2dc8173 net/sockopt: change the socket option style from Linux to BSD
Linux Programmer's Manual
...
IP(7)
...
NOTES
...
    Using the SOL_IP socket options level isn't portable;
    BSD-based stacks use the IPPROTO_IP level.

Change-Id: I63ea5ec7714481b5201608ec4449e522e2be3da2
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-06-30 18:49:58 -03:00
Xiang Xiao
a102922e12 libc: Implement realpath
specified here:
https://pubs.opengroup.org/onlinepubs/9699919799/functions/realpath.html

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ie52dcd1c5c5faa4b033901eedd7182bbb9473f7a
2020-06-30 13:09:58 -06:00
Xiang Xiao
0b891d60f9 vfs: Define symlink as link
specified here:
https://pubs.opengroup.org/onlinepubs/009695399/functions/symlink.html
yes, symlink is different from link:
1.symlink create the soft(symbolic) link
2.link create the hard link
but it is suitable to make them same now since vfs doesn't support the
hard link and the soft link in file system level yet.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I3b6e311cc1c826542165c9d93cbe5e078f113684
2020-06-30 13:09:58 -06:00
Xiang Xiao
b598ab43d7 fs: Implement lstat function
specified here:
https://pubs.opengroup.org/onlinepubs/009695399/functions/lstat.html

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Iefc23a02d425ff84fa4027aea7da1181b01eced7
2020-06-30 13:09:58 -06:00
Peter van der Perk
b938348cdb S32K1XX EEEPROM indentation fix 2020-06-30 12:46:50 -06:00
Peter van der Perk
4a40a7c3d7 S32K148EVB netdev lateinit to support Enet & CAN at the same time 2020-06-30 12:46:50 -06:00
Peter van der Perk
eca1011b1e Expose xxx_caninitialize() correctly so it's usable in latedev init when there are multiple net devices 2020-06-30 12:46:50 -06:00