Commit Graph

15365 Commits

Author SHA1 Message Date
Xiang Xiao
ac4735cf58 Many fixes on Kconfigs and defconfigs do SDIO, NETDEV, USBHOST
Author: Xiang Xiao <xiaoxiang@xiaomi.com>

    Fix warning: selects SDIO_DMA or SDIO_BLOCKSETUP which has unmet direct dependencies (MMCSD)

    Fix warning: selects NETDEV_TELNET which has unmet direct dependencies (NETDEVICES && NET && NET_TCP)

    Fix warning: selects ARCH_PHY_INTERRUPT which has unmet direct dependencies (NETDEVICES && ARCH_HAVE_PHY)

    Fix warning: selects USBHOST_HAVE_ASYNCH which has unmet direct dependencies (USBHOST)

    Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-01-23 11:41:12 -03:00
Xiang Xiao
1e3f457c9e Remove TIME_EXTENDED option to more conform C standard
Gregory Nutt <gnutt@nuttx.org>

    Run all .c and .h files modified in this PR through nxstyle and correct all coding standard problems.

Xiang Xiao <xiaoxiang@xiaomi.com>

    Remove TIME_EXTENDED option to more conform C standard

    Note: the code/data size increment is small
2020-01-23 08:17:22 -06:00
patacongo
1658d75005 arch/arm/src/stm32/stm32_dac.c: Fix warning (#148)
Fix warning found in build testing:  "warning:  'dac_interrupt' defined but not used [-Wunused-function].  The compiler is right, dac_interrupt is not used.  It is, apparently, a placeholder for future interrupt support.  Now conditioned out with #if 0 to suppress build test warnings.

Co-authored-by: Gregory Nutt <gnutt@nuttx.org>
2020-01-22 18:35:38 +01:00
Gregory Nutt
c1f75af084 Fix SAMA5D* warnings
sama5d3-xplained:ethernet-over-phy configuration found in build testing:

  arch/arm/src/sama5/sam_irq.c:  Fix "Control reaches end of non-void function " warning
  arch/arm/src/sama5/sam_udphs.c:  Fix "unused variable 'epno'" warning
  boards/arm/sama5/sama5d*-*/src/sam_usb.c:  Fix "warning 'HAVE_USBHOST' not defined" warnings
2020-01-22 16:42:46 +01:00
Masayuki Ishikawa
a218953082 arch: cxd56xx: Fix hardfault when accessing to uSD card
The bug had been introduced in recent refactoring.

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-01-21 08:13:20 -03:00
chao.an
4d74aa6ec9 sim/netdev: dependens on LPWORK by default
Change-Id: Ic2d42d29fc84bef1cc279ef443897d5191888e72
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-01-21 14:17:24 +08:00
Daniel P. Carvalho
3054ade4cf Fix some build issues when CONFIG_PWM_PULSECOUNT is enabled. 2020-01-20 16:23:37 -03:00
Juha Niskanen
a762c06ed9 Fix typos and some incorrect comments
Author: Alan Carvalho de Assis <acassis@gmail.com>

    Run nxstyle against .c and .h files and fix it

Author: Juha Niskanen <juha.niskanen@haltian.com>

    Fix typos and some incorrect comments
2020-01-20 09:32:36 -03:00
raiden00pl
e0cd10b7d5 Nrf52 imrpovements (#119)
* arch/arm/src/nrf52/hardware/nrf52_twi.h: fix typo

  * arch/arm/src/nrf52/nrf52_i2c.c: add interrupts support and some debug messages

  * boards/arm/nrf52/nrf52840-dk: add support for hts221 and lsm303agr; boards/arm/nrf52/nrf52840-dk: fix issues noted by nxstyle
2020-01-17 14:30:34 +00:00
chao.an
1ff410957f sim/net: do not do any critical operations in idle
Change-Id: Ia9011b62ea61d15bd66aa063e4165d9d3baacb51
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-01-16 11:01:47 -06:00
Nathan Hartman
d1dd2841c5 Fix typos in comments and README.txt.
No functional changes.
2020-01-15 10:09:34 -06:00
Mateusz Szafoni
58c3ee65e7 nrf52 improvements
Author: Alan Carvalho de Assis <acassis@gmail.com>

    Run nxstyle on .c and .h files and fix it

Author: raiden00pl <raiden00pl@gmail.com>

    arch/arm/src/nrf52: use the same naming convention for register defs

    arch/arm/src/nrf52/hardware/nrf52_ficr.h: remove invalid defs

    arch/arm/src/nrf52/hardware: add TIMER register defs
2020-01-15 11:43:36 -03:00
chao.an
5c5b4cc3c9 fix warning: passing argument 4 of up_x11initialize from incompatible pointer type
Change-Id: I8fbb506d104dd6a0c41c86ca977e28097694910b
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-01-14 18:30:48 -06:00
Nathan Hartman
72a0934bcc arch/arm/include/cxd56xx/audio.h: Fix minor typos 2020-01-14 20:57:29 -03:00
Daniel P. Carvalho
bf5d48acac Add SPWM example to test STM32L4 PWM driver low level operations
Author: Alan Carvalho de Assis <acassis@gmail.com>

    Run nxstyle again .c file and fix error message

Author: Daniel P. Carvalho <danieloak@gmail.com>

    Add SPWM example to test STM32L4 PWM driver low level operations.

    Fix BUGs.
2020-01-14 11:53:26 -03:00
patacongo
f00569816f Fix a few errors concerning use of section block comments in .c files: (#95)
1. No .c file should include a "Public Types" section.  Only a header file can define a public type.  A .c file can only define a private type.  Several files contained private type definitions.  The section that they were defined in, however, was incorrectly named "Public Types."  Those were easilty changed to "Private Types" which is what they are.

2. No .c file should include a "Public Function Prototypes" section.  All global function prototypes should be provided via a header file and never declared with a .c file.

For No. 2, I corrected as many cases as was reasonable for the time that I had available.  But there are still a dozen or so .c files that declare "Public Function Prototypes" within a .c file.  This is bad programming style.  These declarations should all be moved to the proper header files.
2020-01-14 00:37:54 +01:00
Ouss4
84153ad1a5 arch/mips/src/pic32mz/pic32mz-timer.c: Eliminate a warning found during
testing.
2020-01-13 16:39:54 -06:00
Daniel P. Carvalho
bd0fe25418 Fix small typo error. (#91) 2020-01-13 18:39:56 +01:00
Xiang Xiao
b96d0bfb70 arch/stm32 ensure all spi dma handler check the result
Author: Alan Carvalho de Assis <acassis@gmail.com>

    Run nxstyle on .c files and fix the issues

Author: Xiang Xiao <xiaoxiang@xiaomi.com>

    arch/stm32 ensure all spi dma handler check the result

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-01-11 09:56:52 -03:00
Masayuki Ishikawa
29d3ed2ec1 Feature k210 smp (#71)
* arch: risc-v: Remove unused typedef for irqstate_t

    NOTE: irqstate_t is defined in arch/risc-v/include/types.h

  * arch: risc-v: Add typedef irqstate_t for __LP64__
  * arch: risc-v: Add SMP support to K210 (RV64GC) processor
  * boards: maxi-bit: Update READMEs and add smp/defconfig
2020-01-10 08:04:41 -06:00
Adam Feuer
237c0cca09 CDC ECM Ethernet over USB High Speed for SAMA5D36-Xplained #68
Author: Alan Carvalho de Assis <acassis@gmail.com>

    Run nxstyle against .c .h files and fix it

Author: Adam Feuer <adam@starcat.io>

Summary

    Adds CDC ECM Ethernet over USB High Speed for SAMA5D36-Xplained
      (and maybe other boards) (most of the code was there already,
      but didn't work out of the box for the SAMA5D36-Xplained)
    Only SAMA5D36-Xplained has been tested so far

Impact

    None if you don't use the CDC ECM Ethernet driver
    On SAMA5D36-Xplained, this adds high-speed Internet connectivity
      over USB 2.0 High Speed. via the USB CDC ECM Gadget driver.
    It may work on other boards too.
    This also fixed full-speed (low-speed) mode for the board too.

Limitations

    Hasn't been tested on anything other than SAMA5D36-Xplained board.

TODO

    Ideally this would include a composite RNDIS device so it would
      also work seamlessly on Windows. That is for a future PR
    Ideally this would include software to help configuration via
      mDNS/DNS-SD for plug and play compatibility with Linux and macOS.
      That is for a future PR.

Detail

    Only a few lines of C driver code needed to be changed, since the
      capability was there already. The rest is config and documentation.
    Changes the SAMA5D3-Xplained board bringup to match the SAMA5D3-EK
      board bringup
    A helper script to configure Linux routing and iptables NAT is also
      provided, along with documentation on how to use it.

Testing

    Manual, on a Ubuntu Linux 19.10 system and MacOS 10.14.6 Mojave
      MacBook Pro.

How To Verify

    Follow the new CDC ECM Ethernet over USB instructions in the board
      README.txt file

Commits:

    remove non-UTF-8 chars in comment and reformat

    removed unneeded comment markers

    instructions for using the defconfigs

    removed EMAC from config

    - to prove this example only needs the CDC ECM Ethernet over USB to work

    added CDC-ECM Ethernet over USB info to README

    added U-Boot image

    added netusb helper script

    - this can configure the Linux network interface and routes
      so you can ping or access the NuttX system via TCP/IP.

    renamed defconfig dirs to be ethernet-over-usb

    - was usb-over-ethernet which is not right

    added USB DMA to defconfigs

    updated readme with autoboot and debugging info

    bringing ethernet-over-usb examples into parity

    added cdc ecm ethernet over usb with telnetd config

    added defconfig

    only use phy interrupt if netdevices is ethernet

    - because now netdevice could be CDC ECM ethernet over usb
      which has no PHY interrupt

    add bringup to Makefile

    add bringup

    app init cleanup

    init cdc ecm driver and rndis driver; some cleanup

    fixed some typos and odd characters

    usb over ethernet working over usb 2.0 hs
2020-01-10 07:13:37 -03:00
Daniel P. Carvalho
bac282ecbf boards/arm/stm32l4/nucleo-l432kc/: Remove LPTIM1/2 duplicated entrys on Timer Configuration Menu. Timers TIM3, TIM4, TIM5, TIM8 and TIM17 are not available on STM32L432KC. Added support for timers LPTIM1/2. 2020-01-09 15:22:48 -06:00
Masayuki Ishikawa
255f3008cf arch: k210: Applied changes doned for fe310 recently.
NOTE: In the future, these code should be moved under common code
once they support both RV32 & RV64 architectures.
2020-01-09 09:33:10 -03:00
liuzhao
dc5d8f7c44 Add Quectel EC20 4G LTE Module USB CDC/ACM support
Author: Alan Carvalho de Assis <acassis@gmail.com>

    Run nxstyle to check .c and .h files and fix reported issues

Author: liuzhao <happypapa@yeah.net>

    Add Quectel EC20 4G LTE Module USB CDC/ACM support
2020-01-09 08:00:05 -03:00
Gregory Nutt
8803f5e784 arch/arm/src/cxd56xx/cxd56_sdhci.c: Fix errors found in build testing. Aggressive changes to conform to coding standard introduce compilation errors. More would be requires to fix the CamelCase naming in this case. 2020-01-08 14:04:54 -03:00
raiden00pl
f51e478ad8 nrf52: add support for SPI
nrf52: add support for GPIO interrupts

nrf52: add macros to decode GPIO PIN and GPIO PORT

nrf52: various cosmetic changes

nrf52: fix GPIO P1 memory address

boards/nrf52840-dk: add support for SPI

boards/nrf52840-dk: add support for LSM6DSL sensor

boards/nrf52840-dk: add support for SX127X radio
2020-01-08 09:05:03 -06:00
Masayuki Ishikawa
d76ba14d58 arch: fe310: Fix mstatus handling
In previous commit, mstatus.mie was set when creating a new task
    but this change was incorrect and had a side effect such that
    a machine interrupt would be enabled just before returning from
    interrupt handling routine to switch context.

    Also, mstatus.mpp is set to machine mode in up_get_newintctx()
    instead of fe310_dispatch_irq().
2020-01-08 10:39:00 -03:00
Björn Brandt
38b043da9f arch/arm/src/stm32f7/: Apply fix introduced by 0947b31fbb for STM32F7[6/7]XX to STM32F7[2/3/4/5]XX.
In RCC configuration, STM32_RCC_DCKCFGR2 has nothing to do with PLLI2S; PLLI2S is not dependent on LTDC, instead on SAICLK1/2 generated from PLLI2S
2020-01-08 07:11:59 -06:00
Alin Jerpelea
3e45517599 Fix buffer overrun and memory leak on smartfs and improvement to cxd56xx
Author: Alan Carvalho de Assis <acassis@gmail.com>

    Check all .c and .h against nxstyle and fix it.

Author: Alin Jerpelea <alin.jerpelea@sony.com>

    fs: smartfs: Fix over capacity write

    When the remaining capacity of flash is one sector, if a new root
    directory is created by file open, then the root directory's chain is
    broken and it causes to SmartFS filesystem crash. Once this fatal
    problem occurs, it's impossible to recover even if the system reboot.
    Fix it by finally update link of root directory.

    fs: smartfs: Fix buffer overrun

    fs: smartfs: Fix uninitialized variable warnings

    fs: smartfs: Memory leak fix

    boards: cxd56xx: Update spresense board.h

    - Fix PMIC assignment
    - Add specific pin configurations for spresense
    - Remove unnecessary definitions

    arch: cxd56xx: Add ITM syslog init at startup

    arch: cxd56xx: Enable DMA settings dynamically
2020-01-08 07:51:11 -03:00
Alin Jerpelea
15eddd29c8 cxd56xx improvements (#48) and various other fixes (#49)
Author: Alan Carvalho de Assis <acassis@gmail.com>

    Verify all .c and .h against nxstyle, fixed the Mixed cases

Author: Alin Jerpelea <alin.jerpelea@sony.com>

    cxd56xx improvements (#48)

    * arch: cxd56xx: Add size limitation for I2C SCU xfer

    This is a fw restriction, unroll loop because it can be transfer
    up to 16 bytes.

    * arch: cxd56xx: Fix lack of leave_critical_section

    add the missing leave_critical_section

    * arch: cxd56xx: Remove unnecessary file

    this header is duplicate and we can remove it

    * arch: cxd56xx: Cosmetic change

    remove space after function

    * arch: cxd56xx: update topreg registers

    the topreg registers are updated to match the cxd5602 HW

    * arch: cxd56xx: Add voltage setting for low battery notification

    Add voltage setting for low battery notification

    * arch: cxd56xx: Improve perfomance of SD card

    Improve a problem that the clock of SD Host Controller is lower than the
    expected value in SDR25 transfer mode.

    * arch: cxd56xx: Cosmetic changes

    cleanup to comply with coding standard

    * boards: cxd56xx: Cosmetic changes

    updates to comply with coding standard

    * boards: cxd56xx: Fix SD card cannot mount issue

    SD card cannot mount when connecting and disconnecting three times
    or more due to wrong state of parameter 'initialized'.

    This change enables to skip swtching initialized state when mount
    failed.
2020-01-07 18:29:52 -03:00
Alin Jerpelea
077ef70b0c cxd56xx improvements (#48)
* arch: cxd56xx: Add size limitation for I2C SCU xfer

This is a fw restriction, unroll loop because it can be transfer
up to 16 bytes.

* arch: cxd56xx: Fix lack of leave_critical_section

add the missing leave_critical_section

* arch: cxd56xx: Remove unnecessary file

this header is duplicate and we can remove it

* arch: cxd56xx: Cosmetic change

remove space after function

* arch: cxd56xx: update topreg registers

the topreg registers are updated to match the cxd5602 HW

* arch: cxd56xx: Add voltage setting for low battery notification

Add voltage setting for low battery notification

* arch: cxd56xx: Improve perfomance of SD card

Improve a problem that the clock of SD Host Controller is lower than the
expected value in SDR25 transfer mode.

* arch: cxd56xx: Cosmetic changes

cleanup to comply with coding standard

* boards: cxd56xx: Cosmetic changes

updates to comply with coding standard

* boards: cxd56xx: Fix SD card cannot mount issue

SD card cannot mount when connecting and disconnecting three times
or more due to wrong state of parameter 'initialized'.

This change enables to skip swtching initialized state when mount
failed.
2020-01-07 11:21:58 -03:00
Masayuki Ishikawa
4ea49c5691 Fix issues on fe310 including interrupt handling (#46)
* arch: fe310: Fix comments

* arch: fe310: Improve irq handling in fe310_serial.c

* arch: fe310: Fix initial interrupt status (mstatus)

Also, removed unnecessary up_enable_irq(FE310_IRQ_ECALLM)
2020-01-07 07:17:39 -03:00
脚蹬破拖鞋
0b3dac2c33 Author: Gregory Nutt <gnutt@nuttx.org>
Run all .c and .h files in last PR through nxstyle.

Author: 脚蹬破拖鞋 <happypapa@yeah.net>

    Add Imxrt usdhc insert or remove detection (#43)

    * Add usdhc card insertion and removal detection using interrupt for imxrt.
    * Add interrupt handle when usdhc insert or remove.
2020-01-06 20:49:17 -06:00
patacongo
5d5897c309
Merge pull request #41 from wingunder/wingunder_fix_compilation_bug_irq_f7_h7
Fixed a compilation error, with irq debugging for stm32f7 and stm32h7 archs.
2020-01-05 16:07:20 -06:00
Pieter du Preez
00df2f0fe2 Fixed a compilation error, with irq debugging for stm32f7 and stm32h7 archs.
This commit fixes a compilation error that occurs when enabling the
following configuration items for stm32f7 and stm32h7 architectures:

   CONFIG_DEBUG_FEATURES=y
   CONFIG_DEBUG_ERROR=y
   CONFIG_DEBUG_WARN=y
   CONFIG_DEBUG_INFO=y
   CONFIG_DEBUG_IRQ=y
   CONFIG_DEBUG_IRQ_ERROR=y
   CONFIG_DEBUG_IRQ_WARN=y
   CONFIG_DEBUG_IRQ_INFO=y

The compiler error for stm32f7:

make[1]: Entering directory '/home/pdupreez/dev/wingunder/nuttx/arch/arm/src'
CC:  chip/stm32_irq.c
chip/stm32_irq.c: In function 'up_irqinitialize':
chip/stm32_irq.c:497:29: error: 'STM32_IRQ_NIRQS' undeclared (first use in this function); did you mean 'STM32_IRQ_FIRST'?
   stm32_dumpnvic("initial", STM32_IRQ_NIRQS);
                                ^~~~~~~~~~~~~~~
                             STM32_IRQ_FIRST
chip/stm32_irq.c:497:29: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [Makefile:172: stm32_irq.o] Error 1
make[1]: Leaving directory '/home/pdupreez/dev/wingunder/nuttx/arch/arm/src'

And the compiler error for stm32h7:

make[1]: Entering directory '/home/pdupreez/dev/wingunder/nuttx/arch/arm/src'
CC:  chip/stm32_irq.c
chip/stm32_irq.c: In function 'stm32_dumpnvic':
chip/stm32_irq.c:164:4: warning: #warning Missing logic [-Wcpp]
 #  warning Missing logic
     ^~~~~~~
     chip/stm32_irq.c: In function 'up_irqinitialize':
     chip/stm32_irq.c:522:29: error: 'STM32_IRQ_NIRQS' undeclared (first use in this function); did you mean 'STM32_IRQ_CRS'?
        stm32_dumpnvic("initial", STM32_IRQ_NIRQS);
                                     ^~~~~~~~~~~~~~~
                                  STM32_IRQ_CRS
chip/stm32_irq.c:522:29: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [Makefile:172: stm32_irq.o] Error 1
make[1]: Leaving directory '/home/pdupreez/dev/wingunder/nuttx/arch/arm/src'

This commit replaces all STM32_IRQ_NIRQS defines with the NR_IRQS
define, which seems to be consistent with the rest of the code in
Nuttx.
2020-01-05 21:24:16 +00:00
Minamiya_Natsuki
390ebd504f arch/arm/src/stm32h7: Port QSPI driver from STM32F7 to STM32H7 2020-01-05 07:45:30 -06:00
Mateusz Szafoni
9e091d2027 Improvements for NRF52 (#37)
Author: Alan Carvalho de Assis <acassis@gmail.com>
        Fix long line comments in the header files

Author: Mateusz Szafoni <raiden00pl@users.noreply.github.com>

    * arch/arm/src/nrf52: add GPIOTE and SAADC registers definitions

    * arch/arm/src/nrf52: update some registers definitions

    * arch/arm/src/nrf52: add basic I2C support

    * arch/arm/src/nrf52: add function to unconfigure GPIO

    * arch/arm/src/nrf52/nrf52_lowputc: add missing FAR
2020-01-04 09:44:00 -03:00
Xiang Xiao
d612fd3dc5 Squashed commit of the following:
Author: Alan Carvalho de Assis <acassis@gmail.com>

    Run all .h and .c files modified in last PR through nxstyle.

Author: Xiang Xiao <xiaoxiang@xiaomi.com>

    Fix stm32l4_otgfshost.c: error: 'ret' undeclared (#32)

    result by commit 6a3c2aded6

    Change-Id: I68ba79417d8da102da8d91c74496961aef242dd9
    Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-01-03 11:38:02 -03:00
jjlange
0ee8241606 Author: Gregory Nutt <gnutt@nuttx.org>
Run all .c and .h files in last PR through tools/nxstyle and fix all complaints.

Author: macman88 <jjlange91@gmail.com>

    LPC17xx serial updates (#29)

    * Save CONFIG_ARCH_BOARD_CUSTOM when running 'make savedefconfig'
    * Don't compile up_earlyserialinit if USE_EARLYSERIALINIT is not defined
    * Added support for RS485 direction control on LPC17xx UART1
    * First pass at fractional baud rate divider on LPC17xx/40xx
    * Added support for fractional divider to console UART
2020-01-02 15:56:27 -06:00
Mateusz Szafoni
065ec87a05 arch/arm/src/stm32/stm32_fmc.c: fix compilation error (#27)
arch/arm/src/stm32/stm32_fmc.c:  Missing semicolons caused compilation errors.
2020-01-02 13:48:03 -06:00
Gregory Nutt
669dedc62e Squashed commit of the following:
Author: patacongo <spudarnia@yahoo.com>

    arch/arm/src/imxrt/imxrt_enet.c: Fix some warnings found in build testing.

    Also fix coding standard problems reported by nxstyle. (#26)

    Co-authored-by: Gregory Nutt <gnutt@nuttx.org>
2020-01-02 16:43:09 -03:00
jjlange
084f81e76e Author: Gregory Nutt <gnutt@nuttx.org>
Run all .c and .h files in last PR through nxstyle.

Author: macman88 <jjlange91@gmail.com>

    SAME5x Ethernet Support (#25)

     boards/arm/samd5e5/same54-xplained-pro/:  Adds basic support for Microchip SAM E54 Xplained Pro board.
    arch/arm/src/samd5e5/:   Adds an Ethernet driver for the SAME5x family (based on the SAMA5 GMAC driver).
2020-01-02 12:35:45 -06:00
Xiang Xiao
6a3c2aded6 Fix wait loop and void cast (#24)
* Simplify EINTR/ECANCEL error handling

1. Add semaphore uninterruptible wait function
2 .Replace semaphore wait loop with a single uninterruptible wait
3. Replace all sem_xxx to nxsem_xxx

* Unify the void cast usage

1. Remove void cast for function because many place ignore the returned value witout cast
2. Replace void cast for variable with UNUSED macro
2020-01-02 10:54:43 -06:00
Minamiya_Natsuki
2388373aa5 Squashed commit of the following:
Author: Alan Carvalho de Assis <acassis@gmail.com>

    Run all .h and .c files modified in last PR through nxstyle.

Author: Minamiya_Natsuki <yukihiratype2@gmail.com>

    Add FMC SDRAM for STM32H7x3 chip (#22)

    * Add FMC SDRAM for STM32H7x3 chip

    * Add FMC SDRAM for STM32H7x7

    * Nuttx Coding Standard requires one declaration per line

    * should be __ARCH_ARM_SRC_STM32H7_STM32_FMC_H

    * fix bad alignment

    * fix typo

    * fix typo

    * people can't live in furture

    * fix comment line length

    * fix more comment line length

    * fix aligenment

    * fix typo
2020-01-02 12:17:16 -03:00
Masayuki Ishikawa
e33fc3dc89 Squashed commit of the following:
Author: Gregory Nutt <gnutt@nuttx.org>

    Run all .c and .h modified in PR through nxstyle.

Author: Masayuki Ishikawa <masayuki.ishikawa@gmail.com>

    feature k210 (#16)

    * arch: risc-v: Add support for __LP64__ to types.h
    * arch: risc-v: Add support for RV64GC to common files
    * arch: risc-v: Add support for Kendryte K210 processor (RV64GC)
    * boards: risk-v: Add support for Sipeed Maix Bit with K210
    * tools: Add support for Kendryte K210 processor
2019-12-31 09:06:20 -06:00
Adam Feuer
3c2fbe3d9c sama3 sam_serial.c USART selection fixes (#13)
arch/arm/src/sama5/sam_serial.c:  uart2port in sam_serial, fix the rest of the uarts in sam_serial
boards/arm/sama5/sama5d2-xult/README.txt:   Fix some minor typos
boards/arm/sama5/sama5d2-xult/include/board.h:  Update UART pin disambiguation with default UARTn_RXD, _TXD
2019-12-31 08:10:46 -06:00
Pieter du Preez
28c8e1444c Fixed STM32L4_NUSART for STM32L433XX. (#9)
STM32L4_NUSART was set to 4. The spec at
https://www.st.com/resource/en/datasheet/stm32l433cc.pdf states the
following on page 1:

   - 4x USARTs (ISO 7816, LIN, IrDA, modem)
   - 1x LPUART (Stop 2 wake-up)

However it on page 49, it states:

   The STM32L433xx devices have three embedded universal synchronous
   receiver transmitters (USART1, USART2 and USART3).

The latter is correct.

This patch sets STM32L4_NUSART to 3.
2019-12-31 07:47:06 -06:00
Pieter du Preez
1db6f929a2 arch/arm/src/stm32l4/Kconfig: Fixed conditional config for STM32L4_STM32L432XX and STM32L4_STM32L442XX archs. The wrong spelling of STM32L4_STM32L432XX and STM32L4_STM32L442XX, caused the following three peripherals to be available although they are not supported by these architectures: USART3, SPI2, and I2C1. These were available for selection in menuconfig and caused compiler errors when selected. This patch replaces the STM32L4_L432XX and STM32L4_L442XX items with STM32L4_STM32L432XX and STM32L4_STM32L442XX. 2019-12-24 15:51:28 -06:00
David Sidrane
eba8eec74b STM32F7 and STM32H7 SDMMC internal pull up usage fixed
Code was flawed in that the Pins are defined with the
    pullups in the definition. Since there are no alterntes pins
    there is no way to remove them. So not enabling the CONFIG
    pull up did nothing as did enabling them.

    Code also ignored the use of D0 for ready detection causing
    3X+ the chatter.

    This is now a compile time feature as there was no reason for
    it to be a run time. It wasted both flash and ram.
2019-12-24 10:52:09 -06:00
Xiang Xiao
87cf5c58ae Correct some problems with network timed events when there are multiple network devices in the configuration.
Squashed commit of the following:

Author: Gregory Nutt <gnutt@nuttx.org>

    Ran nxstyle against many of the affected files.  But this job was too big for today.  Many of the network drivers under arch are highly non-compiant and generate many, many faults from nxstyle.  Those will have to be visited again another day.

Author: Xiang Xiao <xiaoxiang@xiaomi.com>

    This effects all network drivers as well as timing related portions of net/: devif_poll_tcp_timer shouldn't be skipped in the multiple card case.  devif_timer will be called multiple time in one period if the multiple card exist, the elapsed time calculated for the first callback is right, but the flowing callback in the same period is wrong(very short) because the global variable g_polltimer is used in the calculation.  So let's pass the delay time to devif_timer and remove g_polltimer.
2019-12-24 10:37:30 -06:00
David Sidrane
9b7afcdfe5 imxrt106x:pinout add ALT 8 GPIO_GPT2_COMPARE3 & fix GPIO_GPT1_CAPTURE[1|2] 2019-12-21 02:54:50 -08:00
David Sidrane
3dcd238d5e imxrt:lpi2c Fix interrupt storm on failed write.
The SDF was not acked if ther was an error
   on the last write.
2019-12-21 02:54:50 -08:00
David Sidrane
0050ba9ac7 imxrt:lpi2c ensure that on an error status reflects it.
After an error the STOP detect was overwriting the
   previous error status.
2019-12-21 02:54:50 -08:00
David Sidrane
9ebeaa1d53 imxrt:lpi2c imxrt_lpi2c_reset uses GPIO with SION
Reworked imxrt_lpi2c_reset to use GPIO because the IO
   can not be mapped from a peripheral to a GPIO with
   simple bit logic.
2019-12-21 02:54:50 -08:00
David Sidrane
f297e41219 imxrt:gpio Support readback on OUT GPIO
imxrt:gpio ran through nxstyle
2019-12-21 02:54:44 -08:00
Guillherme Amaral
eeed40aa0c arch/arm/src/stm32f0l0g0/ and boards/arm/stm32f0l0g0/nucleo-g070rb/include/board.h: Add I2C pinmap. In Kconfig select I2C2 for this part. Update I2C pin definitions in board.h. 2019-12-20 13:02:13 -06:00
Masayuki Ishikawa
15f28896a0 Merged in masayuki2009/nuttx.nuttx/fix_fe310_signal (pull request #1099)
Fix fe310 signal handling

* arch: fe310: Disable all interrupts in mie at __start

* arch: fe310: Fix up_irq_enable() to set external interrupt only

* arch: fe310: Fix up_schedule_sigaction() to save REG_INT_CTX

* boards: hifive1-revb: Adjust stack size to reduce runtime memory

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-12-20 13:23:42 +00:00
raiden00pl
d80d6b8774 Merged in raiden00/nuttx_nrf52 (pull request #1098)
nrf52 updates

arch/arm/nrf52: add more options to Kconfig

arch/arm/nrf52: cosmetics changes to some files

arch/arm/nrf52: nfct, radio, twi, spi registers definitions

arch/arm/nrf52: fix warnings in nrf52_gpio.c

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-12-19 15:40:56 +00:00
Masayuki Ishikawa
466ab56c10 Merged in masayuki2009/nuttx.nuttx/fe310_gpio (pull request #1097)
fe310 gpio

* arch: risc-v: Add arch/risc-v/src/common/up_mdelay.c

* arch: risc-v: Add arch/risc-v/src/common/up_udelay.c

* arch: fe310: Add #include <stdint.h> to fe310_start.c

* arch: risc-v: Add up_ack_irq() definition to commpn/up_internal.h

* arch: fe310: Add FE310 GPIO driver

* boards: hifive-revb: Add compiler optimization

* boards: hifive1-revb: Add auto leds related files.

* arch: fe310: Add CPU activity led to fe310_idle.c

* boards: hifive-revb: Add a button

    NOTE: still having a trouble in signal handling.

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-12-19 04:59:30 +00:00
Gregory Nutt
e7c9c89985 Trivial updates to files modified in last PR based on results of tools/nxstyle. 2019-12-16 13:13:04 -06:00
raiden00pl
a0429bcb20 Merged in raiden00/nuttx_nrf52 (pull request #1096)
nrf52 updates

board/arm/nrf52/nrf52832-dk: use the on-board virtual COM pins as default UART0 configuration

board/arm/nrf52: initial support for the nrf52840-dk board

board/arm/nrf52: initial support for the nrf52840-dk dongle board

arch/arm/src/nrf52: add support for port 1 GPIO

arch/arm/src/nrf52: initial support for UART1

arch/arm/src/nrf52: add UICR definitions

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-12-16 18:35:45 +00:00
Valmantas Palikša
bc7566a83f arch/arm/include/armv7-m/syscall.h: ARM EABI specifies that the stack should be aligned by 8 on function calls, inside the function is not required to be aligned by 8. Since these functions call svc, compiler doesn't know that the svc is a function, therefore it does not do any stack management. This change pushes an even number of args to the stack and maintains an 8 byte alignment. I've checked the assembly and it doesn't cause any more overhead that the hand written assembly. 2019-12-16 09:10:08 -06:00
Xiang Xiao
68b0ba88af arch/sim/src/sim/up_framebuffer.c: Replace all _info/_err with ginfo/gerr. 2019-12-16 09:03:05 -06:00
Xiang Xiao
3a5e2b7ce7 arch/sim/src/: Simulator restore the console even error handler call host exit directly. 2019-12-16 09:01:25 -06:00
Xiang Xiao
6c362c8521 arch/sim/src/sim/: Remove unnecessary initialization log from simulator initialization. 2019-12-16 08:59:28 -06:00
Gregory Nutt
6bff1f4df4 arch/arm/include/samd2l2/sam_adc.h: I was wrong... this header file does belong in the samd2l2 include directory. It contains IOCTL definitions that are needed by applications. Usage of a chip-specific header file is, however, not really a good portable design because it requires that the application know that it is running on a specific chip. But still, if we are going to do that, the include directory is where the header file belongs. My apologies for the bad judgement. 2019-12-16 03:53:05 -06:00
Alan Carvalho de Assis
787128930f arch/arm/src/samd2l2 and boards/arm/samd2l2/arduino-m0: Add support to SAMD2L ADC driver and board support to Arduino M0. 2019-12-15 17:36:59 -06:00
Petro Karashchenko
871197b4ec arch/arm/src/am335x/ and boards/arm/am335x/beaglebone-black/: Initial CAN support for the BBB. 2019-12-15 17:12:54 -06:00
Petro Karashchenko
ca4e6077e2 arch/arm/src/am335x/am335x_i2c.c: Improvements to AM335x I2C. 2019-12-15 17:02:59 -06:00
Gregory Nutt
a4a23ef584 arch/sim/src/sim/up_hostfs.c, fs/hostfs/hostfs_rpmsg.c, include/nuttx/fs/hostfs.h: Sync nuttx_stat_s consistent with standard struct. Standard struct stat layout changed with commit ea577f1ddd31b3f67405cbb2a57806c47dd4dd63. 2019-12-13 08:35:00 -06:00
David Sidrane
2cbcb8fd00 arch/arm/src/imxrt/imxrt_clockconfig.c and board.h: Allow clock setting for SPI and I2C from board.h. 2019-12-12 08:33:05 -06:00
David Sidrane
42dfd18d7c arch/arm/src/imxrt/imxrt_lpspi.c: Fixed race on register setting. The ouput frequency was not being initialized correctly. The value of LPSPI_TCR_PRESCALE was getting set to 7. Making the setting atomic fixed the race. I suppose a DSB() could have also fixed it. 2019-12-12 08:31:24 -06:00
David Sidrane
587dcaa6e6 arch/arm/src/imxrt/imxrt_lpspi.c: Remove hack setting LPSPI1 daisy irrespective of pin config. I assume this hack pre dated the addition of the dasiy chain setting. It was forcing LPSPI1 pins to read from selection 1 irrespective of pin config. The correct input selection is done in imxrt_config_gpio. 2019-12-12 08:29:08 -06:00
David Sidrane
3d4eb32e48 arch/arm/src/imxrt/imxrt_lpi2c.c: Added configurations to fine tune LPI2C Timeouts. 2019-12-12 08:27:02 -06:00
Nathan Hartman
9655730ef8 Fix various typos and spelling errors. 2019-12-12 07:41:51 -06:00
Petro Karashchenko
3737aa83fa arch/arm/src/am335x/am335x_i2c.c: AM225x I2C driver now works in both polling and interrupt modes. 2019-12-12 07:39:36 -06:00
Juha Niskanen
c8268cbfcf Merged in juniskane/nuttx-4/Juha-Niskanen/remove-reference-to-nonexistent-config-m-1575888266268 (pull request #1093)
Remove reference to nonexistent config macro. stm32l4_spi.h edited online with Bitbucket

stm32l4_spi.h edited online with Bitbucket

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-12-11 12:06:03 +00:00
Juha Niskanen
50768ac7a6 Merged in juniskane/nuttx-3/Juha-Niskanen/kconfig-edited-online-with-bitbucket-1575887906303 (pull request #1092)
Kconfig edited online with Bitbucket

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-12-11 12:04:20 +00:00
Masayuki Ishikawa
0eb9bfa49d Merged in masayuki2009/nuttx.nuttx/fe310_with_pll (pull request #1094)
fe310 with pll

* arch: fe310: Introduce CONFIG_ARCH_CHIP_FE310_QEMU

* boards: hifive1-revb: Introduce CONFIG_ARCH_CHIP_FE310_QEMU

* arch: fe310: Add support for PLL

* boards: hifive1-revb: Increase uart0 tx buff size and add getprime app

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-12-11 12:01:53 +00:00
Petro Karashchenko
813902cf87 arch/arm/src/am335x and boards/arm/am335x/beaglebone-black: Add I2C support for AM335X. 2019-12-10 20:22:25 -06:00
Gregory Nutt
425b1c737c Fix a problem I introduced in my recent review. 2019-12-10 18:04:56 -06:00
David Sidrane
2e71e0632f arch/arm/src/imxrt/imxrt_usdhc.c: IMXRT106x USDHC: Support regular GPIO for CD and inversion. 2019-12-10 17:58:08 -06:00
Petro Karashchenko
2f00eefa5d arch/arm/src/am335x: Adds AM335x Clock Configuration. 2019-12-10 17:55:08 -06:00
Ouss4
7dcf8dde7c arch/xtensa/src/esp32/esp32_start.c: A comma was missing in g_idlestack attributes. 2019-12-10 13:42:58 -06:00
Ouss4
47129b36bd arch/mips/*: Run nxstyle on the arch/mips directory. 2019-12-08 08:09:11 -06:00
Masayuki Ishikawa
2cde7dcc8d Merged in masayuki2009/nuttx.nuttx/sparkfun_redv (pull request #1091)
Sparkfun RED-V Things Plus

* board: hifive1-revb: Update README-qemu.txt

* arch: fe310: Works with SparkFun RED-V Things Plus

    Should work with HiFive1 Rev.B but not tested yet.

* boards: hifive1-revb: Works with SparkFun RED-V Things Plus

    Should work with HiFive1 Rev.B but not tested yet.

Approved-by: Alan Carvalho de Assis <acassis@gmail.com>
Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-12-08 12:42:48 +00:00
Gregory Nutt
cb288fdfe2 arch/arm/src/stm32f7/stm32_serial.c: Fix a new warning found in build testing. 2019-12-07 13:14:50 -06:00
David Sidrane
db6fe28fa6 Merged in david_s5/nuttx/master_imxrt_cap (pull request #1089)
imxrt106x:pinout add ALT 8 GPIO_GPT1_CAPTURE[1|2]

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-12-05 22:32:43 +00:00
David Sidrane
1c05846f92 Merged in david_s5/nuttx-5/David-Sidrane/archarmsrcstm32f7stm32_serialc-fix-typo-1575381167793 (pull request #1087)
arch/arm/src/stm32f7/stm32_serial.c:  Fix typo in UART7

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-12-03 14:25:08 +00:00
David Sidrane
92a3a8e026 arch/arm/src/stm32f7/stm32_serial.c: Serial nxsyle fixes (sans long table lines). 2019-12-03 07:23:14 -06:00
David Sidrane
baeaf54c6c arch/arm/src/stm32f7/stm32_serial.c: Add Tx U[S]ART DMA. 2019-12-03 07:21:58 -06:00
David Sidrane
d3e0d5ee72 arch/arm/src/stm32f7/stm32_serial.c: CONFIG_USART_DMAPRIO->CONFIG_USART_RXDMAPRIO. 2019-12-03 07:18:42 -06:00
David Sidrane
b095ab392c arch/arm/src/stm32/stm32_serial.c: SERIAL_HAVE_DMA->SERIAL_HAVE_RXDMA. 2019-12-03 07:15:59 -06:00
David Sidrane
fe12b843d0 arch/arm/src/stm32/stm32_hciuart.c: CONFIG_STM32_HCIUART_DMAPRIO->CONFIG_STM32_HCIUART_RXDMAPRIO. 2019-12-03 07:14:30 -06:00
David Sidrane
bbdc6875de arch/arm/src/stm32l4/stm32l4_serial.c: SERIAL_HAVE_DMA->SERIAL_HAVE_RXDMA. 2019-12-03 07:11:54 -06:00
Gregory Nutt
f4102b7d6e arch/arm/src/stm32f0l0g0/stm32_serial_v1.c: SERIAL_HAVE_DMA->SERIAL_HAVE_RXDMA. 2019-12-03 07:10:26 -06:00
David Sidrane
64d956e7a1 arch/arm/src/stm32l4/stm32l4_serial.c: CONFIG_USART_DMAPRIO->CONFIG_USART_RXDMAPRIO. 2019-12-03 07:08:56 -06:00
David Sidrane
e35325e385 arch/arm/src/stm32f0l0g0/stm32_serial_v1.c: CONFIG_USART_DMAPRIO->CONFIG_USART_RXDMAPRIO 2019-12-03 07:07:49 -06:00
Guillherme Amaral
15f358d6a9 arch/arm/src/stm32f0l0g0: Fix PWM on TIM16 not working: Adjust TIM registers, Add pins available for mapping TIM14-17, CCMR2 registers was being handled for TIMs who do not have it, and Fix PWM frequency being doubled when in center-aligned mode. 2019-12-02 09:14:56 -06:00
Masayuki Ishikawa
f46e5d58d0 Merged in masayuki2009/nuttx.nuttx/fe310_updates (pull request #1085)
fe310 updates

* arch: fe310: Rename CLIC to CLINT

* boards: hifive1-revb: Add README.txt

* arch: fe310: Use atomic operations in up_irq_save() and up_irq_enable()

* arch: fe310: Remove unused configs in Kconfig

* boards: hifive1-revb: Change UART0 buff size and remove debug features.

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-12-02 14:45:41 +00:00