Merge remote-tracking branch 'origin/master' into beacon802154
This commit is contained in:
commit
e2dc0c4de8
@ -108,6 +108,16 @@ config ARMV7M_TOOLCHAIN_GNU_EABIW
|
|||||||
bool "Generic GNU EABI toolchain under Windows"
|
bool "Generic GNU EABI toolchain under Windows"
|
||||||
depends on TOOLCHAIN_WINDOWS
|
depends on TOOLCHAIN_WINDOWS
|
||||||
select ARCH_TOOLCHAIN_GNU
|
select ARCH_TOOLCHAIN_GNU
|
||||||
|
|
||||||
|
config ARMV7M_TOOLCHAIN_CLANGL
|
||||||
|
bool "Generic Clang toolchain under Linux (or other POSIX environment)"
|
||||||
|
depends on !WINDOWS_NATIVE
|
||||||
|
select ARCH_TOOLCHAIN_GNU
|
||||||
|
|
||||||
|
config ARMV7M_TOOLCHAIN_CLANGW
|
||||||
|
bool "Generic Clang toolchain under Windows"
|
||||||
|
depends on TOOLCHAIN_WINDOWS
|
||||||
|
select ARCH_TOOLCHAIN_GNU
|
||||||
---help---
|
---help---
|
||||||
This option should work for any modern GNU toolchain (GCC 4.5 or newer)
|
This option should work for any modern GNU toolchain (GCC 4.5 or newer)
|
||||||
configured for arm-none-eabi.
|
configured for arm-none-eabi.
|
||||||
|
@ -102,6 +102,18 @@ ifeq ($(filter y, \
|
|||||||
CONFIG_ARMV7M_TOOLCHAIN ?= GNU_EABIW
|
CONFIG_ARMV7M_TOOLCHAIN ?= GNU_EABIW
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(filter y, \
|
||||||
|
$(CONFIG_ARMV7M_TOOLCHAIN_CLANGL) \
|
||||||
|
),y)
|
||||||
|
CONFIG_ARMV7M_TOOLCHAIN ?= CLANGL
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(filter y, \
|
||||||
|
$(CONFIG_ARMV7M_TOOLCHAIN_CLANGW) \
|
||||||
|
),y)
|
||||||
|
CONFIG_ARMV7M_TOOLCHAIN ?= CLANGW
|
||||||
|
endif
|
||||||
|
|
||||||
#
|
#
|
||||||
# Supported toolchains
|
# Supported toolchains
|
||||||
#
|
#
|
||||||
@ -255,6 +267,27 @@ ifeq ($(CONFIG_ARMV7M_TOOLCHAIN),GNU_EABIW)
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Clang toolchain on OS X, Linux or any typical Posix system
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_ARMV7M_TOOLCHAIN),CLANGL)
|
||||||
|
CROSSDEV ?= arm-none-eabi-
|
||||||
|
ARCROSSDEV ?= arm-none-eabi-
|
||||||
|
MAXOPTIMIZATION ?= -Os
|
||||||
|
ARCHCPUFLAGS = $(TOOLCHAIN_MCPU) -mthumb $(TOOLCHAIN_MFLOAT)
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Clang toolchain under Windows
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_ARMV7M_TOOLCHAIN),CLANGW)
|
||||||
|
CROSSDEV ?= arm-none-eabi-
|
||||||
|
ARCROSSDEV ?= arm-none-eabi-
|
||||||
|
MAXOPTIMIZATION ?= -Os
|
||||||
|
ARCHCPUFLAGS = $(TOOLCHAIN_MCPU) -mthumb $(TOOLCHAIN_MFLOAT)
|
||||||
|
ifeq ($(CONFIG_WINDOWS_CYGWIN),y)
|
||||||
|
WINTOOL = y
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
# Raisonance RIDE7 under Windows
|
# Raisonance RIDE7 under Windows
|
||||||
|
|
||||||
ifeq ($(CONFIG_ARMV7M_TOOLCHAIN),RAISONANCE)
|
ifeq ($(CONFIG_ARMV7M_TOOLCHAIN),RAISONANCE)
|
||||||
|
117
configs/nucleo-f4x1re/f401-nsh-clang/Make.defs
Normal file
117
configs/nucleo-f4x1re/f401-nsh-clang/Make.defs
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
############################################################################
|
||||||
|
# configs/nucleo-f4x1re/f401-nsh-clang/Make.defs
|
||||||
|
#
|
||||||
|
# Copyright (C) 2017 Gregory Nutt. All rights reserved.
|
||||||
|
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
|
#
|
||||||
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
# modification, are permitted provided that the following conditions
|
||||||
|
# are met:
|
||||||
|
#
|
||||||
|
# 1. Redistributions of source code must retain the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer.
|
||||||
|
# 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer in
|
||||||
|
# the documentation and/or other materials provided with the
|
||||||
|
# distribution.
|
||||||
|
# 3. Neither the name NuttX nor the names of its contributors may be
|
||||||
|
# used to endorse or promote products derived from this software
|
||||||
|
# without specific prior written permission.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||||
|
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||||
|
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||||
|
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||||
|
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||||
|
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||||
|
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||||
|
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
# POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
#
|
||||||
|
############################################################################
|
||||||
|
|
||||||
|
include ${TOPDIR}/.config
|
||||||
|
include ${TOPDIR}/tools/Config.mk
|
||||||
|
include ${TOPDIR}/arch/arm/src/armv7-m/Toolchain.defs
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_ARCH_CHIP_STM32F401RE),y)
|
||||||
|
LDSCRIPT = f401re.ld
|
||||||
|
else
|
||||||
|
ifeq ($(CONFIG_ARCH_CHIP_STM32F411RE),y)
|
||||||
|
LDSCRIPT = f411re.ld
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(WINTOOL),y)
|
||||||
|
# Windows-native toolchains
|
||||||
|
DIRLINK = $(TOPDIR)/tools/copydir.sh
|
||||||
|
DIRUNLINK = $(TOPDIR)/tools/unlink.sh
|
||||||
|
MKDEP = $(TOPDIR)/tools/mkwindeps.sh
|
||||||
|
ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}"
|
||||||
|
ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}"
|
||||||
|
ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)}"
|
||||||
|
else
|
||||||
|
# Linux/Cygwin-native toolchain
|
||||||
|
MKDEP = $(TOPDIR)/tools/mkdeps$(HOSTEXEEXT)
|
||||||
|
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
|
||||||
|
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
||||||
|
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)
|
||||||
|
endif
|
||||||
|
|
||||||
|
CC = clang
|
||||||
|
CXX = clang++
|
||||||
|
CPP = clang -E
|
||||||
|
LD = $(CROSSDEV)ld
|
||||||
|
AR = $(ARCROSSDEV)ar rcs
|
||||||
|
NM = $(ARCROSSDEV)nm
|
||||||
|
OBJCOPY = $(CROSSDEV)objcopy
|
||||||
|
OBJDUMP = $(CROSSDEV)objdump
|
||||||
|
|
||||||
|
ARCHCCVERSION = {shell $(CC) -v 2>&1 | sed -n '/clang version/p' | sed -e 's/.* clang version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g'}
|
||||||
|
ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1}
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
||||||
|
ARCHOPTIMIZATION = -g
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifneq ($(CONFIG_DEBUG_NOOPT),y)
|
||||||
|
ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fomit-frame-pointer
|
||||||
|
endif
|
||||||
|
|
||||||
|
ARCHCFLAGS = -fno-builtin -nostdlib -ffreestanding -target arm-none-eabi -march=armv7-m -mcpu=cortex-m4
|
||||||
|
ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -nostdlib -ffreestanding -target arm-none-eabi -march=armv7-m -mcpu=cortex-m4 -DCONFIG_WCHAR_BUILTIN
|
||||||
|
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef
|
||||||
|
ARCHWARNINGSXX = -Wall -Wshadow -Wundef
|
||||||
|
ARCHDEFINES =
|
||||||
|
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
|
||||||
|
|
||||||
|
CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
|
||||||
|
CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
|
||||||
|
CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
|
||||||
|
CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
|
||||||
|
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||||
|
AFLAGS = $(CFLAGS) -D__ASSEMBLY__
|
||||||
|
|
||||||
|
NXFLATLDFLAGS1 = -r -d -warn-common
|
||||||
|
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-pcrel.ld -no-check-sections
|
||||||
|
LDNXFLATFLAGS = -e main -s 2048
|
||||||
|
|
||||||
|
ASMEXT = .S
|
||||||
|
OBJEXT = .o
|
||||||
|
LIBEXT = .a
|
||||||
|
EXEEXT =
|
||||||
|
|
||||||
|
ifneq ($(CROSSDEV),arm-nuttx-elf-)
|
||||||
|
LDFLAGS += -nostartfiles -nodefaultlibs
|
||||||
|
endif
|
||||||
|
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
||||||
|
LDFLAGS += -g
|
||||||
|
endif
|
||||||
|
|
||||||
|
HOSTCC = clang
|
||||||
|
HOSTINCLUDES = -I.
|
||||||
|
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -g -pipe
|
||||||
|
HOSTLDFLAGS =
|
1296
configs/nucleo-f4x1re/f401-nsh-clang/defconfig
Normal file
1296
configs/nucleo-f4x1re/f401-nsh-clang/defconfig
Normal file
File diff suppressed because it is too large
Load Diff
@ -1629,10 +1629,17 @@ Debugging
|
|||||||
orientation of the JTAG connection.
|
orientation of the JTAG connection.
|
||||||
|
|
||||||
I have been using Atmel Studio to write code to flash then I use the Segger
|
I have been using Atmel Studio to write code to flash then I use the Segger
|
||||||
J-Link GDB server to debug. I have been using the 'Device Programming' I
|
J-Link GDB server to debug. I have been using the 'Device Programming'
|
||||||
available under the Atmel Studio 'Tool' menu. I have to disconnect the
|
available under the Atmel Studio 'Tool' menu. I have to disconnect the
|
||||||
SAM-ICE while programming with the EDBG. I am sure that you could come up
|
SAM-ICE while programming with the EDBG.
|
||||||
with a GDB server-only solution if you wanted.
|
|
||||||
|
You can also load code into flash directory with J-Link:
|
||||||
|
|
||||||
|
arm-none-eabi-gdb
|
||||||
|
(gdb) target remote localhost:2331
|
||||||
|
(gdb) mon reset
|
||||||
|
(gdb) mon halt
|
||||||
|
(gdb) load nuttx
|
||||||
|
|
||||||
I run GDB like this from the directory containing the NuttX ELF file:
|
I run GDB like this from the directory containing the NuttX ELF file:
|
||||||
|
|
||||||
@ -1856,23 +1863,67 @@ Configuration sub-directories
|
|||||||
boards are the endpoints in the start.
|
boards are the endpoints in the start.
|
||||||
|
|
||||||
NOTES:
|
NOTES:
|
||||||
1. This configuration derives from the netnsh configuration, but adds
|
1. The serial console is configured by default for use with and Arduino
|
||||||
|
serial shield (UART3). You will need to reconfigure if you will
|
||||||
|
to use a different U[S]ART.
|
||||||
|
|
||||||
|
2. This configuration derives from the netnsh configuration, but adds
|
||||||
support for IPv6, 6LoWPAN, and the MRF24J40 IEEE 802.15.4 radio.
|
support for IPv6, 6LoWPAN, and the MRF24J40 IEEE 802.15.4 radio.
|
||||||
|
|
||||||
2. This configuration uses the Mikroe BEE MRF24j40 click boards and
|
3. This configuration uses the Mikroe BEE MRF24j40 click boards and
|
||||||
connects to the SAMV71-XULT using a click shield as described above.
|
connects to the SAMV71-XULT using a click shield as described above.
|
||||||
|
|
||||||
3. You must must have also have at least two clicker2-stm32 boards each
|
4. You must must have also have at least two clicker2-stm32 boards each
|
||||||
with an MRF24J40 BEE click board in order to run these tests.
|
with an MRF24J40 BEE click board in order to run these tests.
|
||||||
|
|
||||||
4. Telnet: The clicker2-stm32 star point configuration supports the
|
5. The network initialization thread is NOT enabled. As a result, the
|
||||||
|
startup will hang if the Ethernet cable is not plugged in. For more
|
||||||
|
information, see the paragraphs above entitled "Network Initialization
|
||||||
|
Thread" and "Network Monitor".
|
||||||
|
|
||||||
|
6. This configuration supports logging of debug output to a circular
|
||||||
|
buffer in RAM. This feature is discussed fully in this Wiki page:
|
||||||
|
http://nuttx.org/doku.php?id=wiki:howtos:syslog . Relevant
|
||||||
|
configuration settings are summarized below:
|
||||||
|
|
||||||
|
Device Drivers:
|
||||||
|
CONFIG_RAMLOG=y : Enable the RAM-based logging feature.
|
||||||
|
CONFIG_RAMLOG_CONSOLE=n : (We don't use the RAMLOG console)
|
||||||
|
CONFIG_RAMLOG_SYSLOG=y : This enables the RAM-based logger as the
|
||||||
|
system logger.
|
||||||
|
CONFIG_RAMLOG_NONBLOCKING=y : Needs to be non-blocking for dmesg
|
||||||
|
CONFIG_RAMLOG_BUFSIZE=8192 : Buffer size is 8KiB
|
||||||
|
|
||||||
|
NOTE: This RAMLOG feature is really only of value if debug output
|
||||||
|
is enabled. But, by default, no debug output is disabled in this
|
||||||
|
configuration. Therefore, there is no logic that will add anything
|
||||||
|
to the RAM buffer. This feature is configured and in place only
|
||||||
|
to support any future debugging needs that you may have.
|
||||||
|
|
||||||
|
If you don't plan on using the debug features, then by all means
|
||||||
|
disable this feature and save 8KiB of RAM!
|
||||||
|
|
||||||
|
NOTE: There is an issue with capturing data in the RAMLOG: If
|
||||||
|
the system crashes, all of the crash dump information will go into
|
||||||
|
the RAMLOG and you will be unable to access it! You can tell that
|
||||||
|
the system has crashed because (a) it will be unresponsive and (b)
|
||||||
|
the LD2 will be blinking at about 2Hz.
|
||||||
|
|
||||||
|
You can also reconfigure to use stdout for debug output be disabling
|
||||||
|
all of the CONFIG_RAMLOG* settings listed above and enabling the
|
||||||
|
following in the .config file:
|
||||||
|
|
||||||
|
CONFIG_SYSLOG_CONSOLE=y
|
||||||
|
CONFIG_SYSLOG_SERIAL_CONSOLE=y
|
||||||
|
|
||||||
|
7. Telnet: The clicker2-stm32 star point configuration supports the
|
||||||
Telnet daemon, but not the Telnet client; the star hub configuration
|
Telnet daemon, but not the Telnet client; the star hub configuration
|
||||||
supports the Telnet client, but not the Telnet daemon. Therefore,
|
supports the Telnet client, but not the Telnet daemon. Therefore,
|
||||||
the star hub can Telnet to any point in the star, the star endpoints
|
the star hub can Telnet to any point in the star, the star endpoints
|
||||||
cannot initiate telnet sessions.
|
cannot initiate telnet sessions.
|
||||||
|
|
||||||
5. TCP and UDP Tests: The same TCP and UDP tests as described for
|
8. TCP and UDP Tests: The same TCP and UDP tests as described for
|
||||||
the clicker2-stm32 mrf24j40-starpoint coniguration are supported on
|
the clicker2-stm32 mrf24j40-starpoint configuration are supported on
|
||||||
the star endpoints, but NOT on the star hub. Therefore, all network
|
the star endpoints, but NOT on the star hub. Therefore, all network
|
||||||
testing is between endpoints with the hub acting, well, only like a
|
testing is between endpoints with the hub acting, well, only like a
|
||||||
hub.
|
hub.
|
||||||
|
@ -219,8 +219,8 @@ CONFIG_SAMV7_HAVE_USBHS=y
|
|||||||
CONFIG_SAMV7_HAVE_USART0=y
|
CONFIG_SAMV7_HAVE_USART0=y
|
||||||
CONFIG_SAMV7_HAVE_USART1=y
|
CONFIG_SAMV7_HAVE_USART1=y
|
||||||
CONFIG_SAMV7_HAVE_USART2=y
|
CONFIG_SAMV7_HAVE_USART2=y
|
||||||
# CONFIG_SAMV7_SPI is not set
|
CONFIG_SAMV7_SPI=y
|
||||||
# CONFIG_SAMV7_SPI_MASTER is not set
|
CONFIG_SAMV7_SPI_MASTER=y
|
||||||
# CONFIG_SAMV7_SPI_SLAVE is not set
|
# CONFIG_SAMV7_SPI_SLAVE is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -246,7 +246,7 @@ CONFIG_SAMV7_HSMCI0=y
|
|||||||
# CONFIG_SAMV7_RTT is not set
|
# CONFIG_SAMV7_RTT is not set
|
||||||
# CONFIG_SAMV7_SDRAMC is not set
|
# CONFIG_SAMV7_SDRAMC is not set
|
||||||
# CONFIG_SAMV7_SMC is not set
|
# CONFIG_SAMV7_SMC is not set
|
||||||
# CONFIG_SAMV7_SPI0 is not set
|
CONFIG_SAMV7_SPI0=y
|
||||||
# CONFIG_SAMV7_SPI1 is not set
|
# CONFIG_SAMV7_SPI1 is not set
|
||||||
# CONFIG_SAMV7_SSC0 is not set
|
# CONFIG_SAMV7_SSC0 is not set
|
||||||
# CONFIG_SAMV7_TC0 is not set
|
# CONFIG_SAMV7_TC0 is not set
|
||||||
@ -254,18 +254,18 @@ CONFIG_SAMV7_HSMCI0=y
|
|||||||
# CONFIG_SAMV7_TC2 is not set
|
# CONFIG_SAMV7_TC2 is not set
|
||||||
# CONFIG_SAMV7_TC3 is not set
|
# CONFIG_SAMV7_TC3 is not set
|
||||||
# CONFIG_SAMV7_TRNG is not set
|
# CONFIG_SAMV7_TRNG is not set
|
||||||
CONFIG_SAMV7_TWIHS0=y
|
# CONFIG_SAMV7_TWIHS0 is not set
|
||||||
# CONFIG_SAMV7_TWIHS1 is not set
|
# CONFIG_SAMV7_TWIHS1 is not set
|
||||||
# CONFIG_SAMV7_TWIHS2 is not set
|
# CONFIG_SAMV7_TWIHS2 is not set
|
||||||
# CONFIG_SAMV7_UART0 is not set
|
# CONFIG_SAMV7_UART0 is not set
|
||||||
# CONFIG_SAMV7_UART1 is not set
|
# CONFIG_SAMV7_UART1 is not set
|
||||||
# CONFIG_SAMV7_UART2 is not set
|
# CONFIG_SAMV7_UART2 is not set
|
||||||
# CONFIG_SAMV7_UART3 is not set
|
CONFIG_SAMV7_UART3=y
|
||||||
# CONFIG_SAMV7_UART4 is not set
|
# CONFIG_SAMV7_UART4 is not set
|
||||||
# CONFIG_SAMV7_USBDEVHS is not set
|
# CONFIG_SAMV7_USBDEVHS is not set
|
||||||
# CONFIG_SAMV7_USBHOSTHS is not set
|
# CONFIG_SAMV7_USBHOSTHS is not set
|
||||||
# CONFIG_SAMV7_USART0 is not set
|
# CONFIG_SAMV7_USART0 is not set
|
||||||
CONFIG_SAMV7_USART1=y
|
# CONFIG_SAMV7_USART1 is not set
|
||||||
# CONFIG_SAMV7_USART2 is not set
|
# CONFIG_SAMV7_USART2 is not set
|
||||||
# CONFIG_SAMV7_WDT is not set
|
# CONFIG_SAMV7_WDT is not set
|
||||||
# CONFIG_SAMV7_RSWDT is not set
|
# CONFIG_SAMV7_RSWDT is not set
|
||||||
@ -285,10 +285,16 @@ CONFIG_SAMV7_GPIOD_IRQ=y
|
|||||||
# CONFIG_SAMV7_PROGMEM is not set
|
# CONFIG_SAMV7_PROGMEM is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
# TWIHS device driver options
|
# SPI Device Driver Configuration
|
||||||
#
|
#
|
||||||
CONFIG_SAMV7_TWIHS0_FREQUENCY=100000
|
CONFIG_SAMV7_SPI0_MASTER=y
|
||||||
CONFIG_SAMV7_TWIHS0_GLITCH_FILTER=1
|
|
||||||
|
#
|
||||||
|
# SPI Master Configuration
|
||||||
|
#
|
||||||
|
# CONFIG_SAMV7_SPI_CS_DECODING is not set
|
||||||
|
# CONFIG_SAMV7_SPI_VARSELECT is not set
|
||||||
|
# CONFIG_SAMV7_SPI_DMA is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
# HSMCI device driver options
|
# HSMCI device driver options
|
||||||
@ -493,8 +499,7 @@ CONFIG_NAME_MAX=32
|
|||||||
#
|
#
|
||||||
# RTOS hooks
|
# RTOS hooks
|
||||||
#
|
#
|
||||||
CONFIG_BOARD_INITIALIZE=y
|
# CONFIG_BOARD_INITIALIZE is not set
|
||||||
# CONFIG_BOARD_INITTHREAD is not set
|
|
||||||
# CONFIG_SCHED_STARTHOOK is not set
|
# CONFIG_SCHED_STARTHOOK is not set
|
||||||
# CONFIG_SCHED_ATEXIT is not set
|
# CONFIG_SCHED_ATEXIT is not set
|
||||||
# CONFIG_SCHED_ONEXIT is not set
|
# CONFIG_SCHED_ONEXIT is not set
|
||||||
@ -686,7 +691,7 @@ CONFIG_TELNET_TXBUFFER_SIZE=256
|
|||||||
CONFIG_NETDEV_MULTINIC=y
|
CONFIG_NETDEV_MULTINIC=y
|
||||||
CONFIG_ARCH_HAVE_NETDEV_STATISTICS=y
|
CONFIG_ARCH_HAVE_NETDEV_STATISTICS=y
|
||||||
CONFIG_NETDEV_STATISTICS=y
|
CONFIG_NETDEV_STATISTICS=y
|
||||||
CONFIG_NETDEV_LATEINIT=y
|
# CONFIG_NETDEV_LATEINIT is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
# External Ethernet MAC Device Support
|
# External Ethernet MAC Device Support
|
||||||
@ -706,8 +711,8 @@ CONFIG_ARCH_PHY_INTERRUPT=y
|
|||||||
# CONFIG_ETH0_PHY_KS8721 is not set
|
# CONFIG_ETH0_PHY_KS8721 is not set
|
||||||
# CONFIG_ETH0_PHY_KSZ8041 is not set
|
# CONFIG_ETH0_PHY_KSZ8041 is not set
|
||||||
# CONFIG_ETH0_PHY_KSZ8051 is not set
|
# CONFIG_ETH0_PHY_KSZ8051 is not set
|
||||||
# CONFIG_ETH0_PHY_KSZ8061 is not set
|
CONFIG_ETH0_PHY_KSZ8061=y
|
||||||
CONFIG_ETH0_PHY_KSZ8081=y
|
# CONFIG_ETH0_PHY_KSZ8081 is not set
|
||||||
# CONFIG_ETH0_PHY_KSZ90x1 is not set
|
# CONFIG_ETH0_PHY_KSZ90x1 is not set
|
||||||
# CONFIG_ETH0_PHY_DP83848C is not set
|
# CONFIG_ETH0_PHY_DP83848C is not set
|
||||||
# CONFIG_ETH0_PHY_LAN8720 is not set
|
# CONFIG_ETH0_PHY_LAN8720 is not set
|
||||||
@ -738,7 +743,7 @@ CONFIG_SERIAL_CONSOLE=y
|
|||||||
# CONFIG_UART0_SERIALDRIVER is not set
|
# CONFIG_UART0_SERIALDRIVER is not set
|
||||||
# CONFIG_UART1_SERIALDRIVER is not set
|
# CONFIG_UART1_SERIALDRIVER is not set
|
||||||
# CONFIG_UART2_SERIALDRIVER is not set
|
# CONFIG_UART2_SERIALDRIVER is not set
|
||||||
# CONFIG_UART3_SERIALDRIVER is not set
|
CONFIG_UART3_SERIALDRIVER=y
|
||||||
# CONFIG_UART4_SERIALDRIVER is not set
|
# CONFIG_UART4_SERIALDRIVER is not set
|
||||||
# CONFIG_UART5_SERIALDRIVER is not set
|
# CONFIG_UART5_SERIALDRIVER is not set
|
||||||
# CONFIG_UART6_SERIALDRIVER is not set
|
# CONFIG_UART6_SERIALDRIVER is not set
|
||||||
@ -747,7 +752,7 @@ CONFIG_SERIAL_CONSOLE=y
|
|||||||
# CONFIG_SCI0_SERIALDRIVER is not set
|
# CONFIG_SCI0_SERIALDRIVER is not set
|
||||||
# CONFIG_SCI1_SERIALDRIVER is not set
|
# CONFIG_SCI1_SERIALDRIVER is not set
|
||||||
# CONFIG_USART0_SERIALDRIVER is not set
|
# CONFIG_USART0_SERIALDRIVER is not set
|
||||||
CONFIG_USART1_SERIALDRIVER=y
|
# CONFIG_USART1_SERIALDRIVER is not set
|
||||||
# CONFIG_USART2_SERIALDRIVER is not set
|
# CONFIG_USART2_SERIALDRIVER is not set
|
||||||
# CONFIG_USART3_SERIALDRIVER is not set
|
# CONFIG_USART3_SERIALDRIVER is not set
|
||||||
# CONFIG_USART4_SERIALDRIVER is not set
|
# CONFIG_USART4_SERIALDRIVER is not set
|
||||||
@ -762,22 +767,22 @@ CONFIG_STANDARD_SERIAL=y
|
|||||||
# CONFIG_SERIAL_OFLOWCONTROL is not set
|
# CONFIG_SERIAL_OFLOWCONTROL is not set
|
||||||
# CONFIG_SERIAL_DMA is not set
|
# CONFIG_SERIAL_DMA is not set
|
||||||
CONFIG_ARCH_HAVE_SERIAL_TERMIOS=y
|
CONFIG_ARCH_HAVE_SERIAL_TERMIOS=y
|
||||||
CONFIG_USART1_SERIAL_CONSOLE=y
|
CONFIG_UART3_SERIAL_CONSOLE=y
|
||||||
# CONFIG_OTHER_SERIAL_CONSOLE is not set
|
# CONFIG_OTHER_SERIAL_CONSOLE is not set
|
||||||
# CONFIG_NO_SERIAL_CONSOLE is not set
|
# CONFIG_NO_SERIAL_CONSOLE is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
# USART1 Configuration
|
# UART3 Configuration
|
||||||
#
|
#
|
||||||
CONFIG_USART1_RXBUFSIZE=256
|
CONFIG_UART3_RXBUFSIZE=256
|
||||||
CONFIG_USART1_TXBUFSIZE=256
|
CONFIG_UART3_TXBUFSIZE=256
|
||||||
CONFIG_USART1_BAUD=115200
|
CONFIG_UART3_BAUD=115200
|
||||||
CONFIG_USART1_BITS=8
|
CONFIG_UART3_BITS=8
|
||||||
CONFIG_USART1_PARITY=0
|
CONFIG_UART3_PARITY=0
|
||||||
CONFIG_USART1_2STOP=0
|
CONFIG_UART3_2STOP=0
|
||||||
# CONFIG_USART1_IFLOWCONTROL is not set
|
# CONFIG_UART3_IFLOWCONTROL is not set
|
||||||
# CONFIG_USART1_OFLOWCONTROL is not set
|
# CONFIG_UART3_OFLOWCONTROL is not set
|
||||||
# CONFIG_USART1_DMA is not set
|
# CONFIG_UART3_DMA is not set
|
||||||
# CONFIG_PSEUDOTERM is not set
|
# CONFIG_PSEUDOTERM is not set
|
||||||
# CONFIG_USBDEV is not set
|
# CONFIG_USBDEV is not set
|
||||||
# CONFIG_USBHOST is not set
|
# CONFIG_USBHOST is not set
|
||||||
@ -1430,7 +1435,8 @@ CONFIG_NSH_ARCHINIT=y
|
|||||||
# Networking Configuration
|
# Networking Configuration
|
||||||
#
|
#
|
||||||
CONFIG_NSH_NETINIT=y
|
CONFIG_NSH_NETINIT=y
|
||||||
CONFIG_NSH_NETLOCAL=y
|
# CONFIG_NSH_NETLOCAL is not set
|
||||||
|
# CONFIG_NSH_NETINIT_THREAD is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
# IP Address Configuration
|
# IP Address Configuration
|
||||||
|
@ -529,6 +529,16 @@ int sam_bringup(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_MRF24J40
|
||||||
|
/* Configure MRF24J40 wireless */
|
||||||
|
|
||||||
|
ret = sam_mrf24j40_initialize();
|
||||||
|
if (ret < 0)
|
||||||
|
{
|
||||||
|
syslog(LOG_ERR, "ERROR: sam_mrf24j40_initialize() failed: %d\n", ret);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_ELF
|
#ifdef HAVE_ELF
|
||||||
/* Initialize the ELF binary loader */
|
/* Initialize the ELF binary loader */
|
||||||
|
|
||||||
|
@ -159,7 +159,7 @@ static int sam_attach_irq(FAR const struct mrf24j40_lower_s *lower,
|
|||||||
static void sam_enable_irq(FAR const struct mrf24j40_lower_s *lower,
|
static void sam_enable_irq(FAR const struct mrf24j40_lower_s *lower,
|
||||||
bool state)
|
bool state)
|
||||||
{
|
{
|
||||||
FAR struct sam_priv_s *piv = (FAR struct sam_priv_s *)lower;
|
FAR struct sam_priv_s *priv = (FAR struct sam_priv_s *)lower;
|
||||||
static bool enabled;
|
static bool enabled;
|
||||||
irqstate_t flags;
|
irqstate_t flags;
|
||||||
|
|
||||||
|
@ -74,14 +74,15 @@ void sam_spidev_initialize(void)
|
|||||||
#ifdef CONFIG_SAMV71XULT_MB1_SPI
|
#ifdef CONFIG_SAMV71XULT_MB1_SPI
|
||||||
/* Enable chip select for mikroBUS1 */
|
/* Enable chip select for mikroBUS1 */
|
||||||
|
|
||||||
(void)stm32_configgpio(CLICK_MB1_CS);
|
(void)sam_configgpio(CLICK_MB1_CS);
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_SAMV71XULT_MB2_SPI
|
#ifdef CONFIG_SAMV71XULT_MB2_SPI
|
||||||
/* Enable chip select for mikroBUS2 */
|
/* Enable chip select for mikroBUS2 */
|
||||||
|
|
||||||
(void)stm32_configgpio(CLICK_MB2_CS);
|
(void)sam_configgpio(CLICK_MB2_CS);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
#endif /* CONFIG_SAMV7_SPI0_MASTER */
|
||||||
|
|
||||||
#ifdef CONFIG_SAMV7_SPI0_SLAVE
|
#ifdef CONFIG_SAMV7_SPI0_SLAVE
|
||||||
#endif
|
#endif
|
||||||
@ -163,9 +164,9 @@ void sam_spi0select(uint32_t devid, bool selected)
|
|||||||
/* Set the GPIO low to select and high to de-select */
|
/* Set the GPIO low to select and high to de-select */
|
||||||
|
|
||||||
#if defined(CONFIG_SAMV71XULT_MB1_BEE)
|
#if defined(CONFIG_SAMV71XULT_MB1_BEE)
|
||||||
stm32_gpiowrite(CLICK_MB1_CS, !selected);
|
sam_gpiowrite(CLICK_MB1_CS, !selected);
|
||||||
#elif defined(CONFIG_SAMV71XULT_MB2_BEE)
|
#elif defined(CONFIG_SAMV71XULT_MB2_BEE)
|
||||||
stm32_gpiowrite(CLICK_MB2_CS, !selected);
|
sam_gpiowrite(CLICK_MB2_CS, !selected);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
@ -386,6 +386,10 @@
|
|||||||
# undef HAVE_MRF24J40
|
# undef HAVE_MRF24J40
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !defined(CONFIG_SAMV71XULT_MB1_BEE) && !defined(CONFIG_SAMV71XULT_MB2_BEE)
|
||||||
|
# undef HAVE_MRF24J40
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_SAMV7_SPI0_MASTER
|
#ifndef CONFIG_SAMV7_SPI0_MASTER
|
||||||
# undef HAVE_MRF24J40
|
# undef HAVE_MRF24J40
|
||||||
#endif
|
#endif
|
||||||
@ -564,9 +568,9 @@
|
|||||||
/* Interrupts */
|
/* Interrupts */
|
||||||
|
|
||||||
#define CLICK_MB1_INTR (GPIO_INPUT | GPIO_CFG_DEFAULT | GPIO_CFG_DEGLITCH | \
|
#define CLICK_MB1_INTR (GPIO_INPUT | GPIO_CFG_DEFAULT | GPIO_CFG_DEGLITCH | \
|
||||||
GPIO_INT_HIGHLEVEL | GPIO_PORT_PIOA | GPIO_PIN0)
|
GPIO_INT_FALLING | GPIO_PORT_PIOA | GPIO_PIN0)
|
||||||
#define CLICK_MB2_INTR (GPIO_INPUT | GPIO_CFG_DEFAULT | GPIO_CFG_DEGLITCH | \
|
#define CLICK_MB2_INTR (GPIO_INPUT | GPIO_CFG_DEFAULT | GPIO_CFG_DEGLITCH | \
|
||||||
GPIO_INT_HIGHLEVEL | GPIO_PORT_PIOA | GPIO_PIN6)
|
GPIO_INT_FALLING | GPIO_PORT_PIOA | GPIO_PIN6)
|
||||||
|
|
||||||
#define IRQ_MB1 SAM_IRQ_PA0
|
#define IRQ_MB1 SAM_IRQ_PA0
|
||||||
#define IRQ_MB2 SAM_IRQ_PA6
|
#define IRQ_MB2 SAM_IRQ_PA6
|
||||||
@ -843,5 +847,21 @@ int sam_wm8904_initialize(int minor);
|
|||||||
int sam_audio_null_initialize(int minor);
|
int sam_audio_null_initialize(int minor);
|
||||||
#endif /* HAVE_AUDIO_NULL */
|
#endif /* HAVE_AUDIO_NULL */
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: stm32_mrf24j40_initialize
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Initialize the MRF24J40 device.
|
||||||
|
*
|
||||||
|
* Returned Value:
|
||||||
|
* Zero is returned on success. Otherwise, a negated errno value is
|
||||||
|
* returned to indicate the nature of the failure.
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#ifdef HAVE_MRF24J40
|
||||||
|
int sam_mrf24j40_initialize(void);
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* __ASSEMBLY__ */
|
#endif /* __ASSEMBLY__ */
|
||||||
#endif /* __CONFIGS_SAMV71_XULT_SRC_SAMV71_XULT_H */
|
#endif /* __CONFIGS_SAMV71_XULT_SRC_SAMV71_XULT_H */
|
||||||
|
@ -57,6 +57,14 @@
|
|||||||
# include "stm32_usbhost.h"
|
# include "stm32_usbhost.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_BUTTONS
|
||||||
|
# include <nuttx/input/buttons.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_USERLED
|
||||||
|
# include <nuttx/leds/userled.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "stm32f4discovery.h"
|
#include "stm32f4discovery.h"
|
||||||
|
|
||||||
/* Conditional logic in stm32f4discover.h will determine if certain features
|
/* Conditional logic in stm32f4discover.h will determine if certain features
|
||||||
@ -179,6 +187,16 @@ int stm32_bringup(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_BUTTONS
|
||||||
|
/* Register the BUTTON driver */
|
||||||
|
|
||||||
|
ret = btn_lower_initialize("/dev/buttons");
|
||||||
|
if (ret < 0)
|
||||||
|
{
|
||||||
|
syslog(LOG_ERR, "ERROR: btn_lower_initialize() failed: %d\n", ret);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_QENCODER
|
#ifdef CONFIG_QENCODER
|
||||||
/* Initialize and register the qencoder driver */
|
/* Initialize and register the qencoder driver */
|
||||||
|
|
||||||
@ -192,6 +210,16 @@ int stm32_bringup(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_USERLED
|
||||||
|
/* Register the LED driver */
|
||||||
|
|
||||||
|
ret = userled_lower_initialize("/dev/userleds");
|
||||||
|
if (ret < 0)
|
||||||
|
{
|
||||||
|
syslog(LOG_ERR, "ERROR: userled_lower_initialize() failed: %d\n", ret);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_RTC_DRIVER
|
#ifdef HAVE_RTC_DRIVER
|
||||||
/* Instantiate the STM32 lower-half RTC driver */
|
/* Instantiate the STM32 lower-half RTC driver */
|
||||||
|
|
||||||
|
@ -250,7 +250,9 @@
|
|||||||
|
|
||||||
/* GCC supports both types double and long long */
|
/* GCC supports both types double and long long */
|
||||||
|
|
||||||
|
#ifndef __clang__
|
||||||
# define CONFIG_HAVE_LONG_LONG 1
|
# define CONFIG_HAVE_LONG_LONG 1
|
||||||
|
#endif
|
||||||
# define CONFIG_HAVE_FLOAT 1
|
# define CONFIG_HAVE_FLOAT 1
|
||||||
# define CONFIG_HAVE_DOUBLE 1
|
# define CONFIG_HAVE_DOUBLE 1
|
||||||
# define CONFIG_HAVE_LONG_DOUBLE 1
|
# define CONFIG_HAVE_LONG_DOUBLE 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user