Commit Graph

37350 Commits

Author SHA1 Message Date
Xiang Xiao
6e94effeed build: Make all variables inside Configs.mk overwritable
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-19 19:23:18 +01:00
Nathan Hartman
5fe9085913 stm32: lowputc: nxstyle fixes
arch/arm/src/stm32/stm32_lowputc.c:

    * nxstyle fixes, mostly for long lines and comment misalignments.
2020-05-19 11:20:40 -06:00
Nathan Hartman
387d33c535 stm32: allocateheap: nxstyle fixes
arch/arm/src/stm32/stm32_allocateheap.c:

    * nxstyle fixes, mostly for comment misalignments.
2020-05-19 10:56:34 -06:00
Nathan Hartman
624b50f7ea stm32: serial: nxstyle fixes
arch/arm/src/stm32/stm32_serial.c:

    * nxstyle fixes, mostly for long lines.
2020-05-19 10:56:12 -06:00
Masayuki Ishikawa
c7500c5c9d net: tcp: Fix port info in warning message in tcp_input.c
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-05-19 13:36:45 +08:00
Masayuki Ishikawa
3387da6316 boards: spresense: Add ftpc to wifi/defconfig
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-05-19 07:02:33 +02:00
Masayuki Ishikawa
bb39907b9c boards: spresense: Add ftpc and ftpd to rndis/defconfig
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-05-19 07:02:33 +02:00
Xiang Xiao
6c4ef7b1db build: mkexport.sh copy Config.mk to tools folder too
to avoid the duplication in apps/imports/Make.defs

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-18 21:36:58 -06:00
Masayuki Ishikawa
d5c45fbd49 boards: lm3s6965-ek: Update discover/defconfig
- Remove old toolchain and buildroot support
- Enable builtin and add hello and renew commands
- Enable procfs and change name size to 24
- Enable stack coloration

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>>
2020-05-18 19:59:35 -06:00
Nathan Hartman
3334b40aef nxstyle: Allow Hz, KHz, GHz in identifiers
Per the coding standard, we allow MHz as one of the few allowed
exceptions to the identifier case rules.

However, because this exception specifically looked for "MHz" we
would generate undeserved nxstyle errors for Hz, KHz, GHz.

This change adds recognition of any Hz value by eliminating the
requirement for Hz to be preceded by M.

tools/nxstyle.c:

    * main(): Eliminate requirement for Hz to be preceded by M to
      match the rule for allowed mixed case identifier. Update
      relevant comments.

See:
https://cwiki.apache.org/confluence/display/NUTTX/Coding+Standard#macros

Mailing list discussion archived at:
https://lists.apache.org/thread.html/r481b9d145f439c24c8d70992081bf670bc0e893167149e0017519439%40%3Cdev.nuttx.apache.org%3E
2020-05-18 18:00:10 -06:00
Xiang Xiao
5eae32577e build: Move INCDIROPT to common place
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-18 15:02:55 -06:00
Xiang Xiao
bd656888f2 build: Replace WINTOOL with CYGWIN_WINTOOL Kconfig
so the correct value can be determinated by Kconfig system automatically

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-18 15:02:55 -06:00
chao.an
05ebb39998 arch: complete logic in create/use stack to support stack coloration.
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-05-18 07:30:46 -06:00
chao.an
86a412d65a arch/stack: fix check stack breakage
remove the TLS alignment check

Regression by:

