Commit Graph

11297 Commits

Author SHA1 Message Date
Xiang Xiao
0074afa0ac net/netdev: add devif_loopback_out() to check the loopback case where a packet is being sent to itself. Modify the net driver to call this function in this case. This function will simply re-inject the packet back into the network and the network driver will not put anything on the wire. 2018-08-24 09:21:33 -06:00
Xiang Xiao
36b46a6a40 arch/ and task/sched: vfork operation needs to allocate and copy the task argument too. Also correction of the address correction cannot depend on the stack pointer since it is not available in all architectures. Rather callculate the offset from the stack allocation pointer 2018-08-24 07:43:00 -06:00
Xiang Xiao
8b63d02309 arch/arm/armv7-m: MPU: mpu_log2regionceil needs take into account the offset too 2018-08-24 07:13:05 -06:00
Xiang Xiao
7a9309370f arm syscalls: svcall/sycall logic needs to get the ucontext argument from R4 instead of stack since all syscall parameters pass from registers in syscall.h 2018-08-24 07:11:18 -06:00
Gregory Nutt
4824b04b44 arch/arm/src/armv6+7-m/up_vectors.c: Fix the type mismatch warning for _ebss 2018-08-24 07:04:51 -06:00
Xiang Xiao
e1202d2ed3 Replace all ASSERT with DEBUGASSERT to save the code space 2018-08-24 06:58:30 -06:00
Xiang Xiao
467d2a58ea Replace non critical PANIC with DEBUGPANIC to save the code space 2018-08-24 06:21:15 -06:00
Xiang Xiao
22a44465e4 arch/arm/src/armv7-m: Implement SYSTICK timer driver 2018-08-23 10:09:56 -06:00
xuanlin
2c93467436 pthreads: Add support static pthread stack. Add standard pthread_attr_setstack() and pthread_attr_getstack(). In all cases where the stack is released, add check to see which allocator must be used to free the stack: The user or the kernel allocator. 2018-08-23 09:49:20 -06:00
Gregory Nutt
0001607f71 arch/arm: (1) Add semihost support for syslog, (2) Add semihost support for HostFS 2018-08-23 08:00:07 -06:00
Xiang Xiao
a465b6f0d4 configs/: Change CONFIG_BOARD_RESET_ON_CRASH to CONFIG_BOARD_RESET_ON_ASSERT, arch/: Implement call to board_reset() if in all implementations of up_assert() when CONFIG_BOARD_RESET_ON_ASSERT=y. 2018-08-22 17:04:39 -06:00
Evgeniy Bobkov
df7565e557 arch/arm/src/stm32f7/stm32_serial.c: Previous logic would invalidate the data cache as each byte was read from the DMA buffer. This change adds logic to invalidate the data cache less frequently by monitoring the state of the Rx DMA buffer cache coherency and invalidating only regions as necessary. This commit also reverts commit e17d8c719e which has a logic error in cases where data is removed from the Rx DMA buffer at a rate higher than it is added to the Rx DMA buffer. 2018-08-21 06:20:23 -06:00
Gregory Nutt
0e7fa2c9b0 Update some comments. 2018-08-20 22:06:04 -06:00
Gregory Nutt
e17d8c719e arch/arm/src/stm32f7/stm32_serial.c: Previous logic would invalidate the data cache as each byte was read from the DMA buffer. This change moves one line of code: The cache invalidation moved from the single character read logic to the DMA complete interrupt handler. It is only necessary to invalidate the DMA buffer at the time that the Rx DMA completes. 2018-08-20 19:07:40 -06:00
Gregory Nutt
cba0ddad0e arch/: Most some common debug configuration settings out of header files and into Kconfig files where they belong. 2018-08-19 14:55:49 -06:00
Gregory Nutt
c790450ba2 Remove CONFIG_ARCH_CALIBRATION. It is awkward to use and no longer necessary now that we have apps/examples/calib_udelay. 2018-08-19 10:06:36 -06:00
Juha Niskanen
d219182588 arch/arm/src/stm32l4: Some updates to analog peripherals ADC, COMP and DFSDM for STM32L4XR 2018-08-16 08:10:46 -06:00
Juha Niskanen
c90ee015e4 arch/arm/src/stm32, stm32f7, stm32l4: Make STM32F4XX RTC depend on CONFIG_STM32_RTC, cosmetic changes to comments 2018-08-16 08:05:24 -06:00
Juha Niskanen
abf251f2a9 arch/arm/src/stm32/stm32_adc.c: Allow multiple channels without DMA on STM32L15XX 2018-08-16 08:03:25 -06:00
Juha Niskanen
affc50df66 arch/arm/src/stm32l4: stm32l4xrxx: allow board to override flash wait states 2018-08-14 06:55:52 -06:00
Gregory Nutt
8c61c2f31b Remove trailing spaces at the end of lines. 2018-08-13 07:39:38 -06:00
Juha Niskanen
2589fc943e arch/arm/src/stm32l4: Add initial support to STM32L4+ chips 2018-08-13 07:06:51 -06:00
Gregory Nutt
17c18a1347 tools/kconfig2html.c: Update tool to handle tristate types. Fix a few errors detected in Kconfig files. 2018-08-10 17:30:17 -06:00
Gregory Nutt
672c6a5405 arch/arm/src/kinetis: Remove annoying typedefs. Discouraged but not prohibited by coding standard 2018-08-10 09:22:27 -06:00
Gregory Nutt
0bc84d74b6 configs/freedom-k66f/nsh/defconfig: Disable DMA in this configuration. 2018-08-10 08:10:35 -06:00
David Sidrane
9ef481ce4b Squashed commit of the following:
Author: Gregory Nutt <gnutt@nuttx.org>
    arch/arm/src/kinetis:  Cosmetic changes from review of coding standard.

