Commit Graph

40351 Commits

Author SHA1 Message Date
Masayuki Ishikawa
0c68ddb760 drivers: wireless: Change retry condition in gs2200m_hal_write()
Summary:
- During Wi-Fi stress test, I noticed that ASSERT() happened
  in gs2200m_hal_write(). Actually, this happens in 20-40 hours.
- In this case, resp[1] was always 0x0 which is not defined
  in the spec.
- In the previous implementation, retry was only done in case of
  WR_RESP_NOK. (0x13)
- This commit changes this condition and it reties in case of
  0x0 as well

Impact:
- gs2200m driver

Testing:
- Tested with spresense:wifi_smp and stm32f4discovery:wifi

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-02-03 10:29:05 +01:00
Huang Qi
aabb870d6b stm32f7/stm32_qspi.c: Fix warning of format strings
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2021-02-03 08:49:46 +00:00
Masayuki Ishikawa
82efbd5e6f sched: group: Fix group_kill_children() for SMP
Summary:
- During testing iperf -s with lc823450-xgevk:rndis,
  I noticed that hard fault happens
- Finally, I found that group_kill_children() is not
  not protected by a critical section
- This commit fixes this issue

Impact:
- SMP only

Testing:
- Tested with iperf with the following configurations
- lc823450-xgevk:rndis, spresense:rndis_smp
- Tested with ostest with the following configurations
- lc823450-xgevk:rndis, esp32-devkitc:smp (QEMU)
- sabre-6quad:smp (QEMU), maix-bit:smp (QEMU)
- spresense:rndis_smp, sim:smp

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-02-02 20:03:39 -08:00
David Sidrane
18ce105e8b stm32f412:Corrected Pin count
Port C was not working because the GPIO pin count was
   wrong. The 48 pin packages has 34 GPIO (Not counting PH0 & PH1)
   It is GPIOA GPIO B (sans PB11) and GPIOC PC13-PC15
2021-02-02 18:41:39 -08:00
Matias N
45b392be7e nRF52: add support for building SoftDevice BLE controller 2021-02-02 14:40:26 -08:00
Matias N
74e7e2b5b2 nRF52 tickless RTC: fix timer not firing on edge case
The calls via RTC API weren't fast enough for the edge case
of minimum counter value, resulting in the timer never
expiring as the counter had already passed the compare value.
This now uses direct register access functions and also
gets the latest counter value in edge case.
2021-02-02 14:37:22 -08:00
Matias N
27ac9a6948 nRF52 SPI: fix for RX transfers when !SPI_EXCHANGE 2021-02-02 14:37:22 -08:00
Matias N
e9a45ea183 nRF52 SPI: use PPI API instead of direct register access 2021-02-02 14:37:22 -08:00
Peter van der Perk
22437698f1 [imxrt] Fix FlexCAN tx dropping frames 2021-02-02 17:51:29 -03:00
Abdelatif Guettouche
5447f28742 riscv: Remove the nx_start prototype from riscv_internal.h
This function is already declared in include/nuttx/init.h include this
file instead.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-02-02 17:48:40 -03:00
Abdelatif Guettouche
db2a8f0dc5 arch/risc-v: Remove incorrect ARM references.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-02-02 17:48:06 -03:00
hotislandn
de8e3a130c RV64: add R_RISCV_HI20 and R_RISCV_LO12_I to elf relocateadd for absolute address loading.
Signed-off-by: hotislandn <hotislandn@hotmail.com>
2021-02-01 21:35:48 -08:00
Abdelatif Guettouche
37b93bd498 arch/risc-v: Don't declare riscv_addregion if CONFIG_MM_REGIONS is < 1.
Don't declare riscv_addregion if CONFIG_MM_REGIONS is < 1, so we won't
have to provide a dummy stub for every chip.
Also rename the function from up_addregion to riscv_addregion since it's
not exported outside the arch directory.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-02-01 18:45:25 -08:00
Masayuki Ishikawa
778c805357 boards: lc823450-xgevk: Update rndis/defconfig
Summary:
- Add DEBUG_HARDFAULT_ALERT
- Add the iperf and optimize IOB and ETH_PKTSIZE
- Enable TCP_WRITE_BUFFER
- Remove SCHED_INSTRUMENTATION_PREEMPTION
- Remove NETINIT_DHCPC
- Add getprime

