Commit Graph

38057 Commits

Author SHA1 Message Date
Masayuki Ishikawa
2fbb896a4b arch: cxd56xx: Add SMP support to cxd56_farapi.c
Summary:
- This commit adds SMP support to cxd56_farapi.c
- nxplayer now works in SMP mode

Impact:
- Spresense in SMP mode only

Testing:
- Add the following configs to spresense:wifi
- +CONFIG_SCHED_INSTRUMENTATION=yy
- +CONFIG_SCHED_INSTRUMENTATION_BUFFER=y
- +CONFIG_SMP=y
- +CONFIG_SMP_NCPUS=2
- +CONFIG_SPINLOCK_IRQ=y
- Run nxplayer and play an WAV file on uSD card
- NOTE: http streaming playback would cause deadlocks

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-08-16 00:03:18 +01:00
chao.an
82caa786cc libc/fopen: add open for text (translated) access support
Change-Id: I5bb4e01a91a0f8ea82437cdcba191c484aa1b77f
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-08-16 00:01:36 +01:00
Gregory Nutt
2af62314d7 Fix build breakage from PR #1565
Fixes:

    ##[error]net/tun.c:837:13: error: conflicting types for 'tun_poll_expiry'
      837 | static void tun_poll_expiry(FAR void *arg)
          |             ^~~~~~~~~~~~~~~
    net/tun.c:196:13: note: previous declaration of 'tun_poll_expiry' was here
      196 | static void tun_poll_expiry(wdparm_t arg);
          |             ^~~~~~~~~~~~~~~

And

    ##[error]net/tun.c:881:57: error: passing argument 4 of 'wd_start' makes integer from pointer without a cast [-Werror=int-conversion]
      881 |   wd_start(&priv->txpoll, TUN_WDDELAY, tun_poll_expiry, priv);
          |                                                         ^~~~
          |                                                         |
          |                                                         struct tun_device_s *
    In file included from /github/workspace/sources/nuttx/include/nuttx/sched.h:41,
                     from /github/workspace/sources/nuttx/include/sched.h:34,
                     from /github/workspace/sources/nuttx/include/nuttx/arch.h:81,
                     from net/tun.c:60:
    /github/workspace/sources/nuttx/include/nuttx/wdog.h:134:42: note: expected 'wdparm_t' {aka 'long unsigned int'} but argument is of type 'struct tun_device_s *'
      134 |              wdentry_t wdentry, wdparm_t arg);
          |                                 ~~~~~~~~~^~~

And

    chip/cxd56_rtc.c: In function 'up_rtc_initialize':
    ##[error]chip/cxd56_rtc.c:358:3: error: too many arguments to function 'cxd56_rtc_initialize'
      358 |   cxd56_rtc_initialize(1, NULL);
          |   ^~~~~~~~~~~~~~~~~~~~
    chip/cxd56_rtc.c:253:13: note: declared here
      253 | static void cxd56_rtc_initialize(wdparm_t arg)
          |             ^~~~~~~~~~~~~~~~~~~~
2020-08-14 14:12:51 -03:00
Xiang Xiao
acca9fcc3b sched/wdog: Remove MAX_WDOGPARMS and related stuff
since the variable arguments are error prone and seldom used.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-08-14 08:19:50 -06:00
Huang Qi
7252275e15 boards/sim: Add duktape config based on nsh
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2020-08-14 07:27:55 -05:00
Huang Qi
57e1211ed6 math: Implement cbrt
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2020-08-14 07:27:55 -05:00
chao.an
7356b5a2ed libc: Implement strlcpy function
Reference:
http://www.delorie.com/djgpp/doc/libc/libc_763.html

Signed-off-by: chao.an <anchao@xiaomi.com>
2020-08-14 03:44:26 -07:00
Yoshinori Sugino
728d5efed6 arch/risc-v/src: Cosmetic change
Replace spaces with a tab
2020-08-14 10:27:23 +01:00
leomarradke
35e0d74f3e arch: samd5e5 : Add USB host support.
Fixes in USB device and i2c.

boards: metro-m4  Add support for:

