Commit Graph

279 Commits

Author SHA1 Message Date
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
Gregory Nutt
44dcda920d boards/arm/lpc43xx/bambino-200e/src/lpc43_appinit.c: Fix typo noted in last PR by João Matos. 2020-01-07 21:47:48 -03:00
Gregory Nutt
208463e7c5 boards/arm/lpc43xx/bambino-200e/src/lpc43_appinit.c: Eliminate a warning found in build testing.
Author: Alan Carvalho de Assis <acassis@gmail.com>

    Fix small typos and check against nxstyle

Author: Gregory Nutt <gnutt@nuttx.org>

    boards/arm/lpc43xx/bambino-200e/src/lpc43_appinit.c: Eliminate a warning found in build testing.

    The removal of (void) from all functions whose return value has been ignored has introduced several new warnings into the build test output.  For example in lpc3_appinit(), I now see this:

        #  define nsh_spifi_initialize() (OK)

    and

        nsh_spifi_initialize();

    which generaterd a new warning:  "warning: statement with no effect [-Wunused-value]".  This commit fixes that warning.
2020-01-07 19:40:44 -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
脚蹬破拖鞋
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
Xiang Xiao
91d483591d drivers/modem/altair/altmdm_sys.c: Fix modem/altair semaphore related compiler warning 2020-01-02 20:37:48 -06: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
Xiang Xiao
3187dde36c fix sim:bluetooth compiler error (#18)
wireless/bluetooth/bt_null.c:274:10: warning: implicit declaration of function 'bt_driver_register'; did you mean 'bt_netdev_register'? [-Wimplicit-function-declaration]

   return bt_driver_register(&g_bt_null);

sim_bringup.c:324:9: error: too few arguments to function 'bt_netdev_register'

   ret = bt_netdev_register();
2019-12-31 09:30:44 -06:00
Xiang Xiao
90c52e6f8f Squashed commit of the following:
Author: Gregory Nutt <gnutt@nuttx.org>

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

Author: Xiang Xiao <xiaoxiang@xiaomi.com>

    Net cleanup (#17)

    * Fix the semaphore usage issue found in tcp/udp

    1. The count semaphore need disable priority inheritance
    2. Loop again if net_lockedwait return -EINTR
    3. Call nxsem_trywait to avoid the race condition
    4. Call nxsem_post instead of sem_post

    * Put the work notifier into free list to avoid the heap fragment in the long run.  Since the allocation strategy is encapsulated internally, we can even refine the implementation later.

    * Network stack shouldn't allocate memory in the poll implementation to avoid the heap fragment in the long run, other modification include:

    1. Select MM_IOB automatically since ICMP[v6] socket can't work without the read ahead buffer
    2. Remove the net lock since xxx_callback_free already do the same thing
    3. TCP/UDP poll should work even the read ahead buffer isn't enabled at all

    * Add NET_ prefix for UDP_NOTIFIER and TCP_NOTIFIER option to align with other UDP/TCP option convention

    * Remove the unused _SF_[IDLE|ACCEPT|SEND|RECV|MASK] flags since there are code to set/clear these flags, but nobody check them.
2019-12-31 09:26:14 -06: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
79b9f526d3 Squashed commit of the following:
Author: Gregory Nutt <gnutt@nuttx.org>

    boards/arm/stm32l4/nucleo-l432kc/Kconfig:  Correct use of spaces instead of TABs in Kconfig file.

Author: Pieter du Preez <wingunder@users.noreply.github.com>

    Added Kconfig pin config chooser for nucleo-l432kc USARTs. (#11)

    The USART pins were hard-coded for the nucleo-l432kc. This patch makes
    these pins configurable via menuconfig.
2019-12-31 08:02:32 -06:00
Daniel Pereira Volpato
54d6a0768c boards/arm/stm32f0l0g0/: Fix issues noted by nxstyle. 2019-12-20 13:07:31 -06:00
Guillherme Amaral
b9638de388 boards/arm/stm32f0l0g0/nucleo-g070rb: Enable I2C. 2019-12-20 13:04:34 -06: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
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
Xiang Xiao
af5d0d3157 boards/sim/sim/sim/src/sim_bringup.c: Simulator shouldn't assume that graphics stack is enabled if both X11 framebuffer and touchscreen driver turn on. 2019-12-16 08:57:40 -06:00
chao.an
3c472dcf52 boards/sim/sim/sim/src/sim_bringup.c: Force format little fs before mount. 2019-12-16 08:55:35 -06:00
Gregory Nutt
541bfe9a5e Revert "boards/arm/am335x/beaglebone-black/src/am335x_bringup.c: CAN0 and CAN1 reversed in one place. Spotted by Alan Carvahlo de Assis."
Logic was correct as originally submitted.

This reverts commit 77eea3dd66.
2019-12-16 07:55:08 -06:00
Gregory Nutt
77eea3dd66 boards/arm/am335x/beaglebone-black/src/am335x_bringup.c: CAN0 and CAN1 reversed in one place. Spotted by Alan Carvahlo de Assis. 2019-12-15 17:51:46 -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
Minamiya Natsuki
0357115bf9 Merged in MinamiyaNatsuki/nuttx (pull request #1095)
Remove duplicate code from stm32_bringup.c

This code repeated two times by mistake.

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-12-15 12:21:28 +00:00
Alan Carvalho de Assis
3840889b11 boards/arm/stm32/stm32f103-minimum/: Add support to LCD1602 using PCF8574 Backpack board. 2019-12-13 12:10:17 -06:00
chao.an
0d2afbd5cb boards/sim/sim/sim/configs/loadable/defconfig: Update the mount() point of hostfs. 2019-12-13 08:30:34 -06:00
Xiang Xiao
80d4072bf4 boards/sim/sim/sim/src/sim_bringup.cTry to mount /dev/rammtd if CONFIG_FS_LITTLEFS is enabled. 2019-12-13 08:05:04 -06:00
Xiang Xiao
a6c0c88ac6 boards/sim/sim/sim/configs/: Run make olddefconfig for all simulator config 2019-12-12 11:19:46 -06:00
David Sidrane
eb2bcfc44f boards/arm/imxrt/imxrt1020-evk/include/board.h: Enable the GPIO based CD. 2019-12-12 08:34:58 -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
Nathan Hartman
9655730ef8 Fix various typos and spelling errors. 2019-12-12 07:41:51 -06: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
Ouss4
8ae156c8a1 boards/xtensa/esp32/esp32-core/README.txt: Update the toolchain installation help. 2019-12-10 13:44:28 -06:00
Gregory Nutt
897378bc29 Remove support for generation of RRLOAD binary files. The RRLOAD binary format was used with Linux BSPs from www.ridgerun.com circa 2000-2001. It is still need by the the c5471 board if that bootloader is used. Removes the CONFIG_RRLOAD_BINARY option and tools/mkimage.sh
This change was motivated by the presence of the mkimage.sh file under tools.  That is the tool that created the RRLOAD binary format.  That bash script has a GPL license and, hence, may not be included in an Apache-licensed project.
2019-12-09 11:29:12 -06:00
Gregory Nutt
b2035ebb1c boards/arm/imxrt/imxrt1020-evk/src/imxrt_autoleds.c: Must include imxrt1020-evk.h 2019-12-08 08:24:02 -06:00
Gregory Nutt
3e85a7e53d boards/arm/imxrt/imxrt10x0-evk/include/board.h and src/imxrt10x0-evk.h: Board internal GPIO definitions were erroneously moved to board.h in a previous comment. This restores them to where they belong in the private imxrt10x0-evk.h header file. 2019-12-08 08:02:31 -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
dd55d4d8d6 board.h edited online with Bitbucket
Fixes a stray chacter introduced in a previous commit.
2019-12-08 12:26:55 +00:00
Brennan Ashton
56c68c4db6 boards/arm/imxrt/imxrt1020-evk: Fix several errors relation to USBOTG: pin definitions in include/board.h and include path for imxrt_usbotg.h in src/imxrt_usbhost.c. 2019-12-07 21:45:39 -06:00
Gregory Nutt
2437e68d88 boards/arm/stm32/nucleo-f4x1re/src: board.h must always be the last header file included. 2019-12-07 10:17:22 -06:00
Gregory Nutt
703b8303fc boards/arm/stm32/nucleo-f4x1re/include/board.h: board.h header files must never include architecture-specific header files. 2019-12-07 09:43:59 -06:00
Gregory Nutt
9e4602a2f4 drivers/mtd: Apply tools/nxstyle to a few files. Lots more to check. 2019-12-07 08:25:16 -06:00
Xiang Xiao
febf226992 boards/sim/sim/sim/src/sim_bringup.c: Auto mount binfs to /bin if CONFIG_FS_BINFS. 2019-12-05 08:50:59 -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