Commit Graph

38223 Commits

Author SHA1 Message Date
ligd c11c1dc8fd libs/libc/stdio: replace double_t to double
Modify reason:

When build Nuttx SIM, in x86_64 system:

Compile with gcc option '-m64' (default):
sizeof(double_t) = 8
sizeof(double)   = 8

Compile with gcc option '-mx32':
sizeof(double_t) = 8
sizeof(double)   = 8

Compile with gcc option '-m32':
sizeof(double_t) = 12       // long double
sizeof(double)   = 8

When use '-m32', and print sth. like this:
printf("%f\n", (double)3.0);
SIM will print out: nan

This is because sizeof(double_t) is not equal with double.

Resolve:
replace all double_t to double in libs/libc/stdio.

As a user of '-m32', you should know double_t is one type
long double, and len is 12. And you use use '%lf' to print.
like:
printf("%lf\n", (double_t)3.0);

Currently we don't support '%lf'.

Change-Id: I9b9d11853140d5296dd80416c8ed6a260a9d2d9c
Signed-off-by: ligd <liguiding1@xiaomi.com>
2020-09-15 14:42:36 +08:00
Abdelatif Guettouche d47131d8ae arch/xtensa/src/esp32/hardware/esp32_spi.h: Remove a leftover license. 2020-09-15 14:40:17 +08:00
Abdelatif Guettouche 55f7473ba0 arch/xtensa/src/esp32/esp32_spiflash.c: #if0-out unused functions.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-09-15 14:40:17 +08:00
Abdelatif Guettouche a97a9aeaf6 arch/xtensa/src/esp32/esp32_spiflash.c: File scope global variables are
prefixed with g_

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-09-15 14:40:17 +08:00
Nakamura, Yuuichi 7ce5369873 Fix cxd56 uart deadlock 2020-09-15 15:12:02 +09:00
Bhindhiya 0e22eceef2 RX65N Ethernet pre-check warnings resolved 2020-09-15 09:51:04 +08:00
Matias N 3e48832cf6 z80: missing removal of KDEFINE/EXTRAFLAGS at arch level 2020-09-15 09:49:55 +08:00
Abdelatif Guettouche 7d1ac72b9b boards/Board.mk: Make the context target a double colon target and allow
other obards to extend it instead of relaying on a definition of a variable.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-09-15 09:48:33 +08:00
ligd 6b7dd62bad mm/mm_heap/mm_initialize.c: add sem lock to mm_addregion()
Change-Id: I4a72e36fcd4504c0d8e671fe2243b14764db3b35
2020-09-15 08:50:01 +09:00
Brennan Ashton c9e618b7b6 nRF: Incorrect base addresses for SPI controllers 1,2,3
Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
2020-09-14 19:11:21 -03:00
Xiang Xiao 539a0338dd sched: Refine the comment for SCHED_INSTRUMENTATION_EXTERNAL
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-09-14 13:43:42 -07:00
Xiang Xiao 027e2eed28 libc: Implement umask function
Here is the spec:
https://pubs.opengroup.org/onlinepubs/009695399/functions/umask.html
Note: The simple implementaton is enough since
      NuttX doesn't really support the permission

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-09-14 12:16:58 -03:00
Nathan Hartman e681396d35 tiva: tiva_lowputc.c, tiva_qencoder.c: Fix nxstyle warnings
arch/arm/src/tiva/common/tiva_lowputc.c:

    * Fix nxstyle warnings. No functional changes.

arch/arm/src/tiva/common/tiva_qencoder.c:

    * Fix nxstyle warnings. No functional changes.
2020-09-14 12:16:28 -03:00
dongjiuzhu 03c7951cbd libc/termios: modify termios setting follow linux and posix
Change-Id: Id323b3169e74f4153fd8d132d20926b7fb8336a3
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-09-14 09:23:46 -03:00
dongjiuzhu 3634bb6ba5 sim/uart: support tty operation in arch/sim
Change-Id: I6943c1e928ed821aa913bc619e5b8c581b5610c3
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-09-14 09:23:46 -03:00
Matias N 34b34e2d45 Fix: ensure archive files do not carry object files from prior builds
In some cases, when NuttX configuration changes and this makes the
object list used to build one of the .a libraries change as well,
since the command used to build it is "ar crs" and this simply appends
the list of object files, the library could still include object
files from prior builds. This commit modifies the ARCHIVE macro to
erase the .a file if it already exists.