- vfat auto-mounted on a flash drive;
- i2c inicialization;
- usb-dev cdc;
- sam_usbhost_vbusdrive needs your VBUS implementation.

Testing:
- Build check only.

Signed-off-by: Leomar Mateus Radke  <leomar@falker.com.br>
2020-08-13 14:02:58 -03:00
leomarradke
4e8e21a92a Style fixes 2020-08-13 14:02:58 -03:00
leomarradke
af85c7801a arch: samd5e5 : Add watchdog timer drivers.
boards: metro-m4  Add support for starting the watchdog timer on the metro-m4.

Testing:
- Build check only

Signed-off-by: Leomar Mateus Radke  <leomar@falker.com.br>
2020-08-13 14:02:58 -03:00
Gustavo Henrique Nihei
c9748395f8 make/export: Fix mkexport silently failing on missing tools 2020-08-13 16:13:32 +01:00
Ouss4
ccf7154f05 drivers: Add the configuration option to select a board specific folder. 2020-08-13 03:48:17 -05:00
Fotis Panagiotopoulos
c101076704 Added options for I-Cache & D-Cache, in STM32F2 & STM32F4. 2020-08-13 07:29:05 +02:00
David Sidrane
151a9253f4 s32k1xx:flexcan Remove unused variable 2020-08-12 21:38:06 +01:00
David Sidrane
ee60a26c7f kinetis:flexcan Remove unused variable 2020-08-12 18:51:48 +01:00
David Sidrane
553dc4a0c9 kinetis: kinetis.h missing-semi 2020-08-12 18:51:48 +01:00
Fotis Panagiotopoulos
c046e56b3b Added STM32_HAVE_OVERDRIVE option, and made core over-drive to be enabled only when system frequency is > 168MHz. 2020-08-12 05:05:59 -07:00
Johannes Schock
0585a8b327 Changed Watchdog API. 2020-08-12 08:29:21 -03:00
Johannes Schock
4aacd68c51 Freedom-K28 Automounter not related to USB. Removed condition. 2020-08-12 08:29:21 -03:00
Xiang Xiao
ed786986ed sensors/ak09912: Ensure ak09912_dev_s zero in ak09912_register
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-08-12 08:27:19 -03:00
Xiang Xiao
61ea875c94 Fix build break introduced by commit a0ce81d659
sam_ili9488.c:1605:7: error: label 'errout_with_dmadog' used but not defined
bcmf_sdio.c:855:16: error: passing argument 1 of 'wd_start' from incompatible pointer type

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-08-12 02:11:56 -07:00
Xiang Xiao
ae94688dc4 Fix nxstyle warning
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-08-11 12:28:55 -06:00
Xiang Xiao
a0ce81d659 sched/wdog: Don't dynamically allocate wdog_s
to save the preserved space(1KB) and also avoid the heap overhead

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I694073f68e1bd63960cedeea1ddec441437be025
2020-08-11 12:28:55 -06:00
Xiang Xiao
4df42ba9fb libc/ftw: Fix error: cast between incompatible function types from 'ftw_cb_t' nftw_cb_t
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I9e617ac04127e1e9126de2e3d32b35f2c6d636c0
2020-08-11 08:16:58 -07:00
zhongan
e0ad381abc drivers/rptun: add null-check for 'RPTUN_*' macro.
Change-Id: I203e90f03e66791afe4c65aef4367f5a626cb15b
Signed-off-by: zhongan <zhongan@xiaomi.com>
2020-08-11 15:58:27 +01:00
zhongan
2818b6b2c0 drivers/rptun: Add 'RPTUN_CONFIG' interface.
Change-Id: I1c6177ffe0c49c385f0d784b1ff0dbb69b6432f8
Signed-off-by: zhongan <zhongan@xiaomi.com>
2020-08-11 15:58:27 +01:00
Gregory Nutt
b256b2055f Add support to hard links to CROMFS
This will resolve numerous problems with the way that hard links, in particular "." and ".." are handled.  Instead of trying to fudge the stat flags, the correct implementation is to follow the hard link to the final link target node.  That is what must determine the attributes of the directory entry.
2020-08-11 07:48:08 -07:00
Xiang Xiao
00c662bbd7 sched/group: Fix the typo error
build will fail with debug assert

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-08-11 11:19:37 +01:00
raiden00pl
7879fba9f4 nxstyle fixes 2020-08-11 09:23:51 +01:00
raiden00pl
451a255146 arch/arm/src/stm32f7: IO compensation cell is enabled after clocking to SYSCFG is enabled 2020-08-11 09:23:51 +01:00
raiden00pl
3d91fed868 arch/arm/src/stm32f0l0g: remove reference to IO compensation which is not present in STM32 F0/L0/G0 2020-08-11 09:23:51 +01:00
Xiang Xiao
b13f3212ad libc: Implement ftw and nftw function
see the reference here:
https://pubs.opengroup.org/onlinepubs/009695399/basedefs/ftw.h.html

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I3b368106a56b0e9d4c653f3ae16304b0a9d55fbc
2020-08-11 16:44:42 +09:00
Masayuki Ishikawa
a104490b00 drivers: wireless: Add retry sequence in gs2200m_send_cmd()
Summary:
- This commit is a workaround to avoid errors in gs2200m_send_cmd()
- See the actual sequence in Testing for details

