Commit Graph

36103 Commits

Author SHA1 Message Date
Xiang Xiao
bc8edaf6c2 tools/: Remove the hardcode arch/chip list from all tool scripts 2020-01-16 11:11:24 -06: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
raiden00pl
e23d58e86d drivers/sensors/lsm303agr: fix compilation warnings and run through nxstyle; drivers/sensors/lsm6dsl: run through nxstyle 2020-01-16 12:27:18 -03:00
Gregory Nutt
177c037aa9 tools/configure.c: Add missing k210 support.
Fix a minor but necessary addition to configure.c for the K210 port that was missed in commit e33fc3dc89
2020-01-16 06:38:59 -03:00
patacongo
0e77e3373e tools/nxstyle.c: Correct false alarm detection (#106)
Commit cf5d17f795 added logic to detect #define pre-processor definitions outside of the "Pre-processor Definitions" file section.  That commit was verified against numerous .c source files.  But not against any .h header files.

When run against a header file, that change causes a false alarm warning like:

  file:line:pos: warning: #define outside of 'Pre-processor Definitions' section

That is caused the idempotence, guard definition that must appear in the header file BEFORE the first file section.

This commit adds logic to nxstyle to ignore pre-processor definitions in header files that occur before the first file section is encountered.
2020-01-15 20:22:37 +00: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
raiden00pl
02f619a8be sched/signal/sig_default.c: fix compilation error when CONFIG_SIG_SIGPIPE_ACTION undefined 2020-01-15 08:04:37 -06:00
Masayuki Ishikawa
ab99842bd6 ReleaseNotes: Fix the latest version number info
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-01-15 07:08:16 -06:00
Alin Jerpelea
48ef005410
Merge pull request #103 from masayuki2009/update_readme_for_spresense
boards: spresense: Update README.txt regarding SMP
2020-01-15 09:20:37 +01:00
Masayuki Ishikawa
097986143c boards: spresense: Update README.txt regarding SMP
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-01-15 17:08:09 +09: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
21ea255ea4 net/devif/devif_poll.c: Correct a new warning found in build testing. devif/devif_poll.c:768:7: warning: unused variable 'hsec' [-Wunused-variable] (#97) 2020-01-14 03:11:43 +01: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
Xiang Xiao
f8bcd58be2 Fix format warn (#96)
* fix warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'long unsigned int'
* fix warning: implicit declaration of function 'up_init_exidx'
2020-01-13 16:41:09 -06:00
Ouss4
84153ad1a5 arch/mips/src/pic32mz/pic32mz-timer.c: Eliminate a warning found during
testing.
2020-01-13 16:39:54 -06:00
patacongo
e507ca4696 imxrt1050-evk/include/board.h: Add missing definitions. Recent i.MXRT changes added the definition IMXRT_USB1_PLL_DIV_SELECT to the imxrt1020-evk and imxrt1060-evk board.h header files but NOT to the imxrt10%0-evk. As a result EVERY i.MXR 1050 board configuration with USB enabled failed to compile during build testing. Another day without a successfull build test 8( (#93) 2020-01-13 21:34:17 +01:00
patacongo
3a3539f2be net/: Fix some new problems found by the current nxstyle with .c files in the net/ directory. (#92) 2020-01-13 21:26:04 +01:00
Daniel P. Carvalho
bd0fe25418 Fix small typo error. (#91) 2020-01-13 18:39:56 +01:00
Gregory Nutt
cf5d17f795 tools/nxstyle: Added logic to parse section headers (#90)
* tools/nxstyle:  Added logic to parse section headers (like Included files, Pre-processor Definitions, etc.) and to assure that the section headers are correct for the file type.  Also (1) verify that #include appears only in the 'Included Files' section and that (2) #define only occurs in the Pre-processor definition section.

    Right now, there are several places where that rule is not followed.  I think most of these are acceptable so these failures only generate warnings, not errors.  The warning means that we need to go look at the offending #define or #include and decide if it is a acceptable usage or not.
2020-01-13 18:08:45 +00:00
patacongo
51cbc85535 net/: Run current nxstyle against all .c files under net/. Correct new problems identified by nxstyle. This is primarily a verification of the nxstyle changes (which all look good). (#89)
Co-authored-by: Gregory Nutt <gnutt@nuttx.org>
2020-01-12 21:17:29 +01:00
Xiang Xiao
cd544b81b3 checkpatch remove -m 86 option since nxstyle can determine the max line length smart now
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-01-12 12:54:13 -06:00
Gregory Nutt
beae24c8c0 tools/nxstyle.c: Correct indexing error noted by Xaio Xaing in commit comments. 2020-01-12 14:52:48 -03:00
Alan Carvalho de Assis
29f480f57f boards/arm/stm32/stm32f4discovery/: Add board support to external LoRa NiceRF module 2020-01-12 10:59:30 -06:00
Gregory Nutt
6309165fe0 tools/nxstyle.c: Add automatic detection of line width based on examining
the width of all block comments. Includes a check to assure that all block
comments use the same line width.

Verified against all .c files under /sched.  There were a few cosmetic changes to the coding style under /sched to account to new, correctly detected problems in the /sched files.
2020-01-12 13:07:54 -03:00
Gregory Nutt
bb5ad4df23 net/tcp/tcp_getsockopt.c: Fix compilation failure found in build testing. Error: invalia application of 'sizeof' to incomplete type 'struct timeval'. Fixed by including sys/time.h. Same problem and same fix as for setsockopt earlier." 2020-01-11 17:20:02 -03:00
Gregory Nutt
3374772580 net/tcp/tcp_setsockopt.c: Fix compilation failure found in build testing. Error: invalia application of 'sizeof' to incomplete type 'struct timeval'. Fixed by including sys/time.h. 2020-01-11 16:29:25 -03:00
Gregory Nutt
45a83e9481 net/tcp/tcp_send_unbuffered.c: Correct a bad signal number
There is no errno ETIMEOUT.  Probably should be ETIMEDOUT.
2020-01-11 15:36:51 -03:00
Gregory Nutt
dd5748cee8 binfmt/: Update copyright dates in all modified files. 2020-01-11 13:44:58 -03:00
Gregory Nutt
7a72d1e8ca binfmt/: Run all .c files under binfmt/ through tools/nxstyle and fix all resulting complaints. 2020-01-11 13:44:58 -03:00
Gregory Nutt
98f431d8d8 net/: Run all .c files under net/ through tools/nxstyle and fix all resulting complaints. 2020-01-11 13:41:33 -03:00
chao.an
bb09471d63 inet_close: ensure the TCP_CLOSE can be delivered normally
Change-Id: I657433806d5dc851ce9bd7722f191f467f9ad458
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-01-11 08:24:49 -06:00
Xiang Xiao
5c5c08efcd network: simplify the timeout process logic
1.Consolidate absolute to relative timeout conversion into one place(_net_timedwait)
2.Drive the wait timeout logic by net_timedwait instead of devif_timer
This patch help us remove devif_timer(period tick) to save the power in the future.

Change-Id: I534748a5d767ca6da8a7843c3c2f993ed9ea77d4
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-01-11 08:24:49 -06:00
Xiang Xiao
346336bb9e Make the read ahead buffer unselectable
Here is the email loop talk about why it is better to remove the option:
https://groups.google.com/forum/#!topic/nuttx/AaNkS7oU6R0

Change-Id: Ib66c037752149ad4b2787ef447f966c77aa12aad
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-01-11 08:24:49 -06: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
chao.an
97bead5496 net: complement wireless handling as ethernet
Change-Id: I13cc4cbfc1e305e17c0630f11a1173afe96e8a03
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-01-11 08:04:18 -03:00
Pieter du Preez
70fbc14103 Removed stray references to MPL115A in stm32_bmp180.c files.
The references to MPL115A inside the stm32_bmp180.c files were
probably copy-paste errors. This commit removes them.
2020-01-10 20:04:21 -03:00
Masayuki Ishikawa
784408e617 drivers: serial: Fix a wrong variable in serial.c in SMP mode. 2020-01-10 09:38:51 -06:00
Alin Jerpelea
275f4baf9f Fix USB issues
Author: Alan Carvalho de Assis <acassis@gmail.com>

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

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

    drivers: usbdev: minor fix

    drivers: usbdev: usbmsc full speed not available

      Change transfer size to be based on maxpacket size.

    drivers: usbdev: Fix string ID calculation

      For *_STRBASE defines, it already unnecessary because composite device setup
      has been changed, it would be calculated by *_composite.c in board sources.

    drivers: usbdev: Fix invalid/unsupported command processing

      Mass Storage Class shall stall when invalid or unsupported commands
      has been recieved.

    drivers: usbdev: Remove unnecessary reset logic

    drivers: usbdev: Flags comparison fix

    drivers: usbdev: Descriptor type mismatch fix when dual speed is enabled
2020-01-10 12:09:05 -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
Brennan Ashton
794020309b Add .asf.yaml to enable GitHub features for issues and projects
Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
2020-01-09 22:15:15 -08: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
Xiang Xiao
51eaed8765 Fix the incorrect return value handling in bt_hcicore.c/hc_sr04.c
Report by juniskane

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-01-09 15:37:44 -03:00
Xiang Xiao
fbad85000f Fix the incorrect return value handling in bt_hcicore.c/hc_sr04.c introduced by 6a3c2ade
Report by juniskane

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-01-09 15:30:01 -03:00
Daniel P. Carvalho
679b11b03f boards/arm/stm32l4/nucleo-l432kc/src/stm32_pwm.c: Fix stm32_pwm.c build error, 'OK' undeclared. 2020-01-09 11:20:32 -06:00
Juha Niskanen
260af07717 net/usrsock/usrsock_dev.c: Fix uninitialized return value introduced in 6a3c2ade. 2020-01-09 07:31:40 -06:00
Alin Jerpelea
ecfdd6e056 smartfs improvements #66
Author: Alan Carvalho de Assis <acassis@gmail.com>

    Run nxstyle on all .c and .h and fix all issues

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

    drivers: mtd: smart: Add smartfs fsck feature

    Support fsck to check and repair the smartfs file system. If the power
    loss occurs during writing into the flash, the dead space are created
    in flash after the next power cycle. To avoid this problem, introduce
    fsck and keep the consistency of file system in initializing smartfs.

    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>

commit 60927c5fb6a353994341601f55071c618e97682b
Author: Alin Jerpelea <alin.jerpelea@sony.com>
Date:   Thu Dec 28 18:27:21 2017 +0900

    drivers: mtd: smart: Fix duplicate sector selection in SmartFS

    Add care for 16-bit sequence without CRC.

    drivers: mtd: smart: Check CRC of duplicate sectors

    In the illegal case by power-loss, when the multiple logical sectors are
    duplicated, we compare the sequence number of each sector and select the newer
    sector. Just in case, add CRC check for the newer sector. If the newer sector
    has CRC error, then we use the older sector.

    drivers: mtd: smart: SPI-Flash recovery from the initial error state

    The FLASH may be not erased in the initial delivery state.
    Just in case for the recovery of this fatal situation,
    after once erasing the sector, return the sector as a free sector.

    drivers: mtd: smart: Fix error handling in smartfs mtd driver

    Add error handling in relocate sector.

    drivers: mtd: smart: Fix initialize sector sequence value in smartfs

    Fix initialization of sequence value into sector header and also avoid
    unaligned memory access when CONFIG_MTD_SMART_ENABLE_CRC=n.

    drivers: mtd: smart: Fix handling of duplicate sector in smartfs

    In smartfs scan, if duplicate logical sector is found on the device,
    then smartfs selects the winner sector by comparing sequence number,
    and the loser sector is soon released. Fix a bug this loser sector
    is registered into logical-to-physical sector mapping table.
2020-01-09 10:14:39 -03:00