Commit Graph

15505 Commits

Author SHA1 Message Date
Andrey Zabolotnyi e5f5509054
stm32h7: Added basic support for STM32H753II. (#527)
Co-authored-by: Андрей Заболотный <zapparello@ya.ru>
2020-03-10 07:55:18 -07:00
Ouss4 a506012074 arch/arm/src/stm32/stm32_uart.h: Fix nxstyle complaints. 2020-03-10 06:53:00 -05:00
Markus Bernet b50aa49953 stm32/stm32f7/stm32h7: Fix bugs in SERIAL_CONSOLE definition 2020-03-10 08:08:20 -03:00
YAMAMOTO Takashi d4b0590abb Fix some nxstyle complaints in arm addrenv 2020-03-10 03:55:25 -05:00
Gregory Nutt 199b4d6852 z20x: Changes to reduce serial Rx data overrun
boards/z80/ez80/z20x:  Increase RX buffer size to 4Kb, reduce BAUD to 2400 in w25boot configuration
arch/z80/src/ez80/ez80_serial.c:  Reduce Rx FIFO trigger level for eZ80F92 to 1 so that will respond more quickly to incoming data.
2020-03-09 22:51:54 +01:00
Petro Karashchenko 3fa6baec98 spi: change spi_send() interface to support of 32-bit word transfer
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2020-03-09 08:03:35 -06:00
liuhaitao 29be471f58 sama5/serial: correct usage of USE_SERIALDRIVER and USE_EARLYSERIALINIT
Also fix the following build warning:
chip/sam_serialinit.c: In function 'sam_earlyserialinit':
chip/sam_serialinit.c:71:4: warning: implicit declaration of function 'uart_earlyserialinit'; did you mean 'sam_earlyserialinit'? [-Wimplicit-function-declaration]
   71 |    uart_earlyserialinit();
      |    ^~~~~~~~~~~~~~~~~~~~
      |    sam_earlyserialinit

Change-Id: I93adc5be739c222482b552b6e143e44c8c047794
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-03-09 08:00:56 -06:00
Gregory Nutt 4ae9ae9693 z80x: W25 Bootloader Improvements
boards/z80/ez80/z20x/src/w25_main.c:  Improve user interface.

There is still an error occurring while downloading Intex HEX files to FLASH.  That is unrelated to this and appears to be a problem libs/libc/hex2gbin/lib_hex2bin.c
2020-03-08 23:33:04 +01:00
Johanne Schock 757c37fbc9 fixed long line warnings from nxstyle 2020-03-08 08:52:46 -06:00
Johanne Schock ac1f5d673a Fixed formatting and comments in board.h and kinetis_k28memorymap.h
Fixed clock calculation in board.h
2020-03-08 08:52:46 -06:00
Johanne Schock 050e45bfe7 Changes for Freedom K28 USB device support 2020-03-07 13:07:37 -06:00
Gregory Nutt faca2f220e z20x: Timer/Spi Fixes
arch/z80/src/ez80/ez80_timerisr.c:  Fix an error that looks the file got damaged by a bad keystroke in the editor while a string was highlighted.
boards/z80/ez80/z20x/src/ez80_spi.c:  Fix some bad conditional compilationi. Prevented W25 chip select from being initialized.
2020-03-07 17:30:02 +01:00
Gregory Nutt 493b8de938 Revert "Change SAMA5 files to have apache license headers:"
This reverts commit f735584514.

These header changes introduce unacceptable errors:

1. The changes alter the width of the initial block comment.  That will cause nxstyle failures on most of the files.

2. The third line of the header is an (optional) short description of content of the the file.  This change erroneously removes that line.

Automated header file changes can screw up a lot of files, very quickly.
2020-03-07 08:47:48 -03:00
Gregory Nutt 78563d555a arch/z80/src/ez80/ez80_spi.c: Correct oversight in previous commit
Commit 797e45d6bf attempted to reduce the frequency of SPI reconfiguration by keeping track of the current frequency and mode settings and changing these settings only when the new settings differ from the old settings.

However, the original commit neglected to save the new frequency setting and, hence, was not effective in what it was trying to do:  Every time the SPI setfrequency() method was called, it still looked like a new frequency and the frequency was still reconfigured, even though it hadn't really changed.
2020-03-07 09:59:23 +01:00
Adam Feuer 2478d12a0a arch/arm/src/sama5/hardware/_sama5d3x_memorymap.h: Restore lines (#464)
Restore lines from bad nxstyle fixes; restore file to previous state
2020-03-06 16:51:15 -06:00
Gregory Nutt 797e45d6bf z20x: SPI and timer fixes
arch/z80/src/ez80/ez80_spi.c:  Add logic checks to eliminate unnecessary SPI reconfiguration.
arch/z80/src/ez80/ez80_timerisr.c and arch/z80/src/ez80/ez80f92.h:  Fix numerous places where configurations began with CONFIGS_ instead of CONFIG_
2020-03-06 23:28:35 +01:00
Gregory Nutt ee9949a724 z20x: Fix some SPI/W25/Timer issues.
arch/z80/src/ez80/ez80_spi.c:  Do not configure SPI chip select pin.  It is not used by the driver and configuring it just clobbers other usage of that pin.  Add some additional debug outputs; correct some exiting debug outputs.

drivers/mtd/w25.c:  Add some debug output.

boards/z80/ez80/z20x/src/ez80_w25.c:  Correct SPI bus number used in initialization.  Only SPI1 is supported.

arch/z80/src/ez80/ez80_timerisr.c:  Some initial timer configuration fixes.
2020-03-06 21:09:14 +01:00
Juha Niskanen 9f6df9ce62 arch/arm/src/stm32l4/stm32l4_iwdg.c: Do not unconditionally enable debug
The DBGMCU_APB1_FZ bit persists over regular software resets until next POR-reset. It can impact device power consumption and things that persist over resets are a bane for FOTA updates so make it disabled by default.

OpenOCD sets this via DAP when connecting to target so enabling this from Kconfig is only useful for users of some other debug tooling.
2020-03-06 07:09:35 -06:00
Adam Feuer f735584514 Change SAMA5 files to have apache license headers:
- No code changes
- All files are now utf-8 encoded
- Some non-utf-8 characters in comments were changed or removed
2020-03-06 10:33:08 +00:00
Masayuki Ishikawa da3fb9c94f arch: xtensa: Call the waiti instruction in up_idle()
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2020-03-06 01:46:09 -06:00
patacongo 730133d84a SAMA5D27 peripheral support - USB Host working (#444)
* SAMA5D27 peripheral support - USB Host working

    - updated nsh defconfig with vfat for testing USB Host
    - sama5d2_xult: USB Host worked.
    - ported sam_bringup.c code from sama5d3-xplained
    - USB 2.0 HS now working
    - other perpherals may work, but haven't been tested

* update license headers to approve NuttX Apache-2.0
2020-03-05 18:24:11 -06:00
Gregory Nutt 859d694c78 z20x: Correct RAM wait states. 2020-03-05 17:49:58 -03:00
Gregory Nutt de07abe632 ez80f92: Interrupt improvements.
arch/z80/: include/ez80/irq.h, src/ez80/ez80f92_*.asm:  Correct some comments related to vector address offsets.
boards/z80/ez80/z20x/scripts/z20x_loader.linkcmd:  Fix RAM offset in linker script
2020-03-05 18:54:24 +01:00
Masayuki Ishikawa a5cb0b3731 arch: xtensa: Fix SMP related logic
NOTE: Applied the same logic as in other SMP architectures
2020-03-04 23:34:43 -06:00
liuhaitao b27cbf6de1 arch/x86: correct typo error to fix x86 boards build break 2020-03-04 07:03:22 -06:00
Masayuki Ishikawa e16c3ca25b arch: esp32: Fix compile error with xtensa-esp32-elf-gcc 8.2.0 2020-03-04 03:51:13 -06:00
liuhaitao 923c05f17f arch/x86_64: fix two typo errors to pass build
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-03-04 00:42:32 -06:00
Sonic Yang b984752aec Flat address x86_64 port of Nuttx (#411)
* arch: x86_64: Pour-in the x86_64 code from cRTOS repository, excluding modifications of NuttX kernel, jailhouse support and linux compatibility layer

* arch: x86_64: Refactor x86_64 loading procedure for better comprehension and included support for multiboot2

* arch: x86_64: Locate the kernel at 4GB~ and modify the page table initializing procedure accordingly

* arch: x86_64: Implemented kconfig option for various x86_64 capabilities, dynamic probe and check capability on lowsetup before enabling

* arch: x86_64: inte64_check_capability: Use Marco to prettify the capability checking procedure

* arch: x86_64: intel64_timerisr.c: Refactor with new frequency calibrating method

* arch: x86_64: Fix C alias of page table and GDT/IST

* arch: x86_64: Reload GTDR with GDT in high address in up_lowsetup

* arch: x86_64: Consolidate MSR definition in arch/arch.h

* arch: x86_64: Edit the way of handling GDT/IST in C into structures

* arch: x86_64: Correct the starting point of isr/irq stack

* arch: x86_64: Update up_initialize.c with the new initializing procedure

* arch: x86_64: up_map_region now take flags instead of assuming WR/PRESENT

* arch: x86_64: Overhual of interrupt initialization procedure

* arch: x86_64: Properly configure the heap to be memory as [_ebss, end of memory]

* arch: x86_64: Try to probe the TSC frequency, fall-back to user specified frequency on failure

* arch: x86_64: Remove debug printing during restore_aux, causing infinite CTX bug

* arch: x86_64: for X86 16500 serial interrupt to work, OUT2 of MCR must be 1. Make it stuck at 1 after boot

* arch: x86_64: Correctly apply license header, comment and format code

* arch: x86_64: properly send a SIGFPE on floating point error

* arch: x86_64: Remove unused variable in up_restore_auxstate

* arch: x86_64: properly trash the processor with an infinite loop

* arch: x86_64: Fix typo in ISR handler causing ISR not handled

* arch: x86_64: Fix possibile race conditions with scheduler debug option on in signal handling path

* arch: x86_64: Fix typo in MSR_X2APIC_LVTT_TSC_DEADLINE

* arch: x86_64: Migrate tickless implementation to the new MSR naming and frequency calibration method

* board: x86_64: qemu: Add guard to exclude up_netinitialize when compiling without net support

* arch: x86_64: update defconfigs

* arch: x86_64: rename qemu as qemu-intel64

* arch: x86_64: update Board readme
2020-03-03 19:02:59 -06:00
GOERLITZ Otmar 9623ffaf6d arch/arm/src/stm32/hardware/stm32f30xxx_rcc.h: Correction to RCC_CFGR3 definitions 2020-03-03 17:23:50 -06:00
Gregory Nutt 2eff5a6c63 z20X: Continued development of the W25 Bootloader.
Kconfig files.  Repartition some functionality.  Bootloader support will need to be provided in logic under arch/z80/src/ez80 so the critical configuration selections were moved the Kconfig file there.

arch/z80/src/ez80/ez80_i2c.h:  Rename arch/z80/src/ez80/ez80f91_i2c.h.  It is sharable by both ez80f91 and ez80f92.

arch/z80/src/ez80/:  Add logic to perform an additional level of interrupt redirection.  This is necessary because the the interrupt handling is part of the loader FLASH-based logic.  In order to share interrupts with the program loaded into RAM by the loader, another layer or redirection is required to get control to the interrupt handlers in the loaded program.  See ez809f2_loader.asm and ez80f92_program.asm

boards/z80/ez80/z20x/scripts:  Reduce size of the interrupt re-direction buffer from 1Kb to 512b.
2020-03-03 19:39:57 -03:00
Gregory Nutt a21120e3b6 Correct PR424 to coding standard
Run all .c files modified by PR424 through nxstyle and correct most of the complaints (many long line complaints ignored for now).  Update file headers to use Apache 2.0 license.
2020-03-03 13:59:54 -06:00
Daniel Agar 415fc17e98 stm32h7: spi_exchange (no dma) available with CONFIG_STM32H7_SPI_DMATHRESHOLD 2020-03-03 13:30:52 -06:00
Daniel Agar a0169e4c37 stm32f7: spi_exchange (no dma) available with CONFIG_STM32F7_SPI_DMATHRESHOLD 2020-03-03 13:30:52 -06:00
Daniel Agar 0600d08d1a stm32: spi_exchange (no dma) available with CONFIG_STM32_SPI_DMATHRESHOLD 2020-03-03 13:30:52 -06:00
GAEHWILER Reto e31f0f37f1 arch/arm/src/stm32h7/stm32_ethernet.c: Fix for network lock downs
Fix for network lock downs due to not freed buffers
2020-03-03 09:33:18 -06:00
GAEHWILER Reto 85e461c59c STM32H7/STM32F30: Typos, register correction and extension
* Correction in stm32h7x3xx_rcc
* Adding GPIO_TIM2_CH1OUT_1 to stm32f30xxx_pinmap
* Comment typo fix in drivers/mmcsd/mmcsd_spi.c
2020-03-03 09:20:58 -06:00
GAEHWILER Reto 7ffb5c11a0 arch/arm/src/stm32h7/stm32_ethernet.c: Re-organization of stm32_phy_boardinitialize
PHY has to be up and running before ethreset call
2020-03-03 09:18:02 -06:00
Juha Niskanen f3490e42c3 Fix typos in comments 2020-03-03 09:11:57 -06:00
johannes-nivus a7d783d463 NXP Freedom K28F Board SD-Card support (#423)
* Adds SDHC support for NXP Freedom-K28F
2020-03-03 09:06:17 -06:00
rajeshwaribhat e671a10b2a RX65N RTC Driver added 2020-03-03 08:30:49 -06:00
Daniel Agar 30a48e4217 arm/stm32h7 add STM32H7_SPI_DMATHRESHOLD 2020-03-02 23:08:12 +01:00
Daniel Agar c10fbbbb5f stm32f76xx77xx_dma.h fix DMAMAP_SPI2_RX_2/DMAMAP_SPI2_TX_2 2020-03-02 23:08:12 +01:00
Daniel Agar 608b59792e arm/stm32f7 add STM32F7_SPI_DMATHRESHOLD 2020-03-02 23:08:12 +01:00
Daniel Agar afb2248b7a arm/stm32 add STM32_SPI_DMATHRESHOLD 2020-03-02 23:08:12 +01:00
Augusto Fraga Giachero 0be87af99d arch/arm/src/lpc17xx_40xx/lpc17_40_i2c.c: Cancel timeout on i2c stop
Not canceling the I2C timeout watch dog immediately after finishing
all I2C transactions in interrupt context can lead to a race condition
due to nxsem_wait(&priv->wait) in lpc17_40_i2c_start() not resuming
execution fast enough (this can be easily triggered if another task /
thread is using a lot of cpu time).

Falling to cancel the watchdog up to time will cause the priv->wait
semaphore to be incremented twice (first by lpc17_40_i2c_stop() then
by lpc17_40_i2c_timeout()), so all I2C transactions after that will
return immediately and priv->msgs will hold pointers to memory it
doesn't own anymore.

Canceling the priv->timeout watch dog in lpc17_40_i2c_stop() prevents
this as it is executed from the I2C interrupt handler.

arch/arm/src/lpc17xx_40xx/lpc17_40_i2c.c: Fix timeout calculation

For each byte received / transmitted, an acknowledge bit is also
transmitted / received, requiring effectively 9 bits for each byte.
2020-03-02 22:14:05 +01:00
Gregory Nutt e814977c0f boards/z80/ez80/z20x/: Add W25 bootloader
The SD boot loader was not satisfactory because 1) the SD slot is on an optional board and, hence, cannot be part of a fundamental solution.  And 2) it is too big.

The only storage on borard is the Winbond W25 SPI-bsed FLASH.  This commit adds support for a bootload to 1) read code in HEX format from a serial port and write it to the W25 FLASH, or 2) read code in binary form from the W25 FLASH into SRAM and execute the loaded program.

boards/z80/ez80/z20x/configs:  Added w25boot configuration
boards/z80/ez80/z20x/src:  Add bootloader logic, w25_main.c.  Add logic to manage shared SRAM memory map so that the loaded program does not clobber the bootloader memory.  Add logic to recover the bootloader memory into the heap after the loaded program as started.
boards/z80/ez80/z20x/scripts:  Rework scripts and configuration to support a bootloader and program build.  The boolloader cannot use all of SRAM; the program must not clobber the SRAM region used by the bootloader.
2020-03-02 14:05:09 -03:00
David Sidrane fd3148dba6
imxrt: Adds the ability to run from OCRAM (#407)
* imxrt: GPIO make tables const
* imxrt: Call out to board to set up FlexRAM
* imxrt: Add Knob for adding the ROM bootloaders 40Kib of RAM to heap
* imxrt: imxrt1060-evk:Add the ability to run from OCRAM
2020-03-01 06:05:42 -06:00
David Sidrane 4a4b2853c2
Add USB Device support for i.MX RT (#408)
* arch/arm/src/imxrt/imxrt_usbdev.c: Add USB Device support for i.MX RT (USB OTG1)

Based on the LPC43xx USB Device driver.

* imxrt:usbotg Nxstyle fixes

Co-authored-by: thomasactia <61285689+thomasactia@users.noreply.github.com>
2020-02-29 14:03:52 -08:00
Gregory Nutt 41ef33bded eZ80: Fix optimization issues
board/z80/ez80/*/scripts/Make.defs:  Fix optimization definition use in assembly flags.  It was using the compiler optimization settings instead of the assembler optimization settings.  Hence, enabling optimization would could cause assembler command line errors.

arch/z80/src/ez80/Toolchain.defs:  Back out some work arounds.  Now compiler optimization flags can again set set without assembler command line errors.

boards/z80/ez80/z20x/README.txt:  Trivial update to size/optimization discussion.
2020-02-29 12:43:28 -03:00
Joshua Lange 0ce4e15363 Improvements to STM32H7: (i,w)WDG Flash, Ethernet, ADC, etc 2020-02-29 12:33:25 -03:00