Commit Graph

40417 Commits

Author SHA1 Message Date
David Sidrane
ab5f46d46c stm32h7:Add DBGMCU 2021-03-02 18:28:19 -08:00
Alin Jerpelea
41b029876f pcm_decode: add RAW format support
adds CONFIG_AUDIO_FORMAT_RAW as an option to the PCM
audio format for devices expecting raw data without
a header.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-03-02 18:27:45 -08:00
chenwen
19627095e4 esp32/esp32_allocateheap.c: Support the maximum available internal heap configuration 2021-03-02 18:27:20 -08:00
chenwen
516c553b97 esp32/esp32_wifi_adapter.c: Fix the issue of WiFi internal malloc from PSRAM 2021-03-02 18:27:20 -08:00
Nathan Hartman
a3f0923ad0 arch/stm32f7: Fix nxstyle errors
arch/arm/src/stm32f7/stm32_tim.h:

    * Fix nxstyle errors.
2021-03-02 21:34:33 +00:00
David Sidrane
1e5754232a stm32f7:Add option to auto select LSE CAPABILITY
This Knob will cycle through the values from
   low to high. To avoid damaging the crystal.
   We want to use the lowest setting that gets
   the OSC running. See app note AN2867
2021-03-02 14:34:56 -03:00
David Sidrane
9fbd7f9dc5 stm32h7:Add option to auto select LSE CAPABILITY
This Knob will cycle through the correct*
   values from low to high. To avoid damaging
   the crystal. We want to use the lowest setting
   that gets the OSC running. See app note AN2867

    *It will take into account the rev of the silicon
    and use the correct code points to achive the drive
    strength. See Eratta ES0392 Rev 7 2.2.14 LSE oscillator
    driving capability selection bits are swapped.
2021-03-02 14:34:56 -03:00
Masayuki Ishikawa
9d370fc363 sched: task: Call nxtask_flushstreams() without critical section
Summary:
- During investigating critical section with semaphores, I noticed
  that nxtask_flushstreams() is called with a critical section.
- The function calls lib_flushall() which handles a semaphore
  in userspace.
- So it should be done without a critical section

Impact:
- SMP only

Testing:
- Tested with ostest the following configs
- esp32-devkitc:smp (QEMU), sabre-6quad:smp (QEMU)
- maix-bit:smp (QEMU), sim:smp
- spresense:smp
- Tested with nxplayer and stress test with spresense:wifi_smp

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-03-02 05:05:29 -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
Michael Jung
fbfddda28b armv8-m: Fix EXC_RETURN for non-secure usage
With TrustZone support in armv8-m the bit-fields in EXC_RETURN have been
extended.  Bit 6 ('S') now specifies whether the interrupted program was
running in the Non-Secure (S=0) or Secure (S=1) security state.
Furthermore, Bit 0 ('ES' - Exception Secure) specifies the
security state athe exception is taken to (0: Non-Secure, 1: Secure).

When NuttX is run together with TrustedFirmware-M as the application in
the non-secure world both the S and the ES bits have to be set to '0'.
For armv8-m those are also the correct values if TrustZone is not
implemented on the respective MCU or if it is disabled.

Signed-off-by: Michael Jung <mijung@gmx.net>
2021-03-02 07:28:42 -03:00
YAMAMOTO Takashi
c230edea29 esp32_ummap: write back spiram cache before calling Cache_Flush
This seems to fix esp32_readdata_encrypted() with spiram "buffer".

Note: I'm not sure if this is the right fix or not.
I couldn't find any documentation about Cache_Flush.
2021-03-02 08:37:50 +00:00
David Sidrane
367ec2068b tools/convert-comments:Fix breakage from Sytle fixes 2021-03-01 19:08:53 -08:00
Nathan Hartman
75eb3e8ec2 arch/stm32f7: Fix nxstyle errors
arch/arm/src/stm32f7/stm32_lowputc.c:

    * Fix nxstyle errors.
