Commit Graph

37229 Commits

Author SHA1 Message Date
Matias Nitsche
944ed5ae0a stm32: move NRF24L01 support into common board logic 2020-05-14 08:32:48 +02:00
Matias Nitsche
7c7836d1d7 stm32: move lm75 handling into common board logic; delete unused lm75 file for stm3210e-eval 2020-05-14 08:32:48 +02:00
Matias Nitsche
35471e33dc stm32: move ssd1306 and tone driver handling to common board logic 2020-05-14 08:32:48 +02:00
Matias Nitsche
717fa46a53 stm32: move nunchuck driver to common board logic 2020-05-14 08:32:48 +02:00
Matias Nitsche
d444df59af stm32: move APA102, VEML6070 and MAX6675 initialization to board common logic 2020-05-14 08:32:48 +02:00
Matias Nitsche
cf8206a0cb nxstyle fixes 2020-05-14 08:32:48 +02:00
Matias Nitsche
edafeccc9f stm32: make BMP180 initialization part of stm32 board-common logic 2020-05-14 08:32:48 +02:00
Gregory Nutt
801b9d6e5f arch/arm: Remove support for old redundant toolchains.
Remove support for the Codesourcery, Atollic, DevKitArm, Raisonance, and CodeRed toolchains.  Not only are these tools old and no longer used but they are all equivalent to standard ARM EABI toolchains.  Retaining specific support has no effect (they are still supported, but now just as generic EABI toolchains).
2020-05-13 18:41:10 +01:00
Jukka Laitinen
e989147119 arch/arm/src/stm32h7: Add support for spi simplex configurations
Signed-off-by: Jukka Laitinen <jukka.laitinen@intel.com>
2020-05-13 07:29:14 -06:00
Jukka Laitinen
574b2593e6 arch/arm/src/stm32h7/stm32_spi.c: Correct the dmacapable check
First, configure the dmacfg in spi_dmarxsetup and spi_dmatxsetup. Then,
check for dmacapable, and only after that set up the dma.

This way the dmacapable actually works, and we don't need to initialize
the dmacfg structures twice.

Signed-off-by: Jukka Laitinen <jukka.laitinen@intel.com>
2020-05-13 07:29:14 -06:00
Jukka Laitinen
d1c406d65d arch/arm/src/stm32h7/stm32_spi.c: Correct cache flush
When starting dma transfer, the dcache for the TX buffer should be cleaned.
"flush" performs also invalidate, which is unnecessary. The TX buffer
can be unaligned to the cahche line in some(most) cases, whereas RX buffer
can never be.

The cache for the receive buffer can be dirty and valid before call to exchange.
Thus another memory access (hitting the same cache line) may corrupt receive data
while waiting for transfer to complete. So the receive buffer should be
invalidated before the transfer

Signed-off-by: Jukka Laitinen <jukka.laitinen@intel.com>
2020-05-13 07:29:14 -06:00
Jukka Laitinen
ace63ef74a arch/arm/src/stm32h7/stm32_spi.c: Remove un-used local variable
Causes compilation warning

Signed-off-by: Jukka Laitinen <jukka.laitinen@intel.com>
2020-05-13 07:29:14 -06:00
Jukka Laitinen
63af18eaf9 arch/arm/src/stm32h7/stm32_spi.c: Fix long lines to pass style checks
Signed-off-by: Jukka Laitinen <jukka.laitinen@intel.com>
2020-05-13 07:29:14 -06:00
Jukka Laitinen
4967352c33 arch/arm/src/stm32h7/stm32_ethernet.c: Comment and debug assertion fixes
Modify some comments and debug assertions, which inherit from previous versions
and make no sense. Also add a few nerr printouts to make it easier to debug
running out of buffers

Signed-off-by: Jukka Laitinen <jukka.laitinen@intel.com>
2020-05-13 06:51:57 -06:00
Jukka Laitinen
db492ca03b arch/arm/src/stm32h7/stm32_ethernet.c: Break long lines to pass style checks
Signed-off-by: Jukka Laitinen <jukka.laitinen@intel.com>
2020-05-13 06:51:57 -06:00
Jukka Laitinen
d618dad296 arch/arm/src/stm32h7/Make.defs: arm_mpu.c was added twice
Signed-off-by: Jukka Laitinen <jukka.laitinen@intel.com>
2020-05-13 06:51:57 -06:00
Jukka Laitinen
2ef571453a arch/arm/src/stm32h7/stm32_allocateheap.c: Fix compilation when CONFIG_MM_REGIONS == 1
Signed-off-by: Jukka Laitinen <jukka.laitinen@intel.com>
2020-05-13 06:51:57 -06:00
Xiang Xiao
63e3054ced Don't need monitor IOB buffer empty event for POLLOUT implementation
It's enough to check the buffer available in the net event handler