--------------------------------------------------------
commit a6da3c2cb6
Author: Ouss4 <abdelatif.guettouche@gmail.com>
Date:   Thu May 7 18:50:07 2020 +0100

    arch/*/*_checkstack.c: Get aligned address only when
    CONFIG_TLS_ALIGNED is enabled.

--------------------------------------------------------
commit c2244a2382
Author: Gregory Nutt <gnutt@nuttx.org>
Date:   Thu May 7 09:46:47 2020 -0600

    Remove CONFIG_TLS

    A first step in implementing the user-space error is
    force TLS to be enabled at all times.  It is no longer optional

Signed-off-by: chao.an <anchao@xiaomi.com>
2020-05-18 07:27:17 -06:00
qiaowei
cddd64fd30 armv8-m: Add stack overflow by stack pointer limit register
Signed-off-by: qiaowei <qiaowei@xiaomi.com>
Change-Id: I0f0ae0fb8edb8e1690b3c5e3e8b3189d51a318b0
2020-05-18 07:21:05 -06:00
Gregory Nutt
57bc329aac Run nxstyle all .c and .h files modified by PR. 2020-05-17 14:01:00 -03:00
Gregory Nutt
a569006fd8 sched/: Make more naming consistent
Rename various functions per the quidelines of https://cwiki.apache.org/confluence/display/NUTTX/Naming+of+OS+Internal+Functions

    nxsem_setprotocol -> nxsem_set_protocol
    nxsem_getprotocol -> nxsem_get_protocol
    nxsem_getvalue -> nxsem_get_value
2020-05-17 14:01:00 -03:00
Xiang Xiao
d938b50969 arch/sim: Fix multiple definition of g_cpu_wait' and g_cpu_paused'
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I62d81582d58c9156ee8a56207b479dad7d6d18df
2020-05-17 07:36:45 -06:00
Gregory Nutt
54c643164b Fix some very minor spacing problems. 2020-05-16 18:53:25 +01:00
Gregory Nutt
00ed37b609 sched/: Run nxstyle on all .c/.h files modified by PR. 2020-05-16 13:39:03 -03:00
Gregory Nutt
d823a3ab3e sched/: Make more naming consistent
Rename various functions per the quidelines of https://cwiki.apache.org/confluence/display/NUTTX/Naming+of+OS+Internal+Functions
2020-05-16 13:39:03 -03:00
Gregory Nutt
e6a984dc2b arch/arm/src/stm32h7/stm32_sdmmc.c: Fix wrong selection in modifying the conflict. 2020-05-15 23:11:33 +01:00
Pierre-Olivier Vauboin
671191d7a1 boards/arm/stm32h7/stm32h747i-disco: fix nxstyle warnings 2020-05-15 23:11:33 +01:00
Pierre-Olivier Vauboin
4585af393c boards/arm/stm32h7/stm32h747i-disco: change the license header of all new files to an Apache 2.0 license. 2020-05-15 23:11:33 +01:00
Pierre-Olivier Vauboin
2d43c57a67 boards/arm/stm32h7/stm32h747i-disco: SDMMC card detect interrupt 2020-05-15 23:11:33 +01:00
Pierre-Olivier Vauboin
583d81e3de boards/arm/stm32h7/stm32h747i-disco: bring FAT DMA allocator
Buffers are allocated in the main ram, which is suitable for use with the
underlying STM32H7 SDMMC1 core in IDMA mode.

Files are copied from stm32f7/nucleo-144.
2020-05-15 23:11:33 +01:00
Pierre-Olivier Vauboin
07bd520ccb arch/arm/src/stm32h7/stm32_sdmmc: check IDMA buffer address
For SDMMC1, IDMA cannot access SRAM123 or SRAM4. Refer to ST AN5200 for
details. This patch makes stm32_dmapreflight check the buffer address and
return an error when the buffer is located in a invalid address space.

This does not fix the hardware limitation but at least makes it visible.
2020-05-15 23:11:33 +01:00
Pierre-Olivier Vauboin
369293dd84 boards/arm/stm32h7/stm32h747i-disco: bring support for SDMMC 2020-05-15 23:11:33 +01:00
Gregory Nutt
35efcee5c9 net/netdev/netdev_register.c: Add some comments.
This commit adds some short comments to explain some perplexing logic of PR #1047.
2020-05-15 15:48:00 +01:00
chao.an
87af256ad6 net/udp: fix nxstyle warning
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-05-15 07:27:01 -06:00
chao.an
7a62a59dec net/conn: generate port base dynamically
In some extreme scenarios(eg. crash, reboot, reset, etc...),
an established connection cannot guarantee that the port can be
closed properly, if we try to reconnect quickly after reset, the
connection will fail since the current port is same as the
previous one, the previous port connection has been hold on server side.

dynamically apply for the port base to avoid duplication.

Change-Id: I0089244b2707ea61f553a4dae09c7af3649c70bd
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-05-15 07:27:01 -06:00
Masayuki Ishikawa
60b404e076 drivers: wireless: Apply max payload size to gs2200m.c
Also, remove unnecessary initialization for tx packet.

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-05-15 06:49:02 -06:00
YAMAMOTO Takashi
76add63598 Bump the default of CONFIG_NETDB_DNSCLIENT_MAXRESPONSE
It's better to have a default working for many cases.
Usually DNS servers are not optimized for embedded clients.
Users can fine tune for their environment anyway.
2020-05-15 14:23:48 +08:00
YAMAMOTO Takashi
e783a59f9d netdb: Truncate the list of ips instead of bailing out with ERANGE
In many cases, users only care the first address anyway.
2020-05-15 14:23:48 +08:00
YAMAMOTO Takashi
b36420ef32 Bump the default of CONFIG_NETDB_BUFSIZE
The old default didn't work even for moderate cases.
(eg. strlen(name) == 17, two ipv4 addresses, on 64-bit sim)
2020-05-15 14:23:48 +08:00
Jukka Laitinen
1071934350 arch/arm/src/stm32h7/stm32_sdmmc.c: Fixes for IDMA transfer and cache usage
This simplifies the sdmmc driver when the IDMA is in use. There is no need to mix
IDMA and interrupt based transfers; instead, when making unaligned data tranfers,
just make IDMA into an internal aligned buffer and then copy the data.

Signed-off-by: Jukka Laitinen <jukka.laitinen@intel.com>
2020-05-14 17:31:33 -06:00
Jukka Laitinen
a532b0b53a arch/arm/src/stm32h7/stm32_dma.c: Optimization for stm32_sdma_capable
It should not be an error to clean cache beyond the dma source buffer
boundaries. It would just prematurely push some unrelated data from
cache to memory.

The only case where it would corrupt memory is that there is a dma
destination buffer overlapping the same cache line with the source
buffer. But this can't happen, because a destination buffer must always
be cache-line aligned when using write-back cache.

This patch enables doing dma tx-only transfer from unaligned source
buffer when using write-back cache.

Signed-off-by: Jukka Laitinen <jukka.laitinen@intel.com>
2020-05-14 17:31:06 -06:00
Jukka Laitinen
c7acbb80d8 arch/arm/src/stm32h7/stm32_dma.c: Allow transfer from peripheral to AXI SRAM
Signed-off-by: Jukka Laitinen <jukka.laitinen@intel.com>
2020-05-14 17:31:06 -06:00
Jukka Laitinen
f5571b2550 arch/arm/src/stm32h7/stm32_dma.c: Fix DEBUGASSERT compilation
Signed-off-by: Jukka Laitinen <jukka.laitinen@intel.com>
2020-05-14 17:31:06 -06:00
Jukka Laitinen
8f559b1276 arch/arm/src/stm32h7/stm32_dma.c: Split long lines to pass style checks
Signed-off-by: Jukka Laitinen <jukka.laitinen@intel.com>
2020-05-14 17:31:06 -06:00
Jukka Laitinen
1e0f416a93 arch/arm/src/stm32h7: Make flash program size configurable
Signed-off-by: Jukka Laitinen <jukka.laitinen@intel.com>
2020-05-14 17:27:49 -06:00
Jari Nippula
de8f3b73d5 arch/arm/src/stm32h7/stm32_flash.c: fix write and erase
Correct flash write and erase functions, they inherit some
broken code from other platforms. Also fix the confusion between
eraseblock(sector) and page sizes.

Signed-off-by: Jari Nippula <jari.nippula@intel.com>
2020-05-14 17:27:49 -06:00
Jukka Laitinen
f9a886f8b7 arch/arm/src/stm32h7/stm32_flash.c: Lock flash option register
If the flash option register was locked before modifying it, return
it to the locked state after modify.

Signed-off-by: Jukka Laitinen <jukka.laitinen@intel.com>
2020-05-14 17:27:49 -06:00
YAMAMOTO Takashi
573f02791f netdev_ioctl: Update a comment 2020-05-14 11:26:03 -06:00
Nathan Hartman
8d985819b3 Fix typos
Comments only. No functional changes.
2020-05-14 10:49:44 -06:00
chao.an
a5868864bc net: remove unnecessary spaces
minor style fix

Change-Id: I06b6fe48628440490090b89a39baf01481f79b79
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-05-14 07:54:57 -06:00
chao.an
8bce416c25 sim/tapdev: follow the tunnel MTU size
Change-Id: Ia32255517650d95ea3a675ee9fe5b69e923fb51a
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-05-14 07:54:57 -06:00
chao.an
9cc2f50405 netdev/register: configurable net packet size
Change-Id: I2af571a0273e67a06c1b4543eac3ded7cfdd8060
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-05-14 07:54:57 -06:00
chao.an
03f462c5cd net/sockopt: fix nxstyle warning
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-05-14 07:53:15 -06:00
chao.an
608436a75f net/sockopt: do not set the errno to SO_ERROR
SO_ERROR is used to report asynchronous errors that are the result
of events within the network stack and not synchronous errors that
are the result of a library call(send/recv/connect)

Synchronous results are reported via errno.

Linux Programmer's Manual
...
NAME
       getsockopt, setsockopt - get and set options on sockets
...
RETURN VALUE
...
       On error, -1 is returned, and errno is set appropriately

Change-Id: I1a1a05a684dff8672aaf47eabee157ac0d275c2d
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-05-14 07:53:15 -06:00