Commit Graph

35019 Commits

Author SHA1 Message Date
Gregory Nutt
7735a9c602 configs/sim/include/README.txt: Update a README file. 2019-08-03 10:44:48 -06:00
Gregory Nutt
2ad2c18f43 configs/sim/include/etc.tar.gz, nsh_romfsimg.h: Improve the format of the /etc/passwd format. It is now a little similar to other systems. Add an /etc/group file to support future testing. 2019-08-03 10:35:24 -06:00
Gregory Nutt
2fcff93d20 libs/libc/grp/lib_grp.c: Fix a warning when compiling on a 64-bit simulation. Cannot cast a pointer to unsigned in that case because unsigned (int) is only 32-bits, but the pointer is 64-bits. 2019-08-03 08:41:55 -06:00
Michael Jung
1af4c94391 libc/grp: Added stubbed implementations of getgrgid, getgrgid_r, getgrnam, getgrnam_r, and initgroups. These functions are essentially stubs pretending that NuttX supported groups and that the only configured group in the system was 'root' with gid 0. The intend is not to provide meaningful new features, but to ease porting of foreign source code to NuttX. 2019-08-03 08:23:04 -06:00
Gregory Nutt
0050172108 sched/group/group_create.c: Update some comments. 2019-08-03 08:18:58 -06:00
Nathan Hartman
a36d49e975 arch/arm/src/tiva, include/nuttx/sensors: Reinstate TM4C qencoder driver and expand its ioctls.
arch/arm/src/tiva/Kconfig:
* Add TIVA_HAVE_QEI0, TIVA_HAVE_QEI1 as applicable to each ARCH_CHIP_TM4C12*.
* Add config TIVA_QEI, TIVA_HAVE_QEI0, TIVA_HAVE_QEI1.
* Add config TIVA_QEI0, config TIVA_QEI1.

arch/arm/src/tiva/common/tiva_qencoder.c:
* Rewrite tiva_qe_setup().
* Replace tiva_qe_ppr() with tiva_qe_resetatppr().
* Add tiva_qe_resetatmaxpos(), tiva_qe_resetatindex().

arch/arm/src/tiva/hardware/tiva_qencoder.h:
* Add missing definitions: SIGMODE_QUADRATURE, SIGMODE_CLK_AND_DIR, SWAP_NO_SWAP, SWAP_PHA_PHB.

arch/arm/src/tiva/tiva_qencoder.h:
* Rename TIVA QEI ioctl QEIOC_PPR to QEIOC_RESETATPPR.
* Add TIVA QEI ioctl identifiers QEIOC_RESETATMAXPOS, QEIOC_RESETATINDEX.