Change-Id: I2d7c7a03675cf6eff6ffb42a81b7c7245253e92c
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-13 06:50:07 -06:00
rajeshwaribhat
3d7678ad9b nxstyle corrections for .c and .h file modified by PR1030 2020-05-13 06:46:56 -06:00
Gregory Nutt
4664642cf7 Board specific code moved to boards directory and ipv6 support added
Added support to crashdump for rx65n on sbram
Board specific code moved to boards directory and ipv6 support added
2020-05-13 06:46:44 -06:00
Xiang Xiao
9607152e68 arm/gic: Don't pirnt log in arm_decodeirq
it is unsafe place to do this

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I47fdb1a34a7f1d5c5d3c4f3c0030a60bf01c43c2
2020-05-13 06:33:56 -06:00
Xiang Xiao
7ffafa3654 Remove executable bit from source code
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-13 06:32:13 -06:00
Masayuki Ishikawa
ef169b7ebf drivers: wireless: Handle multiple incoming packets in gs2200m.c
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-05-13 13:11:08 +02:00
Masayuki Ishikawa
65b3accc51 boards: cxd56xx: Add SPI DMA support to cxd56_gs2200m.c
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-05-13 13:11:08 +02:00
Masayuki Ishikawa
77f15c8b17 arch: cxd56xx: Apply the latest cxd56_dma.c and cxd56_spi from SDK
See the following commit in SDK:

  commit 62a2fb4fd3001aefad9ec3b2e2e7c47e5b0f21e1
  Author: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com>
  Date:   Fri Jan 24 13:32:04 2020 +0900

      Enable dummy transfer by SPI using DMA

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-05-13 13:11:08 +02:00
liuhaitao
21557ac259 ea3131/scripts/pg-ld.script: Rename up_head.o to arm_head.o
In https://github.com/apache/incubator-nuttx/pull/935, up_head.S renamed
to arm_head.S, so update here accordingly.

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-05-13 10:39:29 +02:00
liuhaitao
78c8b43b9c libs/libxx: add .cpp files build support
libcxx project has .cpp files inside, so add .cpp files build support
here.

Change-Id: Icd3bcb42f4ceafa5e07a9977149cb08d555a9ade
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-05-13 09:15:37 +02:00
Masayuki Ishikawa
1d77061adc boards: maix-bit: Update knsh/defconfig 2020-05-13 03:34:04 +01:00
Nakamura, Yuuichi
f60b79f772 Add defconfig for maix-bit:knsh 2020-05-12 20:19:24 +09:00
Xiang Xiao
92c721a532 boards: Fix the wrong order in some defconfig
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-11 12:24:58 -06:00
Xiang Xiao
3f83d2da30 tools/refresh.sh: replace cmpconfig with diff
since we want to catch the order difference too

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-11 12:24:58 -06:00
Xiang Xiao
b4dceaa88c tools/refresh.sh: shouldn't redirect "make oldconfig" to /dev/null
since kconfig need interact with user to make the selection

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-05-11 12:24:58 -06:00
Gregory Nutt
2b5ff17a85 setlogmask(): Add comments
In include/syslog.h and libs/libc/syslog/lib_setlogmask.c, add comments indicating tht setlogmask() is not thread-safe.
2020-05-11 11:32:55 -04:00
Nakamura, Yuuichi
46baccb521 Remove unnecessary enter/leave_critical_section() in setlogmask() because it is MT-unsafe. 2020-05-11 08:06:29 -06:00
Juha Niskanen
d666aa623f drivers/mtd/filemtd.c: fix build error 2020-05-11 09:25:45 -04:00
Xiang Xiao
517974787f Rename clock_systime[r|spec] to clock_systime_[ticks|timespec]
follow up the new naming convention:
https://cwiki.apache.org/confluence/display/NUTTX/Naming+of+OS+Internal+Functions
2020-05-10 14:35:50 -06:00
Gregory Nutt
153eee6de2 Make more OS internal names consistent
1. Internal scheduler functions should begin with nxsched_, not sched_
2. Follow the consistent naming patter of https://cwiki.apache.org/confluence/display/NUTTX/Naming+of+OS+Internal+Functions

    # clock_systimer -> clock_systime_tick
    # clock_systimespec -> clock_systime_timespec
    sched_oneshot_extclk -> nxsched_oneshot_extclk
    sched_period_extclk -> nxsched_period_extclk
    # nxsem_setprotocol -> nxsem_set_protocol
    # nxsem_getprotocol -> nxsem_get_protocol
    # nxsem_getvalue -> nxsem_get_value
    nxsem_initholders -> nxsem_initialize_holders
    nxsem_addholder -> nxsem_add_holder
    nxsem_addholder_tcb -> nxsem_add_holder_tcb
    nxsem_boostpriority -> nxsem_boost_priority
    nxsem_releaseholder -> nxsem_release_holder
    nxsem_restorebaseprio -> nxsem_restore_baseprio