Impact:
- lc823450-xgevk:rndis only

Testing:
- Tested with iperf, telnet, wget
- NOTE: need to update iperf in apps

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-02-01 18:40:39 -08:00
Pavel Pisa
56be7c54ea arch/arm/src/samv7/sam_mcan.c: fix some mismatches caused by renaming.
The MCAN driver private structure has been renamed to struct sam_mcan_s,
but some functions reference sam_can_s. There are missing defines
of return variable in some functions.

Signed-off-by: Pavel Pisa <ppisa@pikron.com>
2021-02-01 18:28:35 -08:00
Alin Jerpelea
a8a1308240 include: nuttx: update licenses to Apache 2.0
The SGA from Gregory Nutt had been submitted and we can replace
the licenses to Apache 2.0

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-02-01 11:21:57 -03:00
Alin Jerpelea
88a48bbde3 include: nuttx: sensors: max31855.h: fix nxstyle errors
Nxstyle errors fix to pass CI.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-02-01 11:21:57 -03:00
Alin Jerpelea
d49e0f56c6 include: nuttx: net: telnet.h: fix nxstyle errors
Nxstyle errors fix to pass CI.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-02-01 11:21:57 -03:00
Alin Jerpelea
3a566af4bb include: nuttx: addrenv.h: fix nxstyle errors
Nxstyle errors fix to pass CI.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-02-01 11:21:57 -03:00
Brennan Ashton
a42260a1ef boards: bl602evb flash and debug notes 2021-02-01 09:11:18 -03:00
Masayuki Ishikawa
8706db6f48 boards: spresene: Add iperf to rndis and rndis_smp defcofigs
Summary:
- This commit adds iperf to rndis and rndis_smp defcofigs

Impact:
- rndis and rndis_smp

Testing:
- Tested with iperf

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-01-31 21:43:54 -08:00
Nathan Hartman
d82cc3ccc6 arch/stm32f7: Fix nxstyle errors
arch/arm/src/stm32f7/chip.h,
arch/arm/src/stm32f7/stm32_adc.h,
arch/arm/src/stm32f7/stm32_allocateheap.c,
arch/arm/src/stm32f7/stm32_bbsram.h,
arch/arm/src/stm32f7/stm32_can.h,
arch/arm/src/stm32f7/stm32_capture.c,
arch/arm/src/stm32f7/stm32_capture.h:

    * Fix nxstyle errors.
2021-01-31 19:55:34 +00:00
Alan C. Assis
b0d611d3dc Replace ARM_LWL_CONSOLE with generic LWL_CONSOLE 2021-01-31 06:14:50 -08:00
chao.an
38e2c4ba53 net/ip: fix nxstyle warning
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-01-30 16:04:39 -08:00
chao.an
ab148bc69f net/ip: do not drop the udp packet from IP layer
this change to support receive the udp data from the specified
port without obtaining the address.

e.g: disable the Bootstrap flag on dhcpc handshake

Reference:
RFC1542: Clarifications and Extensions for the Bootstrap Protocol.

Signed-off-by: chao.an <anchao@xiaomi.com>
2021-01-30 16:04:39 -08:00
Abdelatif Guettouche
52b4c73a61 arch/riscv: Remove references to MIPS.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-01-30 15:46:38 -08:00
Xiang Xiao
418a87af4c arch/sim: Fix typo error(HCITTY->BTUART)
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-01-30 15:43:03 -08:00
chao.an
5cf794e42b sched/notifier: replace the unique key to freerun counter
replace the unique key to freerun counter to avoid traverse
of the notifier list.

Signed-off-by: chao.an <anchao@xiaomi.com>
2021-01-30 05:13:26 -08:00
chao.an
003b360d12 sched/wqueue/notifier: protect the work notifier with critical section
replace the semaphore to avoid the notifier holding the lock in the interrupt context

