Commit Graph

33646 Commits

Author SHA1 Message Date
Alexander Vasiliev
b1110ba91c arch/arm/src/samd2l2/sam_i2c_master.c: Corrects behavior of the I2C_M_NOSTART flag. Also adds a release a bus on RXNACK and corrects typo priv->flags to msg->flags as priv->flags is never set. 2018-12-22 08:03:29 -06:00
Gregory Nutt
ebbfb225f6 drivers/analog/lmp92001.c: Add support for the TI LMP92001 device. 2018-12-21 09:46:33 -06:00
Ken Pettit
baab6dd1bd Extends the MTD configdata device with the following features / additions:
1.  Configurable option to use named config items instead of enumerated ID/Instance numbers.
2.  Ability to iterate through the existing configdata items in the /dev/config device.
3.  Ability to "unset" a configdata item.
4.  Ability to perform "flash_eraseall" on the /dev/config device.
2018-12-20 14:14:40 -06:00
David Sidrane
43d37c866b mm/mm_heap/mm_sem.c: Defer freeing if mm is held by a not running task. When the holder is running we can add a holder count. If there is no holder OR it is not running we want to try to take the semaphore. There will not be a count if the task is the holder and not running because it already holds the count. This will result it the deferred free. We will take it when not held and do the free when we can get the count because there was no holder. 2018-12-20 13:39:06 -06:00
Gregory Nutt
86508a0e85 arch/arm/src/stm32/chip/stm32_dma_v1.h: Fix error: extra tokens at end of #undef directive [-Werror] 2018-12-20 12:35:55 -06:00
Gregory Nutt
101740a626 arch/arm/src/stm32/chip/stm32_dma_v1.h: Add missing DMA channel configuration. arch/arm/src/stm32/stm32_adc.c: Fixes a typo. 2018-12-20 10:56:42 -06:00
David Sidrane
bf6f44dec8 sched/Kconfig and sched/init/os_bringup.c: Allow the init task priority to be set. 2018-12-20 10:49:10 -06:00
Gregory Nutt
f37202cbc0 This is a candidate replacement for the reverted change 91aa26774b
This change adds a check to mm_trysemaphore() (the root implementation of both kmm_trysemaphore() and umm_trysemaphore()).  It checks if the that task that is apparently executing is marked as RUNNING.  If not, how could the non-running task be trying to get the MM semaphore?  I think only in the exact scenario that Eunbong Song has described.

So I think the solution should provide the same protection as 91aa26774b but without the horrific consequences to memory usage.
2018-12-20 10:19:52 -06:00
Gregory Nutt
9d1c845dcc Revert "This patch prevent heap corruption as in below case."
This solution to the problem noted by EunBong Song results in major memory fragmentation and and out-of-memory conditions on the PX4 platform.  On that platform the lower priority work queue is very low priority and essentially never runs when the system is busy.  As a result, the systems gets slowly starved of memory until failures and bad behaviors begin to occur.

This is an addition patch coming later to result the original problem in a different way that does not have cause memory starvation.