Impact:
- gs2200m driver

Testing:
- Test with spresense:wifi
- 1-1 Run tcpclient on NuttX and run nc on Linux
- 1-2 Stop nc on Linux then tcpclient also stops
- 1-3 Run tcpclient then the first AT+NCTCP will fail
- 1-4 But the second AT+NCTCP will succeed
- 2-1 Run tcpclient on NuttX and run nc on Linux
- 2-2 Stop nc on Linux then tcpclient also stops
- 2-3 Run tcpserver then the first AT+NSTCP will fail
- 2-4 But the second AT+NSTCP will succeed

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-08-11 01:25:40 -05:00
David Sidrane
a10e9615ca stm32f7:serial TXDMA ISR was looping on TX Empty
Interrups were blocked 1*n/baud Seconds. The former comment indicates
   there was an asumption that the TXE would be set at DMA completion.
   In reality this is not true. There can be 1 char in the TX Shift
   register and one in the TX holding register, when DMA completes.
   Waiting on TXE is not needed at all. The DMA will resume on the
   DMA req when the TX holding register is written to the TX Shift
   register.
2020-08-11 00:20:38 -05:00
David Sidrane
562be9e4c7 gencromfs:Fix mode flags seperate code points for DIR LNK 2020-08-10 11:04:13 -06:00
Fotis Panagiotopoulos
d4c770c20d STM32 IO compensation cell is enabled after clocking to SYSCFG is enabled. 2020-08-10 16:47:57 +01:00
Gregory Nutt
32e98790c0 Correct ROMFS hardlink handling
This PR corrects an error in the ROMFS file system.  The error occurred after following a hard link (depending on how the ROMFS image is organized).  The error occurred because some of the information buffered before following the links was stale and, hence, out of sync after following the hard link.  This would cause random errors when paths containing hardlinks were used with ROMFS.

This PR resolves Issue #1543.  Please compare the following output with the output in Issue #1543 to see how the problem was resolved:

    NuttShell (NSH) NuttX-9.1.0
    nsh> mount
      /etc type romfs
      /proc type procfs
      /tmp type vfat
    nsh> ls -Rl /etc
    /etc:
     dr-xr-xr-x       0 .
     dr-xr-xr-x       0 ..
     -r-xr-xr-x      20 group
     dr-xr-xr-x       0 init.d/
     -r-xr-xr-x      35 passwd
    /etc/init.d:
     dr-xr-xr-x       0 .
     dr-xr-xr-x       0 ..
     -r-xr-xr-x      71 rcS

    nsh> ls -l /etc/init.d
    /etc/init.d:
     dr-xr-xr-x       0 .
     dr-xr-xr-x       0 ..
     -r-xr-xr-x      71 rcS
    nsh> ls -l /etc/init.d/.
    /etc/init.d/.:
     dr-xr-xr-x       0 .
     dr-xr-xr-x       0 ..
     -r-xr-xr-x      71 rcS

    nsh> ls -l /etc/init.d/..
    /etc/init.d/..:
     dr-xr-xr-x       0 .
     dr-xr-xr-x       0 ..
     -r-xr-xr-x      20 group
     dr-xr-xr-x       0 init.d/
     -r-xr-xr-x      35 passwd
    nsh> ls -l /etc/init.d/../.
    /etc/init.d/../.:
     dr-xr-xr-x       0 .
     dr-xr-xr-x       0 ..
     -r-xr-xr-x      20 group
     dr-xr-xr-x       0 init.d/
     -r-xr-xr-x      35 passwd
    nsh>