Some planned name changed were skipped for now because they effect too many files (and would require many hours of coding style fixups).
2020-05-10 22:47:07 +08:00
Gregory Nutt
fbbf1dffaf Fix minor spacing problems from 1017 and 1018 2020-05-09 22:09:12 +01:00
Gregory Nutt
3ac629bdfb Run all .c and .h files modifed by the PR though nxstyle. 2020-05-09 16:58:42 -03:00
Gregory Nutt
f92dba212d sched/sched/sched.h: Make naming of all internal names consistent:
1. Add internal scheduler functions should begin with nxsched_, not sched_
2. Follow the consistent naming patter of https://cwiki.apache.org/confluence/display/NUTTX/Naming+of+OS+Internal+Functions
2020-05-09 16:58:42 -03:00
Gregory Nutt
4b44b628ea Run nxstyle against all .c and .h files modified by this PR.
All complaints fixed except for those that were not possible to fix:

- Used of Mixed case identifier in ESP32 files.  These are references to Expressif ROM functions which are outside of the scope of NuttX.
2020-05-09 14:19:08 -03:00
Gregory Nutt
a4218e2144 include/nuttx/sched.h: Make naming of all internal names consistent:
1. Add internal scheduler functions should begin with nxsched_, not sched_
2. Follow the consistent naming patter of https://cwiki.apache.org/confluence/display/NUTTX/Naming+of+OS+Internal+Functions
2020-05-09 14:19:08 -03:00
chao.an
8b289023bf semaphore: do not assert if the count exceeds the limit
Linux Programmer's Manual:

SEM_POST(3)

NAME
       sem_post - unlock a semaphore
...

ERRORS
...
       EOVERFLOW
              The maximum allowable value for a semaphore would be exceeded.

Change-Id: I57c1a797a5510df4290a10aa2f3106fd01754b37
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-05-09 07:25:59 -06:00
chao.an
0887203c57 tcp/conn: request arp before the 3-way handshake
Since the request address was not properly resolved before the handshake,
every time of connection, the handshake data will be overwitten into
arp packet and retransmitted until the next tcp timer.
Request the arp address before the handshake to avoid the retransmission.

Change-Id: I80118b9a8096c126c8e16cdf2f7b3d98fca92437
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-05-09 07:25:03 -06:00
chao.an
027ffa1530 boards: update the defconfig
reuse the router ip/mask from dhcpd lib

CONFIG_EXAMPLES_DHCPD_IPADDR   -> CONFIG_NETUTILS_DHCPD_ROUTERIP
CONFIG_EXAMPLES_DHCPD_DRIPADDR -> CONFIG_NETUTILS_DHCPD_ROUTERIP
CONFIG_EXAMPLES_DHCPD_NETMASK  -> CONFIG_NETUTILS_DHCPD_NETMASK

Signed-off-by: chao.an <anchao@xiaomi.com>
2020-05-09 07:24:27 -06:00
liuhaitao
b94a7698d9 Revert "CI: use 'git diff $commits' as a whole patchset to do checkpatch"
This reverts commit 350131d00e.

If one PR is on a former master code base, using 'git diff $commits' would result in
abnormal checkpatch report sometimes. So revert it anyway.
2020-05-09 14:10:34 +08:00
Masayuki Ishikawa
75a8883f07 net: netdev: Fix netdev_vioctl()
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-05-09 02:10:23 +01:00
Gregory Nutt
4301682fbc Fix up some problems/issues remaining from PR 1007
1. Add missing conditional logic in include/sys/syscall_lookup.h
2. CONFIG_NPTHREAD_KEYS removed from code but was still in sched/Kconfig
3. Refresh all configurations affected by PR 1007
4. syscall/syscall_funclookup.c needs to include nuttx/tls.h
2020-05-08 20:13:40 +01:00
Gregory Nutt
9ce03b1660 Move pthread-specific data into TLS
1. Move pthread-specific data files from sched/pthread/ to libs/libc/pthread.
2. Remove pthread-specific data functions from syscalls.
3. Implement tls_alloc() and tls_free() with system calls.
4. Reimplement pthread_key_create() and pthread_key_free() using tls_alloc() and tls_free().
5. Reimplement pthread_set_specific() and pthread_get_specicif() using tls_set_value() and tls_get_value()
2020-05-08 18:05:04 +01:00
Xiang Xiao
a6c82a27db tools/mksyscall: Unify the fixed and variable arguments process
Signed-off-by: Xiang Xiao <iaoxiang@xiaomi.com>
2020-05-08 10:38:05 -06:00