ASSERT:

libs/libc/assert/lib_assert.c:36   :_assert
sched/semphore/sem_wait.c:113      :nxsem_wait
sched/semphore/sem_wait.c:222      :nxsem_wait_uniterruptible
sched/wqueue/kwork_notifier.c:371  :work_notifier_signal
mm/iob/iob_free.c:188              :iob_free
drivers/syslog/syslog_stream.c:272 :syslogstream_destroy
...
sched/irq/irq_dispatch.c:183       :irq_dispatch

Signed-off-by: chao.an <anchao@xiaomi.com>
2021-01-30 05:13:26 -08:00
Alin Jerpelea
b288986ccd include: nuttx: usb: nxstyle error fix
Nxstyle error fix to silence the CI.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-29 10:40:46 -08:00
Alin Jerpelea
30a5a3edad include: nuttx: timers: nxstyle error fix
Nxstyle error fix to silence the CI.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-29 10:40:46 -08:00
Alin Jerpelea
3bdf98cc33 include: nuttx: syslog: nxstyle error fix
Nxstyle error fix to silence the CI.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-29 10:40:46 -08:00
Alin Jerpelea
419bcb05d5 include: nuttx: spi: nxstyle error fix
Nxstyle error fix to silence the CI.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-29 10:40:46 -08:00
Alin Jerpelea
83ebb6448c include: nuttx: serial: nxstyle error fix
Nxstyle error fix to silence the CI.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-29 10:40:46 -08:00
Alin Jerpelea
fa10244ccb include: nuttx: power: nxstyle error fix
Nxstyle error fix to silence the CI.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-29 10:40:46 -08:00
Alin Jerpelea
2b6cad5178 include: nuttx: net: nxstyle error fix
Nxstyle error fix to silence the CI.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-29 10:40:46 -08:00
Alin Jerpelea
fe4be428f5 include :nuttx: nxstyle error fix
Nxstyle error fix to silence the CI.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-01-29 10:40:46 -08:00
Pavel Pisa
bd372724cc boards/arm/imxrt/teensy-4.x: added configuration for PiKRON's BaseBoard v1.
The BaseBoard carries Teensy 4.1 SBC. The complete design
of the baseboard (teensy_bb-1.tdb) is available at

  https://gitlab.com/pikron/projects/imxrt-devel/-/tree/master/hw

Attempt is to provide configuration which enables most
of interfaces of the BaseBoard and allows runtime applications
loading over TFTP.

Signed-off-by: Pavel Pisa <ppisa@pikron.com>
2021-01-29 10:40:03 -08:00
Pavel Pisa
c5d25d5887 boards/arm/lpc17xx_40xx/lx_cpu: enable CLOCK_MONOTONIC and NETDB support.
Signed-off-by: Pavel Pisa <ppisa@pikron.com>
2021-01-29 10:40:03 -08:00
Pavel Pisa
e7ed720699 boards/arm/lpc17xx_40xx/lx_cpu/: increase sections alignment and fix .ARM.exidx overlap.
The ARMv7 specifies minimal alignment to be 8 for EABI. Ensure
that sections are placed with even greater minimal alignment.
Sections final alignment should be adjusted according
to alignment of their inputs, but for some reasons some
combinations lead to .ARM.exidx overlap with .data.
When alignment is increased then the direct fetch of the
fill location

  _eronly = ABSOLUTE(.);

does not match with final LMA placement of the .data section.
Use constructs which should result in matching .data LMA
address for all cases

  _eronly = ABSOLUTE(.);

Signed-off-by: Pavel Pisa <ppisa@pikron.com>
2021-01-29 10:40:03 -08:00
Pavel Pisa
210689535a boards/arm/lpc17xx_40xx/lx_cpu/configs/nsh: increase number of memory regions.
There was one region missing to register external SDRAM
into heap.

