Commit Graph

34977 Commits

Author SHA1 Message Date
Gregory Nutt
36d21a7a5b Clean up a some missed re-naming in the last slash and burn s32k1xx commit. 2019-08-13 19:14:50 -06:00
Gregory Nutt
e3468c8aad arch/arm/src/s32k1xx: Bring in Cortex-M0+ Systick and interrupt handling from samd2l2; bring in Cortex-M4F Systick and interrupt handling from LPC54xx. 2019-08-13 19:10:38 -06:00
Gregory Nutt
7be79b661c arch/arm/src/s32k1xx: Fix some sub-directory names. 2019-08-13 18:50:54 -06:00
Pavel Pisa
913de5e216 arch/arm/src/lpc17xx_40xx/lpc17_40_can.c: f BOARD_CCLKSEL_DIVIDER is not equal to 1 on LPC178x or LPC40xx then base clock rate is calculated incorrectly because CCLK frequency does not correspond to PLL0 clock which is used for PCLK. This is partially workaround solution. It would be probably better to define BOARD_PCLK_FREQUENCY even for LPC176x targets and use that to replace divisor by base_clock in up_dev_s. 2019-08-13 16:16:49 -06:00
Pavel Pisa
fd237a87d1 include/sys/syscall.h: Correct some typos. 2019-08-13 16:12:58 -06:00
Gregory Nutt
eca3601697 symtab/Makefile: Fix an error in the clean target. 2019-08-13 15:33:58 -06:00
Gregory Nutt
8405f6510c arch/arm/src/s32k1xx: Bring in the lpuart from i.MXRT. It is the same IP. 2019-08-13 15:00:41 -06:00
Gregory Nutt
cd49e6fbd7 arch/arm/src/imxrt: Fix some errors in the LPUART register defintion files. Correct naming of a function: up_earlyserialinit() should be imxrt_earlyserialinit(). Remove prototypes for non-existent serial initialization functions. 2019-08-13 14:59:59 -06:00
Gregory Nutt
ce90390146 arch/arm/src/s32k1xx/hardware/s32k1xx_rcm.h: Add RCM register definition file. 2019-08-13 12:45:15 -06:00
Gregory Nutt
a1db129027 arch/arm/src/s32k1xx/hardware/s32k1xx_crc.h: Add CRC register definition file. 2019-08-13 11:24:46 -06:00
Gregory Nutt
d9a3f2ac0e arch/arm/src/s32k1xx/hardware/s32k1xx_wdog.h and s32k1xx_ewm.h: Add WDOG and EWM register definition file. 2019-08-13 11:05:08 -06:00
Gregory Nutt
b6c72debcb arch/arm/src/s32k1xx/hardware/s32k1xx_dmamux.h: Add DMAMUX register definition file. 2019-08-13 10:23:07 -06:00
Alin Jerpelea
907d6b085b Merged in alinjerpelea/nuttx (pull request #991)
arm: codestyle fixes 2

* arm: kl: codestyle fixes

    After the board restructuration is time for codestyle cleanup

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

* arm: lc823450: codestyle fixes

    After the board restructuration is time for codestyle cleanup

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

* arm: lpc17xx_40xx: codestyle fixes

    After the board restructuration is time for codestyle cleanup

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

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-13 16:08:49 +00:00
Gregory Nutt
248a2966c6 arch/arm/src/s32k1xx/hardware/s32k1xx_gpio.h: Add GPIO register definition file. 2019-08-13 10:06:13 -06:00
Gregory Nutt
1da2f6b685 symtab/Makefile: The OS symbol table should not be generated in the PROTECTED and KERNEL build modes. In those modes, the applications should link with libproxy which will provide symbol-compatible access to OS functions via a call gate. 2019-08-13 09:45:00 -06:00
Pavel Pisa
380198c985 symtab/, tools/: NuttX provides lists of available syscalls and library functions and tools to process them. The lists can be used to build symbol table which allows runtime program loading which can reuse functions already compiled into NuttX system image. List processing, compilation and linking to the final system image has been possible only under manual control until now.
Provided changes add option (CONFIG_EXECFUNCS_GENERATE_SYSTEM_SYMTAB) to build complete list of available functions and syscalls automatically.  The symbolic table is generated in form libsymtab.a which can be reused by application or directly pull in when "g_symtab" and "g_nsymbols" variables are requested by EXECFUNCS configuration.

I have tried to follow mechanisms for library compilation in different kernel protection modes but tested only flat no-MMU build. The basic assumption is that this library and libraries providing syscall stubs and C-library functions are available in user-space context and initial application (usually NSH) registers the symbol table through IOCTL.  The table can be reused then by another applications in their address space as kernel allows. Simple for flat or protected mode, I am not sure if really support in MMU mode. It is highly probable that I have made some mistake, overlooked something, but functionality is optional (should not cause troubles in any mode if disabled) and main purpose is to lower memory overhead when more applications are loaded on memory constrained system which usually use direct kernel calling without protection or address space separation. If the table should be provided by kernel to applications then makefiles has to be adjusted.
2019-08-13 09:09:43 -06:00
Pavel Pisa
e3c2a0238a libs/libc/libc.csv: Correct dependency of setlocale on CONFIG_LIBC_LOCALE. 2019-08-13 08:58:04 -06:00
Pavel Pisa
2d9fb956aa libs/libc/math.csv: Correct format of some function entries. 2019-08-13 08:56:38 -06:00
Gregory Nutt
3f7b908674 arch/arm/src/s32k1xx/hardware/s32k1xx_port.h: Add PORT register definition file. 2019-08-13 08:46:41 -06:00
Gregory Nutt
387bd5d070 arch/arm/src/s32k1xx/hardware/s32k1xx_sim.h: Add SIM register definition file. 2019-08-12 18:12:21 -06:00
Nathan Hartman
0b501304c7 boards/arm/timva/tm4c123g-launchpad: Update paths for boards/ restructuring. Update paths to board directories in documentation and scripts. 2019-08-12 12:16:40 -06:00
Gregory Nutt
bcfabcbe53 This commit brings the initial files for a port to the NXP S32K1xx family. This is very much a work in progress and is little more that a partial configuration/build environment and some S32K1xx register definition header files
Squashed commit of the following:

    arch/arm/src/s32k1xx/hardware/s32k1xx_mcm.h:  Add MCM register definition file.
    arch/arm/src/s32k1xx/hardware/s32k1xx_memorymap.h:  Add memory map definition file.
    arch/arm/src/s32k1xx/hardware/s32k1xx_cmu.h:  Add CMU register definition file.
    arch/arm/src/s32k1xx/hardware/s32k1xx_pcc.h:  Add PCC register definition file.
    arch/arm/src/s32k1xx/hardware/s32k1xx_scg.h:  Add SCG register definition file.
    arch/arm/src/s32k1xx:  Add initial Make.defs files.
    Basic configuration logic for the S32K1 family.
2019-08-12 12:12:58 -06:00
Alin Jerpelea
f362d161db Merged in alinjerpelea/nuttx (pull request #990)
arm: codestyle fixes 1

* arm: a1x: codestyle fixes

    After the board restructuration is time for codestyle cleanup

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

* arm: am335x: codestyle fixes

    After the board restructuration is time for codestyle cleanup

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

* arm: c5471: codestyle fixes

    After the board restructuration is time for codestyle cleanup

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

* arm: cxd56xx: codestyle fixes

    After the board restructuration is time for codestyle cleanup

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

* arm: dm320: codestyle fixes

    After the board restructuration is time for codestyle cleanup

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

* arm: efm32: codestyle fixes

    After the board restructuration is time for codestyle cleanup

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

* arm: imx6: codestyle fixes

    After the board restructuration is time for codestyle cleanup

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

* arm: imxrt: codestyle fixes

    After the board restructuration is time for codestyle cleanup

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

* arm: kinetis: codestyle fixes

    After the board restructuration is time for codestyle cleanup

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

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-12 16:06:40 +00:00
Gregory Nutt
eb5a8c7cea libs/libc/grp and pwd: Revisit file looks. Use uintptr_t vs void* to incode mixed pointers and integer values. 2019-08-11 11:26:09 -06:00
Anthony Merlino
e649d6c21e Merged in antmerlino/nuttx/stm32f7_progmem (pull request #989)
arch/arm/src/stm32f7: Exposes stm32_flash_xxx functions.

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-10 18:36:46 +00:00
Anthony Merlino
cc16b40462 Merged in antmerlino/nuttx/xbee_buildfix (pull request #987)
drivers/wireless/ieee802154/xbee: Fixes missing semicolon introduced in recent commit.

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-10 18:29:58 +00:00
Anthony Merlino
6f4c9678af Merged in antmerlino/nuttx/mac_txdesc_ackreq_fix (pull request #986)
mac802154: Fixes issue where the txdesc's ackreq flag was not being set, despite the frame containing a Frame Control field with ACKREQ bit set.

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-10 18:27:49 +00:00
Anthony Merlino
a8e1620f3c Merged in antmerlino/nuttx/mac802154_fix_eaddr (pull request #985)
mac802154: Fixes issues with extended address. 1) Extended address should be read-only. 2) Extended address should be placed in frame in "reverse-canonical" order.

The extended address is a read-only attribute and thus an attempt to write the extended address should be denied. Instead, the extended address should really be either set by the PHY/radio itself, or provided at board bring-up time to the radio layer. The MAC layer now pulls in the extended address from the radio any time the MAC is reset.

The extended address is also supposed to be sent in the frame in reverse-canonical order. This is very confusing in the standard and it wasn't until I realized it was backwards in Wireshark that I researched this further. Searching online I find documents from the committee for suggestions/feedback on the future standard. It isn't in the 2015 standard but a newer version of the standard will presumably clarify this. It says that the extended address should be written in reverse-canonical form, meaning the OUI comes last, not first inside the frame.

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-10 18:25:13 +00:00
Anthony Merlino
535db0140a Merged in antmerlino/nuttx/wirelessnetdev (pull request #984)
wireless network devices: Attach radio to d_buf before registering device to handle forwarding case.

When CONFIG_NET_IPFORWARD is enabled, and CONFIG_NET_6LOWPAN is being used, a packet that attempts to get forwarded on the 6LoWPAN interface will require that the radio's buffer be attached to d_buf. Otherwise the below exception will be hit.

~line 542 of sixlowpan_framelist.c

```
      /* Recover the reassembly buffer from the driver d_buf. */

      reass = (FAR struct sixlowpan_reassbuf_s *)radio->r_dev.d_buf;
      DEBUGASSERT(reass != NULL);
```

The underlying "radio" in this case is the mac802154_netdev.

This behavior has probably not been observed because the buffer is normally attached in the periodic txpoll worker. However, in my case, the 6LoWPAN interace was not UP yet, and therefore the worker hadn't run yet.

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-10 18:22:39 +00:00
Anthony Merlino
6bbc30c5fd Merged in antmerlino/nuttx/mac802154_fcslen (pull request #983)
ieee802154: Support dynamic FCS length. Adds IEEE802154_ATTR_PHY_FCSLEN.

This change introduces IEEE802154_ATTR_PHY_FCSLEN which the radio layer can support to set/get the FCS length that's added to the end of the frame. One use case, in promiscuous mode, is to add back in the FCS of the received frame by increasing the iob->io_len by the FCS length.

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-10 18:05:07 +00:00
Anthony Merlino
e2ac83dff0 Merged in antmerlino/nuttx/clock_doc (pull request #982)
clock.h: Copies in missing function documentation from C file.

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-10 17:53:48 +00:00
Anthony Merlino
7c06438315 Merged in antmerlino/nuttx/ipforward (pull request #981)
net/ipforward: Check if interface is up early on when forwarding to avoid extra work.

As noticed in a previous wireless commit, when forwarding is enabled and a packet comes in, the packet is attempted to be sent on each other netdev without regard for whether it is in the UP state. Of course this is eventually caught, but it can be caught earlier to avoid unnecessary work, especially in the 6LoWPAN case where a useless packet conversion will occur.

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-10 17:53:06 +00:00
Anthony Merlino
1e3a60155e Merged in antmerlino/nuttx/rndis (pull request #980)
drivers/usbdev/rndis: Expose option to change number of write requests that can be in flight.

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-10 17:52:19 +00:00
Anthony Merlino
4f696dc9cd Merged in antmerlino/nuttx/multi-macnet (pull request #979)
mac802154: Moves iobuffer into macnet struct so that more than one macnet dev can exist.

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-10 17:51:05 +00:00
Anthony Merlino
cc6dee64c0 Merged in antmerlino/nuttx/mac_attributes (pull request #978)
Mac attributes

* wirelesss/ieee802154/mac802154: Makes comment more clear that it's related to an outbound frame, not an incoming frame.

* wireless/ieee802154: Adds support for getting/setting macMaxFrameRetries via IOCTL

* wireless/.ieee802154/mac802154: Add get support for rxonidle attribute

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-10 17:04:08 +00:00
Anthony Merlino
90317a9eeb Merged in antmerlino/nuttx/ieee802154_energydetect (pull request #977)
wireless/ieee8021254: Adds support for energy detect.

Adds support for energy detect by introducing a new radio call/callback, as the PHY layer is required to perform the energy detect.

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-10 17:03:24 +00:00
Anthony Merlino
70186874e3 Merged in antmerlino/nuttx/macnetdev (pull request #976)
mac802154_netdev: Allow 64-bit prefix to be configurable when auto-configuring the IPv6 address during bring-up.

Previously, the link-local prefix fe80::/64 was used. Also, put the network in the DOWN state at the end of initialization.

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-10 17:02:26 +00:00
Gregory Nutt
e6da85deb3 sched/group/group_setuid.c and group_setguid.c: Verify that the UID/GID is within range. 2019-08-10 10:42:53 -06:00
Manuel Stühn
5585cc421c Merged in manuelstuehn/nuttx/feature/bsd-portable (pull request #975)
change all occurences of /bin/(ba)sh to /usr/bin/env bash which appears more portable

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-10 15:57:26 +00:00
raiden00pl
5ed743d58a Merged in raiden00/nuttx_f334 (pull request #974)
Master

* Revert "Merged in yanqil-br/feature-multi_chan_pwm (pull request #973)"

    This reverts commit aef0e0b538.

* arch/arm/src/{stm32/stm32f7/stm32h7/stm32l4}/stm32_pwm.c: configure multi-channel duty only if channel specified. This allows you to update duty cycle for a single channel

* nucleo-f303re/configs: add basic NSH configuration

* nucleo-f303re/configs/pwm: enable console on UART2 and set entry point to nsh_main

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-10 15:14:19 +00:00
Gregory Nutt
0ed1a06016 arch/arm/include/cxd56xx/chip.h: The correction of commit c300f27130 must be applied to the CXD56xx too. 2019-08-10 08:33:47 -06:00
Yan Li
aef0e0b538 Merged in yanqil-br/feature-multi_chan_pwm (pull request #973)
multi-channel PWM with single chan selection

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-09 23:57:31 +00:00
Nathan Hartman
60f777b8f4 Fix various typos in documentation and comments. 2019-08-09 14:35:07 -06:00
Anthony Merlino
7eaa47072f Merged in antmerlino/nuttx/stm32f7-usart1-dma (pull request #972)
stm32f7: USART1_RXDMA is dependent on STM32F7_DMA2 not STM32F7_DMA1

Approved-by: David Sidrane <david.sidrane@nscdg.com>
Approved-by: Alan Carvalho de Assis <acassis@gmail.com>
Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-09 18:24:13 +00:00
Nathan Hartman
29a3412407 boards/arm/efm32/olimex-efm32g880f128-stk/src/.gitignore: Restore .gitignore file that was lost in the boards/ directory reorganization. 2019-08-09 11:11:20 -06:00
Nathan Hartman
b417ed4b40 Tiva GPTM timers: Implement 16-bit PWM mode
arch/arm/src/tiva/Kconfig:
    Remove EXPERIMENTAL dependency on TIVA_TIMER16_PWM.

arch/arm/src/tiva/common/tiva_timerlib.c:
    Fix wrong 32/16-bit ifdef checks.
    Add tiva_pwm16_sel_event() to choose GPTMCTL.TnEVENT value.
    Implement tiva_pwm_mode16().
    tiva_timer16_setinterval(): Fix wrong check for TIMER16_MODE_ONESHOT
        and TIMER16_MODE_PERIODIC. Was comparing to config->cmn.mode
        which can never have those values. This prevented interrupts being
        enabled. Compare to timer->mode instead.
    Add tiva_timer16pwm_setperiodduty() to set initial period, duty cycle,
        and enable interrupts if requested in GPTM peripheral. Interrupts
        are not enabled in NVIC until tiva_timer16_start() is called.
    Add tiva_timer16pwm_setduty() to update duty cycle at any time.

arch/arm/src/tiva/hardware/lm/lm3s_timer.h,
arch/arm/src/tiva/hardware/lm/lm4f_timer.h,
arch/arm/src/tiva/hardware/tm4c/tm4c123_timer.h,
arch/arm/src/tiva/hardware/tm4c/tm4c129_timer.h:
    Add missing defines; make surrounding defines consistent.

arch/arm/src/tiva/tiva_timer.h:
    Add new TIMER_FLAG_* configuration flags to enable configuring the
    16-bit PWM feature. Extend type of "flags" in tiva_timer32config_s
    and tiva_timer16config_s from 8- to 32-bits to allow more flags.
2019-08-09 11:03:44 -06:00
Gregory Nutt
545cfada38 This commit removes CONFIG_ARCH_INT_DISABLEALL. In the normal course of things, interrupts must occasionally be disabled using the up_irq_save() inline function to prevent contention in use of resources that may be shared between interrupt level and non-interrupt level logic. Now the question arises, if we are using BASEPRI to disable interrupts and have high priority interrupts enabled (CONFIG_ARCH_HIPRI_INTERRUPT=y), do we disable all interrupts except SVCall (we cannot disable SVCall interrupts). Or do we only disable the "normal" interrupts?
If we are using the BASEPRI register to disable interrupts, then the answer is that we must disable ONLY the "normal interrupts".  That is because we cannot disable SVCALL interrupts and we cannot permit SVCAll interrupts running at a higher priority than the high priority interrupts (otherwise, they will introduce jitter in the high priority interrupt response time.)

Hence, if you need to disable the high priority interrupt, you will have to disable the interrupt either at the peripheral that generates the interrupt or at the NVIC.  Disabling global interrupts via the BASEPRI register cannot effect high priority interrupts.
2019-08-09 10:52:35 -06:00
Gregory Nutt
851285d729 Documentation/NuttX.html: Adjust URLs to board README.txt files to account for changes in boards/ sub-directory reorganization. 2019-08-09 08:04:27 -06:00
Alin Jerpelea
a06033df64 Merged in alinjerpelea/nuttx (pull request #971)
codestyle fixes

* misoc: codestyle fixes

     After the board restructuration is time for codestyle cleanup

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

* or1k: codestyle fixes

     After the board restructuration is time for codestyle cleanup

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

* renesas: codestyle fixes

     After the board restructuration is time for codestyle cleanup

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

* risc-v: codestyle fixes

     After the board restructuration is time for codestyle cleanup

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

* sim: codestyle fixes

     After the board restructuration is time for codestyle cleanup

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

* x86: codestyle fixes

     After the board restructuration is time for codestyle cleanup

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

* xtensa: codestyle fixes

     After the board restructuration is time for codestyle cleanup

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

* z16: codestyle fixes

     After the board restructuration is time for codestyle cleanup

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

* z80: codestyle fixes

     After the board restructuration is time for codestyle cleanup

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

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-09 13:22:39 +00:00
Gregory Nutt
c300f27130 arch/arm/include/armv7-m/nvicpri.h: In the 'normal' case, the priority of the SVCALL interrupt was the same as the priority of the high priority interrupt. This means that SVCALL interrupt processing can defer the high priority interrupt and result in the jitter in that interrupt response. Fix is to raise the priority of the high priority interrupt above the priority of the SVCALL interrupt. Suggested by Nathan Hartman. 2019-08-09 07:07:16 -06:00