Commit Graph

328 Commits

Author SHA1 Message Date
Xiang Xiao 5c80b94820 Replace #include <semaphore.h> to #include <nuttx/semaphore.h>
Since the kernel side should call nxsem_xxx instead and remove the unused inclusion
2020-02-01 08:27:30 -06:00
Xiang Xiao 80277d1630
Refine the preprocessor conditional guard style (#190) 2020-01-31 19:07:39 +01:00
Xiang Xiao 68951e8d72 Remove exra whitespace from files (#189)
* Remove multiple newlines at the end of files
* Remove the whitespace from the end of lines
2020-01-31 09:24:49 -06:00
Masayuki Ishikawa 5a24d499cf boards: spresense: Add posix_spawn configuration
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-01-30 09:22:21 +01:00
Nathan Hartman 6c4b672a08 boards/sim/sim/sim/README.txt: Improve and rewrap text.
Fix some typos and grammar. Rewrap the text to 80 columns for
consistency with the rest of the file.
2020-01-29 11:27:09 -06:00
YAMAMOTO Takashi b2b84cb010 sim: Update documentation for macOS 2020-01-29 09:03:48 +01:00
YAMAMOTO Takashi b879b9b908 sim: Fix ostest build on macOS
On some platforms like macOS, we can't create an empty archive.
2020-01-29 09:03:48 +01:00
YAMAMOTO Takashi b1678d0e26 sim: Remove -g from LDFLAGS/LDLINKFLAGS
My copy of GNU ld documentation is saying that -g is ignored.
macOS's ld doesn't know the option and bails out.

	% ld -g
	ld: unknown option: -g
	%
2020-01-29 09:03:48 +01:00
YAMAMOTO Takashi 5c6cca8633 sim: Fix typos in README.txt 2020-01-29 09:03:48 +01:00
YAMAMOTO Takashi aa8aadf18e Use "uname -s" where "uname -o" is not available
Namely this changes HOSTOS for macOS from "Other" to "Darwin".

Also, suppress the following harmless messages during a "make":
(Missing redirect in tools/Makefile.host)

	uname: illegal option -- o
	usage: uname [-amnprsv]
2020-01-29 09:03:48 +01:00
YAMAMOTO Takashi 83354983c3 Fix "with with" typos
In many cases, remove one of them.
In a few places, it looks like a typo of "width" actually.
2020-01-27 08:46:46 +01:00
patacongo 36185d8366 boards/arm/lpc17xx_40xx/lx_cpu/configs/nsh: Fix build test error (#161)
Add CONFIG_MMCSD_SDIO=y to configuration.  This eliminates the following error found in build testing: lpc17_40_bringup.c: undefined reference to mmcsd_initialize
2020-01-24 16:51:32 +01:00
liuhaitao 758934e53d boards/x86: Fix qemu build break (#158)
* qemu-i486: Enable 32-bit system with a 64-bit machine config

Change-Id: If2e7dd6f51b5732bcdfae2ac9784f58fab1f4abf
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>

* qemu-i486/nsh: Add board_app_initialize stub to fix boardctl build break

Add board_app_initialize stub in qemu_appinit.c to fix boardctl undefined reference
to board_app_initialize.

Change-Id: I75318ae7ab152f018ce3682db417d1f0fb1a1652
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-01-24 11:16:26 +00:00
Alan Carvalho de Assis 05a346214c Disable MKRD RAMDISK support to save 1KB of memory 2020-01-23 16:46:36 -06:00
Gregory Nutt 50c3f9ce58 boards/arm/c5471/c5471evm/configs/nsh/defconfig: Fix build breakage
This change backs out a portion of ac4735cf58 and corrects the dependencies on CONFIG_NETUTILS_TELNETD.  Without this change, the configuration will not build.  It will fail with:

nsh.h:154:4: error: #error "No NSH frtont end defined."
2020-01-23 18:31:53 -03:00
Gregory Nutt 211c6dcaa7 Remove unused configuration option CONFIG_RAMDISK 2020-01-23 17:42:56 -03:00
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
Xiang Xiao 540e947c0c Run ./tools/refresh.sh --silent all 2020-01-22 20:47:18 -06:00
Xiang Xiao 7d33af1360 Change boards/z16/z16f2811 to boards/z16/z16f
to fix the follow error:
Refresh z16f2800100zcog/nsh
LN: include/arch to arch/z16/include
LN: include/arch/board to /workspace/mirtos/nuttx/boards/z16/z16/z16f2800100zcog/include
No directory at /workspace/mirtos/nuttx/boards/z16/z16/z16f2800100zcog/include
2020-01-22 20:46:02 -06:00
Xiang Xiao 12cc24abb2 Change boards/renesas/sh7032 to boards/renesas/sh1
to fix the follow error:
Refresh us7032evb1:nsh
LN: include/arch to arch/renesas/include
LN: include/arch/board to /workspace/mirtos/nuttx/boards/renesas//us7032evb1/include
No directory at /workspace/mirtos/nuttx/boards/renesas//us7032evb1/include
2020-01-22 20:45:11 -06:00
Xiang Xiao 9a8ff07716 Change boards/renesas/m32262f8 to boards/hc/m16c
to fix the follow error:
Refresh skp16c26/ostest
LN: include/arch/board to /workspace/mirtos/nuttx/boards/renesas/m32262f8/skp16c26/include
LN: include/arch/chip to arch/renesas/include/m32262f8
2020-01-22 20:44:18 -06:00
Xiang Xiao 3db775f0d0 Change boards/hc/mcs92s12ne64 to boards/hc/m9s12
fix the follow error:
Refresh demo9s12ne64/ostest
LN: include/arch/board to /workspace/mirtos/nuttx/boards/hc/mcs92s12ne64/demo9s12ne64/include
LN: include/arch/chip to arch/hc/include/mcs92s12ne64
No directory at /workspace/mirtos/nuttx/arch/hc/include/mcs92s12ne64
2020-01-22 20:43:26 -06:00
liuhaitao ac1b59fb01 clicker2-stm32/mrf24j40-mac: enable SCHED_LPWORK config to fix build break
Author: liuhaitao <liuhaitao@xiaomi.com>

    clicker2-stm32/mrf24j40-mac: enable SCHED_LPWORK config to fix build break

    ieee802154/mac802154_internal.h:75:4: error: #error Both Low and High priority work queues are required for this driver
       75 | #  error Both Low and High priority work queues are required for this driver
          |    ^~~~~
    ERROR: arm-none-eabi-gcc failed: 1

    nucleo-f303re/nxlines: enable NXSTART_EXTERNINIT config to fix build break

    arm-none-eabi-ld: /var/lib/jenkins/workspace/NuttX-Nightly-Build/nuttx/staging/libgraphics.a(nxmu_start.o): in function `nx_server':
    nxmu_start.c:(.text+0x2): undefined reference to `board_lcd_initialize'
    arm-none-eabi-ld: nxmu_start.c:(.text+0xc): undefined reference to `board_lcd_getdev'
    make[1]: *** [nuttx] Error 1

    Disable cxx new long to fix build break for some sam34 boards configs

    Build fail log as below:
    CXX:  libxx_new.cxx
    libxx_new.cxx:66:7: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter [-fpermissive]
       66 | void *operator new(unsigned long nbytes)
          |       ^~~~~~~~
    Makefile:102: recipe for target 'libxx_new.o' failed

    Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-01-22 12:54:33 -03: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
patacongo d126ddeeed Kconfig: Mark Windows Native build as EXPERIMENTAL (#144)
Kconfig:  the CONFIG_WINDOWS_NATIVE options now depends on CONFIG_EXPERIMENTAL.  The Windows native build is complete and available, but not often used or verified.  As a consequence, it cannot be assured to be fully functional at any given time.  Hence, it is marked here as EXPERIMENTAL so that the end user will be aware of this state.

boards/arm/stm32/stm32f4discovery/configs/winbuild/defconfig:  Add CONFIG_EXPERIMENTAL to the windbuild configuration.  It is now necessary for this configuratino to be a viable test configuration.

Co-authored-by: Gregory Nutt <gnutt@nuttx.org>
2020-01-22 16:22:59 +01:00
Xiang Xiao 389e8828df sim/x64: Enable cxx new long (#139)
CXX error:
libxx_new.cxx:68:39: error: operator new takes type size_t
(long unsigned int) as first parameter [-fpermissive]
 void *operator new(unsigned int nbytes)

Change-Id: Id7aa74d1df5536f0d2cd1437ee55fc059590bdca
Signed-off-by: chao.an <anchao@xiaomi.com>

Co-authored-by: archer <758493+anchao@users.noreply.github.com>
2020-01-21 15:26:24 +01:00
liuguo09 14a2db7ffa boards/mips/pic32mx: Add pinguino-debug.ld for PIC32MX boards (#138)
Add pinguino-debug.ld for PIC32MX boards to fix build break under
PINGUINO gcc toolchain. All pinguino-debug.ld copy from the original
mips debug/release ld scripts.

Change-Id: Ie47a2523470cc9996d007bc4afbf9cb40e51ae5b
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-01-21 12:48:25 +01:00
Yoshinori Sugino 5ce9b01b54 boards: Remove unnecessary section descriptions from linker scripts of RISC-V boards (#124)
* boards/risc-v: Remove unnecessary section descriptions from ld-qemu.script
These section descriptions are for ARM and not needed for RISC-V.
2020-01-18 13:03:04 +01: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
WaterBirdWayOrigin d360205d07 boards/arm/cxd56xx/spresense/configs/rndis/defconfig: Set CONFIG_NET_ETH_PKTSIZE to 1514 (#110) 2020-01-16 20:59:42 +01:00
Nathan Hartman d1dd2841c5 Fix typos in comments and README.txt.
No functional changes.
2020-01-15 10:09:34 -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
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
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
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
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
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 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
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
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
Yusuke Mitsuki a007932d6b Add clang support to stm32f4discovery board
Signed-off-by: Yusuke Mitsuki <ym.sp9@connectfree.co.jp>
2020-01-09 07:31:35 -03:00
Gregory Nutt 9803ce9408 boards/arm/cxd56xx/drivers/audio/cxd56_audio_bca_reg.c: Fails to compile
This function fails to compile due to numerous undeclared register definitions used in cxd56_audio_bca_reg.c.  This commit replaces the undefined definitions with very similar definitions recommended by GCC (differing only in some spelling).

However, I cannot be certain that this is correct.  This must be reviewed, corrected, and verified by Alin Jerpelea.  Please do not merge until Alin approves.

The configuration that demonstrates the failure is spresense:audio.
2020-01-09 07:22:55 -03:00
Gregory Nutt edfcbc0840 boards/arm/cxd56xx/drivers/audio: Missing commas in in enumeration. Fix compilation error found in build testing due to missing commas in an enumeration type. Correct ordering of definitions and section block comments to follow coding standard. 2020-01-08 14:54:10 -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
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