Commit Graph

16152 Commits

Author SHA1 Message Date
Matias N
3e48832cf6 z80: missing removal of KDEFINE/EXTRAFLAGS at arch level 2020-09-15 09:49:55 +08: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
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
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
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
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
49d0d41234 arch/arm/src/nrf52/nrf52_pwm.c: add missing index for pwm2 and pwm3 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
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
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
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
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
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
Matias N
459ad29799 nrf52: extend systimer support; support WFI/WFE again
This commit exends systimer options for nRF52 arch. It is possible
to use ARM SysTick either for tickless or non-tickless mode. Also,
it is possible to use the RTC peripheral for tickless mode. This
also re-enables support for WFI/WFE sleep if RTC is used, since
this counter continues to run in this mode (in contrast to SysTick).
2020-09-10 12:10:20 +02:00
Matias N
dcd49c3882 nrf52_rtc: add missing getcounter() 2020-09-10 12:10:20 +02:00
ligd
d785394b0f arch/sim/src/sim/up_tapdev.c: fix compile error
Change-Id: I8d5a176671f78464c057155edace5eabbb382c5c
2020-09-10 15:33:55 +08:00
Masayuki Ishikawa
22651fa22b arch: cxd56xx: Introduce cxd56_testset.c
Summary:
- I noticed that ldrex/strex on cxd56xx have an issue
- The issue is still under investigation
- This commit introduces a custom testset to avoid the issue

Impact:
- Affects cxd56xx in SMP mode if it is enabled

Testing:
- Tested with spresense:wifi_smp

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-09-10 08:52:22 +02:00
Ouss4
06ca12e6b9 arch/: Trivial typos, mostly "their is" to "there is" 2020-09-09 14:09:43 -04:00
Nathan Hartman
8f6b2f6948 tiva: tiva_adclib.c: Fix nxstyle warnings
arch/arm/src/tiva/common/tiva_adclib.c:

    * Fix nxstyle warnings. No functional changes.
2020-09-09 08:35:19 -07:00
barbiani
20c5c57cf6 Update tiva_timerlow32.c
Missing callback argument field.
2020-09-09 08:34:26 -07:00
David Sidrane
9106c4ec2b stm32h7:DMA Do not disqualify DMA capability based on cache alignment 2020-09-09 14:09:52 +02:00
David Sidrane
2d9e0f6a76 stm32f7:DMA Do not disqualify DMA capability based on cache alignment 2020-09-09 14:09:52 +02:00
ligd
2cfb239a87 arch/sim/src/nuttx-names.in: only host code need replace if -fvisibility=hidden
After previous commit, add -fvisibility=hidden, we don't need
worry about depended libxx.so callback to nuttx symbol in SIM.

So most of the symbol in nuttx-names.in can be remove.

But we still need some symbol replacement for host code.
Host code should call host API if access HOST sth, for example:
open, close, accept, printf...

Signed-off-by: ligd <liguiding1@xiaomi.com>
2020-09-09 17:04:39 +08:00
ligd
42a1d45a8a arch/sim: replace printf fprintf to syslog, '\r\n' -> '\n'
should use syslog in kernel

RP check failed because host code call host API has
style AaaBbb, so, ignore the RP check

Change-Id: Iad3468dae2cd07e6dd92874c5e6d38d9018bee6c
Signed-off-by: ligd <liguiding1@xiaomi.com>
2020-09-09 17:04:39 +08:00
Masayuki Ishikawa
ce93fe76e5 arm: cxd56xx: Fix nvic settings for SMP
Summary:
- I noticed that ostest sometimes stops with DEBUGASSERT
- Finally I found a bug that cpu1 can not disable interrupt
- This commit initializes nvic to fix this bug

Impact:
- Only affects cxd56 in SMP mode

Testing:
- spresense:smp and spresense:wifi_smp with DEBUG_ASSERTIONS=y

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-09-09 08:31:30 +02:00
Nathan Hartman
835d394856 tiva: tiva_timerlow32.c: Fix nxstyle warnings
arch/arm/src/tiva/common/tiva_timerlow32.c:

    * Fix nxstyle warnings. No functional changes.