Author: David Sidrane <david_s5@nscdg.com>
    Merged in david_s5/nuttx/master_kinetis (pull request #710)

    kinetis:Add DMA and use it as RX FIFOs on Serial

    * Add initial implementation of the DMA

    * Add across Kxx family support [WIP]

    * Incorporate the DMA into the serial

        Add polling to serial

        do DMA initialisation at UART startup and fix DMA mux setting.

        Fix circular DMA handling in the serial driver.

    * Adapt defconfig to enable UART1,4 RXDMA

    * [WIP] - refactor this with new CONFIG DMA settings

    * kinetis/Kconfig:Bring inline with upstream stucture

          1. Use the Serial console configuration from drivers/serial/Kconfig
            and friends.
          2. Prefix arch specific featurs as such
             UARTx_RXDMA->KINETIS_UARTx_RXDMA

    * Kinetis:Serial formatting and clean up

    * kinetis:DMA Formating and Cleanup

    * kinetis:serial Use cleaner DMA API

    * kinetis:Make.defs fix duplicate/errant kinetis_dma.o

    * kinetis:serial Fix warning/error on only one uart using DMA

          The driver can support no DMA on any UART, DMA on some
          UARTs or DMA on all UARTs.

          In the case of no DMA we disable the DMA based variables
          and logic. In the case of all DMA we disable the non
          DMA variables and logic, and in the mixed case both
          DMA and non DMA variable and logic are enabled.

    * kinetis:dma config fix formatting

    * kinetis:chip/dma fix formatting

    * kinetis:DMA config assume Unknown

           Assume KINETIS_DMA_VERSION_UKN for all SoC not versioned
           This is as the code was in nuttx prior to this commit

    * kinetis:DMAMUX contain versioning- use HAS pattern define Unknown

          The pattern for chip versioning is to define 'HAS' constants.
          Define KINETIS_DMAMUX_HAS_MONOTONIC_CHCFG to contain the
          version numbers to the include soc header and use that define
          in the chip headers.

          Define the KINETIS_DMAMUX_VERSION_UKN for the default as prior
          this commit addressing was by default monotonic for CHCFG

    * freedom-k66f:Disable Serial RXDMA

          The application has to add calling of the kinetis
          serial dma poll as it is application specific.

    Approved-by: GregoryN <gnutt@nuttx.org>
2018-08-10 08:03:50 -06:00
David Sidrane
2e23ffe9d2 Squashed commit of the following:
* kinetis:PIT add Liftime and Chaining

    * kinetis:flexcan fix dup line and ordering

    * kinetis:kinetis_lowput.c LPUART data format with parity fix

          The 9-bit data mode is typically used with parity to allow
          eight bits of data plus the parity

    * kinetis:pindma fix warning

    * kinetis:lowputc  LPUART_BAUD_INIT has to be defined

           build fails with test case enable LPUART0 and make
           UART1 console

           if HAVE_LPUART_DEVICE is defined then LPUART_BAUD_INIT
           has to be defined even if the lpuart is not the console

    * kinetis:lpserial fix warning
2018-08-09 09:08:39 -06:00
Daniel P. Carvalho
48a030f7f0 arch/arm/src/stm32l4/chip: Merged stm32l4x2xx and stm32l4x3xx pinmap files. Removed references to stm32l4x2xx_pinmap.h 2018-08-09 07:05:25 -06:00
Juha Niskanen
e402dadf5d arch/arm/src/stm32l4: Avoid using redundant CONFIG_STM32L4_STM32L4X2. This is almost always same as CONFIG_STM32L4_STM32L4X3. Avoid duplication to reduce macro clutter. This patch limits CONFIG_STM32L4_STM32L4X2 usage to dependency tracking and pinmap. Also enable ADC for CONFIG_STM32L4_STM32L4X5 (untested, but same RM). 2018-08-09 06:42:54 -06:00
Gregory Nutt
5433c9f6d1 Revert "arch/arm/src/stm32, stm32f7, stm32l4 Kconfig files: The option to select the STM32 RTC should not be available if the external RTC option is selected."
While this is a good idea and a proper thing to do, it also creates a circular dependency and errors during configuration.  RTC depends on STM32_RTC which depends on RTC_EXTERNAL with depends on RTC.  No can do.

This reverts commit 714e8c1f9e.
2018-08-08 12:51:40 -06:00
Gregory Nutt
714e8c1f9e arch/arm/src/stm32, stm32f7, stm32l4 Kconfig files: The option to select the STM32 RTC should not be available if the external RTC option is selected. 2018-08-08 12:49:01 -06:00
Gregory Nutt
8d68d9ca43 arch/arm/src/stm32, stm32f7, stm32l4, and related defconfig files: The STM32 RTC driver was being selected by the global CONFIG_RTC option. That is in correct. For example, if you want to disabled the STM32 RTC and use an external RTC you cannot because the external RTC also depends on the global CONFIG_RTC. The solution is to add a new CONFIG_STM32xx_RTC configuration option the permits to you select or deselect the STM32 RTC but still be able to selecte the external RTC. 2018-08-08 12:42:04 -06:00
Juha Niskanen
84f8e01c17 arch/arm/src/stm32l4: Fix ADC and COMP breakage caused by CONFIG_STM32L4_STM32L4X2 separation in 9223123c 2018-08-08 06:55:25 -06:00
Evgeniy Bobkov
67287e89d0 This commit basically reverts my version of the change bbee0d70de in favor of Evgeniy Bobkov's version per request of Juha Niskanen. 2018-08-06 06:22:19 -06:00
Juha Niskanen
1d5e8f6066 arch/arm/src/stm32l4/chip/stm32l4x3xx_pinmap.h: Recent commit removed some of the pin definitions for STM32L451xx, and probably some other chips of the STM32L4x3 subfamily, breaking our builds. Some chips of the subfamily don't have these peripherals, but some do, so that is not a valid reason to remove them. 2018-08-06 06:10:41 -06:00
Masayuki Ishikawa
c46741975d Merged in masayuki2009/nuttx.nuttx/fix_http_streaming_with_lc823450 (pull request #705)
Fix http streaming with lc823450

* arch/arm/src/lc823450: Change C-Buffer under-level control

    The under-level setting was changed from 1KB to 55KB.
    In previous implementation, the setting can ben changed
    by the tx threshold but it is fixed at startup.

    Also, check write size and adjust alignment if needed.

    Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

* configs/lc823450-xgevk: Change IOB related params for rndis.

    Since TCP flow control scheme was changed, HTTP audio streaming
    has not been working. These IOB params are not optimized but
    HTTP audio streaming now works.

    Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

Approved-by: GregoryN <gnutt@nuttx.org>
2018-08-06 03:39:45 +00:00
Gregory Nutt
4e5cf1229c drivers/mmcsd/Kconfig: three configuration settings were within ifdef/endif and led to warning: xxx selects xxxx which has unmet direct dependencies. Fix by moving settings to drivers/Kconfig and outside of the ifdef-endif. Also renamed CONFIG_SDIO_PREFLIGHT to CONFIG_ARCH_HAVE_SDIO_PREFLIGHT to follow naming of similar hidden architecture capability configurations. 2018-08-05 17:58:17 -06:00
Gregory Nutt
c2267a57a0 Kconfig files: Fix several errors noted by Alex Denisov in Bitbucket issue 115. 2018-08-05 10:48:02 -06:00
Gregory Nutt
d68b0c35f9 Squashed commit of the following:
configs/olimex-stm32-p407:  Various changes as necessary to get the new kelf configuration working.
    configs/olimex-stm32-p407:  Add kernel ELF (kelf) configuration.
2018-08-04 16:18:51 -06:00
Gregory Nutt
5996d70883 Revise commit 09ccd43d61: That change had the subtle side-effect of unconditionally enabling interrupts in the primask. That may be what we want in most cases, but certainly not all. This does increse the size of the inline function by about 48-bits per instantiation. 2018-08-04 07:37:31 -06:00
Gregory Nutt
679d2875f2 Update some comments. 2018-08-03 16:20:42 -06:00
Gregory Nutt
9b7e5ede0a configs/metro-m4: Add an option to build the Metro M4 image to run out of SRAM. This ought to be a safer and quicker way to do the initial bring-up (having bricked the first Metro M4 due to a bad FLASH image). 2018-08-03 15:26:44 -06:00
Gregory Nutt
bbee0d70de arch/arm/src/stm32f7: Fix an error introduced by the patch by Evgeniy Bobkov in Issue #114. That patch brok all STM32 F7 builds. 2018-08-03 14:26:29 -06:00
Evgeniy Bobkov
caa7fa7327 This commit ports the stm32f20xxf40xx_flash.c driver to the STM32F7 platform and fixes some relevant problems in the header files. 2018-08-03 11:02:59 -06:00
Gregory Nutt
bfc8f9dfdb arch/arm/src/imxrt/imxrt_enet.c: Fix a warning about imxrt_calcethcrc() being defined, but not used. 2018-08-03 10:53:37 -06:00
Gregory Nutt
10069067c1 include/nuttx/i2c/i2c_master.h: Rename I2C_M_NORESTART to I2C_M_NOSTART since it may be used in other contexts than a repeated start. Add comments to clarilfy setup for repeated start. 2018-08-03 08:51:55 -06:00
Gregory Nutt
ee28cd9aeb include/nuttx/i2c/i2c_master.h: Add a definition to distinguish a new START of messages from a repeated start. No lower-half I2C drivers actually implement this new flag bit, however. drivers/i2c/i2c_writeread.c: Use new repeated START definition where appopriated. Other: Some cosmetic changes, updates to README files, etc. 2018-08-03 07:43:57 -06:00
Gregory Nutt
09ccd43d61 arch/arm/include/armv7-m, arch/arm/include/armv7-m, arch/arm/include/stm32f7: Add a configuration to enable workaround for r0p1 Errata 837070: Increasing priority usingwrite to BASEPRI does not take effect immediately.
This update is required to be serialized to the instruction stream meaning that after this update completes, it takes effect immediately and no exceptions of lower priority than the new boosted priority can pre-empt execution.  Because of this erratum, the priority boosting does not take place immediately, allowing the instruction after the MSR to be interrupted by an exception of lower priority than the new boosted priority. This effect is only limited to the next instruction. Subsequent instructions are guaranteed to see the new boosted priority.

This was raised in Bitbucket issue 113 from Vadzim Dambrouski.
2018-08-02 16:51:58 -06:00
Gregory Nutt
5dec4a6763 configs/metro-m4: Corrrect SERCOM3 pin configuration 2018-08-01 14:56:11 -06:00
Gregory Nutt
b2c978dc83 This commit brings the SAMDL2 USB driver into the SAMD5E5 port.
Squashed commit of the following:

    arch/arm/src/samd5e5/sam_usb.c:  USB driver now compiles with some issues.

    arch/arm/src/samd5e5/chip/sam_fuses.h:  Add fuse definition header file.

    arch/arm/src/samd5e5:  Bring USB driver in from SAMD2L2.
2018-07-30 10:43:11 -06:00