2021-03-01 18:13:06 +00:00
Xiang Xiao
3d24288a66 arm/cxd56xx: Beautify the coding style in cxd56_gnss.c
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-03-01 10:00:13 -05:00
Masayuki Ishikawa
191ada2296 libs: misc: Remove critical section in lib_filesem.c for SMP
Summary:
- The code was added in Mar 2018 to stabilize the SMP kernel
- I confirmed that the code is no longer needed now.

Impact:
- SMP only

Testing:
- Tested with ostest the following configs
- esp32-devkitc:smp (QEMU), sabre-6quad:smp (QEMU)
- maix-bit:smp (QEMU), sim:smp
- spresense:smp
- Tested with nxplayer and stress test with spresense:wifi_smp

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-03-01 03:44:25 -08:00
Alan C. Assis
b1dc2199be stm32f103-minimum: Update README.txt to use MCP2515 module 2021-02-28 20:02:29 -08:00
Xiang Xiao
151cf49562 Fix nxstyle warning
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-03-01 09:23:09 +09:00
Xiang Xiao
9473434587 Ensure the kernel component don't call userspace API
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-03-01 09:23:09 +09: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
Masayuki Ishikawa
59a5d03842 boards: raspberrypi-pico: Update defconfigs
Summary:
- Adjust CONFIG_BOARD_LOOPSPERMSEC in all defconfigs
- Add CONFIG_TESTING_GETPRIM to nsh and nshsram
- Add CONFIG_SYSTEM_TASKSET to smp
- NOTE: CONFIG_SCHED_WAITPID is removed because it is selected

Impact:
- The smp app will take longer than before but it's a correct behavior

Testing:
- Tested with getprime, ostest, smp
2021-02-26 22:23:55 -06:00
Masayuki Ishikawa
ef1826e133 arch: armv6-m: Apply armv7-m signal handling logic
Summary:
- This commit applies armv7-m signal handling logic

Impact:
- armv6-m signal handling

Testing:
- Tested with ostest with the following configs
- raspberrypi-pico:nsh, raspberrypi-pico:smp

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-02-26 22:23:03 -06:00
Fotis Panagiotopoulos
40fdf388bd Fixed __stack_overflow_trap declaration typo. 2021-02-26 12:08:16 -08:00
Jiuzhu Dong
fecc68d1bb mm/umm_heap: move memory-related api from libc/stdlib to umm
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-02-26 11:47:11 -08: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
Nathan Hartman
9d48beb2c8 arch/stm32f7: Fix nxstyle errors
arch/arm/src/stm32f7/stm32_ltdc.h,
arch/arm/src/stm32f7/stm32_pm.h,
arch/arm/src/stm32f7/stm32_pmsleep.c,
arch/arm/src/stm32f7/stm32_pmstandby.c,
arch/arm/src/stm32f7/stm32_pmstop.c,
arch/arm/src/stm32f7/stm32_pwm.h:

    * Fix nxstyle errors.
2021-02-26 17:13:05 +00:00
Peter van der Perk
4842868be2 [FlexCAN] Fix TX drop #2792 and correctly set CAN timings to non-zeroed registers 2021-02-26 06:14:33 -08:00
Xiang Xiao
2c7faade49 fs/lfs: Remove semret temporary variable
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I2df74c7d42fac25c4b010e6b10c2af36f555c480
2021-02-26 10:45:00 +00:00
Xiang Xiao
ac528203fe fs/lfs: lfs_file_sync() when littlefs_open
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
Change-Id: I8935f7aee414580174141f4b114b5faf03ffafd5
2021-02-26 10:45:00 +00:00
Jiuzhu Dong
6cac6c50d1 unistd/getcwd: enhance getcwd when buf is NULL
Change-Id: I595e1874349f089691dc5291f31fb376cf0e2e2c
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-02-26 02:32:14 -08:00
Byron Ellacott
1105cf0669 ez80: fix several bugs in emac driver
IRQs cannot be individually disabled on the eZ80, so using
`up_disable_irq()` had no effect. This left the IRQ handler being
constantly triggered without the lower half handler running.

The macro for EMAC stats was incompatible with Clang. The simplified
form gives identical results under ZDS-II.

The MII clock speed must be set before trying to read MII registers.
It's now done before resetting the PHY using the Mode Control Register.