This reverts commit 91aa26774b.
2018-12-20 10:11:36 -06:00
Gregory Nutt
9c5d0003aa arch/arm/src/stm32f0l0: Bring in missing RCC file. Now there are two files implementing stm32_clockonfig(). Yech. ./setenv.sh Also fixes several compile issues. The STM32L0 boards now compile and link without error. 2018-12-20 08:37:09 -06:00
Anthony Merlino
33a4ec969a Merged in antmerlino/nuttx/avoid-double-context-lookup (pull request #788)
sixlowpan: Address comment regarding avoiding double lookup of address context.

Approved-by: GregoryN <gnutt@nuttx.org>
2018-12-19 18:41:27 +00:00
Mateusz Szafoni
4c601faf6f Brings in initial WIP support for the STML0. This initial commit is in pretty bad shape and, hence it it marked EXPERIMENTAL."
Squashed commit of the following:

    arch/arm/src/stm32f0l0:  Various changes for a clean compilation.  Still does not compile correctly due to missing FLASH latency definitions.

    arch/arm/src/stm32f0l0/hardware:  Add framework for the STM32 L0.  Currently set to same as the STM32F0.

    arch/arm/src/stm32f0l0/hardware:  Very fragmentary FLASH header register definitions for the STM32 L0.

    arch/arm/src/stm32f0l0:  Bring in DMA v1.  Cannot possibly be functionaly yet due to the limited number for M0 interrupts.

    arch/arm/src/stm32f0l0:  Add STM32 F0/L0 LSE and backup power domain controls.

    arch/arm/src/stm32f0l0/hardware/stm32l0_pwr.h:  Add STM32L0 PWR header file.

    arch/arm/include/stm32f0l0/chip.h: Clean up WIP chip header file.

    arch/arm/include/stm32f0l0/chip.h: WIP.

    arm/src/stm32f0l0: Resolve some small differences between F0 and L0 GPIO pin options.

    arch/arm/src/stm32f0l0: Better integrate STM32L0 header files.

    nuttx/arch/arm/include/stm32f0l0:  Add STM32L0 IRQ number definition file.

    arch/arm/src/stm32f0l0:  Add STM32L0 RCC driver.

    arch/arm/src/stm32f0l0/hardware:  Adds basic STM32L0 header files.

    arch/arm/src/stm32f0l0:  Add STM32L0 chip selections.

    configs/:  Hook new STM32L0 boards into the configuration system.

    configs: nucleo boards use as default ST LINK MCO as clock input from MCU and for this HSEBYP must be enabled

    configs: add basic support for nucleo-l073rz

    configs: add basic support for b-l072z-lrwan1
2018-12-19 12:36:35 -06:00
Mateusz Szafoni
5130f366e2 arch/arm/src/stm32: Add support for DMA v1 CSELR support. 2018-12-19 09:28:30 -06:00
Sebastien Lorquet
a7257eff52 This change:
- Avoids the use of up_aesinitialize() entirely, which resolves dependency problems, because this function does not make sure that an actual hardware aes implementation was made available: each SoC is now responsible to ensure the AES hardware is initialized before first use. This applies to lpc43xx, stm32 and sam34.
    - Remove definitions of the NEVER used aes_init and aes_update operations. The new AES API will be more suitable.
    - Change the unusual naming in stm32 (avoiding possible naming clashes)
    - Change the unusual naming in sam34 (avoiding possible naming clashes)
    - Add some FAR to pointers and enforce the 80 col limit in stm32 and sam
2018-12-19 08:42:48 -06:00
Masayuki Ishikawa
08b9b3e230 Merged in masayuki2009/nuttx.nuttx/change_rndis_mac (pull request #791)
Change rndis mac

* configs/lc823450-xgevk: Change RNDIS MAC address assignment

    In previous implementation, mac[0] was assigned to 0xaa for RNDIS
    host to avoid MAC address conflicts with RNDIS device.

    However, I noticed that this assignment causes a random MAC address
    generation on ubuntu16.04 or later which is inconvenient to set up
    network interface.

    This new assignment scheme fixes this issue.

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

* configs/stm32f4discovery: Change RNDIS MAC address assignment

    In previous implementation, mac[0] was assigned to 0xaa for RNDIS
    host to avoid MAC address conflicts with RNDIS device.

    However, I noticed that this assignment causes a random MAC address
    generation on ubuntu16.04 or later which is inconvenient to set up
    network interface.

    This new assignment scheme fixes this issue.

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

* configs/viewtool-stm32f107: Change RNDIS MAC address assignment

    In previous implementation, mac[0] was assigned to 0xaa for RNDIS
    host to avoid MAC address conflicts with RNDIS device.

    However, I noticed that this assignment causes a random MAC address
    generation on ubuntu16.04 or later which is inconvenient to set up
    network interface.

    This new assignment scheme fixes this issue.

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

Approved-by: GregoryN <gnutt@nuttx.org>
2018-12-19 12:43:52 +00:00
Gregory Nutt
db24306435 arch/assertion logic: Fix additional places where the test for an IDLE task is incorrect. It is not invalid in all configurations to check for PID==0. However, the logic fixed in these places lackes sufficient intelligence to find the right stack for the CPU IDLE thread and could still show the wrong stack. 2018-12-18 17:45:46 -06:00
Gregory Nutt
ec9265aa95 arch assertions: Correct duplicated logic from commit dbf01d12b7. Checking for PID == zero is not a valid way to test for the IDLE task in all configurations! This is only true in the single CPU configuration. In multiple CPU configurations, there will be a separate IDLE task for each CPU with a different PID. 2018-12-18 17:35:42 -06:00
Mateusz Szafoni
a9626f3ad3 /arch/arm/src/stm32: Bring in some mostly cosmetic updates from PR783 (most of the PR is going to the stm32f0l0 directory). 2018-12-18 10:53:49 -06:00
Sebastien Lorquet
c912e53344 crypto/aes.c: This commit provides an improved AES cipher API in addition to the existing routines. The reasons for this new API are: 1) better performance, giving the possibility to avoid re-setting-up the key for each AES block when the same key is used multiple times. This is important for the current single user of AES, which is related to storage and FTL. And 2) suitable for simultaneous use of multiple AES keys, which will be required by the upcoming crypto framework. It retains compatibility with the previous API, so there is no need to change anything else right now. 2018-12-18 10:21:37 -06:00
Anthony Merlino
c897790e55 Merged in antmerlino/nuttx/sixlowpan-ieee802154-address-endianness (pull request #790)
sixlowpan/ieee802154: IEEE802.15.4 stores and uses addresses in little endian order.

# Conflicts:
#	drivers/wireless/ieee802154/xbee/xbee_netdev.c

Approved-by: GregoryN <gnutt@nuttx.org>
2018-12-18 15:06:41 +00:00
David Sidrane
f47e0da90c arch/arm/src/stm32f7/stm32_sdmmc.c: Fix build error if CONFIG_ARCH_HAVE_SDIO_DELAYED_INVLDT is not defined. 2018-12-18 07:40:42 -06:00
Gregory Nutt
00b5ba0cf0 sched/task/task_spawn.c: Correct description of input parameters to task_spawn_exec(). Noted by: JeongchanKim 2018-12-18 07:37:07 -06:00
Anthony Merlino
b48a62a7d4 Merged in antmerlino/nuttx/sixlowpan-ul-bit (pull request #787)
sixlowpan: Fixes logic surrounding the Universal/Local bit. This bit represents whether the IID is locally/globally administered. The U/L bit is bit 1 of the MSB of the EUI-64. It should only be inverted in cases where there is a full EUI-64. In cases whe

* sixlowpan: Fixes logic surrounding the Universal/Local bit. This bit represents whether the IID is locally/globally administered. The U/L bit is bit 1 of the MSB of the EUI-64. It should only be inverted in cases where there is a full EUI-64. In cases where the IID is derived from say, a short address, this bit should be forced to 0, indicating that it is locally administered.

    See:

    https://tools.ietf.org/html/rfc4291#section-2.5.1
    https://tools.ietf.org/html/rfc4944#section-6
    https://tools.ietf.org/html/rfc2464#section-4

* sixlowpan: Account for endianness with U/L bit.

Approved-by: GregoryN <gnutt@nuttx.org>
2018-12-18 13:34:41 +00:00
Masayuki Ishikawa
0d20c39250 Merged in masayuki2009/nuttx.nuttx/fix_lc823450_related (pull request #789)
Fix lc823450 related

* configs/lc823450-xgevk: Fix IOB params in rndis/defconfig

    These prameters work for HTTP audio streaming.

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

* arch/arm/src/lc823450: Fix up_allocate_heap() in lc823450_allocateheap2.c

    This change fixes heap size and also implements up_addregion().

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

Approved-by: GregoryN <gnutt@nuttx.org>
2018-12-18 05:30:31 +00:00
Lwazi Dube
cf453cb84b arch/arm/Kconfig: Fix many warnings introduced by stm32f0l0 2018-12-17 10:51:51 -06:00
Anthony Merlino
35232d4997 Merged in antmerlino/nuttx/uncompress-addr-fix (pull request #786)
net/sixlowpan: Fixes decompression of ipaddr from MAC address. The logic used to populate the IP from the radio address should match sixlowpan_ipfromsaddr/sixlowpan_ipfromeaddr

Approved-by: GregoryN <gnutt@nuttx.org>
2018-12-16 21:39:40 +00:00
Anthony Merlino
52aae032f7 Merged in antmerlino/nuttx/remove-ipv6-checks (pull request #785)
Fixes usage of CONFIG_BIG_ENDIAN; should be CONFIG_ENDIAN_BIG

Approved-by: GregoryN <gnutt@nuttx.org>
2018-12-16 20:35:15 +00:00
Anthony Merlino
67c609e343 Merged in antmerlino/nuttx/big-endian (pull request #784)
Fixes usage of CONFIG_BIG_ENDIAN; should be CONFIG_ENDIAN_BIG

Approved-by: GregoryN <gnutt@nuttx.org>
2018-12-16 20:33:54 +00:00
Gregory Nutt
b4ab6bc7f2 Squashed commit of the following:
arch/arm/src/stm32f0l0:  Some fixes for a clean build.  Still have a problem with lots of error messages coming from kconfig-mconf, but the configuation looks fine.  Sometimes kconfig errors are difficult to spot.  I would appreciate it anyone can spot the issue.

    arch/arm/src/stm32f0l0/hardware:  Rename the chip directory to hardware.  This will hopefully eliminate some problems that I have seen with the chip include paths not being unique in more complex configuartions.

    configs/nucleo-f072rb, configs/nucleo-f091rc, configs/stm32f051-discovery, and configs/stm32f072-discovery:  Update for all of the naming changes made in arch/arm/src/stm32f0l0

    arch/arm/include/stm32f0l0:  Rename stm32f0 to stm32f0l0 to make a speace for STM32 L0.  Rename files, functions and defines, removeing the f0_ from the names in order to make them MCU agnostic.

    arch/arm/src/stm32f0l0:  Rename stm32f0 to stm32f0l0 to make a speace for STM32 L0.  Rename files, functions and defines, removeing the f0_ from the names in order to make them MCU agnostic.
2018-12-16 10:50:16 -06:00
Lwazi Dube
4a1400dc6e arch/arm/src/tiva/common/tiva_hciuart.c: Port bluetooth HCI uart interface from stm32 to tiva 2018-12-15 15:47:49 -06:00
Gregory Nutt
69940ade76 Some minor improvement to some comments. 2018-12-15 10:47:38 -06:00
Gregory Nutt
791be4566e arch/arm/src/tiva/cc13xx/cc13xx_chipinfo.c: Add chip info source file. This will be needed later in order to manage trimming and power setup. 2018-12-14 13:37:54 -06:00
David Sidrane
7fef81ea94 gencromfs.c:1171:3: warning: ignoring return value of ‘asprintf’, declared with attribute warn_unused_result [-Wunused-result] 2018-12-13 12:40:40 -06:00
Gregory Nutt
5c9e72f99d Squashed commit of the following:
arch/arm/src/tiva/hardware/cc13x0/cc13x0_fcfg1.h:  Adjust cloned CC13x9 FCFG1 header file so that it reflects reality.

    arch/arm/src/tiva/hardware/cc13x0/cc13x0_fcfg1.h:  Add CC13x0 FCFG1 header file.  Initial commit is the same as the CC13x2/CC26x2 FCFG1 header with a few name changes.

    arch/arm/src/tiva/hardware/cc13x2_cc26x2/cc13x2_cc26x2_fcfg1.h:  Initial FCFG1 header file for the cc13xx/cc26xx family.
2018-12-13 12:35:39 -06:00
Marc Rosen
21328c528c drivers/mtd/at25.c: Fixed missing opening parenthesis. 2018-12-13 08:12:50 -06:00
David Sidrane
fd68d74264 arch/arm/src/stm32/Kconfig: USB Host is an option. 2018-12-12 18:27:04 -06:00
Daniel P. Carvalho
60575d3436 fs/nxffs/nxffs_ioctl.c: Pass unrecognized IOCTL commands to the contained MTD driver. 2018-12-12 18:23:03 -06:00
Daniel P. Carvalho
e34e9fd782 drivers/mtd/at45db.c: Correct some typos. 2018-12-12 18:21:27 -06:00
Gregory Nutt
ca747ee289 Rename CONFIG_EXAMPLES_OSTEST -> CONFIG_TESTING_OSTEST 2018-12-12 17:56:02 -06:00
Marc Rosen
16dff59cbd drivers/mtd/at25.c: Added support for AT25DF081A serial flash chip 2018-12-12 07:04:27 -06:00
Mateusz Szafoni
400215669a Merged in raiden00/nuttx_pe (pull request #782)
arch/arm/src/stm32/Kconfig: simplify ARM core selection logic

Approved-by: GregoryN <gnutt@nuttx.org>
2018-12-12 12:33:36 +00:00
Gregory Nutt
f67e27cf76 arch/arm/src/tiva/hardware: Add CCFG register definition files. 2018-12-11 09:35:07 -06:00
Juha Niskanen
583e80a9ce drivers/1wire/ds28e17.c: Optimize I2C write followed by read to same address. 2018-12-11 07:09:03 -06:00
Lwazi Dube
39c51e668f drivers/wireless/bluetooth/bt_uart_cc2564.c: Add cc2564 driver. 2018-12-11 06:58:31 -06:00
Gregory Nutt
ab6b7e4c2d arch/arm/src/tiva/hardware: Add some things missed in FLASH register definition files. 2018-12-10 17:05:02 -06:00
Gregory Nutt
c8fe96e2d6 arch/arm/src/tiva/hardware: Add CC13xx FLASH header file. 2018-12-10 14:32:21 -06:00
David Sidrane
010d5da4e6 fs/vfs: dup() and dup2() were broken some time back. fs_dupfd() was return returing OK on success, not fit the file descriptor of the duplicated fd. 2018-12-10 13:25:52 -06:00
Gregory Nutt
eb015e10d5 Fix some warnings found in build testing. 2018-12-09 18:14:25 -06:00
Daniel Agar
c1d58ae8d5 Merged in dagar/nuttx/pr-arp_whitespace (pull request #780)
net/arp.h fix whitespace after ARPHRD_IEEE80211

Approved-by: GregoryN <gnutt@nuttx.org>
2018-12-09 20:12:10 +00:00
Gregory Nutt
c125f65d81 arch/arm/src/tiva: Fix another Tiva-related error found in build testing. 2018-12-09 14:06:45 -06:00