Since in some cases this behavior was actually expected (object
files from a subdirectory were appended to a library created one
level above) I added a ARCHIVE_ADD which works as ARCHIVE did.

This change should greatly improve behavior of building after
configuration changes.
2020-09-14 15:54:18 +08:00
Brennan Ashton 93eeecff6a nrf52: SPI transfer failure and corruption
The current EasyDMA implementation will fail if a transfer of over
255 bytes is requested with no warning.

Also we do not set the RX and TX transfer lengths to 0 if the
buffer is NULL which can cause data to be written to the old
address as well as cause unexpected transaction lenghts.
Example:
  transfer 1:
   rx_len  = 10
   rx_buff != NULL
   tx_len  = 10
   tx_buff != NULL
  transfer 2:
   rx_len = 2
   rx_buff != NULL
   tx_buff == NULL
  Total transaction length for the second would be 10 because it
  would still be using the old rx length of 10 and would
  corrupt data in the old rx buffer.

Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
2020-09-14 07:21:24 +02:00
Matias N 3d1159007f Remove extra application of EXTRAFLAGS and KDEFINE and the arch-level
EXTRAFLAGS is already applied to *FLAGS in board's Make.defs (and
it applies to whole build, not just arch-code). EXTRAFLAGS is passed
around each make call to the complete build.

KDEFINE is already added to EXTRAFLAGS in main Makefile so no need
to add it again in arch-level Makefile
2020-09-14 13:59:57 +09:00
Brennan Ashton 5f85024d8c nrf52: SPI cmddata function mapping wrong for SPI(0,2,3)
Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
2020-09-13 21:19:17 -03:00
Matias N 7d16090d11 Fix testbuild.sh to actually fail when using -x. Leave -x out for CI
so that we detect all possible build errors for a job.
2020-09-13 10:29:13 -07:00
Nathan Hartman 1ab683387d tiva: tiva_eeprom.c: Fix nxstyle warnings
arch/arm/src/tiva/common/tiva_eeprom.c:

    * Fix nxstyle warnings. No functional changes.
2020-09-13 13:11:26 -03:00
raiden00pl 749eac9bf6 boards/nrf52840-dk: normalize adc and pwm configs 2020-09-13 10:57:11 -03:00
raiden00pl 49d0d41234 arch/arm/src/nrf52/nrf52_pwm.c: add missing index for pwm2 and pwm3 2020-09-13 10:57:11 -03:00
raiden00pl 13ff8e0276 boards/nrf52840-dk: add ADC and PWM examples 2020-09-13 10:57:11 -03:00
raiden00pl e7f3028aa6 nrf52: add ADC support 2020-09-13 10:57:11 -03:00
raiden00pl a2b00fd348 nrf52: add PWM support 2020-09-13 10:57:11 -03:00
raiden00pl 493b0bf074 drivers/timers/pwm.c: add missing new lines to some debug messages 2020-09-13 10:57:11 -03:00
Matias N 5106c3fe3f documentation: make the "make clean" suggestion a warning 2020-09-12 19:28:24 -07:00
Matias N 94e1a9247c documentation: work on quickstart, add tabs sphinx extension 2020-09-12 19:28:24 -07:00
Matias N c1878406b5 fix: normalize two board configs which were not updated for CONFIG_NFILE_STREAMS change 2020-09-12 14:18:51 -07:00
Xiang Xiao 0c3930ba11 sched: Rename note_add to sched_note_add
to better match other sched_note_* function

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-09-12 08:42:30 -07:00
Matias N dbf58162db CI: remove use of source cache, use artifacts instead 2020-09-11 12:54:37 -07:00
Abdelatif Guettouche 53b975ff79 boards/xtensa/esp32/esp32-core: Add a defconfig example for the
SPIFlash.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-09-11 14:14:43 -03:00
Abdelatif Guettouche d485ccc142 boards/xtensa/esp32/esp32-core: Support for the external FLASH.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-09-11 14:14:43 -03:00
Abdelatif Guettouche c27bf32ce9 arch/xtensa/src/esp32/Kconfig: Add the SPI FLASH title to make appear in
menuconfig.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-09-11 14:14:43 -03:00
Abdelatif Guettouche 9c0157c882 arch/xtensa/src/esp32/esp32_spiflash.c: Cosmetic changes.
Add missing prototypes.
Fix some alignements.
Add some more comments.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-09-11 14:14:43 -03:00
Abdelatif Guettouche 6b6d983650 arch/xtensa/src/esp32/esp32_spiflash.c: Don't double check for direct
read mode.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2020-09-11 14:14:43 -03:00
Matias N 7b965a25d8 Documentation: build documentation using sphinx -j option which parallelizes jobs 2020-09-12 00:43:22 +08:00
Nathan Hartman 70caa27c4c tiva: tiva_dumpgpio.c: Fix nxstyle warnings
arch/arm/src/tiva/common/tiva_dumpgpio.c:

    * Fix nxstyle warnings. No functional changes.