MII initialization waited on the auto-neogotiate restart bit being set
but PHY hardware is frequently fast enough to have cleared the bit
before the first read of it. It now instead just waits on auto-negotiate
completing. The MII poll loop now uses `up_mdelay` because it was far
too fast at 50MHz using a busy loop, giving time for a link to be
established.

Bad packets are now processed enough to release their buffers back to
the EMAC hardware.

A few typos, unused variables, and other miscellaneous issues were also
fixed.
2021-02-26 03:25:58 -06:00
Michal Lenc
04fc5e314d arch/arm/src/imxrt: updated flexcan driver to support classical and FD frames at once
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2021-02-25 22:31:04 -08:00
Michal Lenc
3b219fb2da boards/arm/imxrt/teensy-4.x: allow configuration of all CANs
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2021-02-25 22:31:04 -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
Abdelatif Guettouche
39016f6d68 risc-v/esp32c3: Configure clock and call board initialize at startup.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-02-25 22:13:26 -08:00
Gustavo Henrique Nihei
c76e201ebd drivers/i2s: Fix nxstyle issues 2021-02-25 18:57:18 -08:00
Gustavo Henrique Nihei
55d66f60a3 drivers: Fix typos reported by codespell 2021-02-25 18:57:18 -08:00
Gustavo Henrique Nihei
76acb32e29 Fix typos reported by codespell 2021-02-25 11:31:49 -08:00
Gustavo Henrique Nihei
b9f231cdca include: Fix typos reported by codespell 2021-02-25 11:30:38 -08:00
hotislandn
651b905b99 arch:rv64:add API up_copyfullstate for later FPU support.
Signed-off-by: hotislandn <hotislandn@hotmail.com>
2021-02-25 11:26:27 -08:00
Yuichi Nakamura
a556bbf3a4 arm/rp2040: Fix LDFLAGS for boot stage2 2021-02-25 11:25:27 -08:00
Gustavo Henrique Nihei
7fe096c65e risc-v: Fix typos reported by codespell 2021-02-25 16:25:47 +00:00
Gustavo Henrique Nihei
ed0a1b724b xtensa/esp32: Fix typos reported by codespell 2021-02-25 15:02:15 +00:00
Alin Jerpelea
561428fb84 libs: nxstyle fixes
nxstyle fixes to pass the CI

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-02-25 01:44:30 -08:00
Alin Jerpelea
88fa869a04 libnx: Author Gregory Nutt: update licenses to Apache
Gregory Nutt has submitted the SGA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-02-25 01:44:30 -08:00
Alin Jerpelea
9dd35d8d83 libcxx: : Author Gregory Nutt: update licenses to Apache
Gregory Nutt has submitted the SGA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-02-25 01:44:30 -08:00
Alin Jerpelea
fe9ccffe2b libs: libnx: nxfonts: fix Mixed case identifier
Fix Mixed case identifier to pass nxstyle CI check

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-02-25 01:44:30 -08:00
hotislandn
30cb7d3983 arch:rv32:up_sigdeliver missing fpu contexts.
Signed-off-by: hotislandn <hotislandn@hotmail.com>
2021-02-24 23:42:18 -08:00
YAMAMOTO Takashi
542574acd6 libs/libc/modlib/modlib_init.c: initialize file descriptor with -1
Use -1 instead of 0 to represent an invalid descriptor
so that modlib_uninitialize doesn't try to close the descriptor 0.
2021-02-24 23:42:06 -08:00
YAMAMOTO Takashi
bac6b11065 sched/module/mod_insmod.c: Fix a resource leak
Note: partially initialized loadinfo should be uninitialized.
It can contain an open file descriptor.
2021-02-24 23:42:06 -08:00
Masayuki Ishikawa
8085010ae8 arch: arm: Add 'select ARM_HAVE_WFE_SEV' to ARCH_CHIP_RP2040
Summary:
- This commit adds 'select ARM_HAVE_WFE_SEV' to ARCH_CHIP_RP2040
- Now NuttX spinlock uses WFE/SEV to reduce power consumption
- Also, modify a comment on rp2040

Impact:
- rp2040 only

Testing:
- Tested with raspberrypi-pico:smp

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-02-24 19:12:22 -08:00