Commit Graph

37839 Commits

Author SHA1 Message Date
chao.an 2fc02ec4a4 sched/task_init: change the stack pointer type to (void *)
change the stack pointer type from (uint32_t *) to (void *)

Change-Id: I90bb7d6a9cb0184c133578a1a2ae9a19c233ad30
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-06-30 08:26:38 +02:00
chao.an 62b777b1cd sched/task: unify task initialization
1. nxthread_create() Reduce code duplication
2. nxtask_init(): support stack allocation from internal

Change-Id: Ib495a6efb032d9caa9b03113a0763b71486d14ea
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-06-30 08:26:38 +02:00
liuhaitao ac1641dc1b stm32/nucleo-f412zg: refresh nsh defconfig
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-06-29 23:17:03 -05:00
liuhaitao 708f68a3d2 stm32/nucleo-f412zg: update nucleo-f412zg files to fix nightly build break
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-06-29 23:17:03 -05:00
Xiang Xiao d8376efdc1 nxsched_release_tcb: Should release stack in kernel build too
otherwise the memory can't be reused util the process exit

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-06-29 17:07:50 -06:00
Brennan Ashton e87617f9fa nxstyle: fixup style issues in mm_realloc.c
Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
2020-06-29 14:56:26 -07:00
Brennan Ashton fcd6e1c7eb mm: Do not memcopy more than oldsize when realloc
When realloc up from a mem area to a larger one where a new node
is needed. The the larger memory region is copied from the source
this can both leak data as well as cause memory faults accesssing
invalid data.

This was first reported by Kwonsk

Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
2020-06-29 14:56:26 -07:00
chao.an b296adc3bb socket/SOL: sync the SOL index with linux
Change-Id: I32b9eb7cc3bc1428f0ff7bf5e60d7fff52621db2
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-06-29 11:34:43 -05:00
Jacob Dahl b12b3072e8 Added support for STM32F412xx. Tested with the NUCLEO-F412ZG dev board as well as a custom board using the STM32F412CE. 2020-06-29 17:44:35 +02:00
Xiang Xiao b71c491f00 libc/math: Fix warning: dereferencing type-punned pointer will break strict-aliasing rules
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I15aa5d664c20ea7bb95ba60e056134d2ff933db9
2020-06-29 16:25:22 +01:00
Xiang Xiao 43b613877d libc/stdio: Remove sys/types.h inclusion for printf/scanf
since double_t move from sys/types.h to math.h now and remove
math.h inclusion too because lib_dtoa_engine.h already include

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I3497a73908301d999cf1cfc4a66552a7ca4868c6
2020-06-29 16:25:22 +01:00
Xiang Xiao d0dc72c2fb boards/x86_64/intel64: enable CONFIG_LIBM=y
to fix the math.h can't be found on macOS

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-06-29 16:25:22 +01:00
Xiang Xiao 23e0134954 mksyscall: Fix warning "variable 'i' is used uninitialized"
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-06-29 14:12:58 +01:00
Xiang Xiao d17b963bca libc: Move double_t typedef from sys/types.h to math.h
specified here:
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/math.h.html

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I3497a73908301d999cf1cfc4a66552a7ca4868c6
2020-06-29 13:37:41 +01:00
Alin Jerpelea 294fdd80a9 tools: cxd56: nxstyle fixes
nxstyle fixes to pass the CI checks

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2020-06-29 13:36:18 +01:00
Alin Jerpelea 5de436b872 tools: cxd56: mkspk: fix out of tree MAC build
The local copy of elf headers is needed for the MAC systems which miss the ELF headers.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2020-06-29 13:36:18 +01:00
Xiang Xiao 771f532dcb cxx: Remove CONFIG_NET guard from [get|set]hostname
since these two functions is always implemented now

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Iae46fa4d38b680a5d1ce5c314ffcb71af4a3dc95
2020-06-29 09:06:36 -03:00
Claudio Micheli 10f93b9d9b stm32l4: extend CAN ioctrl with NART/ABOM. Add RTR to CAN header
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2020-06-29 09:05:44 -03:00
Claudio Micheli 94e87bb6e8 stm32: extend CAN ioctrl with NART/ABOM. Add RTR to CAN header
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2020-06-29 09:05:44 -03:00
Claudio Micheli 7a346bee26 stm32f7: Add the option to include RTR in CAN header
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2020-06-29 09:05:44 -03:00
Beat Küng f6039bbfa7 stm32f7: add CANIOC_SET_NART and CANIOC_SET_ABOM ioctl's to can driver 2020-06-29 09:05:44 -03:00
Xiang Xiao 676a2b77f8 stdio.h: Implement fseeko and ftello function
specified here:
https://pubs.opengroup.org/onlinepubs/9699919799/functions/fseek.html
https://pubs.opengroup.org/onlinepubs/9699919799/functions/ftell.html

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-06-29 14:26:19 +09:00
Xiang Xiao 095e492cb3 libc: Replace nuttx/lib/math.h with math.h
Because user may replace math library with other implementation

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Idb5f2a8b2a70302c8561553b3bcbc40529b5257f
2020-06-29 06:32:10 +02:00
Xiang Xiao b2f3a4b5f9 tools/nxstyle: Support the white list
and add _Exit to the white list

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-06-28 21:07:57 +01:00
Matias Nitsche 861f80e853 stm32l4 RCC: configure flash wait states early, otherwise execution is corrupted when clock is increased before that 2020-06-28 13:25:05 -03:00
chao.an fd3be9eb37 make/export: support export extra library
Change-Id: Iaab5dc8fd61b55888dad59d9b1d8380d7bd44a58
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-06-27 22:45:41 +01:00
chao.an 41f434015b make/export: do not extract object from librarys
To avoid overriding of objects with duplicate file name