2020-09-12 00:38:37 +08:00
Xiang Xiao d1d8f2515d boards/esp32: Remove CONFIG_NFILE_STREAMS option
since it is removed in:
commit b0797263ca
Author: Xiang Xiao <xiaoxiang@xiaomi.com>
Date:   Thu Aug 13 18:17:29 2020 +0800

    libc/stdio: Allocate file_struct dynamically

    1.Reduce the default size of task_group_s(~512B each task)
    2.Scale better between simple and complex application

    Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
    Change-Id: Ia872137504fddcf64d89c48d6f0593d76d582710

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-09-11 20:47:41 +08:00
Xiang Xiao b0797263ca libc/stdio: Allocate file_struct dynamically
1.Reduce the default size of task_group_s(~512B each task)
2.Scale better between simple and complex application

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ia872137504fddcf64d89c48d6f0593d76d582710
2020-09-11 17:58:17 +08:00
Masayuki Ishikawa 154d6bc556 arch: cxd56xx: Use spinlock API in cxd56_gpioint.c
Summary:
- This commit improves cxd56_gpioint performance in SMP mode.

Impact:
- This commit affects SMP mode only.

Testing:
- Tested with spresense:wifi_smp

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-09-11 17:27:42 +08:00
Masayuki Ishikawa 58317b1430 drivers: wireless: Fix warnings in gs2200m.c
Summary:
- This commit fixes warnings when we remove noreturn from _assert()

Impact:
- Should have no impact

Testing:
- Tested with spresense:wifi

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-09-11 08:25:31 +02:00
ligd f428160dcc signal: add SIGQUIT & SIGTERM support
SIGQUIT SIGTERM are equal with SIGINT now

Change-Id: Iefc084d58db28003dc40a17f1ff3fbd7a0b716ed
2020-09-11 10:41:24 +08:00
ligd 6dc3cbe9cb arch/Kconfig: add ARCH_HAVE_SERIAL_TERMIOS support to ARCH_SIM
Change-Id: I6f3c285aebd7b7989723709d1f956a56104958f4
Signed-off-by: ligd <liguiding1@xiaomi.com>
2020-09-11 10:41:24 +08:00
ligd c8c2745fa7 include/sys/types.h: add u_intXX_t support
like u_int8_t u_int16_t u_in32_t...

Change-Id: Ieee5014bddb1cf1a6e769af7258ff524263f67fb
Signed-off-by: ligd <liguiding1@xiaomi.com>
2020-09-11 10:41:24 +08:00
Brennan Ashton 3d07d453e0 CI: Disable keeping ccache across builds
Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
2020-09-11 10:03:15 +08:00
David Sidrane 1c488eb864 sched_note:Allow for external endpoints - spelling 2020-09-10 10:01:36 -06:00
Nathan Hartman 3316c196d4 tiva: tiva_adclow.c, tiva_allocateheap: Fix nxstyle warnings
arch/arm/src/tiva/common/tiva_adclow.c:

    * Fix nxstyle warnings. No functional changes.

arch/arm/src/tiva/common/tiva_allocateheap.c

    * Fix nxstyle warnings. No functional changes.
2020-09-10 23:54:17 +08:00
David Sidrane 80405e15dd sched_note:Allow for external endpoints 2020-09-10 22:06:32 +08:00