include/nuttx/sensors/qencoder.h:
* Increase QE_TIVA_NCMDS from 3 to 5.
2019-08-02 15:56:05 -06:00
Gregory Nutt
8e321aba84 sched/: Correct some naming. The NuttX task groups have been using the acroynum 'gid' and also the type 'gid_t' for the the task group ID. That is incorrect. Than naming is reserved for use with group permissions. So these were all named to grpid and grpid_t so that it is clearer that these refer to NuttX task group IDs, and not to group permissions. 2019-08-02 10:01:30 -06:00
Gregory Nutt
4c800ca372 sched/task/task_exithook.c: Update some commits. include/nuttx/sched.h: Fix some complaints from nxstyle. 2019-08-02 08:49:26 -06:00
Markus Bernet
e7fdbd8c81 arch/arm/src/stm32h7/:
STM32H7 RCC:  Fix RCC register definitions and typos in ADC/UART
STM32H7 ADC:  Fix internal channel numbers
STM32H7 UART:  Fix typo in UART8 configuration
2019-08-02 07:09:52 -06:00
athan Hartman
6d7e0feea1 Remove 'executable' bit on several files 2019-08-01 14:13:55 -06:00
David Sidrane
2204b6506b Merged in david_s5/nuttx/master_stm_hw_hs (pull request #961)
stm32{L4|F4|H7}:serial add HW HS on UART 4 & 5

* stm32:serial add HW HS on UART 4 & 5

* stm32f7:serial update copyright date

* stm32h7:serial add HW HS on UART 4 & 5

* stm32l4:serial add HW HS on UART 4 & 5

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-01 19:52:43 +00:00
Gregory Nutt
fd4204ac9e z80sim/src/z80_irq.c: Missed a name change up_irqinitialize->z80_irq_initialize. 2019-08-01 10:19:42 -06:00
Gregory Nutt
8b86f937be confgs/z80sim/src/z80_serial.c: Fix uart_dev_t initializer: pollfds is a array of pointers and, hence, the NULL initializer must be included in braces. Noted by Paul Osmialowski in Issue #160. 2019-08-01 10:06:46 -06:00
Gregory Nutt
eda7f5f379 sched/task/task_exithook.c: nxtask_signalparent() in task_exithook.c may invalidate the group's parent task ID (tg_ppid) too soon. The tg_ppid field is use only to remember the parent tasks ID so that it can send the SIGCHLD signal to it. So it must stay valid until SIGCHLD has been sent. In nxtask_signalparent(), it calls nxtask_sigchild() to send SIGCHLD to the parent, then invalidates tg_ppid. That would be okay, except that the SIGCHLD is only sent when the last member of the group terminates. That is incorrect; tg_ppid can be invalidated too soon and, as a consequence, SIGCHLD would never be sent.
Noted by Jeongchan Kim in the Google group:  https://groups.google.com/forum/#!topic/nuttx/SXd8fVwVKBk
2019-08-01 08:14:11 -06:00
David Sidrane
7712d15867 Merged in david_s5/nuttx/master_f7_uart4_5_hw_hs (pull request #960)
stm32f7:serial add HW HS on UART 4 & 5

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-01 00:16:29 +00:00
Gregory Nutt
534acb8281 libs/libc/dirent/lib_scandir.c: Do not build in PROTECTED or KERNEL mode builds. Add FAR to some pointers. Minor comment updates. 2019-07-31 11:16:18 -06:00
Michael Jung
ded8711261 libs/libc/dirent/: Added alphasort, scandir and DT_* defines
- Added an alphasort implementation
- Added a scandir implementation
- Added DT_* literals to include/dirent.h: Apparently those are not required by POSIX, but are part of 4.3BSD and available in glibc as well.
2019-07-31 07:53:14 -06:00
Michael Jung
d1afc02c50 fs/dirent/fs_opendir.c: Fix typo and style. opendir() did set errno to a negative value in one error case. Fixed some coding style issues found by nxstyle. 2019-07-31 07:18:07 -06:00
Nathan Hartman
32e9ba7604 Documenation/, configs/: ix typos and one HTML syntax error. Fix HTML syntax error in Documentation/NfsHowto.html: <coce> -> <code> html tag. 2019-07-30 16:10:15 -06:00
Masayuki Ishikawa
5bf674a99f Merged in masayuki2009/nuttx.nuttx/fix_build_error_for_elf (pull request #959)
libs/libc/machine/arm/armv7-m: Fix build error for elf

Signed-off-by: Masayuki Ishikawa <masayuki.ishikawa@gmail.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-07-30 13:08:59 +00:00
Masayuki Ishikawa
4c9508fc50 Merged in masayuki2009/nuttx.nuttx/gs2200m_with_dhcp (pull request #958)
gs2200m with dhcp

* include/nuttx/wireless: Add GS2200M_IOC_IFREQ to gs2200m.h

    Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

* drivers/wireless: Add GS2200M_IOC_IFREQ to gs2200m.c

    Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

* configs/spresense/wifi: Enable NuttX's DHCP client instead of GS2200M's

    Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

* configs/spresense: Add descriptions on wifi in README.txt

    Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-07-30 10:49:16 +00:00
David S. Alessio
f2b96016ad libs/libc/machine/arm/armv7-m: Add Cortex M4F mach optimized fabsf and sqrtf. 2019-07-29 20:27:33 -06:00
Gregory Nutt
9f24fb5b4b sched/: Add some missing FAR. Update some comments. 2019-07-29 15:04:39 -06:00
Gregory Nutt
eef2f4599e Commit 933e9e407b broke the simulator on a 64-bit platform. 2019-07-29 14:34:29 -06:00
Nathan Hartman
c71f2fa56f arch/arm/src/tiva: Rename TM4C1294NC identifiers to TM4C1294NCPDT.
Rationale: TM4C1294NC is ambiguous:

  TM4C1294NCPDT is a 128-TQFP
  TM4C1294NCZAD is a 212-NFBGA

The TM4C1294NC part currently supported by NuttX is the TM4C1294NCPDT used on the TI EK-TM4C1294XL "Connected LaunchPad" (see configs/tm4c1294-launchpad). To ensure the correct part is fully specified, this commit updates all TM4C1294NC identifiers to TM4C1294NCPDT.

Rename:

  CONFIG_ARCH_CHIP_TM4C1294NC to CONFIG_ARCH_CHIP_TM4C1294NCPDT
  ARCH_CHIP_TM4C1294NC to ARCH_CHIP_TM4C1294NCPDT
  TM4C1294NC to TM4C1294NCPDT
2019-07-29 13:31:52 -06:00
Gregory Nutt
97265f3ca3 arch/arm/src/lpc17xx_40xx/lpc17_40_adc.c: Fix very minor coding standard problem in last PR. 2019-07-29 12:05:47 -06:00
jjlange
bc38e98862 Merged in jjlange/nuttx (pull request #957)
Only use PCLKSEL0 for ADC on LPC176x family.

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-07-29 18:03:27 +00:00
Nathan Hartman
6e8b76c3ab arch/arm/src/tiva: Rename TM4C123GH6PMI identifiers to TM4C123GH6PM
Rationale: In terms of firmware programming, there is no functional difference between these parts:

  TM4C123GH6PMI7
  TM4C123GH6PMI7R
  TM4C123GH6PMT7
  TM4C123GH6PMT7R

From a programming standpoint, all of the above parts are TM4C123GH6PM, which means it doesn't make sense to differentiate between PM and PMI. (The PM means 64-LQFP. The I means temperature range -40C to +85C. It could be T meaning -40C to +105C. The R means it ships in Tape and Reel packaging as opposed to Tray.)

arch/arm/include/tiva/chip.h:
arch/arm/include/tiva/tm4c_irq.h:
arch/arm/src/tiva/hardware/lm/lm3s_flash.h:
arch/arm/src/tiva/hardware/tm4c/tm4c_pinmap.h:
configs/tm4c123g-launchpad/README.txt:
configs/tm4c123g-launchpad/nsh/defconfig:
  Rename: CONFIG_ARCH_CHIP_TM4C123GH6PMI to CONFIG_ARCH_CHIP_TM4C123GH6PM

arch/arm/src/tiva/Kconfig:
configs/Kconfig:
  Rename: ARCH_CHIP_TM4C123GH6PMI to ARCH_CHIP_TM4C123GH6PM

arch/arm/src/tiva/hardware/tm4c/tm4c_memorymap.h:
  Rename: CONFIG_ARCH_CHIP_TM4C123GH6PMI to CONFIG_ARCH_CHIP_TM4C123GH6PM
  Remove redundant Peripheral Base Addresses section. There were two identical copies, one for CONFIG_ARCH_CHIP_TM4C123GH6PMI and another for CONFIG_ARCH_CHIP_TM4C123GH6PM.
2019-07-29 11:15:46 -06:00
Michael Jung
4f27140331 include/netinet/in.h: Rename __pad member to sin_zero in struct sockaddr_in.
Libwebsockets initializes the 'sin_zero' member of sockaddr_in objects to zeros.
Apparently, judging from mailing list entries, there are platforms on which incliinclunot
doing this causes undefined behaviour.

On NuttX compiling respective code is broken, as the corresponding member
variable is called '__pad'.  Neither in the 'nuttx' nor in the 'apps'
respository did I find any reference to this identifier.  Thus, I believe its a
safe bet to just rename it.

UNIX Network Programming states in this regard:

"The POSIX specification requires only three members in the structure: sin_family,
sin_addr, and sin_port. It is acceptable for a POSIX-compliant implementation to
define additional structure members, and this is normal for an Internet socket
address structure. Almost all implementations add the sin_zero member so that all
socket address structures are at least 16 bytes in size."
2019-07-29 08:25:35 -06:00
David S. Alessio
7a151016c2 sched/semaphore/sem_holder.c: Fix a race in telnet with PRIORITY_INHERITANCE and SCHED_HPWORK. Sometimes causes an assertion to fire incorrectly. 2019-07-29 08:14:30 -06:00
David S. Alessio
20e8a83c5f net/udp/udp_txdrain.c: Add missing header file. 2019-07-29 08:12:55 -06:00
Gregory Nutt
e0f1469526 Fix warnings found in build testing. 2019-07-28 17:50:57 -06:00
Gregory Nutt
55ec857f6f arch/arm/src/imxrt/imxrt_usdhc.c: Trivial coding standard fix 2019-07-28 16:54:31 -06:00
Gregory Nutt
1af4d6a905 Merge branch 'master' of bitbucket.org:nuttx/nuttx 2019-07-28 16:53:53 -06:00
Gregory Nutt
a54d660842 configs/stm32f769i-disco/src/stm32_bringup.c: Fix more errors found in build testing. 2019-07-28 16:52:55 -06:00
Dave Marples
986a9160b9 arch/arm/src/imxrt/imxrt_clockconfig.c: Enable TRACE clocks if the divider has been defined in the board's board.h file. 2019-07-28 16:28:06 -06:00
Dave Marples
970295d0fe i.MXRT USDHC: This change completes SDIO support for IMXRT, and also adds support for WiFi using the AP6212A module based on Simon Piriou's rather excellent work. The patch should also address DavidS's concern about width setting for USDHC1 & 2.
Testing of the WiFi is minimal so far but functionality is proven. I'm specifically not happy that the driver doesn't recover elegantly from a DMA data checksum failure, but that is an issue that can be dealt with in due course ... I'm trying to get the rest of the interfaces fleshed out and the hardware proven so it can go for pre-production build. I _think_ there's only Bluetooth and USB-device left to implement now.
2019-07-28 16:20:33 -06:00
Gregory Nutt
43e832327c configs/stm32f769i-disco/src/stm32_bringup.c: Correct compile error found in build testing. 2019-07-28 12:33:17 -06:00
Gregory Nutt
07bdbe85fc configs/olimex-stm32-e407/src/stm32_ina219.c: Correct a compile error found in build testing. 2019-07-28 10:08:23 -06:00
Gregory Nutt
124212624d net: Minor fix in error checking in TCP/UDP Tx drain logic 2019-07-28 07:39:55 -06:00
Augusto Fraga Giachero
e0bd90d8a3 arch/arm/src/lpc17xx_40xx/lpc17_40_ethernet.c: Set speed back to 10Mbps if 10Mmbps link negotiated. 2019-07-27 12:16:13 -06:00
Gregory Nutt
361d85ae35 net/tcp and udp: Fix errors in the new implementation of SO_LINGER. The tcp_drain() and udp_drain() functions were casting the working argument to the wrong type, resulting in hangs and abnormal behavior. There is a complexity in the tcp drain logic when the remote peer closes the socket before all Tx data has been flushed. Sometimes we are not notified of this case and wait the entire timeout unnecessarily. There is a workaround in place in tcp_txdrain(), but this really should be revisited. 2019-07-27 10:26:52 -06:00
Daniel P. Carvalho
23d5e666cc onfigs/nucleo-l432kc: ADC: Change analog pins definitions and correct DMA related issue. 2019-07-27 07:42:50 -06:00
Simon Piriou
780d4d41e8 drivers/mtd/mx25rxx.c: add support for 512B sectors
- Fix for mx25rxx driver as it does not work properly
- Add mx25rxx memory chip & smartfs support in b-l475e-iot01a/nsh config
- Update smartfs smart_scan() function
2019-07-26 09:19:26 -06:00
David Sidrane
08460ba5b1 Merged in david_s5/nuttx/master_f7 (pull request #956)
stm32f7:If only one SDMMC it is slot 0

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-07-26 14:16:26 +00:00
Masayuki Ishikawa
5fd5cc0b0a Merged in masayuki2009/nuttx.nuttx/change_udp_broadcast (pull request #954)
net/udp: Remove net stack dependency from CONFIG_NET_BROADCAST

This change allows us to use CONFIG_NET_BROADCAST without network
stack. (i.e. usrsock application can use broadcast)

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-07-26 14:05:03 +00:00
Augusto Fraga Giachero
f0b74380a5 arch/arm/src/lpc17xx_40xx/lpc17_40_i2c.c: Calculate the appropriate timeout for I2C transfers. Depending on the bus frequency and transfer size, I2C transactions can take quite a bit, so a fixed timeout is not a good solution. Calculating the timeout at run time poses some overhead but still better than aborting long transactions. 2019-07-25 13:07:28 -06:00
Nathan Hartman
e581647f48 Fix typos in README files. 2019-07-25 12:10:10 -06:00
Nathan Hartman
497db422c3 configs/tm4c1294-launchpad/src/tm4c_bringup.c: Enables /dev/userleds for tm4c1294-launchpad by calling userled_lower_initialize() in tm4c_bringup(). 2019-07-25 11:18:32 -06:00
Daniel Pereira Carvalho
0a4c592a4b configs/nucleo-l432kc/src/stm32_zerocross.c: Necessary file ommitted from a previous patch 2019-07-25 08:40:40 -06:00