Commit Graph

14205 Commits

Author SHA1 Message Date
Xiang Xiao 4030fc5e1a arch/arm/src/armv7-m/up_systick.c: Fix warning: 'NVIC_IRQ_SYSTICK redefined' 2018-08-29 06:10:52 -06:00
EunBong Song d33b0640fe Merged in ebsong/nuttx (pull request #712)
Pull request for cortex-r4 codes

* arm/armv7-r: Add general interrupt controller.

    This is based on armv7-a gic controller code.

    Signed-off-by: EunBong Song <eunb.song@samsung.com>

* arm/armv7-r: add invalidate dcache in arm_head.S

    Adding invalidate dcache as a comment in arm_head.S.

    Signed-off-by: EunBong Song <eunb.song@samsung.com>

* arm/armv7-r: Fix some wrong configuration of program status register.

    PSR_E_BIT bit should be set for big endian system.
    PSR_A_BIT bis is set automatically as arm cortex-r4 reference manual 3.7.4.
    So we don't need to set this bit.

    Signed-off-by: EunBong Song <eunb.song@samsung.com>

* arm/armv7-r: Fix some wrong MPU register definition.

    Change MPU_RBAR_ADDR_MASK and MPU_RACR_TEX_SHIFT mask as
    arm cortex-r4 reference manual.

    Region Base Address Register 0-4 bits are reserved.
    MPU Region Access control register type 3-5 bits.

    Signed-off-by: EunBong Song <eunb.song@samsung.com>

* driver/mtd: fix compilation error.

    This commit fixes below compilation errors.

    CC:  mtd/smart.c
    mtd/smart.c:182:22: error: 'gWearBitToLevelMap4' defined but not used [-Werror=unused-const-variable=]
     static const uint8_t gWearBitToLevelMap4[] =
                          ^~~~~~~~~~~~~~~~~~~
    mtd/smart.c:170:22: error: 'gWearLevelToBitMap4' defined but not used [-Werror=unused-const-variable=]
     static const uint8_t gWearLevelToBitMap4[] =
                          ^~~~~~~~~~~~~~~~~~~
    cc1: all warnings being treated as errors
    make[1]: *** [smart.o] Error 1

    Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>

Approved-by: GregoryN <gnutt@nuttx.org>
2018-08-29 01:50:41 +00:00
Juha Niskanen 7d734b52bd arch/arm/src/stm32/stm32f30xxx_i2c.c: Fix compile error with I2C reset 2018-08-27 07:39:29 -06:00
Xiang Xiao 46e47c8dcf Squashed commit of the following:
drivers/serial/uart_16550.c:  Add a configuration, analogous to the STM32 configuration option, to suppress the NuttX standard re-ordering for /dev/ttySN for special case of the 16550 UART.

    config/serial: UART 16550: Add CONFIG_SERIAL_UART_ARCH_MMIO option so the a memory mapped device doesn't need to provide uart_getreg() and uart_putreg() implementations.

    u16550_txempty() should check UART_LSR_TEMT to avoid some data left in the transmit FIFO
2018-08-26 11:17:33 -06:00
Gregory Nutt 96840c7127 arch/arm/src/armv7-m/up_trigger_irq.c: Correct copyright and authorship of file. Cloning error. 2018-08-25 11:12:12 -06:00
Gregory Nutt cc75e33816 arch/arm/src/armv-7m/nvic.h: Add definitions needed by up_trigger_irq(). 2018-08-25 10:40:37 -06:00
Gregory Nutt f8bfbd58c5 arch/arm/src/armv7-m/up_trigger_irq.c: Add logic to trigger ARMv7-M interrupts and exceptions. 2018-08-25 10:23:21 -06:00
Gregory Nutt 3f1869ea9d Rename CONFIG_ARCH_HAVE_TRIGGER_HOOK to CONFIG_ARCH_HAVE_IRQTRIGGER 2018-08-25 09:10:30 -06:00
Gregory Nutt 9bc951a335 Rename devif_loopback_out to devi_loopback 2018-08-25 08:33:21 -06:00
David Sidrane aa409f46ab Merged in david_s5/nuttx/master_kinetis_i2c_fix (pull request #711)
kinetis:i2c ensure timeout on bus error

The code had a dead wait on I2C_S_BUSY. Noise on the
   bus would cause the driver to hang.

   Add timeout on invalid states of I2C_S_BUSY to allow
   the upper layers do deal with restart or abort.

Approved-by: GregoryN <gnutt@nuttx.org>
2018-08-25 12:48:29 +00:00
Gregory Nutt e8270defc9 arch/: Fix an error found in build testing. The protoype of mpu_log2regionfloor() changed; an additional parameter was added. However, none of the calls to mpu_log2regionfloor() were updated to pass the new, additional parameter. 2018-08-24 16:40:37 -06:00
dongjianli 19e16cb1ba up_internal.h: Define out the prototype for up_netinitialize() if CONFIG_NETDEV_LATEINIT is also defined 2018-08-24 14:50:45 -06:00
Xiang Xiao c0bacb7d89 arch/sim/src/up_netdriver.c: (1) Remove up_comparemac() check for matching MAC address. Let's trust that the tap device just return the packet which belong to us like other real network device hardware. (2) Add network device statistics support. 2018-08-24 14:23:50 -06:00
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 430bf16f1e Squashed commit of the following:
include/nuttx/arch.h:  Add prototype for an architecture-specific up_trigger_irq function
    arch/, include/nuttx, sched/sched:  Add the garbage collection hook so each architecture can do custom memory cleanup if necesary.
    arch/Kconfig:  Add configureation CONFIG_ARCH_GNU_NO_WEAKFUNCTIONS to suppress use of weak functions.  Some gnu derived toolchains do not support weak symbols
2018-08-24 08:30:01 -06:00
dongjianli 0df5e56e20 include/nuttx/arch.h: Add prototype for an architecture-specific up_trigger_irq function 2018-08-24 08:25:06 -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
Xiang Xiao c43b3e5a34 fs/hostfs: Add ftruncate support. 2018-08-22 06:08:34 -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 92b925ba02 arch/Kconfig: Bring-up features should also depend on CONFIG_DEBUG_FEATURES. I missed a bring-up feature that is specific to the ESP32. I hope that the ESP32 ports still work as intended! It depended on some of these bring-up settings in the header file. I moved the definitions to the ESP32 defconfig files. 2018-08-19 15:38:06 -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