Commit Graph

14580 Commits

Author SHA1 Message Date
Gregory Nutt
a77c073797 arch/: Fix an interlock that was broken by commit 641a98a434 in all implementations of up_sigdeliver. 2019-02-03 17:14:32 -06:00
Gregory Nutt
641a98a434 arch/: The saved return register state is available on the user stack. Thic commit reorders some logic so that certain, critical registers are preserved in the TCB. This does not make the logic 100% secure, but does prevent some obvious things. sched/signal/sig_delivery: Add a flag to the TCB to indicate that we are in a signal handler. Use this flag to assure that a there a never attempts to nest signal handling operations on a thread. This was guaranteed before but when locking of pre-emption during signal delivering was eliminated in a previous commit, there was a remote possibility of an attempt to do nested signal handling. This flag assures that there is only one signal handled at a time. 2019-02-03 15:29:47 -06:00
Abdelatif Guettouche
06e27e5547 arch/mips/src/pic32mz: Add support for the PIC32MZ timers (driver, lowerhalf, freerun and oneshot) 2019-02-02 17:42:33 -06:00
Gregory Nutt
d8943be51c arch/arm/src/sam34 and sama5: Port Anthony Merlino's fix of commit ee840c74da to similar Ethernet drivers for parts in other SAM families. 2019-02-02 16:14:43 -06:00
Anthony Merlino
ee840c74da Merged in antmerlino/nuttx/samv7_emac_bna_fix (pull request #824)
arch/arm/src/samv7/sam_emac.c: Fixes rxdesc index logic to handle Buffer Not Available (BNA) condition.

If a SOF is found, but no EOF, don't move past the frame. Instead, keep the index at the SOF buffer until the rest of the data is written.

This fixes a receiver lockup condition where the peripheral and this driver get out of sync with there head pointers. In this case the driver has moved past buffers it owns, without clearing ownership, which results in the peripheral and driver in a deadlock with each other.

Approved-by: GregoryN <gnutt@nuttx.org>
2019-02-02 21:56:20 +00:00
Gregory Nutt
7a0e62e24f arch/arm/src/samv7/sam_emac.c: Fix a compile problem introduced with commit cf1e0f7976. 2019-02-01 16:14:41 -06:00
Gregory Nutt
cf1e0f7976 arch/arm/src/samv7/sam_emac.c: The logic for determining the number of queues for SAMV71 must be extended. All SAMv7 parts increase the number of queues from 3 to 6 at revision B, not just the SAMV71. 2019-02-01 15:42:11 -06:00
David Sidrane
2f18326c09 arch/arm/src/imxrt/chip/imxrt_gpt.h: Correct register offsets. 2019-01-30 16:40:27 -06:00
Kevin Liu
46895dc86b 1./arch/arm/src/samv7/sam_spi.c DMA Tx/Rx timeout issue.
2./arch/arm/src/samv7/sam_qspi.c   compiling error when set CONFIG_SAMV7_QSPI_DLYBCT
3. fix compiling error when set CONFIG_BOARDCTL_IOCTL/CONFIG_BOARDCTL_UNIQUEID
2019-01-30 10:07:01 -06:00
David Sidrane
d70cb97950 arch/arm/src/imxrt/chip/imxrt_tmr.h: Fix addressing and restructure using common offset 2019-01-29 17:28:51 -06:00
David Sidrane
f7003f8ef2 arch/arm/src/imxrt: Add XBAR Support 2019-01-29 17:24:27 -06:00
Gregory Nutt
2fc9b7acfc Update some comments. 2019-01-29 17:13:54 -06:00
Gregory Nutt
88353226c9 arch/arm/src/lpc17xx/lpc17_allocateheap.c: Fix some errors introduced in my last change. Noted by Pavel Pisa 2019-01-28 15:11:36 -06:00
Xiang Xiao
39d83375d2 arch/arm/src Serial: Remove duplicated inclusion of nuttx/fs/ioctl.h 2019-01-28 06:16:15 -06:00
Gregory Nutt
5bf7890d32 arch/arm/src/lpc17xx/lpc17_allocateheap.c: Correct some confusion in the memory layout introduced in commit 40d666f440. The 'primary ram' may be either the internal SRAM or the external DRAM (in the case where an external bootloader has previously initialized the SDRAM). The primary ram is laid out as: .data, .bss, then the IDLE stack allocation. The global variable g_idlestack is the top of the IDLE stack and also the beginning of memory available for the heap in primary ram. With this change, a range comparison is used to determin if g_idlestack lies in SRAM or SDRAM. If so, then the remainder of the memory is available for HEAP usage. 2019-01-28 06:08:30 -06:00
Pavel Pisa
40d666f440 arch/arm/src/lpc17xx/: The enable of EMC clocks has to be preserved when already enabled by loader. EMC and related pins configuration has to be skipped if the system is run from SDRAM. A region of SDRAM which is used by system must not be used for heap. 2019-01-27 17:45:19 -06:00
Pavel Pisa
f43560c080 arch/arm/src/lpc17xx/lpc176x_clockconfig.c: The code preserves undocumented reserved bits only if board does not set them to keep previous behavior for boards where developers (hopefully) know what values should be set into these bits. 2019-01-27 17:30:01 -06:00
Gregory Nutt
78c8485b0d Fix some warnings found in build testing. 2019-01-27 17:23:01 -06:00
Gregory Nutt
732bef73a7 include/net/if.h: Fix some macro definitions overlooked in commit d105dc9b5e. Also corrects the name of a structure: mii_ioctl_notify_s vs mii_iotcl_notify_s. 2019-01-27 16:43:42 -06:00
Gregory Nutt
4b9abfa3c2 Every file that uses serial IOCTLs (TIOC*) must explicity include nuttx/fs/ioctl.h. This was included previously via sneak path in the now deleted arch/serial.h. 2019-01-27 13:41:44 -06:00
Gregory Nutt
2992660420 arch/arm/src/imxrt: Fix another newly introduced compilarsion error due to missing inclusion of nuttx/fs/ioctl.h. I think this is a side-effect of removing arch/serial.h which probably provided a sneak inclusion path for nuttx/fs/ioctl.h. We will just have to fix them one at a time as they pop-up in build testing. 2019-01-27 13:25:58 -06:00
Gregory Nutt
5b400cdf20 arch/arm/src: Fix newly introduced compilarsion errors in two more serial drivers: lpc17xx and lc8223450. Not sure why this are not occuring, but including nuttx/fs/ioctl.h. 2019-01-27 13:21:44 -06:00
Gregory Nutt
e4336bd1be arch/arm/src/am335x/am335x_serial.c: Eliminate an error 'TIOCSBRK undeclared. 2019-01-27 12:49:42 -06:00
raiden00pl
5911478777 Merged in raiden00/nuttx_pe (pull request #823)
Improvements in STM32 ADC, PWM and TIM

arch/arm/src/stm32/chip/stm32_adc_v2.h: missing T1TRGO2 for JEXTSEL

arch/arm/src/stm32/stm32_adc: configure injected channels external trigger when ADC enabled

arch/arm/src/stm32/stm32_adc: update injected conversion queue of context after configuration

arch/arm/src/stm32/stm32_adc: fix sample time configuration for channels. The array index for channels was missing

arch/arm/src/stm32/stm32_adc: support for offset configuration

arch/arm/src/stm32/stm32_pwm: fix TRGO/TRGO2 configuration

arch/arm/src/stm32/stm32_pwm: support for advanced timers channel 5 and 6

Approved-by: GregoryN <gnutt@nuttx.org>
2019-01-27 16:17:39 +00:00
Xiang Xiao
d105dc9b5e drivers/net/phy_notify.c and all network drivers that support PHY notifications: Support the signal notification through SIGEV_THREAD 2019-01-27 08:57:23 -06:00
Xiang Xiao
818d8dda1e Remove empty seria.h and all references 2019-01-26 15:08:14 -06:00
Alan Carvalho de Assis
db0b9b7c34 arch/arm/src/samd2l2 serial: Fix SAMD2L2 serial driver it needs sam_usart_enable() to work 2019-01-26 12:51:51 -06:00
Xiang Xiao
38ffb98f1b Kconfig files, binfmt/libelf, libs/libc/machin, libs/libxx: Correct libcxx exception handling by introducing the generic config(CXX_EXCEPTION and CXX_LIBSUPCXX) 2019-01-26 11:23:31 -06:00
Xiang Xiao
763ba51b78 arch/xxx/src/xxx/up_assert.c: Dump CPU0 IDLE stack only when PID equals 0. IDLE threads of other CPUs do not need this special check 2019-01-26 10:59:23 -06:00
Xiang Xiao
bda6d7f065 arch/arm/include/syscall.h: Add missing inclusion of arch/armv7-r/syscall.h for CortexR. 2019-01-26 07:43:31 -06:00
Xiang Xiao
9f408e9937 arch/arm/src/include/xxx/syscall.h: Align semi-hosting call style with other syscalls 2019-01-26 07:40:47 -06:00
ligd
5a6108c172 arch/xxx/src/common/up_initialize.c: Move up_pminitialize() after timer_initialize() 2019-01-26 07:32:14 -06:00
Xiang Xiao
81bef6cccf arch/Kconfig and arm/src/armv7-m/Kconfig: ARCH_HIPRI_INTERRUPT shouldn't select ARMV7M_USEBASEPRI. First because that is a violation of the layered nature of the Kconfig architecture, but also because then Kconfig will generated errors when high priority interrupts are used with other architectures. 2019-01-26 07:21:18 -06:00
Xiang Xiao
2e70eef767 arch/arm/include/armv-7m/irq.h and armv6-m/irq.h: Remove redundant conditioning on CONFIG_BUILD_PROTECTED 2019-01-26 07:04:15 -06:00
Xiang Xiao
9343451bea arch/xxx/include/: watchdog.h and arm-elf.h because they are empty. The arm-elf header file was never used; the empty watchdog.h header file was used in only one place. 2019-01-26 07:01:45 -06:00
Gregory Nutt
d35c7d95f1 arch/arm/src/tiva/cc13xx/cc13x2_v1_trim.c and cc13x2_cc26x2_v1_rom.c: Review and modified for coding style. Now pass tools/nxstyle wihout complaint. 2019-01-25 14:07:54 -06:00
Pavel Pisa
f9ac7a22ca arch/arm/src/lpc17xx/lpc17_can.c: The name can_txready clashes with Nuttx CAN core global function. LPC178x has only single LPC17_SYSCON_PCLKSEL with only single divisor. 2019-01-25 08:24:09 -06:00
Gregory Nutt
df64811269 up_initialize(): As noted by Roland Takacs in Bitbucket issue 141, there is a compilation error for STM32 if CONFIG_NET and CONFIG_NETDEV_LATEINIT are selected. That was due in part to commit 19e16cb which extended up_netinitialize() with a !defined(CONFIG_NETDEV_LATEINIT) guard but did not add the guard to concrete implementations. I say "in part" because I don't think that the original intent of commit 19e16cb was to enable an alternative initialization of MCU internal Ethernet support but rather to enable support of external Ethernet devices that may have dependencies on, for example, SPI. However, this is still a proper fix to avoid the compilation error that can occur with this combination of configuration options. 2019-01-25 07:21:03 -06:00
Juha Niskanen (Haltian)
079e9161f1 arch/arm/src/stm32l4/stm32l4_lse.c: Ports Jussi Kivilinna's recent STM32F7 LSE change to STM32L4. 2019-01-24 06:58:45 -06:00
Gregory Nutt
d0b2cf34f9 arch/arm/src/tiva/hardware: Add CC13x0 DDI0 OSC header file. arch/arm/src/tiva/cc13xx: Fix miscellaneous compilation issues. 2019-01-23 13:30:18 -06:00
raiden00pl
f841175540 Merged in raiden00/nuttx_pe (pull request #822)
Improvements for STM32 PWM

arch/arm/src/stm32/stm32_pwm: fix polarity and IDLE state configuration for advanced timer PWM

include/dsp.h: raise error if math.h not present

Approved-by: GregoryN <gnutt@nuttx.org>
2019-01-23 17:52:27 +00:00
Gregory Nutt
f546801fb3 Squashed commit of the following:
arch/arm/src/tiva/hardware:  Add CC13xx SMPH and AUX SMPH header files.  Still need DDI0 OSC header file for CC13x0 compilation.

    arch/arm/src/tiva/cc13xx:  A few changes toward getting the launchxl-cc1310/nsh configuration to build
2019-01-23 11:48:50 -06:00
Gregory Nutt
6d2b832ccc arch/arm/src/tiva/cc13xx: Fixes to get a clean build of the configs/launchxl-cc1312r1 configuration. Still untested. 2019-01-23 09:04:19 -06:00
Alan Carvalho de Assis
795e880ff6 arch/arm/src/samd2l2/sam_serial.c: Add missing RS-485 DIR pin write to sam_serial.c 2019-01-22 17:37:26 -06:00
Gregory Nutt
f41b9fead9 arch/arm/src/tiva/cc13xx: The trim files from the TI DriverLib now compile successfully. This merge also brings in the ROM files from the TI DriverLib which do NOT year compile correctly. This is still a work in progress. There merge also adds unverified support for the LaunchXL-CC1310.
Squashed commit of the following:

    confgs/launchxl-cc1310:  Add board support for the LaunchXL-CC1310.  This is a work in progress and does not yet build error free.

     arch/arm/src/tiva/cc13xx: cc13x0_trim.c now compiles; Make xxx_rom.h header files conform a little more closely to the NuttX coding style.

    arch/arm/src/tiva/cc13xx:  CC13x2 (V1 and V2) rom.c files now build with no errors or warnings. Still have to work through the CC13x0 version.

    arch/arm/src/tiva/hardware:  Add CC13x0/CC13x2_CC26x2 AON BATMON register definition header file.

    arch/arm/src/tiva/cc13xx: A little more progress converting TI DriverLib ROM code to NuttX coding style.  Lots of possibilities for breakage here!

    arch/arm/src/tiva/cc13xx:  Remove functions from cc13x._rom.c that are defined from ROM access in cc13x._rom.h; Add prototypes in cc13x._rom.h for functions in cc13x._rom.c that are not defined in cc13x._rom.h.

    arch/arm/src/tiva/cc13xx:  Remove some dangling whitespace at the end of lines.

    arch/arm/src/tiva/cc13xx:  Second (and final) round of name changes to get ROM function-like defines consistent with NuttX coding standard

    arch/arm/src/tiva/cc13xx:  Fix a few errors in last big name conversion.

    arch/arm/src/tiva/cc13xx:  First round of name changes to get ROM function-like defines consistent with NuttX coding standard

    arch/arm/src/tiva/cc13xx:  Remove ROM_ prefix from function-like defines.
2019-01-22 15:21:58 -06:00
Gregory Nutt
a8da0e977a Addition of trivial comment 2019-01-22 13:04:02 -06:00
Jussi Kivilinna
434cad4d17 arch/arm/src/stm32f7/stm32_lse.c: Add configuration of LSE oscillator drive capability 2019-01-22 06:37:02 -06:00
Gregory Nutt
1b53b9eec1 Clarification of new TODO list issue. 2019-01-21 09:29:08 -06:00
Gregory Nutt
aa99e2d6da Squashed commit of the following:
arch/arm/src/tiva/hardware:  Completes the CC13x2 AUX SYSIF header file.

    arch/arm/src/tiva/hardware:  Progress on the CC13x2 AUX SYSIF header file.  Almost complete.

    arch/arm/src/tiva/hardware:  Port needs aux_sysif.h header file.

    arch/arm/src/tiva/cc13xx/cc13x0_rom.h:  Fix a typo

    arch/arm/src/tiva/cc13xx:  More changes to TI DriverLib ROM header files for NuttX coding standard.

    arch/arm/src/tiva/cc13xx:  Convert some (but not all) TI DriverLib ROM function names to NuttX coding standard.  More to be done.

    arm/src/tiva/cc13xx:  ROM header files: missed a couple of conversions of sructure field names to lower case (vs CamelCase).

    arm/src/tiva/cc13xx:  ROM header files: type'ed names must be lower case per coding standard (not upper case); structure field names must be lower case per coding standard (not CamelCase).

     arch/arm/src/tiva/cc13xx:  Trim logic needs to include matching ROM DriverLib interface header file.

    arch/arm/src/tiva/cc13xx:  Add ROM DriverLib header files.  Do not yet fully conform to the NuttX coding style.
2019-01-20 17:59:22 -06:00
Alan Carvalho de Assis
a34c9733bc arch/arm/src/samd2l2: Add RS485 support to SAMD2L2 serial 2019-01-20 12:43:42 -06:00