Change-Id: I83c964d161d23942cd3fc29eb738da44775cfc10
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-06-27 22:45:41 +01:00
chao.an e82a9e0f48 make/export: copy mkdeps.c for export build
Change-Id: Ic1aa04d5d4dd2332cf4a13ec51c76cdb7d90736c
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-06-27 22:45:41 +01:00
chao.an 98f0b0afb5 build/export: correct the export path
Change-Id: Ia2e19f30d32154c3329f46c5d8362fafd6b7e274
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-06-27 22:45:41 +01:00
Xiang Xiao 977f04a2b1 libc: sysconf support _SC_NPROCESSORS_CONF/_SC_NPROCESSORS_ONLN
specified here:
https://www.man7.org/linux/man-pages/man3/sysconf.3.html

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I87fba8476221797e59c69c1953974bebc8d0d7b3
2020-06-27 22:43:13 +01:00
Matias Nitsche c26521c38f stm32l4 dfumode: move initialization point of bootloader jump instruction to correct place 2020-06-26 09:59:40 -03:00
Matias Nitsche d1c538b65c stm32l4: dfumode style fixes 2020-06-26 09:59:40 -03:00
Matias Nitsche b4bea95a6a stm32l4: add support for booting into DFU mode 2020-06-26 09:59:40 -03:00
chao.an b83b83bf51 pthread/mutex: add PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP support
Note: the _NP suffix indicates a non-portable extension to the POSIX specification.

Library Functions Manual

PTHREAD_MUTEX(3)
...
SYNOPSIS
...
       pthread_mutex_t recmutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
...
DESCRIPTION
       PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP (for recursive mutexes).

Change-Id: I58320421ee8dc9a90dca4f593b5d3908be3932db
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-06-26 09:52:56 -03:00
Ouss4 a7fdc4ba03 arch/arm/src/stm32/stm32f40xxx_i2c.c: Fix tracing enumeration.
Values used in the ISR were taken from STM32F7 but the enumeration was
not updated.
2020-06-26 09:51:09 -03:00
YAMAMOTO Takashi 91611de0ff waitid: implement WNOHANG
If there's no child status available immediately,
return 0 without blocking as specified by the standards.

I checked the following version of the standard.
I believe it has always been this way though.

    The Open Group Base Specifications Issue 7, 2018 edition
    IEEE Std 1003.1-2017 (Revision of IEEE Std 1003.1-2008)
2020-06-26 05:19:59 -05:00
YAMAMOTO Takashi 6661f56add waitpid: implement WNOHANG for CONFIG_SCHED_HAVE_PARENT=y
If there's no child status available immediately,
return 0 without blocking as specified by the standards.

The implementation for non CONFIG_SCHED_HAVE_PARENT case
seems ok in this regard.

I checked the following version of the standard.
I believe it has always been this way though.

    The Open Group Base Specifications Issue 7, 2018 edition
    IEEE Std 1003.1-2017 (Revision of IEEE Std 1003.1-2008)
2020-06-26 05:19:59 -05:00
YAMAMOTO Takashi 05671fd8f1 vpnkit: set mac address when available
up_vpnkit network driver gets its mac address from the vpnkit.
it isn't available until a successful negotiation with the vpnkit.
2020-06-25 07:27:44 -05:00
YAMAMOTO Takashi 74d13d74b9 sim: Add more names to nuttx-names.in
Some of them are for the recent development. eg. rewind, ftw
Some of them were simply missing. eg. shutdown
2020-06-25 07:26:53 -05:00
Matias Nitsche b3327419d3 tone: stop tone using 0 duty, not stop() 2020-06-25 11:04:14 +01:00
Matias Nitsche 1115f0104b stm32l4 oneshot: style fix 2020-06-25 11:04:14 +01:00
Matias Nitsche 10a9464bcf tone: start playing tune immediately without delay 2020-06-25 11:04:14 +01:00
Matias Nitsche 3c37d68735 stm32l4 oneshot: assert period > 0, otherwise the timer never fires 2020-06-25 11:04:14 +01:00
Masayuki Ishikawa edd3dd3168 libs: rv64: Fix _calc_imm() in arch_elf.c 2020-06-25 02:21:23 -05:00
Ouss4 701100f6f9 drivers/sensors/mpu60x0: Add I2C support. 2020-06-24 23:30:34 -03:00
Gustavo Henrique Nihei 807c1df498 boards/arm/stm32f7/stm32f769i-disco: Apply NxStyle fixes 2020-06-24 10:51:02 -03:00
Gustavo Henrique Nihei 105d561a51 arch/arm/src/stm32f7: Refactor FMC functions for STM32F7
This refactor is based on the FMC architecture of STM32H7, with the
exception of the board specific definitions.
2020-06-24 10:51:02 -03:00
Gustavo Henrique Nihei cf86459495 boards/arm/stm32/stm32f769i-disco: Include missing header 2020-06-24 10:51:02 -03:00
Gustavo Henrique Nihei b06722cd7f boards/arm/stm32/stm32f769i-disco: Add support for external SDRAM 2020-06-24 10:51:02 -03:00
chao.an f5039d0b23 sim: fix compile error caused by race condition
LD: nuttx.rel
objcopy: couldn't open symbol redefinition file nuttx-names.dat
         (error: No such file or directory)
Makefile: 297: recipe for target 'nuttx.rel' failed

Change-Id: Ic78f030b77c3468ddbb96d4fb0558edad3abc3ae
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-06-24 14:32:22 +01:00