Signed-off-by: Pavel Pisa <ppisa@pikron.com>
2021-01-29 10:40:03 -08:00
Pavel Pisa
17c3118b85 libs/libc: libc.csv fill in calloc, gethostbyname and signal.
Signed-off-by: Pavel Pisa <ppisa@pikron.com>
2021-01-29 10:40:03 -08:00
Pavel Pisa
d77fe3390f board/arm/imxrt: the request for map file in Make.defs LDFLAGS results in absolute path in export target.
The BSP MAke.defs line

  LDFLAGS += -Map=$(TOPDIR)/nuttx.map

results  in absolute path in nuttx-export/scripts/Make.defs
which would mean that each application rebuild would attempt
to modify file inside original build of NuttX system.

Even worse, it prevents linking by GCC, because -Map=xxx/nuttx.map
works directly in LD, it would require -Wl,-Map= for GCC.

Fixed name of map file prevents to define map file by build
system using exported NuttX libraries and link kit.

Change is done to allow OMK template based applications
development for another NuttX BSP

  https://github.com/ppisa/nuttx-devel/tree/master/nuttx-omk-template

Signed-off-by: Pavel Pisa <ppisa@pikron.com>
2021-01-29 10:40:03 -08:00
Pavel Pisa
0a5e7bd3ef libs/libc: libc.csv "mkfifo" and "pipe" has to be conditionalized same as in the sources.
The CONFIG_PIPES, CONFIG_DEV_FIFO_SIZE and CONFIG_DEV_PIPE_SIZE setting
has to be considered.

Signed-off-by: Pavel Pisa <ppisa@pikron.com>
2021-01-29 10:40:03 -08:00
Jukka Laitinen
b8dc64ffed drivers/net/encx24j600.c: Correct setting of ifstate
The ifstate is already set in
  enc_ifup -> enc_reset -> enc_linkstatus

The ifstate after this call is either ENCSTATE_RUNNING or ENCSTATE_UP

If ifstate is ENCSTATE_RUNNING, it would be wrong to set it to ENCSTATE_UP;
this would lead to enc_txavail never invoking the driver callback, causing
very long latencies in sending.

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-01-29 09:52:04 -08:00
Masayuki Ishikawa
5bcdeb0851 arch: imx6: Fix a compile error with CONFIG_DEBUG_ASSERTIONS=y
Summary:
- This commit fixes a compile error in imx_enet.c
  with CONFIG_DEBUG_ASSERTIONS=y

Impact:
- None

Testing:
- Tested with sabre-6quad:netnsh with QEMU

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-01-29 12:09:47 -03:00
Alexander Vasiljev
96cbd1d8a1 drivers: mtd: w25qxxxjv.c : W25Q256's sector count is 8192 2021-01-29 06:47:03 -08:00
Masayuki Ishikawa
585884fde9 arch: imx6: Add CONFIG_IMX_ENET_NTXBUFFERS check in imx_enet.c
Summary:
- This commit checks CONFIG_IMX_ENET_NTXBUFFERS without
  CONFIG_NET_TCP_WRITE_BUFFERS

Impact:
- None

Testing:
- Tested with sabre-6quad:netnsh with QEMU

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-01-29 00:05:01 -08:00
Masayuki Ishikawa
ec8bf5c8c1 net: tcp: Add DEBUGASSERT() in psock_tcp_send()
Summary:
- This commit adds DEBUGASSERT() to check the IOB size

Impact:
- None

Testing:
- Tested with sabre-6quad:netnsh with QEMU

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-01-29 00:05:01 -08:00
Masayuki Ishikawa
07e7ccb80c boards: sabre-6quad: The iperf works with CONFIG_NET_TCP_WRITE_BUFFERS
Summary:
- This commit makes the iperf work with CONFIG_NET_TCP_WRITE_BUFFERS
- Since the iperf sends a large packet (e.g. 16KB), CONFIG_IOB_NBUFFERS
  must be increased enough to hold the packet
- To improve performance CONFIG_IMX_ENET_NTXBUFFERS was changed to
  the default (i.e. 2)

Impact:
- sabre-6quad:netnsh only

Testing:
- Tested with iperf with QEMU

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-01-29 00:05:01 -08:00