2020-08-10 07:32:06 -07:00
Alin Jerpelea
b02b1663df boards: xtensa: esp32: update netnsh defconfig
In the commit
612acb9d93

the CONFIG_PREALLOC_MQ_MSGS is set by default to 4 and should be removed from defconfig.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2020-08-10 09:52:29 +01:00
Xiang Xiao
be10c734b0 arch/sim: Always preserve the heap memory dynamically
so size with nuttx could report the correct bss value:
  text    data     bss     dec     hex filename
 155467    1464    1948  158879   26c9f nuttx

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I7e9ec4d09d14b6f15b235b4b46ebdd98986d9750
2020-08-10 08:20:06 +02:00
Huang Qi
fd78f83e02 drivers/video: Refine the update region notification mechanism
1.Expose the notification through fb_vtable_s::updatearea
2.Incorporate old nx_notify_rectangle into the new updatearea callback
3.Migrate the calle of nx_notify_rectangle to fb_vtable_s::updatearea

Change-Id: Ia3d1f73e8757b2d381586d76ec6adc16c810018d
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2020-08-10 08:08:33 +02:00
Xiang Xiao
154852acb5 sched/mqueue: Reduce the initial memory consumption
Change the preallocated message and descriptor from 32/24 to 4.
The total size is reduce from 1892 to 532

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I79d199465daef678986868f773876289859f42fc
2020-08-10 08:07:50 +02:00
Xiang Xiao
854276285c sched/signal: Reduce the initial memory consumption
1.Don't preallocate sigaction list since it's used only in the task context
2.Reduce the preserved item which is used only in the task context from 16 to 4
The total memory decrease from 1280B to 480B

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ib5d5a7365c7d443fc0e99c0d3ea943e85f67ca8c
2020-08-10 08:07:50 +02:00
Xiang Xiao
baa4da2d0f Revert "arch/sim/src/sim/up_hostfs.c: hostfs skip '.' and '..' in readdir'"
This reverts commit 9f0502f8ba.
2020-08-09 16:16:34 -06:00
Johannes Schock
662e6789ea Added another usbid with proto = 1 (HighSpeed Hub). Nxstyle fixes. 2020-08-09 16:12:18 -03:00
Johannes Schock
2a11ad520b usbhost_storage.c: Fixed Bug in usbhost_freedevno(...), worked only for 'a'. 2020-08-09 11:54:04 -06:00
Johannes Schock
02a9228c1f Added USB MSC state change notifier in notifier work queue.
Added USB MSC automount for Freedom K28 using the above.
2020-08-09 11:54:04 -06:00
Xiang Xiao
8807a52de6 tools/gencromfs: Change the generated code to Apache license
and ensure the code confirm the coding style

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-08-09 14:43:56 +01:00
Xiang Xiao
4de69080d0 tools/gencromfs: Call dump_nextline immediately after dump_hexbuffer
to handle the temporary file switch correctly

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-08-09 14:43:56 +01:00
Masayuki Ishikawa
56181c0bdd boards: spresense: Update wifi/defconfig
Summary:
- Add CONFIG_EXAMPLES_TCPBLASTER_GROUPSIZE=500
- Remove CONFIG_EXAMPLES_TCPBLASTER_SERVER_PORTNO=10001
- Add CONFIG_EXAMPLES_TCPBLASTER_TARGET2=y

Impact:
- This commit affects spresense:wifi only

Testing:
- Tested tcpclient and tcpserver

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-08-09 07:39:43 -05:00