Reverted nuttx merge, back to master

This commit is contained in:
Lorenz Meier 2012-12-28 13:10:06 +01:00
parent 45a4bcb6ef
commit 8b8330a015
378 changed files with 30204 additions and 4660 deletions

View File

@ -35,6 +35,7 @@
############################################################################ ############################################################################
-include $(TOPDIR)/Make.defs -include $(TOPDIR)/Make.defs
-include $(TOPDIR)/.config
APPDIR = ${shell pwd} APPDIR = ${shell pwd}
@ -106,7 +107,7 @@ endif
# Create the list of available applications (INSTALLED_APPS) # Create the list of available applications (INSTALLED_APPS)
define ADD_BUILTIN define ADD_BUILTIN
INSTALLED_APPS += $(if $(wildcard $1$(DELIM)Makefile),$1,) INSTALLED_APPS += ${shell if [ -r $1/Makefile ]; then echo "$1"; fi}
endef endef
$(foreach BUILTIN, $(CONFIGURED_APPS), $(eval $(call ADD_BUILTIN,$(BUILTIN)))) $(foreach BUILTIN, $(CONFIGURED_APPS), $(eval $(call ADD_BUILTIN,$(BUILTIN))))
@ -116,10 +117,8 @@ $(foreach BUILTIN, $(CONFIGURED_APPS), $(eval $(call ADD_BUILTIN,$(BUILTIN))))
# provided by the user (possibly as a symbolic link) to add libraries and # provided by the user (possibly as a symbolic link) to add libraries and
# applications to the standard build from the repository. # applications to the standard build from the repository.
EXTERNAL_DIR := $(dir $(wildcard external$(DELIM)Makefile)) INSTALLED_APPS += ${shell if [ -r external/Makefile ]; then echo "external"; fi}
SUBDIRS += ${shell if [ -r external/Makefile ]; then echo "external"; fi}
INSTALLED_APPS += $(EXTERNAL_DIR)
SUBDIRS += $(EXTERNAL_DIR)
# The final build target # The final build target
@ -131,81 +130,48 @@ all: $(BIN)
.PHONY: $(INSTALLED_APPS) context depend clean distclean .PHONY: $(INSTALLED_APPS) context depend clean distclean
$(INSTALLED_APPS): $(INSTALLED_APPS):
$(Q) $(MAKE) -C $@ TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" @$(MAKE) -C $@ TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)";
$(BIN): $(INSTALLED_APPS) $(BIN): $(INSTALLED_APPS)
@( for obj in $(OBJS) ; do \
$(call ARCHIVE, $@, $${obj}); \
done ; )
.context: .context:
ifeq ($(CONFIG_WINDOWS_NATIVE),y) @for dir in $(INSTALLED_APPS) ; do \
$(Q) for %%G in ($(INSTALLED_APPS)) do ( \
if exist %%G\.context del /f /q %%G\.context \
$(MAKE) -C %%G TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" context \
)
else
$(Q) for dir in $(INSTALLED_APPS) ; do \
rm -f $$dir/.context ; \ rm -f $$dir/.context ; \
$(MAKE) -C $$dir TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" context ; \ $(MAKE) -C $$dir TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" context ; \
done done
endif @touch $@
$(Q) touch $@
context: .context context: .context
.depend: context Makefile $(SRCS) .depend: context Makefile $(SRCS)
ifeq ($(CONFIG_WINDOWS_NATIVE),y) @for dir in $(INSTALLED_APPS) ; do \
$(Q) for %%G in ($(INSTALLED_APPS)) do ( \
if exist %%G\.depend del /f /q %%G\.depend \
$(MAKE) -C %%G TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" depend \
)
else
$(Q) for dir in $(INSTALLED_APPS) ; do \
rm -f $$dir/.depend ; \ rm -f $$dir/.depend ; \
$(MAKE) -C $$dir TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" depend ; \ $(MAKE) -C $$dir TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" depend ; \
done done
endif @touch $@
$(Q) touch $@
depend: .depend depend: .depend
clean: clean:
ifeq ($(CONFIG_WINDOWS_NATIVE),y) @for dir in $(SUBDIRS) ; do \
$(Q) for %%G in ($(SUBDIRS)) do ( \
$(MAKE) -C %%G clean TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" \
)
else
$(Q) for dir in $(SUBDIRS) ; do \
$(MAKE) -C $$dir clean TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)"; \ $(MAKE) -C $$dir clean TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)"; \
done done
endif @rm -f $(BIN) *~ .*.swp *.o
$(call DELFILE, $(BIN))
$(call CLEAN) $(call CLEAN)
distclean: # clean distclean: # clean
ifeq ($(CONFIG_WINDOWS_NATIVE),y) @for dir in $(SUBDIRS) ; do \
$(Q) for %%G in ($(SUBDIRS)) do ( \
$(MAKE) -C %%G distclean TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" \
)
$(call DELFILE, .config)
$(call DELFILE, .context)
$(call DELFILE, .depend)
$(Q) ( if exist external ( \
echo ********************************************************" \
echo * The external directory/link must be removed manually *" \
echo ********************************************************" \
)
else
$(Q) for dir in $(SUBDIRS) ; do \
$(MAKE) -C $$dir distclean TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)"; \ $(MAKE) -C $$dir distclean TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)"; \
done done
$(call DELFILE, .config) @rm -f .config .context .depend
$(call DELFILE, .context) @( if [ -e external ]; then \
$(call DELFILE, .depend)
$(Q) ( if [ -e external ]; then \
echo "********************************************************"; \ echo "********************************************************"; \
echo "* The external directory/link must be removed manually *"; \ echo "* The external directory/link must be removed manually *"; \
echo "********************************************************"; \ echo "********************************************************"; \
fi; \ fi; \
) )
endif

View File

@ -163,57 +163,6 @@ dtoa():
"This product includes software developed by the University of "This product includes software developed by the University of
California, Berkeley and its contributors." California, Berkeley and its contributors."
libc/string/lib_vikmemcpy.c
^^^^^^^^^^^^^^^^^^^^^^^^^^^
If you enable CONFIG_MEMCPY_VIK, then you will build with the optimized
version of memcpy from Daniel Vik. Licensing information for that version
of memcpy() follows:
Copyright (C) 1999-2010 Daniel Vik
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
damages arising from the use of this software.
Permission is granted to anyone to use this software for any
purpose, including commercial applications, and to alter it and
redistribute it freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you
must not claim that you wrote the original software. If you
use this software in a product, an acknowledgment in the
use this software in a product, an acknowledgment in the
product documentation would be appreciated but is not
required.
2. Altered source versions must be plainly marked as such, and
must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source
distribution.
libc/math
^^^^^^^^^
If you enable CONFIG_LIB, you will build the math library at libc/math.
This library was taken from the math library developed for the Rhombus
OS by Nick Johnson (https://github.com/nickbjohnson4224/rhombus). This
port was contributed by Darcy Gong. The Rhombus math library has this
compatible MIT license:
Copyright (C) 2009-2011 Nick Johnson <nickbjohnson4224 at gmail.com>
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
Documents/rss.gif Documents/rss.gif
^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^

View File

@ -3453,7 +3453,7 @@
* net/uip/uip_icmpping.c: Fix problem that prevented ping from * net/uip/uip_icmpping.c: Fix problem that prevented ping from
going outside of local network. Submitted by Darcy Gong going outside of local network. Submitted by Darcy Gong
6.23 2012-11-05 Gregory Nutt <gnutt@nuttx.org> 6.23 2012-09-29 Gregory Nutt <gnutt@nuttx.org>
* arch/arm/src/stm32/stm32_rng.c, chip/stm32_rng.h, and other files: * arch/arm/src/stm32/stm32_rng.c, chip/stm32_rng.h, and other files:
Implementation of /dev/random using the STM32 Random Number Implementation of /dev/random using the STM32 Random Number
@ -3470,200 +3470,4 @@
* configs/shenzhou/*/Make.defs: Now uses the new buildroot 4.6.3 * configs/shenzhou/*/Make.defs: Now uses the new buildroot 4.6.3
EABI toolchain. EABI toolchain.
* lib/stdio/lib_libdtoa.c: Another dtoa() fix from Mike Smith. * lib/stdio/lib_libdtoa.c: Another dtoa() fix from Mike Smith.
* configs/shenzhou/src/up_adc.c: Add ADC support for the Shenzhou
board (Darcy Gong).
* configs/shenzhou/thttpd: Add a THTTPD configuration for the
Shenzhou board (Darcy Gong).
* include/termios.h and lib/termios/libcf*speed.c: The non-standard,
"hidden" c_speed cannot be type const or else static instantiations
of termios will be required to initialize it (Mike Smith).
* drivers/input/max11802.c/h, and include/nuttx/input max11802.h: Adds
support for the Maxim MAX11802 touchscreen controller (contributed by
Petteri Aimonen).
* graphics/nxtk/nxtk_events.c: Missing implementation of the blocked
method. This is a critical bugfix for graphics support (contributed
by Petteri Aimonen).
* drivers/usbdev/pl2303.c, drivers/usbdev/usbmsc.h, and
include/nuttx/usb/cdcacm.h: USB_CONFIG_ATTR_SELFPOWER vs.
USB_CONFIG_ATT_SELFPOWER (contributed by Petteri Aimonen).
* arch/arm/src/armv7-m/up_memcpy.S: An optimized memcpy() function for
the ARMv7-M family contributed by Mike Smith.
* lib/strings/lib_vikmemcpy.c: As an option, the larger but faster
implemementation of memcpy from Daniel Vik is now available (this is
from http://www.danielvik.com/2010/02/fast-memcpy-in-c.html).
* lib/strings/lib_memset.c: CONFIG_MEMSET_OPTSPEED will select a
version of memset() optimized for speed. By default, memset() is
optimized for size.
* lib/strings/lib_memset.c: CONFIG_MEMSET_64BIT will perform 64-bit
aligned memset() operations.
* arch/arm/src/stm32/stm32_adc.c: Need to put the ADC back into the
initial reset in the open/setup logic. Opening the ADC driver works
the first time, but not the second because the device is left in a
powered down state on the last close.
* configs/olimex-lpc1766stck/scripts: Replace all of the identical
ld.script files with the common one in this directory.
* configs/stm3220g-eval/scripts: Replace all of the identical
ld.script files with the common one in this directory.
* configs/hymini-stm32v/scripts: Replace all of the identical
ld.script files with the common one in this directory.
* configs/lpcxpresso-lpc1768/scripts: Replace all of the identical
ld.script files with the common one in this directory.
* binfmt/elf.c, binfmt/libelf, include/elf.h, include/nuttx/elf.h: Add
basic framework for loadable ELF module support. The initial check-
in is non-functional and is simply the framework for ELF support.
* include/nuttx/binfmt.h, nxflat.h, elf.h, and symtab.h: Moved to
include/nuttx/binfmt/.
* arch/sim/src/up_elf.c and arch/x86/src/common/up_elf.c: Add
for ELF modules.
* arch/arm/include/elf.h: Added ARM ELF header file.
* include/elf32.h: Renamed elf.h to elf32.h.
* configs/stm32f4discovery/ostest: Converted to use the new
Kconfig-based configuration system.
* configs/stm32f4discovery/elf and configs/stm32f4discovery/scripts/gnu-elf.ld
Add a configuration for testing the ARM ELF loader.
* binfmt/libelf: Can't use fstat(). NuttX does not yet support it. Damn!
* binfmt/libelf: The basic ELF module execution appears fully functional.
* configs/shenzhou/src/up_relays.c: Add support for relays from the
Shenzhou board. Contributed by Darcy Gong.
* lib/fixedmath: Moved the old lib/math to lib/fixedmath to make room for
the math library from the Rhombus OS
* lib/math: Now contains the math library from the Rhombus OS by Nick Johnson
(submitted by Darcy Gong).
* include/float.h: Add a first cut at the float.h header file. This
really should be an architecture/toolchain-specific header file. It
is only used if CONFIG_ARCH_FLOAT_H is defined.
* lib/math: Files now conform to coding standards. Separated float,
double, and long double versions of code into separate files so that
they don't draw in so much un-necessary code when doing a dumb link.
* binfmt/libelf: The ELF loader is working correctly with C++ static
constructors and destructors and all.
* Documentation/NuttXBinfmt.html: Add documentation of the binary loader.
* configs/sim/ostest: Converted to use the mconfig configuration tool.
* configs/sim/cxxtest: New test that will be used to verify the uClibc++
port (eventually).
* include/nuttx/fs/fs.h, lib/stdio/lib_libfread.c, lib_ferror.c,
lib_feof.c, and lib_clearerr.c: Add support for ferror(), feof(),
and clearerror(). ferror() support is bogus at the moment (it
is equivalent to !feof()); the others should be good.
* configs/stm32f4discovery/include/board.h: Correct timer 2-7
base frequency (provided by Freddie Chopin).
* include/nuttx/sched.h, sched/atexit.c, and sched/task_deletehook.c:
If both atexit() and on_exit() are enabled, then implement atexit()
as just a special caseof on_exit(). This assumes that the ABI can
handle receipt of more call parameters than the receiving function
expects. That is usually the case if parameters are passed in
registers.
* libxx/libxx_cxa_atexit(): Implements __cxa_atexit()
* configs/stm32f4discovery/cxxtest: New test that will be used to
verify the uClibc++ port (eventually). The sim platform turned not
to be a good platform for testing uClibc++. The sim example will not
run because the simulator will attempt to execute the static
constructors before main() starts. BUT... NuttX is not initialized
and this results in a crash. On the STM324Discovery, I will have
better control over when the static constructors run.
* RGMP 4.0 updated from Qiany Yu.
* configs/*/Make.defs and configs/*/ld.script: Massive clean-up
and standardization of linker scripts from Freddie Chopin.
* net/netdev_ioctl.c: Add interface state flags and ioctl calls
to bring network interfaces up and down (from Darcy Gong).
* config/stm32f4discovery: Enable C++ exceptions. Now the entire
apps/examples/cxxtest works -- meaning the the uClibc++ is
complete and verified for the STM32 platform.
6.24 2012-xx-xx Gregory Nutt <gnutt@nuttx.org>
* arch/arm/src/stm32: Support for STM32F100 high density chips
added by Freddie Chopin.
* configs/stm32f100_generic: Support for generic STM32F100RC board
contributed by Freddie Chopin.
* arch/arm/src/stm32_otgfsdev.c: Partial fix from Petteri Aimonen.
* drivers/lcd/ug-2864ambag01.c and include/nuttx/lcd/ug_2864ambag01.h:
LCD driver for the Univision OLED of the same name (untested on
initial check-in).
* configs/stm32f4discovery/nxlines: Configure to use mconf/Kconfig
tool.
* configs/stm32f4discovery/src/up_ug2864ambag01.c: Board-specific
initialization for UG-2864AMBAG01 OLED connecte to STM32F4Disovery.
* libxx/libxx_stdthrow.cxx: Exception stubs from Petteri Aimonen.
* configs/stm32f4discovery/src/up_ug2864ambag01.c: Driver has been
verified on the STM32F4Discovery platform. Some tuning of the
configuration could improve the presentation. Lower resolution displays
are also more subject to the "fat, flat line bug" that I need to fix
someday. See http://www.nuttx.org/doku.php?id=wiki:graphics:nxgraphics
for a description of the fat, flat line bug.
* libc: Renamed nuttx/lib to nuttx/libc to make space for a true lib/
directory that will be forthcoming. Also rename libraries: liblib.a -> libc.a,
libulib.a -> libuc.a, libklib.a -> libkc.a, liblibxx.a ->libcxx.a.
(I will probably, eventually rename libxx to libcxx for consistency)
* Makefile, lib/: A new, empty directory that will hold generated libraries.
This simplifies the library patch calculations and lets me get rid of some
bash logic. The change is functional, but only partially complete;
additional logic is needed in the arch/*/src/Makefile's as well. Right
now that logic generate multiple library paths, all pointing to the lib/
directory.
* arch/*/src/Makefile: Now uses only the libraries in lib/
Replace bash fragments that test for board/Makefile.
* Makefile.win: The beginnings of a Windows-native build. This is just
the begining and not yet ready for prime time use.
* configs/stm32f4discovery/winbuild: This is a version of the standard
NuttX OS test, but configured to build natively on Windows. Its only
real purpose is to very the native Windows build logic.
* tools/mkdeps.bat and tools/mkdeps.c: mkdeps.bat is a failed attempt
to leverage mkdeps.sh to CMD.exe. It fails because the are certain
critical CFLAG values that cannot be passed on the CMD.exe command line
(line '='). mkdeps.c is a work in progress that will, hopefully,
replace both mkdeps.sh and mkdeps.bat.
* tools/Config.mk: Centralize the definition of the scrpt that will be
used to generated header file include paths for the compiler. This
needs to be centralized in order to support the Windows native build.
* tools/incdir.bat: A replaced for tools/incdir.sh for use with the
the Windows native build.
* Makefile.unix: The existing top-level Makefile has been renamed
Makefile.unix.
* Makefile: This is a new top-level Makefile that just includes
either Makefile.unix or Makefile.win
* configs/stm3240g-eval/src: Qencoder fixes from Ryan Sundberg.
* arch/arm/src/stm32/stm32_qencoder.c: TIM3 bug fix from Ryan Sundberg.
* tools/mkromfsimg.sh: Correct typo in an error message (Ryan Sundberg)
* arch/*/src/Makefile: Remove tftboot install and creation of System.map
for Windows native build. The fist is necessary, the second just needs
re-implemented.
* configs/mirtoo: Update Mirtoo pin definitions for Release 2. Provided
by Konstantin Dimitrov.
* Fixed an uninitialized variable in the file system that can cause
assertions if DEBUG on (contributed by Lorenz Meier).
* Config.mk: Defined DELIM to be either / or \, depending upon
CONFIG_WINDOWS_NATIVE. This will allow me to eliminate a lot of
conditional logic elsewhere.
* nuttx/graphics: One a mouse button is pressed, continue to report all
mouse button events to the first window that received the the initial
button down event, even if the mouse attempts to dray outside the
window. From Petteri Aimonen.
* nuttx/graphics/nxmu/nx_block.c: One more fixe to the NX block message
logic from Petteri Aimonen.
* include/nuttx/wqueue.h: Some basic definitions to support a user-
space work queue (someday in the future).
* graphics/nxmu: Add semaphores so buffers messages that send buffers
will block until the buffer data has been acted upon.
* graphics/nxmw: Extended the blocked messages to cover mouse movement
and redraw events. These will also cause problems if sent to a window
while it is closing.
* arch/several: Change UARTs are enabled for i.MX, LM3S, ez80, and M16C to
match how they are enabled for other architectures.
* configs/ez80f910200kitg: Convert to use mconf configuration.
* sched/pause.c: Implements the POSIX pause() function.
* ez80: Lots of changes to ez80 configurations and build logic as I
struggle to get a clean Windows build (still not working).
* tools/prebuild.py: A Python script for Darcy Gong that can automate
many build/configuration operations.
* configs/cloudctrl: Darcy Gong's CloudController board. This is a
small network relay development board. Based on the Shenzhou IV development
board design. It is based on the STM32F107VC MCU.
* Lots of build files: ARMv7-M and MIPS32 Make.defs now include a common
Toolchain.defs file that can be used to manage toolchains in a more
configurable way. Contributed by Mike Smith
* configs/stm32f4discovery/winbuild and configs/cloudctrl: Adapted to use
Mike's Toolchain.defs.
* tools/configure.sh: Adapted to handle paths and setenv.bat files correctly
for native Windows builds.

View File

@ -20,75 +20,10 @@ menu "Build Setup"
config EXPERIMENTAL config EXPERIMENTAL
bool "Prompt for development and/or incomplete code/drivers" bool "Prompt for development and/or incomplete code/drivers"
choice
prompt "Build Host Platform"
default HOST_LINUX
config HOST_LINUX
bool "Linux"
config HOST_OSX
bool "OSX"
config HOST_WINDOWS
bool "Windows"
config HOST_OTHER
bool "Other"
endchoice
choice
prompt "Windows Build Environment"
default WINDOWS_CYGWIN
depends on HOST_WINDOWS
config WINDOWS_NATIVE
bool "Windows Native"
---help---
Build natively in a CMD.exe environment with Windows style paths (like C:\cgywin\home)
config WINDOWS_CYGWIN
bool "Cygwin"
- --help---
Build natively in a Cygwin environment with POSIX style paths (like /cygdrive/c/cgywin/home)
config WINDOWS_MSYS
bool "MSYS"
---help---
Build natively in a Cygwin environment with POSIX style paths (like /cygdrive/c/cgywin/home)
config WINDOWS_OTHER
bool "Windows POSIX-like environment"
---help---
Build natively in another POSIX-like environment. Additional support may be necessary
endchoice
config WINDOWS_MKLINK
bool "Use mklink"
default n
depends on WINDOWS_NATIVE
---help---
Use the mklink command to set up symbolic links when NuttX is
configured. Otherwise, configuration directories will be copied to
establish the configuration.
If directories are copied, then some confusion can result ("Which
version of the file did I modify?"). In that case, it is recommended
that you re-build using 'make clean_context all'. That will cause the
configured directories to be recopied on each build.
NOTE: This option also (1) that you have administrator privileges, (2)
that you are using Windows 2000 or better, and (3) that you are using
the NTFS file system. Select 'n' is that is not the case.
menu "Build Configuration" menu "Build Configuration"
config APPS_DIR config APPS_DIR
string "Application directory" string "Application directory"
default "../apps" if !WINDOWS_NATIVE default "../apps"
default "..\apps" if WINDOWS_NATIVE
---help--- ---help---
Identifies the directory that builds the Identifies the directory that builds the
application to link with NuttX. Default: ../apps This symbol must be assigned application to link with NuttX. Default: ../apps This symbol must be assigned
@ -257,17 +192,6 @@ config ARCH_MATH_H
that don't select ARCH_MATH_H, the redirecting math.h header file that don't select ARCH_MATH_H, the redirecting math.h header file
will stay out-of-the-way in include/nuttx/. will stay out-of-the-way in include/nuttx/.
config ARCH_FLOAT_H
bool "float.h"
default n
---help---
The float.h header file defines the properties of your floating
point implementation. It would always be best to use your
toolchain's float.h header file but if none is avaiable, a default
float.h header file will provided if this option is selected. However
there is no assurance that the settings in this float.h are actually
correct for your platform!
config ARCH_STDARG_H config ARCH_STDARG_H
bool "stdarg.h" bool "stdarg.h"
default n default n
@ -320,24 +244,17 @@ config DEBUG_ENABLE
comment "Subsystem Debug Options" comment "Subsystem Debug Options"
config DEBUG_MM
bool "Enable Memory Manager Debug Output"
default n
---help---
Enable memory management debug output (disabled by default)
config DEBUG_SCHED config DEBUG_SCHED
bool "Enable Scheduler Debug Output" bool "Enable Scheduler Debug Output"
default n default n
---help--- ---help---
Enable OS debug output (disabled by default) Enable OS debug output (disabled by default)
config DEBUG_PAGING config DEBUG_MM
bool "Enable Demand Paging Debug Output" bool "Enable Memory Manager Debug Output"
default n default n
depends on PAGING
---help--- ---help---
Enable demand paging debug output (disabled by default) Enable memory management debug output (disabled by default)
config DEBUG_NET config DEBUG_NET
bool "Enable Network Debug Output" bool "Enable Network Debug Output"
@ -394,13 +311,6 @@ config DEBUG_INPUT
Enable low level debug output from the input device drivers such as Enable low level debug output from the input device drivers such as
mice and touchscreens (disabled by default) mice and touchscreens (disabled by default)
config DEBUG_ANALOG
bool "Enable Analog Device Debug Output"
default n
---help---
Enable low level debug output from the analog device drivers such as
A/D and D/A converters (disabled by default)
config DEBUG_I2C config DEBUG_I2C
bool "Enable I2C Debug Output" bool "Enable I2C Debug Output"
default n default n
@ -415,18 +325,12 @@ config DEBUG_SPI
---help--- ---help---
Enable I2C driver debug output (disabled by default) Enable I2C driver debug output (disabled by default)
config DEBUG_DMA
bool "Enable DMA Debug Output"
default n
---help---
Enable DMA-releated debug output (disabled by default)
config DEBUG_WATCHDOG config DEBUG_WATCHDOG
bool "Enable Watchdog Timer Debug Output" bool "Enable Watchdog Timer Debug Output"
default n default n
depends on WATCHDOG depends on WATCHDOG
---help--- ---help---
Enable watchdog timer debug output (disabled by default) Enable watchdog timer debug output (disabled by default)
endif endif
@ -471,12 +375,8 @@ menu "Memory Management"
source mm/Kconfig source mm/Kconfig
endmenu endmenu
menu "Binary Formats"
source binfmt/Kconfig
endmenu
menu "Library Routines" menu "Library Routines"
source libc/Kconfig source lib/Kconfig
source libxx/Kconfig source libxx/Kconfig
endmenu endmenu

View File

@ -1,7 +1,7 @@
############################################################################ ############################################################################
# Makefile # Makefile
# #
# Copyright (C) 2012 Gregory Nutt. All rights reserved. # Copyright (C) 2007-2012 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org> # Author: Gregory Nutt <gnutt@nuttx.org>
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -33,17 +33,619 @@
# #
############################################################################ ############################################################################
# This is a top-level "kludge" Makefile that just includes the correct TOPDIR := ${shell pwd | sed -e 's/ /\\ /g'}
# Makefile. If you already know the Makefile that you want, you can skip -include ${TOPDIR}/.config
# this nonsense using: -include ${TOPDIR}/tools/Config.mk
# -include ${TOPDIR}/Make.defs
# make -f Makefile.unix, OR
# make -f Makefile.win
#
-include .config # Control build verbosity
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
include Makefile.win ifeq ($(V),1)
export Q :=
else else
include Makefile.unix export Q := @
endif endif
# Default tools
ifeq ($(DIRLINK),)
DIRLINK = $(TOPDIR)/tools/link.sh
DIRUNLINK = $(TOPDIR)/tools/unlink.sh
endif
# This define is passed as EXTRADEFINES for kernel-mode builds. It is also passed
# during PASS1 (but not PASS2) context and depend targets.
KDEFINE = ${shell $(TOPDIR)/tools/define.sh $(CC) __KERNEL__}
# Process architecture and board-specific directories
ARCH_DIR = arch/$(CONFIG_ARCH)
ARCH_SRC = $(ARCH_DIR)/src
ARCH_INC = $(ARCH_DIR)/include
BOARD_DIR = configs/$(CONFIG_ARCH_BOARD)
# Add-on directories. These may or may not be in place in the
# NuttX source tree (they must be specifically installed)
#
# CONFIG_APPS_DIR can be over-ridden from the command line or in the .config file.
# The default value of CONFIG_APPS_DIR is ../apps. Ultimately, the application
# will be built if APPDIR is defined. APPDIR will be defined if a directory containing
# a Makefile is found at the path provided by CONFIG_APPS_DIR
ifeq ($(CONFIG_APPS_DIR),)
CONFIG_APPS_DIR = ../apps
endif
APPDIR := ${shell if [ -r $(CONFIG_APPS_DIR)/Makefile ]; then echo "$(CONFIG_APPS_DIR)"; fi}
# All add-on directories.
#
# NUTTX_ADDONS is the list of directories built into the NuttX kernel.
# USER_ADDONS is the list of directories that will be built into the user application
NUTTX_ADDONS := $(NX_DIR)
USER_ADDONS :=
ifeq ($(CONFIG_NUTTX_KERNEL),y)
USER_ADDONS += $(APPDIR)
else
NUTTX_ADDONS += $(APPDIR)
endif
# Lists of build directories.
#
# FSDIRS depend on file descriptor support; NONFSDIRS do not (except for parts
# of FSDIRS). We will exclude FSDIRS from the build if file descriptor
# support is disabled
# CONTEXTDIRS include directories that have special, one-time pre-build
# requirements. Normally this includes things like auto-generation of
# configuration specific files or creation of configurable symbolic links
# USERDIRS - When NuttX is build is a monolithic kernel, this provides the
# list of directories that must be built
# OTHERDIRS - These are directories that are not built but probably should
# be cleaned to prevent garbarge from collecting in them when changing
# configurations.
NONFSDIRS = sched $(ARCH_SRC) $(NUTTX_ADDONS)
FSDIRS = fs drivers binfmt
CONTEXTDIRS = $(APPDIR)
USERDIRS =
ifeq ($(CONFIG_NUTTX_KERNEL),y)
NONFSDIRS += syscall
CONTEXTDIRS += syscall
USERDIRS += syscall lib mm $(USER_ADDONS)
ifeq ($(CONFIG_HAVE_CXX),y)
USERDIRS += libxx
endif
else
NONFSDIRS += lib mm
OTHERDIRS += syscall $(USER_ADDONS)
ifeq ($(CONFIG_HAVE_CXX),y)
NONFSDIRS += libxx
else
OTHERDIRS += libxx
endif
endif
ifeq ($(CONFIG_NX),y)
NONFSDIRS += graphics
CONTEXTDIRS += graphics
else
OTHERDIRS += graphics
endif
# CLEANDIRS are the directories that will clean in. These are
# all directories that we know about.
# KERNDEPDIRS are the directories in which we will build target dependencies.
# If NuttX and applications are built separately (CONFIG_NUTTX_KERNEL),
# then this holds only the directories containing kernel files.
# USERDEPDIRS. If NuttX and applications are built separately (CONFIG_NUTTX_KERNEL),
# then this holds only the directories containing user files.
CLEANDIRS = $(NONFSDIRS) $(FSDIRS) $(USERDIRS) $(OTHERDIRS)
KERNDEPDIRS = $(NONFSDIRS)
USERDEPDIRS = $(USERDIRS)
# Add file system directories to KERNDEPDIRS (they are already in CLEANDIRS)
ifeq ($(CONFIG_NFILE_DESCRIPTORS),0)
ifeq ($(CONFIG_NET),y)
ifneq ($(CONFIG_NSOCKET_DESCRIPTORS),0)
KERNDEPDIRS += fs
endif
KERNDEPDIRS += drivers
endif
else
KERNDEPDIRS += $(FSDIRS)
endif
# Add networking directories to KERNDEPDIRS and CLEANDIRS
ifeq ($(CONFIG_NET),y)
KERNDEPDIRS += net
endif
CLEANDIRS += net
#
# Extra objects used in the final link.
#
# Pass 1 1ncremental (relative) link objects should be put into the
# processor-specific source directory (where other link objects will
# be created). If the pass1 obect is an archive, it could go anywhere.
ifeq ($(CONFIG_BUILD_2PASS),y)
EXTRA_OBJS += $(CONFIG_PASS1_OBJECT)
endif
# NUTTXLIBS is the list of NuttX libraries that is passed to the
# processor-specific Makefile to build the final NuttX target.
# Libraries in FSDIRS are excluded if file descriptor support
# is disabled.
# USERLIBS is the list of libraries used to build the final user-space
# application
NUTTXLIBS = sched/libsched$(LIBEXT) $(ARCH_SRC)/libarch$(LIBEXT)
USERLIBS =
# Add libraries for syscall support. The C library will be needed by
# both the kernel- and user-space builds. For now, the memory manager (mm)
# is placed in user space (only).
ifeq ($(CONFIG_NUTTX_KERNEL),y)
NUTTXLIBS += syscall/libstubs$(LIBEXT) lib/libklib$(LIBEXT)
USERLIBS += syscall/libproxies$(LIBEXT) lib/libulib$(LIBEXT) mm/libmm$(LIBEXT)
else
NUTTXLIBS += mm/libmm$(LIBEXT) lib/liblib$(LIBEXT)
endif
# Add libraries for C++ support. CXX, CXXFLAGS, and COMPILEXX must
# be defined in Make.defs for this to work!
ifeq ($(CONFIG_HAVE_CXX),y)
ifeq ($(CONFIG_NUTTX_KERNEL),y)
USERLIBS += libxx/liblibxx$(LIBEXT)
else
NUTTXLIBS += libxx/liblibxx$(LIBEXT)
endif
endif
# Add library for application support.
ifneq ($(APPDIR),)
ifeq ($(CONFIG_NUTTX_KERNEL),y)
USERLIBS += $(APPDIR)/libapps$(LIBEXT)
else
NUTTXLIBS += $(APPDIR)/libapps$(LIBEXT)
endif
endif
# Add libraries for network support
ifeq ($(CONFIG_NET),y)
NUTTXLIBS += net/libnet$(LIBEXT)
endif
# Add libraries for file system support
ifeq ($(CONFIG_NFILE_DESCRIPTORS),0)
ifneq ($(CONFIG_NSOCKET_DESCRIPTORS),0)
NUTTXLIBS += fs/libfs$(LIBEXT)
endif
ifeq ($(CONFIG_NET),y)
NUTTXLIBS += drivers/libdrivers$(LIBEXT)
endif
else
NUTTXLIBS += fs/libfs$(LIBEXT) drivers/libdrivers$(LIBEXT) binfmt/libbinfmt$(LIBEXT)
endif
# Add libraries for the NX graphics sub-system
ifneq ($(NX_DIR),)
NUTTXLIBS += $(NX_DIR)/libnx$(LIBEXT)
endif
ifeq ($(CONFIG_NX),y)
NUTTXLIBS += graphics/libgraphics$(LIBEXT)
endif
# This is the name of the final target (relative to the top level directorty)
BIN = nuttx$(EXEEXT)
all: $(BIN)
.PHONY: context clean_context check_context export subdir_clean clean subdir_distclean distclean apps_clean apps_distclean
# Target used to copy include/nuttx/math.h. If CONFIG_ARCH_MATH_H is
# defined, then there is an architecture specific math.h header file
# that will be included indirectly from include/math.h. But first, we
# have to copy math.h from include/nuttx/. to include/.
ifeq ($(CONFIG_ARCH_MATH_H),y)
include/math.h: include/nuttx/math.h
@cp -f include/nuttx/math.h include/math.h
else
include/math.h:
endif
# Target used to copy include/nuttx/stdarg.h. If CONFIG_ARCH_STDARG_H is
# defined, then there is an architecture specific stdarg.h header file
# that will be included indirectly from include/stdarg.h. But first, we
# have to copy stdarg.h from include/nuttx/. to include/.
ifeq ($(CONFIG_ARCH_STDARG_H),y)
include/stdarg.h: include/nuttx/stdarg.h
@cp -f include/nuttx/stdarg.h include/stdarg.h
else
include/stdarg.h:
endif
# Targets used to build include/nuttx/version.h. Creation of version.h is
# part of the overall NuttX configuration sequence. Notice that the
# tools/mkversion tool is built and used to create include/nuttx/version.h
tools/mkversion:
@$(MAKE) -C tools -f Makefile.host TOPDIR="$(TOPDIR)" mkversion
$(TOPDIR)/.version:
@if [ ! -f .version ]; then \
echo "No .version file found, creating one"; \
tools/version.sh -v 0.0 -b 0 .version; \
chmod 755 .version; \
fi
include/nuttx/version.h: $(TOPDIR)/.version tools/mkversion
@tools/mkversion $(TOPDIR) > include/nuttx/version.h
# Targets used to build include/nuttx/config.h. Creation of config.h is
# part of the overall NuttX configuration sequence. Notice that the
# tools/mkconfig tool is built and used to create include/nuttx/config.h
tools/mkconfig:
@$(MAKE) -C tools -f Makefile.host TOPDIR="$(TOPDIR)" mkconfig
include/nuttx/config.h: $(TOPDIR)/.config tools/mkconfig
@tools/mkconfig $(TOPDIR) > include/nuttx/config.h
# dirlinks, and helpers
#
# Directories links. Most of establishing the NuttX configuration involves
# setting up symbolic links with 'generic' directory names to specific,
# configured directories.
#
# Link the apps/include directory to include/apps
include/apps: Make.defs
ifneq ($(APPDIR),)
@if [ -d $(TOPDIR)/$(APPDIR)/include ]; then \
$(DIRLINK) $(TOPDIR)/$(APPDIR)/include include/apps; \
fi
endif
# Link the arch/<arch-name>/include directory to include/arch
include/arch: Make.defs
@$(DIRLINK) $(TOPDIR)/$(ARCH_DIR)/include include/arch
# Link the configs/<board-name>/include directory to include/arch/board
include/arch/board: include/arch Make.defs include/arch
@$(DIRLINK) $(TOPDIR)/$(BOARD_DIR)/include include/arch/board
# Link the configs/<board-name>/src dir to arch/<arch-name>/src/board
$(ARCH_SRC)/board: Make.defs
@$(DIRLINK) $(TOPDIR)/$(BOARD_DIR)/src $(ARCH_SRC)/board
# Link arch/<arch-name>/include/<chip-name> to arch/<arch-name>/include/chip
$(ARCH_SRC)/chip: Make.defs
ifneq ($(CONFIG_ARCH_CHIP),)
@$(DIRLINK) $(TOPDIR)/$(ARCH_SRC)/$(CONFIG_ARCH_CHIP) $(ARCH_SRC)/chip
endif
# Link arch/<arch-name>/src/<chip-name> to arch/<arch-name>/src/chip
include/arch/chip: include/arch Make.defs
ifneq ($(CONFIG_ARCH_CHIP),)
@$(DIRLINK) $(TOPDIR)/$(ARCH_INC)/$(CONFIG_ARCH_CHIP) include/arch/chip
endif
dirlinks: include/arch include/arch/board include/arch/chip $(ARCH_SRC)/board $(ARCH_SRC)/chip include/apps
# context
#
# The context target is invoked on each target build to assure that NuttX is
# properly configured. The basic configuration steps include creation of the
# the config.h and version.h header files in the include/nuttx directory and
# the establishment of symbolic links to configured directories.
context: check_context include/nuttx/config.h include/nuttx/version.h include/math.h include/stdarg.h dirlinks
@for dir in $(CONTEXTDIRS) ; do \
$(MAKE) -C $$dir TOPDIR="$(TOPDIR)" context; \
done
# clean_context
#
# This is part of the distclean target. It removes all of the header files
# and symbolic links created by the context target.
clean_context:
@rm -f include/nuttx/config.h
@rm -f include/nuttx/version.h
@rm -f include/math.h
@rm -f include/stdarg.h
@$(DIRUNLINK) include/arch/board
@$(DIRUNLINK) include/arch/chip
@$(DIRUNLINK) include/arch
@$(DIRUNLINK) $(ARCH_SRC)/board
@$(DIRUNLINK) $(ARCH_SRC)/chip
@$(DIRUNLINK) include/apps
# check_context
#
# This target checks if NuttX has been configured. NuttX is configured using
# the script tools/configure.sh. That script will install certain files in
# the top-level NuttX build directory. This target verifies that those
# configuration files have been installed and that NuttX is ready to be built.
check_context:
@if [ ! -e ${TOPDIR}/.config -o ! -e ${TOPDIR}/Make.defs ]; then \
echo "" ; echo "Nuttx has not been configured:" ; \
echo " cd tools; ./configure.sh <target>" ; echo "" ; \
exit 1 ; \
fi
# Archive targets. The target build sequency will first create a series of
# libraries, one per configured source file directory. The final NuttX
# execution will then be built from those libraries. The following targets
# built those libraries.
#
# Possible kernel-mode builds
lib/libklib$(LIBEXT): context
@$(MAKE) -C lib TOPDIR="$(TOPDIR)" libklib$(LIBEXT) EXTRADEFINES=$(KDEFINE)
sched/libsched$(LIBEXT): context
@$(MAKE) -C sched TOPDIR="$(TOPDIR)" libsched$(LIBEXT) EXTRADEFINES=$(KDEFINE)
$(ARCH_SRC)/libarch$(LIBEXT): context
@$(MAKE) -C $(ARCH_SRC) TOPDIR="$(TOPDIR)" libarch$(LIBEXT) EXTRADEFINES=$(KDEFINE)
net/libnet$(LIBEXT): context
@$(MAKE) -C net TOPDIR="$(TOPDIR)" libnet$(LIBEXT) EXTRADEFINES=$(KDEFINE)
fs/libfs$(LIBEXT): context
@$(MAKE) -C fs TOPDIR="$(TOPDIR)" libfs$(LIBEXT) EXTRADEFINES=$(KDEFINE)
drivers/libdrivers$(LIBEXT): context
@$(MAKE) -C drivers TOPDIR="$(TOPDIR)" libdrivers$(LIBEXT) EXTRADEFINES=$(KDEFINE)
binfmt/libbinfmt$(LIBEXT): context
@$(MAKE) -C binfmt TOPDIR="$(TOPDIR)" libbinfmt$(LIBEXT) EXTRADEFINES=$(KDEFINE)
graphics/libgraphics$(LIBEXT): context
@$(MAKE) -C graphics TOPDIR="$(TOPDIR)" libgraphics$(LIBEXT) EXTRADEFINES=$(KDEFINE)
syscall/libstubs$(LIBEXT): context
@$(MAKE) -C syscall TOPDIR="$(TOPDIR)" libstubs$(LIBEXT) EXTRADEFINES=$(KDEFINE)
# Possible user-mode builds
lib/libulib$(LIBEXT): context
@$(MAKE) -C lib TOPDIR="$(TOPDIR)" libulib$(LIBEXT)
libxx/liblibxx$(LIBEXT): context
@$(MAKE) -C libxx TOPDIR="$(TOPDIR)" liblibxx$(LIBEXT)
mm/libmm$(LIBEXT): context
@$(MAKE) -C mm TOPDIR="$(TOPDIR)" libmm$(LIBEXT) EXTRADEFINES=$(KDEFINE)
$(APPDIR)/libapps$(LIBEXT): context
@$(MAKE) -C $(APPDIR) TOPDIR="$(TOPDIR)" libapps$(LIBEXT)
syscall/libproxies$(LIBEXT): context
@$(MAKE) -C syscall TOPDIR="$(TOPDIR)" libproxies$(LIBEXT)
# Possible non-kernel builds
lib/liblib$(LIBEXT): context
@$(MAKE) -C lib TOPDIR="$(TOPDIR)" liblib$(LIBEXT)
# pass1 and pass2
#
# If the 2 pass build option is selected, then this pass1 target is
# configured to built before the pass2 target. This pass1 target may, as an
# example, build an extra link object (CONFIG_PASS1_OBJECT) which may be an
# incremental (relative) link object, but could be a static library (archive);
# some modification to this Makefile would be required if CONFIG_PASS1_OBJECT
# is an archive. Exactly what is performed during pass1 or what it generates
# is unknown to this makefule unless CONFIG_PASS1_OBJECT is defined.
pass1deps: context pass1dep $(USERLIBS)
pass1: pass1deps
ifeq ($(CONFIG_BUILD_2PASS),y)
@if [ -z "$(CONFIG_PASS1_BUILDIR)" ]; then \
echo "ERROR: CONFIG_PASS1_BUILDIR not defined"; \
exit 1; \
fi
@if [ ! -d "$(CONFIG_PASS1_BUILDIR)" ]; then \
echo "ERROR: CONFIG_PASS1_BUILDIR does not exist"; \
exit 1; \
fi
@if [ ! -f "$(CONFIG_PASS1_BUILDIR)/Makefile" ]; then \
echo "ERROR: No Makefile in CONFIG_PASS1_BUILDIR"; \
exit 1; \
fi
@$(MAKE) -C $(CONFIG_PASS1_BUILDIR) TOPDIR="$(TOPDIR)" LINKLIBS="$(NUTTXLIBS)" USERLIBS="$(USERLIBS)" "$(CONFIG_PASS1_TARGET)"
endif
pass2deps: context pass2dep $(NUTTXLIBS)
pass2: pass2deps
@$(MAKE) -C $(ARCH_SRC) TOPDIR="$(TOPDIR)" EXTRA_OBJS="$(EXTRA_OBJS)" LINKLIBS="$(NUTTXLIBS)" EXTRADEFINES=$(KDEFINE) $(BIN)
@if [ -w /tftpboot ] ; then \
cp -f $(BIN) /tftpboot/$(BIN).${CONFIG_ARCH}; \
fi
ifeq ($(CONFIG_RRLOAD_BINARY),y)
@echo "MK: $(BIN).rr"
@$(TOPDIR)/tools/mkimage.sh --Prefix $(CROSSDEV) $(BIN) $(BIN).rr
@if [ -w /tftpboot ] ; then \
cp -f $(BIN).rr /tftpboot/$\(BIN).rr.$(CONFIG_ARCH); \
fi
endif
ifeq ($(CONFIG_INTELHEX_BINARY),y)
@echo "CP: $(BIN).hex"
@$(OBJCOPY) $(OBJCOPYARGS) -O ihex $(BIN) $(BIN).hex
endif
ifeq ($(CONFIG_MOTOROLA_SREC),y)
@echo "CP: $(BIN).srec"
@$(OBJCOPY) $(OBJCOPYARGS) -O srec $(BIN) $(BIN).srec
endif
ifeq ($(CONFIG_RAW_BINARY),y)
@echo "CP: $(BIN).bin"
@$(OBJCOPY) $(OBJCOPYARGS) -O binary $(BIN) $(BIN).bin
endif
# $(BIN)
#
# Create the final NuttX executable in a two pass build process. In the
# normal case, all pass1 and pass2 dependencies are created then pass1
# and pass2 targets are built. However, in some cases, you may need to build
# pass1 depenencies and pass1 first, then build pass2 dependencies and pass2.
# in that case, execute 'make pass1 pass2' from the command line.
$(BIN): pass1deps pass2deps pass1 pass2
# download
#
# This is a helper target that will rebuild NuttX and download it to the target
# system in one step. The operation of this target depends completely upon
# implementation of the DOWNLOAD command in the user Make.defs file. It will
# generate an error an error if the DOWNLOAD command is not defined.
download: $(BIN)
$(call DOWNLOAD, $<)
# pass1dep: Create pass1 build dependencies
# pass2dep: Create pass2 build dependencies
pass1dep: context
@for dir in $(USERDEPDIRS) ; do \
$(MAKE) -C $$dir TOPDIR="$(TOPDIR)" depend ; \
done
pass2dep: context
@for dir in $(KERNDEPDIRS) ; do \
$(MAKE) -C $$dir TOPDIR="$(TOPDIR)" EXTRADEFINES=$(KDEFINE) depend; \
done
# Configuration targets
#
# These targets depend on the kconfig-frontends packages. To use these, you
# must first download and install the kconfig-frontends package from this
# location: http://ymorin.is-a-geek.org/projects/kconfig-frontends. See
# misc/tools/README.txt for additional information.
config:
@APPSDIR=${CONFIG_APPS_DIR} conf Kconfig
oldconfig:
@APPSDIR=${CONFIG_APPS_DIR} conf --oldconfig Kconfig
menuconfig:
@APPSDIR=${CONFIG_APPS_DIR} mconf Kconfig
# export
#
# The export target will package the NuttX libraries and header files into
# an exportable package. Caveats: (1) These needs some extension for the KERNEL
# build; it needs to receive USERLIBS and create a libuser.a). (2) The logic
# in tools/mkexport.sh only supports GCC and, for example, explicitly assumes
# that the archiver is 'ar'
export: pass2deps
@tools/mkexport.sh -w$(WINTOOL) -t "$(TOPDIR)" -l "$(NUTTXLIBS)"
# General housekeeping targets: dependencies, cleaning, etc.
#
# depend: Create both PASS1 and PASS2 dependencies
# clean: Removes derived object files, archives, executables, and
# temporary files, but retains the configuration and context
# files and directories.
# distclean: Does 'clean' then also removes all configuration and context
# files. This essentially restores the directory structure
# to its original, unconfigured stated.
depend: pass1dep pass2dep
subdir_clean:
@for dir in $(CLEANDIRS) ; do \
if [ -e $$dir/Makefile ]; then \
$(MAKE) -C $$dir TOPDIR="$(TOPDIR)" clean ; \
fi \
done
@$(MAKE) -C tools -f Makefile.host TOPDIR="$(TOPDIR)" clean
@$(MAKE) -C mm -f Makefile.test TOPDIR="$(TOPDIR)" clean
ifeq ($(CONFIG_BUILD_2PASS),y)
@$(MAKE) -C $(CONFIG_PASS1_BUILDIR) TOPDIR="$(TOPDIR)" clean
endif
clean: subdir_clean
@rm -f $(BIN) nuttx.* mm_test *.map _SAVED_APPS_config *~
@rm -f nuttx-export*
subdir_distclean:
@for dir in $(CLEANDIRS) ; do \
if [ -e $$dir/Makefile ]; then \
$(MAKE) -C $$dir TOPDIR="$(TOPDIR)" distclean ; \
fi \
done
distclean: clean subdir_distclean clean_context
ifeq ($(CONFIG_BUILD_2PASS),y)
@$(MAKE) -C $(CONFIG_PASS1_BUILDIR) TOPDIR="$(TOPDIR)" distclean
endif
@rm -f Make.defs setenv.sh .config .config.old
# Application housekeeping targets. The APPDIR variable refers to the user
# application directory. A sample apps/ directory is included with NuttX,
# however, this is not treated as part of NuttX and may be replaced with a
# different application directory. For the most part, the application
# directory is treated like any other build directory in this script. However,
# as a convenience, the following targets are included to support housekeeping
# functions in the user application directory from the NuttX build directory.
#
# apps_clean: Perform the clean operation only in the user application
# directory
# apps_distclean: Perform the distclean operation only in the user application
# directory. Note that the apps/.config file (inf any) is
# preserved so that this is not a "full" distclean but more of a
# configuration "reset." (There willnot be an apps/.config
# file if the configuration was generated via make menuconfig).
apps_clean:
ifneq ($(APPDIR),)
@$(MAKE) -C "$(TOPDIR)/$(APPDIR)" TOPDIR="$(TOPDIR)" clean
endif
apps_distclean:
ifneq ($(APPDIR),)
@if [ -r "$(TOPDIR)/$(APPDIR)/.config" ]; then \
cp "$(TOPDIR)/$(APPDIR)/.config" _SAVED_APPS_config || \
{ echo "Copy of $(APPDIR)/.config failed" ; exit 1 ; } \
else \
rm -f _SAVED_APPS_config; \
fi
@$(MAKE) -C "$(TOPDIR)/$(APPDIR)" TOPDIR="$(TOPDIR)" distclean
@if [ -r _SAVED_APPS_config ]; then \
@mv _SAVED_APPS_config "$(TOPDIR)/$(APPDIR)/.config" || \
{ echo "Copy of _SAVED_APPS_config failed" ; exit 1 ; } \
fi
endif

View File

@ -18,8 +18,6 @@ README
- Building - Building
- Re-building - Re-building
- Build Targets and Options - Build Targets and Options
- Native Windows Build
- Installing GNUWin32
o Cygwin Build Problems o Cygwin Build Problems
- Strange Path Problems - Strange Path Problems
- Window Native Toolchain Issues - Window Native Toolchain Issues
@ -156,15 +154,9 @@ Notes about Header Files
Even though you should not use a foreign C-Library, you may still need Even though you should not use a foreign C-Library, you may still need
to use other, external libraries with NuttX. In particular, you may to use other, external libraries with NuttX. In particular, you may
need to use the math library, libm.a. NuttX supports a generic, built-in need to use the math library, libm.a. The math libary header file,
math library that can be enabled using CONFIG_LIBM=y. However, you may math.h, is a special case. If you do nothing, the standard math.h
still want to use a higher performance external math library that has header file that is provided with your toolchain will be used.
been tuned for your CPU. Sometimes such such tuned math libraries are
bundled with your toolchain.
The math libary header file, math.h, is a then special case. If you do
nothing, the standard math.h header file that is provided with your
toolchain will be used.
If you have a custom, architecture specific math.h header file, then If you have a custom, architecture specific math.h header file, then
that header file should be placed at arch/<cpu>/include/math.h. There that header file should be placed at arch/<cpu>/include/math.h. There
@ -179,16 +171,6 @@ Notes about Header Files
than to include that archicture-specific math.h header file as the than to include that archicture-specific math.h header file as the
system math.h header file. system math.h header file.
float.h
If you enable the generic, built-in math library, then that math library
will expect your toolchain to provide the standard float.h header file.
The float.h header file defines the properties of your floating point
implementation. It would always be best to use your toolchain's float.h
header file but if none is avaiable, a default float.h header file will
provided if this option is selected. However, there is no assurance that
the settings in this float.h are actually correct for your platform!
stdarg.h stdarg.h
In most cases, the correct version of stdarg.h is the version provided with your toolchain. However, sometimes there are issues with with using your toolchains stdarg.h. For example, it may attempt to draw in header files that do not exist in NuttX or perhaps the header files that is uses are not compatible with the NuttX header files. In those cases, you can use an architecture-specific stdarg.h header file by defining CONFIG_ARCH_STDARG_H=y. In most cases, the correct version of stdarg.h is the version provided with your toolchain. However, sometimes there are issues with with using your toolchains stdarg.h. For example, it may attempt to draw in header files that do not exist in NuttX or perhaps the header files that is uses are not compatible with the NuttX header files. In those cases, you can use an architecture-specific stdarg.h header file by defining CONFIG_ARCH_STDARG_H=y.
@ -207,8 +189,7 @@ Instantiating "Canned" Configurations
Where <board-name> is the name of your development board and <config-dir>. Where <board-name> is the name of your development board and <config-dir>.
Configuring NuttX requires only copying three files from the <config-dir> Configuring NuttX requires only copying three files from the <config-dir>
to the directory where you installed NuttX (TOPDIR) (and sometimes one to the directly where you installed NuttX (TOPDIR):
additional file to the directory the NuttX application package (APPSDIR)):
Copy configs/<board-name>/<config-dir>/Make.def to ${TOPDIR}/Make.defs Copy configs/<board-name>/<config-dir>/Make.def to ${TOPDIR}/Make.defs
@ -230,14 +211,6 @@ additional file to the directory the NuttX application package (APPSDIR)):
included in the build and what is not. This file is also used included in the build and what is not. This file is also used
to generate a C configuration header at include/nuttx/config.h. to generate a C configuration header at include/nuttx/config.h.
Copy configs/<board-name>/<config-dir>/appconfig to ${APPSDIR}/.config
The appconfig file describes the applications that need to be
built in the appliction directory (APPSDIR). Not all configurations
have an appconfig file. This file is deprecated and will not be
used with new defconfig files produced with the mconf configuration
tool.
General information about configuring NuttX can be found in: General information about configuring NuttX can be found in:
${TOPDIR}/configs/README.txt ${TOPDIR}/configs/README.txt
@ -495,101 +468,6 @@ Build Targets and Options
useful when adding new boards or tracking down compile time errors and useful when adding new boards or tracking down compile time errors and
warnings (Contributed by Richard Cochran). warnings (Contributed by Richard Cochran).
Native Windows Build
--------------------
The beginnings of a Windows native build are in place but still not full
usable as of this writing. The windows native build logic is currently
separate and must be started by:
make -f Makefile.win
This build:
- Uses all Windows style paths
- Uses primarily Windows batch commands from cmd.exe, with
- A few extensions from GNUWin32 (or MSYS is you prefer)
In this build, you cannot use a Cygwin or MSYS shell. Rather the build must
be performed in a Windows CMD shell. Here is a better shell than than the
standard issue, CMD shell: ConEmu which can be downloaded from:
http://code.google.com/p/conemu-maximus5/
Build Tools. The build still relies on some Unix-like commands. I use
the GNUWin32 tools that can be downloaded from http://gnuwin32.sourceforge.net/.
The MSYS tools are probably also a option but are likely lower performance
since they are based on Cygwin 1.3.
Host Compiler: I use the MingGW compiler which can be downloaded from
http://www.mingw.org/. If you are using GNUWin32, then it is recommended
the you not install the optional MSYS components as there may be conflicts.
Installing GNUWin32
-------------------
The Windows native build will depend upon a few Unix-like tools that can be
provided either by MSYS or GNUWin32. The GNUWin32 are available from
http://gnuwin32.sourceforge.net/. GNUWin32 provides ports of tools with a
GPL or similar open source license to modern MS-Windows (Microsoft Windows
2000 / XP / 2003 / Vista / 2008 / 7). See
http://gnuwin32.sourceforge.net/packages.html for a list of all of the tools
available in the GNUWin32 package.
The SourceForge project is located here:
http://sourceforge.net/projects/gnuwin32/. The project is still being
actively supported (although some of the Windows ports have gotten very old).
Some commercial toolchains include a subset of the GNUWin32 tools in the
installation. My recommendation is that you download the GNUWin32 tools
directly from the sourceforge.net website so that you will know what you are
using and can reproduce your build environment.
GNUWin32 Installation Steps:
The following steps will download and execute the GNUWin32 installer.
1. Download GetGNUWin32-x.x.x.exe from
http://sourceforge.net/projects/getgnuwin32/files/. This is the
installer. The current version as of this writing is 0.6.3.
2. Run the installer.
3. Accept the license.
4. Select the installation directory. My recommendation is the
directory that contains this README file (<this-directory>).
5. After running GetGNUWin32-0.x.x.exe, you will have a new directory
<this-directory>/GetGNUWin32
Note the the GNUWin32 installer didn't install GNUWin32. Instead, it
installed another, smarter downloader. That downloader is the GNUWin32
package management tool developed by the Open SSL project.
The following steps probably should be performed from inside a DOS shell.
6. Change to the directory created by GetGNUWin32-x.x.x.exe
cd GetGNUWin32
7. Execute the download.bat script. The download.bat script will download
about 446 packages! Enough to have a very complete Linux-like environment
under the DOS shell. This will take awhile. This step only downloads
the packages and the next step will install the packages.
download
8. This step will install the downloaded packages. The argument of the
install.bat script is the installation location. C:\gnuwin32 is the
standard install location:
install C:\gnuwin32
NOTE: This installation step will install *all* GNUWin32 packages... far
more than you will ever need. If disc space is a problem for you, you might
need to perform a manual installation of the individual ZIP files that you
will find in the <this directory>/GetGNUWin32/packages directory.
CYGWIN BUILD PROBLEMS CYGWIN BUILD PROBLEMS
^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^
@ -645,16 +523,18 @@ Window Native Toolchain Issues
is not a long as you might think because there is no dependency checking is not a long as you might think because there is no dependency checking
if you are using a native Windows toolchain. That bring us to #3: if you are using a native Windows toolchain. That bring us to #3:
3. Dependencies are not made when using Windows versions of the GCC on a POSIX 3. Dependencies are not made when using Windows versions of the GCC. This is
platform (i.e., Cygwin). This is because the dependencies are generated because the dependencies are generated using Windows pathes which do not
using Windows paths which do not work with the Cygwin make. work with the Cygwin make.
MKDEP = $(TOPDIR)/tools/mknulldeps.sh Support has been added for making dependencies with the windows-native toolchains.
That support can be enabled by modifying your Make.defs file as follows:
If you are building natively on Windows, then no such conflict exists - MKDEP = $(TOPDIR)/tools/mknulldeps.sh
and the best selection is: + MKDEP = $(TOPDIR)/tools/mkdeps.sh --winpaths "$(TOPDIR)"
MKDEP = $(TOPDIR)/tools/mkdeps.exe If you have problems with the dependency build (for example, if you are not
building on C:), then you may need to modify tools/mkdeps.sh
General Pre-built Toolchain Issues General Pre-built Toolchain Issues
@ -885,8 +765,6 @@ nuttx
| | `- README.txt | | `- README.txt
| |- stm3240g-eval/ | |- stm3240g-eval/
| | `- README.txt | | `- README.txt
| |- stm32f100rc_generic/
| | `- README.txt
| |- stm32f4discovery/ | |- stm32f4discovery/
| | `- README.txt | | `- README.txt
| |- sure-pic32mx/ | |- sure-pic32mx/
@ -939,8 +817,6 @@ nuttx
| `- README.txt | `- README.txt
|- lib/ |- lib/
| `- README.txt | `- README.txt
|- libc/
| `- README.txt
|- libxx/ |- libxx/
| `- README.txt | `- README.txt
|- mm/ |- mm/
@ -952,7 +828,6 @@ nuttx
apps apps
|- examples/ |- examples/
| |- json/README.txt
| |- pashello/README.txt | |- pashello/README.txt
| `- README.txt | `- README.txt
|- graphics/ |- graphics/
@ -968,8 +843,6 @@ apps
| | `- README.txt | | `- README.txt
| |- ftpc | |- ftpc
| | `- README.txt | | `- README.txt
| |- json
| | `- README.txt
| |- telnetd | |- telnetd
| | `- README.txt | | `- README.txt
| `- README.txt | `- README.txt
@ -991,12 +864,3 @@ apps
| `- sysinfo | `- sysinfo
| `- README.txt | `- README.txt
`- README.txt `- README.txt
NxWidgets
|- Doxygen
| `- README.txt
|- tools
| `- README.txt
|- UnitTests
| `- README.txt
`- README.txt

View File

@ -3171,81 +3171,3 @@ Bugfixes (see the change log for details). Some of these are very important
Vainish). Fix some field-width handling issues in sscanf() Vainish). Fix some field-width handling issues in sscanf()
As well as other, less critical bugs (see the ChangeLog for details) As well as other, less critical bugs (see the ChangeLog for details)
NuttX-6.23
^^^^^^^^^^
The 90th release of NuttX, Version 6.23, was made on November 5, 2012,
and is available for download from the SourceForge website. Note
that release consists of two tarballs: nuttx-6.23.tar.gz and
apps-6.23.tar.gz. Both may be needed (see the top-level nuttx/README.txt
file for build information).
This release corresponds with SVN release number: r5313
Note that all SVN information has been stripped from the tarballs. If you
r5313 the SVN configuration, you should check out directly from SVN. Revision
r5206 should equivalent to release 6.22 of NuttX 6.22:
svn checkout -r5313 svn://svn.code.sf.net/p/nuttx/code/trunk nuttx-code
Or
svn checkout -r5313 http://svn.code.sf.net/p/nuttx/code/trunk nuttx-code
Additional new features and extended functionality:
* RTOS: If both atexit() and on_exit() are enabled, use on_exit() to
implement atexit(). Updates for RGMP 4.0.
* Binfmt: Add support for loading and executing ELF binary modules from
a file system.
* Drivers: Maxim MAX11802 touchscreen controller (Petteri Aimonen)
* STM32 Driver: Implementation of /dev/random using the STM32 Random Number
Generator (RNG).
* STM32 Boards: ADC support for the Shenzhou IV board. Relay support for
the Shenzhou IV board.
* C Library: Support is now included for the add-on uClibc++ C++
standard library support. This includes support for iostreams, strings,
STL, RTTI, exceptions -- the complete C++ environment. (uClibc++ is
provided as a separate add-on package due to licensing issues).
Optimized generic and ARM-specific memcpy() function. Optimized
memset() function.
Add support for ferror(), feof(), and clearerror(). Add support for
__cxa_atexit().
Math Library: Port of the math library from Rhombus OS by Nick Johnson
(Darcy Gong).
* Applications: New NSH commands: ifup, ifdown, urlencode, urldecode,
base64enc, bas64dec, md5 (Darcy Gong). Add support for NSH telnet login
(Darcy Gong). Enancements to NSH ping command to support pinging hosts
with very long round-trip times. Extensions to the ifconfig command
Darcy Gong),
Many extensions to the webclient/wget and DNS resolver logic from Darcy
Gong. JSON, Base64, URL encoding, and MD5 libraries contributed by Darcy
Gong.
New examples: ELF loader, JSON, wgetjson, cxxtest, relays.
Bugfixes (see the change log for details). Some of these are very important
(marked *critical*):
* Drivers: W25 SPI FLASH
* STM32 Drivers: ADC reset
* Graphics: Missing implementation of the blocked method (*critical*,
Petteri Aimonen).
* C Library: Floating point numbers in printf and related formatting functions
(Mike Smith), cf[get|set]speed() (Mike Smith)
As well as other, less critical bugs (see the ChangeLog for details)

View File

@ -14,8 +14,8 @@ nuttx/
(2) C++ Support (2) C++ Support
(6) Binary loaders (binfmt/) (6) Binary loaders (binfmt/)
(17) Network (net/, drivers/net) (17) Network (net/, drivers/net)
(4) USB (drivers/usbdev, drivers/usbhost) (3) USB (drivers/usbdev, drivers/usbhost)
(11) Libraries (libc/, ) (11) Libraries (lib/)
(9) File system/Generic drivers (fs/, drivers/) (9) File system/Generic drivers (fs/, drivers/)
(5) Graphics subystem (graphics/) (5) Graphics subystem (graphics/)
(1) Pascal add-on (pcode/) (1) Pascal add-on (pcode/)
@ -32,7 +32,7 @@ nuttx/
(0) ARM/LPC43x (arch/arm/src/lpc43xx/) (0) ARM/LPC43x (arch/arm/src/lpc43xx/)
(3) ARM/STR71x (arch/arm/src/str71x/) (3) ARM/STR71x (arch/arm/src/str71x/)
(3) ARM/LM3S6918 (arch/arm/src/lm3s/) (3) ARM/LM3S6918 (arch/arm/src/lm3s/)
(4) ARM/STM32 (arch/arm/src/stm32/) (7) ARM/STM32 (arch/arm/src/stm32/)
(3) AVR (arch/avr) (3) AVR (arch/avr)
(0) Intel x86 (arch/x86) (0) Intel x86 (arch/x86)
(4) 8051 / MCS51 (arch/8051/) (4) 8051 / MCS51 (arch/8051/)
@ -421,7 +421,7 @@ o Binary loaders (binfmt/)
.word .LC3-(.LPIC4+4) .word .LC3-(.LPIC4+4)
.word .LC4-(.LPIC5+4) .word .LC4-(.LPIC5+4)
This is good and bad. This is good because it means that .rodata.str1.1 can now This is good and bad. This is good because it means that .rodata.str1.1 can not
reside in FLASH with .text and can be accessed using PC-relative addressing. reside in FLASH with .text and can be accessed using PC-relative addressing.
That can be accomplished by simply moving the .rodata from the .data section to That can be accomplished by simply moving the .rodata from the .data section to
the .text section in the linker script. (The NXFLAT linker script is located at the .text section in the linker script. (The NXFLAT linker script is located at
@ -629,13 +629,8 @@ o USB (drivers/usbdev, drivers/usbhost)
CDC/ACM serial driver might need the line coding data (that CDC/ACM serial driver might need the line coding data (that
data is not used currenly, but it might be). data is not used currenly, but it might be).
Title: USB HUB SUPPORT o Libraries (lib/)
Description: Add support for USB hubs ^^^^^^^^^^^^^^^^
Status: Open
Priority: Low/Unknown. This is a feature enhancement.
o Libraries (libc/)
^^^^^^^^^^^^^^^^^
Title: ENVIRON Title: ENVIRON
Description: The definition of environ in stdlib.h is bogus and will not Description: The definition of environ in stdlib.h is bogus and will not
@ -648,7 +643,7 @@ o Libraries (libc/)
Description: Need some minimal termios support... at a minimum, enough to Description: Need some minimal termios support... at a minimum, enough to
switch between raw and "normal" modes to support behavior like switch between raw and "normal" modes to support behavior like
that needed for readline(). that needed for readline().
UPDATE: There is growing functionality in libc/termios/ and in the UPDATE: There is growing functionality in lib/termios/ and in the
ioctl methods of several MCU serial drivers (stm32, lpc43, lpc17, ioctl methods of several MCU serial drivers (stm32, lpc43, lpc17,
pic32). However, as phrased, this bug cannot yet be closed since pic32). However, as phrased, this bug cannot yet be closed since
this "growing functionality" does not address all termios.h this "growing functionality" does not address all termios.h
@ -713,7 +708,7 @@ o Libraries (libc/)
Priority: Priority:
Title: OLD dtoa NEEDS TO BE UPDATED Title: OLD dtoa NEEDS TO BE UPDATED
Description: This implementation of dtoa in libc/stdio is old and will not Description: This implementation of dtoa in lib/stdio is old and will not
work with some newer compilers. See work with some newer compilers. See
http://patrakov.blogspot.com/2009/03/dont-use-old-dtoac.html http://patrakov.blogspot.com/2009/03/dont-use-old-dtoac.html
Status: Open Status: Open
@ -721,7 +716,7 @@ o Libraries (libc/)
Title: SYSLOG INTEGRATION Title: SYSLOG INTEGRATION
Description: There are the beginnings of some system logging capabilities (see Description: There are the beginnings of some system logging capabilities (see
drivers/syslog, fs/fs_syslog.c, and libc/stdio/lib_librawprintf.c and drivers/syslog, fs/fs_syslog.c, and lib/stdio/lib_librawprintf.c and
lib_liblowprintf.c. For NuttX, SYSLOG is a concept and includes, lib_liblowprintf.c. For NuttX, SYSLOG is a concept and includes,
extends, and replaces the legacy NuttX debug ouput. Some additional extends, and replaces the legacy NuttX debug ouput. Some additional
integration is required to formalized this. For example: integration is required to formalized this. For example:
@ -958,7 +953,7 @@ o Build system
built configuration, only the multiple user mode can be supported built configuration, only the multiple user mode can be supported
with the NX server residing inside of the kernel space. In with the NX server residing inside of the kernel space. In
this case, most of the user end functions in graphics/nxmu this case, most of the user end functions in graphics/nxmu
must be moved to libc/nx and those functions must be built into must be moved to lib/nx and those functions must be built into
libuser.a to be linked with the user-space code. libuser.a to be linked with the user-space code.
A similar issue exists in NSH that uses some internal OS A similar issue exists in NSH that uses some internal OS
interfaces that would not be available in a kernel build interfaces that would not be available in a kernel build
@ -1349,6 +1344,11 @@ o ARM/LM3S6918 (arch/arm/src/lm3s/)
o ARM/STM32 (arch/arm/src/stm32/) o ARM/STM32 (arch/arm/src/stm32/)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Title: NOR FLASH DRIVER
Description: NOR Flash driver with FTL layer to support a file system.
Status: Open
Priority: Low
Title: USBSERIAL ISSUES Title: USBSERIAL ISSUES
Description A USB device-side driver is in place but not well tested. At Description A USB device-side driver is in place but not well tested. At
present, the apps/examples/usbserial test sometimes fails. The situation present, the apps/examples/usbserial test sometimes fails. The situation
@ -1371,6 +1371,11 @@ o ARM/STM32 (arch/arm/src/stm32/)
Status: Open Status: Open
Priority: Medium-High Priority: Medium-High
Title: FSMC EXTERNAL MEMORY UNTESTED
Description: FSMC external memory support is untested
Status: Open
Priority: Low
Title: DMA EXTENSIONS Title: DMA EXTENSIONS
Description: DMA logic needs to be extended. DMA2, Channel 5, will not work Description: DMA logic needs to be extended. DMA2, Channel 5, will not work
because the DMA2 channels 4 & 5 share the same interrupt. because the DMA2 channels 4 & 5 share the same interrupt.
@ -1378,6 +1383,12 @@ o ARM/STM32 (arch/arm/src/stm32/)
Priority: Low until someone needs DMA1, Channel 5 (ADC3, UART4_TX, TIM5_CH1, or Priority: Low until someone needs DMA1, Channel 5 (ADC3, UART4_TX, TIM5_CH1, or
TIM8_CH2). TIM8_CH2).
Title: UNFINISHED DRIVERS
Description: The following drivers are incomplete: DAC. The following drivers
are untested: DMA on the F4, CAN.
Status: Open
Priority: Medium
Title: F4 SDIO MULTI-BLOCK TRANSFER FAILURES Title: F4 SDIO MULTI-BLOCK TRANSFER FAILURES
Description: If you use a large I/O buffer to access the file system, then the Description: If you use a large I/O buffer to access the file system, then the
MMCSD driver will perform multiple block SD transfers. With DMA MMCSD driver will perform multiple block SD transfers. With DMA
@ -1401,15 +1412,13 @@ o ARM/STM32 (arch/arm/src/stm32/)
Status: Open Status: Open
Priority: Low (I am not even sure if this is a problem yet). Priority: Low (I am not even sure if this is a problem yet).
Title: DMA FROM EXTERNAL, FSMC MEMORY Status: UNFINISHED STM32 F4 OTG FS HOST DRIVER
Description: I have seen a problem on F1 where all SDIO DMAs work exist for Description: A quick-n-dirty leverage of the the LPC17xx host driver was put into
write DMAs from FSMC memory (i.e., from FSMC memory to SDIO). the STM32 source to support development of the STM32 F4 OTG FS host
Read transfers work fine (SDIO to FSMC memory). The failure is driver. It is non-functional and still waiting for STM32 F4 logic
a data underrun error with zero bytes of data transferred. The to be added. Don't use it!
workaround for now is to use DMA buffers allocted from internal
SRAM.
Status: Open Status: Open
Priority: Low Priority: Low (unless you need a host driver).
o AVR (arch/avr) o AVR (arch/avr)
^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^

View File

@ -4,8 +4,6 @@
# #
if ARCH_ARM if ARCH_ARM
comment "ARM Options"
choice choice
prompt "ARM chip selection" prompt "ARM chip selection"
default ARCH_CHIP_STM32 default ARCH_CHIP_STM32
@ -155,9 +153,6 @@ config ARCH_CHIP
default "stm32" if ARCH_CHIP_STM32 default "stm32" if ARCH_CHIP_STM32
default "str71x" if ARCH_CHIP_STR71X default "str71x" if ARCH_CHIP_STR71X
config ARCH_HAVE_CMNVECTOR
bool
config ARMV7M_CMNVECTOR config ARMV7M_CMNVECTOR
bool "Use common ARMv7-M vectors" bool "Use common ARMv7-M vectors"
default n default n
@ -244,18 +239,6 @@ config ARCH_CALIBRATION
watch to measure the 100 second delay then adjust BOARD_LOOPSPERMSEC until watch to measure the 100 second delay then adjust BOARD_LOOPSPERMSEC until
the delay actually is 100 seconds. the delay actually is 100 seconds.
config DEBUG_HARDFAULT
bool "Verbose Hard-Fault Debug"
default n
depends on DEBUG && (ARCH_CORTEXM3 || ARCH_CORTEXM4)
---help---
Enables verbose debug output when a hard fault is occurs. This verbose
output is sometimes helpful when debugging difficult hard fault problems,
but may be more than you typcially want to see.
if ARCH_CORTEXM3 || ARCH_CORTEXM4
source arch/arm/src/armv7-m/Kconfig
endif
if ARCH_CHIP_C5471 if ARCH_CHIP_C5471
source arch/arm/src/c5471/Kconfig source arch/arm/src/c5471/Kconfig
endif endif

View File

@ -59,11 +59,12 @@
/* STM32 F100 Value Line ************************************************************/ /* STM32 F100 Value Line ************************************************************/
#if defined(CONFIG_ARCH_CHIP_STM32F100C8) || defined(CONFIG_ARCH_CHIP_STM32F100CB) \ #if defined(CONFIG_ARCH_CHIP_STM32F100C8) || defined(CONFIG_ARCH_CHIP_STM32F100CB) \
|| defined(CONFIG_ARCH_CHIP_STM32F100R8) || defined(CONFIG_ARCH_CHIP_STM32F100RB) || defined(CONFIG_ARCH_CHIP_STM32F100R8) || defined(CONFIG_ARCH_CHIP_STM32F100RB) \
|| defined(CONFIG_ARCH_CHIP_STM32F100V8) || defined(CONFIG_ARCH_CHIP_STM32F100VB)
# define CONFIG_STM32_STM32F10XX 1 /* STM32F10xxx family */ # define CONFIG_STM32_STM32F10XX 1 /* STM32F10xxx family */
# undef CONFIG_STM32_LOWDENSITY /* STM32F100x, STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */ # undef CONFIG_STM32_LOWDENSITY /* STM32F100x, STM32F102x and STM32F103x w/ 16/32 Kbytes */
# define CONFIG_STM32_MEDIUMDENSITY 1 /* STM32F100x, STM32F101x, STM32F102x and STM32F103x w/ 64/128 Kbytes */ # define CONFIG_STM32_MEDIUMDENSITY 1 /* STM32F101x, STM32F102x and STM32F103x w/ 64/128 Kbytes */
# undef CONFIG_STM32_HIGHDENSITY /* STM32F100x, STM32F101x, and STM32F103x w/ 256/512 Kbytes */ # undef CONFIG_STM32_HIGHDENSITY /* STM32F101x and STM32F103x w/ 256/512 Kbytes */
# define CONFIG_STM32_VALUELINE 1 /* STM32F100x */ # define CONFIG_STM32_VALUELINE 1 /* STM32F100x */
# undef CONFIG_STM32_CONNECTIVITYLINE /* STM32F105x and STM32F107x */ # undef CONFIG_STM32_CONNECTIVITYLINE /* STM32F105x and STM32F107x */
# undef CONFIG_STM32_STM32F20XX /* STM32F205x and STM32F207x */ # undef CONFIG_STM32_STM32F20XX /* STM32F205x and STM32F207x */
@ -71,106 +72,11 @@
# define STM32_NFSMC 0 /* FSMC */ # define STM32_NFSMC 0 /* FSMC */
# define STM32_NATIM 1 /* One advanced timer TIM1 */ # define STM32_NATIM 1 /* One advanced timer TIM1 */
# define STM32_NGTIM 3 /* 16-bit general timers TIM2,3,4 with DMA */ # define STM32_NGTIM 3 /* 16-bit general timers TIM2,3,4 with DMA */
# define STM32_NBTIM 2 /* 2 basic timers: TIM6, TIM7 */ # define STM32_NBTIM 0 /* No basic timers */
// TODO: there are also 3 additional timers (15-17) that don't fit any existing category
# define STM32_NDMA 1 /* DMA1 */
# define STM32_NSPI 2 /* SPI1-2 */
# define STM32_NI2S 0 /* No I2S */
# define STM32_NUSART 3 /* USART1-3 */
# define STM32_NI2C 2 /* I2C1-2 */
# define STM32_NCAN 0 /* No CAN */
# define STM32_NSDIO 0 /* No SDIO */
# define STM32_NUSBOTG 0 /* No USB OTG FS/HS */
# define STM32_NGPIO 64 /* GPIOA-D */
# define STM32_NADC 1 /* ADC1 */
# define STM32_NDAC 2 /* DAC 1-2 */
# define STM32_NCRC 1 /* CRC1 */
# define STM32_NETHERNET 0 /* No ethernet */
# define STM32_NRNG 0 /* No random number generator (RNG) */
# define STM32_NDCMI 0 /* No digital camera interface (DCMI) */
#elif defined(CONFIG_ARCH_CHIP_STM32F100V8) || defined(CONFIG_ARCH_CHIP_STM32F100VB)
# define CONFIG_STM32_STM32F10XX 1 /* STM32F10xxx family */
# undef CONFIG_STM32_LOWDENSITY /* STM32F100x, STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */
# define CONFIG_STM32_MEDIUMDENSITY 1 /* STM32F100x, STM32F101x, STM32F102x and STM32F103x w/ 64/128 Kbytes */
# undef CONFIG_STM32_HIGHDENSITY /* STM32F100x, STM32F101x, and STM32F103x w/ 256/512 Kbytes */
# define CONFIG_STM32_VALUELINE 1 /* STM32F100x */
# undef CONFIG_STM32_CONNECTIVITYLINE /* STM32F105x and STM32F107x */
# undef CONFIG_STM32_STM32F20XX /* STM32F205x and STM32F207x */
# undef CONFIG_STM32_STM32F40XX /* STM32F405xx and STM32407xx families */
# define STM32_NFSMC 0 /* FSMC */
# define STM32_NATIM 1 /* One advanced timer TIM1 */
# define STM32_NGTIM 3 /* 16-bit general timers TIM2,3,4 with DMA */
# define STM32_NBTIM 2 /* 2 basic timers: TIM6, TIM7 */
// TODO: there are also 3 additional timers (15-17) that don't fit any existing category
# define STM32_NDMA 1 /* DMA1 */
# define STM32_NSPI 2 /* SPI1-2 */
# define STM32_NI2S 0 /* No I2S */
# define STM32_NUSART 3 /* USART1-3 */
# define STM32_NI2C 2 /* I2C1-2 */
# define STM32_NCAN 0 /* No CAN */
# define STM32_NSDIO 0 /* No SDIO */
# define STM32_NUSBOTG 0 /* No USB OTG FS/HS */
# define STM32_NGPIO 80 /* GPIOA-E */
# define STM32_NADC 1 /* ADC1 */
# define STM32_NDAC 2 /* DAC 1-2 */
# define STM32_NCRC 1 /* CRC1 */
# define STM32_NETHERNET 0 /* No ethernet */
# define STM32_NRNG 0 /* No random number generator (RNG) */
# define STM32_NDCMI 0 /* No digital camera interface (DCMI) */
/* STM32 F100 High-density value Line ************************************************************/
#elif defined(CONFIG_ARCH_CHIP_STM32F100RC) || defined(CONFIG_ARCH_CHIP_STM32F100RD) \
|| defined(CONFIG_ARCH_CHIP_STM32F100RE)
# define CONFIG_STM32_STM32F10XX 1 /* STM32F10xxx family */
# undef CONFIG_STM32_LOWDENSITY /* STM32F100x, STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */
# undef CONFIG_STM32_MEDIUMDENSITY /* STM32F100x, STM32F101x, STM32F102x and STM32F103x w/ 64/128 Kbytes */
# define CONFIG_STM32_HIGHDENSITY 1 /* STM32F100x, STM32F101x, and STM32F103x w/ 256/512 Kbytes */
# define CONFIG_STM32_VALUELINE 1 /* STM32F100x */
# undef CONFIG_STM32_CONNECTIVITYLINE /* STM32F105x and STM32F107x */
# undef CONFIG_STM32_STM32F20XX /* STM32F205x and STM32F207x */
# undef CONFIG_STM32_STM32F40XX /* STM32F405xx and STM32407xx families */
# define STM32_NFSMC 0 /* FSMC */
# define STM32_NATIM 1 /* One advanced timer TIM1 */
# define STM32_NGTIM 4 /* 16-bit general timers TIM2,3,4,5 with DMA */
# define STM32_NBTIM 2 /* 2 basic timers: TIM6, TIM7 */
// TODO: there are also 6 additional timers (12-17) that don't fit any existing category
# define STM32_NDMA 2 /* DMA1-2 */ # define STM32_NDMA 2 /* DMA1-2 */
# define STM32_NSPI 3 /* SPI1-3 */ # define STM32_NSPI 2 /* SPI1-2 */
# define STM32_NI2S 0 /* No I2S */ # define STM32_NI2S 0 /* No I2S (?) */
# define STM32_NUSART 5 /* USART1-5 */ # define STM32_NUSART 3 /* USART1-3 */
# define STM32_NI2C 2 /* I2C1-2 */
# define STM32_NCAN 0 /* No CAN */
# define STM32_NSDIO 0 /* No SDIO */
# define STM32_NUSBOTG 0 /* No USB OTG FS/HS */
# define STM32_NGPIO 64 /* GPIOA-D */
# define STM32_NADC 1 /* ADC1 */
# define STM32_NDAC 2 /* DAC 1-2 */
# define STM32_NCRC 1 /* CRC1 */
# define STM32_NETHERNET 0 /* No ethernet */
# define STM32_NRNG 0 /* No random number generator (RNG) */
# define STM32_NDCMI 0 /* No digital camera interface (DCMI) */
#elif defined(CONFIG_ARCH_CHIP_STM32F100VC) || defined(CONFIG_ARCH_CHIP_STM32F100VD) \
|| defined(CONFIG_ARCH_CHIP_STM32F100VE)
# define CONFIG_STM32_STM32F10XX 1 /* STM32F10xxx family */
# undef CONFIG_STM32_LOWDENSITY /* STM32F100x, STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */
# undef CONFIG_STM32_MEDIUMDENSITY /* STM32F100x, STM32F101x, STM32F102x and STM32F103x w/ 64/128 Kbytes */
# define CONFIG_STM32_HIGHDENSITY 1 /* STM32F100x, STM32F101x, and STM32F103x w/ 256/512 Kbytes */
# define CONFIG_STM32_VALUELINE 1 /* STM32F100x */
# undef CONFIG_STM32_CONNECTIVITYLINE /* STM32F105x and STM32F107x */
# undef CONFIG_STM32_STM32F20XX /* STM32F205x and STM32F207x */
# undef CONFIG_STM32_STM32F40XX /* STM32F405xx and STM32407xx families */
# define STM32_NFSMC 1 /* FSMC */
# define STM32_NATIM 1 /* One advanced timer TIM1 */
# define STM32_NGTIM 4 /* 16-bit general timers TIM2,3,4,5 with DMA */
# define STM32_NBTIM 2 /* 2 basic timers: TIM6, TIM7 */
// TODO: there are also 6 additional timers (12-17) that don't fit any existing category
# define STM32_NDMA 2 /* DMA1-2 */
# define STM32_NSPI 3 /* SPI1-3 */
# define STM32_NI2S 0 /* No I2S */
# define STM32_NUSART 5 /* USART1-5 */
# define STM32_NI2C 2 /* I2C1-2 */ # define STM32_NI2C 2 /* I2C1-2 */
# define STM32_NCAN 0 /* No CAN */ # define STM32_NCAN 0 /* No CAN */
# define STM32_NSDIO 0 /* No SDIO */ # define STM32_NSDIO 0 /* No SDIO */
@ -190,9 +96,9 @@
#elif defined(CONFIG_ARCH_CHIP_STM32F103RET6) #elif defined(CONFIG_ARCH_CHIP_STM32F103RET6)
# define CONFIG_STM32_STM32F10XX 1 /* STM32F10xxx family */ # define CONFIG_STM32_STM32F10XX 1 /* STM32F10xxx family */
# undef CONFIG_STM32_LOWDENSITY /* STM32F100x, STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */ # undef CONFIG_STM32_LOWDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */
# undef CONFIG_STM32_MEDIUMDENSITY /* STM32F100x, STM32F101x, STM32F102x and STM32F103x w/ 64/128 Kbytes */ # undef CONFIG_STM32_MEDIUMDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 64/128 Kbytes */
# define CONFIG_STM32_HIGHDENSITY 1 /* STM32F100x, STM32F101x, and STM32F103x w/ 256/512 Kbytes */ # define CONFIG_STM32_HIGHDENSITY 1 /* STM32F101x and STM32F103x w/ 256/512 Kbytes */
# undef CONFIG_STM32_VALUELINE /* STM32F100x */ # undef CONFIG_STM32_VALUELINE /* STM32F100x */
# undef CONFIG_STM32_CONNECTIVITYLINE /* STM32F105x and STM32F107x */ # undef CONFIG_STM32_CONNECTIVITYLINE /* STM32F105x and STM32F107x */
# undef CONFIG_STM32_STM32F20XX /* STM32F205x and STM32F207x */ # undef CONFIG_STM32_STM32F20XX /* STM32F205x and STM32F207x */
@ -223,9 +129,9 @@
#elif defined(CONFIG_ARCH_CHIP_STM32F103VCT6) || defined(CONFIG_ARCH_CHIP_STM32F103VET6) #elif defined(CONFIG_ARCH_CHIP_STM32F103VCT6) || defined(CONFIG_ARCH_CHIP_STM32F103VET6)
# define CONFIG_STM32_STM32F10XX 1 /* STM32F10xxx family */ # define CONFIG_STM32_STM32F10XX 1 /* STM32F10xxx family */
# undef CONFIG_STM32_LOWDENSITY /* STM32F100x, STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */ # undef CONFIG_STM32_LOWDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */
# undef CONFIG_STM32_MEDIUMDENSITY /* STM32F100x, STM32F101x, STM32F102x and STM32F103x w/ 64/128 Kbytes */ # undef CONFIG_STM32_MEDIUMDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 64/128 Kbytes */
# define CONFIG_STM32_HIGHDENSITY 1 /* STM32F100x, STM32F101x, and STM32F103x w/ 256/512 Kbytes */ # define CONFIG_STM32_HIGHDENSITY 1 /* STM32F101x and STM32F103x w/ 256/512 Kbytes */
# undef CONFIG_STM32_VALUELINE /* STM32F100x */ # undef CONFIG_STM32_VALUELINE /* STM32F100x */
# undef CONFIG_STM32_CONNECTIVITYLINE /* STM32F105x and STM32F107x */ # undef CONFIG_STM32_CONNECTIVITYLINE /* STM32F105x and STM32F107x */
# undef CONFIG_STM32_STM32F20XX /* STM32F205x and STM32F207x */ # undef CONFIG_STM32_STM32F20XX /* STM32F205x and STM32F207x */
@ -256,9 +162,9 @@
#elif defined(CONFIG_ARCH_CHIP_STM32F103ZET6) #elif defined(CONFIG_ARCH_CHIP_STM32F103ZET6)
# define CONFIG_STM32_STM32F10XX 1 /* STM32F10xxx family */ # define CONFIG_STM32_STM32F10XX 1 /* STM32F10xxx family */
# undef CONFIG_STM32_LOWDENSITY /* STM32F100x, STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */ # undef CONFIG_STM32_LOWDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */
# undef CONFIG_STM32_MEDIUMDENSITY /* STM32F100x, STM32F101x, STM32F102x and STM32F103x w/ 64/128 Kbytes */ # undef CONFIG_STM32_MEDIUMDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 64/128 Kbytes */
# define CONFIG_STM32_HIGHDENSITY 1 /* STM32F100x, STM32F101x, and STM32F103x w/ 256/512 Kbytes */ # define CONFIG_STM32_HIGHDENSITY 1 /* STM32F101x and STM32F103x w/ 256/512 Kbytes */
# undef CONFIG_STM32_VALUELINE /* STM32F100x */ # undef CONFIG_STM32_VALUELINE /* STM32F100x */
# undef CONFIG_STM32_CONNECTIVITYLINE /* STM32F105x and STM32F107x */ # undef CONFIG_STM32_CONNECTIVITYLINE /* STM32F105x and STM32F107x */
# undef CONFIG_STM32_STM32F20XX /* STM32F205x and STM32F207x */ # undef CONFIG_STM32_STM32F20XX /* STM32F205x and STM32F207x */
@ -286,9 +192,9 @@
/* STM32 F105/F107 Connectivity Line *******************************************************/ /* STM32 F105/F107 Connectivity Line *******************************************************/
#elif defined(CONFIG_ARCH_CHIP_STM32F105VBT7) #elif defined(CONFIG_ARCH_CHIP_STM32F105VBT7)
# define CONFIG_STM32_STM32F10XX 1 /* STM32F10xxx family */ # define CONFIG_STM32_STM32F10XX 1 /* STM32F10xxx family */
# undef CONFIG_STM32_LOWDENSITY /* STM32F100x, STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */ # undef CONFIG_STM32_LOWDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */
# undef CONFIG_STM32_MEDIUMDENSITY /* STM32F100x, STM32F101x, STM32F102x and STM32F103x w/ 64/128 Kbytes */ # undef CONFIG_STM32_MEDIUMDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 64/128 Kbytes */
# undef CONFIG_STM32_HIGHDENSITY /* STM32F100x, STM32F101x, and STM32F103x w/ 256/512 Kbytes */ # undef CONFIG_STM32_HIGHDENSITY /* STM32F101x and STM32F103x w/ 256/512 Kbytes */
# undef CONFIG_STM32_VALUELINE /* STM32F100x */ # undef CONFIG_STM32_VALUELINE /* STM32F100x */
# define CONFIG_STM32_CONNECTIVITYLINE 1 /* STM32F105x and STM32F107x */ # define CONFIG_STM32_CONNECTIVITYLINE 1 /* STM32F105x and STM32F107x */
# undef CONFIG_STM32_STM32F20XX /* STM32F205x and STM32F207x */ # undef CONFIG_STM32_STM32F20XX /* STM32F205x and STM32F207x */
@ -315,9 +221,9 @@
#elif defined(CONFIG_ARCH_CHIP_STM32F107VC) #elif defined(CONFIG_ARCH_CHIP_STM32F107VC)
# define CONFIG_STM32_STM32F10XX 1 /* STM32F10xxx family */ # define CONFIG_STM32_STM32F10XX 1 /* STM32F10xxx family */
# undef CONFIG_STM32_LOWDENSITY /* STM32F100x, STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */ # undef CONFIG_STM32_LOWDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */
# undef CONFIG_STM32_MEDIUMDENSITY /* STM32F100x, STM32F101x, STM32F102x and STM32F103x w/ 64/128 Kbytes */ # undef CONFIG_STM32_MEDIUMDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 64/128 Kbytes */
# undef CONFIG_STM32_HIGHDENSITY /* STM32F100x, STM32F101x, and STM32F103x w/ 256/512 Kbytes */ # undef CONFIG_STM32_HIGHDENSITY /* STM32F101x and STM32F103x w/ 256/512 Kbytes */
# undef CONFIG_STM32_VALUELINE /* STM32F100x */ # undef CONFIG_STM32_VALUELINE /* STM32F100x */
# define CONFIG_STM32_CONNECTIVITYLINE 1 /* STM32F105x and STM32F107x */ # define CONFIG_STM32_CONNECTIVITYLINE 1 /* STM32F105x and STM32F107x */
# undef CONFIG_STM32_STM32F20XX /* STM32F205x and STM32F207x */ # undef CONFIG_STM32_STM32F20XX /* STM32F205x and STM32F207x */
@ -345,9 +251,9 @@
/* STM32 F2 Family ******************************************************************/ /* STM32 F2 Family ******************************************************************/
#elif defined(CONFIG_ARCH_CHIP_STM32F207IG) /* UFBGA-176 1024Kb FLASH 128Kb SRAM */ #elif defined(CONFIG_ARCH_CHIP_STM32F207IG) /* UFBGA-176 1024Kb FLASH 128Kb SRAM */
# undef CONFIG_STM32_STM32F10XX /* STM32F10xxx family */ # undef CONFIG_STM32_STM32F10XX /* STM32F10xxx family */
# undef CONFIG_STM32_LOWDENSITY /* STM32F100x, STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */ # undef CONFIG_STM32_LOWDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */
# undef CONFIG_STM32_MEDIUMDENSITY /* STM32F100x, STM32F101x, STM32F102x and STM32F103x w/ 64/128 Kbytes */ # undef CONFIG_STM32_MEDIUMDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 64/128 Kbytes */
# undef CONFIG_STM32_HIGHDENSITY /* STM32F100x, STM32F101x, and STM32F103x w/ 256/512 Kbytes */ # undef CONFIG_STM32_HIGHDENSITY /* STM32F101x and STM32F103x w/ 256/512 Kbytes */
# undef CONFIG_STM32_VALUELINE /* STM32F100x */ # undef CONFIG_STM32_VALUELINE /* STM32F100x */
# undef CONFIG_STM32_CONNECTIVITYLINE /* STM32F105x and STM32F107x */ # undef CONFIG_STM32_CONNECTIVITYLINE /* STM32F105x and STM32F107x */
# define CONFIG_STM32_STM32F20XX 1 /* STM32F205x and STM32F207x */ # define CONFIG_STM32_STM32F20XX 1 /* STM32F205x and STM32F207x */
@ -377,9 +283,9 @@
/* STM23 F4 Family ******************************************************************/ /* STM23 F4 Family ******************************************************************/
#elif defined(CONFIG_ARCH_CHIP_STM32F405RG) /* LQFP 64 10x10x1.4 1024Kb FLASH 192Kb SRAM */ #elif defined(CONFIG_ARCH_CHIP_STM32F405RG) /* LQFP 64 10x10x1.4 1024Kb FLASH 192Kb SRAM */
# undef CONFIG_STM32_STM32F10XX /* STM32F10xxx family */ # undef CONFIG_STM32_STM32F10XX /* STM32F10xxx family */
# undef CONFIG_STM32_LOWDENSITY /* STM32F100x, STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */ # undef CONFIG_STM32_LOWDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */
# undef CONFIG_STM32_MEDIUMDENSITY /* STM32F100x, STM32F101x, STM32F102x and STM32F103x w/ 64/128 Kbytes */ # undef CONFIG_STM32_MEDIUMDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 64/128 Kbytes */
# undef CONFIG_STM32_HIGHDENSITY /* STM32F100x, STM32F101x, and STM32F103x w/ 256/512 Kbytes */ # undef CONFIG_STM32_HIGHDENSITY /* STM32F101x and STM32F103x w/ 256/512 Kbytes */
# undef CONFIG_STM32_VALUELINE /* STM32F100x */ # undef CONFIG_STM32_VALUELINE /* STM32F100x */
# undef CONFIG_STM32_CONNECTIVITYLINE /* STM32F105x and STM32F107x */ # undef CONFIG_STM32_CONNECTIVITYLINE /* STM32F105x and STM32F107x */
# undef CONFIG_STM32_STM32F20XX /* STM32F205x and STM32F207x */ # undef CONFIG_STM32_STM32F20XX /* STM32F205x and STM32F207x */
@ -408,9 +314,9 @@
#elif defined(CONFIG_ARCH_CHIP_STM32F405VG) /* LQFP 100 14x14x1.4 1024Kb FLASH 192Kb SRAM */ #elif defined(CONFIG_ARCH_CHIP_STM32F405VG) /* LQFP 100 14x14x1.4 1024Kb FLASH 192Kb SRAM */
# undef CONFIG_STM32_STM32F10XX /* STM32F10xxx family */ # undef CONFIG_STM32_STM32F10XX /* STM32F10xxx family */
# undef CONFIG_STM32_LOWDENSITY /* STM32F100x, STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */ # undef CONFIG_STM32_LOWDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */
# undef CONFIG_STM32_MEDIUMDENSITY /* STM32F100x, STM32F101x, STM32F102x and STM32F103x w/ 64/128 Kbytes */ # undef CONFIG_STM32_MEDIUMDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 64/128 Kbytes */
# undef CONFIG_STM32_HIGHDENSITY /* STM32F100x, STM32F101x, and STM32F103x w/ 256/512 Kbytes */ # undef CONFIG_STM32_HIGHDENSITY /* STM32F101x and STM32F103x w/ 256/512 Kbytes */
# undef CONFIG_STM32_VALUELINE /* STM32F100x */ # undef CONFIG_STM32_VALUELINE /* STM32F100x */
# undef CONFIG_STM32_CONNECTIVITYLINE /* STM32F105x and STM32F107x */ # undef CONFIG_STM32_CONNECTIVITYLINE /* STM32F105x and STM32F107x */
# undef CONFIG_STM32_STM32F20XX /* STM32F205x and STM32F207x */ # undef CONFIG_STM32_STM32F20XX /* STM32F205x and STM32F207x */
@ -439,9 +345,9 @@
#elif defined(CONFIG_ARCH_CHIP_STM32F405ZG) /* LQFP 144 20x20x1.4 1024Kb FLASH 192Kb SRAM */ #elif defined(CONFIG_ARCH_CHIP_STM32F405ZG) /* LQFP 144 20x20x1.4 1024Kb FLASH 192Kb SRAM */
# undef CONFIG_STM32_STM32F10XX /* STM32F10xxx family */ # undef CONFIG_STM32_STM32F10XX /* STM32F10xxx family */
# undef CONFIG_STM32_LOWDENSITY /* STM32F100x, STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */ # undef CONFIG_STM32_LOWDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */
# undef CONFIG_STM32_MEDIUMDENSITY /* STM32F100x, STM32F101x, STM32F102x and STM32F103x w/ 64/128 Kbytes */ # undef CONFIG_STM32_MEDIUMDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 64/128 Kbytes */
# undef CONFIG_STM32_HIGHDENSITY /* STM32F100x, STM32F101x, and STM32F103x w/ 256/512 Kbytes */ # undef CONFIG_STM32_HIGHDENSITY /* STM32F101x and STM32F103x w/ 256/512 Kbytes */
# undef CONFIG_STM32_VALUELINE /* STM32F100x */ # undef CONFIG_STM32_VALUELINE /* STM32F100x */
# undef CONFIG_STM32_CONNECTIVITYLINE /* STM32F105x and STM32F107x */ # undef CONFIG_STM32_CONNECTIVITYLINE /* STM32F105x and STM32F107x */
# undef CONFIG_STM32_STM32F20XX /* STM32F205x and STM32F207x */ # undef CONFIG_STM32_STM32F20XX /* STM32F205x and STM32F207x */
@ -470,9 +376,9 @@
#elif defined(CONFIG_ARCH_CHIP_STM32F407VE) /* LQFP-100 512Kb FLASH 192Kb SRAM */ #elif defined(CONFIG_ARCH_CHIP_STM32F407VE) /* LQFP-100 512Kb FLASH 192Kb SRAM */
# undef CONFIG_STM32_STM32F10XX /* STM32F10xxx family */ # undef CONFIG_STM32_STM32F10XX /* STM32F10xxx family */
# undef CONFIG_STM32_LOWDENSITY /* STM32F100x, STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */ # undef CONFIG_STM32_LOWDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */
# undef CONFIG_STM32_MEDIUMDENSITY /* STM32F100x, STM32F101x, STM32F102x and STM32F103x w/ 64/128 Kbytes */ # undef CONFIG_STM32_MEDIUMDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 64/128 Kbytes */
# undef CONFIG_STM32_HIGHDENSITY /* STM32F100x, STM32F101x, and STM32F103x w/ 256/512 Kbytes */ # undef CONFIG_STM32_HIGHDENSITY /* STM32F101x and STM32F103x w/ 256/512 Kbytes */
# undef CONFIG_STM32_VALUELINE /* STM32F100x */ # undef CONFIG_STM32_VALUELINE /* STM32F100x */
# undef CONFIG_STM32_CONNECTIVITYLINE /* STM32F105x and STM32F107x */ # undef CONFIG_STM32_CONNECTIVITYLINE /* STM32F105x and STM32F107x */
# undef CONFIG_STM32_STM32F20XX /* STM32F205x and STM32F207x */ # undef CONFIG_STM32_STM32F20XX /* STM32F205x and STM32F207x */
@ -501,9 +407,9 @@
#elif defined(CONFIG_ARCH_CHIP_STM32F407VG) /* LQFP-100 14x14x1.4 1024Kb FLASH 192Kb SRAM */ #elif defined(CONFIG_ARCH_CHIP_STM32F407VG) /* LQFP-100 14x14x1.4 1024Kb FLASH 192Kb SRAM */
# undef CONFIG_STM32_STM32F10XX /* STM32F10xxx family */ # undef CONFIG_STM32_STM32F10XX /* STM32F10xxx family */
# undef CONFIG_STM32_LOWDENSITY /* STM32F100x, STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */ # undef CONFIG_STM32_LOWDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */
# undef CONFIG_STM32_MEDIUMDENSITY /* STM32F100x, STM32F101x, STM32F102x and STM32F103x w/ 64/128 Kbytes */ # undef CONFIG_STM32_MEDIUMDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 64/128 Kbytes */
# undef CONFIG_STM32_HIGHDENSITY /* STM32F100x, STM32F101x, and STM32F103x w/ 256/512 Kbytes */ # undef CONFIG_STM32_HIGHDENSITY /* STM32F101x and STM32F103x w/ 256/512 Kbytes */
# undef CONFIG_STM32_VALUELINE /* STM32F100x */ # undef CONFIG_STM32_VALUELINE /* STM32F100x */
# undef CONFIG_STM32_CONNECTIVITYLINE /* STM32F105x and STM32F107x */ # undef CONFIG_STM32_CONNECTIVITYLINE /* STM32F105x and STM32F107x */
# undef CONFIG_STM32_STM32F20XX /* STM32F205x and STM32F207x */ # undef CONFIG_STM32_STM32F20XX /* STM32F205x and STM32F207x */
@ -532,9 +438,9 @@
#elif defined(CONFIG_ARCH_CHIP_STM32F407ZE) /* LQFP-144 512Kb FLASH 192Kb SRAM */ #elif defined(CONFIG_ARCH_CHIP_STM32F407ZE) /* LQFP-144 512Kb FLASH 192Kb SRAM */
# undef CONFIG_STM32_STM32F10XX /* STM32F10xxx family */ # undef CONFIG_STM32_STM32F10XX /* STM32F10xxx family */
# undef CONFIG_STM32_LOWDENSITY /* STM32F100x, STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */ # undef CONFIG_STM32_LOWDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */
# undef CONFIG_STM32_MEDIUMDENSITY /* STM32F100x, STM32F101x, STM32F102x and STM32F103x w/ 64/128 Kbytes */ # undef CONFIG_STM32_MEDIUMDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 64/128 Kbytes */
# undef CONFIG_STM32_HIGHDENSITY /* STM32F100x, STM32F101x, and STM32F103x w/ 256/512 Kbytes */ # undef CONFIG_STM32_HIGHDENSITY /* STM32F101x and STM32F103x w/ 256/512 Kbytes */
# undef CONFIG_STM32_VALUELINE /* STM32F100x */ # undef CONFIG_STM32_VALUELINE /* STM32F100x */
# undef CONFIG_STM32_CONNECTIVITYLINE /* STM32F105x and STM32F107x */ # undef CONFIG_STM32_CONNECTIVITYLINE /* STM32F105x and STM32F107x */
# undef CONFIG_STM32_STM32F20XX /* STM32F205x and STM32F207x */ # undef CONFIG_STM32_STM32F20XX /* STM32F205x and STM32F207x */
@ -563,9 +469,9 @@
#elif defined(CONFIG_ARCH_CHIP_STM32F407ZG) /* LQFP 144 20x20x1.4 1024Kb FLASH 192Kb SRAM */ #elif defined(CONFIG_ARCH_CHIP_STM32F407ZG) /* LQFP 144 20x20x1.4 1024Kb FLASH 192Kb SRAM */
# undef CONFIG_STM32_STM32F10XX /* STM32F10xxx family */ # undef CONFIG_STM32_STM32F10XX /* STM32F10xxx family */
# undef CONFIG_STM32_LOWDENSITY /* STM32F100x, STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */ # undef CONFIG_STM32_LOWDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */
# undef CONFIG_STM32_MEDIUMDENSITY /* STM32F100x, STM32F101x, STM32F102x and STM32F103x w/ 64/128 Kbytes */ # undef CONFIG_STM32_MEDIUMDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 64/128 Kbytes */
# undef CONFIG_STM32_HIGHDENSITY /* STM32F100x, STM32F101x, and STM32F103x w/ 256/512 Kbytes */ # undef CONFIG_STM32_HIGHDENSITY /* STM32F101x and STM32F103x w/ 256/512 Kbytes */
# undef CONFIG_STM32_VALUELINE /* STM32F100x */ # undef CONFIG_STM32_VALUELINE /* STM32F100x */
# undef CONFIG_STM32_CONNECTIVITYLINE /* STM32F105x and STM32F107x */ # undef CONFIG_STM32_CONNECTIVITYLINE /* STM32F105x and STM32F107x */
# undef CONFIG_STM32_STM32F20XX /* STM32F205x and STM32F207x */ # undef CONFIG_STM32_STM32F20XX /* STM32F205x and STM32F207x */
@ -594,9 +500,9 @@
#elif defined(CONFIG_ARCH_CHIP_STM32F407IE) /* LQFP 176 24x24x1.4 512Kb FLASH 192Kb SRAM */ #elif defined(CONFIG_ARCH_CHIP_STM32F407IE) /* LQFP 176 24x24x1.4 512Kb FLASH 192Kb SRAM */
# undef CONFIG_STM32_STM32F10XX /* STM32F10xxx family */ # undef CONFIG_STM32_STM32F10XX /* STM32F10xxx family */
# undef CONFIG_STM32_LOWDENSITY /* STM32F100x, STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */ # undef CONFIG_STM32_LOWDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */
# undef CONFIG_STM32_MEDIUMDENSITY /* STM32F100x, STM32F101x, STM32F102x and STM32F103x w/ 64/128 Kbytes */ # undef CONFIG_STM32_MEDIUMDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 64/128 Kbytes */
# undef CONFIG_STM32_HIGHDENSITY /* STM32F100x, STM32F101x, and STM32F103x w/ 256/512 Kbytes */ # undef CONFIG_STM32_HIGHDENSITY /* STM32F101x and STM32F103x w/ 256/512 Kbytes */
# undef CONFIG_STM32_VALUELINE /* STM32F100x */ # undef CONFIG_STM32_VALUELINE /* STM32F100x */
# undef CONFIG_STM32_CONNECTIVITYLINE /* STM32F105x and STM32F107x */ # undef CONFIG_STM32_CONNECTIVITYLINE /* STM32F105x and STM32F107x */
# undef CONFIG_STM32_STM32F20XX /* STM32F205x and STM32F207x */ # undef CONFIG_STM32_STM32F20XX /* STM32F205x and STM32F207x */
@ -625,9 +531,9 @@
#elif defined(CONFIG_ARCH_CHIP_STM32F407IG) /* BGA 176; LQFP 176 24x24x1.4 1024Kb FLASH 192Kb SRAM */ #elif defined(CONFIG_ARCH_CHIP_STM32F407IG) /* BGA 176; LQFP 176 24x24x1.4 1024Kb FLASH 192Kb SRAM */
# undef CONFIG_STM32_STM32F10XX /* STM32F10xxx family */ # undef CONFIG_STM32_STM32F10XX /* STM32F10xxx family */
# undef CONFIG_STM32_LOWDENSITY /* STM32F100x, STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */ # undef CONFIG_STM32_LOWDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */
# undef CONFIG_STM32_MEDIUMDENSITY /* STM32F100x, STM32F101x, STM32F102x and STM32F103x w/ 64/128 Kbytes */ # undef CONFIG_STM32_MEDIUMDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 64/128 Kbytes */
# undef CONFIG_STM32_HIGHDENSITY /* STM32F100x, STM32F101x, and STM32F103x w/ 256/512 Kbytes */ # undef CONFIG_STM32_HIGHDENSITY /* STM32F101x and STM32F103x w/ 256/512 Kbytes */
# undef CONFIG_STM32_VALUELINE /* STM32F100x */ # undef CONFIG_STM32_VALUELINE /* STM32F100x */
# undef CONFIG_STM32_CONNECTIVITYLINE /* STM32F105x and STM32F107x */ # undef CONFIG_STM32_CONNECTIVITYLINE /* STM32F105x and STM32F107x */
# undef CONFIG_STM32_STM32F20XX /* STM32F205x and STM32F207x */ # undef CONFIG_STM32_STM32F20XX /* STM32F205x and STM32F207x */

View File

@ -61,13 +61,11 @@
* External interrupts (vectors >= 16) * External interrupts (vectors >= 16)
*/ */
/* Value line devices */ #if defined(CONFIG_STM32_VALUELINE) && defined(CONFIG_STM32_MEDIUMDENSITY)
#if defined(CONFIG_STM32_VALUELINE)
# define STM32_IRQ_WWDG (16) /* 0: Window Watchdog interrupt */ # define STM32_IRQ_WWDG (16) /* 0: Window Watchdog interrupt */
# define STM32_IRQ_PVD (17) /* 1: PVD through EXTI Line detection interrupt */ # define STM32_IRQ_PVD (17) /* 1: PVD through EXTI Line detection interrupt */
# define STM32_IRQ_TAMPER (18) /* 2: Tamper interrupt */ # define STM32_IRQ_TAMPER (18) /* 2: Tamper interrupt */
# define STM32_IRQ_RTC (19) /* 3: RTC Wakeup through EXTI line interrupt */ # define STM32_IRQ_RTC (19) /* 3: RTC global interrupt */
# define STM32_IRQ_FLASH (20) /* 4: Flash global interrupt */ # define STM32_IRQ_FLASH (20) /* 4: Flash global interrupt */
# define STM32_IRQ_RCC (21) /* 5: RCC global interrupt */ # define STM32_IRQ_RCC (21) /* 5: RCC global interrupt */
# define STM32_IRQ_EXTI0 (22) /* 6: EXTI Line 0 interrupt */ # define STM32_IRQ_EXTI0 (22) /* 6: EXTI Line 0 interrupt */
@ -82,18 +80,12 @@
# define STM32_IRQ_DMA1CH5 (31) /* 15: DMA1 Channel 5 global interrupt */ # define STM32_IRQ_DMA1CH5 (31) /* 15: DMA1 Channel 5 global interrupt */
# define STM32_IRQ_DMA1CH6 (32) /* 16: DMA1 Channel 6 global interrupt */ # define STM32_IRQ_DMA1CH6 (32) /* 16: DMA1 Channel 6 global interrupt */
# define STM32_IRQ_DMA1CH7 (33) /* 17: DMA1 Channel 7 global interrupt */ # define STM32_IRQ_DMA1CH7 (33) /* 17: DMA1 Channel 7 global interrupt */
# define STM32_IRQ_ADC1 (34) /* 18: ADC1 global interrupt */ # define STM32_IRQ_ADC12 (34) /* 18: ADC1 and ADC2 global interrupt */
# define STM32_IRQ_RESERVED0 (35) /* 19: Reserved 0 */ /* 19-22: reserved */
# define STM32_IRQ_RESERVED1 (36) /* 20: Reserved 1 */
# define STM32_IRQ_RESERVED2 (37) /* 21: Reserved 2 */
# define STM32_IRQ_RESERVED3 (38) /* 22: Reserved 3 */
# define STM32_IRQ_EXTI95 (39) /* 23: EXTI Line[9:5] interrupts */ # define STM32_IRQ_EXTI95 (39) /* 23: EXTI Line[9:5] interrupts */
# define STM32_IRQ_TIM1BRK (40) /* 24: TIM1 Break interrupt */ # define STM32_IRQ_TIM1BRK (40) /* 24: TIM1 Break interrupt */
# define STM32_IRQ_TIM15 (40) /* TIM15 global interrupt */ # define STM32_IRQ_TIM1UP (41) /* 25: TIM1 Update interrupt (TIM16 global interrupt) */
# define STM32_IRQ_TIM1UP (41) /* 25: TIM1 Update interrupt */ # define STM32_IRQ_TIM1TRGCOM (42) /* 26: TIM1 Trigger and Commutation interrupts (TIM17 global interrupt) */
# define STM32_IRQ_TIM16 (41) /* TIM16 global interrupt */
# define STM32_IRQ_TIM1TRGCOM (42) /* 26: TIM1 Trigger and Commutation interrupts */
# define STM32_IRQ_TIM17 (42) /* TIM17 global interrupt */
# define STM32_IRQ_TIM1CC (43) /* 27: TIM1 Capture Compare interrupt */ # define STM32_IRQ_TIM1CC (43) /* 27: TIM1 Capture Compare interrupt */
# define STM32_IRQ_TIM2 (44) /* 28: TIM2 global interrupt */ # define STM32_IRQ_TIM2 (44) /* 28: TIM2 global interrupt */
# define STM32_IRQ_TIM3 (45) /* 29: TIM3 global interrupt */ # define STM32_IRQ_TIM3 (45) /* 29: TIM3 global interrupt */
@ -108,30 +100,29 @@
# define STM32_IRQ_USART2 (54) /* 38: USART2 global interrupt */ # define STM32_IRQ_USART2 (54) /* 38: USART2 global interrupt */
# define STM32_IRQ_USART3 (55) /* 39: USART3 global interrupt */ # define STM32_IRQ_USART3 (55) /* 39: USART3 global interrupt */
# define STM32_IRQ_EXTI1510 (56) /* 40: EXTI Line[15:10] interrupts */ # define STM32_IRQ_EXTI1510 (56) /* 40: EXTI Line[15:10] interrupts */
# define STM32_IRQ_RTCALR (57) /* 41: RTC alarms (A and B) through EXTI line interrupt */ # define STM32_IRQ_RTCALR (57) /* 41: RTC alarm through EXTI line interrupt */
# define STM32_IRQ_CEC (58) /* 42: CEC global interrupt */ # define STM32_IRQ_CEC (58) /* 42: CEC global interrupt */
# define STM32_IRQ_TIM12 (59) /* 43: TIM12 global interrupt */ # if defined(CONFIG_STM32_HIGHDENSITY)
# define STM32_IRQ_TIM13 (60) /* 44: TIM13 global interrupt */ # define STM32_IRQ_TIM12 (59) /* 43: TIM12 global interrupt */
# define STM32_IRQ_TIM14 (61) /* 45: TIM14 global interrupt */ # define STM32_IRQ_TIM13 (60) /* 44: TIM13 global interrupt */
# define STM32_IRQ_RESERVED4 (62) /* 46: Reserved 4 */ # define STM32_IRQ_TIM14 (61) /* 45: TIM14 global interrupt */
# define STM32_IRQ_RESERVED5 (63) /* 47: Reserved 5 */ /* 46-47: reserved */
# define STM32_IRQ_FSMC (64) /* 48: FSMC global interrupt */ # define STM32_IRQ_FSMC (64) /* 48: FSMC global interrupt */
# define STM32_IRQ_RESERVED6 (65) /* 49: Reserved 6 */ /* 49: reserved */
# define STM32_IRQ_TIM5 (66) /* 50: TIM5 global interrupt */ # define STM32_IRQ_TIM5 (66) /* 50: TIM5 global interrupt */
# define STM32_IRQ_SPI3 (67) /* 51: SPI3 global interrupt */ # define STM32_IRQ_SPI3 (67) /* 51: SPI1 global interrupt */
# define STM32_IRQ_UART4 (68) /* 52: USART2 global interrupt */ # define STM32_IRQ_UART4 (68) /* 52: USART2 global interrupt */
# define STM32_IRQ_UART5 (69) /* 53: USART5 global interrupt */ # define STM32_IRQ_UART5 (69) /* 53: USART3 global interrupt */
# else
/* 43-53: reserved */
# endif
# define STM32_IRQ_TIM6 (70) /* 54: TIM6 global interrupt */ # define STM32_IRQ_TIM6 (70) /* 54: TIM6 global interrupt */
# define STM32_IRQ_TIM7 (71) /* 55: TIM7 global interrupt */ # define STM32_IRQ_TIM7 (71) /* 55: TIM7 global interrupt */
# define STM32_IRQ_DMA2CH1 (72) /* 56: DMA2 Channel 1 global interrupt */ # define STM32_IRQ_DMA2CH1 (72) /* 56: DMA2 Channel 1 global interrupt */
# define STM32_IRQ_DMA2CH2 (73) /* 57: DMA2 Channel 2 global interrupt */ # define STM32_IRQ_DMA2CH2 (73) /* 57: DMA2 Channel 2 global interrupt */
# define STM32_IRQ_DMA2CH3 (74) /* 58: DMA2 Channel 3 global interrupt */ # define STM32_IRQ_DMA2CH3 (74) /* 58: DMA2 Channel 3 global interrupt */
# define STM32_IRQ_DMA2CH45 (75) /* 59: DMA2 Channel 4 and 5 global interrupt */ # define STM32_IRQ_DMA2CH45 (75) /* 59: DMA2 Channel 4 global interrupt */
# define STM32_IRQ_DMA2CH5 (76) /* 60: DMA2 Channel 5 global interrupt */ # define NR_IRQS (76)
# define NR_IRQS (77)
/* Connectivity Line Devices */
#elif defined(CONFIG_STM32_CONNECTIVITYLINE) #elif defined(CONFIG_STM32_CONNECTIVITYLINE)
# define STM32_IRQ_WWDG (16) /* 0: Window Watchdog interrupt */ # define STM32_IRQ_WWDG (16) /* 0: Window Watchdog interrupt */
# define STM32_IRQ_PVD (17) /* 1: PVD through EXTI Line detection interrupt */ # define STM32_IRQ_PVD (17) /* 1: PVD through EXTI Line detection interrupt */
@ -202,9 +193,6 @@
# define STM32_IRQ_CAN2SCE (82) /* 66: CAN2 SCE interrupt */ # define STM32_IRQ_CAN2SCE (82) /* 66: CAN2 SCE interrupt */
# define STM32_IRQ_OTGFS (83) /* 67: USB On The Go FS global interrupt */ # define STM32_IRQ_OTGFS (83) /* 67: USB On The Go FS global interrupt */
# define NR_IRQS (84) # define NR_IRQS (84)
/* Medium and High Density Devices */
#else #else
# define STM32_IRQ_WWDG (16) /* 0: Window Watchdog interrupt */ # define STM32_IRQ_WWDG (16) /* 0: Window Watchdog interrupt */
# define STM32_IRQ_PVD (17) /* 1: PVD through EXTI Line detection interrupt */ # define STM32_IRQ_PVD (17) /* 1: PVD through EXTI Line detection interrupt */

View File

@ -36,90 +36,58 @@
-include $(TOPDIR)/Make.defs -include $(TOPDIR)/Make.defs
-include chip/Make.defs -include chip/Make.defs
ARCH_SRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src
ifeq ($(CONFIG_ARCH_CORTEXM3),y) # Cortex-M3 is ARMv7-M ifeq ($(CONFIG_ARCH_CORTEXM3),y) # Cortex-M3 is ARMv7-M
ARCH_SUBDIR = armv7-m ARCH_SUBDIR = armv7-m
else else
ifeq ($(CONFIG_ARCH_CORTEXM4),y) # Cortex-M4 is ARMv7E-M ifeq ($(CONFIG_ARCH_CORTEXM4),y) # Cortex-M4 is ARMv7E-M
ARCH_SUBDIR = armv7-m ARCH_SUBDIR = armv7-m
else else
ARCH_SUBDIR = arm ARCH_SUBDIR = arm
endif endif
endif endif
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
ARCH_SRCDIR = $(TOPDIR)\arch\$(CONFIG_ARCH)\src
NUTTX = "$(TOPDIR)\nuttx$(EXEEXT)"
CFLAGS += -I$(ARCH_SRCDIR)\chip
CFLAGS += -I$(ARCH_SRCDIR)\common
CFLAGS += -I$(ARCH_SRCDIR)\$(ARCH_SUBDIR)
CFLAGS += -I$(TOPDIR)\sched
else
ARCH_SRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src
ifeq ($(WINTOOL),y)
NUTTX = "${shell cygpath -w $(TOPDIR)/nuttx$(EXEEXT)}"
CFLAGS += -I "${shell cygpath -w $(ARCH_SRCDIR)/chip}"
CFLAGS += -I "${shell cygpath -w $(ARCH_SRCDIR)/common}"
CFLAGS += -I "${shell cygpath -w $(ARCH_SRCDIR)/$(ARCH_SUBDIR)}"
CFLAGS += -I "${shell cygpath -w $(TOPDIR)/sched}"
else
NUTTX = "$(TOPDIR)/nuttx$(EXEEXT)"
CFLAGS += -I$(ARCH_SRCDIR)/chip
CFLAGS += -I$(ARCH_SRCDIR)/common
CFLAGS += -I$(ARCH_SRCDIR)/$(ARCH_SUBDIR)
CFLAGS += -I$(TOPDIR)/sched
endif
endif
HEAD_OBJ = $(HEAD_ASRC:.S=$(OBJEXT))
ASRCS = $(CHIP_ASRCS) $(CMN_ASRCS)
AOBJS = $(ASRCS:.S=$(OBJEXT))
CSRCS = $(CHIP_CSRCS) $(CMN_CSRCS)
COBJS = $(CSRCS:.c=$(OBJEXT))
SRCS = $(ASRCS) $(CSRCS)
OBJS = $(AOBJS) $(COBJS)
LDFLAGS += $(ARCHSCRIPT)
EXTRA_LIBS ?=
EXTRA_LIBPATHS ?=
LINKLIBS ?=
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
BOARDMAKE = $(if $(wildcard .\board\Makefile),y,)
LIBPATHS += -L"$(TOPDIR)\lib"
ifeq ($(BOARDMAKE),y)
LIBPATHS += -L"$(TOPDIR)\arch\$(CONFIG_ARCH)\src\board"
endif
else
BOARDMAKE = $(if $(wildcard ./board/Makefile),y,)
ifeq ($(WINTOOL),y) ifeq ($(WINTOOL),y)
LIBPATHS += -L"${shell cygpath -w "$(TOPDIR)/lib"}" NUTTX = "${shell cygpath -w $(TOPDIR)/nuttx}"
ifeq ($(BOARDMAKE),y) CFLAGS += -I "${shell cygpath -w $(ARCH_SRCDIR)/chip}" \
LIBPATHS += -L"${shell cygpath -w "$(TOPDIR)/arch/$(CONFIG_ARCH)/src/board"}" -I "${shell cygpath -w $(ARCH_SRCDIR)/common}" \
endif -I "${shell cygpath -w $(ARCH_SRCDIR)/$(ARCH_SUBDIR)}" \
-I "${shell cygpath -w $(TOPDIR)/sched}"
else else
LIBPATHS += -L"$(TOPDIR)/lib" NUTTX = $(TOPDIR)/nuttx
ifeq ($(BOARDMAKE),y) CFLAGS += -I$(ARCH_SRCDIR)/chip -I$(ARCH_SRCDIR)/common \
LIBPATHS += -L"$(TOPDIR)/arch/$(CONFIG_ARCH)/src/board" -I$(ARCH_SRCDIR)/$(ARCH_SUBDIR) -I$(TOPDIR)/sched
endif
endif
endif endif
LDLIBS = $(patsubst %.a,%,$(patsubst lib%,-l%,$(LINKLIBS))) HEAD_OBJ = $(HEAD_ASRC:.S=$(OBJEXT))
ifeq ($(BOARDMAKE),y)
LDLIBS += -lboard ASRCS = $(CHIP_ASRCS) $(CMN_ASRCS)
AOBJS = $(ASRCS:.S=$(OBJEXT))
CSRCS = $(CHIP_CSRCS) $(CMN_CSRCS)
COBJS = $(CSRCS:.c=$(OBJEXT))
SRCS = $(ASRCS) $(CSRCS)
OBJS = $(AOBJS) $(COBJS)
LDFLAGS = $(ARCHSCRIPT)
EXTRA_LIBS ?=
LINKLIBS =
ifeq ($(WINTOOL),y)
LIBPATHS = ${shell for path in $(LINKLIBS); do dir=`dirname $(TOPDIR)/$$path`;echo "-L\"`cygpath -w $$dir`\"";done}
LIBPATHS += -L"${shell cygpath -w $(BOARDDIR)}"
else
LIBPATHS = $(addprefix -L$(TOPDIR)/,$(dir $(LINKLIBS)))
LIBPATHS += -L"$(BOARDDIR)"
endif endif
LDLIBS = $(patsubst lib%,-l%,$(basename $(notdir $(LINKLIBS))))
LIBGCC = "${shell "$(CC)" $(ARCHCPUFLAGS) -print-libgcc-file-name}" BOARDDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src/board
GCC_LIBDIR := ${shell dirname $(LIBGCC)}
VPATH = chip:common:$(ARCH_SUBDIR) LIBGCC = "${shell $(CC) $(ARCHCPUFLAGS) -print-libgcc-file-name}"
VPATH = chip:common:$(ARCH_SUBDIR)
all: $(HEAD_OBJ) libarch$(LIBEXT) all: $(HEAD_OBJ) libarch$(LIBEXT)
@ -132,21 +100,20 @@ $(COBJS): %$(OBJEXT): %.c
$(call COMPILE, $<, $@) $(call COMPILE, $<, $@)
libarch$(LIBEXT): $(OBJS) libarch$(LIBEXT): $(OBJS)
$(call ARCHIVE, $@, $(OBJS)) @( for obj in $(OBJS) ; do \
$(call ARCHIVE, $@, $${obj}); \
done ; )
board/libboard$(LIBEXT): board/libboard$(LIBEXT):
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT) EXTRADEFINES=$(EXTRADEFINES) @$(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT) EXTRADEFINES=$(EXTRADEFINES)
nuttx$(EXEEXT): $(HEAD_OBJ) board/libboard$(LIBEXT) nuttx: $(HEAD_OBJ) board/libboard$(LIBEXT)
$(Q) echo "LD: nuttx" @echo "LD: nuttx"
$(Q) $(LD) --entry=__start $(LDFLAGS) $(LIBPATHS) $(EXTRA_LIBPATHS) \ @$(LD) --entry=__start $(LDFLAGS) $(LIBPATHS) -o $(NUTTX)$(EXEEXT) $(HEAD_OBJ) $(EXTRA_OBJS) \
-o $(NUTTX)$(EXEEXT) $(HEAD_OBJ) $(EXTRA_OBJS) \ --start-group $(LDLIBS) -lboard $(EXTRA_LIBS) $(LIBGCC) --end-group
--start-group $(LDLIBS) $(EXTRA_LIBS) $(LIBGCC) --end-group @$(NM) $(NUTTX)$(EXEEXT) | \
ifneq ($(CONFIG_WINDOWS_NATIVE),y)
$(Q) $(NM) $(NUTTX)$(EXEEXT) | \
grep -v '\(compiled\)\|\(\$(OBJEXT)$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \ grep -v '\(compiled\)\|\(\$(OBJEXT)$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \
sort > $(TOPDIR)/System.map sort > $(TOPDIR)/System.map
endif
# This is part of the top-level export target # This is part of the top-level export target
# Note that there may not be a head object if layout is handled # Note that there may not be a head object if layout is handled
@ -154,38 +121,37 @@ endif
export_head: board/libboard$(LIBEXT) $(HEAD_OBJ) export_head: board/libboard$(LIBEXT) $(HEAD_OBJ)
ifneq ($(HEAD_OBJ),) ifneq ($(HEAD_OBJ),)
$(Q) if [ -d "$(EXPORT_DIR)/startup" ]; then \ @if [ -d "$(EXPORT_DIR)/startup" ]; then \
cp -f $(HEAD_OBJ) "$(EXPORT_DIR)/startup"; \ cp -f $(HEAD_OBJ) "$(EXPORT_DIR)/startup"; \
else \ else \
echo "$(EXPORT_DIR)/startup does not exist"; \ echo "$(EXPORT_DIR)/startup does not exist"; \
exit 1; \ exit 1; \
fi fi
endif endif
# Dependencies # Dependencies
.depend: Makefile chip/Make.defs $(SRCS) .depend: Makefile chip/Make.defs $(SRCS)
ifeq ($(BOARDMAKE),y) @if [ -e board/Makefile ]; then \
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" depend $(MAKE) -C board TOPDIR="$(TOPDIR)" depend ; \
endif fi
$(Q) $(MKDEP) --dep-path chip --dep-path common --dep-path $(ARCH_SUBDIR) \ @$(MKDEP) --dep-path chip --dep-path common --dep-path $(ARCH_SUBDIR) \
"$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
$(Q) touch $@ @touch $@
depend: .depend depend: .depend
clean: clean:
ifeq ($(BOARDMAKE),y) @if [ -e board/Makefile ]; then \
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" clean $(MAKE) -C board TOPDIR="$(TOPDIR)" clean ; \
endif fi
$(call DELFILE, libarch$(LIBEXT)) @rm -f libarch$(LIBEXT) *~ .*.swp
$(call CLEAN) $(call CLEAN)
distclean: clean distclean: clean
ifeq ($(BOARDMAKE),y) @if [ -e board/Makefile ]; then \
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" distclean $(MAKE) -C board TOPDIR="$(TOPDIR)" distclean ; \
endif fi
$(call DELFILE, Make.dep) @rm -f Make.dep .depend
$(call DELFILE, .depend)
-include Make.dep -include Make.dep

0
nuttx/arch/arm/src/armv7-m/up_fullcontextrestore.S Normal file → Executable file
View File

View File

@ -57,7 +57,9 @@
/* Debug output from this file may interfere with context switching! */ /* Debug output from this file may interfere with context switching! */
#ifdef CONFIG_DEBUG_HARDFAULT #undef DEBUG_HARDFAULTS /* Define to debug hard faults */
#ifdef DEBUG_HARDFAULTS
# define hfdbg(format, arg...) lldbg(format, ##arg) # define hfdbg(format, arg...) lldbg(format, ##arg)
#else #else
# define hfdbg(x...) # define hfdbg(x...)

0
nuttx/arch/arm/src/armv7-m/up_saveusercontext.S Normal file → Executable file
View File

0
nuttx/arch/arm/src/armv7-m/up_switchcontext.S Normal file → Executable file
View File

File diff suppressed because it is too large Load Diff

View File

@ -41,31 +41,23 @@ endif
CMN_ASRCS = up_saveusercontext.S up_fullcontextrestore.S up_switchcontext.S CMN_ASRCS = up_saveusercontext.S up_fullcontextrestore.S up_switchcontext.S
CMN_CSRCS = up_assert.c up_blocktask.c up_copystate.c \ CMN_CSRCS = up_assert.c up_blocktask.c up_copystate.c \
up_createstack.c up_mdelay.c up_udelay.c up_exit.c \ up_createstack.c up_mdelay.c up_udelay.c up_exit.c \
up_initialize.c up_initialstate.c up_interruptcontext.c \ up_initialize.c up_initialstate.c up_interruptcontext.c \
up_memfault.c up_modifyreg8.c up_modifyreg16.c up_modifyreg32.c \ up_memfault.c up_modifyreg8.c up_modifyreg16.c up_modifyreg32.c \
up_releasepending.c up_releasestack.c up_reprioritizertr.c \ up_releasepending.c up_releasestack.c up_reprioritizertr.c \
up_schedulesigaction.c up_sigdeliver.c up_systemreset.c \ up_schedulesigaction.c up_sigdeliver.c up_systemreset.c \
up_unblocktask.c up_usestack.c up_doirq.c up_hardfault.c up_svcall.c \ up_unblocktask.c up_usestack.c up_doirq.c up_hardfault.c up_svcall.c \
up_stackcheck.c up_stackcheck.c
ifeq ($(CONFIG_ARMV7M_CMNVECTOR),y) ifeq ($(CONFIG_ARMV7M_CMNVECTOR),y)
CMN_ASRCS += up_exception.S CMN_ASRCS += up_exception.S
CMN_CSRCS += up_vectors.c CMN_CSRCS += up_vectors.c
endif endif
ifeq ($(CONFIG_ARCH_MEMCPY),y)
CMN_ASRCS += up_memcpy.S
endif
ifeq ($(CONFIG_DEBUG_STACK),y) ifeq ($(CONFIG_DEBUG_STACK),y)
CMN_CSRCS += up_checkstack.c CMN_CSRCS += up_checkstack.c
endif endif
ifeq ($(CONFIG_ELF),y)
CMN_CSRCS += up_elf.c
endif
ifeq ($(CONFIG_ARCH_FPU),y) ifeq ($(CONFIG_ARCH_FPU),y)
CMN_ASRCS += up_fpu.S CMN_ASRCS += up_fpu.S
endif endif
@ -76,9 +68,9 @@ endif
CHIP_ASRCS = CHIP_ASRCS =
CHIP_CSRCS = stm32_allocateheap.c stm32_start.c stm32_rcc.c stm32_lse.c \ CHIP_CSRCS = stm32_allocateheap.c stm32_start.c stm32_rcc.c stm32_lse.c \
stm32_lsi.c stm32_gpio.c stm32_exti_gpio.c stm32_flash.c stm32_irq.c \ stm32_lsi.c stm32_gpio.c stm32_exti_gpio.c stm32_flash.c stm32_irq.c \
stm32_timerisr.c stm32_dma.c stm32_lowputc.c stm32_serial.c \ stm32_timerisr.c stm32_dma.c stm32_lowputc.c stm32_serial.c \
stm32_spi.c stm32_sdio.c stm32_tim.c stm32_i2c.c stm32_waste.c stm32_spi.c stm32_sdio.c stm32_tim.c stm32_i2c.c stm32_waste.c
ifeq ($(CONFIG_USBDEV),y) ifeq ($(CONFIG_USBDEV),y)
ifeq ($(CONFIG_STM32_USB),y) ifeq ($(CONFIG_STM32_USB),y)

View File

@ -835,6 +835,14 @@ struct eth_rxdesc_s
* Public Functions * Public Functions
****************************************************************************************************/ ****************************************************************************************************/
#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C" {
#else
#define EXTERN extern
#endif
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#endif /* STM32_NETHERNET > 0 */ #endif /* STM32_NETHERNET > 0 */
#endif /* __ARCH_ARM_SRC_STM32_CHIP_STM32_ETH_H */ #endif /* __ARCH_ARM_SRC_STM32_CHIP_STM32_ETH_H */

View File

@ -6,8 +6,6 @@
* Copyright (C) 2012 Michael Smith. All Rights reserved. * Copyright (C) 2012 Michael Smith. All Rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
* Uros Platise <uros.platise@isotel.eu> * Uros Platise <uros.platise@isotel.eu>
* Michael Smith
* Freddie Chopin <freddie_chopin@op.pl>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
@ -51,87 +49,6 @@
* Pre-processor Definitions * Pre-processor Definitions
************************************************************************************/ ************************************************************************************/
/* Alternate Pin Functions: */
/* ADC */
#define GPIO_ADC1_IN0 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN0)
#define GPIO_ADC1_IN1 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN1)
#define GPIO_ADC1_IN2 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN2)
#define GPIO_ADC1_IN3 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN3)
#define GPIO_ADC1_IN4 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN4)
#define GPIO_ADC1_IN5 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN5)
#define GPIO_ADC1_IN6 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN6)
#define GPIO_ADC1_IN7 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN7)
#define GPIO_ADC1_IN8 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN0)
#define GPIO_ADC1_IN9 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN1)
#define GPIO_ADC1_IN10 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN0)
#define GPIO_ADC1_IN11 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN1)
#define GPIO_ADC1_IN12 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN2)
#define GPIO_ADC1_IN13 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN3)
#define GPIO_ADC1_IN14 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN4)
#define GPIO_ADC1_IN15 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN5)
/* CEC */
#if defined(CONFIG_STM32_CEC_REMAP)
# define GPIO_CEC (GPIO_ALT|GPIO_CNF_AFOD|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN10)
#else
# define GPIO_CEC (GPIO_ALT|GPIO_CNF_AFOD|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN8)
#endif
/* DAC
* Note from RM0041, 11.2: "Once the DAC channelx is enabled, the corresponding
* GPIO pin (PA4 or PA5) is automatically connected to the analog converter
* output (DAC_OUTx). In order to avoid parasitic consumption, the PA4 or PA5
* pin should first be configured to analog (AIN)."
*/
#define GPIO_DAC_OUT1 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN4)
#define GPIO_DAC_OUT2 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN5)
/* FSMC */
/* TODO - VL devices in 100- and 144-pin packages have FSMC */
/* I2C */
#if defined(CONFIG_STM32_I2C1_REMAP)
# define GPIO_I2C1_SCL (GPIO_ALT|GPIO_CNF_AFOD|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN8)
# define GPIO_I2C1_SDA (GPIO_ALT|GPIO_CNF_AFOD|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN9)
#else
# define GPIO_I2C1_SCL (GPIO_ALT|GPIO_CNF_AFOD|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN6)
# define GPIO_I2C1_SDA (GPIO_ALT|GPIO_CNF_AFOD|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN7)
#endif
#define GPIO_I2C1_SMBA (GPIO_ALT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN5)
#define GPIO_I2C2_SCL (GPIO_ALT|GPIO_CNF_AFOD|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN10)
#define GPIO_I2C2_SDA (GPIO_ALT|GPIO_CNF_AFOD|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN11)
#define GPIO_I2C2_SMBA (GPIO_ALT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN12)
/* SPI */
#if defined(CONFIG_STM32_SPI1_REMAP)
# define GPIO_SPI1_NSS (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN15)
# define GPIO_SPI1_SCK (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN3)
# define GPIO_SPI1_MISO (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN4)
# define GPIO_SPI1_MOSI (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN5)
#else
# define GPIO_SPI1_NSS (GPIO_INPUT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN4)
# define GPIO_SPI1_SCK (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN5)
# define GPIO_SPI1_MISO (GPIO_INPUT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN6)
# define GPIO_SPI1_MOSI (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN7)
#endif
#define GPIO_SPI2_NSS (GPIO_INPUT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN12)
#define GPIO_SPI2_SCK (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN13)
#define GPIO_SPI2_MISO (GPIO_INPUT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN14)
#define GPIO_SPI2_MOSI (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN15)
#define GPIO_SPI3_NSS (GPIO_INPUT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN15)
#define GPIO_SPI3_SCK (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN3)
#define GPIO_SPI3_MISO (GPIO_INPUT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN4)
#define GPIO_SPI3_MOSI (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN5)
/* TIMERS */ /* TIMERS */
#if defined(CONFIG_STM32_TIM1_FULL_REMAP) #if defined(CONFIG_STM32_TIM1_FULL_REMAP)
@ -269,77 +186,6 @@
# define GPIO_TIM4_CH4OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN9) # define GPIO_TIM4_CH4OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN9)
#endif #endif
#define GPIO_TIM5_CH1IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN0)
#define GPIO_TIM5_CH1OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN0)
#define GPIO_TIM5_CH2IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN1)
#define GPIO_TIM5_CH2OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN1)
#define GPIO_TIM5_CH3IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN2)
#define GPIO_TIM5_CH3OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN2)
#define GPIO_TIM5_CH4IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN3)
#define GPIO_TIM5_CH4OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN3)
#if defined(CONFIG_STM32_TIM12_REMAP)
# define GPIO_TIM12_CH1IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN12)
# define GPIO_TIM12_CH1OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN12)
# define GPIO_TIM12_CH2IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN13)
# define GPIO_TIM12_CH2OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN13)
#else
# define GPIO_TIM12_CH1IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN4)
# define GPIO_TIM12_CH1OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTC|GPIO_PIN4)
# define GPIO_TIM12_CH2IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN5)
# define GPIO_TIM12_CH2OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTC|GPIO_PIN5)
#endif
#if defined(CONFIG_STM32_TIM13_REMAP)
# define GPIO_TIM13_CH1IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN0)
# define GPIO_TIM13_CH1OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN0)
#else
# define GPIO_TIM13_CH1IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN8)
# define GPIO_TIM13_CH1OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTC|GPIO_PIN8)
#endif
#if defined(CONFIG_STM32_TIM14_REMAP)
# define GPIO_TIM14_CH1IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN1)
# define GPIO_TIM14_CH1OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN1)
#else
# define GPIO_TIM14_CH1IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN9)
# define GPIO_TIM14_CH1OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTC|GPIO_PIN9)
#endif
#if defined(CONFIG_STM32_TIM15_REMAP)
# define GPIO_TIM15_CH1IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN14)
# define GPIO_TIM15_CH1OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN14)
# define GPIO_TIM15_CH2IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN15)
# define GPIO_TIM15_CH2OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN15)
#else
# define GPIO_TIM15_CH1IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN2)
# define GPIO_TIM15_CH1OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN2)
# define GPIO_TIM15_CH2IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN3)
# define GPIO_TIM15_CH2OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN3)
#endif
#define GPIO_TIM15_BKIN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN9)
#define GPIO_TIM15_CH1N (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN15)
#if defined(CONFIG_STM32_TIM16_REMAP)
# define GPIO_TIM16_CH1IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN6)
# define GPIO_TIM16_CH1OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN6)
#else
# define GPIO_TIM16_CH1IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN8)
# define GPIO_TIM16_CH1OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN8)
#endif
#define GPIO_TIM16_BKIN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN5)
#define GPIO_TIM16_CH1N (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN6)
#if defined(CONFIG_STM32_TIM17_REMAP)
# define GPIO_TIM17_CH1IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN7)
# define GPIO_TIM17_CH1OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN7)
#else
# define GPIO_TIM17_CH1IN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN9)
# define GPIO_TIM17_CH1OUT (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN9)
#endif
#define GPIO_TIM17_BKIN (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN10)
#define GPIO_TIM17_CH1N (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN7)
/* USART */ /* USART */
#if defined(CONFIG_STM32_USART1_REMAP) #if defined(CONFIG_STM32_USART1_REMAP)
@ -384,10 +230,38 @@
# define GPIO_USART3_RTS (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN14) # define GPIO_USART3_RTS (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN14)
#endif #endif
#define GPIO_UART4_TX (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTC|GPIO_PIN10) /* SPI */
#define GPIO_UART4_RX (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN11)
#define GPIO_UART5_TX (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTC|GPIO_PIN12) #if defined(CONFIG_STM32_SPI1_REMAP)
#define GPIO_UART5_RX (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTD|GPIO_PIN2) # define GPIO_SPI1_NSS (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN15)
# define GPIO_SPI1_SCK (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN3)
# define GPIO_SPI1_MISO (GPIO_INPUT|GPIO_CNF_INFLOAT|GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN4)
# define GPIO_SPI1_MOSI (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN5)
#else
# define GPIO_SPI1_NSS (GPIO_INPUT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN4)
# define GPIO_SPI1_SCK (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN5)
# define GPIO_SPI1_MISO (GPIO_INPUT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN6)
# define GPIO_SPI1_MOSI (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTA|GPIO_PIN7)
#endif
#define GPIO_SPI2_NSS (GPIO_INPUT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN12)
#define GPIO_SPI2_SCK (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN13)
#define GPIO_SPI2_MISO (GPIO_INPUT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN14)
#define GPIO_SPI2_MOSI (GPIO_ALT|GPIO_CNF_AFPP|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN15)
/* I2C */
#if defined(CONFIG_STM32_I2C1_REMAP)
# define GPIO_I2C1_SCL (GPIO_ALT|GPIO_CNF_AFOD|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN8)
# define GPIO_I2C1_SDA (GPIO_ALT|GPIO_CNF_AFOD|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN9)
#else
# define GPIO_I2C1_SCL (GPIO_ALT|GPIO_CNF_AFOD|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN6)
# define GPIO_I2C1_SDA (GPIO_ALT|GPIO_CNF_AFOD|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN7)
#endif
#define GPIO_I2C1_SMBA (GPIO_ALT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN5)
#define GPIO_I2C2_SCL (GPIO_ALT|GPIO_CNF_AFOD|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN10)
#define GPIO_I2C2_SDA (GPIO_ALT|GPIO_CNF_AFOD|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN11)
#define GPIO_I2C2_SMBA (GPIO_ALT|GPIO_CNF_INFLOAT|GPIO_MODE_50MHz|GPIO_PORTB|GPIO_PIN12)
#endif /* __ARCH_ARM_SRC_STM32_CHIP_STM32F100_PINMAP_H */ #endif /* __ARCH_ARM_SRC_STM32_CHIP_STM32F100_PINMAP_H */

View File

@ -129,7 +129,7 @@
#if 0 /* Needs further investigation */ #if 0 /* Needs further investigation */
#define GPIO_DAC_OUT1 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN4) #define GPIO_DAC_OUT1 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUTz|GPIO_PORTA|GPIO_PIN4)
#define GPIO_DAC_OUT2 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN5) #define GPIO_DAC_OUT2 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN5)
#endif #endif

View File

@ -50,53 +50,53 @@
/* ADC */ /* ADC */
#define GPIO_ADC1_IN0 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN0) #define GPIO_ADC1_IN0 (GPIO_ALT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN0)
#define GPIO_ADC1_IN1 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN1) #define GPIO_ADC1_IN1 (GPIO_ALT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN1)
#define GPIO_ADC1_IN2 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN2) #define GPIO_ADC1_IN2 (GPIO_ALT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN2)
#define GPIO_ADC1_IN3 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN3) #define GPIO_ADC1_IN3 (GPIO_ALT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN3)
#define GPIO_ADC1_IN4 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN4) #define GPIO_ADC1_IN4 (GPIO_ALT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN4)
#define GPIO_ADC1_IN5 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN5) #define GPIO_ADC1_IN5 (GPIO_ALT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN5)
#define GPIO_ADC1_IN6 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN6) #define GPIO_ADC1_IN6 (GPIO_ALT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN6)
#define GPIO_ADC1_IN7 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN7) #define GPIO_ADC1_IN7 (GPIO_ALT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN7)
#define GPIO_ADC1_IN8 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN0) #define GPIO_ADC1_IN8 (GPIO_ALT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN0)
#define GPIO_ADC1_IN9 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN1) #define GPIO_ADC1_IN9 (GPIO_ALT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN1)
#define GPIO_ADC1_IN10 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN0) #define GPIO_ADC1_IN10 (GPIO_ALT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN0)
#define GPIO_ADC1_IN11 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN1) #define GPIO_ADC1_IN11 (GPIO_ALT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN1)
#define GPIO_ADC1_IN12 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN2) #define GPIO_ADC1_IN12 (GPIO_ALT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN2)
#define GPIO_ADC1_IN13 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN3) #define GPIO_ADC1_IN13 (GPIO_ALT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN3)
#define GPIO_ADC1_IN14 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN4) #define GPIO_ADC1_IN14 (GPIO_ALT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN4)
#define GPIO_ADC1_IN15 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN5) #define GPIO_ADC1_IN15 (GPIO_ALT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN5)
#define GPIO_ADC2_IN0 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN0) #define GPIO_ADC2_IN0 (GPIO_ALT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN0)
#define GPIO_ADC2_IN1 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN1) #define GPIO_ADC2_IN1 (GPIO_ALT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN1)
#define GPIO_ADC2_IN2 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN2) #define GPIO_ADC2_IN2 (GPIO_ALT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN2)
#define GPIO_ADC2_IN3 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN3) #define GPIO_ADC2_IN3 (GPIO_ALT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN3)
#define GPIO_ADC2_IN4 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN4) #define GPIO_ADC2_IN4 (GPIO_ALT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN4)
#define GPIO_ADC2_IN5 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN5) #define GPIO_ADC2_IN5 (GPIO_ALT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN5)
#define GPIO_ADC2_IN6 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN6) #define GPIO_ADC2_IN6 (GPIO_ALT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN6)
#define GPIO_ADC2_IN7 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN7) #define GPIO_ADC2_IN7 (GPIO_ALT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN7)
#define GPIO_ADC2_IN8 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN0) #define GPIO_ADC2_IN8 (GPIO_ALT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN0)
#define GPIO_ADC2_IN9 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN1) #define GPIO_ADC2_IN9 (GPIO_ALT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTB|GPIO_PIN1)
#define GPIO_ADC2_IN10 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN0) #define GPIO_ADC2_IN10 (GPIO_ALT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN0)
#define GPIO_ADC2_IN11 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN1) #define GPIO_ADC2_IN11 (GPIO_ALT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN1)
#define GPIO_ADC2_IN12 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN2) #define GPIO_ADC2_IN12 (GPIO_ALT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN2)
#define GPIO_ADC2_IN13 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN3) #define GPIO_ADC2_IN13 (GPIO_ALT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN3)
#define GPIO_ADC2_IN14 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN4) #define GPIO_ADC2_IN14 (GPIO_ALT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN4)
#define GPIO_ADC2_IN15 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN5) #define GPIO_ADC2_IN15 (GPIO_ALT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN5)
#define GPIO_ADC3_IN0 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN0) #define GPIO_ADC3_IN0 (GPIO_ALT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN0)
#define GPIO_ADC3_IN1 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN1) #define GPIO_ADC3_IN1 (GPIO_ALT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN1)
#define GPIO_ADC3_IN2 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN2) #define GPIO_ADC3_IN2 (GPIO_ALT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN2)
#define GPIO_ADC3_IN3 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN3) #define GPIO_ADC3_IN3 (GPIO_ALT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN3)
#define GPIO_ADC3_IN4 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTF|GPIO_PIN6) #define GPIO_ADC3_IN4 (GPIO_ALT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTF|GPIO_PIN6)
#define GPIO_ADC3_IN5 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTF|GPIO_PIN7) #define GPIO_ADC3_IN5 (GPIO_ALT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTF|GPIO_PIN7)
#define GPIO_ADC3_IN6 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTF|GPIO_PIN8) #define GPIO_ADC3_IN6 (GPIO_ALT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTF|GPIO_PIN8)
#define GPIO_ADC3_IN7 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTF|GPIO_PIN9) #define GPIO_ADC3_IN7 (GPIO_ALT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTF|GPIO_PIN9)
#define GPIO_ADC3_IN8 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTF|GPIO_PIN10) #define GPIO_ADC3_IN8 (GPIO_ALT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTF|GPIO_PIN10)
#define GPIO_ADC3_IN10 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN0) #define GPIO_ADC3_IN10 (GPIO_ALT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN0)
#define GPIO_ADC3_IN11 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN1) #define GPIO_ADC3_IN11 (GPIO_ALT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN1)
#define GPIO_ADC3_IN12 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN2) #define GPIO_ADC3_IN12 (GPIO_ALT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN2)
#define GPIO_ADC3_IN13 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN3) #define GPIO_ADC3_IN13 (GPIO_ALT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTC|GPIO_PIN3)
/* DAC - "Once the DAC channelx is enabled, the corresponding GPIO pin /* DAC - "Once the DAC channelx is enabled, the corresponding GPIO pin
* (PA4 or PA5) is automatically connected to the analog converter output * (PA4 or PA5) is automatically connected to the analog converter output
@ -104,8 +104,8 @@
* should first be configured to analog (AIN)." * should first be configured to analog (AIN)."
*/ */
#define GPIO_DAC_OUT1 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN4) #define GPIO_DAC_OUT1 (GPIO_ALT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTF|GPIO_PIN10)
#define GPIO_DAC_OUT2 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN5) #define GPIO_DAC_OUT2 (GPIO_ALT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PIN10)
/* TIMERS */ /* TIMERS */

View File

@ -85,7 +85,7 @@
#endif #endif
#if 0 /* Needs further investigation */ #if 0 /* Needs further investigation */
#define GPIO_DAC_OUT1 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN4) #define GPIO_DAC_OUT1 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUTz|GPIO_PORTA|GPIO_PIN4)
#define GPIO_DAC_OUT2 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN5) #define GPIO_DAC_OUT2 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN5)
#endif #endif

View File

@ -85,7 +85,7 @@
#endif #endif
#if 0 /* Needs further investigation */ #if 0 /* Needs further investigation */
#define GPIO_DAC_OUT1 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN4) #define GPIO_DAC_OUT1 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUTz|GPIO_PORTA|GPIO_PIN4)
#define GPIO_DAC_OUT2 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN5) #define GPIO_DAC_OUT2 (GPIO_INPUT|GPIO_CNF_ANALOGIN|GPIO_MODE_INPUT|GPIO_PORTA|GPIO_PIN5)
#endif #endif

View File

@ -59,7 +59,6 @@
#define STM32_AFIO_EXTICR2_OFFSET 0x000c /* External interrupt configuration register 2 */ #define STM32_AFIO_EXTICR2_OFFSET 0x000c /* External interrupt configuration register 2 */
#define STM32_AFIO_EXTICR3_OFFSET 0x0010 /* External interrupt configuration register 3 */ #define STM32_AFIO_EXTICR3_OFFSET 0x0010 /* External interrupt configuration register 3 */
#define STM32_AFIO_EXTICR4_OFFSET 0x0014 /* External interrupt configuration register 4 */ #define STM32_AFIO_EXTICR4_OFFSET 0x0014 /* External interrupt configuration register 4 */
#define STM32_AFIO_MAPR2_OFFSET 0x001c /* AF remap and debug I/O configuration register 2 */
/* Register Addresses ***************************************************************/ /* Register Addresses ***************************************************************/
@ -374,27 +373,5 @@
#define AFIO_EXTICR4_EXTI15_SHIFT (12) /* Bits 15-12: EXTI 15 configuration */ #define AFIO_EXTICR4_EXTI15_SHIFT (12) /* Bits 15-12: EXTI 15 configuration */
#define AFIO_EXTICR4_EXTI15_MASK (AFIO_EXTICR_PORT_MASK << AFIO_EXTICR4_EXTI15_SHIFT) #define AFIO_EXTICR4_EXTI15_MASK (AFIO_EXTICR_PORT_MASK << AFIO_EXTICR4_EXTI15_SHIFT)
/* AF remap and debug I/O configuration register 2 */
#ifdef CONFIG_STM32_VALUELINE
# define AFIO_MAPR2_TIM15_REMAP (1 << 0) /* Bit 0: TIM15 remapping */
# define AFIO_MAPR2_TIM16_REMAP (1 << 1) /* Bit 1: TIM16 remapping */
# define AFIO_MAPR2_TIM17_REMAP (1 << 2) /* Bit 2: TIM17 remapping */
# define AFIO_MAPR2_CEC_REMAP (1 << 3) /* Bit 3: CEC remapping */
# define AFIO_MAPR2_TIM1_DMA_REMAP (1 << 4) /* Bit 4: TIM1 DMA remapping */
#else
# define AFIO_MAPR2_TIM9_REMAP (1 << 5) /* Bit 5: TIM9 remapping */
# define AFIO_MAPR2_TIM10_REMAP (1 << 6) /* Bit 6: TIM10 remapping */
# define AFIO_MAPR2_TIM11_REMAP (1 << 7) /* Bit 7: TIM11 remapping */
#endif
#define AFIO_MAPR2_TIM13_REMAP (1 << 8) /* Bit 8: TIM13 remapping */
#define AFIO_MAPR2_TIM14_REMAP (1 << 9) /* Bit 9: TIM14 remapping */
#define AFIO_MAPR2_FSMC_NADV (1 << 10) /* Bit 10: NADV connect/disconnect */
#ifdef CONFIG_STM32_VALUELINE
# define AFIO_MAPR2_TIM67_DAC_DMA_REMAP (1 << 11) /* Bit 11: TIM67_DAC DMA remapping */
# define AFIO_MAPR2_TIM12_REMAP (1 << 12) /* Bit 12: TIM12 remapping */
# define AFIO_MAPR2_MISC_REMAP (1 << 13) /* Bit 13: Miscellaneous features remapping */
#endif
#endif /* __ARCH_ARM_SRC_STM32_CHIP_STM32F10XXX_GPIO_H */ #endif /* __ARCH_ARM_SRC_STM32_CHIP_STM32F10XXX_GPIO_H */

View File

@ -60,9 +60,7 @@
#define STM32_TIM5_BASE 0x40000c00 /* 0x40000c00 - 0x40000fff: TIM5 timer */ #define STM32_TIM5_BASE 0x40000c00 /* 0x40000c00 - 0x40000fff: TIM5 timer */
#define STM32_TIM6_BASE 0x40001000 /* 0x40001000 - 0x400013ff: TIM6 timer */ #define STM32_TIM6_BASE 0x40001000 /* 0x40001000 - 0x400013ff: TIM6 timer */
#define STM32_TIM7_BASE 0x40001400 /* 0x40001400 - 0x400007ff: TIM7 timer */ #define STM32_TIM7_BASE 0x40001400 /* 0x40001400 - 0x400007ff: TIM7 timer */
#define STM32_TIM12_BASE 0x40001800 /* 0x40001800 - 0x40001bff: TIM12 timer */ /* 0x40001800 - 0x40000fff: Reserved */
#define STM32_TIM13_BASE 0x40001c00 /* 0x40001c00 - 0x40001fff: TIM13 timer */
#define STM32_TIM14_BASE 0x40002000 /* 0x40002000 - 0x400023ff: TIM14 timer */
#define STM32_RTC_BASE 0x40002800 /* 0x40002800 - 0x40002bff: RTC */ #define STM32_RTC_BASE 0x40002800 /* 0x40002800 - 0x40002bff: RTC */
#define STM32_WWDG_BASE 0x40002c00 /* 0x40002C00 - 0x40002fff: Window watchdog (WWDG) */ #define STM32_WWDG_BASE 0x40002c00 /* 0x40002C00 - 0x40002fff: Window watchdog (WWDG) */
#define STM32_IWDG_BASE 0x40003000 /* 0x40003000 - 0x400033ff: Independent watchdog (IWDG) */ #define STM32_IWDG_BASE 0x40003000 /* 0x40003000 - 0x400033ff: Independent watchdog (IWDG) */
@ -85,8 +83,8 @@
#define STM32_BKP_BASE 0x40006c00 /* 0x40006c00 - 0x40006fff: Backup registers (BKP) */ #define STM32_BKP_BASE 0x40006c00 /* 0x40006c00 - 0x40006fff: Backup registers (BKP) */
#define STM32_PWR_BASE 0x40007000 /* 0x40007000 - 0x400073ff: Power control PWR */ #define STM32_PWR_BASE 0x40007000 /* 0x40007000 - 0x400073ff: Power control PWR */
#define STM32_DAC_BASE 0x40007400 /* 0x40007400 - 0x400077ff: DAC */ #define STM32_DAC_BASE 0x40007400 /* 0x40007400 - 0x400077ff: DAC */
#define STM32_CEC_BASE 0x40007800 /* 0x40007800 - 0x40007bff: CEC */ /* 0x40007800 - 0x4000ffff: Reserved */
/* 0x40007c00 - 0x4000ffff: Reserved */
/* APB2 bus */ /* APB2 bus */
#define STM32_AFIO_BASE 0x40010000 /* 0x40010000 - 0x400103ff: AFIO */ #define STM32_AFIO_BASE 0x40010000 /* 0x40010000 - 0x400103ff: AFIO */
@ -104,49 +102,44 @@
#define STM32_SPI1_BASE 0x40013000 /* 0x40013000 - 0x400133ff: SPI1 */ #define STM32_SPI1_BASE 0x40013000 /* 0x40013000 - 0x400133ff: SPI1 */
#define STM32_TIM8_BASE 0x40013400 /* 0x40013400 - 0x400137ff: TIM8 timer */ #define STM32_TIM8_BASE 0x40013400 /* 0x40013400 - 0x400137ff: TIM8 timer */
#define STM32_USART1_BASE 0x40013800 /* 0x40013800 - 0x40013bff: USART1 */ #define STM32_USART1_BASE 0x40013800 /* 0x40013800 - 0x40013bff: USART1 */
#define STM32_ADC3_BASE 0x40012800 /* 0x40012800 - 0x40013c00: ADC3 */ #define STM32_ADC3_BASE 0x40012800 /* 0x40012800 - 0x40013fff: ADC3 */
/* 0x40013c00 - 0x40013fff: Reserved */ /* 0x40014000 - 0x40017fff: Reserved */
#define STM32_TIM15_BASE 0x40014400 /* 0x40014400 - 0x400147ff: TIM15 */
#define STM32_TIM16_BASE 0x40014400 /* 0x40014400 - 0x400147ff: TIM16 */
#define STM32_TIM17_BASE 0x40014800 /* 0x40014800 - 0x40014bff: TIM17 */
/* 0x40014c00 - 0x4001ffff: Reserved */
/* AHB bus */ /* AHB bus */
#define STM32_SDIO_BASE 0x40018000 /* 0x40018000 - 0x400183ff: SDIO */ #define STM32_SDIO_BASE 0x40018000 /* 0x40018000 - 0x400183ff: SDIO */
/* 0x40018400 - 0x40017fff: Reserved */ /* 0x40018400 - 0x40017fff: Reserved */
#define STM32_DMA1_BASE 0x40020000 /* 0x40020000 - 0x400203ff: DMA1 */ #define STM32_DMA1_BASE 0x40020000 /* 0x40020000 - 0x400203ff: DMA1 */
#define STM32_DMA2_BASE 0x40020400 /* 0x40020000 - 0x400207ff: DMA2 */ #define STM32_DMA2_BASE 0x40020400 /* 0x40020000 - 0x400207ff: DMA2 */
/* 0x40020800 - 0x40020fff: Reserved */ /* 0x40020800 - 0x40020fff: Reserved */
#define STM32_RCC_BASE 0x40021000 /* 0x40021000 - 0x400213ff: Reset and Clock control RCC */ #define STM32_RCC_BASE 0x40021000 /* 0x40021000 - 0x400213ff: Reset and Clock control RCC */
/* 0x40021400 - 0x40021fff: Reserved */ /* 0x40021400 - 0x40021fff: Reserved */
#define STM32_OTGFS_BASE 0x50000000 /* 0x50000000 - 0x500003ff: USB OTG FS */ #define STM32_OTGFS_BASE 0x50000000 /* 0x50000000 - 0x500003ff: USB OTG FS */
#define STM32_FLASHIF_BASE 0x40022000 /* 0x40022000 - 0x400223ff: Flash memory interface */ #define STM32_FLASHIF_BASE 0x40022000 /* 0x40022000 - 0x400223ff: Flash memory interface */
#define STM32_CRC_BASE 0x40028000 /* 0x40023000 - 0x400233ff: CRC */ #define STM32_CRC_BASE 0x40028000 /* 0x40023000 - 0x400233ff: CRC */
/* 0x40023400 - 0x40027fff: Reserved */ /* 0x40023400 - 0x40027fff: Reserved */
#define STM32_ETHERNET_BASE 0x40028000 /* 0x40028000 - 0x40029fff: Ethernet */ #define STM32_ETHERNET_BASE 0x40028000 /* 0x40028000 - 0x40029fff: Ethernet */
/* 0x40030000 - 0x4fffffff: Reserved */ /* 0x40030000 - 0x4fffffff: Reserved */
/* Peripheral BB base */ /* Peripheral BB base */
#define STM32_PERIPHBB_BASE 0x42000000 #define STM32_PERIPHBB_BASE 0x42000000
/* Flexible SRAM controller (FSMC) */ /* Flexible SRAM controller (FSMC) */
#define STM32_FSMC_BANK1 0x60000000 /* 0x60000000-0x6fffffff: 256Mb NOR/SRAM */ #define STM32_FSMC_BANK1 0x60000000 /* 0x60000000-0x6fffffff: 256Mb NOR/SRAM */
#define STM32_FSMC_BANK2 0x70000000 /* 0x70000000-0x7fffffff: 256Mb NAND FLASH */ #define STM32_FSMC_BANK2 0x70000000 /* 0x70000000-0x7fffffff: 256Mb NAND FLASH */
#define STM32_FSMC_BANK3 0x80000000 /* 0x80000000-0x8fffffff: 256Mb NAND FLASH */ #define STM32_FSMC_BANK3 0x80000000 /* 0x80000000-0x8fffffff: 256Mb NAND FLASH */
#define STM32_FSMC_BANK4 0x90000000 /* 0x90000000-0x9fffffff: 256Mb PC CARD*/ #define STM32_FSMC_BANK4 0x90000000 /* 0x90000000-0x9fffffff: 256Mb PC CARD*/
#define STM32_IS_EXTSRAM(a) ((((uint32_t)(a)) & STM32_REGION_MASK) == STM32_FSMC_BANK1) #define STM32_IS_EXTSRAM(a) ((((uint32_t)(a)) & STM32_REGION_MASK) == STM32_FSMC_BANK1)
#define STM32_FSMC_BASE 0xa0000000 /* 0xa0000000-0xbfffffff: 512Mb FSMC register block */ #define STM32_FSMC_BASE 0xa0000000 /* 0xa0000000-0xbfffffff: 512Mb FSMC register block */
/* Other registers -- see armv7-m/nvic.h for standard Cortex-M3 registers in this /* Other registers -- see armv7-m/nvic.h for standard Cortex-M3 registers in this
* address range * address range
*/ */
#define STM32_SCS_BASE 0xe000e000 #define STM32_SCS_BASE 0xe000e000
#define STM32_DEBUGMCU_BASE 0xe0042000 #define STM32_DEBUGMCU_BASE 0xe0042000
#endif /* __ARCH_ARM_SRC_STM32_CHIP_STM32F10XXX_MEMORYMAP_H */ #endif /* __ARCH_ARM_SRC_STM32_CHIP_STM32F10XXX_MEMORYMAP_H */

View File

@ -163,9 +163,7 @@
# define RCC_CFGR_PLLMUL_CLKx14 (12 << RCC_CFGR_PLLMUL_SHIFT) /* 1100: PLL input clock x 14 */ # define RCC_CFGR_PLLMUL_CLKx14 (12 << RCC_CFGR_PLLMUL_SHIFT) /* 1100: PLL input clock x 14 */
# define RCC_CFGR_PLLMUL_CLKx15 (13 << RCC_CFGR_PLLMUL_SHIFT) /* 1101: PLL input clock x 15 */ # define RCC_CFGR_PLLMUL_CLKx15 (13 << RCC_CFGR_PLLMUL_SHIFT) /* 1101: PLL input clock x 15 */
# define RCC_CFGR_PLLMUL_CLKx16 (14 << RCC_CFGR_PLLMUL_SHIFT) /* 111x: PLL input clock x 16 */ # define RCC_CFGR_PLLMUL_CLKx16 (14 << RCC_CFGR_PLLMUL_SHIFT) /* 111x: PLL input clock x 16 */
#ifndef CONFIG_STM32_VALUELINE #define RCC_CFGR_USBPRE (1 << 22) /* Bit 22: USB prescaler */
# define RCC_CFGR_USBPRE (1 << 22) /* Bit 22: USB prescaler */
#endif
#define RCC_CFGR_MCO_SHIFT (24) /* Bits 26-24: Microcontroller Clock Output */ #define RCC_CFGR_MCO_SHIFT (24) /* Bits 26-24: Microcontroller Clock Output */
#define RCC_CFGR_MCO_MASK (0x0f << RCC_CFGR_MCO_SHIFT) #define RCC_CFGR_MCO_MASK (0x0f << RCC_CFGR_MCO_SHIFT)
# define RCC_CFGR_NOCLK (0 << RCC_CFGR_MCO_SHIFT) /* 0xx: No clock */ # define RCC_CFGR_NOCLK (0 << RCC_CFGR_MCO_SHIFT) /* 0xx: No clock */
@ -209,22 +207,12 @@
#define TCC_APB2RSTR_IOPFRST (1 << 7) /* Bit 7: IO port F reset */ #define TCC_APB2RSTR_IOPFRST (1 << 7) /* Bit 7: IO port F reset */
#define TCC_APB2RSTR_IOPGRST (1 << 8) /* Bit 8: IO port G reset */ #define TCC_APB2RSTR_IOPGRST (1 << 8) /* Bit 8: IO port G reset */
#define RCC_APB2RSTR_ADC1RST (1 << 9) /* Bit 9: ADC 1 interface reset */ #define RCC_APB2RSTR_ADC1RST (1 << 9) /* Bit 9: ADC 1 interface reset */
#ifndef CONFIG_STM32_VALUELINE #define RCC_APB2RSTR_ADC2RST (1 << 10) /* Bit 10: ADC 2 interface reset */
# define RCC_APB2RSTR_ADC2RST (1 << 10) /* Bit 10: ADC 2 interface reset */
#endif
#define RCC_APB2RSTR_TIM1RST (1 << 11) /* Bit 11: TIM1 Timer reset */ #define RCC_APB2RSTR_TIM1RST (1 << 11) /* Bit 11: TIM1 Timer reset */
#define RCC_APB2RSTR_SPI1RST (1 << 12) /* Bit 12: SPI 1 reset */ #define RCC_APB2RSTR_SPI1RST (1 << 12) /* Bit 12: SPI 1 reset */
#ifndef CONFIG_STM32_VALUELINE #define RCC_APB2RSTR_TIM8RST (1 << 13) /* Bit 13: TIM8 Timer reset */
# define RCC_APB2RSTR_TIM8RST (1 << 13) /* Bit 13: TIM8 Timer reset */
#endif
#define RCC_APB2RSTR_USART1RST (1 << 14) /* Bit 14: USART1 reset */ #define RCC_APB2RSTR_USART1RST (1 << 14) /* Bit 14: USART1 reset */
#ifndef CONFIG_STM32_VALUELINE #define RCC_APB2RSTR_ADC3RST (1 << 15) /* Bit 15: ADC3 interface reset */
# define RCC_APB2RSTR_ADC3RST (1 << 15) /* Bit 15: ADC3 interface reset */
#else
# define RCC_APB2RSTR_TIM15RST (1 << 16) /* Bit 16: TIM15 reset */
# define RCC_APB2RSTR_TIM16RST (1 << 17) /* Bit 17: TIM16 reset */
# define RCC_APB2RSTR_TIM17RST (1 << 18) /* Bit 18: TIM17 reset */
#endif
/* APB1 Peripheral reset register */ /* APB1 Peripheral reset register */
@ -234,11 +222,6 @@
#define RCC_APB1RSTR_TIM5RST (1 << 3) /* Bit 3: Timer 5 reset */ #define RCC_APB1RSTR_TIM5RST (1 << 3) /* Bit 3: Timer 5 reset */
#define RCC_APB1RSTR_TIM6RST (1 << 4) /* Bit 4: Timer 6 reset */ #define RCC_APB1RSTR_TIM6RST (1 << 4) /* Bit 4: Timer 6 reset */
#define RCC_APB1RSTR_TIM7RST (1 << 5) /* Bit 5: Timer 7 reset */ #define RCC_APB1RSTR_TIM7RST (1 << 5) /* Bit 5: Timer 7 reset */
#ifdef CONFIG_STM32_VALUELINE
# define RCC_APB1RSTR_TIM12RST (1 << 6) /* Bit 6: TIM12 reset */
# define RCC_APB1RSTR_TIM13RST (1 << 7) /* Bit 7: TIM13 reset */
# define RCC_APB1RSTR_TIM14RST (1 << 8) /* Bit 8: TIM14 reset */
#endif
#define RCC_APB1RSTR_WWDGRST (1 << 11) /* Bit 11: Window Watchdog reset */ #define RCC_APB1RSTR_WWDGRST (1 << 11) /* Bit 11: Window Watchdog reset */
#define RCC_APB1RSTR_SPI2RST (1 << 14) /* Bit 14: SPI 2 reset */ #define RCC_APB1RSTR_SPI2RST (1 << 14) /* Bit 14: SPI 2 reset */
#define RCC_APB1RSTR_SPI3RST (1 << 15) /* Bit 15: SPI 3 reset */ #define RCC_APB1RSTR_SPI3RST (1 << 15) /* Bit 15: SPI 3 reset */
@ -248,17 +231,12 @@
#define RCC_APB1RSTR_UART5RST (1 << 20) /* Bit 18: UART 5 reset */ #define RCC_APB1RSTR_UART5RST (1 << 20) /* Bit 18: UART 5 reset */
#define RCC_APB1RSTR_I2C1RST (1 << 21) /* Bit 21: I2C 1 reset */ #define RCC_APB1RSTR_I2C1RST (1 << 21) /* Bit 21: I2C 1 reset */
#define RCC_APB1RSTR_I2C2RST (1 << 22) /* Bit 22: I2C 2 reset */ #define RCC_APB1RSTR_I2C2RST (1 << 22) /* Bit 22: I2C 2 reset */
#ifndef CONFIG_STM32_VALUELINE #define RCC_APB1RSTR_USBRST (1 << 23) /* Bit 23: USB reset */
# define RCC_APB1RSTR_USBRST (1 << 23) /* Bit 23: USB reset */ #define RCC_APB1RSTR_CAN1RST (1 << 25) /* Bit 25: CAN1 reset */
# define RCC_APB1RSTR_CAN1RST (1 << 25) /* Bit 25: CAN1 reset */ #define RCC_APB1RSTR_CAN2RST (1 << 26) /* Bit 26: CAN2 reset */
# define RCC_APB1RSTR_CAN2RST (1 << 26) /* Bit 26: CAN2 reset */
#endif
#define RCC_APB1RSTR_BKPRST (1 << 27) /* Bit 27: Backup interface reset */ #define RCC_APB1RSTR_BKPRST (1 << 27) /* Bit 27: Backup interface reset */
#define RCC_APB1RSTR_PWRRST (1 << 28) /* Bit 28: Power interface reset */ #define RCC_APB1RSTR_PWRRST (1 << 28) /* Bit 28: Power interface reset */
#define RCC_APB1RSTR_DACRST (1 << 29) /* Bit 29: DAC interface reset */ #define RCC_APB1RSTR_DACRST (1 << 29) /* Bit 29: DAC interface reset */
#ifdef CONFIG_STM32_VALUELINE
# define RCC_APB1RSTR_CECRST (1 << 30) /* Bit 30: CEC reset */
#endif
/* AHB Peripheral Clock enable register */ /* AHB Peripheral Clock enable register */
@ -268,9 +246,7 @@
#define RCC_AHBENR_FLITFEN (1 << 4) /* Bit 4: FLITF clock enable */ #define RCC_AHBENR_FLITFEN (1 << 4) /* Bit 4: FLITF clock enable */
#define RCC_AHBENR_CRCEN (1 << 6) /* Bit 6: CRC clock enable */ #define RCC_AHBENR_CRCEN (1 << 6) /* Bit 6: CRC clock enable */
#define RCC_AHBENR_FSMCEN (1 << 8) /* Bit 8: FSMC clock enable */ #define RCC_AHBENR_FSMCEN (1 << 8) /* Bit 8: FSMC clock enable */
#ifndef CONFIG_STM32_VALUELINE #define RCC_AHBENR_SDIOEN (1 << 10) /* Bit 10: SDIO clock enable */
# define RCC_AHBENR_SDIOEN (1 << 10) /* Bit 10: SDIO clock enable */
#endif
#ifdef CONFIG_STM32_CONNECTIVITYLINE #ifdef CONFIG_STM32_CONNECTIVITYLINE
# define RCC_AHBENR_ETHMACEN (1 << 14) /* Bit 14: Ethernet MAC clock enable */ # define RCC_AHBENR_ETHMACEN (1 << 14) /* Bit 14: Ethernet MAC clock enable */
# define RCC_AHBENR_ETHMACTXEN (1 << 15) /* Bit 15: Ethernet MAC TX clock enable */ # define RCC_AHBENR_ETHMACTXEN (1 << 15) /* Bit 15: Ethernet MAC TX clock enable */
@ -296,22 +272,12 @@
#define RCC_APB2ENR_IOPFEN (1 << 7) /* Bit 7: I/O port F clock enable */ #define RCC_APB2ENR_IOPFEN (1 << 7) /* Bit 7: I/O port F clock enable */
#define RCC_APB2ENR_IOPGEN (1 << 8) /* Bit 8: I/O port G clock enable */ #define RCC_APB2ENR_IOPGEN (1 << 8) /* Bit 8: I/O port G clock enable */
#define RCC_APB2ENR_ADC1EN (1 << 9) /* Bit 9: ADC 1 interface clock enable */ #define RCC_APB2ENR_ADC1EN (1 << 9) /* Bit 9: ADC 1 interface clock enable */
#ifndef CONFIG_STM32_VALUELINE #define RCC_APB2ENR_ADC2EN (1 << 10) /* Bit 10: ADC 2 interface clock enable */
# define RCC_APB2ENR_ADC2EN (1 << 10) /* Bit 10: ADC 2 interface clock enable */
#endif
#define RCC_APB2ENR_TIM1EN (1 << 11) /* Bit 11: TIM1 Timer clock enable */ #define RCC_APB2ENR_TIM1EN (1 << 11) /* Bit 11: TIM1 Timer clock enable */
#define RCC_APB2ENR_SPI1EN (1 << 12) /* Bit 12: SPI 1 clock enable */ #define RCC_APB2ENR_SPI1EN (1 << 12) /* Bit 12: SPI 1 clock enable */
#ifndef CONFIG_STM32_VALUELINE #define RCC_APB2ENR_TIM8EN (1 << 13) /* Bit 13: TIM8 Timer clock enable */
# define RCC_APB2ENR_TIM8EN (1 << 13) /* Bit 13: TIM8 Timer clock enable */
#endif
#define RCC_APB2ENR_USART1EN (1 << 14) /* Bit 14: USART1 clock enable */ #define RCC_APB2ENR_USART1EN (1 << 14) /* Bit 14: USART1 clock enable */
#ifndef CONFIG_STM32_VALUELINE #define RCC_APB2ENR_ADC3EN (1 << 15) /* Bit 14: ADC3 interface clock enable */
# define RCC_APB2ENR_ADC3EN (1 << 15) /* Bit 14: ADC3 interface clock enable */
#else
# define RCC_APB2ENR_TIM15EN (1 << 16) /* Bit 16: TIM15 clock enable */
# define RCC_APB2ENR_TIM16EN (1 << 17) /* Bit 17: TIM16 clock enable */
# define RCC_APB2ENR_TIM17EN (1 << 18) /* Bit 18: TIM17 clock enable */
#endif
/* APB1 Peripheral Clock enable register */ /* APB1 Peripheral Clock enable register */
@ -321,11 +287,6 @@
#define RCC_APB1ENR_TIM5EN (1 << 3) /* Bit 3: Timer 5 clock enable */ #define RCC_APB1ENR_TIM5EN (1 << 3) /* Bit 3: Timer 5 clock enable */
#define RCC_APB1ENR_TIM6EN (1 << 4) /* Bit 4: Timer 6 clock enable */ #define RCC_APB1ENR_TIM6EN (1 << 4) /* Bit 4: Timer 6 clock enable */
#define RCC_APB1ENR_TIM7EN (1 << 5) /* Bit 5: Timer 7 clock enable */ #define RCC_APB1ENR_TIM7EN (1 << 5) /* Bit 5: Timer 7 clock enable */
#ifdef CONFIG_STM32_VALUELINE
# define RCC_APB1ENR_TIM12EN (1 << 6) /* Bit 6: Timer 12 clock enable */
# define RCC_APB1ENR_TIM13EN (1 << 7) /* Bit 7: Timer 13 clock enable */
# define RCC_APB1ENR_TIM14EN (1 << 8) /* Bit 8: Timer 14 clock enable */
#endif
#define RCC_APB1ENR_WWDGEN (1 << 11) /* Bit 11: Window Watchdog clock enable */ #define RCC_APB1ENR_WWDGEN (1 << 11) /* Bit 11: Window Watchdog clock enable */
#define RCC_APB1ENR_SPI2EN (1 << 14) /* Bit 14: SPI 2 clock enable */ #define RCC_APB1ENR_SPI2EN (1 << 14) /* Bit 14: SPI 2 clock enable */
#define RCC_APB1ENR_SPI3EN (1 << 15) /* Bit 15: SPI 3 clock enable */ #define RCC_APB1ENR_SPI3EN (1 << 15) /* Bit 15: SPI 3 clock enable */
@ -335,17 +296,12 @@
#define RCC_APB1ENR_UART5EN (1 << 20) /* Bit 20: UART 5 clock enable */ #define RCC_APB1ENR_UART5EN (1 << 20) /* Bit 20: UART 5 clock enable */
#define RCC_APB1ENR_I2C1EN (1 << 21) /* Bit 21: I2C 1 clock enable */ #define RCC_APB1ENR_I2C1EN (1 << 21) /* Bit 21: I2C 1 clock enable */
#define RCC_APB1ENR_I2C2EN (1 << 22) /* Bit 22: I2C 2 clock enable */ #define RCC_APB1ENR_I2C2EN (1 << 22) /* Bit 22: I2C 2 clock enable */
#ifndef CONFIG_STM32_VALUELINE #define RCC_APB1ENR_USBEN (1 << 23) /* Bit 23: USB clock enable */
# define RCC_APB1ENR_USBEN (1 << 23) /* Bit 23: USB clock enable */ #define RCC_APB1ENR_CAN1EN (1 << 25) /* Bit 25: CAN1 clock enable */
# define RCC_APB1ENR_CAN1EN (1 << 25) /* Bit 25: CAN1 clock enable */ #define RCC_APB1ENR_CAN2EN (1 << 26) /* Bit 25: CAN2 clock enable */
# define RCC_APB1ENR_CAN2EN (1 << 26) /* Bit 25: CAN2 clock enable */
#endif
#define RCC_APB1ENR_BKPEN (1 << 27) /* Bit 27: Backup interface clock enable */ #define RCC_APB1ENR_BKPEN (1 << 27) /* Bit 27: Backup interface clock enable */
#define RCC_APB1ENR_PWREN (1 << 28) /* Bit 28: Power interface clock enable */ #define RCC_APB1ENR_PWREN (1 << 28) /* Bit 28: Power interface clock enable */
#define RCC_APB1ENR_DACEN (1 << 29) /* Bit 29: DAC interface clock enable */ #define RCC_APB1ENR_DACEN (1 << 29) /* Bit 29: DAC interface clock enable */
#ifdef CONFIG_STM32_VALUELINE
# define RCC_APB1ENR_CECEN (1 << 30) /* Bit 30: CEC clock enable */
#endif
/* Backup domain control register */ /* Backup domain control register */
@ -375,7 +331,7 @@
#if defined(CONFIG_STM32_VALUELINE) || defined(CONFIG_STM32_CONNECTIVITYLINE) #if defined(CONFIG_STM32_VALUELINE) || defined(CONFIG_STM32_CONNECTIVITYLINE)
/* Clock configuration register 2 (For value line and connectivity line only) */ /* Clock configuration register 2 (For connectivity line only) */
#define RCC_CFGR2_PREDIV1_SHIFT (0) #define RCC_CFGR2_PREDIV1_SHIFT (0)
#define RCC_CFGR2_PREDIV1_MASK (0x0f << RCC_CFGR2_PREDIV1_SHIFT) #define RCC_CFGR2_PREDIV1_MASK (0x0f << RCC_CFGR2_PREDIV1_SHIFT)
@ -396,10 +352,6 @@
# define RCC_CFGR2_PREDIV1d15 (14 << RCC_CFGR2_PREDIV1_SHIFT) # define RCC_CFGR2_PREDIV1d15 (14 << RCC_CFGR2_PREDIV1_SHIFT)
# define RCC_CFGR2_PREDIV1d16 (15 << RCC_CFGR2_PREDIV1_SHIFT) # define RCC_CFGR2_PREDIV1d16 (15 << RCC_CFGR2_PREDIV1_SHIFT)
#endif
#ifdef CONFIG_STM32_CONNECTIVITYLINE
#define RCC_CFGR2_PREDIV2_SHIFT (4) #define RCC_CFGR2_PREDIV2_SHIFT (4)
#define RCC_CFGR2_PREDIV2_MASK (0x0f << RCC_CFGR2_PREDIV2_SHIFT) #define RCC_CFGR2_PREDIV2_MASK (0x0f << RCC_CFGR2_PREDIV2_SHIFT)
# define RCC_CFGR2_PREDIV2d1 (0 << RCC_CFGR2_PREDIV2_SHIFT) # define RCC_CFGR2_PREDIV2d1 (0 << RCC_CFGR2_PREDIV2_SHIFT)

View File

@ -49,77 +49,15 @@
* definition that provides the number of supported vectors. * definition that provides the number of supported vectors.
*/ */
# ifdef CONFIG_ARMV7M_CMNVECTOR #ifdef CONFIG_ARMV7M_CMNVECTOR
/* Reserve 61 interrupt table entries for I/O interrupts. */ /* Reserve 60 interrupt table entries for I/O interrupts. */
# define ARMV7M_PERIPHERAL_INTERRUPTS 61 # define ARMV7M_PERIPHERAL_INTERRUPTS 60
#else #else
# error This target requires CONFIG_ARMV7M_CMNVECTOR
VECTOR(stm32_wwdg, STM32_IRQ_WWDG) /* Vector 16+0: Window Watchdog interrupt */ #endif /* CONFIG_ARMV7M_CMNVECTOR */
VECTOR(stm32_pvd, STM32_IRQ_PVD) /* Vector 16+1: PVD through EXTI Line detection interrupt */
VECTOR(stm32_tamper, STM32_IRQ_TAMPER) /* Vector 16+2: Tamper interrupt */
VECTOR(stm32_rtc, STM32_IRQ_RTC) /* Vector 16+3: RTC Wakeup through EXTI line interrupt */
VECTOR(stm32_flash, STM32_IRQ_FLASH) /* Vector 16+4: Flash global interrupt */
VECTOR(stm32_rcc, STM32_IRQ_RCC) /* Vector 16+5: RCC global interrupt */
VECTOR(stm32_exti0, STM32_IRQ_EXTI0) /* Vector 16+6: EXTI Line 0 interrupt */
VECTOR(stm32_exti1, STM32_IRQ_EXTI1) /* Vector 16+7: EXTI Line 1 interrupt */
VECTOR(stm32_exti2, STM32_IRQ_EXTI2) /* Vector 16+8: EXTI Line 2 interrupt */
VECTOR(stm32_exti3, STM32_IRQ_EXTI3) /* Vector 16+9: EXTI Line 3 interrupt */
VECTOR(stm32_exti4, STM32_IRQ_EXTI4) /* Vector 16+10: EXTI Line 4 interrupt */
VECTOR(stm32_dma1ch1, STM32_IRQ_DMA1CH1) /* Vector 16+11: DMA1 Channel 1 global interrupt */
VECTOR(stm32_dma1ch2, STM32_IRQ_DMA1CH2) /* Vector 16+12: DMA1 Channel 2 global interrupt */
VECTOR(stm32_dma1ch3, STM32_IRQ_DMA1CH3) /* Vector 16+13: DMA1 Channel 3 global interrupt */
VECTOR(stm32_dma1ch4, STM32_IRQ_DMA1CH4) /* Vector 16+14: DMA1 Channel 4 global interrupt */
VECTOR(stm32_dma1ch5, STM32_IRQ_DMA1CH5) /* Vector 16+15: DMA1 Channel 5 global interrupt */
VECTOR(stm32_dma1ch6, STM32_IRQ_DMA1CH6) /* Vector 16+16: DMA1 Channel 6 global interrupt */
VECTOR(stm32_dma1ch7, STM32_IRQ_DMA1CH7) /* Vector 16+17: DMA1 Channel 7 global interrupt */
VECTOR(stm32_adc1, STM32_IRQ_ADC1) /* Vector 16+18: ADC1 global interrupt */
UNUSED(STM32_IRQ_RESERVED0) /* Vector 16+19: Reserved 0 */
UNUSED(STM32_IRQ_RESERVED1) /* Vector 16+20: Reserved 1 */
UNUSED(STM32_IRQ_RESERVED2) /* Vector 16+21: Reserved 2 */
UNUSED(STM32_IRQ_RESERVED3) /* Vector 16+22: Reserved 3 */
VECTOR(stm32_exti95, STM32_IRQ_EXTI95) /* Vector 16+23: EXTI Line[9:5] interrupts */
VECTOR(stm32_tim1brk, STM32_IRQ_TIM1BRK) /* Vector 16+24: TIM1 Break interrupt; TIM15 global interrupt */
VECTOR(stm32_tim1up, STM32_IRQ_TIM1UP) /* Vector 16+25: TIM1 Update interrupt; TIM16 global interrupt */
VECTOR(stm32_tim1trgcom, STM32_IRQ_TIM1TRGCOM) /* Vector 16+26: TIM1 Trigger and Commutation interrupts; TIM17 global interrupt */
VECTOR(stm32_tim1cc, STM32_IRQ_TIM1CC) /* Vector 16+27: TIM1 Capture Compare interrupt */
VECTOR(stm32_tim2, STM32_IRQ_TIM2) /* Vector 16+28: TIM2 global interrupt */
VECTOR(stm32_tim3, STM32_IRQ_TIM3) /* Vector 16+29: TIM3 global interrupt */
VECTOR(stm32_tim4, STM32_IRQ_TIM4) /* Vector 16+30: TIM4 global interrupt */
VECTOR(stm32_i2c1ev, STM32_IRQ_I2C1EV) /* Vector 16+31: I2C1 event interrupt */
VECTOR(stm32_i2c1er, STM32_IRQ_I2C1ER) /* Vector 16+32: I2C1 error interrupt */
VECTOR(stm32_i2c2ev, STM32_IRQ_I2C2EV) /* Vector 16+33: I2C2 event interrupt */
VECTOR(stm32_i2c2er, STM32_IRQ_I2C2ER) /* Vector 16+34: I2C2 error interrupt */
VECTOR(stm32_spi1, STM32_IRQ_SPI1) /* Vector 16+35: SPI1 global interrupt */
VECTOR(stm32_spi2, STM32_IRQ_SPI2) /* Vector 16+36: SPI2 global interrupt */
VECTOR(stm32_usart1, STM32_IRQ_USART1) /* Vector 16+37: USART1 global interrupt */
VECTOR(stm32_usart2, STM32_IRQ_USART2) /* Vector 16+38: USART2 global interrupt */
VECTOR(stm32_usart3, STM32_IRQ_USART3) /* Vector 16+39: USART3 global interrupt */
VECTOR(stm32_exti1510, STM32_IRQ_EXTI1510) /* Vector 16+40: EXTI Line[15:10] interrupts */
VECTOR(stm32_rtcalr, STM32_IRQ_RTCALR) /* Vector 16+41: RTC alarms (A and B) through EXTI line interrupt */
VECTOR(stm32_cec, STM32_IRQ_CEC) /* Vector 16+42: CEC global interrupt */
VECTOR(stm32_tim12, STM32_IRQ_TIM12) /* Vector 16+43: TIM12 global interrupt */
VECTOR(stm32_tim13, STM32_IRQ_TIM13) /* Vector 16+44: TIM13 global interrupt */
VECTOR(stm32_tim14, STM32_IRQ_TIM14) /* Vector 16+45: TIM14 global interrupt */
UNUSED(STM32_IRQ_RESERVED4) /* Vector 16+46: Reserved 4 */
UNUSED(STM32_IRQ_RESERVED5) /* Vector 16+47: Reserved 5 */
VECTOR(stm32_fsmc, STM32_IRQ_FSMC) /* Vector 16+48: FSMC global interrupt */
UNUSED(STM32_IRQ_RESERVED6) /* Vector 16+49: Reserved 6 */
VECTOR(stm32_tim5, STM32_IRQ_TIM5) /* Vector 16+50: TIM5 global interrupt */
VECTOR(stm32_spi3, STM32_IRQ_SPI3) /* Vector 16+51: SPI3 global interrupt */
VECTOR(stm32_uart4, STM32_IRQ_UART4) /* Vector 16+52: USART2 global interrupt */
VECTOR(stm32_uart5, STM32_IRQ_UART5) /* Vector 16+53: USART5 global interrupt */
VECTOR(stm32_tim6, STM32_IRQ_TIM6) /* Vector 16+54: TIM6 global interrupt */
VECTOR(stm32_tim7, STM32_IRQ_TIM7) /* Vector 16+55: TIM7 global interrupt */
VECTOR(stm32_dma2ch1, STM32_IRQ_DMA2CH1) /* Vector 16+56: DMA2 Channel 1 global interrupt */
VECTOR(stm32_dma2ch2, STM32_IRQ_DMA2CH2) /* Vector 16+57: DMA2 Channel 2 global interrupt */
VECTOR(stm32_dma2ch3, STM32_IRQ_DMA2CH3) /* Vector 16+58: DMA2 Channel 3 global interrupt */
VECTOR(stm32_dma2ch45, STM32_IRQ_DMA2CH45) /* Vector 16+59: DMA2 Channel 4 and 5 global interrupt */
VECTOR(stm32_dma2ch5, STM32_IRQ_DMA2CH5) /* Vector 16+60: DMA2 Channel 5 global interrupt */
# endif /* CONFIG_ARMV7M_CMNVECTOR */
#elif defined(CONFIG_STM32_CONNECTIVITYLINE) #elif defined(CONFIG_STM32_CONNECTIVITYLINE)

View File

@ -222,7 +222,7 @@
#define GPIO_ETH_MII_TX_EN_2 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTG|GPIO_PIN11) #define GPIO_ETH_MII_TX_EN_2 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTG|GPIO_PIN11)
#define GPIO_ETH_PPS_OUT_1 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN5) #define GPIO_ETH_PPS_OUT_1 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN5)
#define GPIO_ETH_PPS_OUT_2 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTG|GPIO_PIN8) #define GPIO_ETH_PPS_OUT_2 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTG|GPIO_PIN8)
#define GPIO_ETH_RMII_CRS_DV (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN7) #define GPIO_ETH_RMII_CRS_DV (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULLGPIO_PORTA|GPIO_PIN7)
#define GPIO_ETH_RMII_REF_CLK (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN1) #define GPIO_ETH_RMII_REF_CLK (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN1)
#define GPIO_ETH_RMII_RXD0 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN4) #define GPIO_ETH_RMII_RXD0 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN4)
#define GPIO_ETH_RMII_RXD1 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN5) #define GPIO_ETH_RMII_RXD1 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN5)

View File

@ -222,7 +222,7 @@
#define GPIO_ETH_MII_TX_EN_2 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTG|GPIO_PIN11) #define GPIO_ETH_MII_TX_EN_2 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTG|GPIO_PIN11)
#define GPIO_ETH_PPS_OUT_1 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN5) #define GPIO_ETH_PPS_OUT_1 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTB|GPIO_PIN5)
#define GPIO_ETH_PPS_OUT_2 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTG|GPIO_PIN8) #define GPIO_ETH_PPS_OUT_2 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTG|GPIO_PIN8)
#define GPIO_ETH_RMII_CRS_DV (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN7) #define GPIO_ETH_RMII_CRS_DV (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULLGPIO_PORTA|GPIO_PIN7)
#define GPIO_ETH_RMII_REF_CLK (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN1) #define GPIO_ETH_RMII_REF_CLK (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTA|GPIO_PIN1)
#define GPIO_ETH_RMII_RXD0 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN4) #define GPIO_ETH_RMII_RXD0 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN4)
#define GPIO_ETH_RMII_RXD1 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN5) #define GPIO_ETH_RMII_RXD1 (GPIO_ALT|GPIO_AF11|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTC|GPIO_PIN5)

View File

@ -720,10 +720,10 @@ static int adc_timinit(FAR struct stm32_dev_s *priv)
case 4: /* TimerX TRGO event */ case 4: /* TimerX TRGO event */
{ {
/* TODO: TRGO support not yet implemented */ #warning "TRGO support not yet implemented"
/* Set the event TRGO */ /* Set the event TRGO */
ccenable = 0;
egr = GTIM_EGR_TG; egr = GTIM_EGR_TG;
/* Set the duty cycle by writing to the CCR register for this channel */ /* Set the duty cycle by writing to the CCR register for this channel */
@ -1128,7 +1128,7 @@ static void adc_reset(FAR struct adc_dev_s *dev)
avdbg("intf: ADC%d\n", priv->intf); avdbg("intf: ADC%d\n", priv->intf);
flags = irqsave(); flags = irqsave();
/* Enable ADC reset state */ /* Enable ADC reset state */
adc_rccreset(priv, true); adc_rccreset(priv, true);
@ -1326,10 +1326,6 @@ static int adc_setup(FAR struct adc_dev_s *dev)
ret = irq_attach(priv->irq, priv->isr); ret = irq_attach(priv->irq, priv->isr);
if (ret == OK) if (ret == OK)
{ {
/* Make sure that the ADC device is in the powered up, reset state */
adc_reset(dev);
/* Enable the ADC interrupt */ /* Enable the ADC interrupt */
avdbg("Enable the ADC interrupt: irq=%d\n", priv->irq); avdbg("Enable the ADC interrupt: irq=%d\n", priv->irq);

View File

@ -281,7 +281,7 @@
#if defined(ADC1_HAVE_TIMER) || defined(ADC2_HAVE_TIMER) || defined(ADC3_HAVE_TIMER) #if defined(ADC1_HAVE_TIMER) || defined(ADC2_HAVE_TIMER) || defined(ADC3_HAVE_TIMER)
# define ADC_HAVE_TIMER 1 # define ADC_HAVE_TIMER 1
# if defined(CONFIG_STM32_STM32F10XX) && !defined(CONFIG_STM32_FORCEPOWER) # if defined(CONFIG_STM32_STM32F10XX) && defined(CONFIG_STM32_FORCEPOWER)
# warning "CONFIG_STM32_FORCEPOWER must be defined to enable the timer(s)" # warning "CONFIG_STM32_FORCEPOWER must be defined to enable the timer(s)"
# endif # endif
#else #else

View File

@ -2594,17 +2594,6 @@ static int stm32_phyinit(FAR struct stm32_ethmac_s *priv)
} }
up_mdelay(PHY_RESET_DELAY); up_mdelay(PHY_RESET_DELAY);
/* Perform any necessary, board-specific PHY initialization */
#ifdef CONFIG_STM32_PHYINIT
ret = stm32_phy_boardinitialize(0);
if (ret < 0)
{
ndbg("Failed to initialize the PHY: %d\n", ret);
return ret;
}
#endif
/* Special workaround for the Davicom DM9161 PHY is required. */ /* Special workaround for the Davicom DM9161 PHY is required. */
#ifdef CONFIG_PHY_DM9161 #ifdef CONFIG_PHY_DM9161

View File

@ -66,13 +66,14 @@ extern "C" {
* Function: stm32_ethinitialize * Function: stm32_ethinitialize
* *
* Description: * Description:
* Initialize the Ethernet driver for one interface. If the STM32 chip supports * Initialize the Ethernet driver for one interface. If the STM32 chip
* multiple Ethernet controllers, then board specific logic must implement * supports multiple Ethernet controllers, then board specific logic
* up_netinitialize() and call this function to initialize the desired interfaces. * must implement up_netinitialize() and call this function to initialize
* the desired interfaces.
* *
* Parameters: * Parameters:
* intf - In the case where there are multiple EMACs, this value identifies which * intf - In the case where there are multiple EMACs, this value
* EMAC is to be initialized. * identifies which EMAC is to be initialized.
* *
* Returned Value: * Returned Value:
* OK on success; Negated errno on failure. * OK on success; Negated errno on failure.
@ -85,30 +86,6 @@ extern "C" {
EXTERN int stm32_ethinitialize(int intf); EXTERN int stm32_ethinitialize(int intf);
#endif #endif
/************************************************************************************
* Function: stm32_phy_boardinitialize
*
* Description:
* Some boards require specialized initialization of the PHY before it can be used.
* This may include such things as configuring GPIOs, resetting the PHY, etc. If
* CONFIG_STM32_PHYINIT is defined in the configuration then the board specific
* logic must provide stm32_phyinitialize(); The STM32 Ethernet driver will call
* this function one time before it first uses the PHY.
*
* Parameters:
* intf - Always zero for now.
*
* Returned Value:
* OK on success; Negated errno on failure.
*
* Assumptions:
*
************************************************************************************/
#ifdef CONFIG_STM32_PHYINIT
EXTERN int stm32_phy_boardinitialize(int intf);
#endif
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
} }

View File

@ -67,14 +67,6 @@
# define STM32_CONSOLE_2STOP CONFIG_USART1_2STOP # define STM32_CONSOLE_2STOP CONFIG_USART1_2STOP
# define STM32_CONSOLE_TX GPIO_USART1_TX # define STM32_CONSOLE_TX GPIO_USART1_TX
# define STM32_CONSOLE_RX GPIO_USART1_RX # define STM32_CONSOLE_RX GPIO_USART1_RX
# ifdef CONFIG_USART1_RS485
# define STM32_CONSOLE_RS485_DIR GPIO_USART1_RS485_DIR
# if (CONFIG_USART1_RS485_DIR_POLARITY == 0)
# define STM32_CONSOLE_RS485_DIR_POLARITY false
# else
# define STM32_CONSOLE_RS485_DIR_POLARITY true
# endif
# endif
#elif defined(CONFIG_USART2_SERIAL_CONSOLE) #elif defined(CONFIG_USART2_SERIAL_CONSOLE)
# define STM32_CONSOLE_BASE STM32_USART2_BASE # define STM32_CONSOLE_BASE STM32_USART2_BASE
# define STM32_APBCLOCK STM32_PCLK1_FREQUENCY # define STM32_APBCLOCK STM32_PCLK1_FREQUENCY
@ -84,14 +76,6 @@
# define STM32_CONSOLE_2STOP CONFIG_USART2_2STOP # define STM32_CONSOLE_2STOP CONFIG_USART2_2STOP
# define STM32_CONSOLE_TX GPIO_USART2_TX # define STM32_CONSOLE_TX GPIO_USART2_TX
# define STM32_CONSOLE_RX GPIO_USART2_RX # define STM32_CONSOLE_RX GPIO_USART2_RX
# ifdef CONFIG_USART2_RS485
# define STM32_CONSOLE_RS485_DIR GPIO_USART2_RS485_DIR
# if (CONFIG_USART2_RS485_DIR_POLARITY == 0)
# define STM32_CONSOLE_RS485_DIR_POLARITY false
# else
# define STM32_CONSOLE_RS485_DIR_POLARITY true
# endif
# endif
#elif defined(CONFIG_USART3_SERIAL_CONSOLE) #elif defined(CONFIG_USART3_SERIAL_CONSOLE)
# define STM32_CONSOLE_BASE STM32_USART3_BASE # define STM32_CONSOLE_BASE STM32_USART3_BASE
# define STM32_APBCLOCK STM32_PCLK1_FREQUENCY # define STM32_APBCLOCK STM32_PCLK1_FREQUENCY
@ -101,14 +85,6 @@
# define STM32_CONSOLE_2STOP CONFIG_USART3_2STOP # define STM32_CONSOLE_2STOP CONFIG_USART3_2STOP
# define STM32_CONSOLE_TX GPIO_USART3_TX # define STM32_CONSOLE_TX GPIO_USART3_TX
# define STM32_CONSOLE_RX GPIO_USART3_RX # define STM32_CONSOLE_RX GPIO_USART3_RX
# ifdef CONFIG_USART3_RS485
# define STM32_CONSOLE_RS485_DIR GPIO_USART3_RS485_DIR
# if (CONFIG_USART3_RS485_DIR_POLARITY == 0)
# define STM32_CONSOLE_RS485_DIR_POLARITY false
# else
# define STM32_CONSOLE_RS485_DIR_POLARITY true
# endif
# endif
#elif defined(CONFIG_UART4_SERIAL_CONSOLE) #elif defined(CONFIG_UART4_SERIAL_CONSOLE)
# define STM32_CONSOLE_BASE STM32_UART4_BASE # define STM32_CONSOLE_BASE STM32_UART4_BASE
# define STM32_APBCLOCK STM32_PCLK1_FREQUENCY # define STM32_APBCLOCK STM32_PCLK1_FREQUENCY
@ -118,14 +94,6 @@
# define STM32_CONSOLE_2STOP CONFIG_UART4_2STOP # define STM32_CONSOLE_2STOP CONFIG_UART4_2STOP
# define STM32_CONSOLE_TX GPIO_UART4_TX # define STM32_CONSOLE_TX GPIO_UART4_TX
# define STM32_CONSOLE_RX GPIO_UART4_RX # define STM32_CONSOLE_RX GPIO_UART4_RX
# ifdef CONFIG_UART4_RS485
# define STM32_CONSOLE_RS485_DIR GPIO_UART4_RS485_DIR
# if (CONFIG_UART4_RS485_DIR_POLARITY == 0)
# define STM32_CONSOLE_RS485_DIR_POLARITY false
# else
# define STM32_CONSOLE_RS485_DIR_POLARITY true
# endif
# endif
#elif defined(CONFIG_UART5_SERIAL_CONSOLE) #elif defined(CONFIG_UART5_SERIAL_CONSOLE)
# define STM32_CONSOLE_BASE STM32_UART5_BASE # define STM32_CONSOLE_BASE STM32_UART5_BASE
# define STM32_APBCLOCK STM32_PCLK1_FREQUENCY # define STM32_APBCLOCK STM32_PCLK1_FREQUENCY
@ -135,14 +103,6 @@
# define STM32_CONSOLE_2STOP CONFIG_UART5_2STOP # define STM32_CONSOLE_2STOP CONFIG_UART5_2STOP
# define STM32_CONSOLE_TX GPIO_UART5_TX # define STM32_CONSOLE_TX GPIO_UART5_TX
# define STM32_CONSOLE_RX GPIO_UART5_RX # define STM32_CONSOLE_RX GPIO_UART5_RX
# ifdef CONFIG_UART5_RS485
# define STM32_CONSOLE_RS485_DIR GPIO_UART5_RS485_DIR
# if (CONFIG_UART5_RS485_DIR_POLARITY == 0)
# define STM32_CONSOLE_RS485_DIR_POLARITY false
# else
# define STM32_CONSOLE_RS485_DIR_POLARITY true
# endif
# endif
#elif defined(CONFIG_USART6_SERIAL_CONSOLE) #elif defined(CONFIG_USART6_SERIAL_CONSOLE)
# define STM32_CONSOLE_BASE STM32_USART6_BASE # define STM32_CONSOLE_BASE STM32_USART6_BASE
# define STM32_APBCLOCK STM32_PCLK2_FREQUENCY # define STM32_APBCLOCK STM32_PCLK2_FREQUENCY
@ -152,14 +112,6 @@
# define STM32_CONSOLE_2STOP CONFIG_USART6_2STOP # define STM32_CONSOLE_2STOP CONFIG_USART6_2STOP
# define STM32_CONSOLE_TX GPIO_USART6_TX # define STM32_CONSOLE_TX GPIO_USART6_TX
# define STM32_CONSOLE_RX GPIO_USART6_RX # define STM32_CONSOLE_RX GPIO_USART6_RX
# ifdef CONFIG_USART6_RS485
# define STM32_CONSOLE_RS485_DIR GPIO_USART6_RS485_DIR
# if (CONFIG_USART6_RS485_DIR_POLARITY == 0)
# define STM32_CONSOLE_RS485_DIR_POLARITY false
# else
# define STM32_CONSOLE_RS485_DIR_POLARITY true
# endif
# endif
#endif #endif
/* CR1 settings */ /* CR1 settings */
@ -278,19 +230,10 @@ void up_lowputc(char ch)
/* Wait until the TX data register is empty */ /* Wait until the TX data register is empty */
while ((getreg32(STM32_CONSOLE_BASE + STM32_USART_SR_OFFSET) & USART_SR_TXE) == 0); while ((getreg32(STM32_CONSOLE_BASE + STM32_USART_SR_OFFSET) & USART_SR_TXE) == 0);
#if STM32_CONSOLE_RS485_DIR
stm32_gpiowrite(STM32_CONSOLE_RS485_DIR, STM32_CONSOLE_RS485_DIR_POLARITY);
#endif
/* Then send the character */ /* Then send the character */
putreg32((uint32_t)ch, STM32_CONSOLE_BASE + STM32_USART_DR_OFFSET); putreg32((uint32_t)ch, STM32_CONSOLE_BASE + STM32_USART_DR_OFFSET);
#if STM32_CONSOLE_RS485_DIR
while ((getreg32(STM32_CONSOLE_BASE + STM32_USART_SR_OFFSET) & USART_SR_TC) == 0);
stm32_gpiowrite(STM32_CONSOLE_RS485_DIR, !STM32_CONSOLE_RS485_DIR_POLARITY);
#endif
#endif #endif
} }
@ -385,14 +328,7 @@ void stm32_lowsetup(void)
#ifdef STM32_CONSOLE_TX #ifdef STM32_CONSOLE_TX
stm32_configgpio(STM32_CONSOLE_TX); stm32_configgpio(STM32_CONSOLE_TX);
#endif stm32_configgpio(STM32_CONSOLE_TX);
#ifdef STM32_CONSOLE_RX
stm32_configgpio(STM32_CONSOLE_RX);
#endif
#if STM32_CONSOLE_RS485_DIR
stm32_configgpio(STM32_CONSOLE_RS485_DIR);
stm32_gpiowrite(STM32_CONSOLE_RS485_DIR, !STM32_CONSOLE_RS485_DIR_POLARITY);
#endif #endif
/* Enable and configure the selected console device */ /* Enable and configure the selected console device */
@ -446,14 +382,7 @@ void stm32_lowsetup(void)
#ifdef STM32_CONSOLE_TX #ifdef STM32_CONSOLE_TX
stm32_configgpio(STM32_CONSOLE_TX); stm32_configgpio(STM32_CONSOLE_TX);
#endif stm32_configgpio(STM32_CONSOLE_TX);
#ifdef STM32_CONSOLE_RX
stm32_configgpio(STM32_CONSOLE_RX);
#endif
#if STM32_CONSOLE_RS485_DIR
stm32_configgpio(STM32_CONSOLE_RS485_DIR);
stm32_gpiowrite(STM32_CONSOLE_RS485_DIR, !STM32_CONSOLE_RS485_DIR_POLARITY);
#endif #endif
/* Enable and configure the selected console device */ /* Enable and configure the selected console device */

View File

@ -3651,14 +3651,10 @@ static int stm32_epout_configure(FAR struct stm32_ep_s *privep, uint8_t eptype,
regval = stm32_getreg(regaddr); regval = stm32_getreg(regaddr);
if ((regval & OTGFS_DOEPCTL_USBAEP) == 0) if ((regval & OTGFS_DOEPCTL_USBAEP) == 0)
{ {
if (regval & OTGFS_DOEPCTL_NAKSTS) regval &= ~(OTGFS_DOEPCTL_MPSIZ_MASK | OTGFS_DIEPCTL_EPTYP_MASK | OTGFS_DIEPCTL_TXFNUM_MASK);
{
regval |= OTGFS_DOEPCTL_CNAK;
}
regval &= ~(OTGFS_DOEPCTL_MPSIZ_MASK | OTGFS_DOEPCTL_EPTYP_MASK);
regval |= mpsiz; regval |= mpsiz;
regval |= (eptype << OTGFS_DOEPCTL_EPTYP_SHIFT); regval |= (eptype << OTGFS_DOEPCTL_EPTYP_SHIFT);
regval |= (eptype << OTGFS_DIEPCTL_TXFNUM_SHIFT);
regval |= (OTGFS_DOEPCTL_SD0PID | OTGFS_DOEPCTL_USBAEP); regval |= (OTGFS_DOEPCTL_SD0PID | OTGFS_DOEPCTL_USBAEP);
stm32_putreg(regval, regaddr); stm32_putreg(regval, regaddr);
@ -3747,11 +3743,6 @@ static int stm32_epin_configure(FAR struct stm32_ep_s *privep, uint8_t eptype,
regval = stm32_getreg(regaddr); regval = stm32_getreg(regaddr);
if ((regval & OTGFS_DIEPCTL_USBAEP) == 0) if ((regval & OTGFS_DIEPCTL_USBAEP) == 0)
{ {
if (regval & OTGFS_DIEPCTL_NAKSTS)
{
regval |= OTGFS_DIEPCTL_CNAK;
}
regval &= ~(OTGFS_DIEPCTL_MPSIZ_MASK | OTGFS_DIEPCTL_EPTYP_MASK | OTGFS_DIEPCTL_TXFNUM_MASK); regval &= ~(OTGFS_DIEPCTL_MPSIZ_MASK | OTGFS_DIEPCTL_EPTYP_MASK | OTGFS_DIEPCTL_TXFNUM_MASK);
regval |= mpsiz; regval |= mpsiz;
regval |= (eptype << OTGFS_DIEPCTL_EPTYP_SHIFT); regval |= (eptype << OTGFS_DIEPCTL_EPTYP_SHIFT);
@ -3909,7 +3900,7 @@ static void stm32_epout_disable(FAR struct stm32_ep_s *privep)
* Name: stm32_epin_disable * Name: stm32_epin_disable
* *
* Description: * Description:
* Disable an IN endpoint when it will no longer be used * Diable an IN endpoint will no longer be used
* *
*******************************************************************************/ *******************************************************************************/
@ -3921,17 +3912,6 @@ static void stm32_epin_disable(FAR struct stm32_ep_s *privep)
usbtrace(TRACE_EPDISABLE, privep->epphy); usbtrace(TRACE_EPDISABLE, privep->epphy);
/* After USB reset, the endpoint will already be deactivated by the
* hardware. Trying to disable again will just hang in the wait.
*/
regaddr = STM32_OTGFS_DIEPCTL(privep->epphy);
regval = stm32_getreg(regaddr);
if ((regval & OTGFS_DIEPCTL_USBAEP) == 0)
{
return;
}
/* Make sure that there is no pending IPEPNE interrupt (because we are /* Make sure that there is no pending IPEPNE interrupt (because we are
* to poll this bit below). * to poll this bit below).
*/ */

View File

@ -607,7 +607,6 @@ static FAR struct stm32_lowerhalf_s *stm32_tim2lower(int tim)
#endif #endif
#ifdef CONFIG_STM32_TIM3_QE #ifdef CONFIG_STM32_TIM3_QE
case 3: case 3:
return &g_tim3lower;
#endif #endif
#ifdef CONFIG_STM32_TIM4_QE #ifdef CONFIG_STM32_TIM4_QE
case 4: case 4:

View File

@ -96,19 +96,6 @@
# endif # endif
# endif # endif
/* Currently RS-485 support cannot be enabled when RXDMA is in use due to lack
* of testing - RS-485 support was developed on STM32F1x
*/
# if (defined(CONFIG_USART1_RXDMA) && defined(CONFIG_USART1_RS485)) || \
(defined(CONFIG_USART2_RXDMA) && defined(CONFIG_USART2_RS485)) || \
(defined(CONFIG_USART3_RXDMA) && defined(CONFIG_USART3_RS485)) || \
(defined(CONFIG_UART4_RXDMA) && defined(CONFIG_UART4_RS485)) || \
(defined(CONFIG_UART5_RXDMA) && defined(CONFIG_UART5_RS485)) || \
(defined(CONFIG_USART6_RXDMA) && defined(CONFIG_USART6_RS485))
# error "RXDMA and RS-485 cannot be enabled at the same time for the same U[S]ART"
# endif
/* For the F4, there are alternate DMA channels for USART1 and 6. /* For the F4, there are alternate DMA channels for USART1 and 6.
* Logic in the board.h file make the DMA channel selection by defining * Logic in the board.h file make the DMA channel selection by defining
* the following in the board.h file. * the following in the board.h file.
@ -232,11 +219,6 @@ struct up_dev_s
uint32_t rxdmanext; /* Next byte in the DMA buffer to be read */ uint32_t rxdmanext; /* Next byte in the DMA buffer to be read */
char *const rxfifo; /* Receive DMA buffer */ char *const rxfifo; /* Receive DMA buffer */
#endif #endif
#ifdef HAVE_RS485
const uint32_t rs485_dir_gpio; /* U[S]ART RS-485 DIR GPIO pin configuration */
const bool rs485_dir_polarity; /* U[S]ART RS-485 DIR pin state for TX enabled */
#endif
}; };
/**************************************************************************** /****************************************************************************
@ -433,15 +415,6 @@ static struct up_dev_s g_usart1priv =
.rxfifo = g_usart1rxfifo, .rxfifo = g_usart1rxfifo,
#endif #endif
.vector = up_interrupt_usart1, .vector = up_interrupt_usart1,
#ifdef CONFIG_USART1_RS485
.rs485_dir_gpio = GPIO_USART1_RS485_DIR,
# if (CONFIG_USART1_RS485_DIR_POLARITY == 0)
.rs485_dir_polarity = false,
# else
.rs485_dir_polarity = true,
# endif
#endif
}; };
#endif #endif
@ -495,15 +468,6 @@ static struct up_dev_s g_usart2priv =
.rxfifo = g_usart2rxfifo, .rxfifo = g_usart2rxfifo,
#endif #endif
.vector = up_interrupt_usart2, .vector = up_interrupt_usart2,
#ifdef CONFIG_USART2_RS485
.rs485_dir_gpio = GPIO_USART2_RS485_DIR,
# if (CONFIG_USART2_RS485_DIR_POLARITY == 0)
.rs485_dir_polarity = false,
# else
.rs485_dir_polarity = true,
# endif
#endif
}; };
#endif #endif
@ -557,15 +521,6 @@ static struct up_dev_s g_usart3priv =
.rxfifo = g_usart3rxfifo, .rxfifo = g_usart3rxfifo,
#endif #endif
.vector = up_interrupt_usart3, .vector = up_interrupt_usart3,
#ifdef CONFIG_USART3_RS485
.rs485_dir_gpio = GPIO_USART3_RS485_DIR,
# if (CONFIG_USART3_RS485_DIR_POLARITY == 0)
.rs485_dir_polarity = false,
# else
.rs485_dir_polarity = true,
# endif
#endif
}; };
#endif #endif
@ -615,15 +570,6 @@ static struct up_dev_s g_uart4priv =
.rxfifo = g_uart4rxfifo, .rxfifo = g_uart4rxfifo,
#endif #endif
.vector = up_interrupt_uart4, .vector = up_interrupt_uart4,
#ifdef CONFIG_UART4_RS485
.rs485_dir_gpio = GPIO_UART4_RS485_DIR,
# if (CONFIG_UART4_RS485_DIR_POLARITY == 0)
.rs485_dir_polarity = false,
# else
.rs485_dir_polarity = true,
# endif
#endif
}; };
#endif #endif
@ -673,15 +619,6 @@ static struct up_dev_s g_uart5priv =
.rxfifo = g_uart5rxfifo, .rxfifo = g_uart5rxfifo,
#endif #endif
.vector = up_interrupt_uart5, .vector = up_interrupt_uart5,
#ifdef CONFIG_UART5_RS485
.rs485_dir_gpio = GPIO_UART5_RS485_DIR,
# if (CONFIG_UART5_RS485_DIR_POLARITY == 0)
.rs485_dir_polarity = false,
# else
.rs485_dir_polarity = true,
# endif
#endif
}; };
#endif #endif
@ -735,15 +672,6 @@ static struct up_dev_s g_usart6priv =
.rxfifo = g_usart6rxfifo, .rxfifo = g_usart6rxfifo,
#endif #endif
.vector = up_interrupt_usart6, .vector = up_interrupt_usart6,
#ifdef CONFIG_USART6_RS485
.rs485_dir_gpio = GPIO_USART6_RS485_DIR,
# if (CONFIG_USART6_RS485_DIR_POLARITY == 0)
.rs485_dir_polarity = false,
# else
.rs485_dir_polarity = true,
# endif
#endif
}; };
#endif #endif
@ -816,8 +744,8 @@ static void up_restoreusartint(struct up_dev_s *priv, uint16_t ie)
/* And restore the interrupt state (see the interrupt enable/usage table above) */ /* And restore the interrupt state (see the interrupt enable/usage table above) */
cr = up_serialin(priv, STM32_USART_CR1_OFFSET); cr = up_serialin(priv, STM32_USART_CR1_OFFSET);
cr &= ~(USART_CR1_USED_INTS); cr &= ~(USART_CR1_RXNEIE|USART_CR1_TXEIE|USART_CR1_PEIE);
cr |= (ie & (USART_CR1_USED_INTS)); cr |= (ie & (USART_CR1_RXNEIE|USART_CR1_TXEIE|USART_CR1_PEIE));
up_serialout(priv, STM32_USART_CR1_OFFSET, cr); up_serialout(priv, STM32_USART_CR1_OFFSET, cr);
cr = up_serialin(priv, STM32_USART_CR3_OFFSET); cr = up_serialin(priv, STM32_USART_CR3_OFFSET);
@ -844,7 +772,7 @@ static inline void up_disableusartint(struct up_dev_s *priv, uint16_t *ie)
* USART_CR1_IDLEIE 4 USART_SR_IDLE Idle Line Detected (not used) * USART_CR1_IDLEIE 4 USART_SR_IDLE Idle Line Detected (not used)
* USART_CR1_RXNEIE 5 USART_SR_RXNE Received Data Ready to be Read * USART_CR1_RXNEIE 5 USART_SR_RXNE Received Data Ready to be Read
* " " USART_SR_ORE Overrun Error Detected * " " USART_SR_ORE Overrun Error Detected
* USART_CR1_TCIE 6 USART_SR_TC Transmission Complete (used only for RS-485) * USART_CR1_TCIE 6 USART_SR_TC Transmission Complete (not used)
* USART_CR1_TXEIE 7 USART_SR_TXE Transmit Data Register Empty * USART_CR1_TXEIE 7 USART_SR_TXE Transmit Data Register Empty
* USART_CR1_PEIE 8 USART_SR_PE Parity Error * USART_CR1_PEIE 8 USART_SR_PE Parity Error
* *
@ -863,7 +791,7 @@ static inline void up_disableusartint(struct up_dev_s *priv, uint16_t *ie)
* overlap. This logic would fail if we needed the break interrupt! * overlap. This logic would fail if we needed the break interrupt!
*/ */
*ie = (cr1 & (USART_CR1_USED_INTS)) | (cr3 & USART_CR3_EIE); *ie = (cr1 & (USART_CR1_RXNEIE|USART_CR1_TXEIE|USART_CR1_PEIE)) | (cr3 & USART_CR3_EIE);
} }
/* Disable all interrupts */ /* Disable all interrupts */
@ -1018,14 +946,6 @@ static int up_setup(struct uart_dev_s *dev)
stm32_configgpio(priv->rts_gpio); stm32_configgpio(priv->rts_gpio);
} }
#if HAVE_RS485
if (priv->rs485_dir_gpio != 0)
{
stm32_configgpio(priv->rs485_dir_gpio);
stm32_gpiowrite(priv->rs485_dir_gpio, !priv->rs485_dir_polarity);
}
#endif
/* Configure CR2 */ /* Configure CR2 */
/* Clear CLKEN, CPOL, CPHA, LBCL, and interrupt enable bits */ /* Clear CLKEN, CPOL, CPHA, LBCL, and interrupt enable bits */
@ -1297,7 +1217,7 @@ static int up_interrupt_common(struct up_dev_s *priv)
* USART_CR1_IDLEIE 4 USART_SR_IDLE Idle Line Detected (not used) * USART_CR1_IDLEIE 4 USART_SR_IDLE Idle Line Detected (not used)
* USART_CR1_RXNEIE 5 USART_SR_RXNE Received Data Ready to be Read * USART_CR1_RXNEIE 5 USART_SR_RXNE Received Data Ready to be Read
* " " USART_SR_ORE Overrun Error Detected * " " USART_SR_ORE Overrun Error Detected
* USART_CR1_TCIE 6 USART_SR_TC Transmission Complete (used only for RS-485) * USART_CR1_TCIE 6 USART_SR_TC Transmission Complete (not used)
* USART_CR1_TXEIE 7 USART_SR_TXE Transmit Data Register Empty * USART_CR1_TXEIE 7 USART_SR_TXE Transmit Data Register Empty
* USART_CR1_PEIE 8 USART_SR_PE Parity Error * USART_CR1_PEIE 8 USART_SR_PE Parity Error
* *
@ -1312,21 +1232,6 @@ static int up_interrupt_common(struct up_dev_s *priv)
* being used. * being used.
*/ */
#ifdef HAVE_RS485
/* Transmission of whole buffer is over - TC is set, TXEIE is cleared.
* Note - this should be first, to have the most recent TC bit value from
* SR register - sending data affects TC, but without refresh we will not
* know that...
*/
if ((priv->sr & USART_SR_TC) != 0 && (priv->ie & USART_CR1_TCIE) != 0 &&
(priv->ie & USART_CR1_TXEIE) == 0)
{
stm32_gpiowrite(priv->rs485_dir_gpio, !priv->rs485_dir_polarity);
up_restoreusartint(priv, priv->ie & ~USART_CR1_TCIE);
}
#endif
/* Handle incoming, receive bytes. */ /* Handle incoming, receive bytes. */
if ((priv->sr & USART_SR_RXNE) != 0 && (priv->ie & USART_CR1_RXNEIE) != 0) if ((priv->sr & USART_SR_RXNE) != 0 && (priv->ie & USART_CR1_RXNEIE) != 0)
@ -1360,14 +1265,13 @@ static int up_interrupt_common(struct up_dev_s *priv)
if ((priv->sr & USART_SR_TXE) != 0 && (priv->ie & USART_CR1_TXEIE) != 0) if ((priv->sr & USART_SR_TXE) != 0 && (priv->ie & USART_CR1_TXEIE) != 0)
{ {
/* Transmit data register empty ... process outgoing bytes */ /* Transmit data regiser empty ... process outgoing bytes */
uart_xmitchars(&priv->dev); uart_xmitchars(&priv->dev);
handled = true; handled = true;
} }
} }
return OK;
return OK;
} }
/**************************************************************************** /****************************************************************************
@ -1707,10 +1611,6 @@ static bool up_dma_rxavailable(struct uart_dev_s *dev)
static void up_send(struct uart_dev_s *dev, int ch) static void up_send(struct uart_dev_s *dev, int ch)
{ {
struct up_dev_s *priv = (struct up_dev_s*)dev->priv; struct up_dev_s *priv = (struct up_dev_s*)dev->priv;
#ifdef HAVE_RS485
if (priv->rs485_dir_gpio != 0)
stm32_gpiowrite(priv->rs485_dir_gpio, priv->rs485_dir_polarity);
#endif
up_serialout(priv, STM32_USART_DR_OFFSET, (uint32_t)ch); up_serialout(priv, STM32_USART_DR_OFFSET, (uint32_t)ch);
} }
@ -1731,7 +1631,7 @@ static void up_txint(struct uart_dev_s *dev, bool enable)
* *
* Enable Bit Status Meaning Usage * Enable Bit Status Meaning Usage
* ------------------ --- --------------- ---------------------------- ---------- * ------------------ --- --------------- ---------------------------- ----------
* USART_CR1_TCIE 6 USART_SR_TC Transmission Complete (used only for RS-485) * USART_CR1_TCIE 6 USART_SR_TC Transmission Complete (not used)
* USART_CR1_TXEIE 7 USART_SR_TXE Transmit Data Register Empty * USART_CR1_TXEIE 7 USART_SR_TXE Transmit Data Register Empty
* USART_CR3_CTSIE 10 USART_SR_CTS CTS flag (not used) * USART_CR3_CTSIE 10 USART_SR_CTS CTS flag (not used)
*/ */
@ -1742,20 +1642,7 @@ static void up_txint(struct uart_dev_s *dev, bool enable)
/* Set to receive an interrupt when the TX data register is empty */ /* Set to receive an interrupt when the TX data register is empty */
#ifndef CONFIG_SUPPRESS_SERIAL_INTS #ifndef CONFIG_SUPPRESS_SERIAL_INTS
uint16_t ie = priv->ie | USART_CR1_TXEIE; up_restoreusartint(priv, priv->ie | USART_CR1_TXEIE);
/* If RS-485 is supported on this U[S]ART, then also enable the
* transmission complete interrupt.
*/
# ifdef HAVE_RS485
if (priv->rs485_dir_gpio != 0)
{
ie |= USART_CR1_TCIE;
}
# endif
up_restoreusartint(priv, ie);
/* Fake a TX interrupt here by just calling uart_xmitchars() with /* Fake a TX interrupt here by just calling uart_xmitchars() with
* interrupts disabled (note this may recurse). * interrupts disabled (note this may recurse).
@ -1770,7 +1657,6 @@ static void up_txint(struct uart_dev_s *dev, bool enable)
up_restoreusartint(priv, priv->ie & ~USART_CR1_TXEIE); up_restoreusartint(priv, priv->ie & ~USART_CR1_TXEIE);
} }
irqrestore(flags); irqrestore(flags);
} }

View File

@ -223,20 +223,6 @@
# undef SERIAL_HAVE_ONLY_DMA # undef SERIAL_HAVE_ONLY_DMA
#endif #endif
/* Is RS-485 used? */
#if defined(CONFIG_USART1_RS485) || defined(CONFIG_USART2_RS485) || \
defined(CONFIG_USART3_RS485) || defined(CONFIG_UART4_RS485) || \
defined(CONFIG_UART5_RS485) || defined(CONFIG_USART6_RS485)
# define HAVE_RS485 1
#endif
#ifdef HAVE_RS485
# define USART_CR1_USED_INTS (USART_CR1_RXNEIE | USART_CR1_TXEIE | USART_CR1_PEIE | USART_CR1_TCIE)
#else
# define USART_CR1_USED_INTS (USART_CR1_RXNEIE | USART_CR1_TXEIE | USART_CR1_PEIE)
#endif
/************************************************************************************ /************************************************************************************
* Public Types * Public Types
************************************************************************************/ ************************************************************************************/

View File

@ -92,11 +92,7 @@ static inline void rcc_reset(void)
putreg32(regval, STM32_RCC_CR); putreg32(regval, STM32_RCC_CR);
regval = getreg32(STM32_RCC_CFGR); /* Reset PLLSRC, PLLXTPRE, PLLMUL and USBPRE bits */ regval = getreg32(STM32_RCC_CFGR); /* Reset PLLSRC, PLLXTPRE, PLLMUL and USBPRE bits */
regval &= ~(RCC_CFGR_PLLSRC|RCC_CFGR_PLLXTPRE|RCC_CFGR_PLLMUL_MASK regval &= ~(RCC_CFGR_PLLSRC|RCC_CFGR_PLLXTPRE|RCC_CFGR_PLLMUL_MASK|RCC_CFGR_USBPRE);
#ifndef CONFIG_STM32_VALUELINE
|RCC_CFGR_USBPRE
#endif
);
putreg32(regval, STM32_RCC_CFGR); putreg32(regval, STM32_RCC_CFGR);
putreg32(0, STM32_RCC_CIR); /* Disable all interrupts */ putreg32(0, STM32_RCC_CIR); /* Disable all interrupts */
@ -228,27 +224,6 @@ static inline void rcc_enableapb1(void)
#endif #endif
#endif #endif
#ifdef CONFIG_STM32_TIM12
/* Timer 12 clock enable */
#ifdef CONFIG_STM32_FORCEPOWER
regval |= RCC_APB1ENR_TIM12EN;
#endif
#endif
#ifdef CONFIG_STM32_TIM13
/* Timer 13 clock enable */
#ifdef CONFIG_STM32_FORCEPOWER
regval |= RCC_APB1ENR_TIM13EN;
#endif
#endif
#ifdef CONFIG_STM32_TIM14
/* Timer 14 clock enable */
#ifdef CONFIG_STM32_FORCEPOWER
regval |= RCC_APB1ENR_TIM14EN;
#endif
#endif
#ifdef CONFIG_STM32_WWDG #ifdef CONFIG_STM32_WWDG
/* Window Watchdog clock enable */ /* Window Watchdog clock enable */
@ -340,13 +315,6 @@ static inline void rcc_enableapb1(void)
regval |= RCC_APB1ENR_DACEN; regval |= RCC_APB1ENR_DACEN;
#endif #endif
#ifdef CONFIG_STM32_CEC
/* CEC clock enable */
regval |= RCC_APB1ENR_CECEN;
#endif
putreg32(regval, STM32_RCC_APB1ENR); putreg32(regval, STM32_RCC_APB1ENR);
} }
@ -436,28 +404,6 @@ static inline void rcc_enableapb2(void)
regval |= RCC_APB2ENR_ADC3EN; regval |= RCC_APB2ENR_ADC3EN;
#endif #endif
#ifdef CONFIG_STM32_TIM15
/* TIM15 Timer clock enable */
#ifdef CONFIG_STM32_FORCEPOWER
regval |= RCC_APB2ENR_TIM15EN;
#endif
#endif
#ifdef CONFIG_STM32_TIM16
/* TIM16 Timer clock enable */
#ifdef CONFIG_STM32_FORCEPOWER
regval |= RCC_APB2ENR_TIM16EN;
#endif
#endif
#ifdef CONFIG_STM32_TIM17
/* TIM17 Timer clock enable */
#ifdef CONFIG_STM32_FORCEPOWER
regval |= RCC_APB2ENR_TIM17EN;
#endif
#endif
putreg32(regval, STM32_RCC_APB2ENR); putreg32(regval, STM32_RCC_APB2ENR);
} }

View File

@ -2,45 +2,3 @@
# For a description of the syntax of this configuration file, # For a description of the syntax of this configuration file,
# see misc/tools/kconfig-language.txt. # see misc/tools/kconfig-language.txt.
# #
config BINFMT_DISABLE
bool "Disble BINFMT support"
default n
---help---
By default, support for loadable binary formats is built. This logic
may be suppressed be defining this setting.
if !BINFMT_DISABLE
config NXFLAT
bool "Enable the NXFLAT Binary Format"
default n
---help---
Enable support for the NXFLAT binary format. Default: n
if NXFLAT
source binfmt/libnxflat/Kconfig
endif
config ELF
bool "Enable the ELF Binary Format"
default n
---help---
Enable support for the ELF binary format. Default: n
if ELF
source binfmt/libelf/Kconfig
endif
endif
config BINFMT_CONSTRUCTORS
bool "C++ Static Constructor Support"
default n
depends on HAVE_CXX && ELF # FIX ME: Currently only supported for ELF
---help---
Build in support for C++ constructors in loaded modules.
config SYMTAB_ORDEREDBYNAME
bool "Symbol Tables Ordered by Name"
default n

View File

@ -1,7 +1,7 @@
############################################################################ ############################################################################
# nxflat/Makefile # nxflat/Makefile
# #
# Copyright (C) 2007-2009, 2012 Gregory Nutt. All rights reserved. # Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org> # Author: Gregory Nutt <gnutt@nuttx.org>
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -36,62 +36,67 @@
-include $(TOPDIR)/Make.defs -include $(TOPDIR)/Make.defs
ifeq ($(WINTOOL),y) ifeq ($(WINTOOL),y)
INCDIROPT = -w INCDIROPT = -w
endif endif
CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" "$(TOPDIR)$(DELIM)sched"} CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/sched}
# Basic BINFMT source files ifeq ($(CONFIG_NXFLAT),y)
include libnxflat/Make.defs
LIBNXFLAT_CSRCS += nxflat.c
endif
BINFMT_ASRCS = BINFMT_ASRCS =
BINFMT_CSRCS = binfmt_globals.c binfmt_register.c binfmt_unregister.c \ BINFMT_CSRCS = binfmt_globals.c binfmt_register.c binfmt_unregister.c \
binfmt_loadmodule.c binfmt_unloadmodule.c binfmt_execmodule.c \ binfmt_loadmodule.c binfmt_unloadmodule.c binfmt_execmodule.c \
binfmt_exec.c binfmt_dumpmodule.c binfmt_exec.c binfmt_dumpmodule.c
# Symbol table source files SYMTAB_ASRCS =
SYMTAB_CSRCS = symtab_findbyname.c symtab_findbyvalue.c \
symtab_findorderedbyname.c symtab_findorderedbyvalue.c
BINFMT_CSRCS += symtab_findbyname.c symtab_findbyvalue.c \ SUBDIRS = libnxflat
symtab_findorderedbyname.c symtab_findorderedbyvalue.c
# Add configured binary modules ASRCS = $(BINFMT_ASRCS) $(SYMTAB_ASRCS) $(LIBNXFLAT_ASRCS)
AOBJS = $(ASRCS:.S=$(OBJEXT))
VPATH = CSRCS = $(BINFMT_CSRCS) $(SYMTAB_CSRCS) $(LIBNXFLAT_CSRCS)
SUBDIRS = COBJS = $(CSRCS:.c=$(OBJEXT))
DEPPATH = --dep-path .
include libnxflat$(DELIM)Make.defs SRCS = $(ASRCS) $(CSRCS)
include libelf$(DELIM)Make.defs OBJS = $(AOBJS) $(COBJS)
BINFMT_AOBJS = $(BINFMT_ASRCS:.S=$(OBJEXT)) BIN = libbinfmt$(LIBEXT)
BINFMT_COBJS = $(BINFMT_CSRCS:.c=$(OBJEXT))
BINFMT_SRCS = $(BINFMT_ASRCS) $(BINFMT_CSRCS) VPATH = libnxflat
BINFMT_OBJS = $(BINFMT_AOBJS) $(BINFMT_COBJS)
BIN = libbinfmt$(LIBEXT) all: $(BIN)
all: $(BIN) $(AOBJS): %$(OBJEXT): %.S
$(BINFMT_AOBJS): %$(OBJEXT): %.S
$(call ASSEMBLE, $<, $@) $(call ASSEMBLE, $<, $@)
$(BINFMT_COBJS): %$(OBJEXT): %.c $(COBJS): %$(OBJEXT): %.c
$(call COMPILE, $<, $@) $(call COMPILE, $<, $@)
$(BIN): $(BINFMT_OBJS) $(BIN): $(OBJS)
$(call ARCHIVE, $@, $(BINFMT_OBJS)) @( for obj in $(OBJS) ; do \
$(call ARCHIVE, $@, $${obj}); \
done ; )
.depend: Makefile $(BINFMT_SRCS) .depend: Makefile $(SRCS)
$(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(BINFMT_SRCS) >Make.dep @$(MKDEP) --dep-path . --dep-path libnxflat \
$(Q) touch $@ $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
@touch $@
depend: .depend depend: .depend
clean: clean:
$(call DELFILE, $(BIN)) @rm -f $(BIN) *~ .*.swp
$(call CLEAN) $(call CLEAN)
@( for dir in $(SUBDIRS); do \
rm -f $${dir}/*~ $${dir}/.*.swp; \
done ; )
distclean: clean distclean: clean
$(call DELFILE, Make.dep) @rm -f Make.dep .depend
$(call DELFILE, .depend)
-include Make.dep -include Make.dep

View File

@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* binfmt/binfmt_dumpmodule.c * binfmt/binfmt_dumpmodule.c
* *
* Copyright (C) 2009, 2012 Gregory Nutt. All rights reserved. * Copyright (C) 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -43,7 +43,7 @@
#include <debug.h> #include <debug.h>
#include <errno.h> #include <errno.h>
#include <nuttx/binfmt/binfmt.h> #include <nuttx/binfmt.h>
#include "binfmt_internal.h" #include "binfmt_internal.h"
@ -90,12 +90,8 @@ int dump_module(FAR const struct binary_s *bin)
bdbg(" filename: %s\n", bin->filename); bdbg(" filename: %s\n", bin->filename);
bdbg(" argv: %p\n", bin->argv); bdbg(" argv: %p\n", bin->argv);
bdbg(" entrypt: %p\n", bin->entrypt); bdbg(" entrypt: %p\n", bin->entrypt);
bdbg(" mapped: %p size=%d\n", bin->mapped, bin->mapsize); bdbg(" ispace: %p size=%d\n", bin->ispace, bin->isize);
bdbg(" alloc: %p %p %p\n", bin->alloc[0], bin->alloc[1], bin->alloc[2]); bdbg(" dspace: %p\n", bin->dspace);
#ifdef CONFIG_BINFMT_CONSTRUCTORS
bdbg(" ctors: %p nctors=%d\n", bin->ctors, bin->nctors);
bdbg(" dtors: %p ndtors=%d\n", bin->dtors, bin->ndtors);
#endif
bdbg(" stacksize: %d\n", bin->stacksize); bdbg(" stacksize: %d\n", bin->stacksize);
} }
return OK; return OK;

View File

@ -44,7 +44,7 @@
#include <debug.h> #include <debug.h>
#include <errno.h> #include <errno.h>
#include <nuttx/binfmt/binfmt.h> #include <nuttx/binfmt.h>
#include "binfmt_internal.h" #include "binfmt_internal.h"

View File

@ -47,7 +47,7 @@
#include <errno.h> #include <errno.h>
#include <nuttx/arch.h> #include <nuttx/arch.h>
#include <nuttx/binfmt/binfmt.h> #include <nuttx/binfmt.h>
#include "os_internal.h" #include "os_internal.h"
#include "binfmt_internal.h" #include "binfmt_internal.h"
@ -70,39 +70,6 @@
* Private Functions * Private Functions
****************************************************************************/ ****************************************************************************/
/****************************************************************************
* Name: exec_ctors
*
* Description:
* Execute C++ static constructors.
*
* Input Parameters:
* loadinfo - Load state information
*
* Returned Value:
* 0 (OK) is returned on success and a negated errno is returned on
* failure.
*
****************************************************************************/
#ifdef CONFIG_BINFMT_CONSTRUCTORS
static inline void exec_ctors(FAR const struct binary_s *binp)
{
binfmt_ctor_t *ctor = binp->ctors;
int i;
/* Execute each constructor */
for (i = 0; i < binp->nctors; i++)
{
bvdbg("Calling ctor %d at %p\n", i, (FAR void *)ctor);
(*ctor)();
ctor++;
}
}
#endif
/**************************************************************************** /****************************************************************************
* Public Functions * Public Functions
****************************************************************************/ ****************************************************************************/
@ -120,7 +87,7 @@ static inline void exec_ctors(FAR const struct binary_s *binp)
* *
****************************************************************************/ ****************************************************************************/
int exec_module(FAR const struct binary_s *binp, int priority) int exec_module(FAR const struct binary_s *bin, int priority)
{ {
FAR _TCB *tcb; FAR _TCB *tcb;
#ifndef CONFIG_CUSTOM_STACK #ifndef CONFIG_CUSTOM_STACK
@ -133,14 +100,14 @@ int exec_module(FAR const struct binary_s *binp, int priority)
/* Sanity checking */ /* Sanity checking */
#ifdef CONFIG_DEBUG #ifdef CONFIG_DEBUG
if (!binp || !binp->entrypt || binp->stacksize <= 0) if (!bin || !bin->ispace || !bin->entrypt || bin->stacksize <= 0)
{ {
err = EINVAL; err = EINVAL;
goto errout; goto errout;
} }
#endif #endif
bdbg("Executing %s\n", binp->filename); bdbg("Executing %s\n", bin->filename);
/* Allocate a TCB for the new task. */ /* Allocate a TCB for the new task. */
@ -154,7 +121,7 @@ int exec_module(FAR const struct binary_s *binp, int priority)
/* Allocate the stack for the new task */ /* Allocate the stack for the new task */
#ifndef CONFIG_CUSTOM_STACK #ifndef CONFIG_CUSTOM_STACK
stack = (FAR uint32_t*)malloc(binp->stacksize); stack = (FAR uint32_t*)malloc(bin->stacksize);
if (!tcb) if (!tcb)
{ {
err = ENOMEM; err = ENOMEM;
@ -163,13 +130,11 @@ int exec_module(FAR const struct binary_s *binp, int priority)
/* Initialize the task */ /* Initialize the task */
ret = task_init(tcb, binp->filename, priority, stack, ret = task_init(tcb, bin->filename, priority, stack, bin->stacksize, bin->entrypt, bin->argv);
binp->stacksize, binp->entrypt, binp->argv);
#else #else
/* Initialize the task */ /* Initialize the task */
ret = task_init(tcb, binp->filename, priority, stack, ret = task_init(tcb, bin->filename, priority, stack, bin->entrypt, bin->argv);
binp->entrypt, binp->argv);
#endif #endif
if (ret < 0) if (ret < 0)
{ {
@ -178,12 +143,10 @@ int exec_module(FAR const struct binary_s *binp, int priority)
goto errout_with_stack; goto errout_with_stack;
} }
/* Add the D-Space address as the PIC base address. By convention, this /* Add the DSpace address as the PIC base address */
* must be the first allocated address space.
*/
#ifdef CONFIG_PIC #ifdef CONFIG_PIC
tcb->dspace = binp->alloc[0]; tcb->dspace = bin->dspace;
/* Re-initialize the task's initial state to account for the new PIC base */ /* Re-initialize the task's initial state to account for the new PIC base */
@ -194,12 +157,6 @@ int exec_module(FAR const struct binary_s *binp, int priority)
pid = tcb->pid; pid = tcb->pid;
/* Execute all of the C++ static constructors */
#ifdef CONFIG_BINFMT_CONSTRUCTORS
exec_ctors(binp);
#endif
/* Then activate the task at the provided priority */ /* Then activate the task at the provided priority */
ret = task_activate(tcb); ret = task_activate(tcb);
@ -209,7 +166,6 @@ int exec_module(FAR const struct binary_s *binp, int priority)
bdbg("task_activate() failed: %d\n", err); bdbg("task_activate() failed: %d\n", err);
goto errout_with_stack; goto errout_with_stack;
} }
return (int)pid; return (int)pid;
errout_with_stack: errout_with_stack:

View File

@ -39,7 +39,7 @@
#include <nuttx/config.h> #include <nuttx/config.h>
#include <nuttx/binfmt/binfmt.h> #include <nuttx/binfmt.h>
#ifndef CONFIG_BINFMT_DISABLE #ifndef CONFIG_BINFMT_DISABLE

View File

@ -42,7 +42,7 @@
#include <nuttx/config.h> #include <nuttx/config.h>
#include <nuttx/binfmt/binfmt.h> #include <nuttx/binfmt.h>
/**************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions

View File

@ -43,7 +43,7 @@
#include <debug.h> #include <debug.h>
#include <errno.h> #include <errno.h>
#include <nuttx/binfmt/binfmt.h> #include <nuttx/binfmt.h>
#include "binfmt_internal.h" #include "binfmt_internal.h"

View File

@ -44,7 +44,7 @@
#include <debug.h> #include <debug.h>
#include <errno.h> #include <errno.h>
#include <nuttx/binfmt/binfmt.h> #include <nuttx/binfmt.h>
#include "binfmt_internal.h" #include "binfmt_internal.h"

View File

@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* binfmt/binfmt_loadmodule.c * binfmt/binfmt_loadmodule.c
* *
* Copyright (C) 2009, 2012 Gregory Nutt. All rights reserved. * Copyright (C) 2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -45,7 +45,7 @@
#include <debug.h> #include <debug.h>
#include <errno.h> #include <errno.h>
#include <nuttx/binfmt/binfmt.h> #include <nuttx/binfmt.h>
#include "binfmt_internal.h" #include "binfmt_internal.h"
@ -67,39 +67,6 @@
* Private Functions * Private Functions
****************************************************************************/ ****************************************************************************/
/****************************************************************************
* Name: exec_dtors
*
* Description:
* Execute C++ static constructors.
*
* Input Parameters:
* loadinfo - Load state information
*
* Returned Value:
* 0 (OK) is returned on success and a negated errno is returned on
* failure.
*
****************************************************************************/
#ifdef CONFIG_BINFMT_CONSTRUCTORS
static inline void exec_dtors(FAR const struct binary_s *binp)
{
binfmt_dtor_t *dtor = binp->dtors;
int i;
/* Execute each destructor */
for (i = 0; i < binp->ndtors; i++)
{
bvdbg("Calling dtor %d at %p\n", i, (FAR void *)dtor);
(*dtor)();
dtor++;
}
}
#endif
/**************************************************************************** /****************************************************************************
* Public Functions * Public Functions
****************************************************************************/ ****************************************************************************/
@ -109,12 +76,7 @@ static inline void exec_dtors(FAR const struct binary_s *binp)
* *
* Description: * Description:
* Unload a (non-executing) module from memory. If the module has * Unload a (non-executing) module from memory. If the module has
* been started (via exec_module) and has not exited, calling this will * been started (via exec_module), calling this will be fatal.
* be fatal.
*
* However, this function must be called after the module exist. How
* this is done is up to your logic. Perhaps you register it to be
* called by on_exit()?
* *
* Returned Value: * Returned Value:
* This is a NuttX internal function so it follows the convention that * This is a NuttX internal function so it follows the convention that
@ -123,40 +85,22 @@ static inline void exec_dtors(FAR const struct binary_s *binp)
* *
****************************************************************************/ ****************************************************************************/
int unload_module(FAR const struct binary_s *binp) int unload_module(FAR const struct binary_s *bin)
{ {
int i; if (bin)
if (binp)
{ {
if (bin->ispace)
/* Execute C++ desctructors */
#ifdef CONFIG_BINFMT_CONSTRUCTORS
exec_dtors(binp);
#endif
/* Unmap mapped address spaces */
if (binp->mapped)
{ {
bvdbg("Unmapping address space: %p\n", binp->mapped); bvdbg("Unmapping ISpace: %p\n", bin->ispace);
munmap(bin->ispace, bin->isize);
munmap(binp->mapped, binp->mapsize);
} }
/* Free allocated address spaces */ if (bin->dspace)
for (i = 0; i < BINFMT_NALLOC; i++)
{ {
if (binp->alloc[i]) bvdbg("Freeing DSpace: %p\n", bin->dspace);
{ free(bin->dspace);
bvdbg("Freeing alloc[%d]: %p\n", i, binp->alloc[i]);
free(binp->alloc[i]);
}
} }
} }
return OK; return OK;
} }

View File

@ -44,7 +44,7 @@
#include <debug.h> #include <debug.h>
#include <errno.h> #include <errno.h>
#include <nuttx/binfmt/binfmt.h> #include <nuttx/binfmt.h>
#include "binfmt_internal.h" #include "binfmt_internal.h"

View File

@ -2,8 +2,3 @@
# For a description of the syntax of this configuration file, # For a description of the syntax of this configuration file,
# see misc/tools/kconfig-language.txt. # see misc/tools/kconfig-language.txt.
# #
config NXFLAT_DUMPBUFFER
bool "Dump NXFLAT buffers"
default n
depends on DEBUG && DEBUG_VERBOSE

View File

@ -1,5 +1,5 @@
############################################################################ ############################################################################
# binfmt/libnxflat/Make.defs # nxflat/lib/Make.defs
# #
# Copyright (C) 2009 Gregory Nutt. All rights reserved. # Copyright (C) 2009 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org> # Author: Gregory Nutt <gnutt@nuttx.org>
@ -33,22 +33,7 @@
# #
############################################################################ ############################################################################
ifeq ($(CONFIG_NXFLAT),y) LIBNXFLAT_ASRCS =
LIBNXFLAT_CSRCS = libnxflat_init.c libnxflat_uninit.c libnxflat_load.c \
# NXFLAT application interfaces libnxflat_unload.c libnxflat_verify.c libnxflat_read.c \
libnxflat_bind.c
BINFMT_CSRCS += nxflat.c
# NXFLAT library
BINFMT_CSRCS += libnxflat_init.c libnxflat_uninit.c libnxflat_load.c \
libnxflat_unload.c libnxflat_verify.c libnxflat_read.c \
libnxflat_bind.c
# Hook the libnxflat subdirectory into the build
VPATH += libnxflat
SUBDIRS += libnxflat
DEPPATH += --dep-path libnxflat
endif

View File

@ -47,8 +47,8 @@
#include <debug.h> #include <debug.h>
#include <arpa/inet.h> #include <arpa/inet.h>
#include <nuttx/binfmt/nxflat.h> #include <nuttx/nxflat.h>
#include <nuttx/binfmt/symtab.h> #include <nuttx/symtab.h>
/**************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
@ -263,6 +263,7 @@ static inline int nxflat_gotrelocs(FAR struct nxflat_loadinfo_s *loadinfo)
result = OK; result = OK;
switch (NXFLAT_RELOC_TYPE(reloc.r_info)) switch (NXFLAT_RELOC_TYPE(reloc.r_info))
{ {
/* NXFLAT_RELOC_TYPE_REL32I Meaning: Object file contains a 32-bit offset /* NXFLAT_RELOC_TYPE_REL32I Meaning: Object file contains a 32-bit offset
* into I-Space at the offset. * into I-Space at the offset.
* Fixup: Add mapped I-Space address to the offset. * Fixup: Add mapped I-Space address to the offset.
@ -328,7 +329,6 @@ static inline int nxflat_gotrelocs(FAR struct nxflat_loadinfo_s *loadinfo)
nxflat_dumpbuffer("GOT", (FAR const uint8_t*)relocs, nrelocs * sizeof(struct nxflat_reloc_s)); nxflat_dumpbuffer("GOT", (FAR const uint8_t*)relocs, nrelocs * sizeof(struct nxflat_reloc_s));
} }
#endif #endif
return ret; return ret;
} }
@ -388,7 +388,7 @@ static inline int nxflat_bindimports(FAR struct nxflat_loadinfo_s *loadinfo,
offset < loadinfo->isize + loadinfo->dsize); offset < loadinfo->isize + loadinfo->dsize);
imports = (struct nxflat_import_s*) imports = (struct nxflat_import_s*)
(offset - loadinfo->isize + loadinfo->dspace->region); (offset - loadinfo->isize + loadinfo->dspace->region);
/* Now, traverse the list of imported symbols and attempt to bind /* Now, traverse the list of imported symbols and attempt to bind
* each symbol to the value exported by from the exported symbol * each symbol to the value exported by from the exported symbol
@ -396,41 +396,41 @@ static inline int nxflat_bindimports(FAR struct nxflat_loadinfo_s *loadinfo,
*/ */
for (i = 0; i < nimports; i++) for (i = 0; i < nimports; i++)
{ {
bvdbg("Import[%d] (%08p) offset: %08x func: %08x\n", bvdbg("Import[%d] (%08p) offset: %08x func: %08x\n",
i, &imports[i], imports[i].i_funcname, imports[i].i_funcaddress); i, &imports[i], imports[i].i_funcname, imports[i].i_funcaddress);
/* Get a pointer to the imported symbol name. The name itself /* Get a pointer to the imported symbol name. The name itself
* lies in the TEXT segment. But the reference to the name * lies in the TEXT segment. But the reference to the name
* lies in DATA segment. Therefore, the name reference should * lies in DATA segment. Therefore, the name reference should
* have been relocated when the module was loaded. * have been relocated when the module was loaded.
*/ */
offset = imports[i].i_funcname; offset = imports[i].i_funcname;
DEBUGASSERT(offset < loadinfo->isize); DEBUGASSERT(offset < loadinfo->isize);
symname = (char*)(offset + loadinfo->ispace + sizeof(struct nxflat_hdr_s)); symname = (char*)(offset + loadinfo->ispace + sizeof(struct nxflat_hdr_s));
/* Find the exported symbol value for this this symbol name. */ /* Find the exported symbol value for this this symbol name. */
#ifdef CONFIG_SYMTAB_ORDEREDBYNAME #ifdef CONFIG_SYMTAB_ORDEREDBYNAME
symbol = symtab_findorderedbyname(exports, symname, nexports); symbol = symtab_findorderedbyname(exports, symname, nexports);
#else #else
symbol = symtab_findbyname(exports, symname, nexports); symbol = symtab_findbyname(exports, symname, nexports);
#endif #endif
if (!symbol) if (!symbol)
{ {
bdbg("Exported symbol \"%s\" not found\n", symname); bdbg("Exported symbol \"%s\" not found\n", symname);
return -ENOENT; return -ENOENT;
} }
/* And put this into the module's import structure. */ /* And put this into the module's import structure. */
imports[i].i_funcaddress = (uint32_t)symbol->sym_value; imports[i].i_funcaddress = (uint32_t)symbol->sym_value;
bvdbg("Bound import[%d] (%08p) to export '%s' (%08x)\n", bvdbg("Bound import[%d] (%08p) to export '%s' (%08x)\n",
i, &imports[i], symname, imports[i].i_funcaddress); i, &imports[i], symname, imports[i].i_funcaddress);
} }
} }
/* Dump the relocation import table */ /* Dump the relocation import table */
@ -441,7 +441,6 @@ static inline int nxflat_bindimports(FAR struct nxflat_loadinfo_s *loadinfo,
nxflat_dumpbuffer("Imports", (FAR const uint8_t*)imports, nimports * sizeof(struct nxflat_import_s)); nxflat_dumpbuffer("Imports", (FAR const uint8_t*)imports, nimports * sizeof(struct nxflat_import_s));
} }
#endif #endif
return OK; return OK;
} }
@ -485,10 +484,9 @@ int nxflat_bind(FAR struct nxflat_loadinfo_s *loadinfo,
*/ */
memset((void*)(loadinfo->dspace->region + loadinfo->datasize), memset((void*)(loadinfo->dspace->region + loadinfo->datasize),
0, loadinfo->bsssize); 0, loadinfo->bsssize);
} }
} }
return ret; return ret;
} }

View File

@ -48,7 +48,7 @@
#include <errno.h> #include <errno.h>
#include <arpa/inet.h> #include <arpa/inet.h>
#include <nuttx/binfmt/nxflat.h> #include <nuttx/nxflat.h>
/**************************************************************************** /****************************************************************************
* Pre-Processor Definitions * Pre-Processor Definitions
@ -112,9 +112,8 @@ int nxflat_init(const char *filename, struct nxflat_loadinfo_s *loadinfo)
loadinfo->filfd = open(filename, O_RDONLY); loadinfo->filfd = open(filename, O_RDONLY);
if (loadinfo->filfd < 0) if (loadinfo->filfd < 0)
{ {
int errval = errno; bdbg("Failed to open NXFLAT binary %s: %d\n", filename, ret);
bdbg("Failed to open NXFLAT binary %s: %d\n", filename, errval); return -errno;
return -errval;
} }
/* Read the NXFLAT header from offset 0 */ /* Read the NXFLAT header from offset 0 */

View File

@ -48,7 +48,7 @@
#include <errno.h> #include <errno.h>
#include <arpa/inet.h> #include <arpa/inet.h>
#include <nuttx/binfmt/nxflat.h> #include <nuttx/nxflat.h>
/**************************************************************************** /****************************************************************************
* Pre-Processor Definitions * Pre-Processor Definitions
@ -62,6 +62,24 @@
* Private Constant Data * Private Constant Data
****************************************************************************/ ****************************************************************************/
#if defined(CONFIG_DEBUG_VERBOSE) && defined(CONFIG_DEBUG_BINFMT)
static const char g_relocrel32i[] = "RELOC_REL32I";
static const char g_relocrel32d[] = "RELOC_REL32D";
static const char g_relocabs32[] = "RELOC_AB32";
static const char g_undefined[] = "UNDEFINED";
static const char *g_reloctype[] =
{
g_relocrel32i,
g_relocrel32d,
g_relocabs32,
g_undefined
};
# define RELONAME(rl) g_reloctype[NXFLAT_RELOC_TYPE(rl)]
#else
# define RELONAME(rl) "(no name)"
#endif
/**************************************************************************** /****************************************************************************
* Private Functions * Private Functions
****************************************************************************/ ****************************************************************************/

View File

@ -48,7 +48,7 @@
#include <errno.h> #include <errno.h>
#include <arpa/inet.h> #include <arpa/inet.h>
#include <nuttx/binfmt/nxflat.h> #include <nuttx/nxflat.h>
/**************************************************************************** /****************************************************************************
* Pre-Processor Definitions * Pre-Processor Definitions
@ -129,9 +129,8 @@ int nxflat_read(struct nxflat_loadinfo_s *loadinfo, char *buffer, int readsize,
rpos = lseek(loadinfo->filfd, offset, SEEK_SET); rpos = lseek(loadinfo->filfd, offset, SEEK_SET);
if (rpos != offset) if (rpos != offset)
{ {
int errval = errno; bdbg("Failed to seek to position %d: %d\n", offset, errno);
bdbg("Failed to seek to position %d: %d\n", offset, errval); return -errno;
return -errval;
} }
/* Read the file data at offset into the user buffer */ /* Read the file data at offset into the user buffer */
@ -139,11 +138,10 @@ int nxflat_read(struct nxflat_loadinfo_s *loadinfo, char *buffer, int readsize,
nbytes = read(loadinfo->filfd, bufptr, bytesleft); nbytes = read(loadinfo->filfd, bufptr, bytesleft);
if (nbytes < 0) if (nbytes < 0)
{ {
int errval = errno; if (errno != EINTR)
if (errval != EINTR)
{ {
bdbg("Read of .data failed: %d\n", errval); bdbg("Read of .data failed: %d\n", errno);
return -errval; return -errno;
} }
} }
else if (nbytes == 0) else if (nbytes == 0)

View File

@ -42,8 +42,7 @@
#include <unistd.h> #include <unistd.h>
#include <debug.h> #include <debug.h>
#include <errno.h> #include <errno.h>
#include <nuttx/nxflat.h>
#include <nuttx/binfmt/nxflat.h>
/**************************************************************************** /****************************************************************************
* Pre-Processor Definitions * Pre-Processor Definitions
@ -57,6 +56,10 @@
* Private Functions * Private Functions
****************************************************************************/ ****************************************************************************/
/****************************************************************************
* Name: nxflat_swap32
****************************************************************************/
/**************************************************************************** /****************************************************************************
* Public Functions * Public Functions
****************************************************************************/ ****************************************************************************/

View File

@ -43,7 +43,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <debug.h> #include <debug.h>
#include <nuttx/binfmt/nxflat.h> #include <nuttx/nxflat.h>
/**************************************************************************** /****************************************************************************
* Pre-Processor Definitions * Pre-Processor Definitions

View File

@ -42,9 +42,8 @@
#include <string.h> #include <string.h>
#include <debug.h> #include <debug.h>
#include <errno.h> #include <errno.h>
#include <arpa/inet.h> #include <arpa/inet.h>
#include <nuttx/binfmt/nxflat.h> #include <nuttx/nxflat.h>
/**************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
@ -92,10 +91,10 @@ int nxflat_verifyheader(const struct nxflat_hdr_s *header)
if (strncmp(header->h_magic, NXFLAT_MAGIC, 4) != 0) if (strncmp(header->h_magic, NXFLAT_MAGIC, 4) != 0)
{ {
bdbg("Unrecognized magic=\"%c%c%c%c\"\n", bdbg("Unrecognized magic=\"%c%c%c%c\"\n",
header->h_magic[0], header->h_magic[1], header->h_magic[0], header->h_magic[1],
header->h_magic[2], header->h_magic[3]); header->h_magic[2], header->h_magic[3]);
return -ENOEXEC; return -ENOEXEC;
} }
return OK; return OK;
} }

View File

@ -47,8 +47,8 @@
#include <errno.h> #include <errno.h>
#include <arpa/inet.h> #include <arpa/inet.h>
#include <nuttx/binfmt/binfmt.h> #include <nuttx/binfmt.h>
#include <nuttx/binfmt/nxflat.h> #include <nuttx/nxflat.h>
#ifdef CONFIG_NXFLAT #ifdef CONFIG_NXFLAT
@ -158,7 +158,7 @@ static int nxflat_loadbinary(struct binary_s *binp)
nxflat_dumploadinfo(&loadinfo); nxflat_dumploadinfo(&loadinfo);
if (ret != 0) if (ret != 0)
{ {
bdbg("Failed to initialize for load of NXFLAT program: %d\n", ret); bdbg("Failed to initialize for load of NXFLT program: %d\n", ret);
goto errout; goto errout;
} }
@ -168,7 +168,7 @@ static int nxflat_loadbinary(struct binary_s *binp)
nxflat_dumploadinfo(&loadinfo); nxflat_dumploadinfo(&loadinfo);
if (ret != 0) if (ret != 0)
{ {
bdbg("Failed to load NXFLAT program binary: %d\n", ret); bdbg("Failed to load NXFLT program binary: %d\n", ret);
goto errout_with_init; goto errout_with_init;
} }
@ -181,18 +181,16 @@ static int nxflat_loadbinary(struct binary_s *binp)
goto errout_with_load; goto errout_with_load;
} }
/* Return the load information. By convention, D-space address /* Return the load information */
* space is stored as the first allocated memory.
*/
binp->entrypt = (main_t)(loadinfo.ispace + loadinfo.entryoffs); binp->entrypt = (main_t)(loadinfo.ispace + loadinfo.entryoffs);
binp->mapped = (void*)loadinfo.ispace; binp->ispace = (void*)loadinfo.ispace;
binp->alloc[0] = (void*)loadinfo.dspace; binp->dspace = (void*)loadinfo.dspace;
binp->mapsize = loadinfo.isize; binp->isize = loadinfo.isize;
binp->stacksize = loadinfo.stacksize; binp->stacksize = loadinfo.stacksize;
nxflat_dumpbuffer("Entry code", (FAR const uint8_t*)binp->entrypt, nxflat_dumpbuffer("Entry code", (FAR const uint8_t*)binp->entrypt,
MIN(loadinfo.isize - loadinfo.entryoffs, 512)); MIN(binp->isize - loadinfo.entryoffs,512));
nxflat_uninit(&loadinfo); nxflat_uninit(&loadinfo);
return OK; return OK;

View File

@ -44,7 +44,7 @@
#include <assert.h> #include <assert.h>
#include <errno.h> #include <errno.h>
#include <nuttx/binfmt/symtab.h> #include <nuttx/symtab.h>
/**************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions

View File

@ -44,7 +44,7 @@
#include <assert.h> #include <assert.h>
#include <errno.h> #include <errno.h>
#include <nuttx/binfmt/symtab.h> #include <nuttx/symtab.h>
/**************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions

View File

@ -44,7 +44,7 @@
#include <assert.h> #include <assert.h>
#include <errno.h> #include <errno.h>
#include <nuttx/binfmt/symtab.h> #include <nuttx/symtab.h>
/**************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions

View File

@ -44,7 +44,7 @@
#include <assert.h> #include <assert.h>
#include <errno.h> #include <errno.h>
#include <nuttx/binfmt/symtab.h> #include <nuttx/symtab.h>
/**************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions

View File

@ -103,23 +103,14 @@ Make.defs -- This makefile fragment provides architecture and
Tools: CC, LD, AR, NM, OBJCOPY, OBJDUMP Tools: CC, LD, AR, NM, OBJCOPY, OBJDUMP
Tool options: CFLAGS, LDFLAGS Tool options: CFLAGS, LDFLAGS
COMPILE, ASSEMBLE, ARCHIVE, CLEAN, and MKDEP macros
When this makefile fragment runs, it will be passed TOPDIR which When this makefile fragment runs, it will be passed TOPDIR which
is the path to the root directory of the build. This makefile is the path to the root directory of the build. This makefile
fragment should include: fragment may include ${TOPDIR}/.config to perform configuration
specific settings. For example, the CFLAGS will most likely be
$(TOPDIR)/.config : Nuttx configuration
$(TOPDIR)/tools/Config.mk : Common definitions
Definitions in the Make.defs file probably depend on some of the
settings in the .config file. For example, the CFLAGS will most likely be
different if CONFIG_DEBUG=y. different if CONFIG_DEBUG=y.
The included tools/Config.mk file contains additional definitions that may
be overriden in the architecture-specific Make.defs file as necessary:
COMPILE, ASSEMBLE, ARCHIVE, CLEAN, and MKDEP macros
defconfig -- This is a configuration file similar to the Linux defconfig -- This is a configuration file similar to the Linux
configuration file. In contains variable/value pairs like: configuration file. In contains variable/value pairs like:
@ -180,6 +171,7 @@ defconfig -- This is a configuration file similar to the Linux
CONFIG_RAW_BINARY - make a raw binary format file used with many CONFIG_RAW_BINARY - make a raw binary format file used with many
different loaders using the GNU objcopy program. This option different loaders using the GNU objcopy program. This option
should not be selected if you are not using the GNU toolchain. should not be selected if you are not using the GNU toolchain.
CONFIG_HAVE_LIBM - toolchain supports libm.a
CONFIG_HAVE_CXX - toolchain supports C++ and CXX, CXXFLAGS, and CONFIG_HAVE_CXX - toolchain supports C++ and CXX, CXXFLAGS, and
COMPILEXX have been defined in the configurations Make.defs COMPILEXX have been defined in the configurations Make.defs
file. file.
@ -380,6 +372,9 @@ defconfig -- This is a configuration file similar to the Linux
CONFIG_SDCLONE_DISABLE. Disable cloning of all socket CONFIG_SDCLONE_DISABLE. Disable cloning of all socket
desciptors by task_create() when a new task is started. If desciptors by task_create() when a new task is started. If
set, all sockets will appear to be closed in the new task. set, all sockets will appear to be closed in the new task.
CONFIG_NXFLAT. Enable support for the NXFLAT binary format.
This format will support execution of NuttX binaries located
in a ROMFS filesystem (see examples/nxflat).
CONFIG_SCHED_WORKQUEUE. Create a dedicated "worker" thread to CONFIG_SCHED_WORKQUEUE. Create a dedicated "worker" thread to
handle delayed processing from interrupt handlers. This feature handle delayed processing from interrupt handlers. This feature
is required for some drivers but, if there are not complaints, is required for some drivers but, if there are not complaints,
@ -423,39 +418,6 @@ defconfig -- This is a configuration file similar to the Linux
where 'app' is the application name. If not defined, CONFIG_USER_ENTRYPOINT where 'app' is the application name. If not defined, CONFIG_USER_ENTRYPOINT
defaults to user_start. defaults to user_start.
Binary Loaders:
CONFIG_BINFMT_DISABLE - By default, support for loadable binary formats
is built.
This logic may be suppressed be defining this setting.
CONFIG_BINFMT_CONSTRUCTORS - Build in support for C++ constructors in
loaded modules.
CONFIG_SYMTAB_ORDEREDBYNAME - Symbol tables are order by name (rather
than value).
CONFIG_NXFLAT. Enable support for the NXFLAT binary format. This format
will support execution of NuttX binaries located in a ROMFS filesystem
(see apps/examples/nxflat).
CONFIG_ELF - Enable support for the ELF binary format. This format will
support execution of ELF binaries copied from a file system and
relocated into RAM (see apps/examples/elf).
If CONFIG_ELF is selected, then these additional options are available:
CONFIG_ELF_ALIGN_LOG2 - Align all sections to this Log2 value: 0->1,
1->2, 2->4, etc.
CONFIG_ELF_STACKSIZE - This is the default stack size that will will
be used when starting ELF binaries.
CONFIG_ELF_BUFFERSIZE - This is an I/O buffer that is used to access
the ELF file. Variable length items will need to be read (such as
symbol names). This is really just this initial size of the buffer;
it will be reallocated as necessary to hold large symbol names).
Default: 128
CONFIG_ELF_BUFFERINCR - This is an I/O buffer that is used to access
the ELF file. Variable length items will need to be read (such as
symbol names). This value specifies the size increment to use each
time the buffer is reallocated. Default: 32
CONFIG_ELF_DUMPBUFFER - Dump various ELF buffers for debug purposes.
This option requires CONFIG_DEBUG and CONFIG_DEBUG_VERBOSE.
System Logging: System Logging:
CONFIG_SYSLOG enables general system logging support. CONFIG_SYSLOG enables general system logging support.
CONFIG_SYSLOG_DEVPATH - The full path to the system logging device. Default CONFIG_SYSLOG_DEVPATH - The full path to the system logging device. Default
@ -659,37 +621,6 @@ defconfig -- This is a configuration file similar to the Linux
CONFIG_ARCH_STRNCPY, CONFIG_ARCH_STRLEN, CONFIG_ARCH_STRNLEN CONFIG_ARCH_STRNCPY, CONFIG_ARCH_STRLEN, CONFIG_ARCH_STRNLEN
CONFIG_ARCH_BZERO CONFIG_ARCH_BZERO
If CONFIG_ARCH_MEMCPY is not selected, then you make also select Daniel
Vik's optimized implementation of memcpy():
CONFIG_MEMCPY_VIK - Select this option to use the optimized memcpy()
function by Daniel Vik. Select this option for improved performance
at the expense of increased size. See licensing information in the
top-level COPYING file. Default: n
And if CONFIG_MEMCPY_VIK is selected, the following tuning options are available:
CONFIG_MEMCPY_PRE_INC_PTRS - Use pre-increment of pointers. Default is
post increment of pointers.
CONFIG_MEMCPY_INDEXED_COPY - Copying data using array indexing. Using
this option, disables the CONFIG_MEMCPY_PRE_INC_PTRS option.
CONFIG_MEMCPY_64BIT - Compiles memcpy for architectures that suppport
64-bit operations efficiently.
If CONFIG_ARCH_MEMSET is not selected, then the following option is
also available:
CONFIG_MEMSET_OPTSPEED - Select this option to use a version of memcpy()
optimized for speed. Default: memcpy() is optimized for size.
And if CONFIG_MEMSET_OPTSPEED is selected, the following tuning option is
available:
CONFIG_MEMSET_64BIT - Compiles memset() for architectures that suppport
64-bit operations efficiently.
The architecture may provide custom versions of certain standard header The architecture may provide custom versions of certain standard header
files: files:
@ -732,15 +663,6 @@ defconfig -- This is a configuration file similar to the Linux
don't select CONFIG_ARCH_MATH_H, the redirecting math.h header file will don't select CONFIG_ARCH_MATH_H, the redirecting math.h header file will
stay out-of-the-way in include/nuttx/. stay out-of-the-way in include/nuttx/.
CONFIG_ARCH_FLOAT_H
If you enable the generic, built-in math library, then that math library
will expect your toolchain to provide the standard float.h header file.
The float.h header file defines the properties of your floating point
implementation. It would always be best to use your toolchain's float.h
header file but if none is avaiable, a default float.h header file will
provided if this option is selected. However, there is no assurance that
the settings in this float.h are actually correct for your platform!
CONFIG_ARCH_STDARG_H - There is also a redirecting version of stdarg.h in CONFIG_ARCH_STDARG_H - There is also a redirecting version of stdarg.h in
the source tree as well. It also resides out-of-the-way at include/nuttx/stdarg.h. the source tree as well. It also resides out-of-the-way at include/nuttx/stdarg.h.
This is because you should normally use your toolchain's stdarg.h file. But This is because you should normally use your toolchain's stdarg.h file. But
@ -1156,10 +1078,6 @@ defconfig -- This is a configuration file similar to the Linux
CONFIG_NET_DHCP_LIGHT - Reduces size of DHCP CONFIG_NET_DHCP_LIGHT - Reduces size of DHCP
CONFIG_NET_RESOLV_ENTRIES - Number of resolver entries CONFIG_NET_RESOLV_ENTRIES - Number of resolver entries
CONFIG_NET_RESOLV_MAXRESPONSE - This setting determines the maximum
size of response message that can be received by the DNS resolver.
The default is 96 but may need to be larger on enterprise networks
(perhaps 176).
THTTPD THTTPD
@ -1609,11 +1527,6 @@ configs/c5471evm
NuttX runs on the ARM core and is built with a GNU arm-nuttx-elf toolchain*. NuttX runs on the ARM core and is built with a GNU arm-nuttx-elf toolchain*.
This port is complete and verified. This port is complete and verified.
configs/cloudctrl
Darcy's CloudController board. This is a small network relay development
board. Based on the Shenzhou IV development board design. It is based on
the STM32F107VC MCU.
configs/compal_e88 and compal_e99 configs/compal_e88 and compal_e99
These directories contain the board support for compal e88 and e99 phones. These directories contain the board support for compal e88 and e99 phones.
These ports are based on patches contributed by Denis Carikli for both the These ports are based on patches contributed by Denis Carikli for both the
@ -1844,14 +1757,8 @@ configs/stm3240g-eval
microcontroller (ARM Cortex-M4 with FPU). This port uses a GNU Cortex-M4 microcontroller (ARM Cortex-M4 with FPU). This port uses a GNU Cortex-M4
toolchain (such as CodeSourcery). toolchain (such as CodeSourcery).
configs/stm32f100rc_generic
STMicro STM32F100RC generic board based on STM32F100RC high-density value line
chip. This "generic" configuration is not very usable out-of-box, but can be
used as a starting point to creating new configs with similar STM32
high-density value line chips.
configs/stm32f4discovery configs/stm32f4discovery
STMicro STM32F4-Discovery board based on the STMIcro STM32F407VGT6 MCU. STMicro STM32F4-Discovery board boased on the STMIcro STM32F407VGT6 MCU.
configs/sure-pic32mx configs/sure-pic32mx
The "Advanced USB Storage Demo Board," Model DB-DP11215, from Sure The "Advanced USB Storage Demo Board," Model DB-DP11215, from Sure

View File

@ -39,8 +39,12 @@
# Make.defs in the per-config directories. # Make.defs in the per-config directories.
# #
include ${TOPDIR}/tools/Config.mk #
include ${TOPDIR}/arch/arm/src/armv7-m/Toolchain.defs # We only support building with the ARM bare-metal toolchain from
# https://launchpad.net/gcc-arm-embedded on Windows, Linux or Mac OS.
#
CROSSDEV = arm-none-eabi-
CC = $(CROSSDEV)gcc CC = $(CROSSDEV)gcc
CXX = $(CROSSDEV)g++ CXX = $(CROSSDEV)g++

View File

@ -77,6 +77,7 @@ CONFIGURED_APPS += sensors
CONFIGURED_APPS += ardrone_interface CONFIGURED_APPS += ardrone_interface
CONFIGURED_APPS += multirotor_att_control CONFIGURED_APPS += multirotor_att_control
CONFIGURED_APPS += multirotor_pos_control CONFIGURED_APPS += multirotor_pos_control
#CONFIGURED_APPS += fixedwing_control
CONFIGURED_APPS += fixedwing_att_control CONFIGURED_APPS += fixedwing_att_control
CONFIGURED_APPS += fixedwing_pos_control CONFIGURED_APPS += fixedwing_pos_control
CONFIGURED_APPS += position_estimator CONFIGURED_APPS += position_estimator

View File

@ -93,9 +93,6 @@ CONFIG_ARCH_MATH_H=y
CONFIG_ARMV7M_CMNVECTOR=y CONFIG_ARMV7M_CMNVECTOR=y
# default to a generic arm-none-eabi toolchain
CONFIG_ARMV7M_TOOLCHAIN_GNU_EABI=y
# #
# JTAG Enable settings (by default JTAG-DP and SW-DP are enabled): # JTAG Enable settings (by default JTAG-DP and SW-DP are enabled):
# #
@ -770,8 +767,6 @@ CONFIG_FS_ROMFS=y
# CONFIG_MMCSD_SPICLOCK - Maximum SPI clock to drive MMC/SD card. # CONFIG_MMCSD_SPICLOCK - Maximum SPI clock to drive MMC/SD card.
# Default is 20MHz, current setting 24 MHz # Default is 20MHz, current setting 24 MHz
# #
CONFIG_MMCSD=y
CONFIG_MMCSD_SPI=y
CONFIG_MMCSD_NSLOTS=1 CONFIG_MMCSD_NSLOTS=1
CONFIG_MMCSD_READONLY=n CONFIG_MMCSD_READONLY=n
CONFIG_MMCSD_SPICLOCK=24000000 CONFIG_MMCSD_SPICLOCK=24000000

View File

@ -39,8 +39,12 @@
# Make.defs in the per-config directories. # Make.defs in the per-config directories.
# #
include ${TOPDIR}/tools/Config.mk #
include ${TOPDIR}/arch/arm/src/armv7-m/Toolchain.defs # We only support building with the ARM bare-metal toolchain from
# https://launchpad.net/gcc-arm-embedded on Windows, Linux or Mac OS.
#
CROSSDEV = arm-none-eabi-
CC = $(CROSSDEV)gcc CC = $(CROSSDEV)gcc
CXX = $(CROSSDEV)g++ CXX = $(CROSSDEV)g++

View File

@ -89,9 +89,6 @@ CONFIG_ARCH_CALIBRATION=n
CONFIG_ARCH_DMA=n CONFIG_ARCH_DMA=n
CONFIG_ARMV7M_CMNVECTOR=y CONFIG_ARMV7M_CMNVECTOR=y
# default to a generic arm-none-eabi toolchain
CONFIG_ARMV7M_TOOLCHAIN_GNU_EABI=y
# #
# JTAG Enable settings (by default JTAG-DP and SW-DP are disabled): # JTAG Enable settings (by default JTAG-DP and SW-DP are disabled):
# #

View File

@ -0,0 +1,3 @@
include ${TOPDIR}/.config
include $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/common/Make.defs

View File

@ -0,0 +1,43 @@
############################################################################
# configs/stm3210e-eval/nsh/appconfig
#
# Copyright (C) 2011-2012 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.
#
############################################################################
# Path to example in apps/examples containing the user_start entry point
CONFIGURED_APPS += examples/nsh
CONFIGURED_APPS += system/readline
CONFIGURED_APPS += nshlib
CONFIGURED_APPS += reboot

565
nuttx/configs/px4io/nsh/defconfig Executable file
View File

@ -0,0 +1,565 @@
############################################################################
# configs/px4io/nsh/defconfig
#
# Copyright (C) 2009-2012 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.
#
############################################################################
#
# architecture selection
#
# CONFIG_ARCH - identifies the arch subdirectory and, hence, the
# processor architecture.
# CONFIG_ARCH_family - for use in C code. This identifies the
# particular chip family that the architecture is implemented
# in.
# CONFIG_ARCH_architecture - for use in C code. This identifies the
# specific architecture within the chip familyl.
# CONFIG_ARCH_CHIP - Identifies the arch/*/chip subdirectory
# CONFIG_ARCH_CHIP_name - For use in C code
# CONFIG_ARCH_BOARD - identifies the configs subdirectory and, hence,
# the board that supports the particular chip or SoC.
# CONFIG_ARCH_BOARD_name - for use in C code
# CONFIG_ENDIAN_BIG - define if big endian (default is little endian)
# CONFIG_BOARD_LOOPSPERMSEC - for delay loops
# CONFIG_DRAM_SIZE - Describes the installed DRAM.
# CONFIG_DRAM_START - The start address of DRAM (physical)
# CONFIG_DRAM_END - Last address+1 of installed RAM
# CONFIG_ARCH_IRQPRIO - The ST32F100CB supports interrupt prioritization
# CONFIG_ARCH_INTERRUPTSTACK - This architecture supports an interrupt
# stack. If defined, this symbol is the size of the interrupt
# stack in bytes. If not defined, the user task stacks will be
# used during interrupt handling.
# CONFIG_ARCH_STACKDUMP - Do stack dumps after assertions
# CONFIG_ARCH_BOOTLOADER - Set if you are using a bootloader.
# CONFIG_ARCH_LEDS - Use LEDs to show state. Unique to board architecture.
# CONFIG_ARCH_BUTTONS - Enable support for buttons. Unique to board architecture.
# CONFIG_ARCH_CALIBRATION - Enables some build in instrumentation that
# cause a 100 second delay during boot-up. This 100 second delay
# serves no purpose other than it allows you to calibrate
# CONFIG_BOARD_LOOPSPERMSEC. You simply use a stop watch to measure
# the 100 second delay then adjust CONFIG_BOARD_LOOPSPERMSEC until
# the delay actually is 100 seconds.
# CONFIG_ARCH_DMA - Support DMA initialization
#
CONFIG_ARCH=arm
CONFIG_ARCH_ARM=y
CONFIG_ARCH_CORTEXM3=y
CONFIG_ARCH_CHIP=stm32
CONFIG_ARCH_CHIP_STM32F100C8=y
CONFIG_ARCH_BOARD=px4io
CONFIG_ARCH_BOARD_PX4IO=y
CONFIG_BOARD_LOOPSPERMSEC=24000
CONFIG_DRAM_SIZE=0x00002000
CONFIG_DRAM_START=0x20000000
CONFIG_DRAM_END=(CONFIG_DRAM_START+CONFIG_DRAM_SIZE)
CONFIG_ARCH_IRQPRIO=y
CONFIG_ARCH_INTERRUPTSTACK=n
CONFIG_ARCH_STACKDUMP=y
CONFIG_ARCH_BOOTLOADER=n
CONFIG_ARCH_LEDS=y
CONFIG_ARCH_BUTTONS=y
CONFIG_ARCH_CALIBRATION=n
CONFIG_ARCH_DMA=n
CONFIG_ARMV7M_CMNVECTOR=y
#
# JTAG Enable settings (by default JTAG-DP and SW-DP are disabled):
#
# CONFIG_STM32_DFU - Use the DFU bootloader, not JTAG
#
# JTAG Enable options:
#
# CONFIG_STM32_JTAG_FULL_ENABLE - Enables full SWJ (JTAG-DP + SW-DP)
# CONFIG_STM32_JTAG_NOJNTRST_ENABLE - Enables full SWJ (JTAG-DP + SW-DP)
# but without JNTRST.
# CONFIG_STM32_JTAG_SW_ENABLE - Set JTAG-DP disabled and SW-DP enabled
#
CONFIG_STM32_DFU=n
CONFIG_STM32_JTAG_FULL_ENABLE=y
CONFIG_STM32_JTAG_NOJNTRST_ENABLE=n
CONFIG_STM32_JTAG_SW_ENABLE=n
#
# Individual subsystems can be enabled:
# AHB:
CONFIG_STM32_DMA1=n
CONFIG_STM32_DMA2=n
CONFIG_STM32_CRC=n
# APB1:
# Timers 2,3 and 4 are owned by the PWM driver
CONFIG_STM32_TIM2=n
CONFIG_STM32_TIM3=n
CONFIG_STM32_TIM4=n
CONFIG_STM32_TIM5=n
CONFIG_STM32_TIM6=n
CONFIG_STM32_TIM7=n
CONFIG_STM32_WWDG=n
CONFIG_STM32_SPI2=n
CONFIG_STM32_USART2=y
CONFIG_STM32_USART3=y
CONFIG_STM32_I2C1=y
CONFIG_STM32_I2C2=n
CONFIG_STM32_BKP=n
CONFIG_STM32_PWR=n
CONFIG_STM32_DAC=n
# APB2:
CONFIG_STM32_ADC1=y
CONFIG_STM32_ADC2=n
# TIM1 is owned by the HRT
CONFIG_STM32_TIM1=n
CONFIG_STM32_SPI1=n
CONFIG_STM32_TIM8=n
CONFIG_STM32_USART1=y
CONFIG_STM32_ADC3=n
#
# Timer and I2C devices may need to the following to force power to be applied:
#
#CONFIG_STM32_FORCEPOWER=y
#
# STM32F100 specific serial device driver settings
#
# CONFIG_USARTn_SERIAL_CONSOLE - selects the USARTn for the
# console and ttys0 (default is the USART1).
# CONFIG_USARTn_RXBUFSIZE - Characters are buffered as received.
# This specific the size of the receive buffer
# CONFIG_USARTn_TXBUFSIZE - Characters are buffered before
# being sent. This specific the size of the transmit buffer
# CONFIG_USARTn_BAUD - The configure BAUD of the UART. Must be
# CONFIG_USARTn_BITS - The number of bits. Must be either 7 or 8.
# CONFIG_USARTn_PARTIY - 0=no parity, 1=odd parity, 2=even parity
# CONFIG_USARTn_2STOP - Two stop bits
#
CONFIG_USART1_SERIAL_CONSOLE=y
CONFIG_USART2_SERIAL_CONSOLE=n
CONFIG_USART3_SERIAL_CONSOLE=n
CONFIG_USART1_TXBUFSIZE=64
CONFIG_USART2_TXBUFSIZE=64
CONFIG_USART3_TXBUFSIZE=64
CONFIG_USART1_RXBUFSIZE=64
CONFIG_USART2_RXBUFSIZE=64
CONFIG_USART3_RXBUFSIZE=64
CONFIG_USART1_BAUD=57600
CONFIG_USART2_BAUD=115200
CONFIG_USART3_BAUD=115200
CONFIG_USART1_BITS=8
CONFIG_USART2_BITS=8
CONFIG_USART3_BITS=8
CONFIG_USART1_PARITY=0
CONFIG_USART2_PARITY=0
CONFIG_USART3_PARITY=0
CONFIG_USART1_2STOP=0
CONFIG_USART2_2STOP=0
CONFIG_USART3_2STOP=0
#
# PX4IO specific driver settings
#
# CONFIG_HRT_TIMER
# Enables the high-resolution timer. The board definition must
# set HRT_TIMER and HRT_TIMER_CHANNEL to the timer and capture/
# compare channels to be used.
# CONFIG_HRT_PPM
# Enables R/C PPM input using the HRT. The board definition must
# set HRT_PPM_CHANNEL to the timer capture/compare channel to be
# used, and define GPIO_PPM_IN to configure the appropriate timer
# GPIO.
# CONFIG_PWM_SERVO
# Enables the PWM servo driver. The driver configuration must be
# supplied by the board support at initialisation time.
# Note that USART2 must be disabled on the PX4 board for this to
# be available.
#
#
CONFIG_HRT_TIMER=y
CONFIG_HRT_PPM=y
CONFIG_PWM_SERVO=y
#
# General build options
#
# CONFIG_RRLOAD_BINARY - make the rrload binary format used with
# BSPs from www.ridgerun.com using the tools/mkimage.sh script
# CONFIG_INTELHEX_BINARY - make the Intel HEX binary format
# used with many different loaders using the GNU objcopy program
# Should not be selected if you are not using the GNU toolchain.
# CONFIG_MOTOROLA_SREC - make the Motorola S-Record binary format
# used with many different loaders using the GNU objcopy program
# Should not be selected if you are not using the GNU toolchain.
# CONFIG_RAW_BINARY - make a raw binary format file used with many
# different loaders using the GNU objcopy program. This option
# should not be selected if you are not using the GNU toolchain.
# CONFIG_HAVE_LIBM - toolchain supports libm.a
#
CONFIG_RRLOAD_BINARY=n
CONFIG_INTELHEX_BINARY=n
CONFIG_MOTOROLA_SREC=n
CONFIG_RAW_BINARY=y
CONFIG_HAVE_LIBM=n
#
# General OS setup
#
# CONFIG_APPS_DIR - Identifies the relative path to the directory
# that builds the application to link with NuttX. Default: ../apps
# CONFIG_DEBUG - enables built-in debug options
# CONFIG_DEBUG_VERBOSE - enables verbose debug output
# CONFIG_DEBUG_SYMBOLS - build without optimization and with
# debug symbols (needed for use with a debugger).
# CONFIG_HAVE_CXX - Enable support for C++
# CONFIG_HAVE_CXXINITIALIZE - The platform-specific logic includes support
# for initialization of static C++ instances for this architecture
# and for the selected toolchain (via up_cxxinitialize()).
# CONFIG_MM_REGIONS - If the architecture includes multiple
# regions of memory to allocate from, this specifies the
# number of memory regions that the memory manager must
# handle and enables the API mm_addregion(start, end);
# CONFIG_ARCH_LOWPUTC - architecture supports low-level, boot
# time console output
# CONFIG_MSEC_PER_TICK - The default system timer is 100Hz
# or MSEC_PER_TICK=10. This setting may be defined to
# inform NuttX that the processor hardware is providing
# system timer interrupts at some interrupt interval other
# than 10 msec.
# CONFIG_RR_INTERVAL - The round robin timeslice will be set
# this number of milliseconds; Round robin scheduling can
# be disabled by setting this value to zero.
# CONFIG_SCHED_INSTRUMENTATION - enables instrumentation in
# scheduler to monitor system performance
# CONFIG_TASK_NAME_SIZE - Spcifies that maximum size of a
# task name to save in the TCB. Useful if scheduler
# instrumentation is selected. Set to zero to disable.
# CONFIG_START_YEAR, CONFIG_START_MONTH, CONFIG_START_DAY -
# Used to initialize the internal time logic.
# CONFIG_GREGORIAN_TIME - Enables Gregorian time conversions.
# You would only need this if you are concerned about accurate
# time conversions in the past or in the distant future.
# CONFIG_JULIAN_TIME - Enables Julian time conversions. You
# would only need this if you are concerned about accurate
# time conversion in the distand past. You must also define
# CONFIG_GREGORIAN_TIME in order to use Julian time.
# CONFIG_DEV_CONSOLE - Set if architecture-specific logic
# provides /dev/console. Enables stdout, stderr, stdin.
# CONFIG_DEV_LOWCONSOLE - Use the simple, low-level serial console
# driver (minimul support)
# CONFIG_MUTEX_TYPES: Set to enable support for recursive and
# errorcheck mutexes. Enables pthread_mutexattr_settype().
# CONFIG_PRIORITY_INHERITANCE : Set to enable support for priority
# inheritance on mutexes and semaphores.
# CONFIG_SEM_PREALLOCHOLDERS: This setting is only used if priority
# inheritance is enabled. It defines the maximum number of
# different threads (minus one) that can take counts on a
# semaphore with priority inheritance support. This may be
# set to zero if priority inheritance is disabled OR if you
# are only using semaphores as mutexes (only one holder) OR
# if no more than two threads participate using a counting
# semaphore.
# CONFIG_SEM_NNESTPRIO. If priority inheritance is enabled,
# then this setting is the maximum number of higher priority
# threads (minus 1) than can be waiting for another thread
# to release a count on a semaphore. This value may be set
# to zero if no more than one thread is expected to wait for
# a semaphore.
# CONFIG_FDCLONE_DISABLE. Disable cloning of all file descriptors
# by task_create() when a new task is started. If set, all
# files/drivers will appear to be closed in the new task.
# CONFIG_FDCLONE_STDIO. Disable cloning of all but the first
# three file descriptors (stdin, stdout, stderr) by task_create()
# when a new task is started. If set, all files/drivers will
# appear to be closed in the new task except for stdin, stdout,
# and stderr.
# CONFIG_SDCLONE_DISABLE. Disable cloning of all socket
# desciptors by task_create() when a new task is started. If
# set, all sockets will appear to be closed in the new task.
# CONFIG_NXFLAT. Enable support for the NXFLAT binary format.
# This format will support execution of NuttX binaries located
# in a ROMFS filesystem (see examples/nxflat).
# CONFIG_SCHED_WORKQUEUE. Create a dedicated "worker" thread to
# handle delayed processing from interrupt handlers. This feature
# is required for some drivers but, if there are not complaints,
# can be safely disabled. The worker thread also performs
# garbage collection -- completing any delayed memory deallocations
# from interrupt handlers. If the worker thread is disabled,
# then that clean will be performed by the IDLE thread instead
# (which runs at the lowest of priority and may not be appropriate
# if memory reclamation is of high priority). If CONFIG_SCHED_WORKQUEUE
# is enabled, then the following options can also be used:
# CONFIG_SCHED_WORKPRIORITY - The execution priority of the worker
# thread. Default: 50
# CONFIG_SCHED_WORKPERIOD - How often the worker thread checks for
# work in units of microseconds. Default: 50*1000 (50 MS).
# CONFIG_SCHED_WORKSTACKSIZE - The stack size allocated for the worker
# thread. Default: CONFIG_IDLETHREAD_STACKSIZE.
# CONFIG_SIG_SIGWORK - The signal number that will be used to wake-up
# the worker thread. Default: 4
#
#CONFIG_APPS_DIR=
CONFIG_DEBUG=n
CONFIG_DEBUG_VERBOSE=n
CONFIG_DEBUG_SYMBOLS=y
CONFIG_HAVE_CXX=n
CONFIG_HAVE_CXXINITIALIZE=n
CONFIG_MM_REGIONS=1
CONFIG_MM_SMALL=y
CONFIG_ARCH_LOWPUTC=y
CONFIG_RR_INTERVAL=200
CONFIG_SCHED_INSTRUMENTATION=n
CONFIG_TASK_NAME_SIZE=0
CONFIG_START_YEAR=2009
CONFIG_START_MONTH=9
CONFIG_START_DAY=21
CONFIG_GREGORIAN_TIME=n
CONFIG_JULIAN_TIME=n
CONFIG_DEV_CONSOLE=y
CONFIG_DEV_LOWCONSOLE=n
CONFIG_MUTEX_TYPES=n
CONFIG_PRIORITY_INHERITANCE=n
CONFIG_SEM_PREALLOCHOLDERS=0
CONFIG_SEM_NNESTPRIO=0
CONFIG_FDCLONE_DISABLE=n
CONFIG_FDCLONE_STDIO=y
CONFIG_SDCLONE_DISABLE=y
CONFIG_NXFLAT=n
CONFIG_SCHED_WORKQUEUE=n
CONFIG_SCHED_WORKPRIORITY=50
CONFIG_SCHED_WORKPERIOD=(50*1000)
CONFIG_SCHED_WORKSTACKSIZE=512
CONFIG_SIG_SIGWORK=4
#
# The following can be used to disable categories of
# APIs supported by the OS. If the compiler supports
# weak functions, then it should not be necessary to
# disable functions unless you want to restrict usage
# of those APIs.
#
# There are certain dependency relationships in these
# features.
#
# o mq_notify logic depends on signals to awaken tasks
# waiting for queues to become full or empty.
# o pthread_condtimedwait() depends on signals to wake
# up waiting tasks.
#
CONFIG_DISABLE_CLOCK=n
CONFIG_DISABLE_POSIX_TIMERS=y
CONFIG_DISABLE_PTHREAD=n
CONFIG_DISABLE_SIGNALS=n
CONFIG_DISABLE_MQUEUE=y
CONFIG_DISABLE_MOUNTPOINT=y
CONFIG_DISABLE_ENVIRON=y
CONFIG_DISABLE_POLL=y
#
# Misc libc settings
#
# CONFIG_NOPRINTF_FIELDWIDTH - sprintf-related logic is a
# little smaller if we do not support fieldwidthes
#
CONFIG_NOPRINTF_FIELDWIDTH=n
#
# Allow for architecture optimized implementations
#
# The architecture can provide optimized versions of the
# following to improve system performance
#
CONFIG_ARCH_MEMCPY=n
CONFIG_ARCH_MEMCMP=n
CONFIG_ARCH_MEMMOVE=n
CONFIG_ARCH_MEMSET=n
CONFIG_ARCH_STRCMP=n
CONFIG_ARCH_STRCPY=n
CONFIG_ARCH_STRNCPY=n
CONFIG_ARCH_STRLEN=n
CONFIG_ARCH_STRNLEN=n
CONFIG_ARCH_BZERO=n
#
# Sizes of configurable things (0 disables)
#
# CONFIG_MAX_TASKS - The maximum number of simultaneously
# active tasks. This value must be a power of two.
# CONFIG_MAX_TASK_ARGS - This controls the maximum number of
# of parameters that a task may receive (i.e., maxmum value
# of 'argc')
# CONFIG_NPTHREAD_KEYS - The number of items of thread-
# specific data that can be retained
# CONFIG_NFILE_DESCRIPTORS - The maximum number of file
# descriptors (one for each open)
# CONFIG_NFILE_STREAMS - The maximum number of streams that
# can be fopen'ed
# CONFIG_NAME_MAX - The maximum size of a file name.
# CONFIG_STDIO_BUFFER_SIZE - Size of the buffer to allocate
# on fopen. (Only if CONFIG_NFILE_STREAMS > 0)
# CONFIG_NUNGET_CHARS - Number of characters that can be
# buffered by ungetc() (Only if CONFIG_NFILE_STREAMS > 0)
# CONFIG_PREALLOC_MQ_MSGS - The number of pre-allocated message
# structures. The system manages a pool of preallocated
# message structures to minimize dynamic allocations
# CONFIG_MQ_MAXMSGSIZE - Message structures are allocated with
# a fixed payload size given by this settin (does not include
# other message structure overhead.
# CONFIG_MAX_WDOGPARMS - Maximum number of parameters that
# can be passed to a watchdog handler
# CONFIG_PREALLOC_WDOGS - The number of pre-allocated watchdog
# structures. The system manages a pool of preallocated
# watchdog structures to minimize dynamic allocations
# CONFIG_PREALLOC_TIMERS - The number of pre-allocated POSIX
# timer structures. The system manages a pool of preallocated
# timer structures to minimize dynamic allocations. Set to
# zero for all dynamic allocations.
#
CONFIG_MAX_TASKS=4
CONFIG_MAX_TASK_ARGS=4
CONFIG_NPTHREAD_KEYS=2
CONFIG_NFILE_DESCRIPTORS=6
CONFIG_NFILE_STREAMS=4
CONFIG_NAME_MAX=32
CONFIG_STDIO_BUFFER_SIZE=64
CONFIG_NUNGET_CHARS=2
CONFIG_PREALLOC_MQ_MSGS=1
CONFIG_MQ_MAXMSGSIZE=32
CONFIG_MAX_WDOGPARMS=2
CONFIG_PREALLOC_WDOGS=3
CONFIG_PREALLOC_TIMERS=1
#
# Settings for apps/nshlib
#
# CONFIG_NSH_BUILTIN_APPS - Support external registered,
# "named" applications that can be executed from the NSH
# command line (see apps/README.txt for more information).
# CONFIG_NSH_FILEIOSIZE - Size of a static I/O buffer
# CONFIG_NSH_STRERROR - Use strerror(errno)
# CONFIG_NSH_LINELEN - Maximum length of one command line
# CONFIG_NSH_NESTDEPTH - Max number of nested if-then[-else]-fi
# CONFIG_NSH_DISABLESCRIPT - Disable scripting support
# CONFIG_NSH_DISABLEBG - Disable background commands
# CONFIG_NSH_ROMFSETC - Use startup script in /etc
# CONFIG_NSH_CONSOLE - Use serial console front end
# CONFIG_NSH_TELNET - Use telnetd console front end
# CONFIG_NSH_ARCHINIT - Platform provides architecture
# specific initialization (nsh_archinitialize()).
#
# If CONFIG_NSH_TELNET is selected:
# CONFIG_NSH_IOBUFFER_SIZE -- Telnetd I/O buffer size
# CONFIG_NSH_DHCPC - Obtain address using DHCP
# CONFIG_NSH_IPADDR - Provides static IP address
# CONFIG_NSH_DRIPADDR - Provides static router IP address
# CONFIG_NSH_NETMASK - Provides static network mask
# CONFIG_NSH_NOMAC - Use a bogus MAC address
#
# If CONFIG_NSH_ROMFSETC is selected:
# CONFIG_NSH_ROMFSMOUNTPT - ROMFS mountpoint
# CONFIG_NSH_INITSCRIPT - Relative path to init script
# CONFIG_NSH_ROMFSDEVNO - ROMFS RAM device minor
# CONFIG_NSH_ROMFSSECTSIZE - ROMF sector size
# CONFIG_NSH_FATDEVNO - FAT FS RAM device minor
# CONFIG_NSH_FATSECTSIZE - FAT FS sector size
# CONFIG_NSH_FATNSECTORS - FAT FS number of sectors
# CONFIG_NSH_FATMOUNTPT - FAT FS mountpoint
#
CONFIG_NSH_BUILTIN_APPS=y
CONFIG_NSH_FILEIOSIZE=64
CONFIG_NSH_STRERROR=n
CONFIG_NSH_LINELEN=64
CONFIG_NSH_NESTDEPTH=1
CONFIG_NSH_DISABLESCRIPT=y
CONFIG_NSH_DISABLEBG=n
CONFIG_NSH_ROMFSETC=n
CONFIG_NSH_CONSOLE=y
CONFIG_NSH_TELNET=n
CONFIG_NSH_ARCHINIT=y
CONFIG_NSH_IOBUFFER_SIZE=256
#CONFIG_NSH_STACKSIZE=1024
CONFIG_NSH_DHCPC=n
CONFIG_NSH_NOMAC=n
CONFIG_NSH_IPADDR=(10<<24|0<<16|0<<8|2)
CONFIG_NSH_DRIPADDR=(10<<24|0<<16|0<<8|1)
CONFIG_NSH_NETMASK=(255<<24|255<<16|255<<8|0)
CONFIG_NSH_ROMFSMOUNTPT="/etc"
CONFIG_NSH_INITSCRIPT="init.d/rcS"
CONFIG_NSH_ROMFSDEVNO=0
CONFIG_NSH_ROMFSSECTSIZE=64
CONFIG_NSH_FATDEVNO=1
CONFIG_NSH_FATSECTSIZE=512
CONFIG_NSH_FATNSECTORS=1024
CONFIG_NSH_FATMOUNTPT=/tmp
#
# Architecture-specific NSH options
#
CONFIG_NSH_MMCSDSPIPORTNO=0
CONFIG_NSH_MMCSDSLOTNO=0
CONFIG_NSH_MMCSDMINOR=0
#
# Stack and heap information
#
# CONFIG_BOOT_RUNFROMFLASH - Some configurations support XIP
# operation from FLASH but must copy initialized .data sections to RAM.
# (should also be =n for the STM3210E-EVAL which always runs from flash)
# CONFIG_BOOT_COPYTORAM - Some configurations boot in FLASH
# but copy themselves entirely into RAM for better performance.
# CONFIG_CUSTOM_STACK - The up_ implementation will handle
# all stack operations outside of the nuttx model.
# CONFIG_STACK_POINTER - The initial stack pointer (arm7tdmi only)
# CONFIG_IDLETHREAD_STACKSIZE - The size of the initial stack.
# This is the thread that (1) performs the inital boot of the system up
# to the point where user_start() is spawned, and (2) there after is the
# IDLE thread that executes only when there is no other thread ready to
# run.
# CONFIG_USERMAIN_STACKSIZE - The size of the stack to allocate
# for the main user thread that begins at the user_start() entry point.
# CONFIG_PTHREAD_STACK_MIN - Minimum pthread stack size
# CONFIG_PTHREAD_STACK_DEFAULT - Default pthread stack size
# CONFIG_HEAP_BASE - The beginning of the heap
# CONFIG_HEAP_SIZE - The size of the heap
#
CONFIG_BOOT_RUNFROMFLASH=n
CONFIG_BOOT_COPYTORAM=n
CONFIG_CUSTOM_STACK=n
CONFIG_STACK_POINTER=
CONFIG_IDLETHREAD_STACKSIZE=800
CONFIG_USERMAIN_STACKSIZE=1024
CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=512
CONFIG_HEAP_BASE=
CONFIG_HEAP_SIZE=

View File

@ -0,0 +1,47 @@
#!/bin/bash
# configs/stm3210e-eval/dfu/setenv.sh
#
# Copyright (C) 2009 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
#
# 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.
#
if [ "$(basename $0)" = "setenv.sh" ] ; then
echo "You must source this script, not run it!" 1>&2
exit 1
fi
if [ -z "${PATH_ORIG}" ]; then export PATH_ORIG="${PATH}"; fi
WD=`pwd`
export RIDE_BIN="/cygdrive/c/Program Files/Raisonance/Ride/arm-gcc/bin"
export BUILDROOT_BIN="${WD}/../buildroot/build_arm_nofpu/staging_dir/bin"
export PATH="${BUILDROOT_BIN}:${RIDE_BIN}:/sbin:/usr/sbin:${PATH_ORIG}"
echo "PATH : ${PATH}"

View File

@ -47,8 +47,7 @@ config CAN_EXTID
bool "CAN extended IDs" bool "CAN extended IDs"
default n default n
---help--- ---help---
Enables support for the 29-bit extended ID. Default Standard 11-bit Enables support for the 29-bit extended ID. Default Standard 11-bit IDs.
IDs.
config CAN_FIFOSIZE config CAN_FIFOSIZE
int "CAN driver I/O buffer size" int "CAN driver I/O buffer size"
@ -84,10 +83,10 @@ config PWM_PULSECOUNT
bool "PWM Pulse Count Support" bool "PWM Pulse Count Support"
default n default n
---help--- ---help---
Some hardware will support generation of a fixed number of pulses. Some hardware will support generation of a fixed number of pulses. This
This might be used, for example to support a stepper motor. If the might be used, for example to support a stepper motor. If the hardware
hardware will support a fixed pulse count, then this configuration will support a fixed pulse count, then this configuration should be set to
should be set to enable the capability. enable the capability.
endif endif
@ -148,25 +147,23 @@ config SPI_OWNBUS
bool "SPI single device" bool "SPI single device"
default n default n
---help--- ---help---
Set if there is only one active device on the SPI bus. No locking or Set if there is only one active device on the SPI bus. No locking or SPI
SPI configuration will be performed. It is not necessary for clients to configuration will be performed. It is not necessary for clients to lock,
lock, re-configure, etc.. re-configure, etc..
config SPI_EXCHANGE config SPI_EXCHANGE
bool "SPI exchange" bool "SPI exchange"
default y default y
---help--- ---help---
Driver supports a single exchange method (vs a recvblock() and Driver supports a single exchange method (vs a recvblock() and sndblock ()methods).
sndblock() methods).
config SPI_CMDDATA config SPI_CMDDATA
bool "SPI CMD/DATA" bool "SPI CMD/DATA"
default n default n
---help--- ---help---
Devices on the SPI bus require out-of-band support to distinguish Devices on the SPI bus require out-of-band support to distinguish command
command transfers from data transfers. Such devices will often support transfers from data transfers. Such devices will often support either 9-bit
either 9-bit SPI (yech) or 8-bit SPI and a GPIO output that selects SPI (yech) or 8-bit SPI and a GPIO output that selects between command and data.
between command and data.
endif endif
@ -176,36 +173,35 @@ menuconfig RTC
---help--- ---help---
This selection enables configuration of a real time clock (RTCdriver. This selection enables configuration of a real time clock (RTCdriver.
See include/nuttx/rtc.h for further watchdog timer driver information. See include/nuttx/rtc.h for further watchdog timer driver information.
Most RTC drivers are MCU specific and may require other specific Most RTC drivers are MCU specific and may require other specific settings.
settings.
config RTC_DATETIME config RTC_DATETIME
bool "Date/Time RTC Support" bool "Date/Time RTC Support"
default n default n
depends on RTC depends on RTC
---help--- ---help---
There are two general types of RTC: (1) A simple battery backed There are two general types of RTC: (1) A simple battery backed counter
counter that keeps the time when power is down, and (2) a full that keeps the time when power is down, and (2) a full date / time RTC the
date / time RTC the provides the date and time information, often in provides the date and time information, often in BCD format. If
BCD format. If RTC_DATETIME is selected, it specifies this second kind RTC_DATETIME is selected, it specifies this second kind of RTC. In this
of RTC. In this case, the RTC is used to "seed" the normal NuttX timer case, the RTC is used to "seed" the normal NuttX timer and the NuttX system
and the NuttX system timer provides for higher resolution time. timer provides for higher resolution time.
config RTC_HIRES config RTC_HIRES
bool "Hi-Res RTC Support" bool "Hi-Res RTC Support"
default n default n
depends on RTC && !RTC_DATETIME depends on RTC && !RTC_DATETIME
---help--- ---help---
If RTC_DATETIME not selected, then the simple, battery backed counter If RTC_DATETIME not selected, then the simple, battery backed counter is
is used. There are two different implementations of such simple used. There are two different implementations of such simple counters
counters based on the time resolution of the counter: The typical RTC based on the time resolution of the counter: The typical RTC keeps time
keeps time to resolution of 1 second, usually supporting a 32-bit to resolution of 1 second, usually supporting a 32-bit time_t value. In
time_t value. In this case, the RTC is used to "seed" the normal NuttX this case, the RTC is used to "seed" the normal NuttX timer and the NuttX
timer and the NuttX timer provides for higherresoution time. timer provides for higherresoution time.
If RTC_HIRES is enabled in the NuttX configuration, then the RTC If RTC_HIRES is enabled in the NuttX configuration, then the RTC provides
provides higher resolution time and completely replaces the system higher resolution time and completely replaces the system timer for purpose
timer for purpose of date and time. of date and time.
config RTC_FREQUENCY config RTC_FREQUENCY
int "Hi-Res RTC frequency" int "Hi-Res RTC frequency"
@ -213,8 +209,8 @@ config RTC_FREQUENCY
depends on RTC && !RTC_DATETIME && RTC_HIRES depends on RTC && !RTC_DATETIME && RTC_HIRES
---help--- ---help---
If RTC_HIRES is defined, then the frequency of the high resolution RTC If RTC_HIRES is defined, then the frequency of the high resolution RTC
must be provided. If RTC_HIRES is not defined, RTC_FREQUENCY is must be provided. If RTC_HIRES is not defined, RTC_FREQUENCY is assumed
assumed to be one Hz. to be one Hz.
config RTC_ALARM config RTC_ALARM
bool "RTC Alarm Support" bool "RTC Alarm Support"
@ -228,9 +224,8 @@ menuconfig WATCHDOG
bool "Watchdog Timer Support" bool "Watchdog Timer Support"
default n default n
---help--- ---help---
This selection enables building of the "upper-half" watchdog timer This selection enables building of the "upper-half" watchdog timer driver.
driver. See include/nuttx/watchdog.h for further watchdog timer driver See include/nuttx/watchdog.h for further watchdog timer driver information.
information.
if WATCHDOG if WATCHDOG
endif endif
@ -353,8 +348,7 @@ menuconfig POWER
bool "Power Management Support" bool "Power Management Support"
default n default n
---help--- ---help---
Enable building of power-related devices (battery monitors, chargers, Enable building of power-related devices (battery monitors, chargers, etc).
etc).
if POWER if POWER
source drivers/power/Kconfig source drivers/power/Kconfig
@ -392,8 +386,8 @@ menuconfig SERIAL
default y default y
---help--- ---help---
Front-end character drivers for chip-specific UARTs. This provide Front-end character drivers for chip-specific UARTs. This provide
some TTY-like functionality and are commonly used (but not required some TTY-like functionality and are commonly used (but not required for)
for) the NuttX system console. See also include/nuttx/serial/serial.h the NuttX system console. See also include/nuttx/serial/serial.h
if SERIAL if SERIAL
source drivers/serial/Kconfig source drivers/serial/Kconfig

View File

@ -85,15 +85,15 @@ ifeq ($(CONFIG_WATCHDOG),y)
endif endif
endif endif
AOBJS = $(ASRCS:.S=$(OBJEXT)) AOBJS = $(ASRCS:.S=$(OBJEXT))
COBJS = $(CSRCS:.c=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT))
SRCS = $(ASRCS) $(CSRCS) SRCS = $(ASRCS) $(CSRCS)
OBJS = $(AOBJS) $(COBJS) OBJS = $(AOBJS) $(COBJS)
BIN = libdrivers$(LIBEXT) BIN = libdrivers$(LIBEXT)
all: $(BIN) all: $(BIN)
$(AOBJS): %$(OBJEXT): %.S $(AOBJS): %$(OBJEXT): %.S
$(call ASSEMBLE, $<, $@) $(call ASSEMBLE, $<, $@)
@ -101,21 +101,22 @@ $(AOBJS): %$(OBJEXT): %.S
$(COBJS): %$(OBJEXT): %.c $(COBJS): %$(OBJEXT): %.c
$(call COMPILE, $<, $@) $(call COMPILE, $<, $@)
$(BIN): $(OBJS) $(BIN): $(OBJS)
$(call ARCHIVE, $@, $(OBJS)) @( for obj in $(OBJS) ; do \
$(call ARCHIVE, $@, $${obj}); \
done ; )
.depend: Makefile $(SRCS) .depend: Makefile $(SRCS)
$(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep @$(MKDEP) $(DEPPATH) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
$(Q) touch $@ @touch $@
depend: .depend depend: .depend
clean: clean:
$(call DELFILE, $(BIN)) @rm -f $(BIN) *~ .*.swp
$(call CLEAN) $(call CLEAN)
distclean: clean distclean: clean
$(call DELFILE, Make.dep) @rm -f Make.dep .depend
$(call DELFILE, .depend)
-include Make.dep -include Make.dep

View File

@ -1,7 +1,7 @@
############################################################################ ############################################################################
# drivers/analog/Make.defs # drivers/analog/Make.defs
# #
# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. # Copyright (C) 2011 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org> # Author: Gregory Nutt <gnutt@nuttx.org>
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -76,12 +76,12 @@ endif
ifeq ($(CONFIG_DAC),y) ifeq ($(CONFIG_DAC),y)
DEPPATH += --dep-path analog DEPPATH += --dep-path analog
VPATH += :analog VPATH += :analog
CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/analog} CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/analog}
else else
ifeq ($(CONFIG_ADC),y) ifeq ($(CONFIG_ADC),y)
DEPPATH += --dep-path analog DEPPATH += --dep-path analog
VPATH += :analog VPATH += :analog
CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/analog} CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/analog}
endif endif
endif endif

View File

@ -143,7 +143,7 @@ static int adc_open(FAR struct file *filep)
dev->ad_recv.af_head = 0; dev->ad_recv.af_head = 0;
dev->ad_recv.af_tail = 0; dev->ad_recv.af_tail = 0;
/* Finally, Enable the ADC RX interrupt */ /* Finally, Enable the CAN RX interrupt */
dev->ad_ops->ao_rxint(dev, true); dev->ad_ops->ao_rxint(dev, true);
@ -151,11 +151,9 @@ static int adc_open(FAR struct file *filep)
dev->ad_ocount = tmp; dev->ad_ocount = tmp;
} }
irqrestore(flags); irqrestore(flags);
} }
} }
sem_post(&dev->ad_closesem); sem_post(&dev->ad_closesem);
} }
return ret; return ret;
@ -372,10 +370,6 @@ static int adc_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
* Public Functions * Public Functions
****************************************************************************/ ****************************************************************************/
/****************************************************************************
* Name: adc_receive
****************************************************************************/
int adc_receive(FAR struct adc_dev_s *dev, uint8_t ch, int32_t data) int adc_receive(FAR struct adc_dev_s *dev, uint8_t ch, int32_t data)
{ {
FAR struct adc_fifo_s *fifo = &dev->ad_recv; FAR struct adc_fifo_s *fifo = &dev->ad_recv;
@ -396,7 +390,7 @@ int adc_receive(FAR struct adc_dev_s *dev, uint8_t ch, int32_t data)
if (nexttail != fifo->af_head) if (nexttail != fifo->af_head)
{ {
/* Add the new, decoded ADC sample at the tail of the FIFO */ /* Add the new, decoded CAN message at the tail of the FIFO */
fifo->af_buffer[fifo->af_tail].am_channel = ch; fifo->af_buffer[fifo->af_tail].am_channel = ch;
fifo->af_buffer[fifo->af_tail].am_data = data; fifo->af_buffer[fifo->af_tail].am_data = data;
@ -409,16 +403,11 @@ int adc_receive(FAR struct adc_dev_s *dev, uint8_t ch, int32_t data)
{ {
sem_post(&fifo->af_sem); sem_post(&fifo->af_sem);
} }
err = OK; err = OK;
} }
return err; return err;
} }
/****************************************************************************
* Name: adc_register
****************************************************************************/
int adc_register(FAR const char *path, FAR struct adc_dev_s *dev) int adc_register(FAR const char *path, FAR struct adc_dev_s *dev)
{ {
/* Initialize the ADC device structure */ /* Initialize the ADC device structure */

View File

@ -1,7 +1,7 @@
############################################################################ ############################################################################
# drivers/bch/Make.defs # drivers/bch/Make.defs
# #
# Copyright (C) 2008, 2011-2012 Gregory Nutt. All rights reserved. # Copyright (C) 2008, 2011 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org> # Author: Gregory Nutt <gnutt@nuttx.org>
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -46,7 +46,7 @@ CSRCS += bchlib_setup.c bchlib_teardown.c bchlib_read.c bchlib_write.c \
DEPPATH += --dep-path bch DEPPATH += --dep-path bch
VPATH += :bch VPATH += :bch
CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/bch} CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/bch}
endif endif
endif endif

View File

@ -1,7 +1,7 @@
############################################################################ ############################################################################
# drivers/input/Make.defs # drivers/input/Make.defs
# #
# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. # Copyright (C) 2011 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org> # Author: Gregory Nutt <gnutt@nuttx.org>
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -47,10 +47,6 @@ ifeq ($(CONFIG_INPUT_ADS7843E),y)
CSRCS += ads7843e.c CSRCS += ads7843e.c
endif endif
ifeq ($(CONFIG_INPUT_MAX11802),y)
CSRCS += max11802.c
endif
ifeq ($(CONFIG_INPUT_STMPE811),y) ifeq ($(CONFIG_INPUT_STMPE811),y)
CSRCS += stmpe811_base.c CSRCS += stmpe811_base.c
ifneq ($(CONFIG_INPUT_STMPE811_TSC_DISABLE),y) ifneq ($(CONFIG_INPUT_STMPE811_TSC_DISABLE),y)
@ -71,6 +67,6 @@ endif
DEPPATH += --dep-path input DEPPATH += --dep-path input
VPATH += :input VPATH += :input
CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/input} CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/input}
endif endif

View File

@ -183,85 +183,12 @@ config NOKIA6100_RGBORD
endif endif
config LCD_UG9664HSWAG01 config LCD_UG9664HSWAG01
bool "UG-9664HSWAG01 OLED Display Module" bool "9664HSWAG01 OLED Display Module"
default n default n
---help--- ---help---
OLED Display Module, UG-9664HSWAG01, Univision Technology Inc. Used ug-9664hswag01.c. OLED Display Module, UG-9664HSWAG01", Univision
with the LPCXpresso and Embedded Artists base board. Technology Inc. Used with the LPC Xpresso and Embedded Artists
base board.
Required LCD driver settings:
LCD_MAXCONTRAST should be 255, but any value >0 and <=255 will be accepted.
LCD_MAXPOWER should be 1: 0=off, 1=on
Required SPI driver settings:
SPI_CMDDATA - Include support for cmd/data selection.
if LCD_UG9664HSWAG01
config UG9664HSWAG01_SPIMODE
int "UG-9664HSWAG01 SPI Mode"
default 0
---help---
Controls the SPI mode
config UG9664HSWAG01_FREQUENCY
int "UG-9664HSWAG01 SPI Frequency"
default 3500000
---help---
Define to use a different bus frequency
config UG9664HSWAG01_NINTERFACES
int "Number of UG-9664HSWAG01 Devices"
default 1
---help---
Specifies the number of physical UG-9664HSWAG01 devices that will be
supported. NOTE: At present, this must be undefined or defined to be 1.
config UG9664HSWAG01_POWER
bool "Power control"
default n
---help---
If the hardware supports a controllable OLED a power supply, this
configuration should be defined. In this case the system must
provide an interface ug_power().
endif
config LCD_UG2864AMBAG01
bool "UG-2864AMBAG01 OLED Display Module"
default n
---help---
OLED Display Module, UG-2864AMBAG01, Univision Technology Inc.
Required LCD driver settings:
LCD_MAXCONTRAST should be 255, but any value >0 and <=255 will be accepted.
LCD_MAXPOWER should be 1: 0=off, 1=on
Required SPI driver settings:
SPI_CMDDATA - Include support for cmd/data selection.
if LCD_UG2864AMBAG01
config UG2864AMBAG01_SPIMODE
int "UG-2864AMBAG01 SPI Mode"
default 3
---help---
Controls the SPI mode
config UG2864AMBAG01_FREQUENCY
int "UG-2864AMBAG01 SPI Frequency"
default 3500000
---help---
Define to use a different bus frequency
config UG2864AMBAG01_NINTERFACES
int "Number of UG-2864AMBAG01 Devices"
default 1
---help---
Specifies the number of physical UG-9664HSWAG01 devices that will be
supported. NOTE: At present, this must be undefined or defined to be 1.
endif
config LCD_SSD1289 config LCD_SSD1289
bool "LCD Based on SSD1289 Controller" bool "LCD Based on SSD1289 Controller"

View File

@ -47,10 +47,6 @@ ifeq ($(CONFIG_LCD_NOKIA6100),y)
CSRCS += nokia6100.c CSRCS += nokia6100.c
endif endif
ifeq ($(CONFIG_LCD_UG2864AMBAG01),y)
CSRCS += ug-2864ambag01.c
endif
ifeq ($(CONFIG_LCD_UG9664HSWAG01),y) ifeq ($(CONFIG_LCD_UG9664HSWAG01),y)
CSRCS += ug-9664hswag01.c CSRCS += ug-9664hswag01.c
endif endif
@ -67,6 +63,6 @@ endif
DEPPATH += --dep-path lcd DEPPATH += --dep-path lcd
VPATH += :lcd VPATH += :lcd
CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/lcd} CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/lcd}
endif endif

View File

@ -73,6 +73,8 @@
* CONFIG_UG9664HSWAG01_POWER * CONFIG_UG9664HSWAG01_POWER
* If the hardware supports a controllable OLED a power supply, this * If the hardware supports a controllable OLED a power supply, this
* configuration shold be defined. (See ug_power() below). * configuration shold be defined. (See ug_power() below).
* CONFIG_LCD_UGDEBUG - Enable detailed UG-9664HSWAG01 debug output
* (CONFIG_DEBUG and CONFIG_VERBOSE must also be enabled).
* *
* Required LCD driver settings: * Required LCD driver settings:
* CONFIG_LCD_UG9664HSWAG01 - Enable UG-9664HSWAG01 support * CONFIG_LCD_UG9664HSWAG01 - Enable UG-9664HSWAG01 support
@ -117,10 +119,11 @@
#ifndef CONFIG_DEBUG #ifndef CONFIG_DEBUG
# undef CONFIG_DEBUG_VERBOSE # undef CONFIG_DEBUG_VERBOSE
# undef CONFIG_DEBUG_GRAPHICS
#endif #endif
#ifndef CONFIG_DEBUG_VERBOSE #ifndef CONFIG_DEBUG_VERBOSE
# undef CONFIG_DEBUG_LCD # undef CONFIG_LCD_UGDEBUG
#endif #endif
/* Check contrast selection */ /* Check contrast selection */
@ -179,7 +182,7 @@
#define UG_BPP 1 #define UG_BPP 1
#define UG_COLORFMT FB_FMT_Y1 #define UG_COLORFMT FB_FMT_Y1
/* Bytes per logical row and actual device row */ /* Bytes per logical row andactual device row */
#define UG_XSTRIDE (UG_XRES >> 3) /* Pixels arrange "horizontally for user" */ #define UG_XSTRIDE (UG_XRES >> 3) /* Pixels arrange "horizontally for user" */
#define UG_YSTRIDE (UG_YRES >> 3) /* But actual device arrangement is "vertical" */ #define UG_YSTRIDE (UG_YRES >> 3) /* But actual device arrangement is "vertical" */
@ -195,10 +198,10 @@
/* Debug ******************************************************************************/ /* Debug ******************************************************************************/
#ifdef CONFIG_DEBUG_LCD #ifdef CONFIG_LCD_UGDEBUG
# define lcddbg(format, arg...) vdbg(format, ##arg) # define ugdbg(format, arg...) vdbg(format, ##arg)
#else #else
# define lcddbg(x...) # define ugdbg(x...)
#endif #endif
/************************************************************************************** /**************************************************************************************
@ -994,7 +997,7 @@ FAR struct lcd_dev_s *ug_initialize(FAR struct spi_dev_s *spi, unsigned int devn
SPI_CMDDATA(spi, SPIDEV_DISPLAY, true); SPI_CMDDATA(spi, SPIDEV_DISPLAY, true);
/* Configure the device */ /* Set the starting position for the run */
(void)SPI_SEND(spi, SSD1305_SETCOLL + 2); /* Set low column address */ (void)SPI_SEND(spi, SSD1305_SETCOLL + 2); /* Set low column address */
(void)SPI_SEND(spi, SSD1305_SETCOLH + 2); /* Set high column address */ (void)SPI_SEND(spi, SSD1305_SETCOLH + 2); /* Set high column address */

View File

@ -1,7 +1,7 @@
############################################################################ ############################################################################
# drivers/mmcsd/Make.defs # drivers/mmcsd/Make.defs
# #
# Copyright (C) 2008, 2011-2012 Gregory Nutt. All rights reserved. # Copyright (C) 2008, 2011 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org> # Author: Gregory Nutt <gnutt@nuttx.org>
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -33,24 +33,14 @@
# #
############################################################################ ############################################################################
ifeq ($(CONFIG_MMCSD),y)
# Include MMC/SD drivers # Include MMC/SD drivers
ifeq ($(CONFIG_MMCSD_SDIO),y) CSRCS += mmcsd_sdio.c mmcsd_spi.c mmcsd_debug.c
CSRCS += mmcsd_sdio.c
endif
ifeq ($(CONFIG_MMCSD_SPI),y)
CSRCS += mmcsd_spi.c mmcsd_debug.c
endif
# Include MMC/SD driver build support # Include MMC/SD driver build support
DEPPATH += --dep-path mmcsd DEPPATH += --dep-path mmcsd
VPATH += :mmcsd VPATH += :mmcsd
CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/mmcsd} CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/mmcsd}
endif

View File

@ -38,9 +38,6 @@
****************************************************************************/ ****************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
#if defined (CONFIG_MMCSD) && defined (CONFIG_MMCSD_SDIO)
#include <nuttx/compiler.h> #include <nuttx/compiler.h>
#include <sys/types.h> #include <sys/types.h>
@ -3181,5 +3178,3 @@ errout_with_alloc:
kfree(priv); kfree(priv);
return ret; return ret;
} }
#endif /* defined (CONFIG_MMCSD) && defined (CONFIG_MMCSD_SDIO) */

View File

@ -38,9 +38,6 @@
****************************************************************************/ ****************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
#if defined (CONFIG_MMCSD) && defined (CONFIG_MMCSD_SPI)
#include <sys/types.h> #include <sys/types.h>
#include <stdint.h> #include <stdint.h>
@ -511,7 +508,7 @@ static uint32_t mmcsd_sendcmd(FAR struct mmcsd_slot_s *slot,
} }
break; break;
/* The R3 response is 5 bytes long. The first byte is identical to R1. */ /* The R3 response is 5 bytes long */
case MMCSD_CMDRESP_R3: case MMCSD_CMDRESP_R3:
{ {
@ -523,10 +520,8 @@ static uint32_t mmcsd_sendcmd(FAR struct mmcsd_slot_s *slot,
fvdbg("CMD%d[%08x] R1=%02x OCR=%08x\n", fvdbg("CMD%d[%08x] R1=%02x OCR=%08x\n",
cmd->cmd & 0x3f, arg, response, slot->ocr); cmd->cmd & 0x3f, arg, response, slot->ocr);
} }
break;
/* The R7 response is 5 bytes long. The first byte is identical to R1. */
/* The R7 response is 5 bytes long */
case MMCSD_CMDRESP_R7: case MMCSD_CMDRESP_R7:
default: default:
{ {
@ -1881,5 +1876,3 @@ int mmcsd_spislotinitialize(int minor, int slotno, FAR struct spi_dev_s *spi)
(void)SPI_REGISTERCALLBACK(spi, mmcsd_mediachanged, (void*)slot); (void)SPI_REGISTERCALLBACK(spi, mmcsd_mediachanged, (void*)slot);
return OK; return OK;
} }
#endif /* defined (CONFIG_MMCSD) && defined (CONFIG_MMCSD_SPI) */

View File

@ -60,7 +60,6 @@
#include <rgmp/pmap.h> #include <rgmp/pmap.h>
#include <rgmp/string.h> #include <rgmp/string.h>
#include <rgmp/stdio.h> #include <rgmp/stdio.h>
#include <rgmp/utils.h>
#include <rgmp/arch/pci.h> #include <rgmp/arch/pci.h>
#include <rgmp/memio.h> #include <rgmp/memio.h>
#include "e1000.h" #include "e1000.h"
@ -105,9 +104,9 @@ struct e1000_dev {
uint32_t io_mem_base; uint32_t io_mem_base;
uint32_t mem_size; uint32_t mem_size;
int pci_dev_id; int pci_dev_id;
uint16_t pci_addr;
unsigned char src_mac[6]; unsigned char src_mac[6];
unsigned char dst_mac[6]; unsigned char dst_mac[6];
int irq;
struct irq_action int_desc; struct irq_action int_desc;
struct tx_ring tx_ring; struct tx_ring tx_ring;
struct rx_ring rx_ring; struct rx_ring rx_ring;
@ -309,16 +308,16 @@ void e1000_init(struct e1000_dev *dev)
e1000_outl(dev, E1000_FCRTH, pba*9/10); e1000_outl(dev, E1000_FCRTH, pba*9/10);
// setup tx rings // setup tx rings
txd_phys = PADDR((uintptr_t)dev->tx_ring.desc); txd_phys = PADDR(dev->tx_ring.desc);
kmem_phys = PADDR((uintptr_t)dev->tx_ring.buf); kmem_phys = PADDR(dev->tx_ring.buf);
for (i=0; i<CONFIG_E1000_N_TX_DESC; i++,kmem_phys+=CONFIG_E1000_BUFF_SIZE) { for (i=0; i<CONFIG_E1000_N_TX_DESC; i++,kmem_phys+=CONFIG_E1000_BUFF_SIZE) {
dev->tx_ring.desc[i].base_address = kmem_phys; dev->tx_ring.desc[i].base_address = kmem_phys;
dev->tx_ring.desc[i].packet_length = 0; dev->tx_ring.desc[i].packet_length = 0;
dev->tx_ring.desc[i].cksum_offset = 0; dev->tx_ring.desc[i].cksum_offset = 0;
dev->tx_ring.desc[i].cksum_origin = 0; dev->tx_ring.desc[i].cksum_origin = 0;
dev->tx_ring.desc[i].desc_status = 1; dev->tx_ring.desc[i].desc_status = 1;
dev->tx_ring.desc[i].desc_command = (1<<0)|(1<<1)|(1<<3); dev->tx_ring.desc[i].desc_command = (1<<0)|(1<<1)|(1<<3);
dev->tx_ring.desc[i].special_info = 0; dev->tx_ring.desc[i].special_info = 0;
} }
dev->tx_ring.tail = 0; dev->tx_ring.tail = 0;
e1000_outl(dev, E1000_TDT, 0); e1000_outl(dev, E1000_TDT, 0);
@ -330,15 +329,15 @@ void e1000_init(struct e1000_dev *dev)
e1000_outl(dev, E1000_TXDCTL, 0x01010000); e1000_outl(dev, E1000_TXDCTL, 0x01010000);
// setup rx rings // setup rx rings
rxd_phys = PADDR((uintptr_t)dev->rx_ring.desc); rxd_phys = PADDR(dev->rx_ring.desc);
kmem_phys = PADDR((uintptr_t)dev->rx_ring.buf); kmem_phys = PADDR(dev->rx_ring.buf);
for (i=0; i<CONFIG_E1000_N_RX_DESC; i++,kmem_phys+=CONFIG_E1000_BUFF_SIZE) { for (i=0; i<CONFIG_E1000_N_RX_DESC; i++,kmem_phys+=CONFIG_E1000_BUFF_SIZE) {
dev->rx_ring.desc[i].base_address = kmem_phys; dev->rx_ring.desc[i].base_address = kmem_phys;
dev->rx_ring.desc[i].packet_length = 0; dev->rx_ring.desc[i].packet_length = 0;
dev->rx_ring.desc[i].packet_cksum = 0; dev->rx_ring.desc[i].packet_cksum = 0;
dev->rx_ring.desc[i].desc_status = 0; dev->rx_ring.desc[i].desc_status = 0;
dev->rx_ring.desc[i].desc_errors = 0; dev->rx_ring.desc[i].desc_errors = 0;
dev->rx_ring.desc[i].vlan_tag = 0; dev->rx_ring.desc[i].vlan_tag = 0;
} }
dev->rx_ring.head = 0; dev->rx_ring.head = 0;
dev->rx_ring.tail = CONFIG_E1000_N_RX_DESC-1; dev->rx_ring.tail = CONFIG_E1000_N_RX_DESC-1;
@ -379,7 +378,7 @@ static int e1000_transmit(struct e1000_dev *e1000)
{ {
int tail = e1000->tx_ring.tail; int tail = e1000->tx_ring.tail;
unsigned char *cp = (unsigned char *) unsigned char *cp = (unsigned char *)
(e1000->tx_ring.buf + tail * CONFIG_E1000_BUFF_SIZE); (e1000->tx_ring.buf + tail * CONFIG_E1000_BUFF_SIZE);
int count = e1000->uip_dev.d_len; int count = e1000->uip_dev.d_len;
/* Verify that the hardware is ready to send another packet. If we get /* Verify that the hardware is ready to send another packet. If we get
@ -388,7 +387,7 @@ static int e1000_transmit(struct e1000_dev *e1000)
*/ */
if (!e1000->tx_ring.desc[tail].desc_status) if (!e1000->tx_ring.desc[tail].desc_status)
return -1; return -1;
/* Increment statistics */ /* Increment statistics */
@ -446,14 +445,14 @@ static int e1000_uiptxpoll(struct uip_driver_s *dev)
*/ */
if (e1000->uip_dev.d_len > 0) { if (e1000->uip_dev.d_len > 0) {
uip_arp_out(&e1000->uip_dev); uip_arp_out(&e1000->uip_dev);
e1000_transmit(e1000); e1000_transmit(e1000);
/* Check if there is room in the device to hold another packet. If not, /* Check if there is room in the device to hold another packet. If not,
* return a non-zero value to terminate the poll. * return a non-zero value to terminate the poll.
*/ */
if (!e1000->tx_ring.desc[tail].desc_status) if (!e1000->tx_ring.desc[tail].desc_status)
return -1; return -1;
} }
/* If zero is returned, the polling will continue until all connections have /* If zero is returned, the polling will continue until all connections have
@ -484,75 +483,75 @@ static void e1000_receive(struct e1000_dev *e1000)
{ {
int head = e1000->rx_ring.head; int head = e1000->rx_ring.head;
unsigned char *cp = (unsigned char *) unsigned char *cp = (unsigned char *)
(e1000->rx_ring.buf + head * CONFIG_E1000_BUFF_SIZE); (e1000->rx_ring.buf + head * CONFIG_E1000_BUFF_SIZE);
int cnt; int cnt;
while (e1000->rx_ring.desc[head].desc_status) { while (e1000->rx_ring.desc[head].desc_status) {
/* Check for errors and update statistics */ /* Check for errors and update statistics */
// Here we do not handle packets that exceed packet-buffer size // Here we do not handle packets that exceed packet-buffer size
if ((e1000->rx_ring.desc[head].desc_status & 3) == 1) { if ((e1000->rx_ring.desc[head].desc_status & 3) == 1) {
cprintf("NIC READ: Oversized packet\n"); cprintf("NIC READ: Oversized packet\n");
goto next; goto next;
} }
/* Check if the packet is a valid size for the uIP buffer configuration */ /* Check if the packet is a valid size for the uIP buffer configuration */
// get the number of actual data-bytes in this packet // get the number of actual data-bytes in this packet
cnt = e1000->rx_ring.desc[head].packet_length; cnt = e1000->rx_ring.desc[head].packet_length;
if (cnt > CONFIG_NET_BUFSIZE || cnt < 14) { if (cnt > CONFIG_NET_BUFSIZE || cnt < 14) {
cprintf("NIC READ: invalid package size\n"); cprintf("NIC READ: invalid package size\n");
goto next; goto next;
} }
/* Copy the data data from the hardware to e1000->uip_dev.d_buf. Set /* Copy the data data from the hardware to e1000->uip_dev.d_buf. Set
* amount of data in e1000->uip_dev.d_len * amount of data in e1000->uip_dev.d_len
*/ */
// now we try to copy these data-bytes to the UIP buffer // now we try to copy these data-bytes to the UIP buffer
memcpy(e1000->uip_dev.d_buf, cp, cnt); memcpy(e1000->uip_dev.d_buf, cp, cnt);
e1000->uip_dev.d_len = cnt; e1000->uip_dev.d_len = cnt;
/* We only accept IP packets of the configured type and ARP packets */ /* We only accept IP packets of the configured type and ARP packets */
#ifdef CONFIG_NET_IPv6 #ifdef CONFIG_NET_IPv6
if (BUF->type == HTONS(UIP_ETHTYPE_IP6)) if (BUF->type == HTONS(UIP_ETHTYPE_IP6))
#else #else
if (BUF->type == HTONS(UIP_ETHTYPE_IP)) if (BUF->type == HTONS(UIP_ETHTYPE_IP))
#endif #endif
{ {
uip_arp_ipin(&e1000->uip_dev); uip_arp_ipin(&e1000->uip_dev);
uip_input(&e1000->uip_dev); uip_input(&e1000->uip_dev);
/* If the above function invocation resulted in data that should be /* If the above function invocation resulted in data that should be
* sent out on the network, the field d_len will set to a value > 0. * sent out on the network, the field d_len will set to a value > 0.
*/ */
if (e1000->uip_dev.d_len > 0) { if (e1000->uip_dev.d_len > 0) {
uip_arp_out(&e1000->uip_dev); uip_arp_out(&e1000->uip_dev);
e1000_transmit(e1000); e1000_transmit(e1000);
} }
} }
else if (BUF->type == htons(UIP_ETHTYPE_ARP)) { else if (BUF->type == htons(UIP_ETHTYPE_ARP)) {
uip_arp_arpin(&e1000->uip_dev); uip_arp_arpin(&e1000->uip_dev);
/* If the above function invocation resulted in data that should be /* If the above function invocation resulted in data that should be
* sent out on the network, the field d_len will set to a value > 0. * sent out on the network, the field d_len will set to a value > 0.
*/ */
if (e1000->uip_dev.d_len > 0) { if (e1000->uip_dev.d_len > 0) {
e1000_transmit(e1000); e1000_transmit(e1000);
} }
} }
next: next:
e1000->rx_ring.desc[head].desc_status = 0; e1000->rx_ring.desc[head].desc_status = 0;
e1000->rx_ring.head = (head + 1) % CONFIG_E1000_N_RX_DESC; e1000->rx_ring.head = (head + 1) % CONFIG_E1000_N_RX_DESC;
e1000->rx_ring.free++; e1000->rx_ring.free++;
head = e1000->rx_ring.head; head = e1000->rx_ring.head;
cp = (unsigned char *)(e1000->rx_ring.buf + head * CONFIG_E1000_BUFF_SIZE); cp = (unsigned char *)(e1000->rx_ring.buf + head * CONFIG_E1000_BUFF_SIZE);
} }
} }
@ -616,7 +615,7 @@ static void e1000_polltimer(int argc, uint32_t arg, ...)
* the TX poll if he are unable to accept another packet for transmission. * the TX poll if he are unable to accept another packet for transmission.
*/ */
if (!e1000->tx_ring.desc[tail].desc_status) if (!e1000->tx_ring.desc[tail].desc_status)
return; return;
/* If so, update TCP timing states and poll uIP for new XMIT data. Hmmm.. /* If so, update TCP timing states and poll uIP for new XMIT data. Hmmm..
* might be bug here. Does this mean if there is a transmit in progress, * might be bug here. Does this mean if there is a transmit in progress,
@ -652,8 +651,8 @@ static int e1000_ifup(struct uip_driver_s *dev)
struct e1000_dev *e1000 = (struct e1000_dev *)dev->d_private; struct e1000_dev *e1000 = (struct e1000_dev *)dev->d_private;
ndbg("Bringing up: %d.%d.%d.%d\n", ndbg("Bringing up: %d.%d.%d.%d\n",
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24 ); (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24 );
/* Initialize PHYs, the Ethernet interface, and setup up Ethernet interrupts */ /* Initialize PHYs, the Ethernet interface, and setup up Ethernet interrupts */
e1000_init(e1000); e1000_init(e1000);
@ -663,9 +662,9 @@ static int e1000_ifup(struct uip_driver_s *dev)
(void)wd_start(e1000->txpoll, E1000_WDDELAY, e1000_polltimer, 1, (uint32_t)e1000); (void)wd_start(e1000->txpoll, E1000_WDDELAY, e1000_polltimer, 1, (uint32_t)e1000);
if (e1000_inl(e1000, E1000_STATUS) & 2) if (e1000_inl(e1000, E1000_STATUS) & 2)
e1000->bifup = true; e1000->bifup = true;
else else
e1000->bifup = false; e1000->bifup = false;
return OK; return OK;
} }
@ -750,9 +749,9 @@ static int e1000_txavail(struct uip_driver_s *dev)
/* Ignore the notification if the interface is not yet up */ /* Ignore the notification if the interface is not yet up */
if (e1000->bifup) { if (e1000->bifup) {
/* Check if there is room in the hardware to hold another outgoing packet. */ /* Check if there is room in the hardware to hold another outgoing packet. */
if (e1000->tx_ring.desc[tail].desc_status) if (e1000->tx_ring.desc[tail].desc_status)
(void)uip_poll(&e1000->uip_dev, e1000_uiptxpoll); (void)uip_poll(&e1000->uip_dev, e1000_uiptxpoll);
} }
irqrestore(flags); irqrestore(flags);
@ -780,11 +779,11 @@ static int e1000_txavail(struct uip_driver_s *dev)
#ifdef CONFIG_NET_IGMP #ifdef CONFIG_NET_IGMP
static int e1000_addmac(struct uip_driver_s *dev, const uint8_t *mac) static int e1000_addmac(struct uip_driver_s *dev, const uint8_t *mac)
{ {
struct e1000_dev *e1000 = (struct e1000_dev *)dev->d_private; struct e1000_dev *e1000 = (struct e1000_dev *)dev->d_private;
/* Add the MAC address to the hardware multicast routing table */ /* Add the MAC address to the hardware multicast routing table */
return OK; return OK;
} }
#endif #endif
@ -809,15 +808,15 @@ static int e1000_addmac(struct uip_driver_s *dev, const uint8_t *mac)
#ifdef CONFIG_NET_IGMP #ifdef CONFIG_NET_IGMP
static int e1000_rmmac(struct uip_driver_s *dev, const uint8_t *mac) static int e1000_rmmac(struct uip_driver_s *dev, const uint8_t *mac)
{ {
struct e1000_dev *e1000 = (struct e1000_dev *)dev->d_private; struct e1000_dev *e1000 = (struct e1000_dev *)dev->d_private;
/* Add the MAC address to the hardware multicast routing table */ /* Add the MAC address to the hardware multicast routing table */
return OK; return OK;
} }
#endif #endif
static irqreturn_t e1000_interrupt_handler(int irq, void *dev_id) irqreturn_t e1000_interrupt_handler(struct Trapframe *tf, void *dev_id)
{ {
struct e1000_dev *e1000 = (struct e1000_dev *)dev_id; struct e1000_dev *e1000 = (struct e1000_dev *)dev_id;
@ -827,27 +826,27 @@ static irqreturn_t e1000_interrupt_handler(int irq, void *dev_id)
// not for me // not for me
if (intr_cause == 0) if (intr_cause == 0)
return IRQ_NONE; return IRQ_NONE;
/* Handle interrupts according to status bit settings */ /* Handle interrupts according to status bit settings */
// Link status change // Link status change
if (intr_cause & (1<<2)) { if (intr_cause & (1<<2)) {
if (e1000_inl(e1000, E1000_STATUS) & 2) if (e1000_inl(e1000, E1000_STATUS) & 2)
e1000->bifup = true; e1000->bifup = true;
else else
e1000->bifup = false; e1000->bifup = false;
} }
/* Check if we received an incoming packet, if so, call skel_receive() */ /* Check if we received an incoming packet, if so, call skel_receive() */
// Rx-descriptor Timer expired // Rx-descriptor Timer expired
if (intr_cause & (1<<7)) if (intr_cause & (1<<7))
e1000_receive(e1000); e1000_receive(e1000);
// Tx queue empty // Tx queue empty
if (intr_cause & (1<<1)) if (intr_cause & (1<<1))
wd_cancel(e1000->txtimeout); wd_cancel(e1000->txtimeout);
/* Check is a packet transmission just completed. If so, call skel_txdone. /* Check is a packet transmission just completed. If so, call skel_txdone.
* This may disable further Tx interrupts if there are no pending * This may disable further Tx interrupts if there are no pending
@ -856,17 +855,17 @@ static irqreturn_t e1000_interrupt_handler(int irq, void *dev_id)
// Tx-descriptor Written back // Tx-descriptor Written back
if (intr_cause & (1<<0)) if (intr_cause & (1<<0))
uip_poll(&e1000->uip_dev, e1000_uiptxpoll); uip_poll(&e1000->uip_dev, e1000_uiptxpoll);
// Rx-Descriptors Low // Rx-Descriptors Low
if (intr_cause & (1<<4)) { if (intr_cause & (1<<4)) {
int tail; int tail;
tail = e1000->rx_ring.tail + e1000->rx_ring.free; tail = e1000->rx_ring.tail + e1000->rx_ring.free;
tail %= CONFIG_E1000_N_RX_DESC; tail %= CONFIG_E1000_N_RX_DESC;
e1000->rx_ring.tail = tail; e1000->rx_ring.tail = tail;
e1000->rx_ring.free = 0; e1000->rx_ring.free = 0;
e1000_outl(e1000, E1000_RDT, tail); e1000_outl(e1000, E1000_RDT, tail);
} }
return IRQ_HANDLED; return IRQ_HANDLED;
@ -886,21 +885,20 @@ static pci_id_t e1000_id_table[] = {
static int e1000_probe(uint16_t addr, pci_id_t id) static int e1000_probe(uint16_t addr, pci_id_t id)
{ {
uint32_t mmio_base, mmio_size; uint32_t mmio_base, mmio_size;
uint32_t size; uint32_t pci_cmd, size;
int err; int err, irq, flags;
void *kmem, *omem; void *kmem, *omem;
struct e1000_dev *dev; struct e1000_dev *dev;
// alloc e1000_dev memory // alloc e1000_dev memory
if ((dev = kzalloc(sizeof(struct e1000_dev))) == NULL) dev = kzalloc(sizeof(struct e1000_dev));
return -1; if (dev == NULL)
return -1;
// save pci addr
dev->pci_addr = addr;
// enable device // enable device
if ((err = pci_enable_device(addr, PCI_BUS_MASTER)) < 0) err = pci_enable_device(addr, PCI_RESOURCE_MEM);
goto error; if (err)
goto error;
// get e1000 device type // get e1000 device type
dev->pci_dev_id = id.join; dev->pci_dev_id = id.join;
@ -910,20 +908,33 @@ static int e1000_probe(uint16_t addr, pci_id_t id)
mmio_size = pci_resource_len(addr, 0); mmio_size = pci_resource_len(addr, 0);
err = rgmp_memmap_nocache(mmio_base, mmio_size, mmio_base); err = rgmp_memmap_nocache(mmio_base, mmio_size, mmio_base);
if (err) if (err)
goto error; goto error;
dev->phy_mem_base = mmio_base; dev->phy_mem_base = mmio_base;
dev->io_mem_base = mmio_base; dev->io_mem_base = mmio_base;
dev->mem_size = mmio_size; dev->mem_size = mmio_size;
// make sure the controller's Bus Master capability is enabled
pci_cmd = pci_config_readl(addr, PCI_COMMAND);
pci_cmd |= (1<<2);
pci_config_writel(addr, PCI_COMMAND, pci_cmd);
// MAC address // MAC address
memset(dev->dst_mac, 0xFF, 6); memset(dev->dst_mac, 0xFF, 6);
memcpy(dev->src_mac, (void *)(dev->io_mem_base+E1000_RA), 6); memcpy(dev->src_mac, (void *)(dev->io_mem_base+E1000_RA), 6);
// IRQ setup // get e1000 IRQ
flags = 0;
irq = pci_enable_msi(addr);
if (irq == 0) {
irq = pci_read_irq(addr);
flags |= IDC_SHARE;
}
dev->irq = irq;
dev->int_desc.handler = e1000_interrupt_handler; dev->int_desc.handler = e1000_interrupt_handler;
dev->int_desc.dev_id = dev; dev->int_desc.dev_id = dev;
if ((err = pci_request_irq(addr, &dev->int_desc, 0)) < 0) err = rgmp_request_irq(irq, &dev->int_desc, flags);
goto err0; if (err)
goto err0;
// Here we alloc a big block of memory once and make it // Here we alloc a big block of memory once and make it
// aligned to page boundary and multiple of page size. This // aligned to page boundary and multiple of page size. This
@ -931,19 +942,15 @@ static int e1000_probe(uint16_t addr, pci_id_t id)
// should be mapped no-cache which will hugely reduce memory // should be mapped no-cache which will hugely reduce memory
// access performance. The page size alloc will restrict // access performance. The page size alloc will restrict
// this bad effect only within the memory we alloc here. // this bad effect only within the memory we alloc here.
//
// NEED FIX: the memalign may alloc memory continous in
// virtual address but dis-continous in physical address
// due to RGMP memory setup.
size = CONFIG_E1000_N_TX_DESC * sizeof(struct tx_desc) + size = CONFIG_E1000_N_TX_DESC * sizeof(struct tx_desc) +
CONFIG_E1000_N_TX_DESC * CONFIG_E1000_BUFF_SIZE + CONFIG_E1000_N_TX_DESC * CONFIG_E1000_BUFF_SIZE +
CONFIG_E1000_N_RX_DESC * sizeof(struct rx_desc) + CONFIG_E1000_N_RX_DESC * sizeof(struct rx_desc) +
CONFIG_E1000_N_RX_DESC * CONFIG_E1000_BUFF_SIZE; CONFIG_E1000_N_RX_DESC * CONFIG_E1000_BUFF_SIZE;
size = ROUNDUP(size, PGSIZE); size = ROUNDUP(size, PGSIZE);
omem = kmem = memalign(PGSIZE, size); omem = kmem = memalign(PGSIZE, size);
if (kmem == NULL) { if (kmem == NULL) {
err = -ENOMEM; err = -ENOMEM;
goto err1; goto err1;
} }
rgmp_memremap_nocache((uintptr_t)kmem, size); rgmp_memremap_nocache((uintptr_t)kmem, size);
@ -984,7 +991,7 @@ static int e1000_probe(uint16_t addr, pci_id_t id)
/* Register the device with the OS so that socket IOCTLs can be performed */ /* Register the device with the OS so that socket IOCTLs can be performed */
err = netdev_register(&dev->uip_dev); err = netdev_register(&dev->uip_dev);
if (err) if (err)
goto err2; goto err2;
// insert into e1000_list // insert into e1000_list
dev->next = e1000_list.next; dev->next = e1000_list.next;
@ -993,14 +1000,14 @@ static int e1000_probe(uint16_t addr, pci_id_t id)
return 0; return 0;
err2: err2:
rgmp_memremap((uintptr_t)omem, size); rgmp_memremap((uintptr_t)omem, size);
free(omem); free(omem);
err1: err1:
pci_free_irq(addr); rgmp_free_irq(irq, &dev->int_desc);
err0: err0:
rgmp_memunmap(mmio_base, mmio_size); rgmp_memunmap(mmio_base, mmio_size);
error: error:
kfree(dev); kfree(dev);
cprintf("e1000 device probe fail: %d\n", err); cprintf("e1000 device probe fail: %d\n", err);
return err; return err;
@ -1021,21 +1028,21 @@ void e1000_mod_exit(void)
struct e1000_dev *dev; struct e1000_dev *dev;
size = CONFIG_E1000_N_TX_DESC * sizeof(struct tx_desc) + size = CONFIG_E1000_N_TX_DESC * sizeof(struct tx_desc) +
CONFIG_E1000_N_TX_DESC * CONFIG_E1000_BUFF_SIZE + CONFIG_E1000_N_TX_DESC * CONFIG_E1000_BUFF_SIZE +
CONFIG_E1000_N_RX_DESC * sizeof(struct rx_desc) + CONFIG_E1000_N_RX_DESC * sizeof(struct rx_desc) +
CONFIG_E1000_N_RX_DESC * CONFIG_E1000_BUFF_SIZE; CONFIG_E1000_N_RX_DESC * CONFIG_E1000_BUFF_SIZE;
size = ROUNDUP(size, PGSIZE); size = ROUNDUP(size, PGSIZE);
for (dev=e1000_list.next; dev!=NULL; dev=dev->next) { for (dev=e1000_list.next; dev!=NULL; dev=dev->next) {
netdev_unregister(&dev->uip_dev); netdev_unregister(&dev->uip_dev);
e1000_reset(dev); e1000_reset(dev);
wd_delete(dev->txpoll); wd_delete(dev->txpoll);
wd_delete(dev->txtimeout); wd_delete(dev->txtimeout);
rgmp_memremap((uintptr_t)dev->tx_ring.desc, size); rgmp_memremap((uintptr_t)dev->tx_ring.desc, size);
free(dev->tx_ring.desc); free(dev->tx_ring.desc);
pci_free_irq(dev->pci_addr); rgmp_free_irq(dev->irq, &dev->int_desc);
rgmp_memunmap((uintptr_t)dev->io_mem_base, dev->mem_size); rgmp_memunmap((uintptr_t)dev->io_mem_base, dev->mem_size);
kfree(dev); kfree(dev);
} }
e1000_list.next = NULL; e1000_list.next = NULL;

View File

@ -44,7 +44,9 @@
* Included Files * Included Files
****************************************************************************/ ****************************************************************************/
#include <stdint.h> #include <rgmp/types.h>
#include <rgmp/trap.h>
#include <rgmp/arch/arch.h>
/**************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions

View File

@ -168,30 +168,30 @@ static int vnet_transmit(FAR struct vnet_driver_s *vnet)
{ {
int err; int err;
/* Verify that the hardware is ready to send another packet. If we get /* Verify that the hardware is ready to send another packet. If we get
* here, then we are committed to sending a packet; Higher level logic * here, then we are committed to sending a packet; Higher level logic
* must have assured that there is not transmission in progress. * must have assured that there is not transmission in progress.
*/ */
/* Increment statistics */ /* Increment statistics */
/* Send the packet: address=vnet->sk_dev.d_buf, length=vnet->sk_dev.d_len */ /* Send the packet: address=vnet->sk_dev.d_buf, length=vnet->sk_dev.d_len */
err = vnet_xmit(vnet->vnet, (char *)vnet->sk_dev.d_buf, vnet->sk_dev.d_len); err = vnet_xmit(vnet->vnet, (char *)vnet->sk_dev.d_buf, vnet->sk_dev.d_len);
if (err) { if (err) {
/* Setup the TX timeout watchdog (perhaps restarting the timer) */ /* Setup the TX timeout watchdog (perhaps restarting the timer) */
//(void)wd_start(vnet->sk_txtimeout, VNET_TXTIMEOUT, vnet_txtimeout, 1, (uint32_t)vnet); //(void)wd_start(vnet->sk_txtimeout, VNET_TXTIMEOUT, vnet_txtimeout, 1, (uint32_t)vnet);
// When vnet_xmit fail, it means TX buffer is full. Watchdog // When vnet_xmit fail, it means TX buffer is full. Watchdog
// is of no use here because no TX done INT will happen. So // is of no use here because no TX done INT will happen. So
// we reset the TX buffer directly. // we reset the TX buffer directly.
#ifdef CONFIG_DEBUG #ifdef CONFIG_DEBUG
cprintf("VNET: TX buffer is full\n"); cprintf("VNET: TX buffer is full\n");
#endif #endif
return ERROR; return ERROR;
} }
else { else {
// this step may be unnecessary here // this step may be unnecessary here
vnet_txdone(vnet); vnet_txdone(vnet);
} }
return OK; return OK;
@ -223,29 +223,29 @@ static int vnet_transmit(FAR struct vnet_driver_s *vnet)
static int vnet_uiptxpoll(struct uip_driver_s *dev) static int vnet_uiptxpoll(struct uip_driver_s *dev)
{ {
FAR struct vnet_driver_s *vnet = (FAR struct vnet_driver_s *)dev->d_private; FAR struct vnet_driver_s *vnet = (FAR struct vnet_driver_s *)dev->d_private;
/* If the polling resulted in data that should be sent out on the network, /* If the polling resulted in data that should be sent out on the network,
* the field d_len is set to a value > 0. * the field d_len is set to a value > 0.
*/ */
if (vnet->sk_dev.d_len > 0) if (vnet->sk_dev.d_len > 0)
{ {
uip_arp_out(&vnet->sk_dev); uip_arp_out(&vnet->sk_dev);
vnet_transmit(vnet); vnet_transmit(vnet);
/* Check if there is room in the device to hold another packet. If not, /* Check if there is room in the device to hold another packet. If not,
* return a non-zero value to terminate the poll. * return a non-zero value to terminate the poll.
*/ */
if (vnet_is_txbuff_full(vnet->vnet)) if (vnet_is_txbuff_full(vnet->vnet))
return 1; return 1;
} }
/* If zero is returned, the polling will continue until all connections have /* If zero is returned, the polling will continue until all connections have
* been examined. * been examined.
*/ */
return 0; return 0;
} }
/**************************************************************************** /****************************************************************************
@ -265,53 +265,54 @@ static int vnet_uiptxpoll(struct uip_driver_s *dev)
* *
****************************************************************************/ ****************************************************************************/
void rtos_vnet_recv(struct rgmp_vnet *rgmp_vnet, char *data, int len) void rtos_vnet_recv(struct rgmp_vnet *vnet_dummy, char *data, int len)
{ {
struct vnet_driver_s *vnet = rgmp_vnet->priv; // now only support 1 vnet
struct vnet_driver_s *vnet = &g_vnet[0];
do { do {
/* Check for errors and update statistics */ /* Check for errors and update statistics */
/* Check if the packet is a valid size for the uIP buffer configuration */ /* Check if the packet is a valid size for the uIP buffer configuration */
if (len > CONFIG_NET_BUFSIZE || len < 14) { if (len > CONFIG_NET_BUFSIZE || len < 14) {
#ifdef CONFIG_DEBUG #ifdef CONFIG_DEBUG
cprintf("VNET: receive invalid packet of size %d\n", len); cprintf("VNET: receive invalid packet of size %d\n", len);
#endif #endif
return; return;
} }
// Copy the data data from the hardware to vnet->sk_dev.d_buf. Set // Copy the data data from the hardware to vnet->sk_dev.d_buf. Set
// amount of data in vnet->sk_dev.d_len // amount of data in vnet->sk_dev.d_len
memcpy(vnet->sk_dev.d_buf, data, len); memcpy(vnet->sk_dev.d_buf, data, len);
vnet->sk_dev.d_len = len; vnet->sk_dev.d_len = len;
/* We only accept IP packets of the configured type and ARP packets */ /* We only accept IP packets of the configured type and ARP packets */
#ifdef CONFIG_NET_IPv6 #ifdef CONFIG_NET_IPv6
if (BUF->type == HTONS(UIP_ETHTYPE_IP6)) if (BUF->type == HTONS(UIP_ETHTYPE_IP6))
#else #else
if (BUF->type == HTONS(UIP_ETHTYPE_IP)) if (BUF->type == HTONS(UIP_ETHTYPE_IP))
#endif #endif
{ {
uip_arp_ipin(&vnet->sk_dev); uip_arp_ipin(&vnet->sk_dev);
uip_input(&vnet->sk_dev); uip_input(&vnet->sk_dev);
// If the above function invocation resulted in data that should be // If the above function invocation resulted in data that should be
// sent out on the network, the field d_len will set to a value > 0. // sent out on the network, the field d_len will set to a value > 0.
if (vnet->sk_dev.d_len > 0) { if (vnet->sk_dev.d_len > 0) {
uip_arp_out(&vnet->sk_dev); uip_arp_out(&vnet->sk_dev);
vnet_transmit(vnet); vnet_transmit(vnet);
} }
} }
else if (BUF->type == htons(UIP_ETHTYPE_ARP)) { else if (BUF->type == htons(UIP_ETHTYPE_ARP)) {
uip_arp_arpin(&vnet->sk_dev); uip_arp_arpin(&vnet->sk_dev);
// If the above function invocation resulted in data that should be // If the above function invocation resulted in data that should be
// sent out on the network, the field d_len will set to a value > 0. // sent out on the network, the field d_len will set to a value > 0.
if (vnet->sk_dev.d_len > 0) { if (vnet->sk_dev.d_len > 0) {
vnet_transmit(vnet); vnet_transmit(vnet);
} }
} }
} }
while (0); /* While there are more packets to be processed */ while (0); /* While there are more packets to be processed */
} }
@ -335,17 +336,17 @@ void rtos_vnet_recv(struct rgmp_vnet *rgmp_vnet, char *data, int len)
static void vnet_txdone(FAR struct vnet_driver_s *vnet) static void vnet_txdone(FAR struct vnet_driver_s *vnet)
{ {
/* Check for errors and update statistics */ /* Check for errors and update statistics */
/* If no further xmits are pending, then cancel the TX timeout and /* If no further xmits are pending, then cancel the TX timeout and
* disable further Tx interrupts. * disable further Tx interrupts.
*/ */
//wd_cancel(vnet->sk_txtimeout); //wd_cancel(vnet->sk_txtimeout);
/* Then poll uIP for new XMIT data */ /* Then poll uIP for new XMIT data */
(void)uip_poll(&vnet->sk_dev, vnet_uiptxpoll); (void)uip_poll(&vnet->sk_dev, vnet_uiptxpoll);
} }
/**************************************************************************** /****************************************************************************
@ -369,15 +370,15 @@ static void vnet_txdone(FAR struct vnet_driver_s *vnet)
static void vnet_txtimeout(int argc, uint32_t arg, ...) static void vnet_txtimeout(int argc, uint32_t arg, ...)
{ {
FAR struct vnet_driver_s *vnet = (FAR struct vnet_driver_s *)arg; FAR struct vnet_driver_s *vnet = (FAR struct vnet_driver_s *)arg;
/* Increment statistics and dump debug info */ /* Increment statistics and dump debug info */
/* Then reset the hardware */ /* Then reset the hardware */
/* Then poll uIP for new XMIT data */ /* Then poll uIP for new XMIT data */
(void)uip_poll(&vnet->sk_dev, vnet_uiptxpoll); (void)uip_poll(&vnet->sk_dev, vnet_uiptxpoll);
} }
/**************************************************************************** /****************************************************************************
@ -400,28 +401,28 @@ static void vnet_txtimeout(int argc, uint32_t arg, ...)
static void vnet_polltimer(int argc, uint32_t arg, ...) static void vnet_polltimer(int argc, uint32_t arg, ...)
{ {
FAR struct vnet_driver_s *vnet = (FAR struct vnet_driver_s *)arg; FAR struct vnet_driver_s *vnet = (FAR struct vnet_driver_s *)arg;
/* Check if there is room in the send another TX packet. We cannot perform /* Check if there is room in the send another TX packet. We cannot perform
* the TX poll if he are unable to accept another packet for transmission. * the TX poll if he are unable to accept another packet for transmission.
*/ */
if (vnet_is_txbuff_full(vnet->vnet)) { if (vnet_is_txbuff_full(vnet->vnet)) {
#ifdef CONFIG_DEBUG #ifdef CONFIG_DEBUG
cprintf("VNET: TX buffer is full\n"); cprintf("VNET: TX buffer is full\n");
#endif #endif
return; return;
} }
/* If so, update TCP timing states and poll uIP for new XMIT data. Hmmm.. /* If so, update TCP timing states and poll uIP for new XMIT data. Hmmm..
* might be bug here. Does this mean if there is a transmit in progress, * might be bug here. Does this mean if there is a transmit in progress,
* we will missing TCP time state updates? * we will missing TCP time state updates?
*/ */
(void)uip_timer(&vnet->sk_dev, vnet_uiptxpoll, VNET_POLLHSEC); (void)uip_timer(&vnet->sk_dev, vnet_uiptxpoll, VNET_POLLHSEC);
/* Setup the watchdog poll timer again */ /* Setup the watchdog poll timer again */
(void)wd_start(vnet->sk_txpoll, VNET_WDDELAY, vnet_polltimer, 1, arg); (void)wd_start(vnet->sk_txpoll, VNET_WDDELAY, vnet_polltimer, 1, arg);
} }
/**************************************************************************** /****************************************************************************
@ -443,20 +444,20 @@ static void vnet_polltimer(int argc, uint32_t arg, ...)
static int vnet_ifup(struct uip_driver_s *dev) static int vnet_ifup(struct uip_driver_s *dev)
{ {
FAR struct vnet_driver_s *vnet = (FAR struct vnet_driver_s *)dev->d_private; FAR struct vnet_driver_s *vnet = (FAR struct vnet_driver_s *)dev->d_private;
ndbg("Bringing up: %d.%d.%d.%d\n", ndbg("Bringing up: %d.%d.%d.%d\n",
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff, dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24 ); (dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24 );
/* Initialize PHYs, the Ethernet interface, and setup up Ethernet interrupts */ /* Initialize PHYs, the Ethernet interface, and setup up Ethernet interrupts */
/* Set and activate a timer process */ /* Set and activate a timer process */
(void)wd_start(vnet->sk_txpoll, VNET_WDDELAY, vnet_polltimer, 1, (uint32_t)vnet); (void)wd_start(vnet->sk_txpoll, VNET_WDDELAY, vnet_polltimer, 1, (uint32_t)vnet);
vnet->sk_bifup = true; vnet->sk_bifup = true;
return OK; return OK;
} }
/**************************************************************************** /****************************************************************************
@ -477,28 +478,28 @@ static int vnet_ifup(struct uip_driver_s *dev)
static int vnet_ifdown(struct uip_driver_s *dev) static int vnet_ifdown(struct uip_driver_s *dev)
{ {
FAR struct vnet_driver_s *vnet = (FAR struct vnet_driver_s *)dev->d_private; FAR struct vnet_driver_s *vnet = (FAR struct vnet_driver_s *)dev->d_private;
irqstate_t flags; irqstate_t flags;
/* Disable the Ethernet interrupt */ /* Disable the Ethernet interrupt */
flags = irqsave(); flags = irqsave();
/* Cancel the TX poll timer and TX timeout timers */ /* Cancel the TX poll timer and TX timeout timers */
wd_cancel(vnet->sk_txpoll); wd_cancel(vnet->sk_txpoll);
//wd_cancel(vnet->sk_txtimeout); //wd_cancel(vnet->sk_txtimeout);
/* Put the the EMAC is its reset, non-operational state. This should be /* Put the the EMAC is its reset, non-operational state. This should be
* a known configuration that will guarantee the vnet_ifup() always * a known configuration that will guarantee the vnet_ifup() always
* successfully brings the interface back up. * successfully brings the interface back up.
*/ */
/* Mark the device "down" */ /* Mark the device "down" */
vnet->sk_bifup = false; vnet->sk_bifup = false;
irqrestore(flags); irqrestore(flags);
return OK; return OK;
} }
/**************************************************************************** /****************************************************************************
@ -522,35 +523,35 @@ static int vnet_ifdown(struct uip_driver_s *dev)
static int vnet_txavail(struct uip_driver_s *dev) static int vnet_txavail(struct uip_driver_s *dev)
{ {
FAR struct vnet_driver_s *vnet = (FAR struct vnet_driver_s *)dev->d_private; FAR struct vnet_driver_s *vnet = (FAR struct vnet_driver_s *)dev->d_private;
irqstate_t flags; irqstate_t flags;
/* Disable interrupts because this function may be called from interrupt /* Disable interrupts because this function may be called from interrupt
* level processing. * level processing.
*/ */
flags = irqsave(); flags = irqsave();
/* Ignore the notification if the interface is not yet up */ /* Ignore the notification if the interface is not yet up */
if (vnet->sk_bifup) if (vnet->sk_bifup)
{ {
/* Check if there is room in the hardware to hold another outgoing packet. */ /* Check if there is room in the hardware to hold another outgoing packet. */
if (vnet_is_txbuff_full(vnet->vnet)) { if (vnet_is_txbuff_full(vnet->vnet)) {
#ifdef CONFIG_DEBUG #ifdef CONFIG_DEBUG
cprintf("VNET: TX buffer is full\n"); cprintf("VNET: TX buffer is full\n");
#endif #endif
goto out; goto out;
} }
/* If so, then poll uIP for new XMIT data */ /* If so, then poll uIP for new XMIT data */
(void)uip_poll(&vnet->sk_dev, vnet_uiptxpoll); (void)uip_poll(&vnet->sk_dev, vnet_uiptxpoll);
} }
out: out:
irqrestore(flags); irqrestore(flags);
return OK; return OK;
} }
/**************************************************************************** /****************************************************************************
@ -574,11 +575,11 @@ out:
#ifdef CONFIG_NET_IGMP #ifdef CONFIG_NET_IGMP
static int vnet_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac) static int vnet_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac)
{ {
FAR struct vnet_driver_s *vnet = (FAR struct vnet_driver_s *)dev->d_private; FAR struct vnet_driver_s *vnet = (FAR struct vnet_driver_s *)dev->d_private;
/* Add the MAC address to the hardware multicast routing table */ /* Add the MAC address to the hardware multicast routing table */
return OK; return OK;
} }
#endif #endif
@ -603,11 +604,11 @@ static int vnet_addmac(struct uip_driver_s *dev, FAR const uint8_t *mac)
#ifdef CONFIG_NET_IGMP #ifdef CONFIG_NET_IGMP
static int vnet_rmmac(struct uip_driver_s *dev, FAR const uint8_t *mac) static int vnet_rmmac(struct uip_driver_s *dev, FAR const uint8_t *mac)
{ {
FAR struct vnet_driver_s *vnet = (FAR struct vnet_driver_s *)dev->d_private; FAR struct vnet_driver_s *vnet = (FAR struct vnet_driver_s *)dev->d_private;
/* Add the MAC address to the hardware multicast routing table */ /* Add the MAC address to the hardware multicast routing table */
return OK; return OK;
} }
#endif #endif
@ -632,41 +633,41 @@ static int vnet_rmmac(struct uip_driver_s *dev, FAR const uint8_t *mac)
* *
****************************************************************************/ ****************************************************************************/
int vnet_init(struct rgmp_vnet *vnet) void vnet_initialize(void)
{ {
struct vnet_driver_s *priv; struct vnet_driver_s *priv;
static int i = 0; struct rgmp_vnet *vnet = vnet_list.next;
int i;
if (i >= CONFIG_VNET_NINTERFACES) for (i=0; i<CONFIG_VNET_NINTERFACES; i++) {
return -1; if (vnet == NULL)
break;
priv = &g_vnet[i];
priv = &g_vnet[i++]; /* Initialize the driver structure */
/* Initialize the driver structure */ memset(priv, 0, sizeof(struct vnet_driver_s));
priv->sk_dev.d_ifup = vnet_ifup; /* I/F down callback */
memset(priv, 0, sizeof(struct vnet_driver_s)); priv->sk_dev.d_ifdown = vnet_ifdown; /* I/F up (new IP address) callback */
priv->sk_dev.d_ifup = vnet_ifup; /* I/F down callback */ priv->sk_dev.d_txavail = vnet_txavail; /* New TX data callback */
priv->sk_dev.d_ifdown = vnet_ifdown; /* I/F up (new IP address) callback */
priv->sk_dev.d_txavail = vnet_txavail; /* New TX data callback */
#ifdef CONFIG_NET_IGMP #ifdef CONFIG_NET_IGMP
priv->sk_dev.d_addmac = vnet_addmac; /* Add multicast MAC address */ priv->sk_dev.d_addmac = vnet_addmac; /* Add multicast MAC address */
priv->sk_dev.d_rmmac = vnet_rmmac; /* Remove multicast MAC address */ priv->sk_dev.d_rmmac = vnet_rmmac; /* Remove multicast MAC address */
#endif #endif
priv->sk_dev.d_private = (void*)priv; /* Used to recover private state from dev */ priv->sk_dev.d_private = (void*)g_vnet; /* Used to recover private state from dev */
/* Create a watchdog for timing polling for and timing of transmisstions */ /* Create a watchdog for timing polling for and timing of transmisstions */
priv->sk_txpoll = wd_create(); /* Create periodic poll timer */ priv->sk_txpoll = wd_create(); /* Create periodic poll timer */
//priv->sk_txtimeout = wd_create(); /* Create TX timeout timer */ //priv->sk_txtimeout = wd_create(); /* Create TX timeout timer */
priv->vnet = vnet; priv->vnet = vnet;
vnet->priv = priv;
/* Register the device with the OS */ /* Register the device with the OS */
(void)netdev_register(&priv->sk_dev); (void)netdev_register(&priv->sk_dev);
vnet = vnet->next;
return 0; }
} }
#endif /* CONFIG_NET && CONFIG_NET_VNET */ #endif /* CONFIG_NET && CONFIG_NET_VNET */

View File

@ -47,7 +47,7 @@ CSRCS += pm_activity.c pm_changestate.c pm_checkstate.c pm_initialize.c pm_regis
POWER_DEPPATH := --dep-path power POWER_DEPPATH := --dep-path power
POWER_VPATH := :power POWER_VPATH := :power
POWER_CFLAGS := ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/power} POWER_CFLAGS := ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/power}
endif endif
@ -73,7 +73,7 @@ endif
POWER_DEPPATH := --dep-path power POWER_DEPPATH := --dep-path power
POWER_VPATH := :power POWER_VPATH := :power
POWER_CFLAGS := ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/power} POWER_CFLAGS := ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/power}
endif endif

View File

@ -1,7 +1,7 @@
############################################################################ ############################################################################
# drivers/sensors/Make.defs # drivers/sensors/Make.defs
# #
# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. # Copyright (C) 2011 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org> # Author: Gregory Nutt <gnutt@nuttx.org>
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -57,4 +57,4 @@ endif
DEPPATH += --dep-path sensors DEPPATH += --dep-path sensors
VPATH += :sensors VPATH += :sensors
CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/sensors} CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/sensors}

View File

@ -59,5 +59,5 @@ CSRCS += usbdev_trace.c usbdev_trprintf.c
DEPPATH += --dep-path usbdev DEPPATH += --dep-path usbdev
VPATH += :usbdev VPATH += :usbdev
CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/usbdev} CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/usbdev}
endif endif

View File

@ -132,7 +132,7 @@
/* USB Controller */ /* USB Controller */
#ifndef CONFIG_USBDEV_SELFPOWERED #ifndef CONFIG_USBDEV_SELFPOWERED
# define SELFPOWERED USB_CONFIG_ATTR_SELFPOWER # define SELFPOWERED USB_CONFIG_ATT_SELFPOWER
#else #else
# define SELFPOWERED (0) # define SELFPOWERED (0)
#endif #endif

View File

@ -227,7 +227,7 @@
/* USB Controller */ /* USB Controller */
#ifndef CONFIG_USBDEV_SELFPOWERED #ifndef CONFIG_USBDEV_SELFPOWERED
# define SELFPOWERED USB_CONFIG_ATTR_SELFPOWER # define SELFPOWERED USB_CONFIG_ATT_SELFPOWER
#else #else
# define SELFPOWERED (0) # define SELFPOWERED (0)
#endif #endif

View File

@ -1,7 +1,7 @@
############################################################################ ############################################################################
# drivers/usbhost/Make.defs # drivers/usbhost/Make.defs
# #
# Copyright (C) 2010-2012 Gregory Nutt. All rights reserved. # Copyright (C) 2010-2011 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org> # Author: Gregory Nutt <gnutt@nuttx.org>
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -54,4 +54,4 @@ endif
DEPPATH += --dep-path usbhost DEPPATH += --dep-path usbhost
VPATH += :usbhost VPATH += :usbhost
CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/usbhost} CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/usbhost}

View File

@ -1,7 +1,7 @@
############################################################################ ############################################################################
# drivers/wireless/Make.defs # drivers/wireless/Make.defs
# #
# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. # Copyright (C) 2011 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org> # Author: Gregory Nutt <gnutt@nuttx.org>
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -43,5 +43,5 @@ CSRCS += cc1101.c ISM1_868MHzGFSK100kbps.c ISM2_905MHzGFSK250kbps.c
DEPPATH += --dep-path wireless/cc1101 DEPPATH += --dep-path wireless/cc1101
VPATH += :wireless/cc1101 VPATH += :wireless/cc1101
CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/wireless/cc1101} CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/wireless/cc1101}
endif endif

View File

@ -120,21 +120,25 @@ $(COBJS): %$(OBJEXT): %.c
$(call COMPILE, $<, $@) $(call COMPILE, $<, $@)
$(BIN): $(OBJS) $(BIN): $(OBJS)
$(call ARCHIVE, $@, $(OBJS)) @( for obj in $(OBJS) ; do \
$(call ARCHIVE, $@, $${obj}); \
done ; )
.depend: Makefile $(SRCS) .depend: Makefile $(SRCS)
$(Q) $(MKDEP) --dep-path . $(MMAPDEPPATH) $(FATDEPPATH) $(ROMFSDEPPATH) $(NXFFSDEPPATH) $(NFSDEPPATH) \ @$(MKDEP) --dep-path . $(MMAPDEPPATH) $(FATDEPPATH) $(ROMFSDEPPATH) $(NXFFSDEPPATH) $(NFSDEPPATH) \
"$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
$(Q) touch $@ @touch $@
depend: .depend depend: .depend
clean: clean:
$(call DELFILE, $(BIN)) @rm -f $(BIN) *~ .*.swp
$(call CLEAN) $(call CLEAN)
@( for dir in $(SUBDIRS); do \
rm -f $${dir}/*~ $${dir}/.*.swp; \
done ; )
distclean: clean distclean: clean
$(call DELFILE, Make.dep) @rm -f Make.dep .depend
$(call DELFILE, .depend)
-include Make.dep -include Make.dep

View File

@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* fs/fs_stat.c * fs/fs_stat.c
* *
* Copyright (C) 2007-2009, 2012 Gregory Nutt. All rights reserved. * Copyright (C) 2007-2009 , 2012Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -122,8 +122,7 @@ static inline int statroot(FAR struct stat *buf)
/**************************************************************************** /****************************************************************************
* Name: stat * Name: stat
* *
* Returned Value: * Return: Zero on success; -1 on failure with errno set:
* Zero on success; -1 on failure with errno set:
* *
* EACCES Search permission is denied for one of the directories in the * EACCES Search permission is denied for one of the directories in the
* path prefix of path. * path prefix of path.
@ -135,7 +134,7 @@ static inline int statroot(FAR struct stat *buf)
* *
****************************************************************************/ ****************************************************************************/
int stat(FAR const char *path, FAR struct stat *buf) int stat(const char *path, FAR struct stat *buf)
{ {
FAR struct inode *inode; FAR struct inode *inode;
const char *relpath = NULL; const char *relpath = NULL;

View File

@ -33,6 +33,7 @@
# #
############################################################################ ############################################################################
-include $(TOPDIR)/.config
-include $(TOPDIR)/Make.defs -include $(TOPDIR)/Make.defs
DEPPATH = --dep-path . DEPPATH = --dep-path .
@ -43,34 +44,34 @@ endif
include nxglib/Make.defs include nxglib/Make.defs
DEPPATH += --dep-path nxglib DEPPATH += --dep-path nxglib
CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)/graphics/nxglib} CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/graphics/nxglib}
include nxbe/Make.defs include nxbe/Make.defs
DEPPATH += --dep-path nxbe DEPPATH += --dep-path nxbe
CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)/graphics/nxbe} CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/graphics/nxbe}
ifeq ($(CONFIG_NX_MULTIUSER),y) ifeq ($(CONFIG_NX_MULTIUSER),y)
include nxmu/Make.defs include nxmu/Make.defs
DEPPATH += --dep-path nxmu DEPPATH += --dep-path nxmu
CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)/graphics/nxmu} CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/graphics/nxmu}
else else
include nxsu/Make.defs include nxsu/Make.defs
DEPPATH += --dep-path nxsu DEPPATH += --dep-path nxsu
CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)/graphics/nxsu} CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/graphics/nxsu}
endif endif
include nxtk/Make.defs include nxtk/Make.defs
DEPPATH += --dep-path nxtk DEPPATH += --dep-path nxtk
CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)/graphics/nxtk} CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/graphics/nxtk}
include nxfonts/Make.defs include nxfonts/Make.defs
DEPPATH += --dep-path nxfonts DEPPATH += --dep-path nxfonts
CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)/graphics/nxfonts} CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/graphics/nxfonts}
ifeq ($(CONFIG_NXCONSOLE),y) ifeq ($(CONFIG_NXCONSOLE),y)
include nxconsole/Make.defs include nxconsole/Make.defs
DEPPATH += --dep-path nxconsole DEPPATH += --dep-path nxconsole
CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)/graphics/nxconsole} CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/graphics/nxconsole}
endif endif
ASRCS = $(NXGLIB_ASRCS) $(NXBE_ASRCS) $(NX_ASRCS) $(NXTK_ASRCS) $(NXFONTS_ASRCS) $(NXCON_ASRCS) ASRCS = $(NXGLIB_ASRCS) $(NXBE_ASRCS) $(NX_ASRCS) $(NXTK_ASRCS) $(NXFONTS_ASRCS) $(NXCON_ASRCS)
@ -96,84 +97,84 @@ all: mklibgraphics
gen32bppsources genfontsources gen32bppsources genfontsources
gen1bppsources: gen1bppsources:
$(Q) $(MAKE) -C nxglib -f Makefile.sources TOPDIR=$(TOPDIR) NXGLIB_BITSPERPIXEL=1 EXTRADEFINES=$(EXTRADEFINES) @$(MAKE) -C nxglib -f Makefile.sources TOPDIR=$(TOPDIR) NXGLIB_BITSPERPIXEL=1 EXTRADEFINES=$(EXTRADEFINES)
$(Q) $(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_BITSPERPIXEL=1 EXTRADEFINES=$(EXTRADEFINES) @$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_BITSPERPIXEL=1 EXTRADEFINES=$(EXTRADEFINES)
gen2bppsource: gen2bppsource:
$(Q) $(MAKE) -C nxglib -f Makefile.sources TOPDIR=$(TOPDIR) NXGLIB_BITSPERPIXEL=2 EXTRADEFINES=$(EXTRADEFINES) @$(MAKE) -C nxglib -f Makefile.sources TOPDIR=$(TOPDIR) NXGLIB_BITSPERPIXEL=2 EXTRADEFINES=$(EXTRADEFINES)
$(Q) $(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_BITSPERPIXEL=2 EXTRADEFINES=$(EXTRADEFINES) @$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_BITSPERPIXEL=2 EXTRADEFINES=$(EXTRADEFINES)
gen4bppsource: gen4bppsource:
$(Q) $(MAKE) -C nxglib -f Makefile.sources TOPDIR=$(TOPDIR) NXGLIB_BITSPERPIXEL=4 EXTRADEFINES=$(EXTRADEFINES) @$(MAKE) -C nxglib -f Makefile.sources TOPDIR=$(TOPDIR) NXGLIB_BITSPERPIXEL=4 EXTRADEFINES=$(EXTRADEFINES)
$(Q) $(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_BITSPERPIXEL=4 EXTRADEFINES=$(EXTRADEFINES) @$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_BITSPERPIXEL=4 EXTRADEFINES=$(EXTRADEFINES)
gen8bppsource: gen8bppsource:
$(Q) $(MAKE) -C nxglib -f Makefile.sources TOPDIR=$(TOPDIR) NXGLIB_BITSPERPIXEL=8 EXTRADEFINES=$(EXTRADEFINES) @$(MAKE) -C nxglib -f Makefile.sources TOPDIR=$(TOPDIR) NXGLIB_BITSPERPIXEL=8 EXTRADEFINES=$(EXTRADEFINES)
$(Q) $(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_BITSPERPIXEL=8 EXTRADEFINES=$(EXTRADEFINES) @$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_BITSPERPIXEL=8 EXTRADEFINES=$(EXTRADEFINES)
gen16bppsource: gen16bppsource:
$(Q) $(MAKE) -C nxglib -f Makefile.sources TOPDIR=$(TOPDIR) NXGLIB_BITSPERPIXEL=16 EXTRADEFINES=$(EXTRADEFINES) @$(MAKE) -C nxglib -f Makefile.sources TOPDIR=$(TOPDIR) NXGLIB_BITSPERPIXEL=16 EXTRADEFINES=$(EXTRADEFINES)
$(Q) $(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_BITSPERPIXEL=16 EXTRADEFINES=$(EXTRADEFINES) @$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_BITSPERPIXEL=16 EXTRADEFINES=$(EXTRADEFINES)
gen24bppsource: gen24bppsource:
$(Q) $(MAKE) -C nxglib -f Makefile.sources TOPDIR=$(TOPDIR) NXGLIB_BITSPERPIXEL=24 EXTRADEFINES=$(EXTRADEFINES) @$(MAKE) -C nxglib -f Makefile.sources TOPDIR=$(TOPDIR) NXGLIB_BITSPERPIXEL=24 EXTRADEFINES=$(EXTRADEFINES)
$(Q) $(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_BITSPERPIXEL=24 EXTRADEFINES=$(EXTRADEFINES) @$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_BITSPERPIXEL=24 EXTRADEFINES=$(EXTRADEFINES)
gen32bppsources: gen32bppsources:
$(Q) $(MAKE) -C nxglib -f Makefile.sources TOPDIR=$(TOPDIR) NXGLIB_BITSPERPIXEL=32 EXTRADEFINES=$(EXTRADEFINES) @$(MAKE) -C nxglib -f Makefile.sources TOPDIR=$(TOPDIR) NXGLIB_BITSPERPIXEL=32 EXTRADEFINES=$(EXTRADEFINES)
$(Q) $(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_BITSPERPIXEL=32 EXTRADEFINES=$(EXTRADEFINES) @$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_BITSPERPIXEL=32 EXTRADEFINES=$(EXTRADEFINES)
genfontsources: genfontsources:
ifeq ($(CONFIG_NXFONT_SANS23X27),y) ifeq ($(CONFIG_NXFONT_SANS23X27),y)
$(Q) $(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=1 EXTRADEFINES=$(EXTRADEFINES) @$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=1 EXTRADEFINES=$(EXTRADEFINES)
endif endif
ifeq ($(CONFIG_NXFONT_SANS22X29),y) ifeq ($(CONFIG_NXFONT_SANS22X29),y)
$(Q) $(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=2 EXTRADEFINES=$(EXTRADEFINES) @$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=2 EXTRADEFINES=$(EXTRADEFINES)
endif endif
ifeq ($(CONFIG_NXFONT_SANS28X37),y) ifeq ($(CONFIG_NXFONT_SANS28X37),y)
$(Q) $(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=3 EXTRADEFINES=$(EXTRADEFINES) @$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=3 EXTRADEFINES=$(EXTRADEFINES)
endif endif
ifeq ($(CONFIG_NXFONT_SANS39X48),y) ifeq ($(CONFIG_NXFONT_SANS39X48),y)
$(Q) $(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=4 EXTRADEFINES=$(EXTRADEFINES) @$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=4 EXTRADEFINES=$(EXTRADEFINES)
endif endif
ifeq ($(CONFIG_NXFONT_SANS17X23B),y) ifeq ($(CONFIG_NXFONT_SANS17X23B),y)
$(Q) $(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=16 EXTRADEFINES=$(EXTRADEFINES) @$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=16 EXTRADEFINES=$(EXTRADEFINES)
endif endif
ifeq ($(CONFIG_NXFONT_SANS20X27B),y) ifeq ($(CONFIG_NXFONT_SANS20X27B),y)
$(Q) $(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=17 EXTRADEFINES=$(EXTRADEFINES) @$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=17 EXTRADEFINES=$(EXTRADEFINES)
endif endif
ifeq ($(CONFIG_NXFONT_SANS22X29B),y) ifeq ($(CONFIG_NXFONT_SANS22X29B),y)
$(Q) $(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=5 EXTRADEFINES=$(EXTRADEFINES) @$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=5 EXTRADEFINES=$(EXTRADEFINES)
endif endif
ifeq ($(CONFIG_NXFONT_SANS28X37B),y) ifeq ($(CONFIG_NXFONT_SANS28X37B),y)
$(Q) $(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=6 EXTRADEFINES=$(EXTRADEFINES) @$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=6 EXTRADEFINES=$(EXTRADEFINES)
endif endif
ifeq ($(CONFIG_NXFONT_SANS40X49B),y) ifeq ($(CONFIG_NXFONT_SANS40X49B),y)
$(Q) $(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=7 EXTRADEFINES=$(EXTRADEFINES) @$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=7 EXTRADEFINES=$(EXTRADEFINES)
endif endif
ifeq ($(CONFIG_NXFONT_SERIF22X29),y) ifeq ($(CONFIG_NXFONT_SERIF22X29),y)
$(Q) $(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=8 EXTRADEFINES=$(EXTRADEFINES) @$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=8 EXTRADEFINES=$(EXTRADEFINES)
endif endif
ifeq ($(CONFIG_NXFONT_SERIF29X37),y) ifeq ($(CONFIG_NXFONT_SERIF29X37),y)
$(Q) $(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=9 EXTRADEFINES=$(EXTRADEFINES) @$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=9 EXTRADEFINES=$(EXTRADEFINES)
endif endif
ifeq ($(CONFIG_NXFONT_SERIF38X48),y) ifeq ($(CONFIG_NXFONT_SERIF38X48),y)
$(Q) $(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=10 EXTRADEFINES=$(EXTRADEFINES) @$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=10 EXTRADEFINES=$(EXTRADEFINES)
endif endif
ifeq ($(CONFIG_NXFONT_SERIF22X28B),y) ifeq ($(CONFIG_NXFONT_SERIF22X28B),y)
$(Q) $(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=11 EXTRADEFINES=$(EXTRADEFINES) @$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=11 EXTRADEFINES=$(EXTRADEFINES)
endif endif
ifeq ($(CONFIG_NXFONT_SERIF27X38B),y) ifeq ($(CONFIG_NXFONT_SERIF27X38B),y)
$(Q) $(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=12 EXTRADEFINES=$(EXTRADEFINES) @$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=12 EXTRADEFINES=$(EXTRADEFINES)
endif endif
ifeq ($(CONFIG_NXFONT_SERIF38X49B),y) ifeq ($(CONFIG_NXFONT_SERIF38X49B),y)
$(Q) $(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=13 EXTRADEFINES=$(EXTRADEFINES) @$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=13 EXTRADEFINES=$(EXTRADEFINES)
endif endif
ifeq ($(CONFIG_NXFONT_SANS17X22),y) ifeq ($(CONFIG_NXFONT_SANS17X22),y)
$(Q) $(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=14 EXTRADEFINES=$(EXTRADEFINES) @$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=14 EXTRADEFINES=$(EXTRADEFINES)
endif endif
ifeq ($(CONFIG_NXFONT_SANS20X26),y) ifeq ($(CONFIG_NXFONT_SANS20X26),y)
$(Q) $(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=15 EXTRADEFINES=$(EXTRADEFINES) @$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=15 EXTRADEFINES=$(EXTRADEFINES)
endif endif
gensources: gen1bppsources gen2bppsource gen4bppsource gen8bppsource gen16bppsource gen24bppsource gen32bppsources genfontsources gensources: gen1bppsources gen2bppsource gen4bppsource gen8bppsource gen16bppsource gen24bppsource gen32bppsources genfontsources
@ -185,29 +186,30 @@ $(COBJS): %$(OBJEXT): %.c
$(call COMPILE, $<, $@) $(call COMPILE, $<, $@)
$(BIN): $(OBJS) $(BIN): $(OBJS)
$(call ARCHIVE, $@, $(OBJS)) @( for obj in $(OBJS) ; do \
$(call ARCHIVE, $@, $${obj}); \
done ; )
mklibgraphics: gensources $(BIN) mklibgraphics: gensources $(BIN)
.depend: gensources Makefile $(SRCS) .depend: gensources Makefile $(SRCS)
$(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep @$(MKDEP) $(DEPPATH) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
$(Q) touch $@ @touch $@
depend: .depend depend: .depend
context: gensources context: gensources
clean: clean:
$(Q) $(MAKE) -C nxglib -f Makefile.sources clean TOPDIR=$(TOPDIR) EXTRADEFINES=$(EXTRADEFINES) @$(MAKE) -C nxglib -f Makefile.sources clean TOPDIR=$(TOPDIR) EXTRADEFINES=$(EXTRADEFINES)
$(Q) $(MAKE) -C nxfonts -f Makefile.sources clean TOPDIR=$(TOPDIR) EXTRADEFINES=$(EXTRADEFINES) @$(MAKE) -C nxfonts -f Makefile.sources clean TOPDIR=$(TOPDIR) EXTRADEFINES=$(EXTRADEFINES)
$(call DELFILE, $(BIN)) @rm -f $(BIN) *~ .*.swp
$(call CLEAN) $(call CLEAN)
distclean: clean distclean: clean
$(Q) $(MAKE) -C nxglib -f Makefile.sources distclean TOPDIR=$(TOPDIR) EXTRADEFINES=$(EXTRADEFINES) @$(MAKE) -C nxglib -f Makefile.sources distclean TOPDIR=$(TOPDIR) EXTRADEFINES=$(EXTRADEFINES)
$(Q) $(MAKE) -C nxfonts -f Makefile.sources distclean TOPDIR=$(TOPDIR) EXTRADEFINES=$(EXTRADEFINES) @$(MAKE) -C nxfonts -f Makefile.sources distclean TOPDIR=$(TOPDIR) EXTRADEFINES=$(EXTRADEFINES)
$(call DELFILE, Make.dep) @rm -f Make.dep .depend
$(call DELFILE, .depend)
-include Make.dep -include Make.dep

Some files were not shown because too many files have changed in this diff Show More