2020-09-08 23:38:09 +08:00
Bhindhiya
0a2c7f7ac5 RX65N RTC Pre-check Warnings Resolved 2020-09-08 14:54:49 +08:00
Xiang Xiao
f99719e260 Move note driver from drivers/syslog to drivers/note
it's better to put the note transport layer into a common folder

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-09-07 11:54:10 +08:00
Johannes Schock
515ad1c388 Added KDEFINE (__KERNEL__) to EXTRAFLAGS for libboard, for other architectures. 2020-09-05 21:25:31 +08:00
Johannes Schock
9e69b87aa3 Added KDEFINE (__KERNEL__) to EXTRAFLAGS for libboard. 2020-09-05 21:25:31 +08:00
Sebastian Ene
18b47f9663 arch/sim: Add the pthread_cond_* API to the nuttx-names.in list
## Summary of changes

The pthread_cond_* API is also present as part of libfs.a and we want
to avoid colisions and link with the correct implementation.

Signed-off-by: Sebastian Ene <nuttx@fitbit.com>
2020-09-05 16:41:54 +08:00
Sebastian Ene
5beb32bf0b arch/sim: Use pthread_cond for signalling CPU initialisation done
## Summary of changes

On OSX with CONFIG_SMP=y the semaphore which notifies that the CPU is
initialised, is not created and the up_cpu_start() returns with error
from sem_init(). This patch fixes the problem by using pthread_cond_t
signalling mechanism which is supported on Mac.

Signed-off-by: Sebastian Ene <nuttx@fitbit.com>
2020-09-05 16:41:54 +08:00
David Sidrane
719246eddc stm32h7:i2c driver fixed iterrupt storm
Driver was getting into a state that it would keep
   generating interrups and not service them.
2020-09-05 16:41:01 +08:00
Nathan Hartman
e67f72b02d stm32: lowputc: Ensure USART is disabled before configuring
arch/arm/src/stm32/stm32_lowputc.c:

    * stm32_lowsetup(): Ensure the USART is disabled before attempting
      to configure it because some register bits cannot be modified
      otherwise. This solves an issue that was encountered when a
      serial bootloader did not perform a full teardown/cleanup before
      launching NuttX.
2020-09-04 17:39:19 -07:00
Ouss4
3560e16ac7 arch/xtensa/src/esp32/esp32_spi.c: When the TX buffer is empty send
something to kick off the SPI clock.
2020-09-04 17:43:51 -03:00
Xiang Xiao
5107104bbe arch/sim: Model host signal as NuttX's interrupt
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-09-03 10:20:50 +08:00
Sebastian Ene
5db11a275e arch/sim: Mask and restore the host signal in irq_save and irq_restore
to avoid the host signal process interrupt the execution of NuttX critical section

Signed-off-by: Sebastian Ene <nuttx@fitbit.com>
2020-09-03 10:20:50 +08:00
Masayuki Ishikawa
08c4376606 arch, include, sched : Refactor ARCH_GLOBAL_IRQDISABLE related code
Summary:
- ARCH_GLOBAL_IRQDISABLE was initially introduced for LC823450 SMP
- At that time, i.MX6 (quad Cortex-A9) did not use this config
- However, this option is now used for all CPUs which support SMP
- So it's good timing for refactoring the code

Impact:
- Should have no impact because the logic is the same for SMP

Testing:
- Tested with board: spresense:smp, spresense:wifi_smp
- Tested with qemu: esp32-core:smp, maix-bit:smp, sabre-6quad:smp
- Build only: lc823450-xgevk:rndis, sam4cmp-db:nsh

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-09-03 10:20:20 +08:00
Bhindhiya
144044aa0a Resolve build warnings in up_initialize.c 2020-09-03 01:33:38 +08:00
Bhindhiya
7338151136 Resolve build warnings in file up_internal.h 2020-09-03 01:33:38 +08:00
Xiang Xiao
76c2ede936 arch/sim: Fix macOS error: 'sem_init' is deprecated
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-09-02 12:37:34 +09:00
Xiang Xiao
406c6ae4dd arch/sim: Fix clang error: address argument to atomic operation must be a pointer to _Atomic type
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-09-02 12:37:34 +09:00
Johannes Schock
a5a3e54be0 Kinetis USBHSHOST: Changed Async Await to linked list, restored two accidently deleted lines. 2020-09-01 20:49:03 +01:00
Johannes Schock
e521c224c1 Kinetis USBHSHOST improvement.
Avoid race conditions during freeing of queue head structures by using Async Advance Doorbell.
2020-09-01 20:49:03 +01:00