diff --git a/ChangeLog b/ChangeLog index 6504de162ef..dab311760b5 100755 --- a/ChangeLog +++ b/ChangeLog @@ -11729,3 +11729,87 @@ STM32F746ZG MCU. From Kconstantin Berezenko (2015-05-12). * arch/arm-src/armv7-a: Complete re-design of logic to initialize each CPUn, n > 0, when CONFIG_SMP=y (2016-05-13). + * arch/arm/src/imx6 and configs/sabre-6quad: The basic i.MX6 port is + complete. This is a very minimal port at present and probably still + has some as-of-yet-undiscovered issues (2016-05-17). + * arch/*/Makefile: Add definitions that can be overrided to use GCC + instead of LD in the final link. From Paul Alexander Patience + (2016-05-18) . + * arch/arm/src/stm32, stm32l4, and stm32f7 serial: Add support for + compliant BSD-style breaks. From David Sidrane (2016-05-18). + * enter/leave_critical_section() may attempt to access task lists before + they have been initialized in the SMP configuration (2016-05-18). + * configs/stm32f103-minimum: Add support for this minimual STM32F103CBT6 + "blue" board. From Alan Carvalho de Assis (2016-05-18). + * arch/arm/src/sam* Watchdogs: Rename up_wdginitialize() to something + more appropriate for an internal, MCU-specific function (2016-05-18). + * configs/*/src/*_watchdog.c: Remove all implementations of + up_wdginitialize() which was only used by apps/examples/watchdog. + That internal OS function is no longer called from application code. + If you want to use the watchdog example, you will need to configure + the watchdog driver by calling the appropriate, MCU-specific driver + configuration function from your board initialization logic + (2016-05-18). + * arch/srm/src/stm32l4: Add CAN support for STM32L4. From Sebastien + Lorquet (2016-05-19). + * arch/arm/src/samv7: Adds a JTAG config and ERASE config to Kconfig to + set the CCFG_SYSIO SYSIO Pins. From Davide Sidrane (2016-05-19). + * arch/sim/src: Enhance networking support for the simulation under Linux. + Includes updated support for Linux TUN/TAP, and the addition of support + for Linux bridge devices. From Steve (2016-05-20). + * configs/stm32f411e-disco: Add basic configuration for stm32f411e-disco + board with STM32F411VE chip. From Konstantin Berezenko (2016-05-20). + * i.MX6 Sabre-6Quad: Basic SMP NSH configuration is now working. But + this is probably only because the SMP NSH case does not stress the + logic. There are know outstanding SMP issues as noted in the + Sabre-6Quad README.txt file (2016-05-22). + * configs/sabre-6quad: Add an SMP configuration; Enable procfs in all + configurations (2016-05-22). + * include/nuttx/crypto/aes.h: Modifications to the crypto API needed + for LPC43xx. From Alexander Vasiljev (2016-05-23). + * arch/arm/src/lpc32xx: Add AES support. From Alexander Vasiljev + (2016-05-24). + * configs/*/src/tiva_timer.c: Tiva boards: Fix a naming collision, + rename board-specific function from tiva_timer_initialize() to + tiva_timer_configure() to remove conflict (2016-05-23). + * arch/arm/src/sam*: Ensure that the TWIHS (i2c) hw get's its clock + set when the sequence of sam_i2cbus_initialize(), + sam_i2cbus_uninitialize(), then sam_i2cbus_initialize() or twi_reset() + is called. I found this a while back in the stm32 family, so there + may be more arch-es with this sort of bug. I suppose any driver that + has the notion of "do not set the freq if it is already set" could be + suspect. From David Sidrane (2016-05-23). + * arch/arm/src/samv7: Add the up_systemreset interface to the samv7 + arch. The approach is slightly different in that: 1) It enables + ARCH_HAVE_RESET and allows the user to set if, and for how long, to + drive External nRST signal. It also does not contain a default + board_reset, as that really should be done in the config's src if + CONFIG_BOARDCTL_RESET is defined. From David Sidrane (2016-05-23). + * arch/arm/include/lpc43xx and src/lpc43xx: Adds definitions for the + LPC4337jet100 chip. From Alexander Vasiljev (2016-05-24). + * Many files: board_app_initialize() now accepts an argument that may + be used to support initialization in different configurations + (2016-05-24). + * arch/arm/src/samv7: Remove disabling of whole USB on suspend of USBHS. + This fix removes the disabling of the whole USB peripheral on suspend + interrupt. Its enough to freeze the clock instead. When disabling the + whole peripheral, the next wakeup-interrupt comes up with an disabled + clocking. The unfreeze clock has no effect, because the master clock + is disabled. This makes all registers, including the IDR unwriteable + and the IRQ falls in an endless loop blocking the whole system. + Furthermore the disabling of the peripheral clock prevents hotplugging + or reconnecting the USB. From Frank Benkert (2015-05-25). + * drivers/lcd: Add support for PCF8574 LCD Backpack driver. This driver + supports an interface board that is based on the PCF8574 io expander + and supports the HD44780-based (or compatible) LCD modules. There + are a myriad of different vendors of such, but they are principally + the same, save wiring and minor features like jumpers for I2C + addresses. This driver supports known and unknown variants. From + Dave (ziggurat29, 2013-6-26). + * arch/arm/stm32: Add support for a custom 1-wire driver. The serial + driver already supports a 1-wire interface, but this driver uses the + same serial logic to implement a lower half driver much like the I2C + lower half driver. From Aleksandr Vyhovanec (2015-05-25). + * fs/: Add logic to detach a file structure from a file descriptor. + This is for use only within the OS. It permits an open file or driver + to be used across multiple threads (2016-05-26). diff --git a/Documentation/README.html b/Documentation/README.html index ce2d5eef2a5..1c13c8abdd8 100644 --- a/Documentation/README.html +++ b/Documentation/README.html @@ -8,7 +8,7 @@

NuttX README Files

-

Last Updated: May 12, 2016

+

Last Updated: May 26, 2016

@@ -251,10 +251,14 @@ nuttx/ | | `- README.txt | |- stm32_tiny/ | | `- README.txt + | |- stm32f103-minumum/ + | | `- README.txt | |- stm32f3discovery/ | | `- README.txt | |- stm32f4discovery/ | | `- README.txt + | |- stm32f411e-disco/ + | | `- README.txt | |- stm32f429i-disco/ | | |- ide/ltcd/uvision/README.txt | | |- ltdc/README.txt @@ -312,7 +316,8 @@ nuttx/ | |- eeprom/ | | `- README.txt | |- lcd/ - | | `- README.txt + | | |- README.txt + | | `- pcf8574_lcd_backpack_readme.txt | |- mtd/ | | `- README.txt | |- sensors/ diff --git a/README.txt b/README.txt index ed3d0141f56..db0e5e6c10b 100644 --- a/README.txt +++ b/README.txt @@ -1426,10 +1426,14 @@ nuttx/ | | `- README.txt | |- stm32_tiny/ | | `- README.txt + | |- stm32f103-minumum/ + | | `- README.txt | |- stm32f3discovery/ | | `- README.txt | |- stm32f4discovery/ | | `- README.txt + | |- stm32f411e-disco/ + | | `- README.txt | |- stm32f429i-disco/ | | |- ide/ltcd/uvision/README.txt | | |- ltdc/README.txt @@ -1487,7 +1491,8 @@ nuttx/ | |- eeprom/ | | `- README.txt | |- lcd/ - | | `- README.txt + | | | README.txt + | | `- pcf8574_lcd_backpack_readme.txt | |- mtd/ | | `- README.txt | |- sensors/ diff --git a/TODO b/TODO index 290dc13ef46..eeb3e6d29dd 100644 --- a/TODO +++ b/TODO @@ -1,20 +1,20 @@ -NuttX TODO List (Last updated March 31, 2016) +NuttX TODO List (Last updated May 28, 2016) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This file summarizes known NuttX bugs, limitations, inconsistencies with standards, things that could be improved, and ideas for enhancements. This TODO list does not include issues associated with individual boar ports. See -altheso individual README.txt files in the configs/ sub-directories for -issues reated to each board port. +also the individual README.txt files in the configs/ sub-directories for +issues related to each board port. -nuttx/ +nuttx/: (13) Task/Scheduler (sched/) (1) Memory Management (mm/) (3) Signals (sched/signal, arch/) (2) pthreads (sched/pthread) (0) Message Queues (sched/mqueue) - (8) Kernel/Protected Build + (9) Kernel/Protected Build (3) C++ Support (6) Binary loaders (binfmt/) (12) Network (net/, drivers/net) @@ -23,16 +23,16 @@ nuttx/ (11) Libraries (libc/, libm/) (11) File system/Generic drivers (fs/, drivers/) (8) Graphics subsystem (graphics/) - (1) Pascal add-on (pcode/) (1) Build system / Toolchains - (4) Linux/Cywgin simulation (arch/sim) + (3) Linux/Cywgin simulation (arch/sim) (4) ARM (arch/arm/) -apps/ +apps/ and other Add-Ons: (3) Network Utilities (apps/netutils/) (2) NuttShell (NSH) (apps/nshlib) (1) System libraries apps/system (apps/system) + (1) Pascal add-on (pcode/) (4) Other Applications & Tests (apps/examples/) o Task/Scheduler (sched/) @@ -70,7 +70,7 @@ o Task/Scheduler (sched/) Title: GET_ENVIRON_PTR() Description: get_environ_ptr() (sched/sched_getenvironptr.c) is not implemented. The representation of the environment strings selected for - NutX is not compatible with the operation. Some significant + NuttX is not compatible with the operation. Some significant re-design would be required to implement this function and that effort is thought to be not worth the result. Status: Open. No change is planned. @@ -81,7 +81,7 @@ o Task/Scheduler (sched/) Status: Open Priority: Low -- There is no plan to implement this. - Title: INCOMPATIBILITES WITH execv() AND execl() + Title: INCOMPATIBILITIES WITH execv() AND execl() Description: Simplified 'execl()' and 'execv()' functions are provided by NuttX. NuttX does not support processes and hence the concept of overlaying a tasks process image with a new process image @@ -175,7 +175,7 @@ o Task/Scheduler (sched/) Yahoo! Groups message 7726: "I think that the system should be required to handle pthread_cancel safely in all cases. In the NuttX model, a task is like a Unix - process and a pthread is like a Unix thread. Cancelling + process and a pthread is like a Unix thread. Canceling threads should always be safe (or at least as unsafe) as under Unix because the model is complete for pthreads... @@ -188,7 +188,7 @@ o Task/Scheduler (sched/) "The patch I just incorporated is also insufficient. It works only if the serial driver is shut down when the - thread is cancelled. But what if there are other open + thread is canceled. But what if there are other open references to the driver? Then the driver will not be shut down, the semaphores will not be re-initialized, and the semaphore counts will still be off by one. @@ -202,7 +202,7 @@ o Task/Scheduler (sched/) hooks so that given a semaphore it can traverse all holders. What is needed would be logic so that given a task, you can traverse all semaphores held by the task, - releasing each semaphore cound held by the exiting task. + releasing each semaphore count held by the exiting task. Nothing like this exists now so that solution is not imminent. @@ -228,16 +228,15 @@ o Task/Scheduler (sched/) hidden behind simple accessor functions and so the internal data structures can be changed if need with very little impact. - - Explicity refereence to the list strucutre are hidden behnid + Explicitly reference to the list structure are hidden behind the macro this_task(). Status: Open Priority: Low. Things are just the way that we want them for the way that NuttX is used today. -o Memory Managment (mm/) - ^^^^^^^^^^^^^^^^^^^^^^ +o Memory Management (mm/) + ^^^^^^^^^^^^^^^^^^^^^^^ Title: FREE MEMORY ON TASK EXIT Description: Add an option to free all memory allocated by a task when the @@ -390,7 +389,7 @@ o pthreads (sched/pthreads) Priority: Low -- about zero, probably not that useful. Priority inheritance is already supported and is a much better solution. And it turns out that priority protection is just about as complex as priority inheritance. - Exerpted from my post in a Linked-In discussion: + Excerpted from my post in a Linked-In discussion: "I started to implement this HLS/"PCP" semaphore in an RTOS that I work with (http://www.nuttx.org) and I discovered after doing the @@ -589,8 +588,21 @@ o Kernel/Protected Build interrupt level callbacks into applications. This, of course, will never work in anything but a non-secure, flat build. Status: Open - Priority: Medium. The driver is only usable with all of its features in a FLAT build. - + Priority: Medium. The driver is only usable with all of its features + in a FLAT build. + + Title: USER MODE TASKS CAN MODIFY PRIVILEGED TASKS + Description: Certain interfaces, such as sched_setparam(), + sched_setscheduler(), etc. can be used by user mode tasks to + modify the behavior of priviledged kernel threads. + task_delete() could even be used to kill a kernel thread. + For a truly secure system. Privileges need to be checked in + every interface that permits one thread to modify the + properties of another thread. + Status: Open + Priority: Low for most embedded systems but would be a critical need if + NuttX were used in a secure system. + o C++ Support ^^^^^^^^^^^ @@ -784,7 +796,7 @@ o Binary loaders (binfmt/) to get fixed as needed for Windows native tool builds. Title: TOOLCHAIN COMPATIBILITY PROBLEM - Descripton: The older 4.3.3 compiler generates GOTOFF relocations to the constant + Description: The older 4.3.3 compiler generates GOTOFF relocations to the constant strings, like: .L3: @@ -794,7 +806,7 @@ o Binary loaders (binfmt/) .word .LC3(GOTOFF) .word .LC4(GOTOFF) - Where .LC0, LC1, LC2, LC3, and .LC4 are the labels correponding to strings in + Where .LC0, LC1, LC2, LC3, and .LC4 are the labels corresponding to strings in the .rodata.str1.1 section. One consequence of this is that .rodata must reside in D-Space since it will addressed relative to the GOT (see the section entitled "Read-Only Data in RAM" at @@ -880,7 +892,7 @@ o Network (net/, drivers/net) RFC3678 (IGMPv3) suggests ioctl() commands to do this (SIOCSIPMSFILTER) but also status that those APIs are historic. NuttX implements these ioctl commands, but is non-standard because: (1) It does not support IGMPv3, and - (2) it looks up drivers by their device name (eg., "eth0") vs IP address. + (2) it looks up drivers by their device name (e.g., "eth0") vs IP address. Linux uses setsockopt() to control multicast group membership using the IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP options. It also looks up drivers @@ -896,7 +908,7 @@ o Network (net/, drivers/net) that connection may time out. How should this be handled? Should the connection be removed from the backlog if it is times out or is closed? Or should it remain in the backlog with a status indication so that accept() - can fail when it encounteres the invalid connection? + can fail when it encounters the invalid connection? Status: Open Priority: Medium. Important on slow applications that will not accept connections promptly. @@ -975,7 +987,7 @@ o Network (net/, drivers/net) it is no longer needed. Perhaps there should be a delayed call to unlink() (using a watchdog or the work queue). If the driver is re-opened, the delayed unlink could be - cancelled? Needs more thought. + canceled? Needs more thought. NOTE: This is not an issue for Unix domain streams sockets: The end-of-life of the FIFO is well determined when sockets are disconnected and support for that case is fully implemented. @@ -1020,7 +1032,7 @@ o USB (drivers/usbdev, drivers/usbhost) that involves delays. This needs to be redesigned to eliminate these delays. See logic conditioned on CONFIG_USBMSC_RACEWAR. - If queuing of stall requests is supported by DCD then this workaround + If queuing of stall requests is supported by the DCD then this workaround is not required. In this case, (1) the stall is not sent until all write requests preceding the stall request are sent, (2) the stall is sent, and then after the stall is cleared, (3) all write requests @@ -1135,7 +1147,7 @@ o USB (drivers/usbdev, drivers/usbhost) Priority: Medium-Low Title: USB CDC/ACM HOST CLASS DRIVER - Desciption: A CDC/ACM host class driver has been added. This has been + Description: A CDC/ACM host class driver has been added. This has been testing by running the USB CDC/ACM host on an Olimex LPC1766STK and using the configs/stm3210e-eval/usbserial configuration (using the CDC/ACM device side driver). There @@ -1374,7 +1386,7 @@ o File system / Generic drivers (fs/, drivers/) Priority: Medium Title: UNIFIED DESCRIPTOR REPRESENTATION - Descripton: There are two separate ranges of descriptors for file and + Description: There are two separate ranges of descriptors for file and socket descriptors: if a descriptor is in one range then it is recognized as a file descriptor; if it is in another range then it is recognized as a socket descriptor. These separate @@ -1410,7 +1422,7 @@ o File system / Generic drivers (fs/, drivers/) Status: Open Priority: Low - Title: FAT LONG FILENAME COMPATIBILTY + Title: FAT LONG FILENAME COMPATIBILITY Description: Recently there have been reports that file with long file names created by NuttX don't have long file names when viewed on Windows. The long file name support has been around for a @@ -1423,7 +1435,7 @@ o File system / Generic drivers (fs/, drivers/) Description: I have seen cases where (1) long file names are enabled, but (2) a short file name is created like: - nsh> echo "This is another thest" >/mnt/sdcard/another.txt + nsh> echo "This is another test" >/mnt/sdcard/another.txt But then on subsequent 'ls' operations, the file does not appear: @@ -1472,7 +1484,7 @@ o File system / Generic drivers (fs/, drivers/) 4) When comparing the checksum in the long file name entry with the checksum of the short file name, the - checksum fails and the entire directlry sequence is + checksum fails and the entire directory sequence is ignored by readder() logic. This the file does not appear in the 'ls'. @@ -1539,7 +1551,7 @@ o Graphics subsystem (graphics/) Priority: Low, the need has not yet arisen. Title: PER-WINDOW FRAMEBUFFERS - Description: One of the most awkard things to handle in the NX windowing + Description: One of the most awkward things to handle in the NX windowing system is the re-draw callback. This is difficult because it requires ad hoc, custom logic to be able to do the redrawing in most cases. @@ -1567,26 +1579,6 @@ o Graphics subsystem (graphics/) Priority: Low, not a serious issue but worth noting. There is no plan to change this behavior. -o Pascal Add-On (pcode/) - ^^^^^^^^^^^^^^^^^^^^^^ - - Title: P-CODES IN MEMORY UNTESTED - Description: Need APIs to verify execution of P-Code from memory buffer. - Status: Open - Priority: Low - - Title: SMALLER LOADER AND OBJECT FORMAT - Description: Loader and object format may be too large for some small - memory systems. Consider ways to reduce memory footprint. - Status: Open - Priority: Medium - - Title: PDBG - Description: Move the the pascal p-code debugger into the NuttX apps/ tree - where it can be used from the NSH command line. - Status: Open - Priority: Low - o Build system ^^^^^^^^^^^^ @@ -1609,15 +1601,6 @@ o Other drivers (drivers/) o Linux/Cywgin simulation (arch/sim) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Title: SIMULATOR NETWORKING SUPPORT - Description: I never did get networking to work on the sim Linux target. On Linux, - it tries to use the tap device (/dev/net/tun) to emulate an Ethernet - NIC, but I never got it correctly integrated with the NuttX networking. - NOTE: On Cygwin, the build uses the Cygwin WPCAP library and is, at - least, partially functional (it has never been rigorously tested). - Status: Open - Priority: Low (unless you want to test networking features on the simulation). - Title: SIMULATOR HAS NO INTERRUPTS (NON-PREMPTIBLE) Description: The current simulator implementation is has no interrupts and, hence, is non-preemptible. Also, without simulated interrupt, there can @@ -1765,7 +1748,7 @@ o ARM (arch/arm/) But this has not been proven to be a solution. - UPDATE: Other ARM architectures have a similer issue. + UPDATE: Other ARM architectures have a similar issue. Status: Open Priority: Low. The conditions of continuous interrupts is really the problem. @@ -1823,7 +1806,7 @@ o NuttShell (NSH) (apps/nshlib) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Title: IFCONFIG AND MULTIPLE NETWORK INTERFACES - Descripton: The ifconfig command will not behave correctly if an interface + Description: The ifconfig command will not behave correctly if an interface is provided and there are multiple interfaces. It should only show status for the single interface on the command line; it will still show status for all interfaces. @@ -1848,6 +1831,26 @@ o System libraries apps/system (apps/system) Priority: Low (unless you are using mixed C-buffered I/O with readline and fgetc, for example). +o Pascal Add-On (pcode/) + ^^^^^^^^^^^^^^^^^^^^^^ + + Title: P-CODES IN MEMORY UNTESTED + Description: Need APIs to verify execution of P-Code from memory buffer. + Status: Open + Priority: Low + + Title: SMALLER LOADER AND OBJECT FORMAT + Description: Loader and object format may be too large for some small + memory systems. Consider ways to reduce memory footprint. + Status: Open + Priority: Medium + + Title: PDBG + Description: Move the the pascal p-code debugger into the NuttX apps/ tree + where it can be used from the NSH command line. + Status: Open + Priority: Low + o Other Applications & Tests (apps/examples/) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index fd960282a1d..6b6c046060d 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -27,7 +27,7 @@ config ARCH_CHIP_C5471 bool "TMS320 C5471" select ARCH_ARM7TDMI select ARCH_HAVE_LOWVECTORS - select ARCH_HAVE_OTHER_UART + select OTHER_UART_SERIALDRIVER ---help--- TI TMS320 C5471, A180, or DA180 (ARM7TDMI) @@ -36,7 +36,7 @@ config ARCH_CHIP_CALYPSO select ARCH_ARM7TDMI select ARCH_HAVE_HEAP2 select ARCH_HAVE_LOWVECTORS - select ARCH_HAVE_OTHER_UART + select OTHER_UART_SERIALDRIVER select ARCH_HAVE_POWEROFF ---help--- TI Calypso-based cell phones (ARM7TDMI) diff --git a/arch/arm/include/lpc43xx/chip.h b/arch/arm/include/lpc43xx/chip.h index 56db6292937..a88559df21b 100644 --- a/arch/arm/include/lpc43xx/chip.h +++ b/arch/arm/include/lpc43xx/chip.h @@ -1,7 +1,7 @@ /************************************************************************************ * arch/arm/include/lpc43xx/chip.h * - * Copyright (C) 2012-2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2012-2013, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -167,7 +167,7 @@ # warning "Data sheet and user manual are consistement for the LPC4320" # define LPC43_FLASH_BANKA_SIZE (0) /* Flashless */ # define LPC43_FLASH_BANKB_SIZE (0) -# define LPC43_LOCSRAM_BANK0_SIZE (128*1024) /* 168Kb Local SRAM*/ +# define LPC43_LOCSRAM_BANK0_SIZE (128*1024) /* 168Kb Local SRAM */ # define LPC43_LOCSRAM_BANK1_SIZE (40*1024) # define LPC43_AHBSRAM_BANK0_SIZE (16*1024) /* 32Kb AHB SRAM */ # define LPC43_AHBSRAM_BANK1_SIZE (0) @@ -194,7 +194,7 @@ # warning "Data sheet and user manual are consistement for the LPC4320" # define LPC43_FLASH_BANKA_SIZE (0) /* Flashless */ # define LPC43_FLASH_BANKB_SIZE (0) -# define LPC43_LOCSRAM_BANK0_SIZE (128*1024) /* 168Kb Local SRAM*/ +# define LPC43_LOCSRAM_BANK0_SIZE (128*1024) /* 168Kb Local SRAM */ # define LPC43_LOCSRAM_BANK1_SIZE (40*1024) # define LPC43_AHBSRAM_BANK0_SIZE (16*1024) /* 32Kb AHB SRAM */ # define LPC43_AHBSRAM_BANK1_SIZE (0) @@ -220,7 +220,7 @@ #elif defined(CONFIG_ARCH_CHIP_LPC4330FBD144) # define LPC43_FLASH_BANKA_SIZE (0) /* Flashless */ # define LPC43_FLASH_BANKB_SIZE (0) -# define LPC43_LOCSRAM_BANK0_SIZE (128*1024) /* 200Kb Local SRAM*/ +# define LPC43_LOCSRAM_BANK0_SIZE (128*1024) /* 200Kb Local SRAM */ # define LPC43_LOCSRAM_BANK1_SIZE (72*1024) # define LPC43_AHBSRAM_BANK0_SIZE (48*1024) /* 64Kb AHB SRAM */ # define LPC43_AHBSRAM_BANK1_SIZE (0) @@ -246,7 +246,7 @@ #elif defined(CONFIG_ARCH_CHIP_LPC4330FET100) # define LPC43_FLASH_BANKA_SIZE (0) /* Flashless */ # define LPC43_FLASH_BANKB_SIZE (0) -# define LPC43_LOCSRAM_BANK0_SIZE (128*1024) /* 200Kb Local SRAM*/ +# define LPC43_LOCSRAM_BANK0_SIZE (128*1024) /* 200Kb Local SRAM */ # define LPC43_LOCSRAM_BANK1_SIZE (72*1024) # define LPC43_AHBSRAM_BANK0_SIZE (48*1024) /* 64Kb AHB SRAM */ # define LPC43_AHBSRAM_BANK1_SIZE (0) @@ -272,7 +272,7 @@ #elif defined(CONFIG_ARCH_CHIP_LPC4330FET180) # define LPC43_FLASH_BANKA_SIZE (0) /* Flashless */ # define LPC43_FLASH_BANKB_SIZE (0) -# define LPC43_LOCSRAM_BANK0_SIZE (128*1024) /* 200Kb Local SRAM*/ +# define LPC43_LOCSRAM_BANK0_SIZE (128*1024) /* 200Kb Local SRAM */ # define LPC43_LOCSRAM_BANK1_SIZE (72*1024) # define LPC43_AHBSRAM_BANK0_SIZE (48*1024) /* 64Kb AHB SRAM */ # define LPC43_AHBSRAM_BANK1_SIZE (0) @@ -298,7 +298,7 @@ #elif defined(CONFIG_ARCH_CHIP_LPC4330FET256) # define LPC43_FLASH_BANKA_SIZE (0) /* Flashless */ # define LPC43_FLASH_BANKB_SIZE (0) -# define LPC43_LOCSRAM_BANK0_SIZE (128*1024) /* 200Kb Local SRAM*/ +# define LPC43_LOCSRAM_BANK0_SIZE (128*1024) /* 200Kb Local SRAM */ # define LPC43_LOCSRAM_BANK1_SIZE (72*1024) # define LPC43_AHBSRAM_BANK0_SIZE (48*1024) /* 64Kb AHB SRAM */ # define LPC43_AHBSRAM_BANK1_SIZE (0) @@ -324,7 +324,7 @@ #elif defined(CONFIG_ARCH_CHIP_LPC4337JBD144) # define LPC43_FLASH_BANKA_SIZE (512*1025) /* 1024Kb FLASH */ # define LPC43_FLASH_BANKB_SIZE (512*1025) -# define LPC43_LOCSRAM_BANK0_SIZE (32*1024) /* 72Kb Local SRAM*/ +# define LPC43_LOCSRAM_BANK0_SIZE (32*1024) /* 72Kb Local SRAM */ # define LPC43_LOCSRAM_BANK1_SIZE (40*1024) # define LPC43_AHBSRAM_BANK0_SIZE (48*1024) /* 64Kb AHB SRAM */ # define LPC43_AHBSRAM_BANK1_SIZE (0) @@ -350,7 +350,7 @@ #elif defined(CONFIG_ARCH_CHIP_LPC4350FBD208) # define LPC43_FLASH_BANKA_SIZE (0) /* Flashless */ # define LPC43_FLASH_BANKB_SIZE (0) -# define LPC43_LOCSRAM_BANK0_SIZE (128*1024) /* 200Kb Local SRAM*/ +# define LPC43_LOCSRAM_BANK0_SIZE (128*1024) /* 200Kb Local SRAM */ # define LPC43_LOCSRAM_BANK1_SIZE (72*1024) # define LPC43_AHBSRAM_BANK0_SIZE (48*1024) /* 64Kb AHB SRAM */ # define LPC43_AHBSRAM_BANK1_SIZE (0) @@ -376,7 +376,7 @@ #elif defined(CONFIG_ARCH_CHIP_LPC4350FET180) # define LPC43_FLASH_BANKA_SIZE (0) /* Flashless */ # define LPC43_FLASH_BANKB_SIZE (0) -# define LPC43_LOCSRAM_BANK0_SIZE (128*1024) /* 200Kb Local SRAM*/ +# define LPC43_LOCSRAM_BANK0_SIZE (128*1024) /* 200Kb Local SRAM */ # define LPC43_LOCSRAM_BANK1_SIZE (72*1024) # define LPC43_AHBSRAM_BANK0_SIZE (48*1024) /* 64Kb AHB SRAM */ # define LPC43_AHBSRAM_BANK1_SIZE (0) @@ -402,7 +402,7 @@ #elif defined(CONFIG_ARCH_CHIP_LPC4350FET256) # define LPC43_FLASH_BANKA_SIZE (0) /* Flashless */ # define LPC43_FLASH_BANKB_SIZE (0) -# define LPC43_LOCSRAM_BANK0_SIZE (128*1024) /* 200Kb Local SRAM*/ +# define LPC43_LOCSRAM_BANK0_SIZE (128*1024) /* 200Kb Local SRAM */ # define LPC43_LOCSRAM_BANK1_SIZE (72*1024) # define LPC43_AHBSRAM_BANK0_SIZE (48*1024) /* 64Kb AHB SRAM */ # define LPC43_AHBSRAM_BANK1_SIZE (0) @@ -428,7 +428,7 @@ #elif defined(CONFIG_ARCH_CHIP_LPC4353FBD208) # define LPC43_FLASH_BANKA_SIZE (256*1025) /* 512Kb FLASH */ # define LPC43_FLASH_BANKB_SIZE (256*1025) -# define LPC43_LOCSRAM_BANK0_SIZE (32*1024) /* 72Kb Local SRAM*/ +# define LPC43_LOCSRAM_BANK0_SIZE (32*1024) /* 72Kb Local SRAM */ # define LPC43_LOCSRAM_BANK1_SIZE (40*1024) # define LPC43_AHBSRAM_BANK0_SIZE (48*1024) /* 64Kb AHB SRAM */ # define LPC43_AHBSRAM_BANK1_SIZE (0) @@ -454,7 +454,7 @@ #elif defined(CONFIG_ARCH_CHIP_LPC4353FET180) # define LPC43_FLASH_BANKA_SIZE (256*1025) /* 512Kb FLASH */ # define LPC43_FLASH_BANKB_SIZE (256*1025) -# define LPC43_LOCSRAM_BANK0_SIZE (32*1024) /* 72Kb Local SRAM*/ +# define LPC43_LOCSRAM_BANK0_SIZE (32*1024) /* 72Kb Local SRAM */ # define LPC43_LOCSRAM_BANK1_SIZE (40*1024) # define LPC43_AHBSRAM_BANK0_SIZE (48*1024) /* 64Kb AHB SRAM */ # define LPC43_AHBSRAM_BANK1_SIZE (0) @@ -480,7 +480,7 @@ #elif defined(CONFIG_ARCH_CHIP_LPC4353FET256) # define LPC43_FLASH_BANKA_SIZE (256*1025) /* 512Kb FLASH */ # define LPC43_FLASH_BANKB_SIZE (256*1025) -# define LPC43_LOCSRAM_BANK0_SIZE (32*1024) /* 72Kb Local SRAM*/ +# define LPC43_LOCSRAM_BANK0_SIZE (32*1024) /* 72Kb Local SRAM */ # define LPC43_LOCSRAM_BANK1_SIZE (40*1024) # define LPC43_AHBSRAM_BANK0_SIZE (48*1024) /* 64Kb AHB SRAM */ # define LPC43_AHBSRAM_BANK1_SIZE (0) @@ -506,7 +506,7 @@ #elif defined(CONFIG_ARCH_CHIP_LPC4357FET180) # define LPC43_FLASH_BANKA_SIZE (512*1025) /* 1024Kb FLASH */ # define LPC43_FLASH_BANKB_SIZE (512*1025) -# define LPC43_LOCSRAM_BANK0_SIZE (32*1024) /* 72Kb Local SRAM*/ +# define LPC43_LOCSRAM_BANK0_SIZE (32*1024) /* 72Kb Local SRAM */ # define LPC43_LOCSRAM_BANK1_SIZE (40*1024) # define LPC43_AHBSRAM_BANK0_SIZE (48*1024) /* 64Kb AHB SRAM */ # define LPC43_AHBSRAM_BANK1_SIZE (0) @@ -532,7 +532,7 @@ #elif defined(CONFIG_ARCH_CHIP_LPC4357FBD208) # define LPC43_FLASH_BANKA_SIZE (512*1025) /* 1024Kb FLASH */ # define LPC43_FLASH_BANKB_SIZE (512*1025) -# define LPC43_LOCSRAM_BANK0_SIZE (32*1024) /* 72Kb Local SRAM*/ +# define LPC43_LOCSRAM_BANK0_SIZE (32*1024) /* 72Kb Local SRAM */ # define LPC43_LOCSRAM_BANK1_SIZE (40*1024) # define LPC43_AHBSRAM_BANK0_SIZE (48*1024) /* 64Kb AHB SRAM */ # define LPC43_AHBSRAM_BANK1_SIZE (0) @@ -558,7 +558,7 @@ #elif defined(CONFIG_ARCH_CHIP_LPC4357FET256) # define LPC43_FLASH_BANKA_SIZE (512*1025) /* 1024Kb FLASH */ # define LPC43_FLASH_BANKB_SIZE (512*1025) -# define LPC43_LOCSRAM_BANK0_SIZE (32*1024) /* 72Kb Local SRAM*/ +# define LPC43_LOCSRAM_BANK0_SIZE (32*1024) /* 72Kb Local SRAM */ # define LPC43_LOCSRAM_BANK1_SIZE (40*1024) # define LPC43_AHBSRAM_BANK0_SIZE (48*1024) /* 64Kb AHB SRAM */ # define LPC43_AHBSRAM_BANK1_SIZE (0) @@ -632,6 +632,31 @@ # define LPC43_NDAC (1) /* One 10-bit DAC */ # define LPC43_NADC10_CHANNELS (8) /* Eight ADC channels (per ADC)*/ # define LPC43_NADC12 (1) /* ONne 12-bit ADC controllers (ADCHS)*/ +#elif defined(CONFIG_ARCH_CHIP_LPC4337JET100) +# define LPC43_FLASH_BANKA_SIZE (512*1024) /* 1024Kb FLASH */ +# define LPC43_FLASH_BANKB_SIZE (512*1024) +# define LPC43_LOCSRAM_BANK0_SIZE (32*1024) /* 72Kb Local SRAM */ +# define LPC43_LOCSRAM_BANK1_SIZE (40*1024) +# define LPC43_AHBSRAM_BANK0_SIZE (48*1024) /* 64Kb AHB SRAM */ +# define LPC43_AHBSRAM_BANK1_SIZE (0) +# define LPC43_AHBSRAM_BANK2_SIZE (16*1024) +# define LPC43_EEPROM_SIZE (16*1024) /* 16Kb EEPROM */ +# define LPC43_NLCD (0) /* Has LCD controller */ +# define LPC43_ETHERNET (1) /* One Ethernet controller */ +# define LPC43_USB0 (1) /* Have USB0 (Host, Device, OTG) */ +# define LPC43_USB1 (1) /* Have USB1 (Host, Device) */ +# define LPC43_USB1_ULPI (0) /* Have USB1 (Host, Device) with ULPI I/F */ +# define LPC43_MCPWM (0) /* One PWM interface */ +# define LPC43_QEI (0) /* One Quadrature Encoder interface */ +# define LPC43_NUSARTS (4) /* Three USARTs + 1 UART */ +# define LPC43_NSSP (2) /* Two SSP controllers */ +# define LPC43_NTIMERS (4) /* Four Timers */ +# define LPC43_NI2C (2) /* Two I2C controllers */ +# define LPC43_NI2S (2) /* Two I2S controllers */ +# define LPC43_NCAN (2) /* Two CAN controllers */ +# define LPC43_NDAC (1) /* One 10-bit DAC */ +# define LPC43_NADC (2) /* Two 10-bit ADC controllers */ +# define LPC43_NADC_CHANNELS (4) /* Four ADC channels */ #else # error "Unsupported LPC43xx chip" #endif diff --git a/arch/arm/include/stm32/chip.h b/arch/arm/include/stm32/chip.h index ae2c1b614c9..98d0073c506 100644 --- a/arch/arm/include/stm32/chip.h +++ b/arch/arm/include/stm32/chip.h @@ -1568,7 +1568,7 @@ # define STM32_NGTIMNDMA 3 /* 16-bit general timers TIM9-11 without DMA */ # define STM32_NBTIM 0 /* No basic timers */ # define STM32_NDMA 2 /* DMA1-2 with 8 streams each*/ -# define STM32_NSPI 4 /* SPI1-4 */ +# define STM32_NSPI 5 /* SPI1-5 */ # define STM32_NI2S 2 /* I2S1-2 (multiplexed with SPI2-3) */ # define STM32_NUSART 6 /* Actually only 3: USART1, 2 and 6 */ # define STM32_NI2C 3 /* I2C1-3 */ @@ -1585,6 +1585,44 @@ # define STM32_NRNG 0 /* No Random number generator (RNG) */ # define STM32_NDCMI 0 /* No digital camera interface (DCMI) */ +#elif defined(CONFIG_ARCH_CHIP_STM32F411VE) /* 100 pin LQFP/BGA package, 512Kb FLASH, 128KiB SRAM */ +# undef CONFIG_STM32_STM32L15XX /* STM32L151xx and STM32L152xx family */ +# undef CONFIG_STM32_ENERGYLITE /* STM32L EnergyLite family */ +# undef CONFIG_STM32_STM32F10XX /* 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 */ +# undef CONFIG_STM32_MEDIUMPLUSDENSITY /* STM32L15xxC w/ 32/256 Kbytes */ +# undef CONFIG_STM32_HIGHDENSITY /* STM32F100x, STM32F101x, and STM32F103x w/ 256/512 Kbytes */ +# undef CONFIG_STM32_VALUELINE /* STM32F100x */ +# undef CONFIG_STM32_CONNECTIVITYLINE /* STM32F105x and STM32F107x */ +# undef CONFIG_STM32_STM32F20XX /* STM32F205x and STM32F207x */ +# undef CONFIG_STM32_STM32F30XX /* STM32F30xxx family */ +# undef CONFIG_STM32_STM32F37XX /* STM32F37xxx family */ +# define CONFIG_STM32_STM32F40XX 1 /* STM32F405xx and STM32407xx */ +# define STM32_NFSMC 0 /* No FSMC */ +# define STM32_NATIM 1 /* One advanced timers TIM1 */ +# define STM32_NGTIM 4 /* 16-bit general timers TIM3 and 4 with DMA + * 32-bit general timers TIM2 and 5 with DMA */ +# define STM32_NGTIMNDMA 3 /* 16-bit general timers TIM9-11 without DMA */ +# define STM32_NBTIM 0 /* No basic timers */ +# define STM32_NDMA 2 /* DMA1-2 with 8 streams each*/ +# define STM32_NSPI 5 /* SPI1-5 */ +# define STM32_NI2S 2 /* I2S1-2 (multiplexed with SPI2-3) */ +# define STM32_NUSART 6 /* Actually only 3: USART1, 2 and 6 */ +# define STM32_NI2C 3 /* I2C1-3 */ +# define STM32_NCAN 0 /* No CAN */ +# define STM32_NSDIO 1 /* One SDIO interface */ +# define STM32_NLCD 0 /* No LCD */ +# define STM32_NUSBOTG 1 /* USB OTG FS (only) */ +# define STM32_NGPIO 81 /* GPIOA-H */ +# define STM32_NADC 1 /* One 12-bit ADC1, 16 channels */ +# define STM32_NDAC 0 /* No DAC */ +# define STM32_NCAPSENSE 0 /* No capacitive sensing channels */ +# define STM32_NCRC 1 /* No CRC */ +# define STM32_NETHERNET 0 /* No Ethernet MAC */ +# define STM32_NRNG 0 /* No Random number generator (RNG) */ +# define STM32_NDCMI 0 /* No digital camera interface (DCMI) */ + #elif defined(CONFIG_ARCH_CHIP_STM32F405RG) /* LQFP 64 10x10x1.4 1024Kb FLASH 192Kb SRAM */ # undef CONFIG_STM32_STM32L15XX /* STM32L151xx and STM32L152xx family */ # undef CONFIG_STM32_ENERGYLITE /* STM32L EnergyLite family */ diff --git a/arch/arm/include/stm32/stm32f10xxx_irq.h b/arch/arm/include/stm32/stm32f10xxx_irq.h index 3c62e1e2ea3..29f07b0fd88 100644 --- a/arch/arm/include/stm32/stm32f10xxx_irq.h +++ b/arch/arm/include/stm32/stm32f10xxx_irq.h @@ -120,7 +120,7 @@ # define STM32_IRQ_TIM5 (66) /* 50: TIM5 global interrupt */ # define STM32_IRQ_SPI3 (67) /* 51: SPI3 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: UART5 global interrupt */ # define STM32_IRQ_TIM6 (70) /* 54: TIM6 global interrupt */ # define STM32_IRQ_TIM7 (71) /* 55: TIM7 global interrupt */ # define STM32_IRQ_DMA2CH1 (72) /* 56: DMA2 Channel 1 global interrupt */ diff --git a/arch/arm/src/Makefile b/arch/arm/src/Makefile index e74c0cfc28b..e505b956da5 100644 --- a/arch/arm/src/Makefile +++ b/arch/arm/src/Makefile @@ -1,7 +1,7 @@ ############################################################################ # arch/arm/src/Makefile # -# Copyright (C) 2007-2009, 2011-2012, 2014-2015 Gregory Nutt. All rights reserved. +# Copyright (C) 2007-2009, 2011-2012, 2014-2016 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -127,6 +127,11 @@ BIN = libarch$(LIBEXT) LDFLAGS += $(ARCHSCRIPT) +# Override in Make.defs if linker is not 'ld' + +LDSTARTGROUP ?= --start-group +LDENDGROUP ?= --end-group + EXTRA_LIBS ?= EXTRA_LIBPATHS ?= LINKLIBS ?= @@ -198,7 +203,7 @@ nuttx$(EXEEXT): $(HEAD_OBJ) board$(DELIM)libboard$(LIBEXT) $(Q) echo "LD: nuttx" $(Q) $(LD) --entry=__start $(LDFLAGS) $(LIBPATHS) $(EXTRA_LIBPATHS) \ -o $(NUTTX) $(HEAD_OBJ) $(EXTRA_OBJS) \ - --start-group $(LDLIBS) $(EXTRA_LIBS) $(LIBGCC) --end-group + $(LDSTARTGROUP) $(LDLIBS) $(EXTRA_LIBS) $(LIBGCC) $(LDENDGROUP) ifneq ($(CONFIG_WINDOWS_NATIVE),y) $(Q) $(NM) $(NUTTX) | \ grep -v '\(compiled\)\|\(\$(OBJEXT)$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \ diff --git a/arch/arm/src/a1x/Kconfig b/arch/arm/src/a1x/Kconfig index 41414352212..c66753d5381 100644 --- a/arch/arm/src/a1x/Kconfig +++ b/arch/arm/src/a1x/Kconfig @@ -21,49 +21,49 @@ menu "Allwinner A1X Peripheral Support" config A1X_UART0 bool "UART 0" default n - select ARCH_HAVE_UART0 + select UART0_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config A1X_UART1 bool "UART 1" default n - select ARCH_HAVE_UART1 + select UART1_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config A1X_UART2 bool "UART 2" default n - select ARCH_HAVE_UART2 + select UART2_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config A1X_UART3 bool "UART 3" default n - select ARCH_HAVE_UART3 + select UART3_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config A1X_UART4 bool "UART 4" default n - select ARCH_HAVE_UART4 + select UART4_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config A1X_UART5 bool "UART 5" default n - select ARCH_HAVE_UART5 + select UART5_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config A1X_UART6 bool "UART 6" default n - select ARCH_HAVE_UART6 + select UART6_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config A1X_UART7 bool "UART 7" default n - select ARCH_HAVE_UART7 + select UART7_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config A1X_IR0 diff --git a/arch/arm/src/armv7-a/arm_addrenv.c b/arch/arm/src/armv7-a/arm_addrenv.c index 56d4d05ceea..2bd1f886cec 100644 --- a/arch/arm/src/armv7-a/arm_addrenv.c +++ b/arch/arm/src/armv7-a/arm_addrenv.c @@ -141,10 +141,6 @@ # error CONFIG_ARCH_HEAP_VBASE not aligned to section boundary #endif -/**************************************************************************** - * Private Data - ****************************************************************************/ - /**************************************************************************** * Private Functions ****************************************************************************/ diff --git a/arch/arm/src/armv7-a/arm_addrenv_kstack.c b/arch/arm/src/armv7-a/arm_addrenv_kstack.c index 852b03620b9..da2a474126e 100644 --- a/arch/arm/src/armv7-a/arm_addrenv_kstack.c +++ b/arch/arm/src/armv7-a/arm_addrenv_kstack.c @@ -121,18 +121,6 @@ #if defined(CONFIG_ARCH_ADDRENV) && defined(CONFIG_ARCH_KERNEL_STACK) -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/arch/arm/src/armv7-a/arm_addrenv_shm.c b/arch/arm/src/armv7-a/arm_addrenv_shm.c index 3bd2715350a..9a05b9f7b92 100644 --- a/arch/arm/src/armv7-a/arm_addrenv_shm.c +++ b/arch/arm/src/armv7-a/arm_addrenv_shm.c @@ -55,18 +55,6 @@ #if defined(CONFIG_BUILD_KERNEL) && defined(CONFIG_MM_SHM) -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/arch/arm/src/armv7-a/arm_addrenv_ustack.c b/arch/arm/src/armv7-a/arm_addrenv_ustack.c index 97da35992ff..206d517ef38 100644 --- a/arch/arm/src/armv7-a/arm_addrenv_ustack.c +++ b/arch/arm/src/armv7-a/arm_addrenv_ustack.c @@ -116,14 +116,6 @@ # error CONFIG_ARCH_STACK_VBASE not aligned to section boundary #endif -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/arch/arm/src/armv7-a/arm_addrenv_utils.c b/arch/arm/src/armv7-a/arm_addrenv_utils.c index fc62c9b1261..f3147918f26 100644 --- a/arch/arm/src/armv7-a/arm_addrenv_utils.c +++ b/arch/arm/src/armv7-a/arm_addrenv_utils.c @@ -53,18 +53,6 @@ #ifdef CONFIG_ARCH_ADDRENV -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/arch/arm/src/armv7-a/arm_allocpage.c b/arch/arm/src/armv7-a/arm_allocpage.c index 39ffea6e21e..88dc1bc47f1 100644 --- a/arch/arm/src/armv7-a/arm_allocpage.c +++ b/arch/arm/src/armv7-a/arm_allocpage.c @@ -54,10 +54,6 @@ #include "pg_macros.h" #include "up_internal.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - /**************************************************************************** * Private Types ****************************************************************************/ @@ -108,10 +104,6 @@ static L1ndx_t g_ptemap[CONFIG_PAGING_NPPAGED]; static bool g_pgwrap; -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/arch/arm/src/armv7-a/arm_assert.c b/arch/arm/src/armv7-a/arm_assert.c index 00c730919c7..ab3bd4c9081 100644 --- a/arch/arm/src/armv7-a/arm_assert.c +++ b/arch/arm/src/armv7-a/arm_assert.c @@ -334,7 +334,13 @@ static void up_dumpstate(void) } #endif - /* Then dump the registers (if available) */ +#ifdef CONFIG_SMP + /* Show the CPU number */ + + lldbg("CPU%d:\n", up_cpu_index()); +#endif + + /* Then dump the CPU registers (if available) */ up_registerdump(); diff --git a/arch/arm/src/armv7-a/arm_checkmapping.c b/arch/arm/src/armv7-a/arm_checkmapping.c index 4f20d220532..5a7b2518ef5 100644 --- a/arch/arm/src/armv7-a/arm_checkmapping.c +++ b/arch/arm/src/armv7-a/arm_checkmapping.c @@ -51,18 +51,6 @@ #ifdef CONFIG_PAGING -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/arch/arm/src/armv7-a/arm_coherent_dcache.c b/arch/arm/src/armv7-a/arm_coherent_dcache.c index 363e88f8046..c9552093ef2 100644 --- a/arch/arm/src/armv7-a/arm_coherent_dcache.c +++ b/arch/arm/src/armv7-a/arm_coherent_dcache.c @@ -46,18 +46,6 @@ #include -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/arch/arm/src/armv7-a/arm_copyfullstate.c b/arch/arm/src/armv7-a/arm_copyfullstate.c index b41b3f2ebb5..b35149ff07b 100644 --- a/arch/arm/src/armv7-a/arm_copyfullstate.c +++ b/arch/arm/src/armv7-a/arm_copyfullstate.c @@ -44,18 +44,6 @@ #include "up_internal.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/arch/arm/src/armv7-a/arm_cpuidlestack.c b/arch/arm/src/armv7-a/arm_cpuidlestack.c index 09e9f0d12ee..dd264d25c14 100644 --- a/arch/arm/src/armv7-a/arm_cpuidlestack.c +++ b/arch/arm/src/armv7-a/arm_cpuidlestack.c @@ -47,7 +47,7 @@ #include "smp.h" #include "up_internal.h" -#if defined(CONFIG_SMP) && CONFIG_SMP_NCPUS > 1 +#ifdef CONFIG_SMP /**************************************************************************** * Pre-processor Definitions @@ -61,6 +61,7 @@ * Private Data ****************************************************************************/ +#if CONFIG_SMP_NCPUS > 1 static FAR const uint32_t *g_cpu_stackalloc[CONFIG_SMP_NCPUS] = { 0 @@ -72,6 +73,7 @@ static FAR const uint32_t *g_cpu_stackalloc[CONFIG_SMP_NCPUS] = #endif /* CONFIG_SMP_NCPUS > 3 */ #endif /* CONFIG_SMP_NCPUS > 2 */ }; +#endif /**************************************************************************** * Public Functions @@ -122,6 +124,7 @@ static FAR const uint32_t *g_cpu_stackalloc[CONFIG_SMP_NCPUS] = int up_cpu_idlestack(int cpu, FAR struct tcb_s *tcb, size_t stack_size) { +#if CONFIG_SMP_NCPUS > 1 uintptr_t stack_alloc; uintptr_t top_of_stack; @@ -138,8 +141,9 @@ int up_cpu_idlestack(int cpu, FAR struct tcb_s *tcb, size_t stack_size) tcb->adj_stack_size = SMP_STACK_SIZE; tcb->stack_alloc_ptr = (FAR uint32_t *)stack_alloc; tcb->adj_stack_ptr = (FAR uint32_t *)top_of_stack; +#endif return OK; } -#endif /* CONFIG_SMP && CONFIG_SMP_NCPUS > 1 */ +#endif /* CONFIG_SMP */ diff --git a/arch/arm/src/armv7-a/arm_cpustart.c b/arch/arm/src/armv7-a/arm_cpustart.c index d5d0fe99bc6..1ec95da855a 100644 --- a/arch/arm/src/armv7-a/arm_cpustart.c +++ b/arch/arm/src/armv7-a/arm_cpustart.c @@ -46,10 +46,42 @@ #include "up_internal.h" #include "gic.h" +#include "cp15_cacheops.h" #include "sched/sched.h" #ifdef CONFIG_SMP +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: arm_registerdump + ****************************************************************************/ + +#if 0 /* Was useful in solving some startup problems */ +static inline void arm_registerdump(FAR struct tcb_s *tcb) +{ + int regndx; + + lldbg("CPU%d:\n", up_cpu_index()); + + /* Dump the startup registers */ + + for (regndx = REG_R0; regndx <= REG_R15; regndx += 8) + { + uint32_t *ptr = (uint32_t *)&tcb->xcp.regs[regndx]; + lldbg("R%d: %08x %08x %08x %08x %08x %08x %08x %08x\n", + regndx, ptr[0], ptr[1], ptr[2], ptr[3], + ptr[4], ptr[5], ptr[6], ptr[7]); + } + + lldbg("CPSR: %08x\n", tcb->xcp.regs[REG_CPSR]); +} +#else +# define arm_registerdump(tcb) +#endif + /**************************************************************************** * Public Functions ****************************************************************************/ @@ -72,12 +104,19 @@ int arm_start_handler(int irq, FAR void *context) { - FAR struct tcb_s *tcb = this_task(); + FAR struct tcb_s *tcb; + + sllvdbg("CPU%d Started\n", up_cpu_index()); /* Reset scheduler parameters */ + tcb = this_task(); sched_resume_scheduler(tcb); + /* Dump registers so that we can see what is going to happen on return */ + + arm_registerdump(tcb); + /* Then switch contexts. This instantiates the exception context of the * tcb at the head of the assigned task list. In this case, this should * be the CPUs NULL task. @@ -116,8 +155,14 @@ int arm_start_handler(int irq, FAR void *context) int up_cpu_start(int cpu) { + sllvdbg("Starting CPU%d\n", cpu); + DEBUGASSERT(cpu >= 0 && cpu < CONFIG_SMP_NCPUS && cpu != this_cpu()); + /* Make the content of CPU0 L1 cache has been written to coherent L2 */ + + cp15_clean_dcache(CONFIG_RAM_START, CONFIG_RAM_END - 1); + /* Execute SGI1 */ return arm_cpu_sgi(GIC_IRQ_SGI1, (1 << cpu)); diff --git a/arch/arm/src/armv7-a/arm_doirq.c b/arch/arm/src/armv7-a/arm_doirq.c index 4980111d582..b3d98151c0b 100644 --- a/arch/arm/src/armv7-a/arm_doirq.c +++ b/arch/arm/src/armv7-a/arm_doirq.c @@ -52,22 +52,6 @@ #include "group/group.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/arch/arm/src/armv7-a/arm_elf.c b/arch/arm/src/armv7-a/arm_elf.c index 3f076908c4d..57898e136af 100644 --- a/arch/arm/src/armv7-a/arm_elf.c +++ b/arch/arm/src/armv7-a/arm_elf.c @@ -48,18 +48,6 @@ #include #include -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/arch/arm/src/armv7-a/arm_fullcontextrestore.S b/arch/arm/src/armv7-a/arm_fullcontextrestore.S index 88fce91dba6..64f74c8a98f 100644 --- a/arch/arm/src/armv7-a/arm_fullcontextrestore.S +++ b/arch/arm/src/armv7-a/arm_fullcontextrestore.S @@ -44,28 +44,12 @@ .file "arm_fullcontextrestore.S" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - /**************************************************************************** * Public Symbols ****************************************************************************/ .globl up_fullcontextrestore -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/arch/arm/src/armv7-a/arm_gicv2.c b/arch/arm/src/armv7-a/arm_gicv2.c index c03ef01c7a5..990a2c66dd3 100644 --- a/arch/arm/src/armv7-a/arm_gicv2.c +++ b/arch/arm/src/armv7-a/arm_gicv2.c @@ -166,12 +166,12 @@ void arm_gic_initialize(void) /* Registers with 8-bits per interrupt */ - putreg32(0x80808080, GIC_ICDIPR(0)); /* SGI[3:0] priority */ - putreg32(0x80808080, GIC_ICDIPR(4)); /* SGI[4:7] priority */ - putreg32(0x80808080, GIC_ICDIPR(8)); /* SGI[8:11] priority */ - putreg32(0x80808080, GIC_ICDIPR(12)); /* SGI[12:15] priority */ - putreg32(0x80000000, GIC_ICDIPR(24)); /* PPI[0] priority */ - putreg32(0x80808080, GIC_ICDIPR(28)); /* PPI[1:4] priority */ + putreg32(0x80808080, GIC_ICDIPR(0)); /* SGI[3:0] priority */ + putreg32(0x80808080, GIC_ICDIPR(4)); /* SGI[4:7] priority */ + putreg32(0x80808080, GIC_ICDIPR(8)); /* SGI[8:11] priority */ + putreg32(0x80808080, GIC_ICDIPR(12)); /* SGI[12:15] priority */ + putreg32(0x80000000, GIC_ICDIPR(24)); /* PPI[0] priority */ + putreg32(0x80808080, GIC_ICDIPR(28)); /* PPI[1:4] priority */ /* Set the binary point register. * @@ -211,7 +211,16 @@ void arm_gic_initialize(void) #endif -#if defined(CONFIG_ARCH_TRUSTZONE_SECURE) || defined(CONFIG_ARCH_TRUSTZONE_BOTH) +#if defined(CONFIG_ARCH_TRUSTZONE_SECURE) + /* Set FIQn=1 if secure interrupts are to signal using nfiq_c. + * + * NOTE: Only for processors that operate in secure state. + * REVISIT: Do I need to do this? + */ + + //iccicr |= GIC_ICCICRS_FIQEN; + +#elif defined(CONFIG_ARCH_TRUSTZONE_BOTH) /* Set FIQn=1 if secure interrupts are to signal using nfiq_c. * * NOTE: Only for processors that operate in secure state. @@ -221,25 +230,35 @@ void arm_gic_initialize(void) iccicr |= GIC_ICCICRS_FIQEN; #endif -#if defined(ONFIG_ARCH_TRUSTZONE_BOTH) +#if defined(CONFIG_ARCH_TRUSTZONE_SECURE) /* Program the AckCtl bit to select the required interrupt acknowledge * behavior. * * NOTE: Only for processors that operate in both secure and non-secure * state. - * REVISIT: I don't yet fully understand this setting. + * REVISIT: This is here only for superstituous reasons. I don't think + * I need this setting in this configuration. */ - // iccicr |= GIC_ICCICRS_ACKTCTL; + iccicr |= GIC_ICCICRS_ACKTCTL; + +#elif defined(CONFIG_ARCH_TRUSTZONE_BOTH) + /* Program the AckCtl bit to select the required interrupt acknowledge + * behavior. + * + * NOTE: Only for processors that operate in both secure and non-secure + * state. + */ + + iccicr |= GIC_ICCICRS_ACKTCTL; /* Program the SBPR bit to select the required binary pointer behavior. * * NOTE: Only for processors that operate in both secure and non-secure * state. - * REVISIT: I don't yet fully understand this setting. */ - // iccicr |= GIC_ICCICRS_CBPR; + iccicr |= GIC_ICCICRS_CBPR; #endif #if defined(CONFIG_ARCH_TRUSTZONE_SECURE) || defined(CONFIG_ARCH_TRUSTZONE_BOTH) @@ -291,9 +310,15 @@ void arm_gic_initialize(void) * bypass. */ +#if 0 /* REVISIT -- I don't know why this needs to be like this */ iccicr |= (GIC_ICCICRS_ENABLEGRP0 | GIC_ICCICRS_FIQBYPDISGRP0 | GIC_ICCICRS_IRQBYPDISGRP0 | GIC_ICCICRS_FIQBYPDISGRP1 | GIC_ICCICRS_IRQBYPDISGRP1); +#else + iccicr |= (GIC_ICCICRS_ENABLEGRP0 | GIC_ICCICRS_ENABLEGRP1 | + GIC_ICCICRS_FIQBYPDISGRP0 | GIC_ICCICRS_IRQBYPDISGRP0 | + GIC_ICCICRS_FIQBYPDISGRP1 | GIC_ICCICRS_IRQBYPDISGRP1); +#endif icddcr = GIC_ICDDCR_ENABLEGRP0; #elif defined(CONFIG_ARCH_TRUSTZONE_BOTH) @@ -498,4 +523,56 @@ int up_prioritize_irq(int irq, int priority) return -EINVAL; } +/**************************************************************************** + * Name: arm_gic_irq_trigger + * + * Description: + * Set the trigger type for the specified IRQ source and the current CPU. + * + * Since this API is not supported on all architectures, it should be + * avoided in common implementations where possible. + * + * Input Paramters: + * irq - The interrupt request to modify. + * edge - False: Active HIGH level sensitive, True: Rising edge sensitive + * + * Returned Value: + * Zero (OK) on success; a negated errno value is returned on any failure. + * + ****************************************************************************/ + +int arm_gic_irq_trigger(int irq, bool edge) +{ + uintptr_t regaddr; + uint32_t regval; + uint32_t intcfg; + + if (irq > GIC_IRQ_SGI15 && irq < NR_IRQS) + { + /* Get the address of the Interrupt Configuration Register for this + * irq. + */ + + regaddr = GIC_ICDICFR(irq); + + /* Get the new Interrupt configuration bit setting */ + + intcfg = (edge ? (INT_ICDICFR_EDGE | INT_ICDICFR_1N) : INT_ICDICFR_1N); + + /* Write the correct interrupt trigger to the Interrupt Configuration + * Register. + */ + + regval = getreg32(regaddr); + regval &= ~GIC_ICDICFR_ID_MASK(irq); + regval |= GIC_ICDICFR_ID(irq, intcfg); + putreg32(regval, regaddr); + + return OK; + } + + return -EINVAL; +} + + #endif /* CONFIG_ARMV7A_HAVE_GICv2 */ diff --git a/arch/arm/src/armv7-a/arm_initialstate.c b/arch/arm/src/armv7-a/arm_initialstate.c index c43e12d67eb..cb912021b1f 100644 --- a/arch/arm/src/armv7-a/arm_initialstate.c +++ b/arch/arm/src/armv7-a/arm_initialstate.c @@ -48,18 +48,6 @@ #include "up_internal.h" #include "up_arch.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/arch/arm/src/armv7-a/arm_mmu.c b/arch/arm/src/armv7-a/arm_mmu.c index 19c609e5b0f..1589e8081a0 100644 --- a/arch/arm/src/armv7-a/arm_mmu.c +++ b/arch/arm/src/armv7-a/arm_mmu.c @@ -44,18 +44,6 @@ #include "cache.h" #include "mmu.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/arch/arm/src/armv7-a/arm_pgalloc.c b/arch/arm/src/armv7-a/arm_pgalloc.c index d430f8b68b3..514c623fe90 100644 --- a/arch/arm/src/armv7-a/arm_pgalloc.c +++ b/arch/arm/src/armv7-a/arm_pgalloc.c @@ -54,13 +54,6 @@ #ifdef CONFIG_BUILD_KERNEL -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ /**************************************************************************** * Private Functions diff --git a/arch/arm/src/armv7-a/arm_pginitialize.c b/arch/arm/src/armv7-a/arm_pginitialize.c index 94b44449ed2..ba431a8c603 100644 --- a/arch/arm/src/armv7-a/arm_pginitialize.c +++ b/arch/arm/src/armv7-a/arm_pginitialize.c @@ -49,18 +49,6 @@ #ifdef CONFIG_PAGING -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/arch/arm/src/armv7-a/arm_physpgaddr.c b/arch/arm/src/armv7-a/arm_physpgaddr.c index d3fecd1fc11..0c753ab8640 100644 --- a/arch/arm/src/armv7-a/arm_physpgaddr.c +++ b/arch/arm/src/armv7-a/arm_physpgaddr.c @@ -55,17 +55,6 @@ #ifdef CONFIG_MM_PGALLOC -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/arch/arm/src/armv7-a/arm_prefetchabort.c b/arch/arm/src/armv7-a/arm_prefetchabort.c index 7d2b4cf2df2..bdd28c4a3aa 100644 --- a/arch/arm/src/armv7-a/arm_prefetchabort.c +++ b/arch/arm/src/armv7-a/arm_prefetchabort.c @@ -61,18 +61,6 @@ #include "sched/sched.h" #include "up_internal.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/arch/arm/src/armv7-a/arm_schedulesigaction.c b/arch/arm/src/armv7-a/arm_schedulesigaction.c index e8db2d35f45..3dfe5fc285f 100644 --- a/arch/arm/src/armv7-a/arm_schedulesigaction.c +++ b/arch/arm/src/armv7-a/arm_schedulesigaction.c @@ -53,18 +53,6 @@ #ifndef CONFIG_DISABLE_SIGNALS -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/arch/arm/src/armv7-a/arm_signal_dispatch.c b/arch/arm/src/armv7-a/arm_signal_dispatch.c index 3e4f90b6e9b..5925923760f 100644 --- a/arch/arm/src/armv7-a/arm_signal_dispatch.c +++ b/arch/arm/src/armv7-a/arm_signal_dispatch.c @@ -47,18 +47,6 @@ #if ((defined(CONFIG_BUILD_PROTECTED) && defined(__KERNEL__)) || \ defined(CONFIG_BUILD_KERNEL)) && !defined(CONFIG_DISABLE_SIGNALS) -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/arch/arm/src/armv7-a/arm_syscall.c b/arch/arm/src/armv7-a/arm_syscall.c index 4b73c1e5e38..854ece3de2c 100644 --- a/arch/arm/src/armv7-a/arm_syscall.c +++ b/arch/arm/src/armv7-a/arm_syscall.c @@ -77,7 +77,7 @@ #endif /**************************************************************************** - * Private Data + * Private Functions ****************************************************************************/ /**************************************************************************** diff --git a/arch/arm/src/armv7-a/arm_unblocktask.c b/arch/arm/src/armv7-a/arm_unblocktask.c index 173ca913222..e3d2fa3fc79 100644 --- a/arch/arm/src/armv7-a/arm_unblocktask.c +++ b/arch/arm/src/armv7-a/arm_unblocktask.c @@ -49,18 +49,6 @@ #include "clock/clock.h" #include "up_internal.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/arch/arm/src/armv7-a/arm_undefinedinsn.c b/arch/arm/src/armv7-a/arm_undefinedinsn.c index bc08375594c..0c051d9dd91 100644 --- a/arch/arm/src/armv7-a/arm_undefinedinsn.c +++ b/arch/arm/src/armv7-a/arm_undefinedinsn.c @@ -58,18 +58,6 @@ #include "up_internal.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/arch/arm/src/armv7-a/arm_va2pte.c b/arch/arm/src/armv7-a/arm_va2pte.c index ded054187e3..fb6e4f03586 100644 --- a/arch/arm/src/armv7-a/arm_va2pte.c +++ b/arch/arm/src/armv7-a/arm_va2pte.c @@ -52,18 +52,6 @@ #ifdef CONFIG_PAGING -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/arch/arm/src/armv7-a/arm_vectors.S b/arch/arm/src/armv7-a/arm_vectors.S index 5699a449fda..33d1f8fc550 100644 --- a/arch/arm/src/armv7-a/arm_vectors.S +++ b/arch/arm/src/armv7-a/arm_vectors.S @@ -45,10 +45,6 @@ .file "arm_vectors.S" -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - /************************************************************************************ * Private Data ************************************************************************************/ @@ -69,10 +65,6 @@ g_fiqtmp: .word 0 /* Saved spsr */ #endif -/************************************************************************************ - * Assembly Macros - ************************************************************************************/ - /************************************************************************************ * Private Functions ************************************************************************************/ diff --git a/arch/arm/src/armv7-a/arm_virtpgaddr.c b/arch/arm/src/armv7-a/arm_virtpgaddr.c index 741bf8d1227..26dc9cc209b 100644 --- a/arch/arm/src/armv7-a/arm_virtpgaddr.c +++ b/arch/arm/src/armv7-a/arm_virtpgaddr.c @@ -43,18 +43,6 @@ #if defined(CONFIG_MM_PGALLOC) && defined(CONFIG_ARCH_PGPOOL_MAPPING) -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/arch/arm/src/armv7-a/crt0.c b/arch/arm/src/armv7-a/crt0.c index cfa00e7b1c4..a06e3f858e2 100644 --- a/arch/arm/src/armv7-a/crt0.c +++ b/arch/arm/src/armv7-a/crt0.c @@ -46,14 +46,6 @@ #ifdef CONFIG_BUILD_KERNEL -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - /**************************************************************************** * Public Function Prototypes ****************************************************************************/ diff --git a/arch/arm/src/armv7-a/gic.h b/arch/arm/src/armv7-a/gic.h index 45f8a606cbe..cc6ee483300 100644 --- a/arch/arm/src/armv7-a/gic.h +++ b/arch/arm/src/armv7-a/gic.h @@ -495,7 +495,7 @@ #define INT_ICDICFR_EDGE 2 /* Bit n+2: 1=Edge sensitive */ #define GIC_ICDICFR_ID_SHIFT(n) GIC_SHIFT16(n) -#define GIC_ICDICFR_ID_MASK(n) GIC_MASK16(n +#define GIC_ICDICFR_ID_MASK(n) GIC_MASK16(n) # define GIC_ICDICFR_ID(n,c) ((uint32_t)(c) << GIC_SHIFT16(n)) /* PPI Status Register */ @@ -720,6 +720,26 @@ void arm_gic0_initialize(void); void arm_gic_initialize(void); +/**************************************************************************** + * Name: arm_gic_irq_trigger + * + * Description: + * Set the trigger type for the specificd IRQ source and the current CPU. + * + * Since this API is not supported on all architectures, it should be + * avoided in common implementations where possible. + * + * Input Paramters: + * irq - The interrupt request to modify. + * edge - False: Active HIGH level sensitive, True: Rising edge sensitive + * + * Returned Value: + * Zero (OK) on success; a negated errno value is returned on any failure. + * + ****************************************************************************/ + +int arm_gic_irq_trigger(int irq, bool edge); + /**************************************************************************** * Name: arm_decodeirq * diff --git a/arch/arm/src/common/up_createstack.c b/arch/arm/src/common/up_createstack.c index 12d4575e3dd..c3aa9d7adb9 100644 --- a/arch/arm/src/common/up_createstack.c +++ b/arch/arm/src/common/up_createstack.c @@ -220,7 +220,7 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype) if (tcb->stack_alloc_ptr) { #if defined(CONFIG_TLS) && defined(CONFIG_STACK_COLORATION) - uinptr_t stack_base; + uintptr_t stack_base; #endif size_t top_of_stack; size_t size_of_stack; @@ -264,7 +264,7 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype) * water marks. */ - stackbase = (uintptr_t)tcb->stack_alloc_ptr + sizeof(struct tls_info_s); + stack_base = (uintptr_t)tcb->stack_alloc_ptr + sizeof(struct tls_info_s); stack_size = tcb->adj_stack_size - sizeof(struct tls_info_s); up_stack_color((FAR void *)stack_base, stack_size); diff --git a/arch/arm/src/common/up_usestack.c b/arch/arm/src/common/up_usestack.c index 5dea96be4e9..887387976ae 100644 --- a/arch/arm/src/common/up_usestack.c +++ b/arch/arm/src/common/up_usestack.c @@ -174,7 +174,13 @@ int up_use_stack(struct tcb_s *tcb, void *stack, size_t stack_size) * value that we can use later to test for high water marks. */ -# warning Missing logic +#ifdef CONFIG_TLS + up_stack_color( + (FAR void *)((uintptr_t)tcb->stack_alloc_ptr + sizeof(struct tls_info_s)), + tcb->adj_stack_size - sizeof(struct tls_info_s)); +#else + up_stack_color(tcb->stack_alloc_ptr, tcb->adj_stack_size); +#endif #endif return OK; diff --git a/arch/arm/src/dm320/Kconfig b/arch/arm/src/dm320/Kconfig index cc0de49494c..ff6356ff5f5 100644 --- a/arch/arm/src/dm320/Kconfig +++ b/arch/arm/src/dm320/Kconfig @@ -11,12 +11,12 @@ menu "DM320 Peripheral Selections" config DM320_UART0 bool default y - select ARCH_HAVE_UART0 + select UART0_SERIALDRIVER config DM320_UART1 bool default y - select ARCH_HAVE_UART1 + select UART1_SERIALDRIVER endmenu # DM320 Peripheral Selections endif # ARCH_CHIP_DM320 diff --git a/arch/arm/src/efm32/Kconfig b/arch/arm/src/efm32/Kconfig index 0b90826e5ed..ad1abfbfa06 100644 --- a/arch/arm/src/efm32/Kconfig +++ b/arch/arm/src/efm32/Kconfig @@ -157,45 +157,42 @@ config EFM32_BITBAND config EFM32_USART0 bool "USART0" default n - select ARCH_HAVE_USART0 select ARCH_HAVE_SERIAL_TERMIOS config EFM32_USART1 bool "USART1" default n - select ARCH_HAVE_USART1 select ARCH_HAVE_SERIAL_TERMIOS config EFM32_USART2 bool "USART2" default n depends on EFM32_HAVE_USART2 - select ARCH_HAVE_USART2 select ARCH_HAVE_SERIAL_TERMIOS config EFM32_UART0 bool "UART0" default n - select ARCH_HAVE_UART0 + select UART0_SERIALDRIVER select EFM32_UART config EFM32_UART1 bool "UART1" default n - select ARCH_HAVE_UART1 + select UART1_SERIALDRIVER select EFM32_UART config EFM32_LEUART0 bool "Low energy UART0" default n - select ARCH_HAVE_OTHER_UART + select OTHER_UART_SERIALDRIVER select EFM32_LEUART config EFM32_LEUART1 bool "Low energy UART1" default n depends on EFM32_HAVE_LEUART1 - select ARCH_HAVE_OTHER_UART + select OTHER_UART_SERIALDRIVER select EFM32_LEUART config EFM32_OTGFS @@ -261,7 +258,7 @@ choice config EFM32_USART0_ISUART bool "USART0 is a UART" - select USART0_ISUART + select USART0_SERIALDRIVER select EFM32_USART_ISUART config EFM32_USART0_ISSPI @@ -277,7 +274,7 @@ choice config EFM32_USART1_ISUART bool "USART1 is a UART" - select USART1_ISUART + select USART1_SERIALDRIVER select EFM32_USART_ISUART config EFM32_USART1_ISSPI @@ -293,7 +290,7 @@ choice config EFM32_USART2_ISUART bool "USART2 is a UART" - select USART2_ISUART + select USART2_SERIALDRIVER select EFM32_USART_ISUART config EFM32_USART2_ISSPI diff --git a/arch/arm/src/efm32/efm32_adc.c b/arch/arm/src/efm32/efm32_adc.c index 102384ff3de..53cb731ad60 100644 --- a/arch/arm/src/efm32/efm32_adc.c +++ b/arch/arm/src/efm32/efm32_adc.c @@ -2,7 +2,9 @@ * arch/arm/src/efm32/efm32_adc.c * * Copyright (C) 2014 Bouteville Pierre-Noel. All rights reserved. + * Copyright (C) 2016 Gregory Nutt. All rights reserved. * Authors: Bouteville Pierre-Noel + * Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -63,9 +65,9 @@ #include "efm32.h" #include "efm32_adc.h" -/* ADC "upper half" support must be enabled */ +/* ADC "lower half" support must be enabled */ -#ifdef CONFIG_ADC +#ifdef CONFIG_EFM32_ADC /* Some ADC peripheral must be enabled */ @@ -100,6 +102,7 @@ struct efm32_dev_s { + FAR const struct adc_callback_s *cb; uint8_t irq; /* Interrupt generated by this ADC block */ uint8_t nchannels; /* Number of channels */ uint8_t current; /* Current ADC channel being converted */ @@ -124,6 +127,8 @@ static int adc_interrupt(FAR struct adc_dev_s *dev); /* ADC Driver Methods */ +static int adc_bind(FAR struct adc_dev_s *dev, + FAR const struct adc_callback_s *callback); static void adc_reset(FAR struct adc_dev_s *dev); static int adc_setup(FAR struct adc_dev_s *dev); static void adc_shutdown(FAR struct adc_dev_s *dev); @@ -148,6 +153,7 @@ static void adc_startconv(FAR struct efm32_dev_s *priv, bool enable); static const struct adc_ops_s g_adcops = { + .ao_bind = adc_bind, .ao_reset = adc_reset, .ao_setup = adc_setup, .ao_shutdown = adc_shutdown, @@ -790,7 +796,7 @@ static void adc_startconv(struct efm32_dev_s *priv, bool enable) #endif /**************************************************************************** - * Name: adc_reset + * Name: adc_hw_reset * * Description: * Deinitializes the ADCx peripheral registers to their default @@ -873,6 +879,25 @@ static void adc_enable(FAR struct efm32_dev_s *priv, bool enable) adc_putreg(priv, EFM32_ADC_CR2_OFFSET, regval); } +/**************************************************************************** + * Name: adc_bind + * + * Description: + * Bind the upper-half driver callbacks to the lower-half implementation. This + * must be called early in order to receive ADC event notifications. + * + ****************************************************************************/ + +static int adc_bind(FAR struct adc_dev_s *dev, + FAR const struct adc_callback_s *callback) +{ + FAR struct efm32_dev_s *priv = (FAR struct efm32_dev_s *)dev->ad_priv; + + DEBUGASSERT(priv != NULL); + priv->cb = callback; + return OK; +} + /**************************************************************************** * Name: adc_reset * @@ -1180,14 +1205,21 @@ static int adc_interrupt(FAR struct adc_dev_s *dev) value = adc_getreg(priv, EFM32_ADC_DR_OFFSET); value &= ADC_DR_DATA_MASK; - /* Give the ADC data to the ADC driver. adc_receive accepts 3 parameters: - * - * 1) The first is the ADC device instance for this ADC block. - * 2) The second is the channel number for the data, and - * 3) The third is the converted data for the channel. - */ + /* Verify that the upper-half driver has bound its callback functions */ - adc_receive(dev, priv->chanlist[priv->current], value); + if (priv->cb != NULL) + { + /* Give the ADC data to the ADC driver. The ADC receive method + * accepts 3 parameters: + * + * 1) The first is the ADC device instance for this ADC block. + * 2) The second is the channel number for the data, and + * 3) The third is the converted data for the channel. + */ + + DEBUGASSERT(priv->cb->au_receive != NULL); + priv->cb->au_receive(dev, priv->chanlist[priv->current], value); + } /* Set the channel number of the next channel that will complete conversion */ @@ -1272,7 +1304,8 @@ struct adc_dev_s *efm32_adcinitialize(int intf, const uint8_t *chanlist, int nch /* Configure the selected ADC */ - priv = dev->ad_priv; + priv = dev->ad_priv; + priv->cb = NULL; DEBUGASSERT(nchannels <= ADC_MAX_SAMPLES); priv->nchannels = nchannels; @@ -1283,4 +1316,4 @@ struct adc_dev_s *efm32_adcinitialize(int intf, const uint8_t *chanlist, int nch #endif /* CONFIG_EFM32_EFM32GG */ #endif /* CONFIG_EFM32_ADC1 */ -#endif /* CONFIG_ADC */ +#endif /* CONFIG_EFM32_ADC */ diff --git a/arch/arm/src/imx1/Kconfig b/arch/arm/src/imx1/Kconfig index e138090e457..aa2b6bb6932 100644 --- a/arch/arm/src/imx1/Kconfig +++ b/arch/arm/src/imx1/Kconfig @@ -12,17 +12,17 @@ menu "iMX.1 Peripheral Selection" config IMX1_UART1 bool "UART1" default n - select ARCH_HAVE_UART1 + select UART1_SERIALDRIVER config IMX1_UART2 bool "UART2" default n - select ARCH_HAVE_UART2 + select UART2_SERIALDRIVER config IMX1_UART3 bool "UART3" default n - select ARCH_HAVE_UART3 + select UART3_SERIALDRIVER config IMX1_SPI1 bool "SPI1" diff --git a/arch/arm/src/imx1/imx_cspi.h b/arch/arm/src/imx1/imx_cspi.h index 4a43e554694..842a4ca1116 100644 --- a/arch/arm/src/imx1/imx_cspi.h +++ b/arch/arm/src/imx1/imx_cspi.h @@ -74,7 +74,7 @@ #define IMX_CSPI1_SPIDMA (IMX_CSPI1_VBASE + CSPI_DMA_OFFSET) #define IMX_CSPI1_SPIRESET (IMX_CSPI1_VBASE + CSPI_RESET_OFFSET) -/* CSPI1 */ +/* CSPI2 */ #define IMX_CSPI2_RXD (IMX_CSPI2_VBASE + CSPI_RXD_OFFSET) #define IMX_CSPI2_TXD (IMX_CSPI2_VBASE + CSPI_TXD_OFFSET) @@ -138,7 +138,7 @@ /* CSPI Sample Period Control Register */ #define CSPI_SPCR_WAIT_SHIFT 0 -#define CSPI_SPCR_WAIT_MASK (0x7ff << CSPI_CTRL_DATARATE_SHIFT) +#define CSPI_SPCR_WAIT_MASK (0x7ff << CSPI_SPCR_WAIT_SHIFT) #define CSPI_SPCR_CSRC (1 << 15) /* Bit 15: 1:32768 or 32 kHz clock source */ /* CSPI DMA Control Register */ diff --git a/arch/arm/src/imx6/Kconfig b/arch/arm/src/imx6/Kconfig index 7250001d562..f49dde32bf6 100644 --- a/arch/arm/src/imx6/Kconfig +++ b/arch/arm/src/imx6/Kconfig @@ -54,32 +54,61 @@ config IMX6_HAVE_HDCP endmenu # "iMX.6 Chip Selection" +config IMX6_ECSPI + bool + default n + menu "iMX.6 Peripheral Selection" +config IMX6_ECSPI1 + bool "ECSPI1" + default n + select IMX6_ECSPI + +config IMX6_ECSPI2 + bool "ECSPI2" + default n + select IMX6_ECSPI + +config IMX6_ECSPI3 + bool "ECSPI3" + default n + select IMX6_ECSPI + +config IMX6_ECSPI4 + bool "ECSPI4" + default n + select IMX6_ECSPI + +config IMX6_ECSPI5 + bool "ECSPI5" + default n + select IMX6_ECSPI + config IMX6_UART1 bool "UART1" default n - select ARCH_HAVE_UART1 + select UART1_SERIALDRIVER config IMX6_UART2 bool "UART2" default n - select ARCH_HAVE_UART2 + select UART2_SERIALDRIVER config IMX6_UART3 bool "UART3" default n - select ARCH_HAVE_UART3 + select UART3_SERIALDRIVER config IMX6_UART4 bool "UART4" default n - select ARCH_HAVE_UART4 + select UART4_SERIALDRIVER config IMX6_UART5 bool "UART5" default n - select ARCH_HAVE_UART5 + select UART5_SERIALDRIVER config IMX6_SPI1 bool "SPI1" diff --git a/arch/arm/src/imx6/chip/imx_ecspi.h b/arch/arm/src/imx6/chip/imx_ecspi.h new file mode 100644 index 00000000000..2d7864132d0 --- /dev/null +++ b/arch/arm/src/imx6/chip/imx_ecspi.h @@ -0,0 +1,290 @@ +/************************************************************************************ + * arch/arm/src/imx6/imx_ecspi.h + * + * Copyright (C) 2009-2010, 2015-2016 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * 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. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_IMX6_CHIP_ECSPI_H +#define __ARCH_ARM_IMX6_CHIP_ECSPI_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include +#include "chip/imx_memorymap.h" + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ + +/* ECSPI Register Offsets ***********************************************************/ + +#define ECSPI_RXDATA_OFFSET 0x0000 /* Receive Data Register */ +#define ECSPI_TXDATA_OFFSET 0x0004 /* Transmit Data Register */ +#define ECSPI_CONREG_OFFSET 0x0008 /* Control Register */ +#define ECSPI_CONFIGREG_OFFSET 0x000c /* Configuration Register */ +#define ECSPI_INTREG_OFFSET 0x0010 /* Interrupt Control Register */ +#define ECSPI_DMAREG_OFFSET 0x0014 /* DMA Control Register */ +#define ECSPI_STATREG_OFFSET 0x0018 /* Status Register */ +#define ECSPI_PERIODREG_OFFSET 0x001c /* Sample Period Control Register */ +#define ECSPI_TESTREG_OFFSET 0x0020 /* Test Control Register */ +#define ECSPI_MSGDATA_OFFSET 0x0040 /* Message Data Register */ + +/* ECSPI Register Addresses *********************************************************/ + +/* ECSPI1 */ + +#define IMX_ECSPI1_RXDATA (IMX_ECSPI1_VBASE + ECSPI_RXDATA_OFFSET) +#define IMX_ECSPI1_TXDATA (IMX_ECSPI1_VBASE + ECSPI_TXDATA_OFFSET) +#define IMX_ECSPI1_CONREG (IMX_ECSPI1_VBASE + ECSPI_CONREG_OFFSET) +#define IMX_ECSPI1_CONFIGREG (IMX_ECSPI1_VBASE + ECSPI_CONFIGREG_OFFSET) +#define IMX_ECSPI1_INTREG (IMX_ECSPI1_VBASE + ECSPI_INTREG_OFFSET) +#define IMX_ECSPI1_DMAREG (IMX_ECSPI1_VBASE + ECSPI_DMAREG_OFFSET) +#define IMX_ECSPI1_STATREG (IMX_ECSPI1_VBASE + ECSPI_STATREG_OFFSET) +#define IMX_ECSPI1_PERIODREG (IMX_ECSPI1_VBASE + ECSPI_PERIODREG_OFFSET) +#define IMX_ECSPI1_TESTREG (IMX_ECSPI1_VBASE + ECSPI_TESTREG_OFFSET) +#define IMX_ECSPI1_MSGDATA (IMX_ECSPI1_VBASE + ECSPI_MSGDATA_OFFSET) + +/* ECSPI2 */ + +#define IMX_ECSPI2_RXDATA (IMX_ECSPI2_VBASE + ECSPI_RXDATA_OFFSET) +#define IMX_ECSPI2_TXDATA (IMX_ECSPI2_VBASE + ECSPI_TXDATA_OFFSET) +#define IMX_ECSPI2_CONREG (IMX_ECSPI2_VBASE + ECSPI_CONREG_OFFSET) +#define IMX_ECSPI2_CONFIGREG (IMX_ECSPI2_VBASE + ECSPI_CONFIGREG_OFFSET) +#define IMX_ECSPI2_INTREG (IMX_ECSPI2_VBASE + ECSPI_INTREG_OFFSET) +#define IMX_ECSPI2_DMAREG (IMX_ECSPI2_VBASE + ECSPI_DMAREG_OFFSET) +#define IMX_ECSPI2_STATREG (IMX_ECSPI2_VBASE + ECSPI_STATREG_OFFSET) +#define IMX_ECSPI2_PERIODREG (IMX_ECSPI2_VBASE + ECSPI_PERIODREG_OFFSET) +#define IMX_ECSPI2_TESTREG (IMX_ECSPI2_VBASE + ECSPI_TESTREG_OFFSET) +#define IMX_ECSPI2_MSGDATA (IMX_ECSPI2_VBASE + ECSPI_MSGDATA_OFFSET) + +/* ECSPI3 */ + +#define IMX_ECSPI3_RXDATA (IMX_ECSPI3_VBASE + ECSPI_RXDATA_OFFSET) +#define IMX_ECSPI3_TXDATA (IMX_ECSPI3_VBASE + ECSPI_TXDATA_OFFSET) +#define IMX_ECSPI3_CONREG (IMX_ECSPI3_VBASE + ECSPI_CONREG_OFFSET) +#define IMX_ECSPI3_CONFIGREG (IMX_ECSPI3_VBASE + ECSPI_CONFIGREG_OFFSET) +#define IMX_ECSPI3_INTREG (IMX_ECSPI3_VBASE + ECSPI_INTREG_OFFSET) +#define IMX_ECSPI3_DMAREG (IMX_ECSPI3_VBASE + ECSPI_DMAREG_OFFSET) +#define IMX_ECSPI3_STATREG (IMX_ECSPI3_VBASE + ECSPI_STATREG_OFFSET) +#define IMX_ECSPI3_PERIODREG (IMX_ECSPI3_VBASE + ECSPI_PERIODREG_OFFSET) +#define IMX_ECSPI3_TESTREG (IMX_ECSPI3_VBASE + ECSPI_TESTREG_OFFSET) +#define IMX_ECSPI3_MSGDATA (IMX_ECSPI3_VBASE + ECSPI_MSGDATA_OFFSET) + +/* ECSPI4 */ + +#define IMX_ECSPI4_RXDATA (IMX_ECSPI4_VBASE + ECSPI_RXDATA_OFFSET) +#define IMX_ECSPI4_TXDATA (IMX_ECSPI4_VBASE + ECSPI_TXDATA_OFFSET) +#define IMX_ECSPI4_CONREG (IMX_ECSPI4_VBASE + ECSPI_CONREG_OFFSET) +#define IMX_ECSPI4_CONFIGREG (IMX_ECSPI4_VBASE + ECSPI_CONFIGREG_OFFSET) +#define IMX_ECSPI4_INTREG (IMX_ECSPI4_VBASE + ECSPI_INTREG_OFFSET) +#define IMX_ECSPI4_DMAREG (IMX_ECSPI4_VBASE + ECSPI_DMAREG_OFFSET) +#define IMX_ECSPI4_STATREG (IMX_ECSPI4_VBASE + ECSPI_STATREG_OFFSET) +#define IMX_ECSPI4_PERIODREG (IMX_ECSPI4_VBASE + ECSPI_PERIODREG_OFFSET) +#define IMX_ECSPI4_TESTREG (IMX_ECSPI4_VBASE + ECSPI_TESTREG_OFFSET) +#define IMX_ECSPI4_MSGDATA (IMX_ECSPI4_VBASE + ECSPI_MSGDATA_OFFSET) + +/* ECSPI5 */ + +#define IMX_ECSPI5_RXDATA (IMX_ECSPI5_VBASE + ECSPI_RXDATA_OFFSET) +#define IMX_ECSPI5_TXDATA (IMX_ECSPI5_VBASE + ECSPI_TXDATA_OFFSET) +#define IMX_ECSPI5_CONREG (IMX_ECSPI5_VBASE + ECSPI_CONREG_OFFSET) +#define IMX_ECSPI5_CONFIGREG (IMX_ECSPI5_VBASE + ECSPI_CONFIGREG_OFFSET) +#define IMX_ECSPI5_INTREG (IMX_ECSPI5_VBASE + ECSPI_INTREG_OFFSET) +#define IMX_ECSPI5_DMAREG (IMX_ECSPI5_VBASE + ECSPI_DMAREG_OFFSET) +#define IMX_ECSPI5_STATREG (IMX_ECSPI5_VBASE + ECSPI_STATREG_OFFSET) +#define IMX_ECSPI5_PERIODREG (IMX_ECSPI5_VBASE + ECSPI_PERIODREG_OFFSET) +#define IMX_ECSPI5_TESTREG (IMX_ECSPI5_VBASE + ECSPI_TESTREG_OFFSET) +#define IMX_ECSPI5_MSGDATA (IMX_ECSPI5_VBASE + ECSPI_MSGDATA_OFFSET) + +/* ECSPI Register Bit Definitions ***************************************************/ + +/* Control Register */ + +#define ECSPI_CONREG_EN (1 << 0) /* Bit 0: SPI Block enable control */ +#define ECSPI_CONREG_HT (1 << 1) /* Bit 1: Hardware trigger enable */ +#define ECSPI_CONREG_XCH (1 << 2) /* Bit 2: SPI Exchange bit */ +#define ECSPI_CONREG_SMC (1 << 3) /* Bit 3: Start mode control */ +#define ECSPI_CONREG_CHMODE_SHIFT (4) /* Bits 4-7: SPI Channel mode */ +#define ECSPI_CONREG_CHMODE_MASK (15 << ECSPI_CONREG_CHMODE_SHIFT) +# define ECSPI_CONREG_CH0MASTER (1 << ECSPI_CONREG_CHMODE_SHIFT) /* Channel 0 master mode */ +# define ECSPI_CONREG_CH1MASTER (2 << ECSPI_CONREG_CHMODE_SHIFT) /* Channel 1 master mode */ +# define ECSPI_CONREG_CH2MASTER (4 << ECSPI_CONREG_CHMODE_SHIFT) /* Channel 2 master mode */ +# define ECSPI_CONREG_CH3MASTER (8 << ECSPI_CONREG_CHMODE_SHIFT) /* Channel 3 master mode */ +#define ECSPI_CONREG_POSTDIV_SHIFT (8) /* Bits 8-11: SPI Post divider (exponent) */ +#define ECSPI_CONREG_POSTDIV_MASK (15 << ECSPI_CONREG_POSTDIV_SHIFT) +# define ECSPI_CONREG_POSTDIV_EXP(n) ((uint32_t)(n) << ECSPI_CONREG_POSTDIV_SHIFT) +# define ECSPI_CONREG_POSTDIV_1 (0 << ECSPI_CONREG_POSTDIV_SHIFT) /* Divide by 2*0 */ +# define ECSPI_CONREG_POSTDIV_2 (1 << ECSPI_CONREG_POSTDIV_SHIFT) /* Divide by 2*1 */ +# define ECSPI_CONREG_POSTDIV_4 (2 << ECSPI_CONREG_POSTDIV_SHIFT) /* Divide by 2*2 */ +# define ECSPI_CONREG_POSTDIV_8 (3 << ECSPI_CONREG_POSTDIV_SHIFT) /* Divide by 2*3 */ +# define ECSPI_CONREG_POSTDIV_16 (4 << ECSPI_CONREG_POSTDIV_SHIFT) /* Divide by 2*4 */ +# define ECSPI_CONREG_POSTDIV_32 (5 << ECSPI_CONREG_POSTDIV_SHIFT) /* Divide by 2*5 */ +# define ECSPI_CONREG_POSTDIV_64 (6 << ECSPI_CONREG_POSTDIV_SHIFT) /* Divide by 2*6 */ +# define ECSPI_CONREG_POSTDIV_128 (7 << ECSPI_CONREG_POSTDIV_SHIFT) /* Divide by 2*7 */ +# define ECSPI_CONREG_POSTDIV_256 (8 << ECSPI_CONREG_POSTDIV_SHIFT) /* Divide by 2*8 */ +# define ECSPI_CONREG_POSTDIV_512 (9 << ECSPI_CONREG_POSTDIV_SHIFT) /* Divide by 2*9 */ +# define ECSPI_CONREG_POSTDIV_1024 (10 << ECSPI_CONREG_POSTDIV_SHIFT) /* Divide by 2*10 */ +# define ECSPI_CONREG_POSTDIV_2048 (11 << ECSPI_CONREG_POSTDIV_SHIFT) /* Divide by 2*11 */ +# define ECSPI_CONREG_POSTDIV_4096 (12 << ECSPI_CONREG_POSTDIV_SHIFT) /* Divide by 2*12 */ +# define ECSPI_CONREG_POSTDIV_8192 (13 << ECSPI_CONREG_POSTDIV_SHIFT) /* Divide by 2*13 */ +# define ECSPI_CONREG_POSTDIV_16384 (14 << ECSPI_CONREG_POSTDIV_SHIFT) /* Divide by 2*14 */ +# define ECSPI_CONREG_POSTDIV_32768 (15 << ECSPI_CONREG_POSTDIV_SHIFT) /* Divide by 2*15 */ +#define ECSPI_CONREG_PREDIV_SHIFT (12) /* Bits 12-15: SPI Pre divider (minus 1) */ +#define ECSPI_CONREG_PREDIV_MASK (15 << ECSPI_CONREG_PREDIV_SHIFT) +# define ECSPI_CONREG_PREDIV(n) ((uint32_t)(n) << ECSPI_CONREG_PREDIV_SHIFT) +#define ECSPI_CONREG_DRCTL_SHIFT 16 /* Bits 16-17: SPI Data ready control */ +#define ECSPI_CONREG_DRCTL_MASK (3 << ECSPI_CONREG_DRCTL_SHIFT) +# define ECSPI_CONREG_DRCTL_IGNRDY (0 << ECSPI_CONREG_DRCTL_SHIFT) +# define ECSPI_CONREG_DRCTL_FALLING (1 << ECSPI_CONREG_DRCTL_SHIFT) +# define ECSPI_CONREG_DRCTL_ACTVLOW (2 << ECSPI_CONREG_DRCTL_SHIFT) +#define ECSPI_CONREG_CHSEL_SHIFT (18) /* Bits 18-19: SPI Channel select bits */ +#define ECSPI_CONREG_CHSEL_MASK (3 << ECSPI_CONREG_CHSEL_SHIFT) +# define ECSPI_CONREG_CHSEL_SS0 (0 << ECSPI_CONREG_CHSEL_SHIFT) /* Channel 0 select (SS0) */ +# define ECSPI_CONREG_CHSEL_SS1 (1 << ECSPI_CONREG_CHSEL_SHIFT) /* Channel 1 select (SS1) */ +# define ECSPI_CONREG_CHSEL_SS2 (2 << ECSPI_CONREG_CHSEL_SHIFT) /* Channel 2 select (SS2) */ +# define ECSPI_CONREG_CHSEL_SS3 (3 << ECSPI_CONREG_CHSEL_SHIFT) /* Channel 3 select (SS3) */ +#define ECSPI_CONREG_BURSTLEN_SHIFT (20) /* Bits 20-31: Burst length */ +#define ECSPI_CONREG_BURSTLEN_MASK (0xfff << ECSPI_CONREG_BURSTLEN_SHIFT) +# define ECSPI_CONREG_BURSTLEN(n) ((uint32_t)(n) << ECSPI_CONREG_BURSTLEN_SHIFT) + +/* Configuration Register */ + +#define ECSPI_CONFIGREG_SCLKPHA_SHIFT (0) /* Bits 0-3: SPI Clock/Data Phase Control */ +#define ECSPI_CONFIGREG_SCLKPHA_MASK (15 << ECSPI_CONFIGREG_SCLKPHA_SHIFT) +# define ECSPI_CONFIGREG_CH0PHA (1 << ECSPI_CONFIGREG_SCLKPHA_SHIFT) /* Channel 0 SCLK Phase */ +# define ECSPI_CONFIGREG_CH1PHA (2 << ECSPI_CONFIGREG_SCLKPHA_SHIFT) /* Channel 1 SCLK Phase */ +# define ECSPI_CONFIGREG_CH2PHA (4 << ECSPI_CONFIGREG_SCLKPHA_SHIFT) /* Channel 2 SCLK Phase */ +# define ECSPI_CONFIGREG_CH3PHA (8 << ECSPI_CONFIGREG_SCLKPHA_SHIFT) /* Channel 3 SCLK Phase */ +#define ECSPI_CONFIGREG_SCLKPOL_SHIFT (4) /* Bits 4-7: SPI Clock polarity control */ +#define ECSPI_CONFIGREG_SCLKPOL_MASK (15 << ECSPI_CONFIGREG_SCLKPOL_SHIFT) +# define ECSPI_CONFIGREG_CH0POL (1 << ECSPI_CONFIGREG_SCLKPOL_SHIFT) /* Channel 0 SCLK polarity */ +# define ECSPI_CONFIGREG_CH1POL (2 << ECSPI_CONFIGREG_SCLKPOL_SHIFT) /* Channel 1 SCLK polarity */ +# define ECSPI_CONFIGREG_CH2POL (4 << ECSPI_CONFIGREG_SCLKPOL_SHIFT) /* Channel 2 SCLK polarity */ +# define ECSPI_CONFIGREG_CH3POL (8 << ECSPI_CONFIGREG_SCLKPOL_SHIFT) /* Channel 3 SCLK polarity */ +#define ECSPI_CONFIGREG_SSCTL_SHIFT (8) /* Bits 8-11: SPI SS Wave form select */ +#define ECSPI_CONFIGREG_SSCTL_MASK (15 << ECSPI_CONFIGREG_SSCTL_SHIFT) +# define ECSPI_CONFIGREG_CH0SSCTRL (1 << ECSPI_CONFIGREG_SSCTL_SHIFT) /* Channel 0 SS control */ +# define ECSPI_CONFIGREG_CH1SSCTRL (2 << ECSPI_CONFIGREG_SSCTL_SHIFT) /* Channel 1 SS control */ +# define ECSPI_CONFIGREG_CH2SSCTRL (4 << ECSPI_CONFIGREG_SSCTL_SHIFT) /* Channel 2 SS control */ +# define ECSPI_CONFIGREG_CH3SSCTRL (8 << ECSPI_CONFIGREG_SSCTL_SHIFT) /* Channel 3 SS control */ +#define ECSPI_CONFIGREG_SSPOL_SHIFT (12) /* Bits 12-15: SPI SS Polarity select */ +#define ECSPI_CONFIGREG_SSPOL_MASK (15 << ECSPI_CONFIGREG_SSPOL_SHIFT) +# define ECSPI_CONFIGREG_CH0SSPOL (1 << ECSPI_CONFIGREG_CHMODE_SHIFT) /* Channel 0 SS polarity */ +# define ECSPI_CONFIGREG_CH1SSPOL (2 << ECSPI_CONFIGREG_CHMODE_SHIFT) /* Channel 1 SS polarity */ +# define ECSPI_CONFIGREG_CH2SSPOL (4 << ECSPI_CONFIGREG_CHMODE_SHIFT) /* Channel 2 SS polarity */ +# define ECSPI_CONFIGREG_CH3SSPOL (8 << ECSPI_CONFIGREG_CHMODE_SHIFT) /* Channel 3 SS polarity */ +#define ECSPI_CONFIGREG_DATCTL_SHIFT (16) /* Bits 16-19: Data control */ +#define ECSPI_CONFIGREG_DATCTL_MASK (15 << ECSPI_CONFIGREG_DATCTL_SHIFT) +# define ECSPI_CONFIGREG_CH0DATLOW (1 << ECSPI_CONFIGREG_DATCTL_SHIFT) /* Channel 0 SS low when inactive */ +# define ECSPI_CONFIGREG_CH1DATLOW (2 << ECSPI_CONFIGREG_DATCTL_SHIFT) /* Channel 1 SS low when inactive */ +# define ECSPI_CONFIGREG_CH2DATLOW (4 << ECSPI_CONFIGREG_DATCTL_SHIFT) /* Channel 2 SS low when inactive */ +# define ECSPI_CONFIGREG_CH3DATLOW (8 << ECSPI_CONFIGREG_DATCTL_SHIFT) /* Channel 3 SS low when inactive */ +#define ECSPI_CONFIGREG_SCLKCTL_SHIFT (20) /* Bits 20-23: SCLK Control */ +#define ECSPI_CONFIGREG_SCLKCTL_MASK (15 << ECSPI_CONFIGREG_SCLKCTL_SHIFT) +# define ECSPI_CONFIGREG_CH0SCLKLOW (1 << ECSPI_CONFIGREG_SCLKCTL_SHIFT) /* Channel 0 SCLK low when inactive */ +# define ECSPI_CONFIGREG_CH1SCLKLOW (2 << ECSPI_CONFIGREG_SCLKCTL_SHIFT) /* Channel 1 SCLK low when inactive */ +# define ECSPI_CONFIGREG_CH2SCLKLOW (4 << ECSPI_CONFIGREG_SCLKCTL_SHIFT) /* Channel 2 SCLK low when inactive */ +# define ECSPI_CONFIGREG_CH3SCLKLOW (8 << ECSPI_CONFIGREG_SCLKCTL_SHIFT) /* Channel 3 SCLK low when inactive */ +#define ECSPI_CONFIGREG_HTLEN_SHIFT (24) /* Bits 24-28: HT Length */ +#define ECSPI_CONFIGREG_HTLEN_MASK (15 << ECSPI_CONFIGREG_HTLEN_SHIFT) +# define ECSPI_CONFIGREG_HTLEN(n) ((uint32_t)(n) << ECSPI_CONFIGREG_HTLEN_SHIFT) + /* Bits 29-31: Reserved */ + +/* Common Interrupt Control Register and Status Register */ + +#define ECSPI_INT_TE (1 << 0) /* Bit 0: TXFIFO Empty Interrupt */ +#define ECSPI_INT_TDR (1 << 1) /* Bit 1: TXFIFO Data Request Interrupt */ +#define ECSPI_INT_TF (1 << 2) /* Bit 2: TXFIFO Full Interrupt */ +#define ECSPI_INT_RR (1 << 3) /* Bit 3: RXFIFO Data Ready Interrupt */ +#define ECSPI_INT_RDR (1 << 4) /* Bit 4: RXFIFO Data Request Interrupt enable */ +#define ECSPI_INT_RF (1 << 5) /* Bit 5: RXFIFO Full Interrupt */ +#define ECSPI_INT_RO (1 << 6) /* Bit 6: RXFIFO Overflow Interrupt */ +#define ECSPI_INT_TC (1 << 7) /* Bit 7: Transfer Completed Interrupt enable */ + /* Bits 8-31: Reserved */ + +#define ECSPI_INT_ALL 0x000000ff + +/* ECSPI DMA Control Register */ + +#define ECSPI_DMAREG_TXTHRES_SHIFT (0) /* Bits 0-5: TX Threshold */ +#define ECSPI_DMAREG_TXTHRES_MASK (0x3f << ECSPI_DMAREG_TXTHRES_SHIFT) +# define ECSPI_DMAREG_TXTHRES(n) ((uint32_t)(n) << ECSPI_DMAREG_TXTHRES_SHIFT) + /* Bit 6: Reserved */ +#define ECSPI_DMAREG_TEDEN (1 << 7) /* Bit 7: TXFIFO Empty DMA request enable */ + /* Bits 8-15: Reserved */ +#define ECSPI_DMAREG_RXTHRES_SHIFT (16) /* Bits 16-21: RX Threshold */ +#define ECSPI_DMAREG_RXTHRES_MASK (0x3f << ECSPI_DMAREG_RXTHRES_SHIFT) +# define ECSPI_DMAREG_RXTHRES(n) ((uint32_t)(n) << ECSPI_DMAREG_RXTHRES_SHIFT) + /* Bit 22: Reserved */ +#define ECSPI_DMAREG_RXDEN (1 << 23) /* Bit 23: RXFIFO DMA request enable */ +#define ECSPI_DMAREG_RXLEN_SHIFT (24) /* Bits 24-29: RX DMA length */ +#define ECSPI_DMAREG_RXLEN_MASK (0x3f << ECSPI_DMAREG_RXLEN_SHIFT) +# define ECSPI_DMAREG_RXLEN(n) ((uint32_t)(n) << ECSPI_DMAREG_RXLEN_SHIFT) + /* Bit 30: Reserved */ +#define ECSPI_DMAREG_RXTDEN (1 << 31) /* Bit 31: RXFIFO Tail DMA request enable */ + +/* ECSPI Sample Period Control Register */ + +#define ECSPI_PERIODREG_PERIOD_SHIFT (0) /* Bits 0-14: Sample Period Control */ +#define ECSPI_PERIODREG_PERIOD_MASK (0x7fff << ECSPI_PERIODREG_PERIOD_SHIFT) +# define ECSPI_PERIODREG_PERIOD(n) ((uint32_t)(n) << ECSPI_PERIODREG_PERIOD_SHIFT) +#define ECSPI_PERIODREG_CSRC (1 << 15) /* Bit 15: Clock source control */ +#define ECSPI_PERIODREG_CSDCTL_SHIFT (16) /* Bits 16-21: Chip Select delay control */ +#define ECSPI_PERIODREG_CSDCTL_MASK (0x3f << ECSPI_PERIODREG_CSDCTL_SHIFT) +# define ECSPI_PERIODREG_CSDCTL(n) ((uint32_t)(n) << ECSPI_PERIODREG_CSDCTL_SHIFT) + /* Bits 22-31: Reserved */ + +/* Test Control Register */ + +#define ECSPI_TESTREG_TXCNT_SHIFT (0) /* Bits 0-6: TXFIFO Counter */ +#define ECSPI_TESTREG_TXCNT_MASK (0x7f << ECSPI_TESTREG_TXCNT_SHIFT) +# define ECSPI_TESTREG_TXCNT(n) ((uint32_t)(n) << ECSPI_TESTREG_TXCNT_SHIFT) + /* Bit 7: Reserved */ +#define ECSPI_TESTREG_RXCNT_SHIFT (8) /* Bits 8-14: RXFIFO Counter */ +#define ECSPI_TESTREG_RXCNT_MASK (0x7f << ECSPI_TESTREG_RXCNT_SHIFT) +# define ECSPI_TESTREG_RXCNT(n) ((uint32_t)(n) << ECSPI_TESTREG_RXCNT_SHIFT) + /* Bits 15-30: Reserved */ +#define ECSPI_TESTREG_LBC (1 << 31) /* Bit 31: Loop Back Control */ + +/* Message Data Register (32-bit message data) */ + +/************************************************************************************ + * Public Data + ************************************************************************************/ + +/************************************************************************************ + * Public Function Prototypes + ************************************************************************************/ + +#endif /* __ARCH_ARM_IMX6_CHIP_ECSPI_H */ diff --git a/arch/arm/src/imx6/chip/imx_uart.h b/arch/arm/src/imx6/chip/imx_uart.h index 8f21d9768f6..81c2801ca8e 100644 --- a/arch/arm/src/imx6/chip/imx_uart.h +++ b/arch/arm/src/imx6/chip/imx_uart.h @@ -195,10 +195,10 @@ #define UART_UCR1_RRDYEN (1 << 9) /* Bit 9: Receiver ready interrupt enable */ #define UART_UCR1_ICD_SHIFT 10 /* Bit 10-11: Idle condition detect */ #define UART_UCR1_ICD_MASK (3 << UART_UCR1_ICD_SHIFT) -# define UART_UCR1_ICD_4FRMS (0 << UART_UCR1_ICD_SHIFT) /* Idle for more than 4 frames */ -# define UART_UCR1_ICD_8FRMS (1 << UART_UCR1_ICD_SHIFT) /* Idle for more than 8 frames */ -# define UART_UCR1_ICD_16FRMS (2 << UART_UCR1_ICD_SHIFT) /* Idle for more than 16 frames */ -# define UART_UCR1_ICD_32FRMS (3 << UART_UCR1_ICD_SHIFT) /* Idle for more than 32 frames */ +# define UART_UCR1_ICD_4FRMS (0 << UART_UCR1_ICD_SHIFT) /* Idle for more than 4 frames */ +# define UART_UCR1_ICD_8FRMS (1 << UART_UCR1_ICD_SHIFT) /* Idle for more than 8 frames */ +# define UART_UCR1_ICD_16FRMS (2 << UART_UCR1_ICD_SHIFT) /* Idle for more than 16 frames */ +# define UART_UCR1_ICD_32FRMS (3 << UART_UCR1_ICD_SHIFT) /* Idle for more than 32 frames */ #define UART_UCR1_IDEN (1 << 12) /* Bit 12: Idle condition detected interrupt enable */ #define UART_UCR1_TRDYEN (1 << 13) /* Bit 13: Transmitter ready interrupt enable */ #define UART_UCR1_ADBR (1 << 14) /* Bit 14: Automatic detection of baud rate */ diff --git a/arch/arm/src/imx6/imx_cpuboot.c b/arch/arm/src/imx6/imx_cpuboot.c index cc8494782e9..50b23b5c1d4 100644 --- a/arch/arm/src/imx6/imx_cpuboot.c +++ b/arch/arm/src/imx6/imx_cpuboot.c @@ -51,7 +51,9 @@ #include "chip/imx_src.h" #include "sctlr.h" #include "smp.h" +#include "fpu.h" #include "gic.h" +#include "cp15_cacheops.h" #ifdef CONFIG_SMP @@ -68,44 +70,44 @@ typedef CODE void (*cpu_start_t)(void); #if 0 /* Not used */ static const uint32_t g_cpu_reset[CONFIG_SMP_NCPUS] = { - 0, + SRC_SCR_CORE0_RST #if CONFIG_SMP_NCPUS > 1 - SRC_SCR_CORE1_RST, + , SRC_SCR_CORE1_RST #endif #if CONFIG_SMP_NCPUS > 2 - SRC_SCR_CORE2_RST, + , SRC_SCR_CORE2_RST #endif #if CONFIG_SMP_NCPUS > 3 - SRC_SCR_CORE3_RST + , SRC_SCR_CORE3_RST #endif }; #endif static const uint32_t g_cpu_ctrl[CONFIG_SMP_NCPUS] = { - 0, + 0 #if CONFIG_SMP_NCPUS > 1 - SRC_SCR_CORE1_ENABLE, + , SRC_SCR_CORE1_ENABLE #endif #if CONFIG_SMP_NCPUS > 2 - SRC_SCR_CORE2_ENABLE, + , SRC_SCR_CORE2_ENABLE #endif #if CONFIG_SMP_NCPUS > 3 - SRC_SCR_CORE3_ENABLE + , SRC_SCR_CORE3_ENABLE #endif }; static const uintptr_t g_cpu_gpr[CONFIG_SMP_NCPUS] = { - 0, + IMX_SRC_GPR1 #if CONFIG_SMP_NCPUS > 1 - IMX_SRC_GPR3, + , IMX_SRC_GPR3 #endif #if CONFIG_SMP_NCPUS > 2 - IMX_SRC_GPR5, + , IMX_SRC_GPR5 #endif #if CONFIG_SMP_NCPUS > 3 - IMX_SRC_GPR7 + , IMX_SRC_GPR7 #endif }; @@ -258,6 +260,12 @@ void imx_cpu_enable(void) void arm_cpu_boot(int cpu) { +#ifdef CONFIG_ARCH_FPU + /* Initialize the FPU */ + + arm_fpuconfig(); +#endif + /* Initialize the Generic Interrupt Controller (GIC) for CPUn (n != 0) */ arm_gic_initialize(); @@ -289,6 +297,10 @@ void arm_cpu_boot(int cpu) (void)up_irq_enable(); #endif + /* Invalidate CPUn L1 so that is will be reloaded from coherent L2. */ + + cp15_invalidate_dcache_all(); + /* The next thing that we expect to happen is for logic running on CPU0 * to call up_cpu_start() which generate an SGI and a context switch to * the configured NuttX IDLE task. diff --git a/arch/arm/src/imx6/imx_ecspi.h b/arch/arm/src/imx6/imx_ecspi.h new file mode 100644 index 00000000000..40ca57c465c --- /dev/null +++ b/arch/arm/src/imx6/imx_ecspi.h @@ -0,0 +1,166 @@ +/************************************************************************************ + * arch/arm/src/imx6/imx_ecspi.h + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * 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. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_IMX6_ECSPI_H +#define __ARCH_ARM_IMX6_ECSPI_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include +#include +#include + +#include "chip/imx_ecspi.h" + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ + +/************************************************************************************ + * Public Data + ************************************************************************************/ + +#ifndef __ASSEMBLY__ +#ifdef __cplusplus +#define EXTERN extern "C" +extern "C" +{ +#else +#define EXTERN extern +#endif /* __cplusplus */ + +/************************************************************************************ + * Public Function Prototypes + ************************************************************************************/ + +struct spi_dev_s; /* Forward reference */ +enum spi_dev_e; /* Forward reference */ + +/************************************************************************************ + * Name: imx_spibus_initialize + * + * Description: + * Initialize common parts the selected SPI port. Initialization of + * chip select GPIOs must have been performed by board specific logic + * prior to calling this function. Specifically: GPIOs should have + * been configured for output, and all chip selects disabled. + * + * One GPIO, SS (PB2 on the eZ8F091) is reserved as a chip select. However, + * If multiple devices on on the bus, then multiple chip selects will be + * required. Theregore, all GPIO chip management is deferred to board- + * specific logic. + * + * Input Parameter: + * Port number (for hardware that has mutiple SPI interfaces) + * + * Returned Value: + * Valid SPI device structre reference on succcess; a NULL on failure + * + ************************************************************************************/ + +FAR struct spi_dev_s *imx_spibus_initialize(int port); + +/************************************************************************************ + * The external functions, imx_spiselect, imx_spistatus, and imx_cmddaa must be + * provided by board-specific logic. These are implementations of the select and + * status methods of the SPI interface defined by struct spi_ops_s (see + * include/nuttx/spi/spi.h). All other methods (including imx_spibus_initialize()) are + * provided by common logic. To use this common SPI logic on your board: + * + * 1. Provide imx_spiselect() and imx_spistatus() functions in your board-specific + * logic. This function will perform chip selection and status operations using + * GPIOs in the way your board is configured. + * 2. If CONFIG_SPI_CMDDATA is defined in your NuttX configuration, provide the + * imx_spicmddata() function in your board-specific logic. This function will + * perform cmd/data selection operations using GPIOs in the way your board is + * configured. + * 3. Add a call to imx_spibus_initialize() in your low level initialization logic + * 4. The handle returned by imx_spibus_initialize() may then be used to bind the + * SPI driver to higher level logic (e.g., calling mmcsd_spislotinitialize(), + * for example, will bind the SPI driver to the SPI MMC/SD driver). + * + ************************************************************************************/ + +#ifdef CONFIG_IMX6_ECSPI1 +void imx_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected); +uint8_t imx_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid); +#ifdef CONFIG_SPI_CMDDATA +int imx_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd); +#endif +#endif + +#ifdef CONFIG_IMX6_ECSPI2 +void imx_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected); +uint8_t imx_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid); +#ifdef CONFIG_SPI_CMDDATA +int imx_spi2cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd); +#endif +#endif + +#ifdef CONFIG_IMX6_ECSPI3 +void imx_spi3select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected); +uint8_t imx_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid); +#ifdef CONFIG_SPI_CMDDATA +int imx_spi3cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd); +#endif +#endif + +#ifdef CONFIG_IMX6_ECSPI4 +void imx_spi4select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected); +uint8_t imx_spi4status(FAR struct spi_dev_s *dev, enum spi_dev_e devid); +#ifdef CONFIG_SPI_CMDDATA +int imx_spi4cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd); +#endif +#endif + +#ifdef CONFIG_IMX6_ECSPI5 +void imx_spi5select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected); +uint8_t imx_spi5status(FAR struct spi_dev_s *dev, enum spi_dev_e devid); +#ifdef CONFIG_SPI_CMDDATA +int imx_spi5cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd); +#endif +#endif + +#undef EXTERN +#ifdef __cplusplus +} +#endif /* __cplusplus */ +#endif /* __ASSEMBLY__ */ + +#endif /* __ARCH_ARM_IMX6_ECSPI_H */ diff --git a/arch/arm/src/imx6/imx_serial.c b/arch/arm/src/imx6/imx_serial.c index 39a61fddffd..a34d2f988ad 100644 --- a/arch/arm/src/imx6/imx_serial.c +++ b/arch/arm/src/imx6/imx_serial.c @@ -50,6 +50,7 @@ #include #include +#include #include #include @@ -57,6 +58,7 @@ #include "up_arch.h" #include "up_internal.h" +#include "gic.h" #include "chip/imx_uart.h" #include "imx_config.h" #include "imx_lowputc.h" @@ -258,6 +260,12 @@ static bool imx_txempty(struct uart_dev_s *dev); * Private Data ****************************************************************************/ +/* Used to assure mutually exclusive access up_putc() */ + +static sem_t g_putc_lock = SEM_INITIALIZER(1); + +/* Serial driver UART operations */ + static const struct uart_ops_s g_uart_ops = { .setup = imx_setup, @@ -613,6 +621,10 @@ static int imx_attach(struct uart_dev_s *dev) ret = irq_attach(priv->irq, priv->handler); if (ret == OK) { + /* Configure as a (high) level interrupt */ + + (void)arm_gic_irq_trigger(priv->irq, false); + /* Enable the interrupt (RX and TX interrupts are still disabled * in the UART */ @@ -1001,6 +1013,27 @@ int up_putc(int ch) { struct imx_uart_s *priv = (struct imx_uart_s *)CONSOLE_DEV.priv; uint32_t ier; + bool locked; + int ret; + + /* Only one thread may enter up_putc at a time. */ + + locked = false; + + if (!up_interrupt_context() && g_os_initstate >= OSINIT_HARDWARE) + { + ret = sem_wait(&g_putc_lock); + if (ret < 0) + { + return ERROR; + } + + locked = true; + } + + /* Disable UART interrupts and wait until the hardware is ready to send + * a byte. + */ imx_disableuartint(priv, &ier); imx_waittxready(priv); @@ -1018,6 +1051,12 @@ int up_putc(int ch) imx_serialout(priv, UART_TXD_OFFSET, (uint32_t)ch); imx_waittxready(priv); imx_restoreuartint(priv, ier); + + if (locked) + { + sem_post(&g_putc_lock); + } + return ch; } diff --git a/arch/arm/src/imx6/imx_timerisr.c b/arch/arm/src/imx6/imx_timerisr.c index 50d405973f6..60f8864177f 100644 --- a/arch/arm/src/imx6/imx_timerisr.c +++ b/arch/arm/src/imx6/imx_timerisr.c @@ -46,6 +46,7 @@ #include #include "up_arch.h" +#include "gic.h" #include "chip/imx_ccm.h" #include "chip/imx_gpt.h" @@ -76,10 +77,25 @@ * We should be able to use a prescaler of 1. */ -#define GPT_PR_VALUE 1 -#define GPT_OCR3_VALUE ((GPT_CLOCK + ((1*CLK_TCK) >> 1)) / (1*CLK_TCK)) -#define GPT_OCR2_VALUE ((GPT_CLOCK + ((2*CLK_TCK) >> 1)) / (2*CLK_TCK)) -#define GPT_OCR1_VALUE ((GPT_CLOCK + ((3*CLK_TCK) >> 1)) / (3*CLK_TCK)) +#define GPT_PR_VALUE 1 + +/* Timer counter comparison settings: + * + * - OCR3 will interrupt at CLK_TCK ticks/second after the timer counter + * has been reset. + * - OCR2 will interrupt at 2*CLK_TCK ticks/second after the timer counter + * has been reset. + * - OCR2 will interrupt at 3*CLK_TCK ticks/second after the timer counter + * has been reset and then will reset the timer, starting the 3 interrupt + * sequence again. + * + * Using three comparisons virtually eliminates the possibility of timer + * interrupt overrun. + */ + +#define GPT_OCR3_VALUE ((1 * GPT_CLOCK + (CLK_TCK >> 1)) / CLK_TCK) +#define GPT_OCR2_VALUE ((2 * GPT_CLOCK + (CLK_TCK >> 1)) / CLK_TCK) +#define GPT_OCR1_VALUE ((3 * GPT_CLOCK + (CLK_TCK >> 1)) / CLK_TCK) /**************************************************************************** * Private Functions @@ -164,7 +180,7 @@ void up_timer_initialize(void) /* Disable GPT by setting EN=0 in GPT_CR register */ - cr = getreg32(IMX_GPT_CR); + cr = getreg32(IMX_GPT_CR); cr &= ~GPT_CR_EN; putreg32(cr, IMX_GPT_CR); @@ -220,7 +236,7 @@ void up_timer_initialize(void) */ cr &= ~GPT_CR_FFR; - putreg32(cr | GPT_CR_SWR, IMX_GPT_CR); + putreg32(cr, IMX_GPT_CR); /* Set ENMOD=1 in GPT_CR register, to bring GPT counter to 0x00000000. If * the ENMOD bit is 1, then the Main Counter and Prescaler Counter values @@ -235,6 +251,10 @@ void up_timer_initialize(void) cr |= GPT_CR_EN; putreg32(cr, IMX_GPT_CR); + /* Configure as a (rising) edge-triggered interrupt */ + + (void)arm_gic_irq_trigger(IMX_IRQ_GPT, true); + /* Attach the timer interrupt vector */ (void)irq_attach(IMX_IRQ_GPT, (xcpt_t)up_timerisr); diff --git a/arch/arm/src/kinetis/Kconfig b/arch/arm/src/kinetis/Kconfig index 9540050b668..fdf54e1941c 100644 --- a/arch/arm/src/kinetis/Kconfig +++ b/arch/arm/src/kinetis/Kconfig @@ -131,42 +131,42 @@ config KINETIS_FLEXBUS config KINETIS_UART0 bool "UART0" default n - select ARCH_HAVE_UART0 + select UART0_SERIALDRIVER ---help--- Support UART0 config KINETIS_UART1 bool "UART1" default n - select ARCH_HAVE_UART1 + select UART1_SERIALDRIVER ---help--- Support UART1 config KINETIS_UART2 bool "UART2" default n - select ARCH_HAVE_UART2 + select UART2_SERIALDRIVER ---help--- Support UART2 config KINETIS_UART3 bool "UART3" default n - select ARCH_HAVE_UART3 + select UART3_SERIALDRIVER ---help--- Support UART3 config KINETIS_UART4 bool "UART4" default n - select ARCH_HAVE_UART4 + select UART4_SERIALDRIVER ---help--- Support UART4 config KINETIS_UART5 bool "UART5" default n - select ARCH_HAVE_UART5 + select UART5_SERIALDRIVER ---help--- Support UART5 diff --git a/arch/arm/src/kl/Kconfig b/arch/arm/src/kl/Kconfig index 4505fc3e67c..bfa40491538 100644 --- a/arch/arm/src/kl/Kconfig +++ b/arch/arm/src/kl/Kconfig @@ -47,21 +47,21 @@ config KL_FLEXBUS config KL_UART0 bool "UART0" default n - select ARCH_HAVE_UART0 + select UART0_SERIALDRIVER ---help--- Support UART0 config KL_UART1 bool "UART1" default n - select ARCH_HAVE_UART1 + select UART1_SERIALDRIVER ---help--- Support UART1 config KL_UART2 bool "UART2" default n - select ARCH_HAVE_UART2 + select UART2_SERIALDRIVER ---help--- Support UART2 diff --git a/arch/arm/src/lpc11xx/Kconfig b/arch/arm/src/lpc11xx/Kconfig index 127f3f0db89..45bb842a302 100644 --- a/arch/arm/src/lpc11xx/Kconfig +++ b/arch/arm/src/lpc11xx/Kconfig @@ -55,7 +55,7 @@ config LPC11_PLL config LPC11_UART0 bool "UART0" - select ARCH_HAVE_UART0 + select UART0_SERIALDRIVER default y config LPC11_CAN0 diff --git a/arch/arm/src/lpc17xx/Kconfig b/arch/arm/src/lpc17xx/Kconfig index e8ac3d3a22f..4bb53068bb6 100644 --- a/arch/arm/src/lpc17xx/Kconfig +++ b/arch/arm/src/lpc17xx/Kconfig @@ -172,36 +172,36 @@ config LPC17_SDCARD config LPC17_UART0 bool "UART0" default n - select ARCH_HAVE_UART0 + select UART0_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config LPC17_UART1 bool "UART1" default n - select ARCH_HAVE_UART1 + select UART1_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config LPC17_UART2 bool "UART2" default n - select ARCH_HAVE_UART2 + select UART2_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config LPC17_UART3 bool "UART3" default n - select ARCH_HAVE_UART3 + select UART3_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config LPC17_UART4 bool "UART4" default n - select ARCH_HAVE_UART4 + select UART4_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config LPC17_CAN1 bool "CAN1" - select ARCH_HAVE_UART4 + select UART4_SERIALDRIVER default n config LPC17_CAN2 diff --git a/arch/arm/src/lpc17xx/lpc17_adc.c b/arch/arm/src/lpc17xx/lpc17_adc.c index 9d761c6afad..490b25bf800 100644 --- a/arch/arm/src/lpc17xx/lpc17_adc.c +++ b/arch/arm/src/lpc17xx/lpc17_adc.c @@ -2,8 +2,9 @@ * arch/arm/src/lpc17xx/lpc17_adc.c * * Copyright (C) 2011 Li Zhuoyi. All rights reserved. + * Copyright (C) 2016 Gregory Nutt. All rights reserved. * Author: Li Zhuoyi - * History: 0.1 2011-08-05 initial version + * Gregory Nutt * * This file is a part of NuttX: * @@ -50,6 +51,7 @@ #include #include #include +#include #include #include @@ -87,6 +89,7 @@ struct up_dev_s { + FAR const struct adc_callback_s *cb; uint8_t mask; uint32_t sps; int irq; @@ -98,8 +101,12 @@ struct up_dev_s * Private Function Prototypes ****************************************************************************/ +static void adc_receive(FAR struct up_dev_s *priv, uint8_t ch, int32_t data); + /* ADC methods */ +static int adc_bind(FAR struct adc_dev_s *dev, + FAR const struct adc_callback_s *callback); static void adc_reset(FAR struct adc_dev_s *dev); static int adc_setup(FAR struct adc_dev_s *dev); static void adc_shutdown(FAR struct adc_dev_s *dev); @@ -113,6 +120,7 @@ static int adc_interrupt(int irq, void *context); static const struct adc_ops_s g_adcops = { + .ao_bind = adc_bind, .ao_reset = adc_reset, .ao_setup = adc_setup, .ao_shutdown = adc_shutdown, @@ -137,6 +145,46 @@ static struct adc_dev_s g_adcdev = * Private Functions ****************************************************************************/ +/**************************************************************************** + * Name: adc_receive + * + * Description: + * Provide received ADC dat to the upper-half driver. + * + ****************************************************************************/ + +static void adc_receive(FAR struct up_dev_s *priv, uint8_t ch, int32_t data) +{ + /* Verify that the upper-half driver has bound its callback functions. */ + + if (priv->cb != NULL) + { + /* Perform the data received callback */ + + DEBUGASSERT(priv->cb->au_receive != NULL); + priv->cb->au_receive(&g_adcdev, ch, data); + } +} + +/**************************************************************************** + * Name: adc_bind + * + * Description: + * Bind the upper-half driver callbacks to the lower-half implementation. This + * must be called early in order to receive ADC event notifications. + * + ****************************************************************************/ + +static int adc_bind(FAR struct adc_dev_s *dev, + FAR const struct adc_callback_s *callback) +{ + FAR struct up_dev_s *priv = (FAR struct up_dev_s *)dev->ad_priv; + + DEBUGASSERT(priv != NULL); + priv->cb = callback; + return OK; +} + /**************************************************************************** * Name: adc_reset * @@ -384,7 +432,7 @@ static int adc_interrupt(int irq, void *context) { value = priv->buf[ch] / priv->count[ch]; value <<= 15; - adc_receive(&g_adcdev, ch, value); + adc_receive(priv, ch, value); priv->buf[ch] = 0; priv->count[ch] = 0; } @@ -409,7 +457,7 @@ static int adc_interrupt(int irq, void *context) { value = priv->buf[ch] / priv->count[ch]; value <<= 15; - adc_receive(&g_adcdev, ch, value); + adc_receive(priv, ch, value); priv->buf[ch] = 0; priv->count[ch] = 0; } @@ -446,7 +494,7 @@ static int adc_interrupt(int irq, void *context) #else /* CONFIG_ADC_WORKER_THREAD */ if ((regVal) & (1 << 31)) { - adc_receive(&g_adcdev, 0, (regVal >> 4) & 0xFFF); + adc_receive(priv, 0, (regVal >> 4) & 0xFFF); } #endif /* CONFIG_ADC_WORKER_THREAD */ @@ -473,7 +521,7 @@ static int adc_interrupt(int irq, void *context) #else /* CONFIG_ADC_WORKER_THREAD */ if ((regVal) & (1 << 31)) { - adc_receive(&g_adcdev, 1, (regVal >> 4) & 0xFFF); + adc_receive(priv, 1, (regVal >> 4) & 0xFFF); } #endif /* CONFIG_ADC_WORKER_THREAD */ @@ -500,7 +548,7 @@ static int adc_interrupt(int irq, void *context) #else /* CONFIG_ADC_WORKER_THREAD */ if ((regVal) & (1 << 31)) { - adc_receive(&g_adcdev, 2, (regVal >> 4) & 0xFFF); + adc_receive(priv, 2, (regVal >> 4) & 0xFFF); } #endif /* CONFIG_ADC_WORKER_THREAD */ @@ -512,7 +560,7 @@ static int adc_interrupt(int irq, void *context) regVal = getreg32(LPC17_ADC_DR3); if ((regVal) & (1 << 31)) { - adc_receive(&g_adcdev, 3, (regVal >> 4) & 0xFFF); + adc_receive(priv, 3, (regVal >> 4) & 0xFFF); } } @@ -521,7 +569,7 @@ static int adc_interrupt(int irq, void *context) regVal = getreg32(LPC17_ADC_DR4); if ((regVal) & (1 << 31)) { - adc_receive(&g_adcdev, 4, (regVal >> 4) & 0xFFF); + adc_receive(priv, 4, (regVal >> 4) & 0xFFF); } } @@ -530,7 +578,7 @@ static int adc_interrupt(int irq, void *context) regVal = getreg32(LPC17_ADC_DR5); if ((regVal) & (1 << 31)) { - adc_receive(&g_adcdev, 5, (regVal >> 4) & 0xFFF); + adc_receive(priv, 5, (regVal >> 4) & 0xFFF); } } @@ -539,7 +587,7 @@ static int adc_interrupt(int irq, void *context) regVal = getreg32(LPC17_ADC_DR6); if ((regVal) & (1 << 31)) { - adc_receive(&g_adcdev, 6, (regVal >> 4) & 0xFFF); + adc_receive(priv, 6, (regVal >> 4) & 0xFFF); } } @@ -548,7 +596,7 @@ static int adc_interrupt(int irq, void *context) regVal = getreg32(LPC17_ADC_DR7); if ((regVal) & (1 << 31)) { - adc_receive(&g_adcdev, 7, (regVal >> 4) & 0xFFF); + adc_receive(priv, 7, (regVal >> 4) & 0xFFF); } } diff --git a/arch/arm/src/lpc214x/Kconfig b/arch/arm/src/lpc214x/Kconfig index 857b5f54d0e..68926095cf0 100644 --- a/arch/arm/src/lpc214x/Kconfig +++ b/arch/arm/src/lpc214x/Kconfig @@ -92,12 +92,12 @@ menu "LPC214x Peripheral Support" config LPC214X_UART0 bool default y - select ARCH_HAVE_UART0 + select UART0_SERIALDRIVER config LPC214X_UART1 bool default y - select ARCH_HAVE_UART1 + select UART1_SERIALDRIVER config LPC214X_USBDEV bool "USB Device" diff --git a/arch/arm/src/lpc2378/Kconfig b/arch/arm/src/lpc2378/Kconfig index 4e153df4013..08197970c66 100644 --- a/arch/arm/src/lpc2378/Kconfig +++ b/arch/arm/src/lpc2378/Kconfig @@ -118,22 +118,22 @@ menu "LPC2378 Peripheral Support" config LPC2378_UART0 bool "UART0" default n - select ARCH_HAVE_UART0 + select UART0_SERIALDRIVER config LPC2378_UART1 bool "UART1" default n - select ARCH_HAVE_UART1 + select UART1_SERIALDRIVER config LPC2378_UART2 bool "UART2" default n - select ARCH_HAVE_UART2 + select UART2_SERIALDRIVER config LPC2378_UART3 bool "UART3" default n - select ARCH_HAVE_UART3 + select UART3_SERIALDRIVER config LPC2378_USBDEV bool "USB Device" diff --git a/arch/arm/src/lpc31xx/Kconfig b/arch/arm/src/lpc31xx/Kconfig index bb3f9435068..ffdaa811460 100644 --- a/arch/arm/src/lpc31xx/Kconfig +++ b/arch/arm/src/lpc31xx/Kconfig @@ -51,7 +51,7 @@ menu "LPC31xx Peripheral Support" config LPC31_UART bool "UART" default n - select ARCH_HAVE_UART + select UART_SERIALDRIVER config LPC31_SPI bool "SPI" diff --git a/arch/arm/src/lpc43xx/Kconfig b/arch/arm/src/lpc43xx/Kconfig index b0385a9d3c3..5b7d730151e 100644 --- a/arch/arm/src/lpc43xx/Kconfig +++ b/arch/arm/src/lpc43xx/Kconfig @@ -37,6 +37,9 @@ config ARCH_CHIP_LPC4330FET256 config ARCH_CHIP_LPC4337JBD144 bool "LPC4337JBD144" +config ARCH_CHIP_LPC4337JET100 + bool "LPC4337JET100" + config ARCH_CHIP_LPC4350FBD208 bool "LPC4350FBD208" @@ -81,7 +84,7 @@ config ARCH_FAMILY_LPC4320 config ARCH_FAMILY_LPC4330 bool - default y if ARCH_CHIP_LPC4330FBD144 || ARCH_CHIP_LPC4330FET100 || ARCH_CHIP_LPC4330FET180 || ARCH_CHIP_LPC4330FET256 + default y if ARCH_CHIP_LPC4330FBD144 || ARCH_CHIP_LPC4330FET100 || ARCH_CHIP_LPC4330FET180 || ARCH_CHIP_LPC4330FET256 || ARCH_CHIP_LPC4337JET100 select ARCH_HAVE_TICKLESS config ARCH_FAMILY_LPC4337 @@ -271,25 +274,25 @@ config LPC43_TMR3 config LPC43_USART0 bool "USART0" default n - select ARCH_HAVE_USART0 + select USART0_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config LPC43_UART1 bool "UART1" default n - select ARCH_HAVE_UART1 + select UART1_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config LPC43_USART2 bool "USART2" default n - select ARCH_HAVE_USART2 + select USART2_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config LPC43_USART3 bool "USART3" default n - select ARCH_HAVE_USART3 + select USART3_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config LPC43_USBOTG diff --git a/arch/arm/src/lpc43xx/Make.defs b/arch/arm/src/lpc43xx/Make.defs index 2ec96995545..018b929d4d4 100644 --- a/arch/arm/src/lpc43xx/Make.defs +++ b/arch/arm/src/lpc43xx/Make.defs @@ -182,6 +182,10 @@ ifeq ($(CONFIG_LPC43_USBOTG),y) CHIP_CSRCS += lpc43_ehci.c endif +ifeq ($(CONFIG_CRYPTO_AES),y) +CHIP_CSRCS += lpc43_aes.c +endif + ifeq ($(CONFIG_LPC43_USB0),y) ifeq ($(CONFIG_USBDEV),y) CHIP_CSRCS += lpc43_usb0dev.c diff --git a/arch/arm/src/lpc43xx/chip.h b/arch/arm/src/lpc43xx/chip.h index 08ef7217a52..630bdcb1909 100644 --- a/arch/arm/src/lpc43xx/chip.h +++ b/arch/arm/src/lpc43xx/chip.h @@ -141,6 +141,10 @@ # define ARMV7M_PERIPHERAL_INTERRUPTS 53 # include "chip/lpc435357_memorymap.h" # include "chip/lpc4357fet256_pinconfig.h" +#elif defined(CONFIG_ARCH_CHIP_LPC4337JET100) +# define ARMV7M_PERIPHERAL_INTERRUPTS 53 +# include "chip/lpc435357_memorymap.h" +# include "chip/lpc4337jet100_pinconfig.h" #else # error "Unsupported LPC43xx chip" #endif diff --git a/arch/arm/src/lpc43xx/chip/lpc4337jet100_pinconfig.h b/arch/arm/src/lpc43xx/chip/lpc4337jet100_pinconfig.h new file mode 100644 index 00000000000..cf3fcd22132 --- /dev/null +++ b/arch/arm/src/lpc43xx/chip/lpc4337jet100_pinconfig.h @@ -0,0 +1,982 @@ +/**************************************************************************************************** + * arch/arm/src/lpc43xx/chip/lpc4337jet100_pinconfig.h + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * 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. + * + ****************************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_LPC43XX_CHIP_LPC4337JET100_PINCONF_H +#define __ARCH_ARM_SRC_LPC43XX_CHIP_LPC4337JET100_PINCONF_H + +/**************************************************************************************************** + * Included Files + ****************************************************************************************************/ + +#include + +/**************************************************************************************************** + * Pre-processor Definitions + ****************************************************************************************************/ +/* NOTES: + * + * 1. These settings were taken from the LPC43_10_20_30_50 data sheet and may not be applicable to + * any other family members. + * + * 2. Settings taken from the data sheet include only function, pin set, and pin number. Additional + * settings must be verified before using these pin configurations (like pull-ups, open-drain, + * drive strength, input buffering, etc.). + * + * 3. Alternative pin selections are provided with a numeric suffix like _1, _2, etc. Drivers, + * however, will use the pin selection without the numeric suffix. Additional definitions are + * required in the board.h file to select between the alternative pins. For example, if CAN1_RD + * connects via Pins1[18], then the following definition should appear in the board.h header file + * for that board: + * + * 4. For ADC pins (PINCONF_ADCNpM), the pin must first be configured configured as a GPIO input. + * Then SCU's ADC function select register can be used to select the ADC. + * + * #define PINCONF_CAN1_RD PINCONF_CAN1_RD_1 + * + * The driver will then automatically configre Pins1[18] as the CAN1 RD pin. + */ + +#define PINCONF_ADC0p0 (PINCONF_FUNC0|PINCONF_PINS4|PINCONF_PIN_3) +#define PINCONF_ADC0p1 (PINCONF_FUNC0|PINCONF_PINS4|PINCONF_PIN_1) +#define PINCONF_ADC0p2 (PINCONF_FUNC4|PINCONF_PINSF|PINCONF_PIN_8) +#define PINCONF_ADC0p3 (PINCONF_FUNC0|PINCONF_PINS7|PINCONF_PIN_5) +#define PINCONF_ADC0p4 (PINCONF_FUNC0|PINCONF_PINS7|PINCONF_PIN_4) +#define PINCONF_ADC0p5 (PINCONF_FUNC4|PINCONF_PINSF|PINCONF_PIN_10) +#define PINCONF_ADC0p6 (PINCONF_FUNC0|PINCONF_PINSB|PINCONF_PIN_6) + +#define PINCONF_ADC1p0 (PINCONF_FUNC4|PINCONF_PINSC|PINCONF_PIN_3) +#define PINCONF_ADC1p1 (PINCONF_FUNC0|PINCONF_PINSC|PINCONF_PIN_0) +#define PINCONF_ADC1p2 (PINCONF_FUNC4|PINCONF_PINSF|PINCONF_PIN_9) +#define PINCONF_ADC1p3 (PINCONF_FUNC4|PINCONF_PINSF|PINCONF_PIN_6) +#define PINCONF_ADC1p4 (PINCONF_FUNC4|PINCONF_PINSF|PINCONF_PIN_5) +#define PINCONF_ADC1p5 (PINCONF_FUNC4|PINCONF_PINSF|PINCONF_PIN_11) +#define PINCONF_ADC1p6 (PINCONF_FUNC0|PINCONF_PINS7|PINCONF_PIN_7) +#define PINCONF_ADC1p7 (PINCONF_FUNC4|PINCONF_PINSF|PINCONF_PIN_7) + +#define PINCONF_ADCTRIG0 (PINCONF_FUNC0|PINCONF_PINSE|PINCONF_PIN_2) +#define PINCONF_ADCTRIG1_1 (PINCONF_FUNC2|PINCONF_PINSE|PINCONF_PIN_3) +#define PINCONF_ADCTRIG1_2 (PINCONF_FUNC3|PINCONF_PINS2|PINCONF_PIN_5) + +#define PINCONF_CAN0_RD_1 (PINCONF_FUNC1|PINCONF_PINSE|PINCONF_PIN_2) +#define PINCONF_CAN0_RD_2 (PINCONF_FUNC2|PINCONF_PINS3|PINCONF_PIN_1) +#define PINCONF_CAN0_TD_1 (PINCONF_FUNC1|PINCONF_PINSE|PINCONF_PIN_3) +#define PINCONF_CAN0_TD_2 (PINCONF_FUNC2|PINCONF_PINS3|PINCONF_PIN_2) + +#define PINCONF_CAN1_RD_1 (PINCONF_FUNC5|PINCONF_PINS1|PINCONF_PIN_18) +#define PINCONF_CAN1_RD_2 (PINCONF_FUNC5|PINCONF_PINSE|PINCONF_PIN_1) +#define PINCONF_CAN1_RD_3 (PINCONF_FUNC6|PINCONF_PINS4|PINCONF_PIN_9) +#define PINCONF_CAN1_TD_1 (PINCONF_FUNC5|PINCONF_PINS1|PINCONF_PIN_17) +#define PINCONF_CAN1_TD_2 (PINCONF_FUNC5|PINCONF_PINSE|PINCONF_PIN_0) +#define PINCONF_CAN1_TD_3 (PINCONF_FUNC6|PINCONF_PINS4|PINCONF_PIN_8) + +#define PINCONF_CGU_OUT0 (PINCONF_FUNC6|PINCONF_PINS8|PINCONF_PIN_8) +#define PINCONF_CGU_OUT1_1 (PINCONF_FUNC4|PINCONF_PINS3|PINCONF_PIN_3) +#define PINCONF_CGU_OUT1_2 (PINCONF_FUNC6|PINCONF_PINSA|PINCONF_PIN_0) + +#define PINCONF_CLKOUT (PINCONF_FUNC4|PINCONF_PINS1|PINCONF_PIN_19) + +#define PINCONF_CTIN0_1 (PINCONF_FUNC1|PINCONF_PINSD|PINCONF_PIN_13) +#define PINCONF_CTIN0_2 (PINCONF_FUNC3|PINCONF_PINS2|PINCONF_PIN_4) +#define PINCONF_CTIN1_1 (PINCONF_FUNC1|PINCONF_PINSD|PINCONF_PIN_10) +#define PINCONF_CTIN1_2 (PINCONF_FUNC3|PINCONF_PINS2|PINCONF_PIN_3) +#define PINCONF_CTIN2_1 (PINCONF_FUNC1|PINCONF_PINS2|PINCONF_PIN_5) +#define PINCONF_CTIN2_2 (PINCONF_FUNC1|PINCONF_PINS4|PINCONF_PIN_10) +#define PINCONF_CTIN2_3 (PINCONF_FUNC2|PINCONF_PINSF|PINCONF_PIN_8) +#define PINCONF_CTIN3_1 (PINCONF_FUNC1|PINCONF_PINS1|PINCONF_PIN_0) +#define PINCONF_CTIN3_2 (PINCONF_FUNC1|PINCONF_PINS7|PINCONF_PIN_3) +#define PINCONF_CTIN3_3 (PINCONF_FUNC1|PINCONF_PINSE|PINCONF_PIN_10) +#define PINCONF_CTIN4_1 (PINCONF_FUNC1|PINCONF_PINS2|PINCONF_PIN_13) +#define PINCONF_CTIN4_2 (PINCONF_FUNC1|PINCONF_PINS7|PINCONF_PIN_2) +#define PINCONF_CTIN4_3 (PINCONF_FUNC1|PINCONF_PINSE|PINCONF_PIN_9) +#define PINCONF_CTIN5_1 (PINCONF_FUNC1|PINCONF_PINS1|PINCONF_PIN_6) +#define PINCONF_CTIN5_2 (PINCONF_FUNC1|PINCONF_PINS4|PINCONF_PIN_8) +#define PINCONF_CTIN5_3 (PINCONF_FUNC1|PINCONF_PINSD|PINCONF_PIN_7) +#define PINCONF_CTIN5_4 (PINCONF_FUNC5|PINCONF_PINSB|PINCONF_PIN_4) +#define PINCONF_CTIN6_1 (PINCONF_FUNC1|PINCONF_PINS4|PINCONF_PIN_9) +#define PINCONF_CTIN6_2 (PINCONF_FUNC1|PINCONF_PINS6|PINCONF_PIN_4) +#define PINCONF_CTIN6_3 (PINCONF_FUNC1|PINCONF_PINSD|PINCONF_PIN_8) +#define PINCONF_CTIN6_4 (PINCONF_FUNC5|PINCONF_PINS2|PINCONF_PIN_2) +#define PINCONF_CTIN6_5 (PINCONF_FUNC5|PINCONF_PINSB|PINCONF_PIN_6) +#define PINCONF_CTIN7_1 (PINCONF_FUNC5|PINCONF_PINS2|PINCONF_PIN_6) +#define PINCONF_CTIN7_2 (PINCONF_FUNC5|PINCONF_PINSB|PINCONF_PIN_5) + +#define PINCONF_CTOUT0_1 (PINCONF_FUNC1|PINCONF_PINS2|PINCONF_PIN_8) +#define PINCONF_CTOUT0_2 (PINCONF_FUNC1|PINCONF_PINS4|PINCONF_PIN_2) +#define PINCONF_CTOUT0_3 (PINCONF_FUNC1|PINCONF_PINSE|PINCONF_PIN_15) +#define PINCONF_CTOUT1_1 (PINCONF_FUNC1|PINCONF_PINS2|PINCONF_PIN_7) +#define PINCONF_CTOUT1_2 (PINCONF_FUNC1|PINCONF_PINS4|PINCONF_PIN_1) +#define PINCONF_CTOUT1_3 (PINCONF_FUNC2|PINCONF_PINSF|PINCONF_PIN_9) +#define PINCONF_CTOUT2_1 (PINCONF_FUNC1|PINCONF_PINS2|PINCONF_PIN_10) +#define PINCONF_CTOUT2_2 (PINCONF_FUNC1|PINCONF_PINS4|PINCONF_PIN_4) +#define PINCONF_CTOUT2_3 (PINCONF_FUNC1|PINCONF_PINSE|PINCONF_PIN_6) +#define PINCONF_CTOUT3_1 (PINCONF_FUNC1|PINCONF_PINS2|PINCONF_PIN_9) +#define PINCONF_CTOUT3_2 (PINCONF_FUNC1|PINCONF_PINS4|PINCONF_PIN_3) +#define PINCONF_CTOUT3_3 (PINCONF_FUNC1|PINCONF_PINSE|PINCONF_PIN_5) +#define PINCONF_CTOUT4_1 (PINCONF_FUNC1|PINCONF_PINS2|PINCONF_PIN_12) +#define PINCONF_CTOUT4_2 (PINCONF_FUNC1|PINCONF_PINS4|PINCONF_PIN_6) +#define PINCONF_CTOUT4_3 (PINCONF_FUNC1|PINCONF_PINSE|PINCONF_PIN_8) +#define PINCONF_CTOUT5_1 (PINCONF_FUNC1|PINCONF_PINS2|PINCONF_PIN_11) +#define PINCONF_CTOUT5_2 (PINCONF_FUNC1|PINCONF_PINS4|PINCONF_PIN_5) +#define PINCONF_CTOUT5_3 (PINCONF_FUNC1|PINCONF_PINSE|PINCONF_PIN_7) +#define PINCONF_CTOUT6_1 (PINCONF_FUNC1|PINCONF_PINS1|PINCONF_PIN_2) +#define PINCONF_CTOUT6_2 (PINCONF_FUNC1|PINCONF_PINS6|PINCONF_PIN_5) +#define PINCONF_CTOUT6_3 (PINCONF_FUNC1|PINCONF_PINSD|PINCONF_PIN_3) +#define PINCONF_CTOUT6_4 (PINCONF_FUNC5|PINCONF_PINSB|PINCONF_PIN_1) +#define PINCONF_CTOUT7_1 (PINCONF_FUNC1|PINCONF_PINS1|PINCONF_PIN_1) +#define PINCONF_CTOUT7_2 (PINCONF_FUNC1|PINCONF_PINS6|PINCONF_PIN_12) +#define PINCONF_CTOUT7_3 (PINCONF_FUNC1|PINCONF_PINSD|PINCONF_PIN_2) +#define PINCONF_CTOUT7_4 (PINCONF_FUNC5|PINCONF_PINSB|PINCONF_PIN_2) +#define PINCONF_CTOUT8_1 (PINCONF_FUNC1|PINCONF_PINS1|PINCONF_PIN_3) +#define PINCONF_CTOUT8_2 (PINCONF_FUNC1|PINCONF_PINS7|PINCONF_PIN_7) +#define PINCONF_CTOUT8_3 (PINCONF_FUNC1|PINCONF_PINSD|PINCONF_PIN_4) +#define PINCONF_CTOUT8_4 (PINCONF_FUNC5|PINCONF_PINSB|PINCONF_PIN_3) +#define PINCONF_CTOUT8_5 (PINCONF_FUNC6|PINCONF_PINSD|PINCONF_PIN_15) +#define PINCONF_CTOUT9_1 (PINCONF_FUNC1|PINCONF_PINS1|PINCONF_PIN_4) +#define PINCONF_CTOUT9_2 (PINCONF_FUNC1|PINCONF_PINSA|PINCONF_PIN_4) +#define PINCONF_CTOUT9_3 (PINCONF_FUNC1|PINCONF_PINSD|PINCONF_PIN_5) +#define PINCONF_CTOUT10_1 (PINCONF_FUNC1|PINCONF_PINS1|PINCONF_PIN_5) +#define PINCONF_CTOUT10_2 (PINCONF_FUNC1|PINCONF_PINSB|PINCONF_PIN_0) +#define PINCONF_CTOUT10_3 (PINCONF_FUNC1|PINCONF_PINSD|PINCONF_PIN_6) +#define PINCONF_CTOUT10_4 (PINCONF_FUNC6|PINCONF_PINSD|PINCONF_PIN_12) +#define PINCONF_CTOUT11_1 (PINCONF_FUNC1|PINCONF_PINS7|PINCONF_PIN_6) +#define PINCONF_CTOUT11_2 (PINCONF_FUNC1|PINCONF_PINSE|PINCONF_PIN_12) +#define PINCONF_CTOUT11_3 (PINCONF_FUNC2|PINCONF_PINS1|PINCONF_PIN_9) +#define PINCONF_CTOUT11_4 (PINCONF_FUNC6|PINCONF_PINSD|PINCONF_PIN_14) +#define PINCONF_CTOUT12_1 (PINCONF_FUNC1|PINCONF_PINS7|PINCONF_PIN_5) +#define PINCONF_CTOUT12_2 (PINCONF_FUNC1|PINCONF_PINSE|PINCONF_PIN_11) +#define PINCONF_CTOUT12_3 (PINCONF_FUNC2|PINCONF_PINS1|PINCONF_PIN_8) +#define PINCONF_CTOUT12_4 (PINCONF_FUNC6|PINCONF_PINSD|PINCONF_PIN_16) +#define PINCONF_CTOUT13_1 (PINCONF_FUNC1|PINCONF_PINS7|PINCONF_PIN_4) +#define PINCONF_CTOUT13_2 (PINCONF_FUNC1|PINCONF_PINSD|PINCONF_PIN_9) +#define PINCONF_CTOUT13_3 (PINCONF_FUNC2|PINCONF_PINS1|PINCONF_PIN_7) +#define PINCONF_CTOUT13_4 (PINCONF_FUNC6|PINCONF_PINSD|PINCONF_PIN_13) +#define PINCONF_CTOUT14_1 (PINCONF_FUNC1|PINCONF_PINS7|PINCONF_PIN_0) +#define PINCONF_CTOUT14_2 (PINCONF_FUNC1|PINCONF_PINSE|PINCONF_PIN_13) +#define PINCONF_CTOUT14_3 (PINCONF_FUNC2|PINCONF_PINS1|PINCONF_PIN_10) +#define PINCONF_CTOUT14_4 (PINCONF_FUNC6|PINCONF_PINSD|PINCONF_PIN_11) +#define PINCONF_CTOUT15_1 (PINCONF_FUNC1|PINCONF_PINS7|PINCONF_PIN_1) +#define PINCONF_CTOUT15_2 (PINCONF_FUNC1|PINCONF_PINSD|PINCONF_PIN_0) +#define PINCONF_CTOUT15_3 (PINCONF_FUNC2|PINCONF_PINS1|PINCONF_PIN_11) + +#define PINCONF_EMC_A0 (PINCONF_FUNC3|PINCONF_PINS2|PINCONF_PIN_9) +#define PINCONF_EMC_A1 (PINCONF_FUNC3|PINCONF_PINS2|PINCONF_PIN_10) +#define PINCONF_EMC_A2 (PINCONF_FUNC3|PINCONF_PINS2|PINCONF_PIN_11) +#define PINCONF_EMC_A3 (PINCONF_FUNC3|PINCONF_PINS2|PINCONF_PIN_12) +#define PINCONF_EMC_A4 (PINCONF_FUNC3|PINCONF_PINS2|PINCONF_PIN_13) +#define PINCONF_EMC_A5 (PINCONF_FUNC2|PINCONF_PINS1|PINCONF_PIN_0) +#define PINCONF_EMC_A6 (PINCONF_FUNC2|PINCONF_PINS1|PINCONF_PIN_1) +#define PINCONF_EMC_A7 (PINCONF_FUNC2|PINCONF_PINS1|PINCONF_PIN_2) +#define PINCONF_EMC_A8 (PINCONF_FUNC3|PINCONF_PINS2|PINCONF_PIN_8) +#define PINCONF_EMC_A9 (PINCONF_FUNC3|PINCONF_PINS2|PINCONF_PIN_7) +#define PINCONF_EMC_A10 (PINCONF_FUNC2|PINCONF_PINS2|PINCONF_PIN_6) +#define PINCONF_EMC_A11 (PINCONF_FUNC2|PINCONF_PINS2|PINCONF_PIN_2) +#define PINCONF_EMC_A12 (PINCONF_FUNC2|PINCONF_PINS2|PINCONF_PIN_1) +#define PINCONF_EMC_A13 (PINCONF_FUNC2|PINCONF_PINS2|PINCONF_PIN_0) +#define PINCONF_EMC_A14 (PINCONF_FUNC1|PINCONF_PINS6|PINCONF_PIN_8) +#define PINCONF_EMC_A15 (PINCONF_FUNC1|PINCONF_PINS6|PINCONF_PIN_7) +#define PINCONF_EMC_A16 (PINCONF_FUNC2|PINCONF_PINSD|PINCONF_PIN_16) +#define PINCONF_EMC_A17 (PINCONF_FUNC2|PINCONF_PINSD|PINCONF_PIN_15) +#define PINCONF_EMC_A18 (PINCONF_FUNC3|PINCONF_PINSE|PINCONF_PIN_0) +#define PINCONF_EMC_A19 (PINCONF_FUNC3|PINCONF_PINSE|PINCONF_PIN_1) +#define PINCONF_EMC_A20 (PINCONF_FUNC3|PINCONF_PINSE|PINCONF_PIN_2) +#define PINCONF_EMC_A21 (PINCONF_FUNC3|PINCONF_PINSE|PINCONF_PIN_3) +#define PINCONF_EMC_A22 (PINCONF_FUNC3|PINCONF_PINSE|PINCONF_PIN_4) +#define PINCONF_EMC_A23 (PINCONF_FUNC3|PINCONF_PINSA|PINCONF_PIN_4) +#define PINCONF_EMC_BLS0 (PINCONF_FUNC3|PINCONF_PINS1|PINCONF_PIN_4) +#define PINCONF_EMC_BLS1 (PINCONF_FUNC1|PINCONF_PINS6|PINCONF_PIN_6) +#define PINCONF_EMC_BLS2 (PINCONF_FUNC2|PINCONF_PINSD|PINCONF_PIN_13) +#define PINCONF_EMC_BLS3 (PINCONF_FUNC2|PINCONF_PINSD|PINCONF_PIN_10) +#define PINCONF_EMC_CAS (PINCONF_FUNC3|PINCONF_PINS6|PINCONF_PIN_4) +#define PINCONF_EMC_CKEOUT0 (PINCONF_FUNC3|PINCONF_PINS6|PINCONF_PIN_11) +#define PINCONF_EMC_CKEOUT1 (PINCONF_FUNC1|PINCONF_PINS6|PINCONF_PIN_2) +#define PINCONF_EMC_CKEOUT2 (PINCONF_FUNC2|PINCONF_PINSD|PINCONF_PIN_1) +#define PINCONF_EMC_CKEOUT3 (PINCONF_FUNC3|PINCONF_PINSE|PINCONF_PIN_15) +#define PINCONF_EMC_CS0 (PINCONF_FUNC3|PINCONF_PINS1|PINCONF_PIN_5) +#define PINCONF_EMC_CS1 (PINCONF_FUNC3|PINCONF_PINS6|PINCONF_PIN_3) +#define PINCONF_EMC_CS2 (PINCONF_FUNC2|PINCONF_PINSD|PINCONF_PIN_12) +#define PINCONF_EMC_CS3 (PINCONF_FUNC2|PINCONF_PINSD|PINCONF_PIN_11) +#define PINCONF_EMC_D0 (PINCONF_FUNC3|PINCONF_PINS1|PINCONF_PIN_7) +#define PINCONF_EMC_D1 (PINCONF_FUNC3|PINCONF_PINS1|PINCONF_PIN_8) +#define PINCONF_EMC_D2 (PINCONF_FUNC3|PINCONF_PINS1|PINCONF_PIN_9) +#define PINCONF_EMC_D3 (PINCONF_FUNC3|PINCONF_PINS1|PINCONF_PIN_10) +#define PINCONF_EMC_D4 (PINCONF_FUNC3|PINCONF_PINS1|PINCONF_PIN_11) +#define PINCONF_EMC_D5 (PINCONF_FUNC3|PINCONF_PINS1|PINCONF_PIN_12) +#define PINCONF_EMC_D6 (PINCONF_FUNC3|PINCONF_PINS1|PINCONF_PIN_13) +#define PINCONF_EMC_D7 (PINCONF_FUNC3|PINCONF_PINS1|PINCONF_PIN_14) +#define PINCONF_EMC_D8 (PINCONF_FUNC2|PINCONF_PINS5|PINCONF_PIN_4) +#define PINCONF_EMC_D9 (PINCONF_FUNC2|PINCONF_PINS5|PINCONF_PIN_5) +#define PINCONF_EMC_D10 (PINCONF_FUNC2|PINCONF_PINS5|PINCONF_PIN_6) +#define PINCONF_EMC_D11 (PINCONF_FUNC2|PINCONF_PINS5|PINCONF_PIN_7) +#define PINCONF_EMC_D12 (PINCONF_FUNC2|PINCONF_PINS5|PINCONF_PIN_0) +#define PINCONF_EMC_D13 (PINCONF_FUNC2|PINCONF_PINS5|PINCONF_PIN_1) +#define PINCONF_EMC_D14 (PINCONF_FUNC2|PINCONF_PINS5|PINCONF_PIN_2) +#define PINCONF_EMC_D15 (PINCONF_FUNC2|PINCONF_PINS5|PINCONF_PIN_3) +#define PINCONF_EMC_D16 (PINCONF_FUNC2|PINCONF_PINSD|PINCONF_PIN_2) +#define PINCONF_EMC_D17 (PINCONF_FUNC2|PINCONF_PINSD|PINCONF_PIN_3) +#define PINCONF_EMC_D18 (PINCONF_FUNC2|PINCONF_PINSD|PINCONF_PIN_4) +#define PINCONF_EMC_D19 (PINCONF_FUNC2|PINCONF_PINSD|PINCONF_PIN_5) +#define PINCONF_EMC_D20 (PINCONF_FUNC2|PINCONF_PINSD|PINCONF_PIN_6) +#define PINCONF_EMC_D21 (PINCONF_FUNC2|PINCONF_PINSD|PINCONF_PIN_7) +#define PINCONF_EMC_D22 (PINCONF_FUNC2|PINCONF_PINSD|PINCONF_PIN_8) +#define PINCONF_EMC_D23 (PINCONF_FUNC2|PINCONF_PINSD|PINCONF_PIN_9) +#define PINCONF_EMC_D24 (PINCONF_FUNC3|PINCONF_PINSE|PINCONF_PIN_5) +#define PINCONF_EMC_D25 (PINCONF_FUNC3|PINCONF_PINSE|PINCONF_PIN_6) +#define PINCONF_EMC_D26 (PINCONF_FUNC3|PINCONF_PINSE|PINCONF_PIN_7) +#define PINCONF_EMC_D27 (PINCONF_FUNC3|PINCONF_PINSE|PINCONF_PIN_8) +#define PINCONF_EMC_D28 (PINCONF_FUNC3|PINCONF_PINSE|PINCONF_PIN_9) +#define PINCONF_EMC_D29 (PINCONF_FUNC3|PINCONF_PINSE|PINCONF_PIN_10) +#define PINCONF_EMC_D30 (PINCONF_FUNC3|PINCONF_PINSE|PINCONF_PIN_11) +#define PINCONF_EMC_D31 (PINCONF_FUNC3|PINCONF_PINSE|PINCONF_PIN_12) +#define PINCONF_EMC_DQMOUT0 (PINCONF_FUNC3|PINCONF_PINS6|PINCONF_PIN_12) +#define PINCONF_EMC_DQMOUT1 (PINCONF_FUNC3|PINCONF_PINS6|PINCONF_PIN_10) +#define PINCONF_EMC_DQMOUT2 (PINCONF_FUNC2|PINCONF_PINSD|PINCONF_PIN_0) +#define PINCONF_EMC_DQMOUT3 (PINCONF_FUNC3|PINCONF_PINSE|PINCONF_PIN_13) +#define PINCONF_EMC_DYCS0 (PINCONF_FUNC3|PINCONF_PINS6|PINCONF_PIN_9) +#define PINCONF_EMC_DYCS1 (PINCONF_FUNC1|PINCONF_PINS6|PINCONF_PIN_1) +#define PINCONF_EMC_DYCS2 (PINCONF_FUNC2|PINCONF_PINSD|PINCONF_PIN_14) +#define PINCONF_EMC_DYCS3 (PINCONF_FUNC3|PINCONF_PINSE|PINCONF_PIN_14) +#define PINCONF_EMC_OE (PINCONF_FUNC3|PINCONF_PINS1|PINCONF_PIN_3) +#define PINCONF_EMC_RAS (PINCONF_FUNC3|PINCONF_PINS6|PINCONF_PIN_5) +#define PINCONF_EMC_WE (PINCONF_FUNC3|PINCONF_PINS1|PINCONF_PIN_6) + +#define PINCONF_ENET_COL_1 (PINCONF_FUNC2|PINCONF_PINS0|PINCONF_PIN_1) +#define PINCONF_ENET_COL_2 (PINCONF_FUNC5|PINCONF_PINS9|PINCONF_PIN_6) +#define PINCONF_ENET_COL_3 (PINCONF_FUNC7|PINCONF_PINS4|PINCONF_PIN_1) +#define PINCONF_ENET_CRS_1 (PINCONF_FUNC3|PINCONF_PINS1|PINCONF_PIN_16) +#define PINCONF_ENET_CRS_2 (PINCONF_FUNC5|PINCONF_PINS9|PINCONF_PIN_0) +#define PINCONF_ENET_MDC_1 (PINCONF_FUNC3|PINCONF_PINSC|PINCONF_PIN_1) +#define PINCONF_ENET_MDC_2 (PINCONF_FUNC6|PINCONF_PINS7|PINCONF_PIN_7) +#define PINCONF_ENET_MDC_3 (PINCONF_FUNC7|PINCONF_PINS2|PINCONF_PIN_0) +#define PINCONF_ENET_MDIO (PINCONF_FUNC3|PINCONF_PINS1|PINCONF_PIN_17|PINCONF_FLOAT|PINCONF_INBUFFER|PINCONF_GLITCH) +#define PINCONF_ENET_REF_CLK (PINCONF_FUNC0|PINCONF_PINS1|PINCONF_PIN_19|PINCONF_SLEW_FAST|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_FLOAT) +#define PINCONF_ENET_RXD0 (PINCONF_FUNC3|PINCONF_PINS1|PINCONF_PIN_15|PINCONF_FLOAT|PINCONF_INBUFFER|PINCONF_GLITCH) +#define PINCONF_ENET_RXD1 (PINCONF_FUNC2|PINCONF_PINS0|PINCONF_PIN_0|PINCONF_FLOAT|PINCONF_INBUFFER|PINCONF_GLITCH) +#define PINCONF_ENET_RXD2_1 (PINCONF_FUNC3|PINCONF_PINSC|PINCONF_PIN_6) +#define PINCONF_ENET_RXD2_2 (PINCONF_FUNC5|PINCONF_PINS9|PINCONF_PIN_3) +#define PINCONF_ENET_RXD3_1 (PINCONF_FUNC3|PINCONF_PINSC|PINCONF_PIN_7) +#define PINCONF_ENET_RXD3_2 (PINCONF_FUNC5|PINCONF_PINS9|PINCONF_PIN_2) +#define PINCONF_ENET_RX_CLK (PINCONF_FUNC3|PINCONF_PINSC|PINCONF_PIN_0) +#define PINCONF_ENET_RX_DV_1 (PINCONF_FUNC3|PINCONF_PINSC|PINCONF_PIN_8) +#define PINCONF_ENET_RX_DV_2 (PINCONF_FUNC7|PINCONF_PINS1|PINCONF_PIN_16|PINCONF_FLOAT|PINCONF_INBUFFER|PINCONF_GLITCH) +#define PINCONF_ENET_RX_ER_1 (PINCONF_FUNC3|PINCONF_PINSC|PINCONF_PIN_9) +#define PINCONF_ENET_RX_ER_2 (PINCONF_FUNC5|PINCONF_PINS9|PINCONF_PIN_1) +#define PINCONF_ENET_TXD0 (PINCONF_FUNC3|PINCONF_PINS1|PINCONF_PIN_18|PINCONF_FLOAT|PINCONF_GLITCH) +#define PINCONF_ENET_TXD1 (PINCONF_FUNC3|PINCONF_PINS1|PINCONF_PIN_20|PINCONF_FLOAT|PINCONF_GLITCH) +#define PINCONF_ENET_TXD2_1 (PINCONF_FUNC3|PINCONF_PINSC|PINCONF_PIN_2) +#define PINCONF_ENET_TXD2_2 (PINCONF_FUNC5|PINCONF_PINS9|PINCONF_PIN_4) +#define PINCONF_ENET_TXD3_1 (PINCONF_FUNC3|PINCONF_PINSC|PINCONF_PIN_3) +#define PINCONF_ENET_TXD3_2 (PINCONF_FUNC5|PINCONF_PINS9|PINCONF_PIN_5) +#define PINCONF_ENET_TXEN (PINCONF_FUNC6|PINCONF_PINS0|PINCONF_PIN_1|PINCONF_FLOAT|PINCONF_GLITCH) +#define PINCONF_ENET_TX_CLK (PINCONF_FUNC0|PINCONF_PINS1|PINCONF_PIN_19) +#define PINCONF_ENET_TX_EN (PINCONF_FUNC3|PINCONF_PINSC|PINCONF_PIN_4) +#define PINCONF_ENET_TX_ER_1 (PINCONF_FUNC3|PINCONF_PINSC|PINCONF_PIN_5) +#define PINCONF_ENET_TX_ER_2 (PINCONF_FUNC6|PINCONF_PINSC|PINCONF_PIN_14) + +#define PINCONF_GPIO0p0 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS0|PINCONF_PIN_0) +#define PINCONF_GPIO0p1 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS0|PINCONF_PIN_1) +#define PINCONF_GPIO0p2 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS1|PINCONF_PIN_15) +#define PINCONF_GPIO0p3 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS1|PINCONF_PIN_16) +#define PINCONF_GPIO0p4 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS1|PINCONF_PIN_0) +#define PINCONF_GPIO0p5 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS6|PINCONF_PIN_6) +#define PINCONF_GPIO0p6 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS3|PINCONF_PIN_6) +#define PINCONF_GPIO0p7 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS2|PINCONF_PIN_7) +#define PINCONF_GPIO0p8 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS1|PINCONF_PIN_1) +#define PINCONF_GPIO0p9 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS1|PINCONF_PIN_2) +#define PINCONF_GPIO0p10 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS1|PINCONF_PIN_3) +#define PINCONF_GPIO0p11 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS1|PINCONF_PIN_4) +#define PINCONF_GPIO0p12 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS1|PINCONF_PIN_17) +#define PINCONF_GPIO0p13 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS1|PINCONF_PIN_18) +#define PINCONF_GPIO0p14 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS2|PINCONF_PIN_10) +#define PINCONF_GPIO0p15 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS1|PINCONF_PIN_20) +#define PINCONF_GPIO1p0 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS1|PINCONF_PIN_7) +#define PINCONF_GPIO1p1 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS1|PINCONF_PIN_8) +#define PINCONF_GPIO1p2 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS1|PINCONF_PIN_9) +#define PINCONF_GPIO1p3 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS1|PINCONF_PIN_10) +#define PINCONF_GPIO1p4 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS1|PINCONF_PIN_11) +#define PINCONF_GPIO1p5 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS1|PINCONF_PIN_12) +#define PINCONF_GPIO1p6 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS1|PINCONF_PIN_13) +#define PINCONF_GPIO1p7 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS1|PINCONF_PIN_14) +#define PINCONF_GPIO1p8 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS1|PINCONF_PIN_5) +#define PINCONF_GPIO1p9 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS1|PINCONF_PIN_6) +#define PINCONF_GPIO1p10 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS2|PINCONF_PIN_9) +#define PINCONF_GPIO1p11 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS2|PINCONF_PIN_11) +#define PINCONF_GPIO1p12 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS2|PINCONF_PIN_12) +#define PINCONF_GPIO1p13 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS2|PINCONF_PIN_13) +#define PINCONF_GPIO1p14 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS3|PINCONF_PIN_4) +#define PINCONF_GPIO1p15 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS3|PINCONF_PIN_5) +#define PINCONF_GPIO2p0 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS4|PINCONF_PIN_0) +#define PINCONF_GPIO2p1 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS4|PINCONF_PIN_1) +#define PINCONF_GPIO2p2 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS4|PINCONF_PIN_2) +#define PINCONF_GPIO2p3 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS4|PINCONF_PIN_3) +#define PINCONF_GPIO2p4 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS4|PINCONF_PIN_4) +#define PINCONF_GPIO2p5 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS4|PINCONF_PIN_5) +#define PINCONF_GPIO2p6 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS4|PINCONF_PIN_6) +#define PINCONF_GPIO2p7 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS5|PINCONF_PIN_7) +#define PINCONF_GPIO2p8 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS6|PINCONF_PIN_12) +#define PINCONF_GPIO2p9 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS5|PINCONF_PIN_0) +#define PINCONF_GPIO2p10 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS5|PINCONF_PIN_1) +#define PINCONF_GPIO2p11 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS5|PINCONF_PIN_2) +#define PINCONF_GPIO2p12 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS5|PINCONF_PIN_3) +#define PINCONF_GPIO2p13 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS5|PINCONF_PIN_4) +#define PINCONF_GPIO2p14 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS5|PINCONF_PIN_5) +#define PINCONF_GPIO2p15 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS5|PINCONF_PIN_6) +#define PINCONF_GPIO3p0 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS6|PINCONF_PIN_1) +#define PINCONF_GPIO3p1 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS6|PINCONF_PIN_2) +#define PINCONF_GPIO3p2 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS6|PINCONF_PIN_3) +#define PINCONF_GPIO3p3 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS6|PINCONF_PIN_4) +#define PINCONF_GPIO3p4 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS6|PINCONF_PIN_5) +#define PINCONF_GPIO3p5 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS6|PINCONF_PIN_9) +#define PINCONF_GPIO3p6 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS6|PINCONF_PIN_10) +#define PINCONF_GPIO3p7 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS6|PINCONF_PIN_11) +#define PINCONF_GPIO3p8 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS7|PINCONF_PIN_0) +#define PINCONF_GPIO3p9 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS7|PINCONF_PIN_1) +#define PINCONF_GPIO3p10 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS7|PINCONF_PIN_2) +#define PINCONF_GPIO3p11 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS7|PINCONF_PIN_3) +#define PINCONF_GPIO3p12 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS7|PINCONF_PIN_4) +#define PINCONF_GPIO3p13 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS7|PINCONF_PIN_5) +#define PINCONF_GPIO3p14 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS7|PINCONF_PIN_6) +#define PINCONF_GPIO3p15 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS7|PINCONF_PIN_7) +#define PINCONF_GPIO4p0 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS8|PINCONF_PIN_0) +#define PINCONF_GPIO4p1 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS8|PINCONF_PIN_1) +#define PINCONF_GPIO4p2 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS8|PINCONF_PIN_2) +#define PINCONF_GPIO4p3 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS8|PINCONF_PIN_3) +#define PINCONF_GPIO4p4 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS8|PINCONF_PIN_4) +#define PINCONF_GPIO4p5 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS8|PINCONF_PIN_5) +#define PINCONF_GPIO4p6 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS8|PINCONF_PIN_6) +#define PINCONF_GPIO4p7 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS8|PINCONF_PIN_7) +#define PINCONF_GPIO4p8 (PINCONF_FUNC0|PINCONF_PINSA|PINCONF_PIN_1) +#define PINCONF_GPIO4p9 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINSA|PINCONF_PIN_2) +#define PINCONF_GPIO4p10 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINSA|PINCONF_PIN_3) +#define PINCONF_GPIO4p11 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS9|PINCONF_PIN_6) +#define PINCONF_GPIO4p12 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS9|PINCONF_PIN_0) +#define PINCONF_GPIO4p13 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS9|PINCONF_PIN_1) +#define PINCONF_GPIO4p14 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS9|PINCONF_PIN_2) +#define PINCONF_GPIO4p15 (PINCONF_FUNC0|PINCONF_INBUFFER|PINCONF_PINS9|PINCONF_PIN_3) +#define PINCONF_GPIO5p0 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINS2|PINCONF_PIN_0) +#define PINCONF_GPIO5p1 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINS2|PINCONF_PIN_1) +#define PINCONF_GPIO5p2 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINS2|PINCONF_PIN_2) +#define PINCONF_GPIO5p3 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINS2|PINCONF_PIN_3) +#define PINCONF_GPIO5p4 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINS2|PINCONF_PIN_4) +#define PINCONF_GPIO5p5 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINS2|PINCONF_PIN_5) +#define PINCONF_GPIO5p6 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINS2|PINCONF_PIN_6) +#define PINCONF_GPIO5p7 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINS2|PINCONF_PIN_8) +#define PINCONF_GPIO5p8 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINS3|PINCONF_PIN_1) +#define PINCONF_GPIO5p9 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINS3|PINCONF_PIN_2) +#define PINCONF_GPIO5p10 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINS3|PINCONF_PIN_7) +#define PINCONF_GPIO5p11 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINS3|PINCONF_PIN_8) +#define PINCONF_GPIO5p12 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINS4|PINCONF_PIN_8) +#define PINCONF_GPIO5p13 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINS4|PINCONF_PIN_9) +#define PINCONF_GPIO5p14 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINS4|PINCONF_PIN_10) +#define PINCONF_GPIO5p15 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINS6|PINCONF_PIN_7) +#define PINCONF_GPIO5p16 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINS6|PINCONF_PIN_8) +#define PINCONF_GPIO5p17 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINS9|PINCONF_PIN_4) +#define PINCONF_GPIO5p18 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINS9|PINCONF_PIN_5) +#define PINCONF_GPIO5p19 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSA|PINCONF_PIN_4) +#define PINCONF_GPIO5p20 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSB|PINCONF_PIN_0) +#define PINCONF_GPIO5p21 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSB|PINCONF_PIN_1) +#define PINCONF_GPIO5p22 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSB|PINCONF_PIN_2) +#define PINCONF_GPIO5p23 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSB|PINCONF_PIN_3) +#define PINCONF_GPIO5p24 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSB|PINCONF_PIN_4) +#define PINCONF_GPIO5p25 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSB|PINCONF_PIN_5) +#define PINCONF_GPIO5p26 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSB|PINCONF_PIN_6) +#define PINCONF_GPIO6p0 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSC|PINCONF_PIN_1) +#define PINCONF_GPIO6p1 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSC|PINCONF_PIN_2) +#define PINCONF_GPIO6p2 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSC|PINCONF_PIN_3) +#define PINCONF_GPIO6p3 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSC|PINCONF_PIN_4) +#define PINCONF_GPIO6p4 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSC|PINCONF_PIN_5) +#define PINCONF_GPIO6p5 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSC|PINCONF_PIN_6) +#define PINCONF_GPIO6p6 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSC|PINCONF_PIN_7) +#define PINCONF_GPIO6p7 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSC|PINCONF_PIN_8) +#define PINCONF_GPIO6p8 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSC|PINCONF_PIN_9) +#define PINCONF_GPIO6p9 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSC|PINCONF_PIN_10) +#define PINCONF_GPIO6p10 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSC|PINCONF_PIN_11) +#define PINCONF_GPIO6p11 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSC|PINCONF_PIN_12) +#define PINCONF_GPIO6p12 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSC|PINCONF_PIN_13) +#define PINCONF_GPIO6p13 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSC|PINCONF_PIN_14) +#define PINCONF_GPIO6p14 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSD|PINCONF_PIN_0) +#define PINCONF_GPIO6p15 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSD|PINCONF_PIN_1) +#define PINCONF_GPIO6p16 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSD|PINCONF_PIN_2) +#define PINCONF_GPIO6p17 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSD|PINCONF_PIN_3) +#define PINCONF_GPIO6p18 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSD|PINCONF_PIN_4) +#define PINCONF_GPIO6p19 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSD|PINCONF_PIN_5) +#define PINCONF_GPIO6p20 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSD|PINCONF_PIN_6) +#define PINCONF_GPIO6p21 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSD|PINCONF_PIN_7) +#define PINCONF_GPIO6p22 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSD|PINCONF_PIN_8) +#define PINCONF_GPIO6p23 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSD|PINCONF_PIN_9) +#define PINCONF_GPIO6p24 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSD|PINCONF_PIN_10) +#define PINCONF_GPIO6p25 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSD|PINCONF_PIN_11) +#define PINCONF_GPIO6p26 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSD|PINCONF_PIN_12) +#define PINCONF_GPIO6p27 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSD|PINCONF_PIN_13) +#define PINCONF_GPIO6p28 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSD|PINCONF_PIN_14) +#define PINCONF_GPIO6p29 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSD|PINCONF_PIN_15) +#define PINCONF_GPIO6p30 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSD|PINCONF_PIN_16) +#define PINCONF_GPIO7p0 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSE|PINCONF_PIN_0) +#define PINCONF_GPIO7p1 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSE|PINCONF_PIN_1) +#define PINCONF_GPIO7p2 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSE|PINCONF_PIN_2) +#define PINCONF_GPIO7p3 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSE|PINCONF_PIN_3) +#define PINCONF_GPIO7p4 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSE|PINCONF_PIN_4) +#define PINCONF_GPIO7p5 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSE|PINCONF_PIN_5) +#define PINCONF_GPIO7p6 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSE|PINCONF_PIN_6) +#define PINCONF_GPIO7p7 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSE|PINCONF_PIN_7) +#define PINCONF_GPIO7p8 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSE|PINCONF_PIN_8) +#define PINCONF_GPIO7p9 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSE|PINCONF_PIN_9) +#define PINCONF_GPIO7p10 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSE|PINCONF_PIN_10) +#define PINCONF_GPIO7p11 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSE|PINCONF_PIN_11) +#define PINCONF_GPIO7p12 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSE|PINCONF_PIN_12) +#define PINCONF_GPIO7p13 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSE|PINCONF_PIN_13) +#define PINCONF_GPIO7p14 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSE|PINCONF_PIN_14) +#define PINCONF_GPIO7p15 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSE|PINCONF_PIN_15) +#define PINCONF_GPIO7p16 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSF|PINCONF_PIN_1) +#define PINCONF_GPIO7p17 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSF|PINCONF_PIN_2) +#define PINCONF_GPIO7p18 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSF|PINCONF_PIN_3) +#define PINCONF_GPIO7p19 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSF|PINCONF_PIN_5) +#define PINCONF_GPIO7p20 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSF|PINCONF_PIN_6) +#define PINCONF_GPIO7p21 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSF|PINCONF_PIN_7) +#define PINCONF_GPIO7p22 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSF|PINCONF_PIN_8) +#define PINCONF_GPIO7p23 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSF|PINCONF_PIN_9) +#define PINCONF_GPIO7p24 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSF|PINCONF_PIN_10) +#define PINCONF_GPIO7p25 (PINCONF_FUNC4|PINCONF_INBUFFER|PINCONF_PINSF|PINCONF_PIN_11) + +#define PINCONF_GP_CLKIN_1 (PINCONF_FUNC1|PINCONF_PINS4|PINCONF_PIN_7) +#define PINCONF_GP_CLKIN_2 (PINCONF_FUNC1|PINCONF_PINSF|PINCONF_PIN_0) +#define PINCONF_GP_CLKIN_3 (PINCONF_FUNC1|PINCONF_PINSF|PINCONF_PIN_4) + +#define PINCONF_I2C1_SCL_1 (PINCONF_FUNC1|PINCONF_PINS2|PINCONF_PIN_4) +#define PINCONF_I2C1_SCL_2 (PINCONF_FUNC2|PINCONF_PINSE|PINCONF_PIN_15) +#define PINCONF_I2C1_SDA_1 (PINCONF_FUNC1|PINCONF_PINS2|PINCONF_PIN_3) +#define PINCONF_I2C1_SDA_2 (PINCONF_FUNC2|PINCONF_PINSE|PINCONF_PIN_13) + +#define PINCONF_I2S0_RX_MCLK_1 (PINCONF_FUNC1|PINCONF_PINS3|PINCONF_PIN_0) +#define PINCONF_I2S0_RX_MCLK_2 (PINCONF_FUNC1|PINCONF_PINS6|PINCONF_PIN_0) +#define PINCONF_I2S0_RX_MCLK_3 (PINCONF_FUNC6|PINCONF_PINS1|PINCONF_PIN_19) +#define PINCONF_I2S0_RX_SCK_1 (PINCONF_FUNC0|PINCONF_PINS3|PINCONF_PIN_0) +#define PINCONF_I2S0_RX_SCK_2 (PINCONF_FUNC4|PINCONF_PINS6|PINCONF_PIN_0) +#define PINCONF_I2S0_RX_SCK_3 (PINCONF_FUNC7|PINCONF_PINSF|PINCONF_PIN_4) +#define PINCONF_I2S0_RX_SDA_1 (PINCONF_FUNC1|PINCONF_PINS3|PINCONF_PIN_2) +#define PINCONF_I2S0_RX_SDA_2 (PINCONF_FUNC3|PINCONF_PINS6|PINCONF_PIN_2) +#define PINCONF_I2S0_RX_WS_1 (PINCONF_FUNC1|PINCONF_PINS3|PINCONF_PIN_1) +#define PINCONF_I2S0_RX_WS_2 (PINCONF_FUNC3|PINCONF_PINS6|PINCONF_PIN_1) +#define PINCONF_I2S0_TXWS (PINCONF_FUNC6|PINCONF_PINS0|PINCONF_PIN_0) +#define PINCONF_I2S0_TX_MCLK_1 (PINCONF_FUNC3|PINCONF_PINS3|PINCONF_PIN_0) +#define PINCONF_I2S0_TX_MCLK_2 (PINCONF_FUNC6|PINCONF_PINS3|PINCONF_PIN_3) +#define PINCONF_I2S0_TX_MCLK_3 (PINCONF_FUNC6|PINCONF_PINSF|PINCONF_PIN_4) +#define PINCONF_I2S0_TX_SCK_1 (PINCONF_FUNC2|PINCONF_PINS3|PINCONF_PIN_0) +#define PINCONF_I2S0_TX_SCK_2 (PINCONF_FUNC7|PINCONF_PINS4|PINCONF_PIN_7) +#define PINCONF_I2S0_TX_SDA_1 (PINCONF_FUNC0|PINCONF_PINS3|PINCONF_PIN_2) +#define PINCONF_I2S0_TX_SDA_2 (PINCONF_FUNC2|PINCONF_PINS7|PINCONF_PIN_2) +#define PINCONF_I2S0_TX_SDA_3 (PINCONF_FUNC4|PINCONF_PINS9|PINCONF_PIN_2) +#define PINCONF_I2S0_TX_SDA_4 (PINCONF_FUNC5|PINCONF_PINS3|PINCONF_PIN_5) +#define PINCONF_I2S0_TX_SDA_5 (PINCONF_FUNC6|PINCONF_PINSC|PINCONF_PIN_12) +#define PINCONF_I2S0_TX_WS_1 (PINCONF_FUNC0|PINCONF_PINS3|PINCONF_PIN_1) +#define PINCONF_I2S0_TX_WS_2 (PINCONF_FUNC2|PINCONF_PINS7|PINCONF_PIN_1) +#define PINCONF_I2S0_TX_WS_3 (PINCONF_FUNC4|PINCONF_PINS9|PINCONF_PIN_1) +#define PINCONF_I2S0_TX_WS_4 (PINCONF_FUNC5|PINCONF_PINS3|PINCONF_PIN_4) +#define PINCONF_I2S0_TX_WS_5 (PINCONF_FUNC6|PINCONF_PINSC|PINCONF_PIN_13) + +#define PINCONF_I2S1_RX_MCLK (PINCONF_FUNC5|PINCONF_PINSA|PINCONF_PIN_0) +#define PINCONF_I2S1_RX_SDA (PINCONF_FUNC6|PINCONF_PINS3|PINCONF_PIN_4) +#define PINCONF_I2S1_RX_WS (PINCONF_FUNC6|PINCONF_PINS3|PINCONF_PIN_5) +#define PINCONF_I2S1_TXSDA (PINCONF_FUNC7|PINCONF_PINS0|PINCONF_PIN_1) +#define PINCONF_I2S1_TXWS (PINCONF_FUNC7|PINCONF_PINS0|PINCONF_PIN_0) +#define PINCONF_I2S1_TX_MCLK_1 (PINCONF_FUNC7|PINCONF_PINS8|PINCONF_PIN_8) +#define PINCONF_I2S1_TX_MCLK_2 (PINCONF_FUNC7|PINCONF_PINSF|PINCONF_PIN_0) +#define PINCONF_I2S1_TX_SCK_1 (PINCONF_FUNC6|PINCONF_PINS4|PINCONF_PIN_7) +#define PINCONF_I2S1_TX_SCK_2 (PINCONF_FUNC7|PINCONF_PINS1|PINCONF_PIN_19) +#define PINCONF_I2S1_TX_SCK_3 (PINCONF_FUNC7|PINCONF_PINS3|PINCONF_PIN_3) +#define PINCONF_I2S1_TX_SDA (PINCONF_FUNC7|PINCONF_PINSF|PINCONF_PIN_6) +#define PINCONF_I2S1_TX_WS (PINCONF_FUNC7|PINCONF_PINSF|PINCONF_PIN_7) + +#define PINCONF_LCD_DCLK_1 (PINCONF_FUNC0|PINCONF_PINS4|PINCONF_PIN_7) +#define PINCONF_LCD_DCLK_2 (PINCONF_FUNC4|PINCONF_PINSC|PINCONF_PIN_0) +#define PINCONF_LCD_ENAB (PINCONF_FUNC2|PINCONF_PINS4|PINCONF_PIN_6) +#define PINCONF_LCD_FP (PINCONF_FUNC2|PINCONF_PINS4|PINCONF_PIN_5) +#define PINCONF_LCD_LCDM (PINCONF_FUNC2|PINCONF_PINS4|PINCONF_PIN_6) +#define PINCONF_LCD_LE (PINCONF_FUNC3|PINCONF_PINS7|PINCONF_PIN_0) +#define PINCONF_LCD_LP_1 (PINCONF_FUNC3|PINCONF_PINS7|PINCONF_PIN_6) +#define PINCONF_LCD_LP_2 (PINCONF_FUNC4|PINCONF_PINS8|PINCONF_PIN_6) +#define PINCONF_LCD_PWR_1 (PINCONF_FUNC3|PINCONF_PINS7|PINCONF_PIN_7) +#define PINCONF_LCD_PWR_2 (PINCONF_FUNC4|PINCONF_PINS8|PINCONF_PIN_7) +#define PINCONF_LCD_PWR_3 (PINCONF_FUNC6|PINCONF_PINSB|PINCONF_PIN_5) +#define PINCONF_LCD_VD0 (PINCONF_FUNC2|PINCONF_PINS4|PINCONF_PIN_1) +#define PINCONF_LCD_VD1 (PINCONF_FUNC2|PINCONF_PINS4|PINCONF_PIN_4) +#define PINCONF_LCD_VD2 (PINCONF_FUNC2|PINCONF_PINS4|PINCONF_PIN_3) +#define PINCONF_LCD_VD3 (PINCONF_FUNC2|PINCONF_PINS4|PINCONF_PIN_2) +#define PINCONF_LCD_VD4_1 (PINCONF_FUNC3|PINCONF_PINS8|PINCONF_PIN_7) +#define PINCONF_LCD_VD4_2 (PINCONF_FUNC4|PINCONF_PINS7|PINCONF_PIN_4) +#define PINCONF_LCD_VD5_1 (PINCONF_FUNC3|PINCONF_PINS8|PINCONF_PIN_6) +#define PINCONF_LCD_VD5_2 (PINCONF_FUNC4|PINCONF_PINS7|PINCONF_PIN_3) +#define PINCONF_LCD_VD6_1 (PINCONF_FUNC3|PINCONF_PINS8|PINCONF_PIN_5) +#define PINCONF_LCD_VD6_2 (PINCONF_FUNC4|PINCONF_PINS7|PINCONF_PIN_2) +#define PINCONF_LCD_VD7_1 (PINCONF_FUNC3|PINCONF_PINS8|PINCONF_PIN_4) +#define PINCONF_LCD_VD7_2 (PINCONF_FUNC4|PINCONF_PINS7|PINCONF_PIN_1) +#define PINCONF_LCD_VD8_1 (PINCONF_FUNC3|PINCONF_PINS7|PINCONF_PIN_5) +#define PINCONF_LCD_VD8_2 (PINCONF_FUNC4|PINCONF_PINS8|PINCONF_PIN_5) +#define PINCONF_LCD_VD9 (PINCONF_FUNC2|PINCONF_PINS4|PINCONF_PIN_8) +#define PINCONF_LCD_VD10 (PINCONF_FUNC2|PINCONF_PINS4|PINCONF_PIN_10) +#define PINCONF_LCD_VD11 (PINCONF_FUNC2|PINCONF_PINS4|PINCONF_PIN_9) +#define PINCONF_LCD_VD12_1 (PINCONF_FUNC3|PINCONF_PINS8|PINCONF_PIN_3) +#define PINCONF_LCD_VD12_2 (PINCONF_FUNC5|PINCONF_PINS4|PINCONF_PIN_2) +#define PINCONF_LCD_VD12_3 (PINCONF_FUNC7|PINCONF_PINS3|PINCONF_PIN_5) +#define PINCONF_LCD_VD13_1 (PINCONF_FUNC2|PINCONF_PINSB|PINCONF_PIN_6) +#define PINCONF_LCD_VD13_2 (PINCONF_FUNC5|PINCONF_PINS4|PINCONF_PIN_0) +#define PINCONF_LCD_VD13_3 (PINCONF_FUNC7|PINCONF_PINS3|PINCONF_PIN_4) +#define PINCONF_LCD_VD14_1 (PINCONF_FUNC2|PINCONF_PINSB|PINCONF_PIN_5) +#define PINCONF_LCD_VD14_2 (PINCONF_FUNC5|PINCONF_PINS4|PINCONF_PIN_10) +#define PINCONF_LCD_VD14_3 (PINCONF_FUNC6|PINCONF_PINS3|PINCONF_PIN_2) +#define PINCONF_LCD_VD15_1 (PINCONF_FUNC2|PINCONF_PINSB|PINCONF_PIN_4) +#define PINCONF_LCD_VD15_2 (PINCONF_FUNC5|PINCONF_PINS4|PINCONF_PIN_9) +#define PINCONF_LCD_VD15_3 (PINCONF_FUNC6|PINCONF_PINS3|PINCONF_PIN_1) +#define PINCONF_LCD_VD16_1 (PINCONF_FUNC3|PINCONF_PINS7|PINCONF_PIN_4) +#define PINCONF_LCD_VD16_2 (PINCONF_FUNC4|PINCONF_PINS8|PINCONF_PIN_4) +#define PINCONF_LCD_VD17 (PINCONF_FUNC3|PINCONF_PINS7|PINCONF_PIN_3) +#define PINCONF_LCD_VD18 (PINCONF_FUNC3|PINCONF_PINS7|PINCONF_PIN_2) +#define PINCONF_LCD_VD19_1 (PINCONF_FUNC3|PINCONF_PINS7|PINCONF_PIN_1) +#define PINCONF_LCD_VD19_2 (PINCONF_FUNC4|PINCONF_PINS8|PINCONF_PIN_3) +#define PINCONF_LCD_VD19_3 (PINCONF_FUNC5|PINCONF_PINS4|PINCONF_PIN_1) +#define PINCONF_LCD_VD19_4 (PINCONF_FUNC6|PINCONF_PINSB|PINCONF_PIN_6) +#define PINCONF_LCD_VD20_1 (PINCONF_FUNC2|PINCONF_PINSB|PINCONF_PIN_3) +#define PINCONF_LCD_VD20_2 (PINCONF_FUNC5|PINCONF_PINS4|PINCONF_PIN_4) +#define PINCONF_LCD_VD21_1 (PINCONF_FUNC2|PINCONF_PINSB|PINCONF_PIN_2) +#define PINCONF_LCD_VD21_2 (PINCONF_FUNC5|PINCONF_PINS4|PINCONF_PIN_3) +#define PINCONF_LCD_VD22_1 (PINCONF_FUNC2|PINCONF_PINSB|PINCONF_PIN_1) +#define PINCONF_LCD_VD22_2 (PINCONF_FUNC5|PINCONF_PINS4|PINCONF_PIN_8) +#define PINCONF_LCD_VD23_1 (PINCONF_FUNC2|PINCONF_PINSB|PINCONF_PIN_0) +#define PINCONF_LCD_VD23_2 (PINCONF_FUNC4|PINCONF_PINS7|PINCONF_PIN_5) + +#define PINCONF_MCABORT_1 (PINCONF_FUNC1|PINCONF_PINS6|PINCONF_PIN_10) +#define PINCONF_MCABORT_2 (PINCONF_FUNC1|PINCONF_PINS9|PINCONF_PIN_0) +#define PINCONF_MCI0_1 (PINCONF_FUNC1|PINCONF_PINS5|PINCONF_PIN_3) +#define PINCONF_MCI0_2 (PINCONF_FUNC3|PINCONF_PINS8|PINCONF_PIN_2) +#define PINCONF_MCI1_1 (PINCONF_FUNC1|PINCONF_PINS5|PINCONF_PIN_2) +#define PINCONF_MCI1_2 (PINCONF_FUNC3|PINCONF_PINS8|PINCONF_PIN_1) +#define PINCONF_MCI2_1 (PINCONF_FUNC1|PINCONF_PINS5|PINCONF_PIN_1) +#define PINCONF_MCI2_2 (PINCONF_FUNC3|PINCONF_PINS8|PINCONF_PIN_0) +#define PINCONF_MCOA0_1 (PINCONF_FUNC1|PINCONF_PINS4|PINCONF_PIN_0) +#define PINCONF_MCOA0_2 (PINCONF_FUNC1|PINCONF_PINS9|PINCONF_PIN_3) +#define PINCONF_MCOA1_1 (PINCONF_FUNC1|PINCONF_PINS5|PINCONF_PIN_5) +#define PINCONF_MCOA1_2 (PINCONF_FUNC1|PINCONF_PINS9|PINCONF_PIN_5) +#define PINCONF_MCOA2_1 (PINCONF_FUNC1|PINCONF_PINS5|PINCONF_PIN_7) +#define PINCONF_MCOA2_2 (PINCONF_FUNC1|PINCONF_PINS9|PINCONF_PIN_1) +#define PINCONF_MCOB0_1 (PINCONF_FUNC1|PINCONF_PINS5|PINCONF_PIN_4) +#define PINCONF_MCOB0_2 (PINCONF_FUNC1|PINCONF_PINS9|PINCONF_PIN_4) +#define PINCONF_MCOB1_1 (PINCONF_FUNC1|PINCONF_PINS5|PINCONF_PIN_6) +#define PINCONF_MCOB1_2 (PINCONF_FUNC1|PINCONF_PINS9|PINCONF_PIN_6) +#define PINCONF_MCOB2_1 (PINCONF_FUNC1|PINCONF_PINS5|PINCONF_PIN_0) +#define PINCONF_MCOB2_2 (PINCONF_FUNC1|PINCONF_PINS9|PINCONF_PIN_2) + +#define PINCONF_NMI_1 (PINCONF_FUNC1|PINCONF_PINSE|PINCONF_PIN_4) +#define PINCONF_NMI_2 (PINCONF_FUNC2|PINCONF_PINS4|PINCONF_PIN_0) + +#define PINCONF_QEI_IDX (PINCONF_FUNC1|PINCONF_PINSA|PINCONF_PIN_1) +#define PINCONF_QEI_PHA (PINCONF_FUNC1|PINCONF_PINSA|PINCONF_PIN_3) +#define PINCONF_QEI_PHB (PINCONF_FUNC1|PINCONF_PINSA|PINCONF_PIN_2) + +#define PINCONF_SD_CD_1 (PINCONF_FUNC7|PINCONF_PINS1|PINCONF_PIN_13) +#define PINCONF_SD_CD_2 (PINCONF_FUNC7|PINCONF_PINSC|PINCONF_PIN_8) +#define PINCONF_SD_CLK (PINCONF_FUNC7|PINCONF_PINSC|PINCONF_PIN_0) +#define PINCONF_SD_CMD_1 (PINCONF_FUNC7|PINCONF_PINS1|PINCONF_PIN_6) +#define PINCONF_SD_CMD_2 (PINCONF_FUNC7|PINCONF_PINSC|PINCONF_PIN_10) +#define PINCONF_SD_DAT0_1 (PINCONF_FUNC7|PINCONF_PINS1|PINCONF_PIN_9) +#define PINCONF_SD_DAT0_2 (PINCONF_FUNC7|PINCONF_PINSC|PINCONF_PIN_4) +#define PINCONF_SD_DAT1_1 (PINCONF_FUNC7|PINCONF_PINS1|PINCONF_PIN_10) +#define PINCONF_SD_DAT1_2 (PINCONF_FUNC7|PINCONF_PINSC|PINCONF_PIN_5) +#define PINCONF_SD_DAT2_1 (PINCONF_FUNC7|PINCONF_PINS1|PINCONF_PIN_11) +#define PINCONF_SD_DAT2_2 (PINCONF_FUNC7|PINCONF_PINSC|PINCONF_PIN_6) +#define PINCONF_SD_DAT3_1 (PINCONF_FUNC7|PINCONF_PINS1|PINCONF_PIN_12) +#define PINCONF_SD_DAT3_2 (PINCONF_FUNC7|PINCONF_PINSC|PINCONF_PIN_7) +#define PINCONF_SD_DAT4 (PINCONF_FUNC7|PINCONF_PINSC|PINCONF_PIN_11) +#define PINCONF_SD_DAT5 (PINCONF_FUNC7|PINCONF_PINSC|PINCONF_PIN_12) +#define PINCONF_SD_DAT6 (PINCONF_FUNC7|PINCONF_PINSC|PINCONF_PIN_13) +#define PINCONF_SD_DAT7 (PINCONF_FUNC7|PINCONF_PINSC|PINCONF_PIN_14) +#define PINCONF_SD_POW_1 (PINCONF_FUNC5|PINCONF_PINSD|PINCONF_PIN_1) +#define PINCONF_SD_POW_2 (PINCONF_FUNC7|PINCONF_PINS1|PINCONF_PIN_5) +#define PINCONF_SD_POW_3 (PINCONF_FUNC7|PINCONF_PINSC|PINCONF_PIN_9) +#define PINCONF_SD_RST_1 (PINCONF_FUNC7|PINCONF_PINS1|PINCONF_PIN_3) +#define PINCONF_SD_RST_2 (PINCONF_FUNC7|PINCONF_PINSC|PINCONF_PIN_2) +#define PINCONF_SD_VOLT0_1 (PINCONF_FUNC7|PINCONF_PINS1|PINCONF_PIN_8) +#define PINCONF_SD_VOLT0_2 (PINCONF_FUNC7|PINCONF_PINSC|PINCONF_PIN_1) +#define PINCONF_SD_VOLT1_1 (PINCONF_FUNC7|PINCONF_PINS1|PINCONF_PIN_4) +#define PINCONF_SD_VOLT1_2 (PINCONF_FUNC7|PINCONF_PINSC|PINCONF_PIN_3) +#define PINCONF_SD_VOLT2_1 (PINCONF_FUNC5|PINCONF_PINSD|PINCONF_PIN_16) +#define PINCONF_SD_VOLT2_2 (PINCONF_FUNC6|PINCONF_PINSF|PINCONF_PIN_11) +#define PINCONF_SD_WP_1 (PINCONF_FUNC5|PINCONF_PINSD|PINCONF_PIN_15) +#define PINCONF_SD_WP_2 (PINCONF_FUNC6|PINCONF_PINSF|PINCONF_PIN_10) + +#define PINCONF_SGPIO0_1 (PINCONF_FUNC3|PINCONF_PINS0|PINCONF_PIN_0) +#define PINCONF_SGPIO0_2 (PINCONF_FUNC6|PINCONF_PINS9|PINCONF_PIN_0) +#define PINCONF_SGPIO0_3 (PINCONF_FUNC6|PINCONF_PINSF|PINCONF_PIN_1) +#define PINCONF_SGPIO1_1 (PINCONF_FUNC3|PINCONF_PINS0|PINCONF_PIN_1) +#define PINCONF_SGPIO1_2 (PINCONF_FUNC6|PINCONF_PINS9|PINCONF_PIN_1) +#define PINCONF_SGPIO1_3 (PINCONF_FUNC6|PINCONF_PINSF|PINCONF_PIN_2) +#define PINCONF_SGPIO2_1 (PINCONF_FUNC2|PINCONF_PINS1|PINCONF_PIN_15) +#define PINCONF_SGPIO2_2 (PINCONF_FUNC6|PINCONF_PINS9|PINCONF_PIN_2) +#define PINCONF_SGPIO2_3 (PINCONF_FUNC6|PINCONF_PINSF|PINCONF_PIN_3) +#define PINCONF_SGPIO3_1 (PINCONF_FUNC2|PINCONF_PINS1|PINCONF_PIN_16) +#define PINCONF_SGPIO3_2 (PINCONF_FUNC6|PINCONF_PINS9|PINCONF_PIN_5) +#define PINCONF_SGPIO3_3 (PINCONF_FUNC6|PINCONF_PINSF|PINCONF_PIN_9) +#define PINCONF_SGPIO4_1 (PINCONF_FUNC0|PINCONF_PINS2|PINCONF_PIN_0) +#define PINCONF_SGPIO4_2 (PINCONF_FUNC2|PINCONF_PINS6|PINCONF_PIN_3) +#define PINCONF_SGPIO4_3 (PINCONF_FUNC6|PINCONF_PINS9|PINCONF_PIN_4) +#define PINCONF_SGPIO4_4 (PINCONF_FUNC6|PINCONF_PINSF|PINCONF_PIN_5) +#define PINCONF_SGPIO4_5 (PINCONF_FUNC7|PINCONF_PINS7|PINCONF_PIN_0) +#define PINCONF_SGPIO4_6 (PINCONF_FUNC7|PINCONF_PINSD|PINCONF_PIN_0) +#define PINCONF_SGPIO5_1 (PINCONF_FUNC0|PINCONF_PINS2|PINCONF_PIN_1) +#define PINCONF_SGPIO5_2 (PINCONF_FUNC2|PINCONF_PINS6|PINCONF_PIN_6) +#define PINCONF_SGPIO5_3 (PINCONF_FUNC6|PINCONF_PINSF|PINCONF_PIN_6) +#define PINCONF_SGPIO5_4 (PINCONF_FUNC7|PINCONF_PINS7|PINCONF_PIN_1) +#define PINCONF_SGPIO5_5 (PINCONF_FUNC7|PINCONF_PINSD|PINCONF_PIN_1) +#define PINCONF_SGPIO6_1 (PINCONF_FUNC0|PINCONF_PINS2|PINCONF_PIN_2) +#define PINCONF_SGPIO6_2 (PINCONF_FUNC2|PINCONF_PINS6|PINCONF_PIN_7) +#define PINCONF_SGPIO6_3 (PINCONF_FUNC6|PINCONF_PINSF|PINCONF_PIN_7) +#define PINCONF_SGPIO6_4 (PINCONF_FUNC7|PINCONF_PINS7|PINCONF_PIN_2) +#define PINCONF_SGPIO6_5 (PINCONF_FUNC7|PINCONF_PINSD|PINCONF_PIN_2) +#define PINCONF_SGPIO7_1 (PINCONF_FUNC0|PINCONF_PINS2|PINCONF_PIN_6) +#define PINCONF_SGPIO7_2 (PINCONF_FUNC2|PINCONF_PINS6|PINCONF_PIN_8) +#define PINCONF_SGPIO7_3 (PINCONF_FUNC6|PINCONF_PINS1|PINCONF_PIN_0) +#define PINCONF_SGPIO7_4 (PINCONF_FUNC6|PINCONF_PINSF|PINCONF_PIN_8) +#define PINCONF_SGPIO7_5 (PINCONF_FUNC7|PINCONF_PINS7|PINCONF_PIN_7) +#define PINCONF_SGPIO7_6 (PINCONF_FUNC7|PINCONF_PINSD|PINCONF_PIN_3) +#define PINCONF_SGPIO8_1 (PINCONF_FUNC3|PINCONF_PINS1|PINCONF_PIN_1) +#define PINCONF_SGPIO8_2 (PINCONF_FUNC4|PINCONF_PINS8|PINCONF_PIN_0) +#define PINCONF_SGPIO8_3 (PINCONF_FUNC6|PINCONF_PINS1|PINCONF_PIN_12) +#define PINCONF_SGPIO8_4 (PINCONF_FUNC6|PINCONF_PINS9|PINCONF_PIN_6) +#define PINCONF_SGPIO8_5 (PINCONF_FUNC7|PINCONF_PINS4|PINCONF_PIN_2) +#define PINCONF_SGPIO8_6 (PINCONF_FUNC7|PINCONF_PINSD|PINCONF_PIN_4) +#define PINCONF_SGPIO9_1 (PINCONF_FUNC3|PINCONF_PINS1|PINCONF_PIN_2) +#define PINCONF_SGPIO9_2 (PINCONF_FUNC4|PINCONF_PINS8|PINCONF_PIN_1) +#define PINCONF_SGPIO9_3 (PINCONF_FUNC6|PINCONF_PINS1|PINCONF_PIN_13) +#define PINCONF_SGPIO9_4 (PINCONF_FUNC6|PINCONF_PINS9|PINCONF_PIN_3) +#define PINCONF_SGPIO9_5 (PINCONF_FUNC7|PINCONF_PINS4|PINCONF_PIN_3) +#define PINCONF_SGPIO9_6 (PINCONF_FUNC7|PINCONF_PINSD|PINCONF_PIN_5) +#define PINCONF_SGPIO10_1 (PINCONF_FUNC2|PINCONF_PINS1|PINCONF_PIN_3) +#define PINCONF_SGPIO10_2 (PINCONF_FUNC4|PINCONF_PINS8|PINCONF_PIN_2) +#define PINCONF_SGPIO10_3 (PINCONF_FUNC6|PINCONF_PINS1|PINCONF_PIN_14) +#define PINCONF_SGPIO10_4 (PINCONF_FUNC7|PINCONF_PINS4|PINCONF_PIN_4) +#define PINCONF_SGPIO10_5 (PINCONF_FUNC7|PINCONF_PINSD|PINCONF_PIN_6) +#define PINCONF_SGPIO11_1 (PINCONF_FUNC2|PINCONF_PINS1|PINCONF_PIN_4) +#define PINCONF_SGPIO11_2 (PINCONF_FUNC5|PINCONF_PINSC|PINCONF_PIN_12) +#define PINCONF_SGPIO11_3 (PINCONF_FUNC6|PINCONF_PINS1|PINCONF_PIN_17) +#define PINCONF_SGPIO11_4 (PINCONF_FUNC7|PINCONF_PINS4|PINCONF_PIN_5) +#define PINCONF_SGPIO11_5 (PINCONF_FUNC7|PINCONF_PINSD|PINCONF_PIN_7) +#define PINCONF_SGPIO12_1 (PINCONF_FUNC0|PINCONF_PINS2|PINCONF_PIN_3) +#define PINCONF_SGPIO12_2 (PINCONF_FUNC5|PINCONF_PINSC|PINCONF_PIN_13) +#define PINCONF_SGPIO12_3 (PINCONF_FUNC6|PINCONF_PINS1|PINCONF_PIN_18) +#define PINCONF_SGPIO12_4 (PINCONF_FUNC7|PINCONF_PINS4|PINCONF_PIN_6) +#define PINCONF_SGPIO12_5 (PINCONF_FUNC7|PINCONF_PINSD|PINCONF_PIN_8) +#define PINCONF_SGPIO13_1 (PINCONF_FUNC0|PINCONF_PINS2|PINCONF_PIN_4) +#define PINCONF_SGPIO13_2 (PINCONF_FUNC5|PINCONF_PINSC|PINCONF_PIN_14) +#define PINCONF_SGPIO13_3 (PINCONF_FUNC6|PINCONF_PINS1|PINCONF_PIN_20) +#define PINCONF_SGPIO13_4 (PINCONF_FUNC7|PINCONF_PINS4|PINCONF_PIN_8) +#define PINCONF_SGPIO13_5 (PINCONF_FUNC7|PINCONF_PINSD|PINCONF_PIN_9) +#define PINCONF_SGPIO14_1 (PINCONF_FUNC0|PINCONF_PINS2|PINCONF_PIN_5) +#define PINCONF_SGPIO14_2 (PINCONF_FUNC6|PINCONF_PINS1|PINCONF_PIN_6) +#define PINCONF_SGPIO14_3 (PINCONF_FUNC7|PINCONF_PINS4|PINCONF_PIN_9) +#define PINCONF_SGPIO15_1 (PINCONF_FUNC0|PINCONF_PINS2|PINCONF_PIN_8) +#define PINCONF_SGPIO15_2 (PINCONF_FUNC6|PINCONF_PINS1|PINCONF_PIN_5) +#define PINCONF_SGPIO15_3 (PINCONF_FUNC7|PINCONF_PINS4|PINCONF_PIN_10) + +#define PINCONF_SPIFI_CS (PINCONF_FUNC3|PINCONF_SLEW_FAST|PINCONF_PINS3|PINCONF_PIN_8) +#define PINCONF_SPIFI_MISO (PINCONF_FUNC3|PINCONF_SLEW_FAST|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_PINS3|PINCONF_PIN_6) +#define PINCONF_SPIFI_MOSI (PINCONF_FUNC3|PINCONF_SLEW_FAST|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_PINS3|PINCONF_PIN_7) +#define PINCONF_SPIFI_SCK (PINCONF_FUNC3|PINCONF_SLEW_FAST|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_PINS3|PINCONF_PIN_3) +#define PINCONF_SPIFI_SIO2 (PINCONF_FUNC3|PINCONF_SLEW_FAST|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_PINS3|PINCONF_PIN_5) +#define PINCONF_SPIFI_SIO3 (PINCONF_FUNC3|PINCONF_SLEW_FAST|PINCONF_INBUFFER|PINCONF_GLITCH|PINCONF_PINS3|PINCONF_PIN_4) + +#define PINCONF_SPI_MISO (PINCONF_FUNC1|PINCONF_PINS3|PINCONF_PIN_6) +#define PINCONF_SPI_MOSI (PINCONF_FUNC1|PINCONF_PINS3|PINCONF_PIN_7) +#define PINCONF_SPI_SCK (PINCONF_FUNC1|PINCONF_PINS3|PINCONF_PIN_3) +#define PINCONF_SPI_SSEL (PINCONF_FUNC1|PINCONF_PINS3|PINCONF_PIN_8) + +#define PINCONF_SSP0_MISO_1 (PINCONF_FUNC2|PINCONF_PINS3|PINCONF_PIN_7) +#define PINCONF_SSP0_MISO_2 (PINCONF_FUNC2|PINCONF_PINSF|PINCONF_PIN_2) +#define PINCONF_SSP0_MISO_3 (PINCONF_FUNC5|PINCONF_PINS1|PINCONF_PIN_1) +#define PINCONF_SSP0_MISO_4 (PINCONF_FUNC5|PINCONF_PINS3|PINCONF_PIN_6) +#define PINCONF_SSP0_MISO_5 (PINCONF_FUNC7|PINCONF_PINS9|PINCONF_PIN_1) +#define PINCONF_SSP0_MOSI_1 (PINCONF_FUNC2|PINCONF_PINS3|PINCONF_PIN_8) +#define PINCONF_SSP0_MOSI_2 (PINCONF_FUNC2|PINCONF_PINSF|PINCONF_PIN_3) +#define PINCONF_SSP0_MOSI_3 (PINCONF_FUNC5|PINCONF_PINS1|PINCONF_PIN_2) +#define PINCONF_SSP0_MOSI_4 (PINCONF_FUNC5|PINCONF_PINS3|PINCONF_PIN_7) +#define PINCONF_SSP0_MOSI_5 (PINCONF_FUNC7|PINCONF_PINS9|PINCONF_PIN_2) +#define PINCONF_SSP0_SCK_1 (PINCONF_FUNC0|PINCONF_PINSF|PINCONF_PIN_0) +#define PINCONF_SSP0_SCK_2 (PINCONF_FUNC2|PINCONF_PINS3|PINCONF_PIN_3) +#define PINCONF_SSP0_SCK_3 (PINCONF_FUNC4|PINCONF_PINS3|PINCONF_PIN_0) +#define PINCONF_SSP0_SSEL_1 (PINCONF_FUNC2|PINCONF_PINS3|PINCONF_PIN_6) +#define PINCONF_SSP0_SSEL_2 (PINCONF_FUNC2|PINCONF_PINSF|PINCONF_PIN_1) +#define PINCONF_SSP0_SSEL_3 (PINCONF_FUNC5|PINCONF_PINS1|PINCONF_PIN_0) +#define PINCONF_SSP0_SSEL_4 (PINCONF_FUNC5|PINCONF_PINS3|PINCONF_PIN_8) +#define PINCONF_SSP0_SSEL_5 (PINCONF_FUNC7|PINCONF_PINS9|PINCONF_PIN_0) + +#define PINCONF_SSP1_MISO_1 (PINCONF_FUNC1|PINCONF_PINS0|PINCONF_PIN_0) +#define PINCONF_SSP1_MISO_2 (PINCONF_FUNC2|PINCONF_PINSF|PINCONF_PIN_6) +#define PINCONF_SSP1_MISO_3 (PINCONF_FUNC5|PINCONF_PINS1|PINCONF_PIN_3) +#define PINCONF_SSP1_MOSI_1 (PINCONF_FUNC1|PINCONF_PINS0|PINCONF_PIN_1) +#define PINCONF_SSP1_MOSI_2 (PINCONF_FUNC2|PINCONF_PINSF|PINCONF_PIN_7) +#define PINCONF_SSP1_MOSI_3 (PINCONF_FUNC5|PINCONF_PINS1|PINCONF_PIN_4) +#define PINCONF_SSP1_SCK_1 (PINCONF_FUNC0|PINCONF_PINSF|PINCONF_PIN_4) +#define PINCONF_SSP1_SCK_2 (PINCONF_FUNC1|PINCONF_PINS1|PINCONF_PIN_19) +#define PINCONF_SSP1_SSEL_1 (PINCONF_FUNC1|PINCONF_PINS1|PINCONF_PIN_20) +#define PINCONF_SSP1_SSEL_2 (PINCONF_FUNC2|PINCONF_PINSF|PINCONF_PIN_5) +#define PINCONF_SSP1_SSEL_3 (PINCONF_FUNC5|PINCONF_PINS1|PINCONF_PIN_5) + +#define PINCONF_T0_CAP0_1 (PINCONF_FUNC4|PINCONF_PINS1|PINCONF_PIN_13) +#define PINCONF_T0_CAP0_2 (PINCONF_FUNC7|PINCONF_PINS8|PINCONF_PIN_4) +#define PINCONF_T0_CAP1_1 (PINCONF_FUNC4|PINCONF_PINS1|PINCONF_PIN_12) +#define PINCONF_T0_CAP1_2 (PINCONF_FUNC7|PINCONF_PINS8|PINCONF_PIN_5) +#define PINCONF_T0_CAP2_1 (PINCONF_FUNC4|PINCONF_PINS1|PINCONF_PIN_20) +#define PINCONF_T0_CAP2_2 (PINCONF_FUNC7|PINCONF_PINS8|PINCONF_PIN_6) +#define PINCONF_T0_CAP3_1 (PINCONF_FUNC4|PINCONF_PINS1|PINCONF_PIN_17) +#define PINCONF_T0_CAP3_2 (PINCONF_FUNC7|PINCONF_PINS8|PINCONF_PIN_7) +#define PINCONF_T0_MAT0_1 (PINCONF_FUNC4|PINCONF_PINS1|PINCONF_PIN_16) +#define PINCONF_T0_MAT0_2 (PINCONF_FUNC7|PINCONF_PINS8|PINCONF_PIN_0) +#define PINCONF_T0_MAT1_1 (PINCONF_FUNC4|PINCONF_PINS1|PINCONF_PIN_15) +#define PINCONF_T0_MAT1_2 (PINCONF_FUNC7|PINCONF_PINS8|PINCONF_PIN_1) +#define PINCONF_T0_MAT2_1 (PINCONF_FUNC4|PINCONF_PINS1|PINCONF_PIN_14) +#define PINCONF_T0_MAT2_2 (PINCONF_FUNC7|PINCONF_PINS8|PINCONF_PIN_2) +#define PINCONF_T0_MAT3_1 (PINCONF_FUNC4|PINCONF_PINS1|PINCONF_PIN_18) +#define PINCONF_T0_MAT3_2 (PINCONF_FUNC7|PINCONF_PINS8|PINCONF_PIN_3) + +#define PINCONF_T1_CAP0 (PINCONF_FUNC5|PINCONF_PINS5|PINCONF_PIN_0) +#define PINCONF_T1_CAP1 (PINCONF_FUNC5|PINCONF_PINS5|PINCONF_PIN_1) +#define PINCONF_T1_CAP2 (PINCONF_FUNC5|PINCONF_PINS5|PINCONF_PIN_2) +#define PINCONF_T1_CAP3 (PINCONF_FUNC5|PINCONF_PINS5|PINCONF_PIN_3) +#define PINCONF_T1_MAT0 (PINCONF_FUNC5|PINCONF_PINS5|PINCONF_PIN_4) +#define PINCONF_T1_MAT1 (PINCONF_FUNC5|PINCONF_PINS5|PINCONF_PIN_5) +#define PINCONF_T1_MAT2 (PINCONF_FUNC5|PINCONF_PINS5|PINCONF_PIN_6) +#define PINCONF_T1_MAT3 (PINCONF_FUNC5|PINCONF_PINS5|PINCONF_PIN_7) + +#define PINCONF_T2_CAP0 (PINCONF_FUNC5|PINCONF_PINS6|PINCONF_PIN_1) +#define PINCONF_T2_CAP1 (PINCONF_FUNC5|PINCONF_PINS6|PINCONF_PIN_2) +#define PINCONF_T2_CAP2 (PINCONF_FUNC5|PINCONF_PINS6|PINCONF_PIN_3) +#define PINCONF_T2_CAP3 (PINCONF_FUNC5|PINCONF_PINS6|PINCONF_PIN_6) +#define PINCONF_T2_MAT0 (PINCONF_FUNC5|PINCONF_PINS6|PINCONF_PIN_7) +#define PINCONF_T2_MAT1 (PINCONF_FUNC5|PINCONF_PINS6|PINCONF_PIN_8) +#define PINCONF_T2_MAT2 (PINCONF_FUNC5|PINCONF_PINS6|PINCONF_PIN_9) +#define PINCONF_T2_MAT3 (PINCONF_FUNC5|PINCONF_PINS6|PINCONF_PIN_11) + +#define PINCONF_T3_CAP0_1 (PINCONF_FUNC6|PINCONF_PINS2|PINCONF_PIN_0) +#define PINCONF_T3_CAP0_2 (PINCONF_FUNC6|PINCONF_PINSC|PINCONF_PIN_1) +#define PINCONF_T3_CAP1_1 (PINCONF_FUNC6|PINCONF_PINS2|PINCONF_PIN_1) +#define PINCONF_T3_CAP1_2 (PINCONF_FUNC6|PINCONF_PINSC|PINCONF_PIN_4) +#define PINCONF_T3_CAP2_1 (PINCONF_FUNC6|PINCONF_PINS2|PINCONF_PIN_2) +#define PINCONF_T3_CAP2_2 (PINCONF_FUNC6|PINCONF_PINSC|PINCONF_PIN_5) +#define PINCONF_T3_CAP3_1 (PINCONF_FUNC6|PINCONF_PINS2|PINCONF_PIN_6) +#define PINCONF_T3_CAP3_2 (PINCONF_FUNC6|PINCONF_PINSC|PINCONF_PIN_6) +#define PINCONF_T3_MAT0_1 (PINCONF_FUNC6|PINCONF_PINS2|PINCONF_PIN_3) +#define PINCONF_T3_MAT0_2 (PINCONF_FUNC6|PINCONF_PINSC|PINCONF_PIN_7) +#define PINCONF_T3_MAT1_1 (PINCONF_FUNC6|PINCONF_PINS2|PINCONF_PIN_4) +#define PINCONF_T3_MAT1_2 (PINCONF_FUNC6|PINCONF_PINSC|PINCONF_PIN_8) +#define PINCONF_T3_MAT2_1 (PINCONF_FUNC6|PINCONF_PINS2|PINCONF_PIN_5) +#define PINCONF_T3_MAT2_2 (PINCONF_FUNC6|PINCONF_PINSC|PINCONF_PIN_9) +#define PINCONF_T3_MAT3_1 (PINCONF_FUNC6|PINCONF_PINS2|PINCONF_PIN_7) +#define PINCONF_T3_MAT3_2 (PINCONF_FUNC6|PINCONF_PINSC|PINCONF_PIN_10) + +#define PINCONF_TRACECLK (PINCONF_FUNC2|PINCONF_PINSF|PINCONF_PIN_4) +#define PINCONF_TRACEDATA0_1 (PINCONF_FUNC3|PINCONF_PINSF|PINCONF_PIN_5) +#define PINCONF_TRACEDATA0_2 (PINCONF_FUNC5|PINCONF_PINS7|PINCONF_PIN_4) +#define PINCONF_TRACEDATA1_1 (PINCONF_FUNC3|PINCONF_PINSF|PINCONF_PIN_6) +#define PINCONF_TRACEDATA1_2 (PINCONF_FUNC5|PINCONF_PINS7|PINCONF_PIN_5) +#define PINCONF_TRACEDATA2_1 (PINCONF_FUNC3|PINCONF_PINSF|PINCONF_PIN_7) +#define PINCONF_TRACEDATA2_2 (PINCONF_FUNC5|PINCONF_PINS7|PINCONF_PIN_6) +#define PINCONF_TRACEDATA3_1 (PINCONF_FUNC3|PINCONF_PINSF|PINCONF_PIN_8) +#define PINCONF_TRACEDATA3_2 (PINCONF_FUNC5|PINCONF_PINS7|PINCONF_PIN_7) + +#define PINCONF_U0_DIR_1 (PINCONF_FUNC1|PINCONF_PULLUP|PINCONF_INBUFFER|PINCONF_PINS2|PINCONF_PIN_6) +#define PINCONF_U0_DIR_2 (PINCONF_FUNC1|PINCONF_PULLUP|PINCONF_INBUFFER|PINCONF_PINSF|PINCONF_PIN_9) +#define PINCONF_U0_DIR_3 (PINCONF_FUNC2|PINCONF_PULLUP|PINCONF_INBUFFER|PINCONF_PINS6|PINCONF_PIN_2) +#define PINCONF_U0_RXD_1 (PINCONF_FUNC1|PINCONF_PULLUP|PINCONF_INBUFFER|PINCONF_PINS2|PINCONF_PIN_1) +#define PINCONF_U0_RXD_2 (PINCONF_FUNC1|PINCONF_PULLUP|PINCONF_INBUFFER|PINCONF_PINSF|PINCONF_PIN_11) +#define PINCONF_U0_RXD_3 (PINCONF_FUNC2|PINCONF_PULLUP|PINCONF_INBUFFER|PINCONF_PINS6|PINCONF_PIN_5) +#define PINCONF_U0_RXD_4 (PINCONF_FUNC7|PINCONF_PULLUP|PINCONF_INBUFFER|PINCONF_PINS9|PINCONF_PIN_6) +#define PINCONF_U0_TXD_1 (PINCONF_FUNC1|PINCONF_PULLUP|PINCONF_INBUFFER|PINCONF_PINS2|PINCONF_PIN_0) +#define PINCONF_U0_TXD_2 (PINCONF_FUNC1|PINCONF_PULLUP|PINCONF_INBUFFER|PINCONF_PINSF|PINCONF_PIN_10) +#define PINCONF_U0_TXD_3 (PINCONF_FUNC2|PINCONF_PULLUP|PINCONF_INBUFFER|PINCONF_PINS6|PINCONF_PIN_4) +#define PINCONF_U0_TXD_4 (PINCONF_FUNC7|PINCONF_PULLUP|PINCONF_INBUFFER|PINCONF_PINS9|PINCONF_PIN_5) +#define PINCONF_U0_UCLK_1 (PINCONF_FUNC1|PINCONF_PULLUP|PINCONF_INBUFFER|PINCONF_PINS2|PINCONF_PIN_2) +#define PINCONF_U0_UCLK_2 (PINCONF_FUNC1|PINCONF_PULLUP|PINCONF_INBUFFER|PINCONF_PINSF|PINCONF_PIN_8) +#define PINCONF_U0_UCLK_3 (PINCONF_FUNC2|PINCONF_PULLUP|PINCONF_INBUFFER|PINCONF_PINS6|PINCONF_PIN_1) + +#define PINCONF_U1_CTS_1 (PINCONF_FUNC1|PINCONF_PULLUP|PINCONF_INBUFFER|PINCONF_PINS1|PINCONF_PIN_11) +#define PINCONF_U1_CTS_2 (PINCONF_FUNC2|PINCONF_PULLUP|PINCONF_INBUFFER|PINCONF_PINSC|PINCONF_PIN_2) +#define PINCONF_U1_CTS_3 (PINCONF_FUNC2|PINCONF_PULLUP|PINCONF_INBUFFER|PINCONF_PINSE|PINCONF_PIN_7) +#define PINCONF_U1_CTS_4 (PINCONF_FUNC4|PINCONF_PULLUP|PINCONF_INBUFFER|PINCONF_PINS5|PINCONF_PIN_4) +#define PINCONF_U1_DCD_1 (PINCONF_FUNC1|PINCONF_PULLUP|PINCONF_INBUFFER|PINCONF_PINS1|PINCONF_PIN_12) +#define PINCONF_U1_DCD_2 (PINCONF_FUNC2|PINCONF_PULLUP|PINCONF_INBUFFER|PINCONF_PINSC|PINCONF_PIN_11) +#define PINCONF_U1_DCD_3 (PINCONF_FUNC2|PINCONF_PULLUP|PINCONF_INBUFFER|PINCONF_PINSE|PINCONF_PIN_9) +#define PINCONF_U1_DCD_4 (PINCONF_FUNC4|PINCONF_PULLUP|PINCONF_INBUFFER|PINCONF_PINS5|PINCONF_PIN_5) +#define PINCONF_U1_DSR_1 (PINCONF_FUNC1|PINCONF_PULLUP|PINCONF_INBUFFER|PINCONF_PINS1|PINCONF_PIN_7) +#define PINCONF_U1_DSR_2 (PINCONF_FUNC2|PINCONF_PULLUP|PINCONF_INBUFFER|PINCONF_PINSC|PINCONF_PIN_10) +#define PINCONF_U1_DSR_3 (PINCONF_FUNC2|PINCONF_PULLUP|PINCONF_INBUFFER|PINCONF_PINSE|PINCONF_PIN_8) +#define PINCONF_U1_DSR_4 (PINCONF_FUNC4|PINCONF_PULLUP|PINCONF_INBUFFER|PINCONF_PINS5|PINCONF_PIN_0) +#define PINCONF_U1_DTR_1 (PINCONF_FUNC1|PINCONF_PULLUP|PINCONF_INBUFFER|PINCONF_PINS1|PINCONF_PIN_8) +#define PINCONF_U1_DTR_2 (PINCONF_FUNC2|PINCONF_PULLUP|PINCONF_INBUFFER|PINCONF_PINSC|PINCONF_PIN_12) +#define PINCONF_U1_DTR_3 (PINCONF_FUNC2|PINCONF_PULLUP|PINCONF_INBUFFER|PINCONF_PINSE|PINCONF_PIN_10) +#define PINCONF_U1_DTR_4 (PINCONF_FUNC4|PINCONF_PULLUP|PINCONF_INBUFFER|PINCONF_PINS5|PINCONF_PIN_1) +#define PINCONF_U1_RI_1 (PINCONF_FUNC1|PINCONF_PULLUP|PINCONF_INBUFFER|PINCONF_PINS1|PINCONF_PIN_10) +#define PINCONF_U1_RI_2 (PINCONF_FUNC2|PINCONF_PULLUP|PINCONF_INBUFFER|PINCONF_PINSC|PINCONF_PIN_1) +#define PINCONF_U1_RI_3 (PINCONF_FUNC2|PINCONF_PULLUP|PINCONF_INBUFFER|PINCONF_PINSE|PINCONF_PIN_6) +#define PINCONF_U1_RI_4 (PINCONF_FUNC4|PINCONF_PULLUP|PINCONF_INBUFFER|PINCONF_PINS5|PINCONF_PIN_3) +#define PINCONF_U1_RTS_1 (PINCONF_FUNC1|PINCONF_PULLUP|PINCONF_INBUFFER|PINCONF_PINS1|PINCONF_PIN_9) +#define PINCONF_U1_RTS_2 (PINCONF_FUNC2|PINCONF_PULLUP|PINCONF_INBUFFER|PINCONF_PINSC|PINCONF_PIN_3) +#define PINCONF_U1_RTS_3 (PINCONF_FUNC2|PINCONF_PULLUP|PINCONF_INBUFFER|PINCONF_PINSE|PINCONF_PIN_5) +#define PINCONF_U1_RTS_4 (PINCONF_FUNC4|PINCONF_PULLUP|PINCONF_INBUFFER|PINCONF_PINS5|PINCONF_PIN_2) +#define PINCONF_U1_RXD_1 (PINCONF_FUNC1|PINCONF_PULLUP|PINCONF_INBUFFER|PINCONF_PINS1|PINCONF_PIN_14) +#define PINCONF_U1_RXD_2 (PINCONF_FUNC2|PINCONF_PULLUP|PINCONF_INBUFFER|PINCONF_PINSC|PINCONF_PIN_14) +#define PINCONF_U1_RXD_3 (PINCONF_FUNC2|PINCONF_PULLUP|PINCONF_INBUFFER|PINCONF_PINSE|PINCONF_PIN_12) +#define PINCONF_U1_RXD_4 (PINCONF_FUNC4|PINCONF_PULLUP|PINCONF_INBUFFER|PINCONF_PINS3|PINCONF_PIN_5) +#define PINCONF_U1_RXD_5 (PINCONF_FUNC4|PINCONF_PULLUP|PINCONF_INBUFFER|PINCONF_PINS5|PINCONF_PIN_7) +#define PINCONF_U1_TXD_1 (PINCONF_FUNC1|PINCONF_PULLUP|PINCONF_INBUFFER|PINCONF_PINS1|PINCONF_PIN_13) +#define PINCONF_U1_TXD_2 (PINCONF_FUNC2|PINCONF_PULLUP|PINCONF_INBUFFER|PINCONF_PINSC|PINCONF_PIN_13) +#define PINCONF_U1_TXD_3 (PINCONF_FUNC2|PINCONF_PULLUP|PINCONF_INBUFFER|PINCONF_PINSE|PINCONF_PIN_11) +#define PINCONF_U1_TXD_4 (PINCONF_FUNC4|PINCONF_PULLUP|PINCONF_INBUFFER|PINCONF_PINS3|PINCONF_PIN_4) +#define PINCONF_U1_TXD_5 (PINCONF_FUNC4|PINCONF_PULLUP|PINCONF_INBUFFER|PINCONF_PINS5|PINCONF_PIN_6) + +#define PINCONF_U2_DIR_1 (PINCONF_FUNC1|PINCONF_PINS1|PINCONF_PIN_18) +#define PINCONF_U2_DIR_2 (PINCONF_FUNC7|PINCONF_PINS2|PINCONF_PIN_13) +#define PINCONF_U2_RXD_1 (PINCONF_FUNC1|PINCONF_PINS1|PINCONF_PIN_16) +#define PINCONF_U2_RXD_2 (PINCONF_FUNC2|PINCONF_PINS2|PINCONF_PIN_11) +#define PINCONF_U2_RXD_3 (PINCONF_FUNC3|PINCONF_PINSA|PINCONF_PIN_2) +#define PINCONF_U2_RXD_4 (PINCONF_FUNC6|PINCONF_PINS7|PINCONF_PIN_2) +#define PINCONF_U2_TXD_1 (PINCONF_FUNC1|PINCONF_PINS1|PINCONF_PIN_15) +#define PINCONF_U2_TXD_2 (PINCONF_FUNC2|PINCONF_PINS2|PINCONF_PIN_10) +#define PINCONF_U2_TXD_3 (PINCONF_FUNC3|PINCONF_PINSA|PINCONF_PIN_1) +#define PINCONF_U2_TXD_4 (PINCONF_FUNC6|PINCONF_PINS7|PINCONF_PIN_1) +#define PINCONF_U2_UCLK_1 (PINCONF_FUNC1|PINCONF_PINS1|PINCONF_PIN_17) +#define PINCONF_U2_UCLK_2 (PINCONF_FUNC7|PINCONF_PINS2|PINCONF_PIN_12) + +#define PINCONF_U3_BAUD_1 (PINCONF_FUNC1|PINCONF_PINSF|PINCONF_PIN_7) +#define PINCONF_U3_BAUD_2 (PINCONF_FUNC2|PINCONF_PINS2|PINCONF_PIN_9) +#define PINCONF_U3_BAUD_3 (PINCONF_FUNC6|PINCONF_PINS4|PINCONF_PIN_3) +#define PINCONF_U3_DIR_1 (PINCONF_FUNC1|PINCONF_PINSF|PINCONF_PIN_6) +#define PINCONF_U3_DIR_2 (PINCONF_FUNC2|PINCONF_PINS2|PINCONF_PIN_8) +#define PINCONF_U3_DIR_3 (PINCONF_FUNC6|PINCONF_PINS4|PINCONF_PIN_4) +#define PINCONF_U3_RXD_1 (PINCONF_FUNC1|PINCONF_PINSF|PINCONF_PIN_3) +#define PINCONF_U3_RXD_2 (PINCONF_FUNC2|PINCONF_PINS2|PINCONF_PIN_4) +#define PINCONF_U3_RXD_3 (PINCONF_FUNC6|PINCONF_PINS4|PINCONF_PIN_2) +#define PINCONF_U3_RXD_4 (PINCONF_FUNC7|PINCONF_PINS9|PINCONF_PIN_4) +#define PINCONF_U3_TXD_1 (PINCONF_FUNC1|PINCONF_PINSF|PINCONF_PIN_2) +#define PINCONF_U3_TXD_2 (PINCONF_FUNC2|PINCONF_PINS2|PINCONF_PIN_3) +#define PINCONF_U3_TXD_3 (PINCONF_FUNC6|PINCONF_PINS4|PINCONF_PIN_1) +#define PINCONF_U3_TXD_4 (PINCONF_FUNC7|PINCONF_PINS9|PINCONF_PIN_3) +#define PINCONF_U3_UCLK_1 (PINCONF_FUNC1|PINCONF_PINSF|PINCONF_PIN_5) +#define PINCONF_U3_UCLK_2 (PINCONF_FUNC2|PINCONF_PINS2|PINCONF_PIN_7) +#define PINCONF_U3_UCLK_3 (PINCONF_FUNC6|PINCONF_PINS4|PINCONF_PIN_0) + +#define PINCONF_USB0_IND0_1 (PINCONF_FUNC1|PINCONF_PINS8|PINCONF_PIN_2) +#define PINCONF_USB0_IND0_2 (PINCONF_FUNC3|PINCONF_PINS2|PINCONF_PIN_6) +#define PINCONF_USB0_IND0_3 (PINCONF_FUNC3|PINCONF_PINS6|PINCONF_PIN_8) +#define PINCONF_USB0_IND0_4 (PINCONF_FUNC4|PINCONF_PINS1|PINCONF_PIN_4) +#define PINCONF_USB0_IND0_5 (PINCONF_FUNC7|PINCONF_PINS2|PINCONF_PIN_5) +#define PINCONF_USB0_IND1_1 (PINCONF_FUNC1|PINCONF_PINS8|PINCONF_PIN_1) +#define PINCONF_USB0_IND1_2 (PINCONF_FUNC3|PINCONF_PINS2|PINCONF_PIN_2) +#define PINCONF_USB0_IND1_3 (PINCONF_FUNC3|PINCONF_PINS6|PINCONF_PIN_7) +#define PINCONF_USB0_IND1_4 (PINCONF_FUNC4|PINCONF_PINS1|PINCONF_PIN_3) +#define PINCONF_USB0_PPWR_1 (PINCONF_FUNC1|PINCONF_PINS6|PINCONF_PIN_3) +#define PINCONF_USB0_PPWR_2 (PINCONF_FUNC3|PINCONF_PINS2|PINCONF_PIN_0) +#define PINCONF_USB0_PPWR_3 (PINCONF_FUNC4|PINCONF_PINS1|PINCONF_PIN_7) +#define PINCONF_USB0_PPWR_4 (PINCONF_FUNC7|PINCONF_PINS2|PINCONF_PIN_3) +#define PINCONF_USB0_PWR_FAULT_1 (PINCONF_FUNC1|PINCONF_PINS8|PINCONF_PIN_0) +#define PINCONF_USB0_PWR_FAULT_2 (PINCONF_FUNC3|PINCONF_PINS2|PINCONF_PIN_1) +#define PINCONF_USB0_PWR_FAULT_3 (PINCONF_FUNC3|PINCONF_PINS6|PINCONF_PIN_6) +#define PINCONF_USB0_PWR_FAULT_4 (PINCONF_FUNC4|PINCONF_PINS1|PINCONF_PIN_5) +#define PINCONF_USB0_PWR_FAULT_5 (PINCONF_FUNC7|PINCONF_PINS2|PINCONF_PIN_4) + +#define PINCONF_USB1_IND0_1 (PINCONF_FUNC2|PINCONF_PINS9|PINCONF_PIN_4) +#define PINCONF_USB1_IND0_2 (PINCONF_FUNC3|PINCONF_PINS3|PINCONF_PIN_2) +#define PINCONF_USB1_IND1_1 (PINCONF_FUNC2|PINCONF_PINS9|PINCONF_PIN_3) +#define PINCONF_USB1_IND1_2 (PINCONF_FUNC3|PINCONF_PINS3|PINCONF_PIN_1) +#define PINCONF_USB1_PPWR (PINCONF_FUNC2|PINCONF_PINS9|PINCONF_PIN_5) +#define PINCONF_USB1_PWR_FAULT (PINCONF_FUNC2|PINCONF_PINS9|PINCONF_PIN_6) +#define PINCONF_USB1_ULPI_CLK_1 (PINCONF_FUNC1|PINCONF_PINS8|PINCONF_PIN_8) +#define PINCONF_USB1_ULPI_CLK_2 (PINCONF_FUNC1|PINCONF_PINSC|PINCONF_PIN_0) +#define PINCONF_USB1_ULPI_D0_1 (PINCONF_FUNC1|PINCONF_PINS8|PINCONF_PIN_5) +#define PINCONF_USB1_ULPI_D0_2 (PINCONF_FUNC1|PINCONF_PINSC|PINCONF_PIN_8) +#define PINCONF_USB1_ULPI_D0_3 (PINCONF_FUNC5|PINCONF_PINSD|PINCONF_PIN_11) +#define PINCONF_USB1_ULPI_D1_1 (PINCONF_FUNC1|PINCONF_PINS8|PINCONF_PIN_4) +#define PINCONF_USB1_ULPI_D1_2 (PINCONF_FUNC1|PINCONF_PINSC|PINCONF_PIN_7) +#define PINCONF_USB1_ULPI_D2_1 (PINCONF_FUNC1|PINCONF_PINS8|PINCONF_PIN_3) +#define PINCONF_USB1_ULPI_D2_2 (PINCONF_FUNC1|PINCONF_PINSC|PINCONF_PIN_6) +#define PINCONF_USB1_ULPI_D3_1 (PINCONF_FUNC1|PINCONF_PINSB|PINCONF_PIN_6) +#define PINCONF_USB1_ULPI_D3_2 (PINCONF_FUNC1|PINCONF_PINSC|PINCONF_PIN_5) +#define PINCONF_USB1_ULPI_D4_1 (PINCONF_FUNC1|PINCONF_PINSB|PINCONF_PIN_5) +#define PINCONF_USB1_ULPI_D4_2 (PINCONF_FUNC1|PINCONF_PINSC|PINCONF_PIN_4) +#define PINCONF_USB1_ULPI_D5_1 (PINCONF_FUNC0|PINCONF_PINSC|PINCONF_PIN_3) +#define PINCONF_USB1_ULPI_D5_2 (PINCONF_FUNC1|PINCONF_PINSB|PINCONF_PIN_4) +#define PINCONF_USB1_ULPI_D6_1 (PINCONF_FUNC0|PINCONF_PINSC|PINCONF_PIN_2) +#define PINCONF_USB1_ULPI_D6_2 (PINCONF_FUNC1|PINCONF_PINSB|PINCONF_PIN_3) +#define PINCONF_USB1_ULPI_D7_1 (PINCONF_FUNC0|PINCONF_PINSC|PINCONF_PIN_1) +#define PINCONF_USB1_ULPI_D7_2 (PINCONF_FUNC1|PINCONF_PINSB|PINCONF_PIN_2) +#define PINCONF_USB1_ULPI_DIR_1 (PINCONF_FUNC1|PINCONF_PINSB|PINCONF_PIN_1) +#define PINCONF_USB1_ULPI_DIR_2 (PINCONF_FUNC1|PINCONF_PINSC|PINCONF_PIN_11) +#define PINCONF_USB1_ULPI_NXT_1 (PINCONF_FUNC1|PINCONF_PINS8|PINCONF_PIN_6) +#define PINCONF_USB1_ULPI_NXT_2 (PINCONF_FUNC1|PINCONF_PINSC|PINCONF_PIN_9) +#define PINCONF_USB1_ULPI_STP_1 (PINCONF_FUNC1|PINCONF_PINS8|PINCONF_PIN_7) +#define PINCONF_USB1_ULPI_STP_2 (PINCONF_FUNC1|PINCONF_PINSC|PINCONF_PIN_10) +#define PINCONF_USB1_VBUS (PINCONF_FUNC2|PINCONF_PINS2|PINCONF_PIN_5) + +#define CLKCONF_CGU_OUT0 (PINCONFIG_DIGITAL|PINCONF_FUNC5|PINCONF_CLK1) +#define CLKCONF_CGU_OUT1 (PINCONFIG_DIGITAL|PINCONF_FUNC5|PINCONF_CLK3) +#define CLKCONF_CLKOUT_1 (PINCONFIG_DIGITAL|PINCONF_FUNC1|PINCONF_CLK0) +#define CLKCONF_CLKOUT_2 (PINCONFIG_DIGITAL|PINCONF_FUNC1|PINCONF_CLK1) +#define CLKCONF_CLKOUT_3 (PINCONFIG_DIGITAL|PINCONF_FUNC1|PINCONF_CLK2) +#define CLKCONF_CLKOUT_4 (PINCONFIG_DIGITAL|PINCONF_FUNC1|PINCONF_CLK3) +#define CLKCONF_EMC_CLK0 (PINCONFIG_DIGITAL|PINCONF_FUNC0|PINCONF_CLK0) +#define CLKCONF_EMC_CLK01 (PINCONFIG_DIGITAL|PINCONF_FUNC5|PINCONF_CLK0) +#define CLKCONF_EMC_CLK1 (PINCONFIG_DIGITAL|PINCONF_FUNC0|PINCONF_CLK1) +#define CLKCONF_EMC_CLK2 (PINCONFIG_DIGITAL|PINCONF_FUNC0|PINCONF_CLK3) +#define CLKCONF_EMC_CLK23 (PINCONFIG_DIGITAL|PINCONF_FUNC5|PINCONF_CLK2) +#define CLKCONF_EMC_CLK3 (PINCONFIG_DIGITAL|PINCONF_FUNC0|PINCONF_CLK2) +#define CLKCONF_ENET_REF_CLK (PINCONFIG_DIGITAL|PINCONF_FUNC7|PINCONF_CLK0) +#define CLKCONF_ENET_TX_CLK (PINCONFIG_DIGITAL|PINCONF_FUNC7|PINCONF_CLK0) +#define CLKCONF_I2S0_TX_MCLK (PINCONFIG_DIGITAL|PINCONF_FUNC6|PINCONF_CLK2) +#define CLKCONF_I2S1_RX_SCK_1 (PINCONFIG_DIGITAL|PINCONF_FUNC7|PINCONF_CLK2) +#define CLKCONF_I2S1_RX_SCK_2 (PINCONFIG_DIGITAL|PINCONF_FUNC7|PINCONF_CLK3) +#define CLKCONF_I2S1_TX_MCLK (PINCONFIG_DIGITAL|PINCONF_FUNC7|PINCONF_CLK1) +#define CLKCONF_SD_CLK_1 (PINCONFIG_DIGITAL|PINCONF_FUNC4|PINCONF_CLK0) +#define CLKCONF_SD_CLK_2 (PINCONFIG_DIGITAL|PINCONF_FUNC4|PINCONF_CLK2) +#define CLKCONF_SSP1_SCK (PINCONFIG_DIGITAL|PINCONF_FUNC6|PINCONF_CLK0) + +/**************************************************************************************************** + * Public Types + ****************************************************************************************************/ + +/**************************************************************************************************** + * Public Data + ****************************************************************************************************/ + +/**************************************************************************************************** + * Public Functions + ****************************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_LPC43XX_CHIP_LPC4337JET100_PINCONF_H */ diff --git a/arch/arm/src/lpc43xx/chip/lpc43_aes.h b/arch/arm/src/lpc43xx/chip/lpc43_aes.h index e5f66d5f1ff..fbd557f3d48 100644 --- a/arch/arm/src/lpc43xx/chip/lpc43_aes.h +++ b/arch/arm/src/lpc43xx/chip/lpc43_aes.h @@ -1,7 +1,7 @@ /************************************************************************************ * arch/arm/src/lpc43xx/chip/lpc43_aes.h * - * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2012, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -45,6 +45,7 @@ /************************************************************************************ * Pre-processor Definitions ************************************************************************************/ + /* The AES is controlled through a set of simple API calls located in the LPC43xx * ROM. This value holds the pointer to the AES driver table. */ @@ -86,17 +87,32 @@ struct lpc43_aes_s /* Loads 128-bit AES software defined user key (16 bytes) */ - void (*aes_LoadKeySW)(unsigned char *key); + void (*aes_LoadKeySW)(const unsigned char *key); /* Loads 128-bit AES initialization vector (16 bytes) */ - void (*aes_LoadIV_SW)(unsigned char *iv); + void (*aes_LoadIV_SW)(const unsigned char *iv); /* Loads 128-bit AES IC specific initialization vector, which is used to decrypt * a boot image. */ void (*aes_LoadIV_IC)(void); + + /* Process data */ + + unsigned int (*aes_Operate)(unsigned char* out, const unsigned char* in, unsigned blocks); +}; + +enum lpc43_aes_errorcodes_e +{ + AES_API_ERR_BASE = 0x30000, + AES_API_ERR_WRONG_CMD, + AES_API_ERR_NOT_SUPPORTED, + AES_API_ERR_KEY_ALREADY_PROGRAMMED, + AES_API_ERR_DMA_CHANNEL_CFG, + AES_API_ERR_DMA_MUX_CFG, + AES_API_ERR_DMA_BUSY }; /************************************************************************************ diff --git a/arch/arm/src/lpc43xx/lpc43_adc.c b/arch/arm/src/lpc43xx/lpc43_adc.c index 487c0b5cf37..4286451f11e 100644 --- a/arch/arm/src/lpc43xx/lpc43_adc.c +++ b/arch/arm/src/lpc43xx/lpc43_adc.c @@ -7,8 +7,9 @@ * Ported from from the LPC17 version: * * Copyright(C) 2011 Li Zhuoyi. All rights reserved. + * Copyright(C) 2016 Gregory Nutt. All rights reserved. * Author: Li Zhuoyi - * History: 0.1 2011-08-05 initial version + * Gregory Nutt * * This file is a part of NuttX: * @@ -55,6 +56,7 @@ #include #include #include +#include #include #include @@ -112,6 +114,7 @@ struct up_dev_s { + FAR const struct adc_callback_s *cb; uint8_t mask; uint8_t mask_int; uint32_t freq; @@ -126,6 +129,8 @@ struct up_dev_s /* ADC methods */ +static int adc_bind(FAR struct adc_dev_s *dev, + FAR const struct adc_callback_s *callback); static void adc_reset(FAR struct adc_dev_s *dev); static int adc_setup(FAR struct adc_dev_s *dev); static void adc_shutdown(FAR struct adc_dev_s *dev); @@ -139,6 +144,7 @@ static int adc_interrupt(int irq, void *context); static const struct adc_ops_s g_adcops = { + .ao_bind = adc_bind, .ao_reset = adc_reset, .ao_setup = adc_setup, .ao_shutdown = adc_shutdown, @@ -166,6 +172,25 @@ static struct adc_dev_s g_adcdev = * Private Functions ****************************************************************************/ +/**************************************************************************** + * Name: adc_bind + * + * Description: + * Bind the upper-half driver callbacks to the lower-half implementation. This + * must be called early in order to receive ADC event notifications. + * + ****************************************************************************/ + +static int adc_bind(FAR struct adc_dev_s *dev, + FAR const struct adc_callback_s *callback) +{ + FAR struct up_dev_s *priv = (FAR struct up_dev_s *)dev->ad_priv; + + DEBUGASSERT(priv != NULL); + priv->cb = callback; + return OK; +} + /**************************************************************************** * Name: adc_reset * @@ -454,8 +479,20 @@ static int adc_interrupt(int irq, void *context) { if (priv->mask & (1 << i)) { + int32_t data; + regval = getreg32(LPC43_ADC0_DR(i)); - adc_receive(&g_adcdev, i,(regval&ADC_DR_VVREF_MASK)>>ADC_DR_VVREF_SHIFT); + data = (regval & ADC_DR_VVREF_MASK) >> ADC_DR_VVREF_SHIFT; + + /* Verify that the upper-half driver has bound its callback functions */ + + if (priv->cb != NULL) + { + /* Perform the data received callback */ + + DEBUGASSERT(priv->cb->au_receive != NULL); + priv->cb->au_receive(&g_adcdev, i, data); + } } } diff --git a/arch/arm/src/lpc43xx/lpc43_aes.c b/arch/arm/src/lpc43xx/lpc43_aes.c new file mode 100644 index 00000000000..3f9af5ada39 --- /dev/null +++ b/arch/arm/src/lpc43xx/lpc43_aes.c @@ -0,0 +1,209 @@ +/**************************************************************************** + * arch/arm/src/lpc43xx/lpc43_aes.c + * + * Copyright (C) 2015 Gregory Nutt. All rights reserved. + * Author: Alexander Vasiljev + * + * 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. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "up_internal.h" +#include "up_arch.h" + +#include "chip.h" +#include + +#define AES_BLOCK_SIZE 16 + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +static struct lpc43_aes_s *g_aes; + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +int aes_cypher(void *out, const void *in, uint32_t size, const void *iv, + const void *key, uint32_t keysize, int mode, int encrypt) +{ + unsigned int ret = 0; + uint32_t outl = size; + + ret = aes_init(iv, key, keysize, mode, encrypt); + + if (ret != OK) + { + return ret; + } + + return aes_update(out, &outl, in, size); +} + +int up_aesreset(void) +{ + return OK; +} + +int aes_init(FAR const void *iv, FAR const void *key, uint32_t keysize, + int mode, int encrypt) +{ + unsigned int cmd = 0; + unsigned int ret = 0; + + if (g_aes == NULL) + { + return -ENOSYS; + } + + /* The LPC43 aes engine can load two keys from otp and one random + * generated key. This behavior doesn't fit current api. So if + * key == NULL, we will usr keysize as identifier of the special key. + */ + + if (keysize != 16 && key) + { + return -EINVAL; + } + + if (mode != AES_MODE_ECB && mode != AES_MODE_CBC) + { + return -EINVAL; + } + + if (encrypt == CYPHER_ENCRYPT) + { + cmd = mode == AES_MODE_ECB ? AES_API_CMD_ENCODE_ECB : AES_API_CMD_ENCODE_CBC; + } + else + { + cmd = mode == AES_MODE_ECB ? AES_API_CMD_DECODE_ECB : AES_API_CMD_DECODE_CBC; + } + + g_aes->aes_Init(); + + if (key != NULL) + { + g_aes->aes_LoadKeySW(key); + } + else + { + switch (keysize) + { + case 0: + g_aes->aes_LoadKey1(); + break; + + case 1: + g_aes->aes_LoadKey2(); + break; + + case 2: + g_aes->aes_LoadKeyRNG(); + break; + } + } + + g_aes->aes_LoadIV_SW((const unsigned char*)iv); + + ret = g_aes->aes_SetMode(cmd); + switch (ret) + { + case AES_API_ERR_WRONG_CMD: + case AES_API_ERR_NOT_SUPPORTED: + case AES_API_ERR_KEY_ALREADY_PROGRAMMED: + ret = -EINVAL; + break; + + case AES_API_ERR_DMA_CHANNEL_CFG: + case AES_API_ERR_DMA_MUX_CFG: + case AES_API_ERR_DMA_BUSY: + ret = -EBUSY; + break; + } + + return 0; +} + +int aes_update(FAR const void *out, uint32_t *outl, FAR const void *in, + uint32_t inl) +{ + if (g_aes == NULL) + { + return -ENOSYS; + } + + if ((inl & (AES_BLOCK_SIZE-1)) != 0) + { + return -EINVAL; + } + + if (inl > *outl) + { + return -EINVAL; + } + + return g_aes->aes_Operate((unsigned char*)out, + (unsigned char*)in, inl / 16); +} + +int up_aesinitialize(void) +{ + g_aes = (struct lpc43_g_aes*)*((uint32_t*)LPC43_ROM_AES_DRIVER_TABLE); + if (g_aes != NULL) + { + return OK; + } + + return -ENOSYS; +} + +int up_aesuninitialize(void) +{ + return OK; +} diff --git a/arch/arm/src/nuc1xx/Kconfig b/arch/arm/src/nuc1xx/Kconfig index 50cddcbdee1..3571b4b6260 100644 --- a/arch/arm/src/nuc1xx/Kconfig +++ b/arch/arm/src/nuc1xx/Kconfig @@ -314,20 +314,20 @@ config NUC_PWM7 config NUC_UART0 bool "UART0" default y - select ARCH_HAVE_UART0 + select UART0_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config NUC_UART1 bool "UART1" default n - select ARCH_HAVE_UART1 + select UART1_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config NUC_UART2 bool "UART2" default n depends on NUC_HAVE_UART2 - select ARCH_HAVE_UART2 + select UART2_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config NUC_USBD diff --git a/arch/arm/src/sam34/Kconfig b/arch/arm/src/sam34/Kconfig index bb400e649ce..b704da5674f 100644 --- a/arch/arm/src/sam34/Kconfig +++ b/arch/arm/src/sam34/Kconfig @@ -453,7 +453,7 @@ config SAM34_PICOUART bool "PicoUART" default n depends on ARCH_CHIP_SAM4L - select ARCH_HAVE_UART + select UART_SERIALDRIVER config SAM34_PWM bool "Pulse Width Modulation (PWM) Controller" @@ -609,14 +609,14 @@ config SAM34_UART0 bool "UART 0" default y depends on ARCH_CHIP_SAM3U || ARCH_CHIP_SAM3X || ARCH_CHIP_SAM3A || ARCH_CHIP_SAM4CM || ARCH_CHIP_SAM4S || ARCH_CHIP_SAM4E - select ARCH_HAVE_UART0 + select UART0_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config SAM34_UART1 bool "UART 1" default n depends on ARCH_CHIP_SAM4CM || ARCH_CHIP_SAM4S || ARCH_CHIP_SAM4E - select ARCH_HAVE_UART1 + select UART1_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS if SAM34_UART1 && ARCH_CHIP_SAM4CM @@ -651,27 +651,27 @@ config SAM34_USBC config SAM34_USART0 bool "USART 0" default n - select ARCH_HAVE_USART0 + select USART0_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config SAM34_USART1 bool "USART 1" default n - select ARCH_HAVE_USART1 + select USART1_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config SAM34_USART2 bool "USART 2" default n depends on ARCH_CHIP_SAM3U || ARCH_CHIP_SAM3X || ARCH_CHIP_SAM3A || ARCH_CHIP_SAM4CM || ARCH_CHIP_SAM4L - select ARCH_HAVE_USART2 + select USART2_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config SAM34_USART3 bool "USART 3" default n depends on ARCH_CHIP_SAM3U || ARCH_CHIP_SAM3X || ARCH_CHIP_SAM3A || ARCH_CHIP_SAM4CM || ARCH_CHIP_SAM4L - select ARCH_HAVE_USART3 + select USART3_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config SAM34_WDT @@ -1060,6 +1060,7 @@ config SAM34_TC5_TIOB config SAM34_ONESHOT bool "TC one-shot wrapper" + depends on SAM34_FREERUN default n if !SCHED_TICKLESS default y if SCHED_TICKLESS ---help--- diff --git a/arch/arm/src/sam34/sam4cm_oneshot.c b/arch/arm/src/sam34/sam4cm_oneshot.c index a793350d66c..eeda41bc8ee 100644 --- a/arch/arm/src/sam34/sam4cm_oneshot.c +++ b/arch/arm/src/sam34/sam4cm_oneshot.c @@ -58,6 +58,7 @@ #include #include "sam4cm_oneshot.h" +#include "sam4cm_freerun.h" #ifdef CONFIG_SAM34_ONESHOT @@ -106,10 +107,11 @@ static void sam_oneshot_handler(TC_HANDLE tch, void *arg, uint32_t sr) /* Forward the event, clearing out any vestiges */ - oneshot_handler = (oneshot_handler_t)oneshot->handler; - oneshot->handler = NULL; - oneshot_arg = (void *)oneshot->arg; - oneshot->arg = NULL; + oneshot_handler = (oneshot_handler_t)oneshot->handler; + oneshot->handler = NULL; + oneshot_arg = (void *)oneshot->arg; + oneshot->arg = NULL; + oneshot->start_count = 0; oneshot_handler(oneshot_arg); } @@ -206,10 +208,11 @@ int sam_oneshot_initialize(struct sam_oneshot_s *oneshot, int chan, * success. */ - oneshot->chan = chan; - oneshot->running = false; - oneshot->handler = NULL; - oneshot->arg = NULL; + oneshot->chan = chan; + oneshot->running = false; + oneshot->handler = NULL; + oneshot->arg = NULL; + oneshot->start_count = 0; return OK; } @@ -248,8 +251,8 @@ int sam_oneshot_max_delay(struct sam_oneshot_s *oneshot, uint64_t *usec) * ****************************************************************************/ -int sam_oneshot_start(struct sam_oneshot_s *oneshot, oneshot_handler_t handler, - void *arg, const struct timespec *ts) +int sam_oneshot_start(struct sam_oneshot_s *oneshot, struct sam_freerun_s *freerun, + oneshot_handler_t handler, void *arg, const struct timespec *ts) { uint64_t usec; uint64_t regval; @@ -267,7 +270,7 @@ int sam_oneshot_start(struct sam_oneshot_s *oneshot, oneshot_handler_t handler, /* Yes.. then cancel it */ tcvdbg("Already running... cancelling\n"); - (void)sam_oneshot_cancel(oneshot, NULL); + (void)sam_oneshot_cancel(oneshot, freerun, NULL); } /* Save the new handler and its argument */ @@ -306,6 +309,26 @@ int sam_oneshot_start(struct sam_oneshot_s *oneshot, oneshot_handler_t handler, sam_tc_start(oneshot->tch); + /* The function sam_tc_start() starts the timer/counter by setting the + * bits TC_CCR_CLKEN and TC_CCR_SWTRG in the channel control register. + * The first one enables the timer/counter the latter performs an + * software trigger, which starts the clock and sets the counter + * register to zero. This reset is performed with the next valid edge + * of the selected clock. Thus it can take up USEC_PER_TICK microseconds + * until the counter register becomes zero. + * + * If the timer is canceled within this period the counter register holds + * the counter value for the last timer/counter run. To circumvent this + * the counter value of the freerun timer/counter is stored at each start + * of the oneshot timer/counter. + * + * The function up_timer_gettime() could also be used for this but it takes + * too long. If up_timer_gettime() is called within this function the problem + * vanishes at least if compiled with no optimisation. + */ + + oneshot->start_count = sam_tc_getcounter(freerun->tch); + /* Enable interrupts. We should get the callback when the interrupt * occurs. */ @@ -340,7 +363,8 @@ int sam_oneshot_start(struct sam_oneshot_s *oneshot, oneshot_handler_t handler, * ****************************************************************************/ -int sam_oneshot_cancel(struct sam_oneshot_s *oneshot, struct timespec *ts) +int sam_oneshot_cancel(struct sam_oneshot_s *oneshot, struct sam_freerun_s *freerun, + struct timespec *ts) { irqstate_t flags; uint64_t usec; @@ -381,6 +405,17 @@ int sam_oneshot_cancel(struct sam_oneshot_s *oneshot, struct timespec *ts) count = sam_tc_getcounter(oneshot->tch); rc = sam_tc_getregister(oneshot->tch, TC_REGC); + /* In the case the timer/counter was canceled very short after its start, + * the counter register can hold the wrong value (the value of the last + * run). To prevent this the counter value is set to zero if not at + * least on tick passed since the start of the timer/counter. + */ + + if (count > 0 && sam_tc_getcounter(freerun->tch) == oneshot->start_count) + { + count = 0; + } + /* Now we can disable the interrupt and stop the timer. */ sam_tc_attach(oneshot->tch, NULL, NULL, 0); @@ -429,6 +464,14 @@ int sam_oneshot_cancel(struct sam_oneshot_s *oneshot, struct timespec *ts) usec = (((uint64_t)(rc - count)) * USEC_PER_SEC) / sam_tc_divfreq(oneshot->tch); + /* Each time the timer/counter is canceled the time calculated from + * the two registers (counter and REGC) is accurate up to an error + * between 0 and USEC_PER_TICK microseconds. To correct this error + * one tick which means USEC_PER_TICK microseconds are subtracted. + */ + + usec = usec > USEC_PER_TICK ? usec - USEC_PER_TICK : 0; + /* Return the time remaining in the correct form */ sec = usec / USEC_PER_SEC; diff --git a/arch/arm/src/sam34/sam4cm_oneshot.h b/arch/arm/src/sam34/sam4cm_oneshot.h index 3c3266b5db6..d7dc7a18ee0 100644 --- a/arch/arm/src/sam34/sam4cm_oneshot.h +++ b/arch/arm/src/sam34/sam4cm_oneshot.h @@ -46,6 +46,7 @@ #include #include "sam4cm_tc.h" +#include "sam4cm_freerun.h" #ifdef CONFIG_SAM34_ONESHOT @@ -82,6 +83,11 @@ struct sam_oneshot_s volatile oneshot_handler_t handler; /* Oneshot expiration callback */ volatile void *arg; /* The argument that will accompany * the callback */ + volatile uint32_t start_count; /* Stores the value of the freerun counter, + * at each start of the onshot timer. Is neccesary + * to find out if the onshot counter was updated + * correctly at the time of the call to + * sam_oneshot_cancel or not. */ }; /**************************************************************************** @@ -136,6 +142,9 @@ int sam_oneshot_max_delay(struct sam_oneshot_s *oneshot, uint64_t *usec); * oneshot Caller allocated instance of the oneshot state structure. This * structure must have been previously initialized via a call to * sam_oneshot_initialize(); + * freerun Caller allocated instance of the freerun state structure. This + * structure must have been previously initialized via a call to + * sam_freerun_initialize(); * handler The function to call when when the oneshot timer expires. * arg An opaque argument that will accompany the callback. * ts Provides the duration of the one shot timer. @@ -146,8 +155,8 @@ int sam_oneshot_max_delay(struct sam_oneshot_s *oneshot, uint64_t *usec); * ****************************************************************************/ -int sam_oneshot_start(struct sam_oneshot_s *oneshot, oneshot_handler_t handler, - void *arg, const struct timespec *ts); +int sam_oneshot_start(struct sam_oneshot_s *oneshot, struct sam_freerun_s *freerun, + oneshot_handler_t handler, void *arg, const struct timespec *ts); /**************************************************************************** * Name: sam_oneshot_cancel @@ -162,6 +171,9 @@ int sam_oneshot_start(struct sam_oneshot_s *oneshot, oneshot_handler_t handler, * oneshot Caller allocated instance of the oneshot state structure. This * structure must have been previously initialized via a call to * sam_oneshot_initialize(); + * freerun Caller allocated instance of the freerun state structure. This + * structure must have been previously initialized via a call to + * sam_freerun_initialize(); * ts The location in which to return the time remaining on the * oneshot timer. A time of zero is returned if the timer is * not running. @@ -173,7 +185,8 @@ int sam_oneshot_start(struct sam_oneshot_s *oneshot, oneshot_handler_t handler, * ****************************************************************************/ -int sam_oneshot_cancel(struct sam_oneshot_s *oneshot, struct timespec *ts); +int sam_oneshot_cancel(struct sam_oneshot_s *oneshot, struct sam_freerun_s *freerun, + struct timespec *ts); #undef EXTERN #ifdef __cplusplus diff --git a/arch/arm/src/sam34/sam4cm_tickless.c b/arch/arm/src/sam34/sam4cm_tickless.c index 04952413314..7d13e8756ef 100644 --- a/arch/arm/src/sam34/sam4cm_tickless.c +++ b/arch/arm/src/sam34/sam4cm_tickless.c @@ -365,8 +365,8 @@ int up_timer_gettime(FAR struct timespec *ts) int up_timer_cancel(FAR struct timespec *ts) { - return ONESHOT_INITIALIZED(&g_tickless.oneshot) ? - sam_oneshot_cancel(&g_tickless.oneshot, ts) : + return ONESHOT_INITIALIZED(&g_tickless.oneshot) && FREERUN_INITIALIZED(&g_tickless.freerun) ? + sam_oneshot_cancel(&g_tickless.oneshot, &g_tickless.freerun, ts) : -EAGAIN; } @@ -398,7 +398,7 @@ int up_timer_cancel(FAR struct timespec *ts) int up_timer_start(FAR const struct timespec *ts) { return ONESHOT_INITIALIZED(&g_tickless.oneshot) ? - sam_oneshot_start(&g_tickless.oneshot, sam_oneshot_handler, NULL, ts) : + sam_oneshot_start(&g_tickless.oneshot, &g_tickless.freerun, sam_oneshot_handler, NULL, ts) : -EAGAIN; } #endif /* CONFIG_SCHED_TICKLESS */ diff --git a/arch/arm/src/sam34/sam_lowputc.c b/arch/arm/src/sam34/sam_lowputc.c index 88be9f0752c..13d5046ef08 100644 --- a/arch/arm/src/sam34/sam_lowputc.c +++ b/arch/arm/src/sam34/sam_lowputc.c @@ -75,16 +75,16 @@ * for our purposes. */ -#ifndef CONFIG_USART0_ISUART +#ifndef CONFIG_USART0_SERIALDRIVER # undef CONFIG_SAM34_USART0 #endif -#ifndef CONFIG_USART1_ISUART +#ifndef CONFIG_USART1_SERIALDRIVER # undef CONFIG_SAM34_USART1 #endif -#ifndef CONFIG_USART2_ISUART +#ifndef CONFIG_USART2_SERIALDRIVER # undef CONFIG_SAM34_USART2 #endif -#ifndef CONFIG_USART3_ISUART +#ifndef CONFIG_USART3_SERIALDRIVER # undef CONFIG_SAM34_USART3 #endif diff --git a/arch/arm/src/sam34/sam_serial.c b/arch/arm/src/sam34/sam_serial.c index 306a1210ea5..46df27954a1 100644 --- a/arch/arm/src/sam34/sam_serial.c +++ b/arch/arm/src/sam34/sam_serial.c @@ -84,16 +84,16 @@ * for our purposes. */ -#ifndef CONFIG_USART0_ISUART +#ifndef CONFIG_USART0_SERIALDRIVER # undef CONFIG_SAM34_USART0 #endif -#ifndef CONFIG_USART1_ISUART +#ifndef CONFIG_USART1_SERIALDRIVER # undef CONFIG_SAM34_USART1 #endif -#ifndef CONFIG_USART2_ISUART +#ifndef CONFIG_USART2_SERIALDRIVER # undef CONFIG_SAM34_USART2 #endif -#ifndef CONFIG_USART3_ISUART +#ifndef CONFIG_USART3_SERIALDRIVER # undef CONFIG_SAM34_USART3 #endif diff --git a/arch/arm/src/sam34/sam_twi.c b/arch/arm/src/sam34/sam_twi.c index a71525b6276..f8c2f7f7caf 100644 --- a/arch/arm/src/sam34/sam_twi.c +++ b/arch/arm/src/sam34/sam_twi.c @@ -901,6 +901,7 @@ static void twi_hw_initialize(struct twi_dev_s *priv, unsigned int pid, /* Set the initial TWI data transfer frequency */ + priv->i2cfreq = 0; twi_setfrequency(priv, frequency); } diff --git a/arch/arm/src/sama5/Kconfig b/arch/arm/src/sama5/Kconfig index 351a5bebe85..b2701131bc2 100644 --- a/arch/arm/src/sama5/Kconfig +++ b/arch/arm/src/sama5/Kconfig @@ -387,7 +387,7 @@ config SAMA5_AESB config SAMA5_DBGU bool "Debug Unit (DBGU)" default n - select ARCH_HAVE_OTHER_UART + select OTHER_UART_SERIALDRIVER config SAMA5_PIT bool "Periodic Interval Timer (PIT)" @@ -432,70 +432,70 @@ config SAMA5_UART0 bool "UART 0" default y depends on SAMA5_HAVE_UART0 - select ARCH_HAVE_UART0 + select UART0_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config SAMA5_UART1 bool "UART 1" default n depends on SAMA5_HAVE_UART1 - select ARCH_HAVE_UART1 + select UART1_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config SAMA5_UART2 bool "UART 2" default n depends on SAMA5_HAVE_UART2 - select ARCH_HAVE_UART2 + select UART2_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config SAMA5_UART3 bool "UART 3" default n depends on SAMA5_HAVE_UART3 - select ARCH_HAVE_UART3 + select UART3_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config SAMA5_UART4 bool "UART 4" default n depends on SAMA5_HAVE_UART4 - select ARCH_HAVE_UART1 + select UART1_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config SAMA5_USART0 bool "USART 0" default n depends on SAMA5_HAVE_USART0 - select ARCH_HAVE_USART0 + select USART0_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config SAMA5_USART1 bool "USART 1" default n depends on SAMA5_HAVE_USART1 - select ARCH_HAVE_USART1 + select USART1_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config SAMA5_USART2 bool "USART 2" default n depends on SAMA5_HAVE_USART2 - select ARCH_HAVE_USART2 + select USART2_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config SAMA5_USART3 bool "USART 3" default n depends on SAMA5_HAVE_USART3 - select ARCH_HAVE_USART3 + select USART3_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config SAMA5_USART4 bool "USART 4" default n depends on SAMA5_HAVE_USART4 - select ARCH_HAVE_USART4 + select USART4_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config SAMA5_FLEXCOM0 @@ -786,7 +786,7 @@ choice config SAMA5_FLEXCOM0_USART bool "USART" select SAMA5_FLEXCOM_USART - select ARCH_HAVE_USART0 + select USART0_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config SAMA5_FLEXCOM0_SPI @@ -807,7 +807,7 @@ choice config SAMA5_FLEXCOM1_USART bool "USART" select SAMA5_FLEXCOM_USART - select ARCH_HAVE_USART1 + select USART1_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config SAMA5_FLEXCOM1_SPI @@ -828,7 +828,7 @@ choice config SAMA5_FLEXCOM2_USART bool "USART" select SAMA5_FLEXCOM_USART - select ARCH_HAVE_USART2 + select USART2_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config SAMA5_FLEXCOM2_SPI @@ -853,7 +853,7 @@ config SAMA5_FLEXCOM3_USART config SAMA5_FLEXCOM3_SPI bool "SPI" select SAMA5_FLEXCOM_SPI - select ARCH_HAVE_USART3 + select USART3_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config SAMA5_FLEXCOM3_SPI @@ -870,7 +870,7 @@ choice config SAMA5_FLEXCOM4_USART bool "USART" select SAMA5_FLEXCOM_USART - select ARCH_HAVE_USART4 + select USART4_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config SAMA5_FLEXCOM4_SPI @@ -3866,6 +3866,7 @@ endif # SAMA5_TC2 config SAMA5_ONESHOT bool "TC one-shot wrapper" + depends on SAMA5_FREERUN default n if !SCHED_TICKLESS default y if SCHED_TICKLESS ---help--- diff --git a/arch/arm/src/sama5/sam_adc.c b/arch/arm/src/sama5/sam_adc.c index 261434229e6..68565bc502f 100644 --- a/arch/arm/src/sama5/sam_adc.c +++ b/arch/arm/src/sama5/sam_adc.c @@ -57,6 +57,7 @@ #include #include #include +#include #include #include @@ -378,6 +379,7 @@ struct sam_adc_s { + FAR const struct adc_callback_s *cb; sem_t exclsem; /* Supports exclusive access to the ADC interface */ bool initialized; /* The ADC driver is already initialized */ uint32_t frequency; /* ADC clock frequency */ @@ -446,6 +448,8 @@ static int sam_adc_interrupt(int irq, void *context); /* ADC methods */ #ifdef SAMA5_ADC_HAVE_CHANNELS +static int sam_adc_bind(FAR struct adc_dev_s *dev, + FAR const struct adc_callback_s *callback); static void sam_adc_reset(struct adc_dev_s *dev); static int sam_adc_setup(struct adc_dev_s *dev); static void sam_adc_shutdown(struct adc_dev_s *dev); @@ -477,6 +481,7 @@ static void sam_adc_channels(struct sam_adc_s *priv); static const struct adc_ops_s g_adcops = { + .ao_bind = sam_adc_bind, .ao_reset = sam_adc_reset, .ao_setup = sam_adc_setup, .ao_shutdown = sam_adc_shutdown, @@ -664,9 +669,15 @@ static void sam_adc_dmadone(void *arg) chan = (int)((*buffer & ADC_LCDR_CHANB_MASK) >> ADC_LCDR_CHANB_SHIFT); sample = ((*buffer & ADC_LCDR_DATA_MASK) >> ADC_LCDR_DATA_SHIFT); - /* And give the sample data to the ADC upper half */ + /* Verify that the upper-half driver has bound its callback functions */ - (void)adc_receive(priv->dev, chan, sample); + if (priv->cb != NULL) + { + /* Give the sample data to the ADC upper half */ + + DEBUGASSERT(priv->cb->au_receive != NULL); + priv->cb->au_receive(priv->dev, chan, sample); + } } } @@ -858,7 +869,17 @@ static void sam_adc_endconversion(void *arg) /* Read the ADC sample and pass it to the upper half */ regval = sam_adc_getreg(priv, SAM_ADC_CDR(chan)); - (void)adc_receive(priv->dev, chan, regval & ADC_CDR_DATA_MASK); + + /* Verify that the upper-half driver has bound its callback functions */ + + if (priv->cb != NULL) + { + /* Perform the data received callback */ + + DEBUGASSERT(priv->cb->au_receive != NULL); + priv->cb->au_receive(priv->dev, chan, regval & ADC_CDR_DATA_MASK); + } + pending &= ~bit; } } @@ -954,6 +975,26 @@ static int sam_adc_interrupt(int irq, void *context) /**************************************************************************** * ADC methods ****************************************************************************/ + +/**************************************************************************** + * Name: sam_adc_bind + * + * Description: + * Bind the upper-half driver callbacks to the lower-half implementation. This + * must be called early in order to receive ADC event notifications. + * + ****************************************************************************/ + +static int sam_adc_bind(FAR struct adc_dev_s *dev, + FAR const struct adc_callback_s *callback) +{ + struct sam_adc_s *priv = (struct sam_adc_s *)dev->ad_priv; + + DEBUGASSERT(priv != NULL); + priv->cb = callback; + return OK; +} + /**************************************************************************** * Name: sam_adc_reset * @@ -1980,6 +2021,7 @@ struct adc_dev_s *sam_adc_initialize(void) /* Initialize the private ADC device data structure */ sem_init(&priv->exclsem, 0, 1); + priv->cb = NULL; priv->dev = &g_adcdev; #ifdef CONFIG_SAMA5_ADC_DMA diff --git a/arch/arm/src/sama5/sam_config.h b/arch/arm/src/sama5/sam_config.h index 650d6c15032..14ab9b8dcfa 100644 --- a/arch/arm/src/sama5/sam_config.h +++ b/arch/arm/src/sama5/sam_config.h @@ -52,27 +52,27 @@ * for our purposes. */ -#ifndef CONFIG_USART0_ISUART +#ifndef CONFIG_USART0_SERIALDRIVER # undef CONFIG_SAMA5_USART0 # undef CONFIG_SAMA5_FLEXCOM0_USART # undef CONFIG_USART0_SERIAL_CONSOLE #endif -#ifndef CONFIG_USART1_ISUART +#ifndef CONFIG_USART1_SERIALDRIVER # undef CONFIG_SAMA5_USART1 # undef CONFIG_SAMA5_FLEXCOM1_USART # undef CONFIG_USART1_SERIAL_CONSOLE #endif -#ifndef CONFIG_USART2_ISUART +#ifndef CONFIG_USART2_SERIALDRIVER # undef CONFIG_SAMA5_USART2 # undef CONFIG_SAMA5_FLEXCOM2_USART # undef CONFIG_USART2_SERIAL_CONSOLE #endif -#ifndef CONFIG_USART3_ISUART +#ifndef CONFIG_USART3_SERIALDRIVER # undef CONFIG_SAMA5_USART3 # undef CONFIG_SAMA5_FLEXCOM3_USART # undef CONFIG_USART3_SERIAL_CONSOLE #endif -#ifndef CONFIG_USART4_ISUART +#ifndef CONFIG_USART4_SERIALDRIVER # undef CONFIG_SAMA5_USART4 # undef CONFIG_SAMA5_FLEXCOM4_USART # undef CONFIG_USART4_SERIAL_CONSOLE @@ -212,7 +212,7 @@ # define SAMA5_HAVE_UART_CONSOLE 1 # undef SAMA5_HAVE_USART_CONSOLE # undef SAMA5_HAVE_FLEXCOM_CONSOLE -#elif defined(CONFIG_USART0_SERIAL_CONSOLE) && defined(CONFIG_USART0_ISUART) +#elif defined(CONFIG_USART0_SERIAL_CONSOLE) && defined(CONFIG_USART0_SERIALDRIVER) # undef CONFIG_SAMA5_DBGU_CONSOLE # undef CONFIG_UART0_SERIAL_CONSOLE # undef CONFIG_UART1_SERIAL_CONSOLE @@ -227,7 +227,7 @@ # undef SAMA5_HAVE_UART_CONSOLE # define SAMA5_HAVE_USART_CONSOLE 1 # undef SAMA5_HAVE_FLEXCOM_CONSOLE -#elif defined(CONFIG_USART1_SERIAL_CONSOLE) && defined(CONFIG_USART1_ISUART) +#elif defined(CONFIG_USART1_SERIAL_CONSOLE) && defined(CONFIG_USART1_SERIALDRIVER) # undef CONFIG_SAMA5_DBGU_CONSOLE # undef CONFIG_UART0_SERIAL_CONSOLE # undef CONFIG_UART1_SERIAL_CONSOLE @@ -242,7 +242,7 @@ # undef SAMA5_HAVE_UART_CONSOLE # define SAMA5_HAVE_USART_CONSOLE 1 # undef SAMA5_HAVE_FLEXCOM_CONSOLE -#elif defined(CONFIG_USART2_SERIAL_CONSOLE) && defined(CONFIG_USART2_ISUART) +#elif defined(CONFIG_USART2_SERIAL_CONSOLE) && defined(CONFIG_USART2_SERIALDRIVER) # undef CONFIG_SAMA5_DBGU_CONSOLE # undef CONFIG_UART0_SERIAL_CONSOLE # undef CONFIG_UART1_SERIAL_CONSOLE @@ -257,7 +257,7 @@ # undef SAMA5_HAVE_UART_CONSOLE # define SAMA5_HAVE_USART_CONSOLE 1 # undef SAMA5_HAVE_FLEXCOM_CONSOLE -#elif defined(CONFIG_USART3_SERIAL_CONSOLE) && defined(CONFIG_USART3_ISUART) +#elif defined(CONFIG_USART3_SERIAL_CONSOLE) && defined(CONFIG_USART3_SERIALDRIVER) # undef CONFIG_SAMA5_DBGU_CONSOLE # undef CONFIG_UART0_SERIAL_CONSOLE # undef CONFIG_UART1_SERIAL_CONSOLE @@ -272,7 +272,7 @@ # undef SAMA5_HAVE_UART_CONSOLE # define SAMA5_HAVE_USART_CONSOLE 1 # undef SAMA5_HAVE_FLEXCOM_CONSOLE -#elif defined(CONFIG_USART4_SERIAL_CONSOLE) && defined(CONFIG_USART4_ISUART) +#elif defined(CONFIG_USART4_SERIAL_CONSOLE) && defined(CONFIG_USART4_SERIALDRIVER) # undef CONFIG_SAMA5_DBGU_CONSOLE # undef CONFIG_UART0_SERIAL_CONSOLE # undef CONFIG_UART1_SERIAL_CONSOLE diff --git a/arch/arm/src/sama5/sam_flexcom_serial.c b/arch/arm/src/sama5/sam_flexcom_serial.c index c65c1aab474..c0d4693ac86 100644 --- a/arch/arm/src/sama5/sam_flexcom_serial.c +++ b/arch/arm/src/sama5/sam_flexcom_serial.c @@ -120,19 +120,19 @@ # define FLEXUS4_ASSIGNED 1 #else # undef CONSOLE_DEV /* No console */ -# if defined(CONFIG_USART0_ISUART) +# if defined(CONFIG_USART0_SERIALDRIVER) # define TTYFC0_DEV g_flexus0port /* FLEXUS0 is ttyFC0 */ # define FLEXUS0_ASSIGNED 1 -# elif defined(CONFIG_USART1_ISUART) +# elif defined(CONFIG_USART1_SERIALDRIVER) # define TTYFC0_DEV g_flexus1port /* FLEXUS1 is ttyFC0 */ # define FLEXUS1_ASSIGNED 1 -# elif defined(CONFIG_USART2_ISUART) +# elif defined(CONFIG_USART2_SERIALDRIVER) # define TTYFC0_DEV g_flexus2port /* FLEXUS2 is ttyFC0 */ # define FLEXUS2_ASSIGNED 1 -# elif defined(CONFIG_USART3_ISUART) +# elif defined(CONFIG_USART3_SERIALDRIVER) # define TTYFC0_DEV g_flexus3port /* FLEXUS3 is ttyFC0 */ # define FLEXUS3_ASSIGNED 1 -# elif defined(CONFIG_USART4_ISUART) +# elif defined(CONFIG_USART4_SERIALDRIVER) # define TTYFC0_DEV g_flexus4port /* FLEXUS4 is ttyFC0 */ # define FLEXUS4_ASSIGNED 4 # endif @@ -140,19 +140,19 @@ /* Pick ttyFC1. This could be any of USART0-4 excluding the console UART. */ -#if defined(CONFIG_USART0_ISUART) && !defined(FLEXUS0_ASSIGNED) +#if defined(CONFIG_USART0_SERIALDRIVER) && !defined(FLEXUS0_ASSIGNED) # define TTYFC1_DEV g_flexus0port /* FLEXUS0 is ttyFC1 */ # define FLEXUS0_ASSIGNED 1 -#elif defined(CONFIG_USART1_ISUART) && !defined(FLEXUS1_ASSIGNED) +#elif defined(CONFIG_USART1_SERIALDRIVER) && !defined(FLEXUS1_ASSIGNED) # define TTYFC1_DEV g_flexus1port /* FLEXUS1 is ttyFC1 */ # define FLEXUS1_ASSIGNED 1 -#elif defined(CONFIG_USART2_ISUART) && !defined(FLEXUS2_ASSIGNED) +#elif defined(CONFIG_USART2_SERIALDRIVER) && !defined(FLEXUS2_ASSIGNED) # define TTYFC1_DEV g_flexus2port /* FLEXUS2 is ttyFC1 */ # define FLEXUS2_ASSIGNED 1 -#elif defined(CONFIG_USART3_ISUART) && !defined(FLEXUS3_ASSIGNED) +#elif defined(CONFIG_USART3_SERIALDRIVER) && !defined(FLEXUS3_ASSIGNED) # define TTYFC1_DEV g_flexus3port /* FLEXUS3 is ttyFC1 */ # define FLEXUS3_ASSIGNED 1 -#elif defined(CONFIG_USART4_ISUART) && !defined(FLEXUS4_ASSIGNED) +#elif defined(CONFIG_USART4_SERIALDRIVER) && !defined(FLEXUS4_ASSIGNED) # define TTYFC1_DEV g_flexus4port /* FLEXUS4 is ttyFC1 */ # define FLEXUS4_ASSIGNED 1 #endif @@ -162,16 +162,16 @@ * could also be the console. */ -#if defined(CONFIG_USART1_ISUART) && !defined(FLEXUS1_ASSIGNED) +#if defined(CONFIG_USART1_SERIALDRIVER) && !defined(FLEXUS1_ASSIGNED) # define TTYFC2_DEV g_flexus1port /* FLEXUS1 is ttyFC2 */ # define FLEXUS1_ASSIGNED 1 -#elif defined(CONFIG_USART2_ISUART) && !defined(FLEXUS2_ASSIGNED) +#elif defined(CONFIG_USART2_SERIALDRIVER) && !defined(FLEXUS2_ASSIGNED) # define TTYFC2_DEV g_flexus2port /* FLEXUS2 is ttyFC2 */ # define FLEXUS2_ASSIGNED 1 -#elif defined(CONFIG_USART3_ISUART) && !defined(FLEXUS3_ASSIGNED) +#elif defined(CONFIG_USART3_SERIALDRIVER) && !defined(FLEXUS3_ASSIGNED) # define TTYFC2_DEV g_flexus3port /* FLEXUS3 is ttyFC2 */ # define FLEXUS3_ASSIGNED 1 -#elif defined(CONFIG_USART4_ISUART) && !defined(USART4_ASSIGNED) +#elif defined(CONFIG_USART4_SERIALDRIVER) && !defined(USART4_ASSIGNED) # define TTYFC2_DEV g_flexus4port /* FLEXUS4 is ttyFC2 */ # define FLEXUS4_ASSIGNED 1 #endif @@ -181,13 +181,13 @@ * FLEXUS2-4 could also be the console. */ -#if defined(CONFIG_USART2_ISUART) && !defined(FLEXUS2_ASSIGNED) +#if defined(CONFIG_USART2_SERIALDRIVER) && !defined(FLEXUS2_ASSIGNED) # define TTYFC3_DEV g_flexus2port /* FLEXUS2 is ttyFC3 */ # define FLEXUS2_ASSIGNED 1 -#elif defined(CONFIG_USART3_ISUART) && !defined(FLEXUS3_ASSIGNED) +#elif defined(CONFIG_USART3_SERIALDRIVER) && !defined(FLEXUS3_ASSIGNED) # define TTYFC3_DEV g_flexus3port /* FLEXUS3 is ttyFC3 */ # define FLEXUS3_ASSIGNED 1 -#elif defined(CONFIG_USART4_ISUART) && !defined(FLEXUS4_ASSIGNED) +#elif defined(CONFIG_USART4_SERIALDRIVER) && !defined(FLEXUS4_ASSIGNED) # define TTYFC3_DEV g_flexus4port /* FLEXUS4 is ttyFC3 */ # define FLEXUS4_ASSIGNED 1 #endif @@ -197,10 +197,10 @@ * USART3-4 could also be the console. */ -#if defined(CONFIG_USART3_ISUART) && !defined(USART3_ASSIGNED) +#if defined(CONFIG_USART3_SERIALDRIVER) && !defined(USART3_ASSIGNED) # define TTYFC4_DEV g_flexus3port /* USART3 is ttyFC4 */ # define USART3_ASSIGNED 1 -#elif defined(CONFIG_USART4_ISUART) && !defined(USART4_ASSIGNED) +#elif defined(CONFIG_USART4_SERIALDRIVER) && !defined(USART4_ASSIGNED) # define TTYFC4_DEV g_flexus4port /* USART4 is ttyFC4 */ # define USART4_ASSIGNED 1 #endif @@ -234,19 +234,19 @@ struct flexus_dev_s ****************************************************************************/ static int flexus_interrupt(struct uart_dev_s *dev); -#ifdef CONFIG_USART0_ISUART +#ifdef CONFIG_USART0_SERIALDRIVER static int flexus0_interrupt(int irq, void *context); #endif -#ifdef CONFIG_USART1_ISUART +#ifdef CONFIG_USART1_SERIALDRIVER static int flexus1_interrupt(int irq, void *context); #endif -#ifdef CONFIG_USART2_ISUART +#ifdef CONFIG_USART2_SERIALDRIVER static int flexus2_interrupt(int irq, void *context); #endif -#ifdef CONFIG_USART3_ISUART +#ifdef CONFIG_USART3_SERIALDRIVER static int flexus3_interrupt(int irq, void *context); #endif -#ifdef CONFIG_USART4_ISUART +#ifdef CONFIG_USART4_SERIALDRIVER static int flexus4_interrupt(int irq, void *context); #endif @@ -288,30 +288,30 @@ static const struct uart_ops_s g_flexus_ops = /* I/O buffers */ -#ifdef CONFIG_USART0_ISUART +#ifdef CONFIG_USART0_SERIALDRIVER static char g_flexus0rxbuffer[CONFIG_USART0_RXBUFSIZE]; static char g_flexus0txbuffer[CONFIG_USART0_TXBUFSIZE]; #endif -#ifdef CONFIG_USART1_ISUART +#ifdef CONFIG_USART1_SERIALDRIVER static char g_flexus1rxbuffer[CONFIG_USART1_RXBUFSIZE]; static char g_flexus1txbuffer[CONFIG_USART1_TXBUFSIZE]; #endif -#ifdef CONFIG_USART2_ISUART +#ifdef CONFIG_USART2_SERIALDRIVER static char g_flexus2rxbuffer[CONFIG_USART2_RXBUFSIZE]; static char g_flexus2txbuffer[CONFIG_USART2_TXBUFSIZE]; #endif -#ifdef CONFIG_USART3_ISUART +#ifdef CONFIG_USART3_SERIALDRIVER static char g_flexus3rxbuffer[CONFIG_USART3_RXBUFSIZE]; static char g_flexus3txbuffer[CONFIG_USART3_TXBUFSIZE]; #endif -#ifdef CONFIG_USART4_ISUART +#ifdef CONFIG_USART4_SERIALDRIVER static char g_flexus4rxbuffer[CONFIG_USART4_RXBUFSIZE]; static char g_flexus4txbuffer[CONFIG_USART4_TXBUFSIZE]; #endif /* This describes the state of the USART0 port. */ -#ifdef CONFIG_USART0_ISUART +#ifdef CONFIG_USART0_SERIALDRIVER static struct flexus_dev_s g_flexus0priv = { .handler = flexus0_interrupt, @@ -345,7 +345,7 @@ static uart_dev_t g_flexus0port = /* This describes the state of the USART1 port. */ -#ifdef CONFIG_USART1_ISUART +#ifdef CONFIG_USART1_SERIALDRIVER static struct flexus_dev_s g_flexus1priv = { .handler = flexus1_interrupt, @@ -379,7 +379,7 @@ static uart_dev_t g_flexus1port = /* This describes the state of the USART2 port. */ -#ifdef CONFIG_USART2_ISUART +#ifdef CONFIG_USART2_SERIALDRIVER static struct flexus_dev_s g_flexus2priv = { .handler = flexus2_interrupt, @@ -413,7 +413,7 @@ static uart_dev_t g_flexus2port = /* This describes the state of the USART3 port. */ -#ifdef CONFIG_USART3_ISUART +#ifdef CONFIG_USART3_SERIALDRIVER static struct flexus_dev_s g_flexus3priv = { .handler = flexus3_interrupt, @@ -447,7 +447,7 @@ static uart_dev_t g_flexus3port = /* This describes the state of the USART4 port. */ -#ifdef CONFIG_USART4_ISUART +#ifdef CONFIG_USART4_SERIALDRIVER static struct flexus_dev_s g_flexus4priv = { .handler = flexus4_interrupt, @@ -613,31 +613,31 @@ static int flexus_interrupt(struct uart_dev_s *dev) * ****************************************************************************/ -#ifdef CONFIG_USART0_ISUART +#ifdef CONFIG_USART0_SERIALDRIVER static int flexus0_interrupt(int irq, void *context) { return flexus_interrupt(&g_flexus0port); } #endif -#ifdef CONFIG_USART1_ISUART +#ifdef CONFIG_USART1_SERIALDRIVER static int flexus1_interrupt(int irq, void *context) { return flexus_interrupt(&g_flexus1port); } #endif -#ifdef CONFIG_USART2_ISUART +#ifdef CONFIG_USART2_SERIALDRIVER static int flexus2_interrupt(int irq, void *context) { return flexus_interrupt(&g_flexus2port); } #endif -#ifdef CONFIG_USART3_ISUART +#ifdef CONFIG_USART3_SERIALDRIVER static int flexus3_interrupt(int irq, void *context) { return flexus_interrupt(&g_flexus3port); } #endif -#ifdef CONFIG_USART4_ISUART +#ifdef CONFIG_USART4_SERIALDRIVER static int flexus4_interrupt(int irq, void *context) { return flexus_interrupt(&g_flexus4port); diff --git a/arch/arm/src/sama5/sam_lowputc.c b/arch/arm/src/sama5/sam_lowputc.c index 84e7a37d213..f94f6f05167 100644 --- a/arch/arm/src/sama5/sam_lowputc.c +++ b/arch/arm/src/sama5/sam_lowputc.c @@ -379,7 +379,7 @@ void sam_lowsetup(void) #ifdef CONFIG_SAMA5_UART4 sam_uart4_enableclk(); #endif -#ifdef CONFIG_USART0_ISUART +#ifdef CONFIG_USART0_SERIALDRIVER sam_usart0_enableclk(); #endif #ifdef CONFIG_SAMA5_USART1 @@ -436,7 +436,7 @@ void sam_lowsetup(void) (void)sam_configpio(PIO_UART4_TXD); #endif -#if defined(CONFIG_USART0_ISUART) && defined(CONFIG_SAMA5_USART0) +#if defined(CONFIG_USART0_SERIALDRIVER) && defined(CONFIG_SAMA5_USART0) (void)sam_configpio(PIO_USART0_RXD); (void)sam_configpio(PIO_USART0_TXD); #ifdef CONFIG_USART0_OFLOWCONTROL @@ -447,7 +447,7 @@ void sam_lowsetup(void) #endif #endif -#if defined(CONFIG_USART1_ISUART) && defined(CONFIG_SAMA5_USART1) +#if defined(CONFIG_USART1_SERIALDRIVER) && defined(CONFIG_SAMA5_USART1) (void)sam_configpio(PIO_USART1_RXD); (void)sam_configpio(PIO_USART1_TXD); #ifdef CONFIG_USART1_OFLOWCONTROL @@ -458,7 +458,7 @@ void sam_lowsetup(void) #endif #endif -#if defined(CONFIG_USART2_ISUART) && defined(CONFIG_SAMA5_USART2) +#if defined(CONFIG_USART2_SERIALDRIVER) && defined(CONFIG_SAMA5_USART2) (void)sam_configpio(PIO_USART2_RXD); (void)sam_configpio(PIO_USART2_TXD); #ifdef CONFIG_USART2_OFLOWCONTROL @@ -469,7 +469,7 @@ void sam_lowsetup(void) #endif #endif -#if defined(CONFIG_USART3_ISUART) && defined(CONFIG_SAMA5_USART3) +#if defined(CONFIG_USART3_SERIALDRIVER) && defined(CONFIG_SAMA5_USART3) (void)sam_configpio(PIO_USART3_RXD); (void)sam_configpio(PIO_USART3_TXD); #ifdef CONFIG_USART3_OFLOWCONTROL @@ -480,7 +480,7 @@ void sam_lowsetup(void) #endif #endif -#if defined(CONFIG_USART4_ISUART) && defined(CONFIG_SAMA5_USART4) +#if defined(CONFIG_USART4_SERIALDRIVER) && defined(CONFIG_SAMA5_USART4) (void)sam_configpio(PIO_USART4_RXD); (void)sam_configpio(PIO_USART4_TXD); #ifdef CONFIG_USART4_OFLOWCONTROL @@ -500,7 +500,7 @@ void sam_lowsetup(void) * FLEXCOM_IO4 = RTS */ -#if defined(CONFIG_USART0_ISUART) && defined(CONFIG_SAMA5_FLEXCOM0_USART) +#if defined(CONFIG_USART0_SERIALDRIVER) && defined(CONFIG_SAMA5_FLEXCOM0_USART) (void)sam_configpio(PIO_FLEXCOM0_IO0); (void)sam_configpio(PIO_FLEXCOM0_IO1); #ifdef CONFIG_USART0_OFLOWCONTROL @@ -511,7 +511,7 @@ void sam_lowsetup(void) #endif #endif -#if defined(CONFIG_USART1_ISUART) && defined(CONFIG_SAMA5_FLEXCOM1_USART) +#if defined(CONFIG_USART1_SERIALDRIVER) && defined(CONFIG_SAMA5_FLEXCOM1_USART) (void)sam_configpio(PIO_FLEXCOM1_IO0); (void)sam_configpio(PIO_FLEXCOM1_IO1); #ifdef CONFIG_USART1_OFLOWCONTROL @@ -522,7 +522,7 @@ void sam_lowsetup(void) #endif #endif -#if defined(CONFIG_USART2_ISUART) && defined(CONFIG_SAMA5_FLEXCOM2_USART) +#if defined(CONFIG_USART2_SERIALDRIVER) && defined(CONFIG_SAMA5_FLEXCOM2_USART) (void)sam_configpio(PIO_FLEXCOM2_IO0); (void)sam_configpio(PIO_FLEXCOM2_IO1); #ifdef CONFIG_USART2_OFLOWCONTROL @@ -533,7 +533,7 @@ void sam_lowsetup(void) #endif #endif -#if defined(CONFIG_USART3_ISUART) && defined(CONFIG_SAMA5_FLEXCOM3_USART) +#if defined(CONFIG_USART3_SERIALDRIVER) && defined(CONFIG_SAMA5_FLEXCOM3_USART) (void)sam_configpio(PIO_FLEXCOM3_IO0); (void)sam_configpio(PIO_FLEXCOM3_IO1); #ifdef CONFIG_USART3_OFLOWCONTROL @@ -544,7 +544,7 @@ void sam_lowsetup(void) #endif #endif -#if defined(CONFIG_USART4_ISUART) && defined(CONFIG_SAMA5_FLEXCOM4_USART) +#if defined(CONFIG_USART4_SERIALDRIVER) && defined(CONFIG_SAMA5_FLEXCOM4_USART) (void)sam_configpio(PIO_FLEXCOM4_IO0); (void)sam_configpio(PIO_FLEXCOM4_IO1); #ifdef CONFIG_USART4_OFLOWCONTROL diff --git a/arch/arm/src/sama5/sam_oneshot.c b/arch/arm/src/sama5/sam_oneshot.c index c86224155af..c6d0a79ef58 100644 --- a/arch/arm/src/sama5/sam_oneshot.c +++ b/arch/arm/src/sama5/sam_oneshot.c @@ -59,6 +59,7 @@ #include #include "sam_oneshot.h" +#include "sam_freerun.h" #ifdef CONFIG_SAMA5_ONESHOT @@ -123,10 +124,11 @@ static void sam_oneshot_handler(TC_HANDLE tch, void *arg, uint32_t sr) /* Forward the event, clearing out any vestiges */ - oneshot_handler = (oneshot_handler_t)oneshot->handler; - oneshot->handler = NULL; - oneshot_arg = (void *)oneshot->arg; - oneshot->arg = NULL; + oneshot_handler = (oneshot_handler_t)oneshot->handler; + oneshot->handler = NULL; + oneshot_arg = (void *)oneshot->arg; + oneshot->arg = NULL; + oneshot->start_count = 0; oneshot_handler(oneshot_arg); } @@ -223,10 +225,11 @@ int sam_oneshot_initialize(struct sam_oneshot_s *oneshot, int chan, * success. */ - oneshot->chan = chan; - oneshot->running = false; - oneshot->handler = NULL; - oneshot->arg = NULL; + oneshot->chan = chan; + oneshot->running = false; + oneshot->handler = NULL; + oneshot->arg = NULL; + oneshot->start_count = 0; return OK; } @@ -250,8 +253,8 @@ int sam_oneshot_initialize(struct sam_oneshot_s *oneshot, int chan, * ****************************************************************************/ -int sam_oneshot_start(struct sam_oneshot_s *oneshot, oneshot_handler_t handler, - void *arg, const struct timespec *ts) +int sam_oneshot_start(struct sam_oneshot_s *oneshot, struct sam_freerun_s *freerun, + oneshot_handler_t handler, void *arg, const struct timespec *ts) { uint64_t usec; uint64_t regval; @@ -269,7 +272,7 @@ int sam_oneshot_start(struct sam_oneshot_s *oneshot, oneshot_handler_t handler, /* Yes.. then cancel it */ tcvdbg("Already running... cancelling\n"); - (void)sam_oneshot_cancel(oneshot, NULL); + (void)sam_oneshot_cancel(oneshot, freerun, NULL); } /* Save the new handler and its argument */ @@ -308,6 +311,26 @@ int sam_oneshot_start(struct sam_oneshot_s *oneshot, oneshot_handler_t handler, sam_tc_start(oneshot->tch); + /* The function sam_tc_start() starts the timer/counter by setting the + * bits TC_CCR_CLKEN and TC_CCR_SWTRG in the channel control register. + * The first one enables the timer/counter the latter performs an + * software trigger, which starts the clock and sets the counter + * register to zero. This reset is performed with the next valid edge + * of the selected clock. Thus it can take up USEC_PER_TICK microseconds + * until the counter register becomes zero. + * + * If the timer is canceled within this period the counter register holds + * the counter value for the last timer/counter run. To circumvent this + * the counter value of the freerun timer/counter is stored at each start + * of the oneshot timer/counter. + * + * The function up_timer_gettime() could also be used for this but it takes + * too long. If up_timer_gettime() is called within this function the problem + * vanishes at least if compiled with no optimisation. + */ + + oneshot->start_count = sam_tc_getcounter(freerun->tch); + /* Enable interrupts. We should get the callback when the interrupt * occurs. */ @@ -342,7 +365,8 @@ int sam_oneshot_start(struct sam_oneshot_s *oneshot, oneshot_handler_t handler, * ****************************************************************************/ -int sam_oneshot_cancel(struct sam_oneshot_s *oneshot, struct timespec *ts) +int sam_oneshot_cancel(struct sam_oneshot_s *oneshot, struct sam_freerun_s *freerun, + struct timespec *ts) { irqstate_t flags; uint64_t usec; @@ -383,6 +407,17 @@ int sam_oneshot_cancel(struct sam_oneshot_s *oneshot, struct timespec *ts) count = sam_tc_getcounter(oneshot->tch); rc = sam_tc_getregister(oneshot->tch, TC_REGC); + /* In the case the timer/counter was canceled very short after its start, + * the counter register can hold the wrong value (the value of the last + * run). To prevent this the counter value is set to zero if not at + * least on tick passed since the start of the timer/counter. + */ + + if (count > 0 && sam_tc_getcounter(freerun->tch) == oneshot->start_count) + { + count = 0; + } + /* Now we can disable the interrupt and stop the timer. */ sam_tc_attach(oneshot->tch, NULL, NULL, 0); @@ -431,6 +466,14 @@ int sam_oneshot_cancel(struct sam_oneshot_s *oneshot, struct timespec *ts) usec = (((uint64_t)(rc - count)) * USEC_PER_SEC) / sam_tc_divfreq(oneshot->tch); + /* Each time the timer/counter is canceled the time calculated from + * the two registers (counter and REGC) is accurate up to an error + * between 0 and USEC_PER_TICK microseconds. To correct this error + * one tick which means USEC_PER_TICK microseconds are subtracted. + */ + + usec = usec > USEC_PER_TICK ? usec - USEC_PER_TICK : 0; + /* Return the time remaining in the correct form */ sec = usec / USEC_PER_SEC; diff --git a/arch/arm/src/sama5/sam_oneshot.h b/arch/arm/src/sama5/sam_oneshot.h index 4fefe9fe11b..0443fcd693d 100644 --- a/arch/arm/src/sama5/sam_oneshot.h +++ b/arch/arm/src/sama5/sam_oneshot.h @@ -46,6 +46,7 @@ #include #include "sam_tc.h" +#include "sam_freerun.h" #ifdef CONFIG_SAMA5_ONESHOT @@ -82,6 +83,11 @@ struct sam_oneshot_s volatile oneshot_handler_t handler; /* Oneshot expiration callback */ volatile void *arg; /* The argument that will accompany * the callback */ + volatile uint32_t start_count; /* Stores the value of the freerun counter, + * at each start of the onshot timer. Is neccesary + * to find out if the onshot counter was updated + * correctly at the time of the call to + * sam_oneshot_cancel or not. */ }; /**************************************************************************** @@ -134,6 +140,9 @@ int sam_oneshot_initialize(struct sam_oneshot_s *oneshot, int chan, * oneshot Caller allocated instance of the oneshot state structure. This * structure must have been previously initialized via a call to * sam_oneshot_initialize(); + * freerun Caller allocated instance of the freerun state structure. This + * structure must have been previously initialized via a call to + * sam_freerun_initialize(); * handler The function to call when when the oneshot timer expires. * arg An opaque argument that will accompany the callback. * ts Provides the duration of the one shot timer. @@ -144,8 +153,8 @@ int sam_oneshot_initialize(struct sam_oneshot_s *oneshot, int chan, * ****************************************************************************/ -int sam_oneshot_start(struct sam_oneshot_s *oneshot, oneshot_handler_t handler, - void *arg, const struct timespec *ts); +int sam_oneshot_start(struct sam_oneshot_s *oneshot, struct sam_freerun_s *freerun, + oneshot_handler_t handler, void *arg, const struct timespec *ts); /**************************************************************************** * Name: sam_oneshot_cancel @@ -160,6 +169,9 @@ int sam_oneshot_start(struct sam_oneshot_s *oneshot, oneshot_handler_t handler, * oneshot Caller allocated instance of the oneshot state structure. This * structure must have been previously initialized via a call to * sam_oneshot_initialize(); + * freerun Caller allocated instance of the freerun state structure. This + * structure must have been previously initialized via a call to + * sam_freerun_initialize(); * ts The location in which to return the time remaining on the * oneshot timer. A time of zero is returned if the timer is * not running. @@ -171,7 +183,8 @@ int sam_oneshot_start(struct sam_oneshot_s *oneshot, oneshot_handler_t handler, * ****************************************************************************/ -int sam_oneshot_cancel(struct sam_oneshot_s *oneshot, struct timespec *ts); +int sam_oneshot_cancel(struct sam_oneshot_s *oneshot, struct sam_freerun_s *freerun, + struct timespec *ts); #undef EXTERN #ifdef __cplusplus diff --git a/arch/arm/src/sama5/sam_serial.c b/arch/arm/src/sama5/sam_serial.c index 0083606dba1..a73ac33cd24 100644 --- a/arch/arm/src/sama5/sam_serial.c +++ b/arch/arm/src/sama5/sam_serial.c @@ -167,19 +167,19 @@ # elif defined(CONFIG_SAMA5_UART4) # define TTYS0_DEV g_uart1port /* UART4 is ttyS0 */ # define UART4_ASSIGNED 1 -# elif defined(CONFIG_USART0_ISUART) +# elif defined(CONFIG_USART0_SERIALDRIVER) # define TTYS0_DEV g_usart0port /* USART0 is ttyS0 */ # define USART0_ASSIGNED 1 -# elif defined(CONFIG_USART1_ISUART) +# elif defined(CONFIG_USART1_SERIALDRIVER) # define TTYS0_DEV g_usart1port /* USART1 is ttyS0 */ # define USART1_ASSIGNED 1 -# elif defined(CONFIG_USART2_ISUART) +# elif defined(CONFIG_USART2_SERIALDRIVER) # define TTYS0_DEV g_usart2port /* USART2 is ttyS0 */ # define USART2_ASSIGNED 1 -# elif defined(CONFIG_USART3_ISUART) +# elif defined(CONFIG_USART3_SERIALDRIVER) # define TTYS0_DEV g_usart3port /* USART3 is ttyS0 */ # define USART3_ASSIGNED 1 -# elif defined(CONFIG_USART4_ISUART) +# elif defined(CONFIG_USART4_SERIALDRIVER) # define TTYS0_DEV g_usart4port /* USART4 is ttyS0 */ # define USART4_ASSIGNED 4 # endif @@ -202,19 +202,19 @@ #elif defined(CONFIG_SAMA5_UART4) && !defined(UART4_ASSIGNED) # define TTYS1_DEV g_uart1port /* UART4 is ttyS1 */ # define UART4_ASSIGNED 1 -#elif defined(CONFIG_USART0_ISUART) && !defined(USART0_ASSIGNED) +#elif defined(CONFIG_USART0_SERIALDRIVER) && !defined(USART0_ASSIGNED) # define TTYS1_DEV g_usart0port /* USART0 is ttyS1 */ # define USART0_ASSIGNED 1 -#elif defined(CONFIG_USART1_ISUART) && !defined(USART1_ASSIGNED) +#elif defined(CONFIG_USART1_SERIALDRIVER) && !defined(USART1_ASSIGNED) # define TTYS1_DEV g_usart1port /* USART1 is ttyS1 */ # define USART1_ASSIGNED 1 -#elif defined(CONFIG_USART2_ISUART) && !defined(USART2_ASSIGNED) +#elif defined(CONFIG_USART2_SERIALDRIVER) && !defined(USART2_ASSIGNED) # define TTYS1_DEV g_usart2port /* USART2 is ttyS1 */ # define USART2_ASSIGNED 1 -#elif defined(CONFIG_USART3_ISUART) && !defined(USART3_ASSIGNED) +#elif defined(CONFIG_USART3_SERIALDRIVER) && !defined(USART3_ASSIGNED) # define TTYS1_DEV g_usart3port /* USART3 is ttyS1 */ # define USART3_ASSIGNED 1 -#elif defined(CONFIG_USART4_ISUART) && !defined(USART4_ASSIGNED) +#elif defined(CONFIG_USART4_SERIALDRIVER) && !defined(USART4_ASSIGNED) # define TTYS1_DEV g_usart4port /* USART4 is ttyS1 */ # define USART4_ASSIGNED 1 #endif @@ -236,19 +236,19 @@ #elif defined(CONFIG_SAMA5_UART4) && !defined(UART4_ASSIGNED) # define TTYS2_DEV g_uart1port /* UART4 is ttyS2 */ # define UART4_ASSIGNED 1 -#elif defined(CONFIG_USART0_ISUART) && !defined(USART0_ASSIGNED) +#elif defined(CONFIG_USART0_SERIALDRIVER) && !defined(USART0_ASSIGNED) # define TTYS2_DEV g_usart0port /* USART0 is ttyS2 */ # define USART0_ASSIGNED 1 -#elif defined(CONFIG_USART1_ISUART) && !defined(USART1_ASSIGNED) +#elif defined(CONFIG_USART1_SERIALDRIVER) && !defined(USART1_ASSIGNED) # define TTYS2_DEV g_usart1port /* USART1 is ttyS2 */ # define USART1_ASSIGNED 1 -#elif defined(CONFIG_USART2_ISUART) && !defined(USART2_ASSIGNED) +#elif defined(CONFIG_USART2_SERIALDRIVER) && !defined(USART2_ASSIGNED) # define TTYS2_DEV g_usart2port /* USART2 is ttyS2 */ # define USART2_ASSIGNED 1 -#elif defined(CONFIG_USART3_ISUART) && !defined(USART3_ASSIGNED) +#elif defined(CONFIG_USART3_SERIALDRIVER) && !defined(USART3_ASSIGNED) # define TTYS2_DEV g_usart3port /* USART3 is ttyS2 */ # define USART3_ASSIGNED 1 -#elif defined(CONFIG_USART4_ISUART) && !defined(USART4_ASSIGNED) +#elif defined(CONFIG_USART4_SERIALDRIVER) && !defined(USART4_ASSIGNED) # define TTYS2_DEV g_usart4port /* USART4 is ttyS2 */ # define USART4_ASSIGNED 1 #endif @@ -267,19 +267,19 @@ #elif defined(CONFIG_SAMA5_UART4) && !defined(UART4_ASSIGNED) # define TTYS3_DEV g_uart1port /* UART4 is ttyS3 */ # define UART4_ASSIGNED 1 -#elif defined(CONFIG_USART0_ISUART) && !defined(USART0_ASSIGNED) +#elif defined(CONFIG_USART0_SERIALDRIVER) && !defined(USART0_ASSIGNED) # define TTYS3_DEV g_usart0port /* USART0 is ttyS3 */ # define USART0_ASSIGNED 1 -#elif defined(CONFIG_USART1_ISUART) && !defined(USART1_ASSIGNED) +#elif defined(CONFIG_USART1_SERIALDRIVER) && !defined(USART1_ASSIGNED) # define TTYS3_DEV g_usart1port /* USART1 is ttyS3 */ # define USART1_ASSIGNED 1 -#elif defined(CONFIG_USART2_ISUART) && !defined(USART2_ASSIGNED) +#elif defined(CONFIG_USART2_SERIALDRIVER) && !defined(USART2_ASSIGNED) # define TTYS3_DEV g_usart2port /* USART2 is ttyS3 */ # define USART2_ASSIGNED 1 -#elif defined(CONFIG_USART3_ISUART) && !defined(USART3_ASSIGNED) +#elif defined(CONFIG_USART3_SERIALDRIVER) && !defined(USART3_ASSIGNED) # define TTYS3_DEV g_usart3port /* USART3 is ttyS3 */ # define USART3_ASSIGNED 1 -#elif defined(CONFIG_USART4_ISUART) && !defined(USART4_ASSIGNED) +#elif defined(CONFIG_USART4_SERIALDRIVER) && !defined(USART4_ASSIGNED) # define TTYS3_DEV g_usart4port /* USART4 is ttyS3 */ # define USART4_ASSIGNED 1 #endif @@ -295,19 +295,19 @@ #elif defined(CONFIG_SAMA5_UART4) && !defined(UART4_ASSIGNED) # define TTYS4_DEV g_uart1port /* UART4 is ttyS4 */ # define UART4_ASSIGNED 1 -#elif defined(CONFIG_USART0_ISUART) && !defined(USART0_ASSIGNED) +#elif defined(CONFIG_USART0_SERIALDRIVER) && !defined(USART0_ASSIGNED) # define TTYS4_DEV g_usart0port /* USART0 is ttyS4 */ # define USART0_ASSIGNED 1 -#elif defined(CONFIG_USART1_ISUART) && !defined(USART1_ASSIGNED) +#elif defined(CONFIG_USART1_SERIALDRIVER) && !defined(USART1_ASSIGNED) # define TTYS4_DEV g_usart1port /* USART1 is ttyS4 */ # define USART1_ASSIGNED 1 -#elif defined(CONFIG_USART2_ISUART) && !defined(USART2_ASSIGNED) +#elif defined(CONFIG_USART2_SERIALDRIVER) && !defined(USART2_ASSIGNED) # define TTYS4_DEV g_usart2port /* USART2 is ttyS4 */ # define USART2_ASSIGNED 1 -#elif defined(CONFIG_USART3_ISUART) && !defined(USART3_ASSIGNED) +#elif defined(CONFIG_USART3_SERIALDRIVER) && !defined(USART3_ASSIGNED) # define TTYS4_DEV g_usart3port /* USART3 is ttyS4 */ # define USART3_ASSIGNED 1 -#elif defined(CONFIG_USART4_ISUART) && !defined(USART4_ASSIGNED) +#elif defined(CONFIG_USART4_SERIALDRIVER) && !defined(USART4_ASSIGNED) # define TTYS4_DEV g_usart4port /* USART4 is ttyS4 */ # define USART4_ASSIGNED 1 #endif @@ -320,19 +320,19 @@ #if defined(CONFIG_SAMA5_UART4) && !defined(UART4_ASSIGNED) # define TTYS5_DEV g_uart4port /* UART4 is ttyS5 */ # define UART1_ASSIGNED 1 -#elif defined(CONFIG_USART0_ISUART) && !defined(USART0_ASSIGNED) +#elif defined(CONFIG_USART0_SERIALDRIVER) && !defined(USART0_ASSIGNED) # define TTYS5_DEV g_usart0port /* USART0 is ttyS5 */ # define USART0_ASSIGNED 1 -#elif defined(CONFIG_USART1_ISUART) && !defined(USART1_ASSIGNED) +#elif defined(CONFIG_USART1_SERIALDRIVER) && !defined(USART1_ASSIGNED) # define TTYS5_DEV g_usart1port /* USART1 is ttyS5 */ # define USART1_ASSIGNED 1 -#elif defined(CONFIG_USART2_ISUART) && !defined(USART2_ASSIGNED) +#elif defined(CONFIG_USART2_SERIALDRIVER) && !defined(USART2_ASSIGNED) # define TTYS5_DEV g_usart2port /* USART2 is ttyS5 */ # define USART2_ASSIGNED 1 -#elif defined(CONFIG_USART3_ISUART) && !defined(USART3_ASSIGNED) +#elif defined(CONFIG_USART3_SERIALDRIVER) && !defined(USART3_ASSIGNED) # define TTYS5_DEV g_usart3port /* USART3 is ttyS5 */ # define USART3_ASSIGNED 1 -#elif defined(CONFIG_USART4_ISUART) && !defined(USART4_ASSIGNED) +#elif defined(CONFIG_USART4_SERIALDRIVER) && !defined(USART4_ASSIGNED) # define TTYS5_DEV g_usart4port /* USART4 is ttyS5 */ # define USART4_ASSIGNED 1 #endif @@ -342,19 +342,19 @@ * could also be the console. */ -#if defined(CONFIG_USART0_ISUART) && !defined(USART0_ASSIGNED) +#if defined(CONFIG_USART0_SERIALDRIVER) && !defined(USART0_ASSIGNED) # define TTYS6_DEV g_usart0port /* USART0 is ttyS6 */ # define USART0_ASSIGNED 1 -#elif defined(CONFIG_USART1_ISUART) && !defined(USART1_ASSIGNED) +#elif defined(CONFIG_USART1_SERIALDRIVER) && !defined(USART1_ASSIGNED) # define TTYS6_DEV g_usart1port /* USART1 is ttyS6 */ # define USART1_ASSIGNED 1 -#elif defined(CONFIG_USART2_ISUART) && !defined(USART2_ASSIGNED) +#elif defined(CONFIG_USART2_SERIALDRIVER) && !defined(USART2_ASSIGNED) # define TTYS6_DEV g_usart2port /* USART2 is ttyS6 */ # define USART2_ASSIGNED 1 -#elif defined(CONFIG_USART3_ISUART) && !defined(USART3_ASSIGNED) +#elif defined(CONFIG_USART3_SERIALDRIVER) && !defined(USART3_ASSIGNED) # define TTYS6_DEV g_usart3port /* USART3 is ttyS6 */ # define USART3_ASSIGNED 1 -#elif defined(CONFIG_USART4_ISUART) && !defined(USART4_ASSIGNED) +#elif defined(CONFIG_USART4_SERIALDRIVER) && !defined(USART4_ASSIGNED) # define TTYS6_DEV g_usart4port /* USART4 is ttyS6 */ # define USART4_ASSIGNED 1 #endif @@ -364,16 +364,16 @@ * USART1-4 could also be the console. */ -#if defined(CONFIG_USART1_ISUART) && !defined(USART1_ASSIGNED) +#if defined(CONFIG_USART1_SERIALDRIVER) && !defined(USART1_ASSIGNED) # define TTYS7_DEV g_usart1port /* USART1 is ttyS7 */ # define USART1_ASSIGNED 1 -#elif defined(CONFIG_USART2_ISUART) && !defined(USART2_ASSIGNED) +#elif defined(CONFIG_USART2_SERIALDRIVER) && !defined(USART2_ASSIGNED) # define TTYS7_DEV g_usart2port /* USART2 is ttyS7 */ # define USART2_ASSIGNED 1 -#elif defined(CONFIG_USART3_ISUART) && !defined(USART3_ASSIGNED) +#elif defined(CONFIG_USART3_SERIALDRIVER) && !defined(USART3_ASSIGNED) # define TTYS7_DEV g_usart3port /* USART3 is ttyS7 */ # define USART3_ASSIGNED 1 -#elif defined(CONFIG_USART4_ISUART) && !defined(USART4_ASSIGNED) +#elif defined(CONFIG_USART4_SERIALDRIVER) && !defined(USART4_ASSIGNED) # define TTYS7_DEV g_usart4port /* USART4 is ttyS7 */ # define USART4_ASSIGNED 1 #endif @@ -383,13 +383,13 @@ * USART2-4 could also be the console. */ -#if defined(CONFIG_USART2_ISUART) && !defined(USART2_ASSIGNED) +#if defined(CONFIG_USART2_SERIALDRIVER) && !defined(USART2_ASSIGNED) # define TTYS8_DEV g_usart2port /* USART2 is ttyS8 */ # define USART2_ASSIGNED 1 -#elif defined(CONFIG_USART3_ISUART) && !defined(USART3_ASSIGNED) +#elif defined(CONFIG_USART3_SERIALDRIVER) && !defined(USART3_ASSIGNED) # define TTYS8_DEV g_usart3port /* USART3 is ttyS8 */ # define USART3_ASSIGNED 1 -#elif defined(CONFIG_USART4_ISUART) && !defined(USART4_ASSIGNED) +#elif defined(CONFIG_USART4_SERIALDRIVER) && !defined(USART4_ASSIGNED) # define TTYS8_DEV g_usart4port /* USART4 is ttyS8 */ # define USART4_ASSIGNED 1 #endif @@ -399,10 +399,10 @@ * USART3-4 could also be the console. */ -#if defined(CONFIG_USART3_ISUART) && !defined(USART3_ASSIGNED) +#if defined(CONFIG_USART3_SERIALDRIVER) && !defined(USART3_ASSIGNED) # define TTYS9_DEV g_usart3port /* USART3 is ttyS9 */ # define USART3_ASSIGNED 1 -#elif defined(CONFIG_USART4_ISUART) && !defined(USART4_ASSIGNED) +#elif defined(CONFIG_USART4_SERIALDRIVER) && !defined(USART4_ASSIGNED) # define TTYS9_DEV g_usart4port /* USART4 is ttyS9 */ # define USART4_ASSIGNED 1 #endif @@ -451,19 +451,19 @@ static int up_uart3_interrupt(int irq, void *context); #ifdef CONFIG_SAMA5_UART4 static int up_uart4_interrupt(int irq, void *context); #endif -#ifdef CONFIG_USART0_ISUART +#ifdef CONFIG_USART0_SERIALDRIVER static int up_usart0_interrupt(int irq, void *context); #endif -#ifdef CONFIG_USART1_ISUART +#ifdef CONFIG_USART1_SERIALDRIVER static int up_usart1_interrupt(int irq, void *context); #endif -#ifdef CONFIG_USART2_ISUART +#ifdef CONFIG_USART2_SERIALDRIVER static int up_usart2_interrupt(int irq, void *context); #endif -#ifdef CONFIG_USART3_ISUART +#ifdef CONFIG_USART3_SERIALDRIVER static int up_usart3_interrupt(int irq, void *context); #endif -#ifdef CONFIG_USART4_ISUART +#ifdef CONFIG_USART4_SERIALDRIVER static int up_usart4_interrupt(int irq, void *context); #endif @@ -525,23 +525,23 @@ static char g_uart3txbuffer[CONFIG_UART3_TXBUFSIZE]; static char g_uart4rxbuffer[CONFIG_UART4_RXBUFSIZE]; static char g_uart4txbuffer[CONFIG_UART4_TXBUFSIZE]; #endif -#ifdef CONFIG_USART0_ISUART +#ifdef CONFIG_USART0_SERIALDRIVER static char g_usart0rxbuffer[CONFIG_USART0_RXBUFSIZE]; static char g_usart0txbuffer[CONFIG_USART0_TXBUFSIZE]; #endif -#ifdef CONFIG_USART1_ISUART +#ifdef CONFIG_USART1_SERIALDRIVER static char g_usart1rxbuffer[CONFIG_USART1_RXBUFSIZE]; static char g_usart1txbuffer[CONFIG_USART1_TXBUFSIZE]; #endif -#ifdef CONFIG_USART2_ISUART +#ifdef CONFIG_USART2_SERIALDRIVER static char g_usart2rxbuffer[CONFIG_USART2_RXBUFSIZE]; static char g_usart2txbuffer[CONFIG_USART2_TXBUFSIZE]; #endif -#ifdef CONFIG_USART3_ISUART +#ifdef CONFIG_USART3_SERIALDRIVER static char g_usart3rxbuffer[CONFIG_USART3_RXBUFSIZE]; static char g_usart3txbuffer[CONFIG_USART3_TXBUFSIZE]; #endif -#ifdef CONFIG_USART4_ISUART +#ifdef CONFIG_USART4_SERIALDRIVER static char g_usart4rxbuffer[CONFIG_USART4_RXBUFSIZE]; static char g_usart4txbuffer[CONFIG_USART4_TXBUFSIZE]; #endif @@ -753,7 +753,7 @@ static uart_dev_t g_uart4port = /* This describes the state of the USART0 port. */ -#ifdef CONFIG_USART0_ISUART +#ifdef CONFIG_USART0_SERIALDRIVER static struct up_dev_s g_usart0priv = { .handler = up_usart0_interrupt, @@ -787,7 +787,7 @@ static uart_dev_t g_usart0port = /* This describes the state of the USART1 port. */ -#ifdef CONFIG_USART1_ISUART +#ifdef CONFIG_USART1_SERIALDRIVER static struct up_dev_s g_usart1priv = { .handler = up_usart1_interrupt, @@ -821,7 +821,7 @@ static uart_dev_t g_usart1port = /* This describes the state of the USART2 port. */ -#ifdef CONFIG_USART2_ISUART +#ifdef CONFIG_USART2_SERIALDRIVER static struct up_dev_s g_usart2priv = { .handler = up_usart2_interrupt, @@ -855,7 +855,7 @@ static uart_dev_t g_usart2port = /* This describes the state of the USART3 port. */ -#ifdef CONFIG_USART3_ISUART +#ifdef CONFIG_USART3_SERIALDRIVER static struct up_dev_s g_usart3priv = { .handler = up_usart3_interrupt, @@ -889,7 +889,7 @@ static uart_dev_t g_usart3port = /* This describes the state of the USART4 port. */ -#ifdef CONFIG_USART4_ISUART +#ifdef CONFIG_USART4_SERIALDRIVER static struct up_dev_s g_usart4priv = { .handler = up_usart4_interrupt, @@ -1073,31 +1073,31 @@ static int up_uart4_interrupt(int irq, void *context) return up_interrupt(&g_uart4port); } #endif -#ifdef CONFIG_USART0_ISUART +#ifdef CONFIG_USART0_SERIALDRIVER static int up_usart0_interrupt(int irq, void *context) { return up_interrupt(&g_usart0port); } #endif -#ifdef CONFIG_USART1_ISUART +#ifdef CONFIG_USART1_SERIALDRIVER static int up_usart1_interrupt(int irq, void *context) { return up_interrupt(&g_usart1port); } #endif -#ifdef CONFIG_USART2_ISUART +#ifdef CONFIG_USART2_SERIALDRIVER static int up_usart2_interrupt(int irq, void *context) { return up_interrupt(&g_usart2port); } #endif -#ifdef CONFIG_USART3_ISUART +#ifdef CONFIG_USART3_SERIALDRIVER static int up_usart3_interrupt(int irq, void *context) { return up_interrupt(&g_usart3port); } #endif -#ifdef CONFIG_USART4_ISUART +#ifdef CONFIG_USART4_SERIALDRIVER static int up_usart4_interrupt(int irq, void *context) { return up_interrupt(&g_usart4port); diff --git a/arch/arm/src/sama5/sam_tickless.c b/arch/arm/src/sama5/sam_tickless.c index a785266a5dd..70cecb1217a 100644 --- a/arch/arm/src/sama5/sam_tickless.c +++ b/arch/arm/src/sama5/sam_tickless.c @@ -377,8 +377,8 @@ int up_timer_gettime(FAR struct timespec *ts) int up_timer_cancel(FAR struct timespec *ts) { - return ONESHOT_INITIALIZED(&g_tickless.oneshot) ? - sam_oneshot_cancel(&g_tickless.oneshot, ts) : + return ONESHOT_INITIALIZED(&g_tickless.oneshot) && FREERUN_INITIALIZED(&g_tickless.freerun) ? + sam_oneshot_cancel(&g_tickless.oneshot, &g_tickless.freerun, ts) : -EAGAIN; } @@ -410,7 +410,7 @@ int up_timer_cancel(FAR struct timespec *ts) int up_timer_start(FAR const struct timespec *ts) { return ONESHOT_INITIALIZED(&g_tickless.oneshot) ? - sam_oneshot_start(&g_tickless.oneshot, sam_oneshot_handler, NULL, ts) : + sam_oneshot_start(&g_tickless.oneshot, &g_tickless.freerun, sam_oneshot_handler, NULL, ts) : -EAGAIN; } #endif /* CONFIG_SCHED_TICKLESS */ diff --git a/arch/arm/src/sama5/sam_twi.c b/arch/arm/src/sama5/sam_twi.c index 8944de9ed4b..14df0f62a42 100644 --- a/arch/arm/src/sama5/sam_twi.c +++ b/arch/arm/src/sama5/sam_twi.c @@ -1200,6 +1200,7 @@ static void twi_hw_initialize(struct twi_dev_s *priv, uint32_t frequency) /* Set the initial TWI data transfer frequency */ + priv->frequency = 0; twi_setfrequency(priv, frequency); /* Enable Interrupts */ diff --git a/arch/arm/src/sama5/sam_wdt.c b/arch/arm/src/sama5/sam_wdt.c index 6868b573c60..d14f45c1983 100644 --- a/arch/arm/src/sama5/sam_wdt.c +++ b/arch/arm/src/sama5/sam_wdt.c @@ -648,7 +648,7 @@ static int sam_ioctl(FAR struct watchdog_lowerhalf_s *lower, int cmd, ****************************************************************************/ /**************************************************************************** - * Name: up_wdginitialize + * Name: sam_wdt_initialize * * Description: * Initialize the WDT watchdog time. The watchdog timer is initialized and @@ -663,7 +663,7 @@ static int sam_ioctl(FAR struct watchdog_lowerhalf_s *lower, int cmd, * ****************************************************************************/ -int up_wdginitialize(void) +int sam_wdt_initialize(void) { FAR struct sam_lowerhalf_s *priv = &g_wdtdev; diff --git a/arch/arm/src/sama5/sam_wdt.h b/arch/arm/src/sama5/sam_wdt.h index 6f99082e163..0f9eab7b75b 100644 --- a/arch/arm/src/sama5/sam_wdt.h +++ b/arch/arm/src/sama5/sam_wdt.h @@ -1,7 +1,7 @@ /**************************************************************************** * arch/arm/src/sama5/sam_wdt.h * - * Copyright (C) 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2013, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -66,6 +66,26 @@ extern "C" * Public Functions ****************************************************************************/ +/**************************************************************************** + * Name: sam_wdt_initialize() + * + * Description: + * Perform architecture-specific initialization of the Watchdog hardware. + * This interface should be provided by all configurations using + * to avoid exposed platform-dependent logic. + * + * At a minimum, this function should call watchdog_register(). + * + * Input parameters: + * None + * + * Returned Value: + * Zero on success; a negated errno value on failure. + * + ****************************************************************************/ + +int sam_wdt_initialize(void); + #undef EXTERN #if defined(__cplusplus) } diff --git a/arch/arm/src/samdl/Kconfig b/arch/arm/src/samdl/Kconfig index 68ea979f909..a890db6a0fd 100644 --- a/arch/arm/src/samdl/Kconfig +++ b/arch/arm/src/samdl/Kconfig @@ -589,8 +589,7 @@ config SAMDL_SERCOM0_ISSPI config SAMDL_SERCOM0_ISUSART bool "USART" - select ARCH_HAVE_USART0 - select USART0_ISUART + select USART0_SERIALDRIVER endchoice @@ -623,8 +622,7 @@ config SAMDL_SERCOM1_ISSPI config SAMDL_SERCOM1_ISUSART bool "USART" - select ARCH_HAVE_USART1 - select USART1_ISUART + select USART1_SERIALDRIVER endchoice @@ -643,8 +641,7 @@ config SAMDL_SERCOM2_ISSPI config SAMDL_SERCOM2_ISUSART bool "USART" - select ARCH_HAVE_USART2 - select USART2_ISUART + select USART2_SERIALDRIVER endchoice @@ -663,8 +660,7 @@ config SAMDL_SERCOM3_ISSPI config SAMDL_SERCOM3_ISUSART bool "USART" - select ARCH_HAVE_USART3 - select USART3_ISUART + select USART3_SERIALDRIVER endchoice @@ -683,8 +679,7 @@ config SAMDL_SERCOM4_ISSPI config SAMDL_SERCOM4_ISUSART bool "USART" - select ARCH_HAVE_USART4 - select USART4_ISUART + select USART4_SERIALDRIVER endchoice @@ -703,8 +698,7 @@ config SAMDL_SERCOM5_ISSPI config SAMDL_SERCOM5_ISUSART bool "USART" - select ARCH_HAVE_USART5 - select USART5_ISUART + select USART5_SERIALDRIVER endchoice diff --git a/arch/arm/src/samdl/sam_config.h b/arch/arm/src/samdl/sam_config.h index 846e3291d31..db85694e5d2 100644 --- a/arch/arm/src/samdl/sam_config.h +++ b/arch/arm/src/samdl/sam_config.h @@ -56,7 +56,7 @@ #define SAMDL_HAVE_USART5 1 #if !defined(CONFIG_SAMDL_SERCOM0) || !defined(CONFIG_SAMDL_SERCOM0_ISUSART) || \ - !defined(CONFIG_USART0_ISUART) + !defined(CONFIG_USART0_SERIALDRIVER) # undef SAMDL_HAVE_USART0 # undef CONFIG_SAMDL_SERCOM0_ISUSART # undef CONFIG_USART0_SERIAL_CONSOLE @@ -66,7 +66,7 @@ #endif #if !defined(CONFIG_SAMDL_SERCOM1) || !defined(CONFIG_SAMDL_SERCOM1_ISUSART) || \ - !defined(CONFIG_USART1_ISUART) + !defined(CONFIG_USART1_SERIALDRIVER) # undef SAMDL_HAVE_USART1 # undef CONFIG_SAMDL_SERCOM1_ISUSART # undef CONFIG_USART1_SERIAL_CONSOLE @@ -76,7 +76,7 @@ #endif #if !defined(CONFIG_SAMDL_SERCOM2) || !defined(CONFIG_SAMDL_SERCOM2_ISUSART) || \ - !defined(CONFIG_USART2_ISUART) + !defined(CONFIG_USART2_SERIALDRIVER) # undef SAMDL_HAVE_USART2 # undef CONFIG_SAMDL_SERCOM2_ISUSART # undef CONFIG_USART2_SERIAL_CONSOLE @@ -86,7 +86,7 @@ #endif #if !defined(CONFIG_SAMDL_SERCOM3) || !defined(CONFIG_SAMDL_SERCOM3_ISUSART) || \ - !defined(CONFIG_USART3_ISUART) + !defined(CONFIG_USART3_SERIALDRIVER) # undef SAMDL_HAVE_USART3 # undef CONFIG_SAMDL_SERCOM3_ISUSART # undef CONFIG_USART3_SERIAL_CONSOLE @@ -96,7 +96,7 @@ #endif #if !defined(CONFIG_SAMDL_SERCOM4) || !defined(CONFIG_SAMDL_SERCOM4_ISUSART) || \ - !defined(CONFIG_USART4_ISUART) + !defined(CONFIG_USART4_SERIALDRIVER) # undef SAMDL_HAVE_USART4 # undef CONFIG_SAMDL_SERCOM4_ISUSART # undef CONFIG_USART4_SERIAL_CONSOLE @@ -106,7 +106,7 @@ #endif #if !defined(CONFIG_SAMDL_SERCOM5) || !defined(CONFIG_SAMDL_SERCOM5_ISUSART) || \ - !defined(CONFIG_USART5_ISUART) + !defined(CONFIG_USART5_SERIALDRIVER) # undef SAMDL_HAVE_USART5 # undef CONFIG_SAMDL_SERCOM5_ISUSART # undef CONFIG_USART5_SERIAL_CONSOLE diff --git a/arch/arm/src/samv7/Kconfig b/arch/arm/src/samv7/Kconfig index 5a68712427d..7a7d75c8408 100644 --- a/arch/arm/src/samv7/Kconfig +++ b/arch/arm/src/samv7/Kconfig @@ -465,31 +465,31 @@ config SAMV7_TWIHS2 config SAMV7_UART0 bool "UART 0" default y - select ARCH_HAVE_UART0 + select UART0_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config SAMV7_UART1 bool "UART 1" default n - select ARCH_HAVE_UART1 + select UART1_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config SAMV7_UART2 bool "UART 2" default y - select ARCH_HAVE_UART2 + select UART2_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config SAMV7_UART3 bool "UART 3" default n - select ARCH_HAVE_UART3 + select UART3_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config SAMV7_UART4 bool "UART 4" default y - select ARCH_HAVE_UART4 + select UART4_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config SAMV7_USBDEVFS @@ -520,21 +520,21 @@ config SAMV7_USART0 bool "USART 0" default n depends on SAMV7_HAVE_USART0 - select ARCH_HAVE_USART0 + select USART0_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config SAMV7_USART1 bool "USART 1" default n depends on SAMV7_HAVE_USART1 - select ARCH_HAVE_USART1 + select USART1_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config SAMV7_USART2 bool "USART 2" default n depends on SAMV7_HAVE_USART2 - select ARCH_HAVE_USART2 + select USART2_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config SAMV7_WDT @@ -549,6 +549,97 @@ config SAMV7_RSWDT endmenu # SAMV7 Peripheral Selection +choice + prompt "JTAG IO Configuration" + default SAMV7_JTAG_FULL_ENABLE + ---help--- + JTAG Enable settings (by default the IO for JTAG-DP and SW-DP are + enabled) + +config SAMV7_JTAG_DISABLE + bool "Disable all JTAG IO" + ---help--- + JTAG Enable settings (by default the IO for JTAG-DP and SW-DP are + enabled) + + When JTAG is disabled PB4-BP7 is assigned as a GPIO and can be + configured for use as GPIO or a Peripheral + +config SAMV7_JTAG_FULL_ENABLE + bool "Enable full JTAG IO to use JTAG-DP + SW-DP" + ---help--- + The JTAG IO is configured for both JTAG-DP + SW-DP" + + PB4 is TDI + PB5 is TDO/TRACESWO + PB6 is TMS/SWDIO + PB7 is TCK/SWCLK + +config SAMV7_JTAG_FULL_SW_ENABLE + bool "Set JTAG-DP IO disabled and Full SW-DP IO enabled" + ---help--- + JTAG IO is configured for SW-DP with Trace" + + PB5 is TDO/TRACESWO + PB6 is TMS/SWDIO + PB7 is TCK/SWCLK + +config SAMV7_JTAG_SW_ENABLE + bool "Set JTAG-DP IO disabled and SW-DP IO enabled" + ---help--- + JTAG IO is configured for SW-DP without Trace " + + PB6 is TMS/SWDIO + PB7 is TCK/SWCLK + +endchoice # JTAG IO Configuration + +choice + prompt "ERASE Pin Configuration" + default SAMV7_ERASE_ENABLE + ---help--- + ERASE Pin Enable settings (by default ERASE pin is enabled) + +config SAMV7_ERASE_DISABLE + bool "Disable ERASE Pin" + ---help--- + ERASE Pin Enable settings (by default ERASE pin is enabled) + + When the ERASE pin is disabled PB12 is assigned as a GPIO and can be + configured for use as GPIO or a Peripheral. + + N.B. a low level must be ensured at startup to prevent Flash erase before + the user application sets PB12 into PIO mode, + +config SAMV7_ERASE_ENABLE + bool "Enable ERASE Pin" + ---help--- + The ERASE pin is configured to reinitialize the Flash content. + +endchoice + +menuconfig SAMV7_SYSTEMRESET + bool "Enable System Reset" + select ARCH_HAVE_RESET + ---help--- + Enable up_systemreset + +if SAMV7_SYSTEMRESET + +config SAMV7_EXTRESET_ERST + int "Drive External nRST duration" + default 0 + range 0 16 + ---help--- + Define if the external reset (nRST) will be generated in up_systemreset + and for how long: + + - A value of 0 will not drive the external reset + - A value of 1-6 will drive the external reset for 2^SAMV7_EXTRESET_ERST + slow clock cycles. + +endif # SAMV7_SYSTEMRESET + menuconfig SAMV7_GPIO_IRQ bool "GPIO pin interrupts" ---help--- @@ -1423,6 +1514,7 @@ endif # SAMV7_TC3 config SAMV7_ONESHOT bool "TC one-shot wrapper" + depends on SAMV7_FREERUN default n if !SCHED_TICKLESS default y if SCHED_TICKLESS ---help--- diff --git a/arch/arm/src/samv7/Make.defs b/arch/arm/src/samv7/Make.defs index 5d3dfc437bd..fbd88a6e7f4 100644 --- a/arch/arm/src/samv7/Make.defs +++ b/arch/arm/src/samv7/Make.defs @@ -150,6 +150,10 @@ ifeq ($(CONFIG_SAMV7_RSWDT),y) CHIP_CSRCS += sam_rswdt.c endif +ifeq ($(CONFIG_SAMV7_SYSTEMRESET),y) +CHIP_CSRCS += sam_systemreset.c +endif + ifeq ($(CONFIG_SAMV7_SPI_MASTER),y) CHIP_CSRCS += sam_spi.c endif diff --git a/arch/arm/src/samv7/sam_config.h b/arch/arm/src/samv7/sam_config.h index 242c2eb5037..05e6db84f11 100644 --- a/arch/arm/src/samv7/sam_config.h +++ b/arch/arm/src/samv7/sam_config.h @@ -113,19 +113,19 @@ * enabled for our purposes. */ -#if !defined(CONFIG_USART0_ISUART) && !defined(CONFIG_USART0_ISSPI) +#if !defined(CONFIG_USART0_SERIALDRIVER) && !defined(CONFIG_USART0_ISSPI) # undef CONFIG_SAMV7_USART0 # undef CONFIG_USART0_SERIAL_CONSOLE # undef CONFIG_USART0_IFLOWCONTROL #endif -#if !defined(CONFIG_USART1_ISUART) && !defined(CONFIG_USART1_ISSPI) +#if !defined(CONFIG_USART1_SERIALDRIVER) && !defined(CONFIG_USART1_ISSPI) # undef CONFIG_SAMV7_USART1 # undef CONFIG_USART1_SERIAL_CONSOLE # undef CONFIG_USART1_IFLOWCONTROL #endif -#if !defined(CONFIG_USART2_ISUART) && !defined(CONFIG_USART2_ISSPI) +#if !defined(CONFIG_USART2_SERIALDRIVER) && !defined(CONFIG_USART2_ISSPI) # undef CONFIG_SAMV7_USART2 # undef CONFIG_USART2_SERIAL_CONSOLE # undef CONFIG_USART2_IFLOWCONTROL diff --git a/arch/arm/src/samv7/sam_gpio.c b/arch/arm/src/samv7/sam_gpio.c index 628c1979f86..32547ff1a3b 100644 --- a/arch/arm/src/samv7/sam_gpio.c +++ b/arch/arm/src/samv7/sam_gpio.c @@ -54,14 +54,33 @@ #include "sam_gpio.h" #include "chip/sam_pio.h" +#include "chip/sam_matrix.h" /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ -/**************************************************************************** - * Private Types - ****************************************************************************/ +#if !defined(CONFIG_SAMV7_ERASE_ENABLE) || \ + !defined(CONFIG_SAMV7_JTAG_FULL_ENABLE) +# if defined(CONFIG_SAMV7_ERASE_DISABLE) +# define SYSIO_ERASE_BIT MATRIX_CCFG_SYSIO_SYSIO12 +# else +# define SYSIO_ERASE_BIT 0 +# endif +# if defined(CONFIG_SAMV7_JTAG_DISABLE) +# define SYSIO_BITS (MATRIX_CCFG_SYSIO_SYSIO4 | MATRIX_CCFG_SYSIO_SYSIO5 | \ + MATRIX_CCFG_SYSIO_SYSIO6 | MATRIX_CCFG_SYSIO_SYSIO7) +# endif +# if defined(CONFIG_SAMV7_JTAG_FULL_SW_ENABLE) +# define SYSIO_BITS MATRIX_CCFG_SYSIO_SYSIO4 +# endif +# if defined(CONFIG_SAMV7_JTAG_SW_ENABLE) +# define SYSIO_BITS (MATRIX_CCFG_SYSIO_SYSIO4 | MATRIX_CCFG_SYSIO_SYSIO5) +# endif +#endif +#if !defined(SYSIO_BITS) +# define SYSIO_BITS 0 +#endif /**************************************************************************** * Private Data @@ -70,7 +89,7 @@ #ifdef CONFIG_DEBUG_GPIO static const char g_portchar[SAMV7_NPIO] = { - 'A' + 'A' #if SAMV7_NPIO > 1 , 'B' #endif @@ -402,6 +421,33 @@ static inline int sam_configperiph(uintptr_t base, uint32_t pin, * Public Functions ****************************************************************************/ +/**************************************************************************** + * Function: sam_gpioinit + * + * Description: + * Based on configuration within the .config file, it does: + * - Configures the CCFG_SYSIO bits. + * + * Typically called from sam_start(). + * + * Assumptions: + * This function is called early in the initialization sequence so that + * no mutual exlusion is necessary. + * + ****************************************************************************/ + +#if !defined(CONFIG_SAMV7_ERASE_ENABLE) || \ + !defined(CONFIG_SAMV7_JTAG_FULL_ENABLE) +void sam_gpioinit(void) +{ + uint32_t regval; + + regval = getreg32(SAM_MATRIX_CCFG_SYSIO); + regval |= (SYSIO_ERASE_BIT | SYSIO_BITS); + putreg32(regval, SAM_MATRIX_CCFG_SYSIO); +} +#endif + /**************************************************************************** * Name: sam_configgpio * diff --git a/arch/arm/src/samv7/sam_gpio.h b/arch/arm/src/samv7/sam_gpio.h index 4b5b6f5208b..2e564ec787d 100644 --- a/arch/arm/src/samv7/sam_gpio.h +++ b/arch/arm/src/samv7/sam_gpio.h @@ -265,6 +265,24 @@ static inline int sam_gpio_pinmask(gpio_pinset_t cfgset) * Public Function Prototypes ************************************************************************************/ +/************************************************************************************ + * Function: sam_gpioinit + * + * Description: + * Based on configuration within the .config file, it does: + * - Remaps positions of alternative functions for GPIO. + * + * Typically called from sam_start(). + * + ************************************************************************************/ + +#if !defined(CONFIG_SAMV7_ERASE_ENABLE) || \ + !defined(CONFIG_SAMV7_JTAG_FULL_ENABLE) +void sam_gpioinit(void); +#else +# define sam_gpioinit() +#endif + /************************************************************************************ * Name: sam_gpioirqinitialize * diff --git a/arch/arm/src/samv7/sam_lowputc.c b/arch/arm/src/samv7/sam_lowputc.c index 502884cc0de..fe298f4f23f 100644 --- a/arch/arm/src/samv7/sam_lowputc.c +++ b/arch/arm/src/samv7/sam_lowputc.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/arm/src/samv7/sam_lowputc.c * - * Copyright (C) 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -348,19 +348,26 @@ void sam_lowsetup(void) #ifdef CONFIG_SAMV7_USART1 (void)sam_configgpio(GPIO_USART1_RXD); (void)sam_configgpio(GPIO_USART1_TXD); -#ifdef CONFIG_USART1_OFLOWCONTROL +# ifdef CONFIG_USART1_OFLOWCONTROL (void)sam_configgpio(GPIO_USART1_CTS); -#endif -#ifdef CONFIG_USART1_IFLOWCONTROL +# endif +# ifdef CONFIG_USART1_IFLOWCONTROL (void)sam_configgpio(GPIO_USART1_RTS); -#endif +# endif + /* To use the USART1 as an USART, the SYSIO Pin4 must be bound to PB4 * instead of TDI */ +# if defined(CONFIG_SAMV7_JTAG_FULL_ENABLE) +# warning CONFIG_SAMV7_JTAG_FULL_ENABLE is incompatible with CONFIG_SAMV7_USART1. +# warning The SYSIO Pin4 must be bound to PB4 to use USART1 +# endif + uint32_t sysioreg = getreg32(SAM_MATRIX_CCFG_SYSIO); sysioreg |= MATRIX_CCFG_SYSIO_SYSIO4; putreg32(sysioreg, SAM_MATRIX_CCFG_SYSIO); + #endif #ifdef CONFIG_SAMV7_USART2 diff --git a/arch/arm/src/samv7/sam_oneshot.c b/arch/arm/src/samv7/sam_oneshot.c index 34fa89843e3..76c4ee1a41b 100644 --- a/arch/arm/src/samv7/sam_oneshot.c +++ b/arch/arm/src/samv7/sam_oneshot.c @@ -60,6 +60,7 @@ #include #include "sam_oneshot.h" +#include "sam_freerun.h" #ifdef CONFIG_SAMV7_ONESHOT @@ -124,10 +125,11 @@ static void sam_oneshot_handler(TC_HANDLE tch, void *arg, uint32_t sr) /* Forward the event, clearing out any vestiges */ - oneshot_handler = (oneshot_handler_t)oneshot->handler; - oneshot->handler = NULL; - oneshot_arg = (void *)oneshot->arg; - oneshot->arg = NULL; + oneshot_handler = (oneshot_handler_t)oneshot->handler; + oneshot->handler = NULL; + oneshot_arg = (void *)oneshot->arg; + oneshot->arg = NULL; + oneshot->start_count = 0; oneshot_handler(oneshot_arg); } @@ -224,10 +226,11 @@ int sam_oneshot_initialize(struct sam_oneshot_s *oneshot, int chan, * success. */ - oneshot->chan = chan; - oneshot->running = false; - oneshot->handler = NULL; - oneshot->arg = NULL; + oneshot->chan = chan; + oneshot->running = false; + oneshot->handler = NULL; + oneshot->arg = NULL; + oneshot->start_count = 0; return OK; } @@ -251,8 +254,8 @@ int sam_oneshot_initialize(struct sam_oneshot_s *oneshot, int chan, * ****************************************************************************/ -int sam_oneshot_start(struct sam_oneshot_s *oneshot, oneshot_handler_t handler, - void *arg, const struct timespec *ts) +int sam_oneshot_start(struct sam_oneshot_s *oneshot, struct sam_freerun_s *freerun, + oneshot_handler_t handler, void *arg, const struct timespec *ts) { uint64_t usec; uint64_t regval; @@ -270,7 +273,7 @@ int sam_oneshot_start(struct sam_oneshot_s *oneshot, oneshot_handler_t handler, /* Yes.. then cancel it */ tcvdbg("Already running... cancelling\n"); - (void)sam_oneshot_cancel(oneshot, NULL); + (void)sam_oneshot_cancel(oneshot, freerun, NULL); } /* Save the new handler and its argument */ @@ -309,6 +312,26 @@ int sam_oneshot_start(struct sam_oneshot_s *oneshot, oneshot_handler_t handler, sam_tc_start(oneshot->tch); + /* The function sam_tc_start() starts the timer/counter by setting the + * bits TC_CCR_CLKEN and TC_CCR_SWTRG in the channel control register. + * The first one enables the timer/counter the latter performs an + * software trigger, which starts the clock and sets the counter + * register to zero. This reset is performed with the next valid edge + * of the selected clock. Thus it can take up USEC_PER_TICK microseconds + * until the counter register becomes zero. + * + * If the timer is canceled within this period the counter register holds + * the counter value for the last timer/counter run. To circumvent this + * the counter value of the freerun timer/counter is stored at each start + * of the oneshot timer/counter. + * + * The function up_timer_gettime() could also be used for this but it takes + * too long. If up_timer_gettime() is called within this function the problem + * vanishes at least if compiled with no optimisation. + */ + + oneshot->start_count = sam_tc_getcounter(freerun->tch); + /* Enable interrupts. We should get the callback when the interrupt * occurs. */ @@ -343,7 +366,8 @@ int sam_oneshot_start(struct sam_oneshot_s *oneshot, oneshot_handler_t handler, * ****************************************************************************/ -int sam_oneshot_cancel(struct sam_oneshot_s *oneshot, struct timespec *ts) +int sam_oneshot_cancel(struct sam_oneshot_s *oneshot, struct sam_freerun_s *freerun, + struct timespec *ts) { irqstate_t flags; uint64_t usec; @@ -384,6 +408,17 @@ int sam_oneshot_cancel(struct sam_oneshot_s *oneshot, struct timespec *ts) count = sam_tc_getcounter(oneshot->tch); rc = sam_tc_getregister(oneshot->tch, TC_REGC); + /* In the case the timer/counter was canceled very short after its start, + * the counter register can hold the wrong value (the value of the last + * run). To prevent this the counter value is set to zero if not at + * least on tick passed since the start of the timer/counter. + */ + + if (count > 0 && sam_tc_getcounter(freerun->tch) == oneshot->start_count) + { + count = 0; + } + /* Now we can disable the interrupt and stop the timer. */ sam_tc_attach(oneshot->tch, NULL, NULL, 0); @@ -432,6 +467,14 @@ int sam_oneshot_cancel(struct sam_oneshot_s *oneshot, struct timespec *ts) usec = (((uint64_t)(rc - count)) * USEC_PER_SEC) / sam_tc_divfreq(oneshot->tch); + /* Each time the timer/counter is canceled the time calculated from + * the two registers (counter and REGC) is accurate up to an error + * between 0 and USEC_PER_TICK microseconds. To correct this error + * one tick which means USEC_PER_TICK microseconds are subtracted. + */ + + usec = usec > USEC_PER_TICK ? usec - USEC_PER_TICK : 0; + /* Return the time remaining in the correct form */ sec = usec / USEC_PER_SEC; diff --git a/arch/arm/src/samv7/sam_oneshot.h b/arch/arm/src/samv7/sam_oneshot.h index 62efde8047d..6c4e42337f1 100644 --- a/arch/arm/src/samv7/sam_oneshot.h +++ b/arch/arm/src/samv7/sam_oneshot.h @@ -46,6 +46,7 @@ #include #include "sam_tc.h" +#include "sam_freerun.h" #ifdef CONFIG_SAMV7_ONESHOT @@ -82,6 +83,11 @@ struct sam_oneshot_s volatile oneshot_handler_t handler; /* Oneshot expiration callback */ volatile void *arg; /* The argument that will accompany * the callback */ + volatile uint32_t start_count; /* Stores the value of the freerun counter, + * at each start of the onshot timer. Is neccesary + * to find out if the onshot counter was updated + * correctly at the time of the call to + * sam_oneshot_cancel or not. */ }; /**************************************************************************** @@ -157,6 +163,9 @@ int sam_oneshot_max_delay(struct sam_oneshot_s *oneshot, uint64_t *usec); * oneshot Caller allocated instance of the oneshot state structure. This * structure must have been previously initialized via a call to * sam_oneshot_initialize(); + * freerun Caller allocated instance of the freerun state structure. This + * structure must have been previously initialized via a call to + * sam_freerun_initialize(); * handler The function to call when when the oneshot timer expires. * arg An opaque argument that will accompany the callback. * ts Provides the duration of the one shot timer. @@ -167,8 +176,8 @@ int sam_oneshot_max_delay(struct sam_oneshot_s *oneshot, uint64_t *usec); * ****************************************************************************/ -int sam_oneshot_start(struct sam_oneshot_s *oneshot, oneshot_handler_t handler, - void *arg, const struct timespec *ts); +int sam_oneshot_start(struct sam_oneshot_s *oneshot, struct sam_freerun_s *freerun, + oneshot_handler_t handler, void *arg, const struct timespec *ts); /**************************************************************************** * Name: sam_oneshot_cancel @@ -183,6 +192,9 @@ int sam_oneshot_start(struct sam_oneshot_s *oneshot, oneshot_handler_t handler, * oneshot Caller allocated instance of the oneshot state structure. This * structure must have been previously initialized via a call to * sam_oneshot_initialize(); + * freerun Caller allocated instance of the freerun state structure. This + * structure must have been previously initialized via a call to + * sam_freerun_initialize(); * ts The location in which to return the time remaining on the * oneshot timer. A time of zero is returned if the timer is * not running. @@ -194,7 +206,8 @@ int sam_oneshot_start(struct sam_oneshot_s *oneshot, oneshot_handler_t handler, * ****************************************************************************/ -int sam_oneshot_cancel(struct sam_oneshot_s *oneshot, struct timespec *ts); +int sam_oneshot_cancel(struct sam_oneshot_s *oneshot, struct sam_freerun_s *freerun, + struct timespec *ts); #undef EXTERN #ifdef __cplusplus diff --git a/arch/arm/src/samv7/sam_rswdt.c b/arch/arm/src/samv7/sam_rswdt.c index 61593a54c4d..20ea3c21834 100644 --- a/arch/arm/src/samv7/sam_rswdt.c +++ b/arch/arm/src/samv7/sam_rswdt.c @@ -648,7 +648,7 @@ static int sam_ioctl(FAR struct watchdog_lowerhalf_s *lower, int cmd, ****************************************************************************/ /**************************************************************************** - * Name: up_wdginitialize + * Name: sam_rswdt_initialize * * Description: * Initialize the RSWDT watchdog time. The watchdog timer is initialized and @@ -663,7 +663,7 @@ static int sam_ioctl(FAR struct watchdog_lowerhalf_s *lower, int cmd, * ****************************************************************************/ -int up_wdginitialize(void) +int sam_rswdt_initialize(void) { FAR struct sam_lowerhalf_s *priv = &g_wdtdev; diff --git a/arch/arm/src/samv7/sam_serial.c b/arch/arm/src/samv7/sam_serial.c index bb7827ea636..6744a72ce2e 100644 --- a/arch/arm/src/samv7/sam_serial.c +++ b/arch/arm/src/samv7/sam_serial.c @@ -123,13 +123,13 @@ # elif defined(CONFIG_SAMV7_UART4) # define TTYS0_DEV g_uart4port /* UART4 is ttyS0 */ # define UART4_ASSIGNED 1 -# elif defined(CONFIG_SAMV7_USART0) && defined(CONFIG_USART0_ISUART) +# elif defined(CONFIG_SAMV7_USART0) && defined(CONFIG_USART0_SERIALDRIVER) # define TTYS0_DEV g_usart0port /* USART0 is ttyS0 */ # define USART0_ASSIGNED 1 -# elif defined(CONFIG_SAMV7_USART1) && defined(CONFIG_USART1_ISUART) +# elif defined(CONFIG_SAMV7_USART1) && defined(CONFIG_USART1_SERIALDRIVER) # define TTYS0_DEV g_usart1port /* USART1 is ttyS0 */ # define USART1_ASSIGNED 1 -# elif defined(CONFIG_SAMV7_USART2) && defined(CONFIG_USART2_ISUART) +# elif defined(CONFIG_SAMV7_USART2) && defined(CONFIG_USART2_SERIALDRIVER) # define TTYS0_DEV g_usart2port /* USART2 is ttyS0 */ # define USART2_ASSIGNED 1 # endif @@ -154,15 +154,15 @@ #elif defined(CONFIG_SAMV7_UART4) && !defined(UART4_ASSIGNED) # define TTYS1_DEV g_uart4port /* UART4 is ttyS1 */ # define UART4_ASSIGNED 1 -#elif defined(CONFIG_SAMV7_USART0) && defined(CONFIG_USART0_ISUART) && \ +#elif defined(CONFIG_SAMV7_USART0) && defined(CONFIG_USART0_SERIALDRIVER) && \ !defined(USART0_ASSIGNED) # define TTYS1_DEV g_usart0port /* USART0 is ttyS1 */ # define USART0_ASSIGNED 1 -#elif defined(CONFIG_SAMV7_USART1) && defined(CONFIG_USART1_ISUART) && \ +#elif defined(CONFIG_SAMV7_USART1) && defined(CONFIG_USART1_SERIALDRIVER) && \ !defined(USART1_ASSIGNED) # define TTYS1_DEV g_usart1port /* USART1 is ttyS1 */ # define USART1_ASSIGNED 1 -#elif defined(CONFIG_SAMV7_USART2) && defined(CONFIG_USART2_ISUART) && \ +#elif defined(CONFIG_SAMV7_USART2) && defined(CONFIG_USART2_SERIALDRIVER) && \ !defined(USART2_ASSIGNED) # define TTYS1_DEV g_usart2port /* USART2 is ttyS1 */ # define USART2_ASSIGNED 1 @@ -185,15 +185,15 @@ #elif defined(CONFIG_SAMV7_UART4) && !defined(UART4_ASSIGNED) # define TTYS2_DEV g_uart4port /* UART4 is ttyS2 */ # define UART4_ASSIGNED 1 -#elif defined(CONFIG_SAMV7_USART0) && defined(CONFIG_USART0_ISUART) && \ +#elif defined(CONFIG_SAMV7_USART0) && defined(CONFIG_USART0_SERIALDRIVER) && \ !defined(USART0_ASSIGNED) # define TTYS2_DEV g_usart0port /* USART0 is ttyS2 */ # define USART0_ASSIGNED 1 -#elif defined(CONFIG_SAMV7_USART1) && defined(CONFIG_USART1_ISUART) && \ +#elif defined(CONFIG_SAMV7_USART1) && defined(CONFIG_USART1_SERIALDRIVER) && \ !defined(USART1_ASSIGNED) # define TTYS2_DEV g_usart1port /* USART1 is ttyS2 */ # define USART1_ASSIGNED 1 -#elif defined(CONFIG_SAMV7_USART2) && defined(CONFIG_USART2_ISUART) && \ +#elif defined(CONFIG_SAMV7_USART2) && defined(CONFIG_USART2_SERIALDRIVER) && \ !defined(USART2_ASSIGNED) # define TTYS2_DEV g_usart2port /* USART2 is ttyS2 */ # define USART2_ASSIGNED 1 @@ -213,15 +213,15 @@ #elif defined(CONFIG_SAMV7_UART4) && !defined(UART4_ASSIGNED) # define TTYS3_DEV g_uart4port /* UART4 is ttyS3 */ # define UART4_ASSIGNED 1 -#elif defined(CONFIG_SAMV7_USART0) && defined(CONFIG_USART0_ISUART) && \ +#elif defined(CONFIG_SAMV7_USART0) && defined(CONFIG_USART0_SERIALDRIVER) && \ !defined(USART0_ASSIGNED) # define TTYS3_DEV g_usart0port /* USART0 is ttyS3 */ # define USART0_ASSIGNED 1 -#elif defined(CONFIG_SAMV7_USART1) && defined(CONFIG_USART1_ISUART) && \ +#elif defined(CONFIG_SAMV7_USART1) && defined(CONFIG_USART1_SERIALDRIVER) && \ !defined(USART1_ASSIGNED) # define TTYS3_DEV g_usart1port /* USART1 is ttyS3 */ # define USART1_ASSIGNED 1 -#elif defined(CONFIG_SAMV7_USART2) && defined(CONFIG_USART2_ISUART) && \ +#elif defined(CONFIG_SAMV7_USART2) && defined(CONFIG_USART2_SERIALDRIVER) && \ !defined(USART2_ASSIGNED) # define TTYS3_DEV g_usart2port /* USART2 is ttyS3 */ # define USART2_ASSIGNED 1 @@ -238,15 +238,15 @@ #elif defined(CONFIG_SAMV7_UART4) && !defined(UART4_ASSIGNED) # define TTYS4_DEV g_uart4port /* UART4 is ttyS4 */ # define UART4_ASSIGNED 1 -#elif defined(CONFIG_SAMV7_USART0) && defined(CONFIG_USART0_ISUART) && \ +#elif defined(CONFIG_SAMV7_USART0) && defined(CONFIG_USART0_SERIALDRIVER) && \ !defined(USART0_ASSIGNED) # define TTYS4_DEV g_usart0port /* USART0 is ttyS4 */ # define USART0_ASSIGNED 1 -#elif defined(CONFIG_SAMV7_USART1) && defined(CONFIG_USART1_ISUART) && \ +#elif defined(CONFIG_SAMV7_USART1) && defined(CONFIG_USART1_SERIALDRIVER) && \ !defined(USART1_ASSIGNED) # define TTYS4_DEV g_usart1port /* USART1 is ttyS4 */ # define USART1_ASSIGNED 1 -#elif defined(CONFIG_SAMV7_USART2) && defined(CONFIG_USART2_ISUART) && \ +#elif defined(CONFIG_SAMV7_USART2) && defined(CONFIG_USART2_SERIALDRIVER) && \ !defined(USART2_ASSIGNED) # define TTYS4_DEV g_usart2port /* USART2 is ttyS4 */ # define USART2_ASSIGNED 1 @@ -260,15 +260,15 @@ #if defined(CONFIG_SAMV7_UART4) && !defined(UART4_ASSIGNED) # define TTYS5_DEV g_uart4port /* UART4 is ttyS5 */ # define UART4_ASSIGNED 1 -#elif defined(CONFIG_SAMV7_USART0) && defined(CONFIG_USART0_ISUART) && \ +#elif defined(CONFIG_SAMV7_USART0) && defined(CONFIG_USART0_SERIALDRIVER) && \ !defined(USART0_ASSIGNED) # define TTYS5_DEV g_usart0port /* USART0 is ttyS5 */ # define USART0_ASSIGNED 1 -#elif defined(CONFIG_SAMV7_USART1) && defined(CONFIG_USART1_ISUART) && \ +#elif defined(CONFIG_SAMV7_USART1) && defined(CONFIG_USART1_SERIALDRIVER) && \ !defined(USART1_ASSIGNED) # define TTYS5_DEV g_usart1port /* USART1 is ttyS5 */ # define USART1_ASSIGNED 1 -#elif defined(CONFIG_SAMV7_USART2) && defined(CONFIG_USART2_ISUART) && \ +#elif defined(CONFIG_SAMV7_USART2) && defined(CONFIG_USART2_SERIALDRIVER) && \ !defined(USART2_ASSIGNED) # define TTYS5_DEV g_usart2port /* USART2 is ttyS5 */ # define USART2_ASSIGNED 1 @@ -279,15 +279,15 @@ * One of USART0-2 could also be the console. */ -#if defined(CONFIG_SAMV7_USART0) && defined(CONFIG_USART0_ISUART) && \ +#if defined(CONFIG_SAMV7_USART0) && defined(CONFIG_USART0_SERIALDRIVER) && \ !defined(USART0_ASSIGNED) # define TTYS6_DEV g_usart0port /* USART0 is ttyS6 */ # define USART0_ASSIGNED 1 -#elif defined(CONFIG_SAMV7_USART1) && defined(CONFIG_USART1_ISUART) && \ +#elif defined(CONFIG_SAMV7_USART1) && defined(CONFIG_USART1_SERIALDRIVER) && \ !defined(USART1_ASSIGNED) # define TTYS6_DEV g_usart1port /* USART1 is ttyS6 */ # define USART1_ASSIGNED 1 -#elif defined(CONFIG_SAMV7_USART2) && defined(CONFIG_USART2_ISUART) && \ +#elif defined(CONFIG_SAMV7_USART2) && defined(CONFIG_USART2_SERIALDRIVER) && \ !defined(USART2_ASSIGNED) # define TTYS6_DEV g_usart2port /* USART2 is ttyS6 */ # define USART2_ASSIGNED 1 @@ -298,11 +298,11 @@ * One of of USART1-2 could also be the console. */ -#if defined(CONFIG_SAMV7_USART1) && defined(CONFIG_USART1_ISUART) && \ +#if defined(CONFIG_SAMV7_USART1) && defined(CONFIG_USART1_SERIALDRIVER) && \ !defined(USART1_ASSIGNED) # define TTYS7_DEV g_usart1port /* USART1 is ttyS7 */ # define USART1_ASSIGNED 1 -#elif defined(CONFIG_SAMV7_USART2) && defined(CONFIG_USART2_ISUART) && \ +#elif defined(CONFIG_SAMV7_USART2) && defined(CONFIG_USART2_SERIALDRIVER) && \ !defined(USART2_ASSIGNED) # define TTYS7_DEV g_usart2port /* USART2 is ttyS7 */ # define USART2_ASSIGNED 1 @@ -369,13 +369,13 @@ static int sam_uart3_interrupt(int irq, void *context); #ifdef CONFIG_SAMV7_UART4 static int sam_uart4_interrupt(int irq, void *context); #endif -#if defined(CONFIG_SAMV7_USART0) && defined(CONFIG_USART0_ISUART) +#if defined(CONFIG_SAMV7_USART0) && defined(CONFIG_USART0_SERIALDRIVER) static int sam_usart0_interrupt(int irq, void *context); #endif -#if defined(CONFIG_SAMV7_USART1) && defined(CONFIG_USART1_ISUART) +#if defined(CONFIG_SAMV7_USART1) && defined(CONFIG_USART1_SERIALDRIVER) static int sam_usart1_interrupt(int irq, void *context); #endif -#if defined(CONFIG_SAMV7_USART2) && defined(CONFIG_USART2_ISUART) +#if defined(CONFIG_SAMV7_USART2) && defined(CONFIG_USART2_SERIALDRIVER) static int sam_usart2_interrupt(int irq, void *context); #endif static int sam_ioctl(struct file *filep, int cmd, unsigned long arg); @@ -432,15 +432,15 @@ static char g_uart3txbuffer[CONFIG_UART3_TXBUFSIZE]; static char g_uart4rxbuffer[CONFIG_UART4_RXBUFSIZE]; static char g_uart4txbuffer[CONFIG_UART4_TXBUFSIZE]; #endif -#if defined(CONFIG_SAMV7_USART0) && defined(CONFIG_USART0_ISUART) +#if defined(CONFIG_SAMV7_USART0) && defined(CONFIG_USART0_SERIALDRIVER) static char g_usart0rxbuffer[CONFIG_USART0_RXBUFSIZE]; static char g_usart0txbuffer[CONFIG_USART0_TXBUFSIZE]; #endif -#if defined(CONFIG_SAMV7_USART1) && defined(CONFIG_USART1_ISUART) +#if defined(CONFIG_SAMV7_USART1) && defined(CONFIG_USART1_SERIALDRIVER) static char g_usart1rxbuffer[CONFIG_USART1_RXBUFSIZE]; static char g_usart1txbuffer[CONFIG_USART1_TXBUFSIZE]; #endif -#if defined(CONFIG_SAMV7_USART2) && defined(CONFIG_USART2_ISUART) +#if defined(CONFIG_SAMV7_USART2) && defined(CONFIG_USART2_SERIALDRIVER) static char g_usart2rxbuffer[CONFIG_USART2_RXBUFSIZE]; static char g_usart2txbuffer[CONFIG_USART2_TXBUFSIZE]; #endif @@ -602,7 +602,7 @@ static uart_dev_t g_uart4port = /* This describes the state of the USART0 port. */ -#if defined(CONFIG_SAMV7_USART0) && defined(CONFIG_USART0_ISUART) +#if defined(CONFIG_SAMV7_USART0) && defined(CONFIG_USART0_SERIALDRIVER) static struct sam_dev_s g_usart0priv = { .usartbase = SAM_USART0_BASE, @@ -636,7 +636,7 @@ static uart_dev_t g_usart0port = /* This describes the state of the USART1 port. */ -#if defined(CONFIG_SAMV7_USART1) && defined(CONFIG_USART1_ISUART) +#if defined(CONFIG_SAMV7_USART1) && defined(CONFIG_USART1_SERIALDRIVER) static struct sam_dev_s g_usart1priv = { .usartbase = SAM_USART1_BASE, @@ -670,7 +670,7 @@ static uart_dev_t g_usart1port = /* This describes the state of the USART2 port. */ -#if defined(CONFIG_SAMV7_USART2) && defined(CONFIG_USART2_ISUART) +#if defined(CONFIG_SAMV7_USART2) && defined(CONFIG_USART2_SERIALDRIVER) static struct sam_dev_s g_usart2priv = { .usartbase = SAM_USART2_BASE, @@ -1115,19 +1115,19 @@ static int sam_uart4_interrupt(int irq, void *context) * ****************************************************************************/ -#if defined(CONFIG_SAMV7_USART0) && defined(CONFIG_USART0_ISUART) +#if defined(CONFIG_SAMV7_USART0) && defined(CONFIG_USART0_SERIALDRIVER) static int sam_usart0_interrupt(int irq, void *context) { return sam_interrupt(&g_usart0port); } #endif -#if defined(CONFIG_SAMV7_USART1) && defined(CONFIG_USART1_ISUART) +#if defined(CONFIG_SAMV7_USART1) && defined(CONFIG_USART1_SERIALDRIVER) static int sam_usart1_interrupt(int irq, void *context) { return sam_interrupt(&g_usart1port); } #endif -#if defined(CONFIG_SAMV7_USART2) && defined(CONFIG_USART2_ISUART) +#if defined(CONFIG_SAMV7_USART2) && defined(CONFIG_USART2_SERIALDRIVER) static int sam_usart2_interrupt(int irq, void *context) { return sam_interrupt(&g_usart2port); diff --git a/arch/arm/src/samv7/sam_start.c b/arch/arm/src/samv7/sam_start.c index 9d5331721f8..0e540b0ca58 100644 --- a/arch/arm/src/samv7/sam_start.c +++ b/arch/arm/src/samv7/sam_start.c @@ -58,6 +58,7 @@ #include "sam_mpuinit.h" #include "sam_userspace.h" #include "sam_start.h" +#include "sam_gpio.h" /**************************************************************************** * Pre-processor Definitions @@ -357,6 +358,7 @@ void __start(void) sam_clockconfig(); sam_fpuconfig(); + sam_gpioinit(); sam_lowsetup(); /* Enable/disable tightly coupled memories */ diff --git a/arch/arm/src/samv7/sam_systemreset.c b/arch/arm/src/samv7/sam_systemreset.c new file mode 100644 index 00000000000..fbc9f19daf2 --- /dev/null +++ b/arch/arm/src/samv7/sam_systemreset.c @@ -0,0 +1,90 @@ +/**************************************************************************** + * arch/arm/src/samv7/sam_systemreset.c + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * David Sidrane + * + * 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. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include + +#include +#include + +#include "up_arch.h" +#include "chip/sam_rstc.h" + +#ifdef CONFIG_SAMV7_SYSTEMRESET + +/**************************************************************************** + * Public functions + ****************************************************************************/ + +/**************************************************************************** + * Name: up_systemreset + * + * Description: + * Internal reset logic. + * + ****************************************************************************/ + +void up_systemreset(void) +{ + uint32_t rstcr; +#if defined(CONFIG_SAMV7_EXTRESET_ERST) && CONFIG_SAMV7_EXTRESET_ERST != 0 + uint32_t rstmr; +#endif + + rstcr = (RSTC_CR_PROCRST | RSTC_CR_KEY); + +#if defined(CONFIG_SAMV7_EXTRESET_ERST) && CONFIG_SAMV7_EXTRESET_ERST != 0 + rstcr |= RSTC_CR_EXTRST; + + rstmr = getreg32(SAM_RSTC_MR); + rstmr &= ~RSTC_MR_ERSTL_MASK; + rstmr &= RSTC_MR_ERSTL(CONFIG_SAMV7_EXTRESET_ERST-1) | RSTC_MR_KEY; + putreg32(rstmr, SAM_RSTC_MR); +#endif + + putreg32(rstcr, SAM_RSTC_CR); + + /* Wait for the reset */ + + for (; ; ); +} +#endif /* CONFIG_SAMV7_SYSTEMRESET */ diff --git a/arch/arm/src/samv7/sam_tickless.c b/arch/arm/src/samv7/sam_tickless.c index 33cbc948c1b..3d1a7ad95ac 100644 --- a/arch/arm/src/samv7/sam_tickless.c +++ b/arch/arm/src/samv7/sam_tickless.c @@ -363,8 +363,8 @@ int up_timer_gettime(FAR struct timespec *ts) int up_timer_cancel(FAR struct timespec *ts) { - return ONESHOT_INITIALIZED(&g_tickless.oneshot) ? - sam_oneshot_cancel(&g_tickless.oneshot, ts) : + return ONESHOT_INITIALIZED(&g_tickless.oneshot) && FREERUN_INITIALIZED(&g_tickless.freerun) ? + sam_oneshot_cancel(&g_tickless.oneshot, &g_tickless.freerun, ts) : -EAGAIN; } @@ -396,7 +396,7 @@ int up_timer_cancel(FAR struct timespec *ts) int up_timer_start(FAR const struct timespec *ts) { return ONESHOT_INITIALIZED(&g_tickless.oneshot) ? - sam_oneshot_start(&g_tickless.oneshot, sam_oneshot_handler, NULL, ts) : + sam_oneshot_start(&g_tickless.oneshot, &g_tickless.freerun, sam_oneshot_handler, NULL, ts) : -EAGAIN; } #endif /* CONFIG_SCHED_TICKLESS */ diff --git a/arch/arm/src/samv7/sam_twihs.c b/arch/arm/src/samv7/sam_twihs.c index f11ae78cbb3..fa5a8b2a525 100644 --- a/arch/arm/src/samv7/sam_twihs.c +++ b/arch/arm/src/samv7/sam_twihs.c @@ -1230,6 +1230,7 @@ static void twi_hw_initialize(struct twi_dev_s *priv, uint32_t frequency) /* Set the initial TWIHS data transfer frequency */ + priv->frequency = 0; twi_setfrequency(priv, frequency); /* Enable Interrupts */ diff --git a/arch/arm/src/samv7/sam_usbdevhs.c b/arch/arm/src/samv7/sam_usbdevhs.c index 80bf1619c59..de6872e92ee 100644 --- a/arch/arm/src/samv7/sam_usbdevhs.c +++ b/arch/arm/src/samv7/sam_usbdevhs.c @@ -3259,15 +3259,6 @@ static void sam_suspend(struct sam_usbdev_s *priv) priv->prevstate = priv->devstate; priv->devstate = USBHS_DEVSTATE_SUSPENDED; - /* Disable clocking to the USBHS peripheral - * - * NOTE: The Atmel sample code disables USB clocking here (via the PMC - * CKGR_UCKR). However, we cannot really do that here because that - * clocking is also needed by the UHPHS host. - */ - - sam_usbhs_disableclk(); - /* Let the board-specific logic know that we have entered the * suspend state. This may trigger additional reduced power * consumption measures. diff --git a/arch/arm/src/samv7/sam_wdt.c b/arch/arm/src/samv7/sam_wdt.c index 3f8e858ead3..8d638066820 100644 --- a/arch/arm/src/samv7/sam_wdt.c +++ b/arch/arm/src/samv7/sam_wdt.c @@ -648,7 +648,7 @@ static int sam_ioctl(FAR struct watchdog_lowerhalf_s *lower, int cmd, ****************************************************************************/ /**************************************************************************** - * Name: up_wdginitialize + * Name: sam_wdt_initialize * * Description: * Initialize the WDT watchdog time. The watchdog timer is initialized and @@ -663,7 +663,7 @@ static int sam_ioctl(FAR struct watchdog_lowerhalf_s *lower, int cmd, * ****************************************************************************/ -int up_wdginitialize(void) +int sam_wdt_initialize(void) { FAR struct sam_lowerhalf_s *priv = &g_wdtdev; diff --git a/arch/arm/src/samv7/sam_wdt.h b/arch/arm/src/samv7/sam_wdt.h index d5d7c50728b..f5ee97a2479 100644 --- a/arch/arm/src/samv7/sam_wdt.h +++ b/arch/arm/src/samv7/sam_wdt.h @@ -66,6 +66,46 @@ extern "C" * Public Functions ****************************************************************************/ +/**************************************************************************** + * Name: sam_wdt_initialize() + * + * Description: + * Perform architecture-specific initialization of the WDT hardware. + * This interface should be provided by all configurations using + * to avoid exposed platform-dependent logic. + * + * At a minimum, this function should call watchdog_register(). + * + * Input parameters: + * None + * + * Returned Value: + * Zero on success; a negated errno value on failure. + * + ****************************************************************************/ + +int sam_wdt_initialize(void); + +/**************************************************************************** + * Name: sam_rswdt_initialize() + * + * Description: + * Perform architecture-specific initialization of the RSWDT hardware. + * This interface should be provided by all configurations using + * to avoid exposed platform-dependent logic. + * + * At a minimum, this function should call watchdog_register(). + * + * Input parameters: + * None + * + * Returned Value: + * Zero on success; a negated errno value on failure. + * + ****************************************************************************/ + +int sam_rswdt_initialize(void); + #undef EXTERN #if defined(__cplusplus) } diff --git a/arch/arm/src/stm32/Kconfig b/arch/arm/src/stm32/Kconfig index 4c4dd327c0c..1da3821f825 100644 --- a/arch/arm/src/stm32/Kconfig +++ b/arch/arm/src/stm32/Kconfig @@ -879,6 +879,13 @@ config ARCH_CHIP_STM32F411RE select STM32_STM32F411 select ARCH_HAVE_FPU +config ARCH_CHIP_STM32F411VE + bool "STM32F411VE" + select ARCH_CORTEXM4 + select STM32_STM32F40XX + select STM32_STM32F411 + select ARCH_HAVE_FPU + config ARCH_CHIP_STM32F405RG bool "STM32F405RG" select ARCH_CORTEXM4 @@ -2153,63 +2160,47 @@ config STM32_TSC config STM32_USART1 bool "USART1" default n - select ARCH_HAVE_USART1 - select ARCH_HAVE_SERIAL_TERMIOS select STM32_USART config STM32_USART2 bool "USART2" default n - select ARCH_HAVE_USART2 - select ARCH_HAVE_SERIAL_TERMIOS select STM32_USART config STM32_USART3 bool "USART3" default n depends on STM32_HAVE_USART3 - select ARCH_HAVE_SERIAL_TERMIOS - select ARCH_HAVE_USART3 select STM32_USART config STM32_UART4 bool "UART4" default n depends on STM32_HAVE_UART4 - select ARCH_HAVE_SERIAL_TERMIOS - select ARCH_HAVE_UART4 select STM32_USART config STM32_UART5 bool "UART5" default n depends on STM32_HAVE_UART5 - select ARCH_HAVE_SERIAL_TERMIOS - select ARCH_HAVE_UART5 select STM32_USART config STM32_USART6 bool "USART6" default n depends on STM32_HAVE_USART6 - select ARCH_HAVE_SERIAL_TERMIOS - select ARCH_HAVE_USART6 select STM32_USART config STM32_UART7 bool "UART7" default n depends on STM32_HAVE_UART7 - select ARCH_HAVE_SERIAL_TERMIOS - select ARCH_HAVE_UART7 select STM32_USART config STM32_UART8 bool "UART8" default n depends on STM32_HAVE_UART8 - select ARCH_HAVE_SERIAL_TERMIOS - select ARCH_HAVE_UART8 select STM32_USART config STM32_USB @@ -5407,13 +5398,39 @@ endmenu config STM32_USART bool +config STM32_SERIALDRIVER + bool + +config STM32_1WIREDRIVER + bool + menu "U[S]ART Configuration" depends on STM32_USART +comment "U[S]ART Device Configuration" + +choice + prompt "USART1 Driver Configuration" + default STM32_USART1_SERIALDRIVER + depends on STM32_USART1 + +config STM32_USART1_SERIALDRIVER + bool "Standard serial driver" + select USART1_SERIALDRIVER + select ARCH_HAVE_SERIAL_TERMIOS + select STM32_SERIALDRIVER + +config STM32_USART1_1WIREDRIVER + bool "1-Wire driver" + select STM32_1WIREDRIVER + +endchoice # USART1 Driver Configuration + +if STM32_USART1_SERIALDRIVER + config USART1_RS485 bool "RS-485 on USART1" default n - depends on STM32_USART1 ---help--- Enable RS-485 interface on USART1. Your board config will have to provide GPIO_USART1_RS485_DIR pin definition. Currently it cannot be @@ -5431,14 +5448,34 @@ config USART1_RS485_DIR_POLARITY config USART1_RXDMA bool "USART1 Rx DMA" default n - depends on STM32_USART1 && (((STM32_STM32F10XX || STM32_STM32L15XX) && STM32_DMA1) || (!STM32_STM32F10XX && STM32_DMA2)) + depends on (((STM32_STM32F10XX || STM32_STM32L15XX) && STM32_DMA1) || (!STM32_STM32F10XX && STM32_DMA2)) ---help--- In high data rate usage, Rx DMA may eliminate Rx overrun errors +endif # STM32_USART1_SERIALDRIVER + +choice + prompt "USART2 Driver Configuration" + default STM32_USART2_SERIALDRIVER + depends on STM32_USART2 + +config STM32_USART2_SERIALDRIVER + bool "Standard serial driver" + select USART2_SERIALDRIVER + select ARCH_HAVE_SERIAL_TERMIOS + select STM32_SERIALDRIVER + +config STM32_USART2_1WIREDRIVER + bool "1-Wire driver" + select STM32_1WIREDRIVER + +endchoice # USART2 Driver Configuration + +if STM32_USART2_SERIALDRIVER + config USART2_RS485 bool "RS-485 on USART2" default n - depends on STM32_USART2 ---help--- Enable RS-485 interface on USART2. Your board config will have to provide GPIO_USART2_RS485_DIR pin definition. Currently it cannot be @@ -5456,14 +5493,34 @@ config USART2_RS485_DIR_POLARITY config USART2_RXDMA bool "USART2 Rx DMA" default n - depends on STM32_USART2 && STM32_DMA1 + depends on STM32_DMA1 ---help--- In high data rate usage, Rx DMA may eliminate Rx overrun errors +endif # STM32_USART2_SERIALDRIVER + +choice + prompt "USART3 Driver Configuration" + default STM32_USART3_SERIALDRIVER + depends on STM32_USART3 + +config STM32_USART3_SERIALDRIVER + bool "Standard serial driver" + select USART3_SERIALDRIVER + select ARCH_HAVE_SERIAL_TERMIOS + select STM32_SERIALDRIVER + +config STM32_USART3_1WIREDRIVER + bool "1-Wire driver" + select STM32_1WIREDRIVER + +endchoice # USART3 Driver Configuration + +if STM32_USART3_SERIALDRIVER + config USART3_RS485 bool "RS-485 on USART3" default n - depends on STM32_USART3 ---help--- Enable RS-485 interface on USART3. Your board config will have to provide GPIO_USART3_RS485_DIR pin definition. Currently it cannot be @@ -5481,14 +5538,34 @@ config USART3_RS485_DIR_POLARITY config USART3_RXDMA bool "USART3 Rx DMA" default n - depends on STM32_USART3 && STM32_DMA1 + depends on STM32_DMA1 ---help--- In high data rate usage, Rx DMA may eliminate Rx overrun errors +endif # STM32_USART3_SERIALDRIVER + +choice + prompt "UART4 Driver Configuration" + default STM32_UART4_SERIALDRIVER + depends on STM32_UART4 + +config STM32_UART4_SERIALDRIVER + bool "Standard serial driver" + select UART4_SERIALDRIVER + select ARCH_HAVE_SERIAL_TERMIOS + select STM32_SERIALDRIVER + +config STM32_UART4_1WIREDRIVER + bool "1-Wire driver" + select STM32_1WIREDRIVER + +endchoice # UART1 Driver Configuration + +if STM32_UART4_SERIALDRIVER + config UART4_RS485 bool "RS-485 on UART4" default n - depends on STM32_UART4 ---help--- Enable RS-485 interface on UART4. Your board config will have to provide GPIO_UART4_RS485_DIR pin definition. Currently it cannot be @@ -5506,14 +5583,34 @@ config UART4_RS485_DIR_POLARITY config UART4_RXDMA bool "UART4 Rx DMA" default n - depends on STM32_UART4 && STM32_DMA1 + depends on STM32_DMA1 ---help--- In high data rate usage, Rx DMA may eliminate Rx overrun errors +endif # STM32_UART4_SERIALDRIVER + +choice + prompt "UART5 Driver Configuration" + default STM32_UART5_SERIALDRIVER + depends on STM32_UART5 + +config STM32_UART5_SERIALDRIVER + bool "Standard serial driver" + select UART5_SERIALDRIVER + select ARCH_HAVE_SERIAL_TERMIOS + select STM32_SERIALDRIVER + +config STM32_UART5_1WIREDRIVER + bool "1-Wire driver" + select STM32_1WIREDRIVER + +endchoice # UART5 Driver Configuration + +if STM32_UART5_SERIALDRIVER + config UART5_RS485 bool "RS-485 on UART5" default n - depends on STM32_UART5 ---help--- Enable RS-485 interface on UART5. Your board config will have to provide GPIO_UART5_RS485_DIR pin definition. Currently it cannot be @@ -5531,14 +5628,34 @@ config UART5_RS485_DIR_POLARITY config UART5_RXDMA bool "UART5 Rx DMA" default n - depends on STM32_UART5 && STM32_DMA1 + depends on STM32_DMA1 ---help--- In high data rate usage, Rx DMA may eliminate Rx overrun errors +endif # STM32_UART5_SERIALDRIVER + +choice + prompt "USART6 Driver Configuration" + default STM32_USART6_SERIALDRIVER + depends on STM32_USART6 + +config STM32_USART6_SERIALDRIVER + bool "Standard serial driver" + select USART6_SERIALDRIVER + select ARCH_HAVE_SERIAL_TERMIOS + select STM32_SERIALDRIVER + +config STM32_USART6_1WIREDRIVER + bool "1-Wire driver" + select STM32_1WIREDRIVER + +endchoice # USART6 Driver Configuration + +if STM32_USART6_SERIALDRIVER + config USART6_RS485 bool "RS-485 on USART6" default n - depends on STM32_USART6 ---help--- Enable RS-485 interface on USART6. Your board config will have to provide GPIO_USART6_RS485_DIR pin definition. Currently it cannot be @@ -5556,14 +5673,34 @@ config USART6_RS485_DIR_POLARITY config USART6_RXDMA bool "USART6 Rx DMA" default n - depends on STM32_USART6 && STM32_DMA2 + depends on STM32_DMA2 ---help--- In high data rate usage, Rx DMA may eliminate Rx overrun errors +endif # STM32_USART6_SERIALDRIVER + +choice + prompt "UART7 Driver Configuration" + default STM32_UART7_SERIALDRIVER + depends on STM32_UART7 + +config STM32_UART7_SERIALDRIVER + bool "Standard serial driver" + select UART7_SERIALDRIVER + select ARCH_HAVE_SERIAL_TERMIOS + select STM32_SERIALDRIVER + +config STM32_UART7_1WIREDRIVER + bool "1-Wire driver" + select STM32_1WIREDRIVER + +endchoice # UART7 Driver Configuration + +if STM32_UART7_SERIALDRIVER + config UART7_RS485 bool "RS-485 on UART7" default n - depends on STM32_UART7 ---help--- Enable RS-485 interface on UART7. Your board config will have to provide GPIO_UART7_RS485_DIR pin definition. Currently it cannot be @@ -5581,14 +5718,34 @@ config UART7_RS485_DIR_POLARITY config UART7_RXDMA bool "UART7 Rx DMA" default n - depends on STM32_UART7 && STM32_DMA2 + depends on STM32_DMA2 ---help--- In high data rate usage, Rx DMA may eliminate Rx overrun errors +endif # STM32_UART7_SERIALDRIVER + +choice + prompt "UART8 Driver Configuration" + default STM32_UART8_SERIALDRIVER + depends on STM32_UART7 + +config STM32_UART8_SERIALDRIVER + bool "Standard serial driver" + select UART8_SERIALDRIVER + select ARCH_HAVE_SERIAL_TERMIOS + select STM32_SERIALDRIVER + +config STM32_UART8_1WIREDRIVER + bool "1-Wire driver" + select STM32_1WIREDRIVER + +endchoice # UART8 Driver Configuration + +if STM32_UART8_SERIALDRIVER + config UART8_RS485 bool "RS-485 on UART8" default n - depends on STM32_UART8 ---help--- Enable RS-485 interface on UART8. Your board config will have to provide GPIO_UART8_RS485_DIR pin definition. Currently it cannot be @@ -5606,10 +5763,16 @@ config UART8_RS485_DIR_POLARITY config UART8_RXDMA bool "UART8 Rx DMA" default n - depends on STM32_UART8 && STM32_DMA2 + depends on STM32_DMA2 ---help--- In high data rate usage, Rx DMA may eliminate Rx overrun errors +endif # STM32_UART8_SERIALDRIVER + +if STM32_SERIALDRIVER + +comment "Serial Driver Configuration" + config SERIAL_DISABLE_REORDERING bool "Disable reordering of ttySx devices." depends on STM32_USART1 || STM32_USART2 || STM32_USART3 || STM32_UART4 || STM32_UART5 || STM32_USART6 || STM32_UART7 || STM32_UART8 @@ -5634,7 +5797,25 @@ config STM32_FLOWCONTROL_BROKEN nRTS after every byte received) Enable this setting workaround this issue by useing software based management of RTS -endmenu +config STM32_USART_BREAKS + bool "Add TIOxSBRK to support sending Breaks" + depends on STM32_USART + default n + ---help--- + Add TIOCxBRK routines to send a line break per the STM32 manual, the + break will be a pulse based on the value M. This is not a BSD compatible + break. + +config STM32_SERIALBRK_BSDCOMPAT + bool "Use GPIO To send Break" + depends on STM32_USART && STM32_USART_BREAKS + default n + ---help--- + Enable using GPIO on the TX pin to send a BSD compatible break: + TIOCSBRK will start the break and TIOCCBRK will end the break. + The current STM32 U[S]ARTS have no way to leave the break (TX=LOW) + on because the SW starts the break and then the HW automatically clears + the break. This makes it is difficult to sent a long break. config STM32_USART_SINGLEWIRE bool "Single Wire Support" @@ -5644,6 +5825,9 @@ config STM32_USART_SINGLEWIRE Enable single wire UART support. The option enables support for the TIOCSSINGLEWIRE ioctl in the STM32 serial driver. +endif # STM32_SERIALDRIVER +endmenu # U[S]ART Configuration + menu "SPI Configuration" depends on STM32_SPI diff --git a/arch/arm/src/stm32/Make.defs b/arch/arm/src/stm32/Make.defs index 64034976b5a..98c1bad6463 100644 --- a/arch/arm/src/stm32/Make.defs +++ b/arch/arm/src/stm32/Make.defs @@ -203,7 +203,7 @@ CHIP_CSRCS += stm32_rtc_lowerhalf.c endif endif -ifeq ($(CONFIG_ADC),y) +ifeq ($(CONFIG_STM32_ADC),y) CHIP_CSRCS += stm32_adc.c endif @@ -211,6 +211,10 @@ ifeq ($(CONFIG_DAC),y) CHIP_CSRCS += stm32_dac.c endif +ifeq ($(CONFIG_STM32_1WIREDRIVER),y) +CHIP_CSRCS += stm32_1wire.c +endif + ifeq ($(CONFIG_STM32_RNG),y) CHIP_CSRCS += stm32_rng.c endif diff --git a/arch/arm/src/stm32/chip/stm32_can.h b/arch/arm/src/stm32/chip/stm32_can.h index d64332d1d93..6b4a12a855e 100644 --- a/arch/arm/src/stm32/chip/stm32_can.h +++ b/arch/arm/src/stm32/chip/stm32_can.h @@ -75,8 +75,11 @@ #define STM32_CAN_MCR_OFFSET 0x0000 /* CAN master control register */ #define STM32_CAN_MSR_OFFSET 0x0004 /* CAN master status register */ #define STM32_CAN_TSR_OFFSET 0x0008 /* CAN transmit status register */ + +#define STM32_CAN_RFR_OFFSET(m) (0x000c+((m)<<2)) #define STM32_CAN_RF0R_OFFSET 0x000c /* CAN receive FIFO 0 register */ #define STM32_CAN_RF1R_OFFSET 0x0010 /* CAN receive FIFO 1 register */ + #define STM32_CAN_IER_OFFSET 0x0014 /* CAN interrupt enable register */ #define STM32_CAN_ESR_OFFSET 0x0018 /* CAN error status register */ #define STM32_CAN_BTR_OFFSET 0x001c /* CAN bit timing register */ @@ -127,8 +130,8 @@ #define STM32_CAN_FFA1R_OFFSET 0x0214 /* CAN filter FIFO assignment register */ #define STM32_CAN_FA1R_OFFSET 0x021c /* CAN filter activation register */ -/* There are 14 or 28 filter banks (depending) on the device. Each filter bank is - * composed of two 32-bit registers, CAN_FiR: +/* There are 14 or 28 filter banks (depending) on the device. + * Each filter bank is composed of two 32-bit registers, CAN_FiR: * F0R1 Offset 0x240 * F0R2 Offset 0x244 * F1R1 Offset 0x248 @@ -445,7 +448,7 @@ /* CAN filter master register */ -#define CAN_FMR_FINIT (1 << 0) /* Bit 0: Filter Init Mode */ +#define CAN_FMR_FINIT (1 << 0) /* Bit 0: Filter Init Mode */ #if defined(CONFIG_STM32_CONNECTIVITYLINE) || defined(CONFIG_STM32_STM32F20XX) || defined(CONFIG_STM32_STM32F40XX) # define CAN_FMR_CAN2SB_SHIFT (8) /* Bits 13-8: CAN2 start bank */ # define CAN_FMR_CAN2SB_MASK (0x3f << CAN_FMR_CAN2SB_SHIFT) diff --git a/arch/arm/src/stm32/chip/stm32f10xxx_vectors.h b/arch/arm/src/stm32/chip/stm32f10xxx_vectors.h index 24822c37d3e..0af150638a0 100644 --- a/arch/arm/src/stm32/chip/stm32f10xxx_vectors.h +++ b/arch/arm/src/stm32/chip/stm32f10xxx_vectors.h @@ -110,7 +110,7 @@ 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_uart5, STM32_IRQ_UART5) /* Vector 16+53: UART5 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 */ diff --git a/arch/arm/src/stm32/chip/stm32f20xxx_uart.h b/arch/arm/src/stm32/chip/stm32f20xxx_uart.h index 5e5b4449de0..4da5c0af2e0 100644 --- a/arch/arm/src/stm32/chip/stm32f20xxx_uart.h +++ b/arch/arm/src/stm32/chip/stm32f20xxx_uart.h @@ -199,7 +199,7 @@ #define USART_CR3_RTSE (1 << 8) /* Bit 8: RTS Enable */ #define USART_CR3_CTSE (1 << 9) /* Bit 9: CTS Enable */ #define USART_CR3_CTSIE (1 << 10) /* Bit 10: CTS Interrupt Enable */ -#define USART_CR1_ONEBIT (1 << 11) /* Bit 11: One sample bit method enable */ +#define USART_CR3_ONEBIT (1 << 11) /* Bit 11: One sample bit method enable */ /* Guard time and prescaler register */ diff --git a/arch/arm/src/stm32/chip/stm32f30xxx_uart.h b/arch/arm/src/stm32/chip/stm32f30xxx_uart.h index 9a55a921a72..5593e6848ff 100644 --- a/arch/arm/src/stm32/chip/stm32f30xxx_uart.h +++ b/arch/arm/src/stm32/chip/stm32f30xxx_uart.h @@ -218,19 +218,19 @@ #define USART_CR3_RTSE (1 << 8) /* Bit 8: RTS Enable */ #define USART_CR3_CTSE (1 << 9) /* Bit 9: CTS Enable */ #define USART_CR3_CTSIE (1 << 10) /* Bit 10: CTS Interrupt Enable */ -#define USART_CR1_ONEBIT (1 << 11) /* Bit 11: One sample bit method enable */ -#define USART_CR1_OVRDIS (1 << 12) /* Bit 12: Overrun Disable */ -#define USART_CR1_DDRE (1 << 13) /* Bit 13: DMA Disable on Reception Error */ -#define USART_CR1_DEM (1 << 14) /* Bit 14: Driver enable mode */ -#define USART_CR1_DEP (1 << 15) /* Bit 15: Driver enable polarity selection */ -#define USART_CR1_SCARCNT_SHIFT (17) /* Bit 17-19: Smartcard auto-retry count */ -#define USART_CR1_SCARCNT_MASK (7 << USART_CR1_SCARCNT_SHIFT) -#define USART_CR1_WUS_SHIFT (20) /* Bit 20-21: Wakeup from Stop mode interrupt */ -#define USART_CR1_WUS_MASK (3 << USART_CR1_WUS_SHIFT) -# define USART_CR1_WUS_ADDRMAT (0 << USART_CR1_WUS_SHIFT) /* Active on address match */ -# define USART_CR1_WUS_STARTBIT (2 << USART_CR1_WUS_SHIFT) /* Active on Start bit */ -# define USART_CR1_WUS_RXNE (3 << USART_CR1_WUS_SHIFT) /* Active on RXNE */ -#define USART_CR1_WUFIE (1 << 22) /* Bit 22: Wakeup from Stop mode interrupt enable */ +#define USART_CR3_ONEBIT (1 << 11) /* Bit 11: One sample bit method enable */ +#define USART_CR3_OVRDIS (1 << 12) /* Bit 12: Overrun Disable */ +#define USART_CR3_DDRE (1 << 13) /* Bit 13: DMA Disable on Reception Error */ +#define USART_CR3_DEM (1 << 14) /* Bit 14: Driver enable mode */ +#define USART_CR3_DEP (1 << 15) /* Bit 15: Driver enable polarity selection */ +#define USART_CR3_SCARCNT_SHIFT (17) /* Bit 17-19: Smartcard auto-retry count */ +#define USART_CR3_SCARCNT_MASK (7 << USART_CR3_SCARCNT_SHIFT) +#define USART_CR3_WUS_SHIFT (20) /* Bit 20-21: Wakeup from Stop mode interrupt */ +#define USART_CR3_WUS_MASK (3 << USART_CR3_WUS_SHIFT) +# define USART_CR3_WUS_ADDRMAT (0 << USART_CR3_WUS_SHIFT) /* Active on address match */ +# define USART_CR3_WUS_STARTBIT (2 << USART_CR3_WUS_SHIFT) /* Active on Start bit */ +# define USART_CR3_WUS_RXNE (3 << USART_CR3_WUS_SHIFT) /* Active on RXNE */ +#define USART_CR3_WUFIE (1 << 22) /* Bit 22: Wakeup from Stop mode interrupt enable */ /* Baud Rate Register */ diff --git a/arch/arm/src/stm32/chip/stm32f40xxx_pinmap.h b/arch/arm/src/stm32/chip/stm32f40xxx_pinmap.h index d8fbe7346cc..c0f675aa023 100644 --- a/arch/arm/src/stm32/chip/stm32f40xxx_pinmap.h +++ b/arch/arm/src/stm32/chip/stm32f40xxx_pinmap.h @@ -628,7 +628,8 @@ #endif #if defined(CONFIG_STM32_STM32F427) || defined(CONFIG_STM32_STM32F429) || \ - defined(CONFIG_STM32_STM32F446) || defined(CONFIG_STM32_STM32F469) + defined(CONFIG_STM32_STM32F446) || defined(CONFIG_STM32_STM32F469) || \ + defined(CONFIG_STM32_STM32F411) # define GPIO_SPI4_MISO_1 (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTE|GPIO_PIN5) # define GPIO_SPI4_MISO_2 (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTE|GPIO_PIN13) # define GPIO_SPI4_MOSI_1 (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTE|GPIO_PIN6) @@ -643,7 +644,7 @@ #endif #if defined(CONFIG_STM32_STM32F427) || defined(CONFIG_STM32_STM32F429) || \ - defined(CONFIG_STM32_STM32F469) + defined(CONFIG_STM32_STM32F469) || defined(CONFIG_STM32_STM32F411) # define GPIO_SPI5_MISO_1 (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTF|GPIO_PIN8) # define GPIO_SPI5_MISO_2 (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTH|GPIO_PIN7) # define GPIO_SPI5_MOSI_1 (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTF|GPIO_PIN9) @@ -652,7 +653,10 @@ # define GPIO_SPI5_NSS_2 (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTH|GPIO_PIN5) # define GPIO_SPI5_SCK_1 (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTF|GPIO_PIN7) # define GPIO_SPI5_SCK_2 (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTH|GPIO_PIN6) +#endif +#if defined(CONFIG_STM32_STM32F427) || defined(CONFIG_STM32_STM32F429) || \ + defined(CONFIG_STM32_STM32F469) # define GPIO_SPI6_MISO (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTG|GPIO_PIN12) # define GPIO_SPI6_MOSI (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTG|GPIO_PIN14) # define GPIO_SPI6_NSS (GPIO_ALT|GPIO_AF5|GPIO_SPEED_50MHz|GPIO_PORTG|GPIO_PIN8) diff --git a/arch/arm/src/stm32/chip/stm32f40xxx_rcc.h b/arch/arm/src/stm32/chip/stm32f40xxx_rcc.h index a81f798c18b..cccbedbf505 100644 --- a/arch/arm/src/stm32/chip/stm32f40xxx_rcc.h +++ b/arch/arm/src/stm32/chip/stm32f40xxx_rcc.h @@ -356,7 +356,8 @@ #define RCC_APB2RSTR_SDIORST (1 << 11) /* Bit 11: SDIO reset */ #define RCC_APB2RSTR_SPI1RST (1 << 12) /* Bit 12: SPI1 reset */ #if defined(CONFIG_STM32_STM32F427) || defined(CONFIG_STM32_STM32F429) || \ - defined(CONFIG_STM32_STM32F446) || defined(CONFIG_STM32_STM32F469) + defined(CONFIG_STM32_STM32F446) || defined(CONFIG_STM32_STM32F469) || \ + defined(CONFIG_STM32_STM32F411) # define RCC_APB2RSTR_SPI4RST (1 << 13) /* Bit 13: SPI4 reset */ #endif #define RCC_APB2RSTR_SYSCFGRST (1 << 14) /* Bit 14: System configuration controller reset */ @@ -364,8 +365,11 @@ #define RCC_APB2RSTR_TIM10RST (1 << 17) /* Bit 17: TIM10 reset */ #define RCC_APB2RSTR_TIM11RST (1 << 18) /* Bit 18: TIM11 reset */ #if defined(CONFIG_STM32_STM32F427) || defined(CONFIG_STM32_STM32F429) || \ - defined(CONFIG_STM32_STM32F469) + defined(CONFIG_STM32_STM32F469) || defined(CONFIG_STM32_STM32F411) # define RCC_APB2RSTR_SPI5RST (1 << 20) /* Bit 20: SPI 5 reset */ +#endif +#if defined(CONFIG_STM32_STM32F427) || defined(CONFIG_STM32_STM32F429) || \ + defined(CONFIG_STM32_STM32F469) # define RCC_APB2RSTR_SPI6RST (1 << 21) /* Bit 21: SPI 6 reset */ #endif #if defined(CONFIG_STM32_STM32F427) || defined(CONFIG_STM32_STM32F429) || \ @@ -500,7 +504,8 @@ #define RCC_APB2ENR_SDIOEN (1 << 11) /* Bit 11: SDIO clock enable */ #define RCC_APB2ENR_SPI1EN (1 << 12) /* Bit 12: SPI1 clock enable */ #if defined(CONFIG_STM32_STM32F427) || defined(CONFIG_STM32_STM32F429) || \ - defined(CONFIG_STM32_STM32F446) || defined(CONFIG_STM32_STM32F469) + defined(CONFIG_STM32_STM32F446) || defined(CONFIG_STM32_STM32F469) || \ + defined(CONFIG_STM32_STM32F411) # define RCC_APB2ENR_SPI4EN (1 << 13) /* Bit 13: SPI4 clock enable */ #endif #define RCC_APB2ENR_SYSCFGEN (1 << 14) /* Bit 14: System configuration controller clock enable */ @@ -508,8 +513,11 @@ #define RCC_APB2ENR_TIM10EN (1 << 17) /* Bit 17: TIM10 clock enable */ #define RCC_APB2ENR_TIM11EN (1 << 18) /* Bit 18: TIM11 clock enable */ #if defined(CONFIG_STM32_STM32F427) || defined(CONFIG_STM32_STM32F429) || \ - defined(CONFIG_STM32_STM32F469) + defined(CONFIG_STM32_STM32F469) || defined(CONFIG_STM32_STM32F411) # define RCC_APB2ENR_SPI5EN (1 << 20) /* Bit 20: SPI5 clock enable */ +#endif +#if defined(CONFIG_STM32_STM32F427) || defined(CONFIG_STM32_STM32F429) || \ + defined(CONFIG_STM32_STM32F469) # define RCC_APB2ENR_SPI6EN (1 << 21) /* Bit 21: SPI6 clock enable */ #endif #if defined(CONFIG_STM32_STM32F427) || defined(CONFIG_STM32_STM32F429) || \ @@ -649,7 +657,8 @@ #define RCC_APB2LPENR_SDIOLPEN (1 << 11) /* Bit 11: SDIO clock enable during Sleep mode */ #define RCC_APB2LPENR_SPI1LPEN (1 << 12) /* Bit 12: SPI1 clock enable during Sleep mode */ #if defined(CONFIG_STM32_STM32F427) || defined(CONFIG_STM32_STM32F429) || \ - defined(CONFIG_STM32_STM32F446) || defined(CONFIG_STM32_STM32F469) + defined(CONFIG_STM32_STM32F446) || defined(CONFIG_STM32_STM32F469) || \ + defined(CONFIG_STM32_STM32F411) # define RCC_APB2LPENR_SPI4LPEN (1 << 13) /* Bit 13: SPI4 clock enable during Sleep mode */ #endif #define RCC_APB2LPENR_SYSCFGLPEN (1 << 14) /* Bit 14: System configuration controller clock enable during Sleep mode */ @@ -657,8 +666,11 @@ #define RCC_APB2LPENR_TIM10LPEN (1 << 17) /* Bit 17: TIM10 clock enable during Sleep mode */ #define RCC_APB2LPENR_TIM11LPEN (1 << 18) /* Bit 18: TIM11 clock enable during Sleep mode */ #if defined(CONFIG_STM32_STM32F427) || defined(CONFIG_STM32_STM32F429) || \ - defined(CONFIG_STM32_STM32F469) + defined(CONFIG_STM32_STM32F469) || defined(CONFIG_STM32_STM32F411) # define RCC_APB2LPENR_SPI5LPEN (1 << 20) /* Bit 20: SPI5 clock enable during Sleep mode */ +#endif +#if defined(CONFIG_STM32_STM32F427) || defined(CONFIG_STM32_STM32F429) || \ + defined(CONFIG_STM32_STM32F469) # define RCC_APB2LPENR_SPI6LPEN (1 << 21) /* Bit 21: SPI6 clock enable during Sleep mode */ #endif #if defined(CONFIG_STM32_STM32F427) || defined(CONFIG_STM32_STM32F429) || \ diff --git a/arch/arm/src/stm32/chip/stm32f40xxx_uart.h b/arch/arm/src/stm32/chip/stm32f40xxx_uart.h index 824ea9515b5..9693baa5077 100644 --- a/arch/arm/src/stm32/chip/stm32f40xxx_uart.h +++ b/arch/arm/src/stm32/chip/stm32f40xxx_uart.h @@ -217,7 +217,7 @@ #define USART_CR3_RTSE (1 << 8) /* Bit 8: RTS Enable */ #define USART_CR3_CTSE (1 << 9) /* Bit 9: CTS Enable */ #define USART_CR3_CTSIE (1 << 10) /* Bit 10: CTS Interrupt Enable */ -#define USART_CR1_ONEBIT (1 << 11) /* Bit 11: One sample bit method enable */ +#define USART_CR3_ONEBIT (1 << 11) /* Bit 11: One sample bit method enable */ /* Guard time and prescaler register */ diff --git a/arch/arm/src/stm32/chip/stm32l15xxx_uart.h b/arch/arm/src/stm32/chip/stm32l15xxx_uart.h index dff92449335..4b85b837c76 100644 --- a/arch/arm/src/stm32/chip/stm32l15xxx_uart.h +++ b/arch/arm/src/stm32/chip/stm32l15xxx_uart.h @@ -191,7 +191,7 @@ #define USART_CR3_RTSE (1 << 8) /* Bit 8: RTS Enable */ #define USART_CR3_CTSE (1 << 9) /* Bit 9: CTS Enable */ #define USART_CR3_CTSIE (1 << 10) /* Bit 10: CTS Interrupt Enable */ -#define USART_CR1_ONEBIT (1 << 11) /* Bit 11: One sample bit method enable */ +#define USART_CR3_ONEBIT (1 << 11) /* Bit 11: One sample bit method enable */ /* Guard time and prescaler register */ diff --git a/arch/arm/src/stm32/stm32_1wire.c b/arch/arm/src/stm32/stm32_1wire.c new file mode 100644 index 00000000000..4c0fa6c0f77 --- /dev/null +++ b/arch/arm/src/stm32/stm32_1wire.c @@ -0,0 +1,1354 @@ +/**************************************************************************** + * arch/arm/src/stm32/stm32_1wire.c + * + * Copyright (C) 2016 Aleksandr Vyhovanec. All rights reserved. + * Author: Aleksandr Vyhovanec + * + * 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. + * + ****************************************************************************/ + +/* Links: + * https://www.maximintegrated.com/en/app-notes/index.mvp/id/214 + */ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include + +#include "up_arch.h" + +#include "stm32_rcc.h" +#include "stm32_1wire.h" + +#ifdef HAVE_1WIREDRIVER + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +#define BUS_TIMEOUT 5 /* tv_sec */ + +#define RESET_BAUD 9600 +#define RESET_TX 0xF0 +#define TIMESLOT_BAUD 115200 +#define READ_TX 0xFF +#define READ_RX1 0xFF +#define WRITE_TX0 0x00 +#define WRITE_TX1 0xFF + +#define PIN_OPENDRAIN(GPIO) ((GPIO) | GPIO_OPENDRAIN) + +/**************************************************************************** + * Private Types + ****************************************************************************/ + +/* 1-Wire bus task */ + +enum stm32_1wire_msg_e +{ + ONEWIRETASK_NONE = 0, + ONEWIRETASK_RESET, + ONEWIRETASK_WRITE, + ONEWIRETASK_READ +}; + +struct stm32_1wire_msg_s +{ + enum stm32_1wire_msg_e task; /* Task */ + uint8_t *buffer; /* Task buffer */ + int buflen; /* Buffer length */ +}; + +/* 1-Wire device hardware configuration */ + +struct stm32_1wire_config_s +{ + const uint32_t usartbase; /* Base address of USART registers */ + const uint32_t apbclock; /* PCLK 1 or 2 frequency */ + const uint32_t data_pin; /* GPIO configuration for DATA */ + const uint8_t irq; /* IRQ associated with this USART */ + int (*const vector)(int irq, void *context); /* Interrupt handler */ +}; + +/* 1-Wire device Private Data */ + +struct stm32_1wire_priv_s +{ + const struct stm32_1wire_config_s *config; /* Port configuration */ + volatile int refs; /* Referernce count */ + sem_t sem_excl; /* Mutual exclusion semaphore */ + sem_t sem_isr; /* Interrupt wait semaphore */ + int baud; /* Baud rate */ + const struct stm32_1wire_msg_s *msgs; /* Messages data */ + uint8_t *byte; /* Current byte */ + uint8_t bit; /* Current bit */ + volatile int result; /* Exchange result */ +}; + +/* 1-Wire device, Instance */ + +struct stm32_1wire_inst_s +{ + const struct onewire_ops_s *ops; /* Standard 1-Wire operations */ + struct stm32_1wire_priv_s *priv; /* Common driver private data structure */ +}; + +/**************************************************************************** + * Private Function Prototypes + ****************************************************************************/ + +static inline uint32_t stm32_1wire_in(struct stm32_1wire_priv_s *priv, int offset); +static inline void stm32_1wire_out(struct stm32_1wire_priv_s *priv, int offset, uint32_t value); +static int stm32_1wire_recv(struct stm32_1wire_priv_s *priv); +static void stm32_1wire_send(struct stm32_1wire_priv_s *priv, int ch); +static void stm32_1wire_set_baud(struct stm32_1wire_priv_s *priv); +static void stm32_1wire_set_apb_clock(struct stm32_1wire_priv_s *priv, bool on); +static int stm32_1wire_init(FAR struct stm32_1wire_priv_s *priv); +static int stm32_1wire_deinit(FAR struct stm32_1wire_priv_s *priv); +static inline void stm32_1wire_sem_init(FAR struct stm32_1wire_priv_s *priv); +static inline void stm32_1wire_sem_destroy(FAR struct stm32_1wire_priv_s *priv); +static inline void stm32_1wire_sem_wait(FAR struct stm32_1wire_priv_s *priv); +static inline void stm32_1wire_sem_post(FAR struct stm32_1wire_priv_s *priv); +static int stm32_1wire_process(struct stm32_1wire_priv_s *priv, + FAR const struct stm32_1wire_msg_s *msgs, int count); +static int stm32_1wire_isr(struct stm32_1wire_priv_s *priv); + +#ifdef CONFIG_STM32_USART1_1WIREDRIVER +static int stm32_interrupt_1wire1(int irq, void *context); +#endif +#ifdef CONFIG_STM32_USART2_1WIREDRIVER +static int stm32_interrupt_1wire2(int irq, void *context); +#endif +#ifdef CONFIG_STM32_USART3_1WIREDRIVER +static int stm32_interrupt_1wire3(int irq, void *context); +#endif +#ifdef CONFIG_STM32_UART4_1WIREDRIVER +static int stm32_interrupt_1wire4(int irq, void *context); +#endif +#ifdef CONFIG_STM32_UART5_1WIREDRIVER +static int stm32_interrupt_1wire5(int irq, void *context); +#endif +#ifdef CONFIG_STM32_USART6_1WIREDRIVER +static int stm32_interrupt_1wire6(int irq, void *context); +#endif +#ifdef CONFIG_STM32_UART7_1WIREDRIVER +static int stm32_interrupt_1wire7(int irq, void *context); +#endif +#ifdef CONFIG_STM32_UART8_1WIREDRIVER +static int stm32_interrupt_1wire8(int irq, void *context); +#endif + +static int stm32_1wire_reset(FAR struct onewire_dev_s *dev); +static int stm32_1wire_write(FAR struct onewire_dev_s *dev, + const uint8_t *buffer, int buflen); +static int stm32_1wire_read(FAR struct onewire_dev_s *dev, uint8_t *buffer, + int buflen); +static int stm32_1wire_exchange(FAR struct onewire_dev_s *dev, bool reset, + const uint8_t *txbuffer, int txbuflen, + uint8_t *rxbuffer, int rxbuflen); + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +/* 1-Wire device structures */ + +#ifdef CONFIG_STM32_USART1_1WIREDRIVER + +static const struct stm32_1wire_config_s stm32_1wire1_config = +{ + .usartbase = STM32_USART1_BASE, + .apbclock = STM32_PCLK2_FREQUENCY, + .data_pin = PIN_OPENDRAIN(GPIO_USART1_TX), + .irq = STM32_IRQ_USART1, + .vector = stm32_interrupt_1wire1, +}; + +static struct stm32_1wire_priv_s stm32_1wire1_priv = +{ + .config = &stm32_1wire1_config, + .refs = 0, + .msgs = NULL +}; + +#endif + +#ifdef CONFIG_STM32_USART2_1WIREDRIVER + +static const struct stm32_1wire_config_s stm32_1wire2_config = +{ + .usartbase = STM32_USART2_BASE, + .apbclock = STM32_PCLK1_FREQUENCY, + .data_pin = PIN_OPENDRAIN(GPIO_USART2_TX), + .irq = STM32_IRQ_USART2, + .vector = stm32_interrupt_1wire2, +}; + +static struct stm32_1wire_priv_s stm32_1wire2_priv = +{ + .config = &stm32_1wire2_config, + .refs = 0, + .msgs = NULL +}; + +#endif + +#ifdef CONFIG_STM32_USART3_1WIREDRIVER + +static const struct stm32_1wire_config_s stm32_1wire3_config = +{ + .usartbase = STM32_USART3_BASE, + .apbclock = STM32_PCLK1_FREQUENCY, + .data_pin = PIN_OPENDRAIN(GPIO_USART3_TX), + .irq = STM32_IRQ_USART3, + .vector = stm32_interrupt_1wire3, +}; + +static struct stm32_1wire_priv_s stm32_1wire3_priv = +{ + .config = &stm32_1wire3_config, + .refs = 0, + .msgs = NULL +}; + +#endif + +#ifdef CONFIG_STM32_UART4_1WIREDRIVER + +static const struct stm32_1wire_config_s stm32_1wire4_config = +{ + .usartbase = STM32_UART4_BASE, + .apbclock = STM32_PCLK1_FREQUENCY, + .data_pin = PIN_OPENDRAIN(GPIO_UART4_TX), + .irq = STM32_IRQ_UART4, + .vector = stm32_interrupt_1wire4, +}; + +static struct stm32_1wire_priv_s stm32_1wire4_priv = +{ + .config = &stm32_1wire4_config, + .refs = 0, + .msgs = NULL +}; + +#endif + +#ifdef CONFIG_STM32_UART5_1WIREDRIVER + +static const struct stm32_1wire_config_s stm32_1wire5_config = +{ + .usartbase = STM32_UART5_BASE, + .apbclock = STM32_PCLK1_FREQUENCY, + .data_pin = PIN_OPENDRAIN(GPIO_UART5_TX), + .irq = STM32_IRQ_UART5, + .vector = stm32_interrupt_1wire5, +}; + +static struct stm32_1wire_priv_s stm32_1wire5_priv = +{ + .config = &stm32_1wire5_config, + .refs = 0, + .msgs = NULL +}; + +#endif + +#ifdef CONFIG_STM32_USART6_1WIREDRIVER + +static const struct stm32_1wire_config_s stm32_1wire6_config = +{ + .usartbase = STM32_USART6_BASE, + .apbclock = STM32_PCLK2_FREQUENCY, + .data_pin = PIN_OPENDRAIN(GPIO_USART6_TX), + .irq = STM32_IRQ_USART6, + .vector = stm32_interrupt_1wire6, +}; + +static struct stm32_1wire_priv_s stm32_1wire6_priv = +{ + .config = &stm32_1wire6_config, + .refs = 0, + .msgs = NULL +}; + +#endif + +#ifdef CONFIG_STM32_UART7_1WIREDRIVER + +static const struct stm32_1wire_config_s stm32_1wire7_config = +{ + .usartbase = STM32_UART7_BASE, + .apbclock = STM32_PCLK1_FREQUENCY, + .data_pin = PIN_OPENDRAIN(GPIO_UART7_TX), + .irq = STM32_IRQ_UART7, + .vector = stm32_interrupt_1wire7, +}; + +static struct stm32_1wire_priv_s stm32_1wire7_priv = +{ + .config = &stm32_1wire7_config, + .refs = 0, + .msgs = NULL +}; + +#endif + +#ifdef CONFIG_STM32_UART8_1WIREDRIVER + +static const struct stm32_1wire_config_s stm32_1wire8_config = +{ + .usartbase = STM32_UART8_BASE, + .apbclock = STM32_PCLK1_FREQUENCY, + .data_pin = PIN_OPENDRAIN(GPIO_UART8_TX), + .irq = STM32_IRQ_UART8, + .vector = stm32_interrupt_1wire8, +}; + +static struct stm32_1wire_priv_s stm32_1wire8_priv = +{ + .config = &stm32_1wire8_config, + .refs = 0, + .msgs = NULL +}; + +#endif + +/* Device Structures, Instantiation */ + +static const struct onewire_ops_s stm32_1wire_ops = +{ + .reset = stm32_1wire_reset, + .write = stm32_1wire_write, + .read = stm32_1wire_read, + .exchange = stm32_1wire_exchange +}; + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: stm32_1wire_in + ****************************************************************************/ + +static inline uint32_t stm32_1wire_in(struct stm32_1wire_priv_s *priv, + int offset) +{ + return getreg32(priv->config->usartbase + offset); +} + +/**************************************************************************** + * Name: stm32_1wire_out + ****************************************************************************/ + +static inline void stm32_1wire_out(struct stm32_1wire_priv_s *priv, + int offset, uint32_t value) +{ + putreg32(value, priv->config->usartbase + offset); +} + +/**************************************************************************** + * Name: stm32_1wire_recv + * + * Description: + * This method will recv one byte on the USART + * + ****************************************************************************/ + +static int stm32_1wire_recv(struct stm32_1wire_priv_s *priv) +{ + return stm32_1wire_in(priv, STM32_USART_RDR_OFFSET) & 0xff; +} + +/**************************************************************************** + * Name: stm32_1wire_send + * + * Description: + * This method will send one byte on the USART + * + ****************************************************************************/ + +static void stm32_1wire_send(struct stm32_1wire_priv_s *priv, int ch) +{ + stm32_1wire_out(priv, STM32_USART_TDR_OFFSET, (uint32_t)(ch & 0xff)); +} + +/**************************************************************************** + * Name: stm32_1wire_set_baud + * + * Description: + * Set the serial line baud. + * + ****************************************************************************/ + +static void stm32_1wire_set_baud(struct stm32_1wire_priv_s *priv) +{ +#if defined(CONFIG_STM32_STM32F30XX) || defined(CONFIG_STM32_STM32F37XX) + /* This first implementation is for U[S]ARTs that support oversampling + * by 8 in additional to the standard oversampling by 16. + */ + + uint32_t usartdiv8; + uint32_t cr1; + uint32_t brr; + + /* In case of oversampling by 8, the equation is: + * + * baud = 2 * fCK / usartdiv8 + * usartdiv8 = 2 * fCK / baud + */ + + usartdiv8 = ((priv->config->apbclock << 1) + (priv->baud >> 1)) / priv->baud; + + /* Baud rate for standard USART (SPI mode included): + * + * In case of oversampling by 16, the equation is: + * baud = fCK / usartdiv16 + * usartdiv16 = fCK / baud + * = 2 * usartdiv8 + */ + + /* Use oversamply by 8 only if the divisor is small. But what is small? */ + + cr1 = stm32_1wire_in(priv, STM32_USART_CR1_OFFSET); + if (usartdiv8 > 100) + { + /* Use usartdiv16 */ + + brr = (usartdiv8 + 1) >> 1; + + /* Clear oversampling by 8 to enable oversampling by 16 */ + + cr1 &= ~USART_CR1_OVER8; + } + else + { + DEBUGASSERT(usartdiv8 >= 8); + + /* Perform mysterious operations on bits 0-3 */ + + brr = ((usartdiv8 & 0xfff0) | ((usartdiv8 & 0x000f) >> 1)); + + /* Set oversampling by 8 */ + + cr1 |= USART_CR1_OVER8; + } + + stm32_1wire_out(priv, STM32_USART_CR1_OFFSET, cr1); + stm32_1wire_out(priv, STM32_USART_BRR_OFFSET, brr); + +#else + + /* This second implementation is for U[S]ARTs that support fractional + * dividers. + */ + + uint32_t usartdiv32; + uint32_t mantissa; + uint32_t fraction; + uint32_t brr; + + /* Configure the USART Baud Rate. The baud rate for the receiver and + * transmitter (Rx and Tx) are both set to the same value as programmed + * in the Mantissa and Fraction values of USARTDIV. + * + * baud = fCK / (16 * usartdiv) + * usartdiv = fCK / (16 * baud) + * + * Where fCK is the input clock to the peripheral (PCLK1 for USART2, 3, 4, 5 + * or PCLK2 for USART1) + * + * First calculate (NOTE: all stand baud values are even so dividing by two + * does not lose precision): + * + * usartdiv32 = 32 * usartdiv = fCK / (baud/2) + */ + + usartdiv32 = priv->config->apbclock / (priv->baud >> 1); + + /* The mantissa part is then */ + + mantissa = usartdiv32 >> 5; + brr = mantissa << USART_BRR_MANT_SHIFT; + + /* The fractional remainder (with rounding) */ + + fraction = (usartdiv32 - (mantissa << 5) + 1) >> 1; + brr |= fraction << USART_BRR_FRAC_SHIFT; + stm32_1wire_out(priv, STM32_USART_BRR_OFFSET, brr); +#endif +} + +/**************************************************************************** + * Name: stm32_1wire_set_apb_clock + * + * Description: + * Enable or disable APB clock for the USART peripheral + * + * Input parameters: + * priv - A reference to the 1-Wire driver state structure + * on - Enable clock if 'on' is 'true' and disable if 'false' + * + ****************************************************************************/ + +static void stm32_1wire_set_apb_clock(struct stm32_1wire_priv_s *priv, + bool on) +{ + const struct stm32_1wire_config_s *config = priv->config; + uint32_t rcc_en; + uint32_t regaddr; + + /* Determine which USART to configure */ + + switch (config->usartbase) + { + default: + return; + +#ifdef CONFIG_STM32_USART1_1WIREDRIVER + case STM32_USART1_BASE: + rcc_en = RCC_APB2ENR_USART1EN; + regaddr = STM32_RCC_APB2ENR; + break; +#endif +#ifdef CONFIG_STM32_USART2_1WIREDRIVER + case STM32_USART2_BASE: + rcc_en = RCC_APB1ENR_USART2EN; + regaddr = STM32_RCC_APB1ENR; + break; +#endif +#ifdef CONFIG_STM32_USART3_1WIREDRIVER + case STM32_USART3_BASE: + rcc_en = RCC_APB1ENR_USART3EN; + regaddr = STM32_RCC_APB1ENR; + break; +#endif +#ifdef CONFIG_STM32_UART4 + case STM32_UART4_BASE: + rcc_en = RCC_APB1ENR_UART4EN; + regaddr = STM32_RCC_APB1ENR; + break; +#endif +#ifdef CONFIG_STM32_UART5 + case STM32_UART5_BASE: + rcc_en = RCC_APB1ENR_UART5EN; + regaddr = STM32_RCC_APB1ENR; + break; +#endif +#ifdef CONFIG_STM32_USART6_1WIREDRIVER + case STM32_USART6_BASE: + rcc_en = RCC_APB2ENR_USART6EN; + regaddr = STM32_RCC_APB2ENR; + break; +#endif +#ifdef CONFIG_STM32_UART7 + case STM32_UART7_BASE: + rcc_en = RCC_APB1ENR_UART7EN; + regaddr = STM32_RCC_APB1ENR; + break; +#endif +#ifdef CONFIG_STM32_UART8 + case STM32_UART8_BASE: + rcc_en = RCC_APB1ENR_UART8EN; + regaddr = STM32_RCC_APB1ENR; + break; +#endif + } + + /* Enable/disable APB 1/2 clock for USART */ + + if (on) + { + modifyreg32(regaddr, 0, rcc_en); + } + else + { + modifyreg32(regaddr, rcc_en, 0); + } +} + +/**************************************************************************** + * Name: stm32_1wire_init + * + * Description: + * Setup the 1-Wire hardware, ready for operation with defaults + * + ****************************************************************************/ + +static int stm32_1wire_init(FAR struct stm32_1wire_priv_s *priv) +{ + const struct stm32_1wire_config_s *config = priv->config; + uint32_t regval; + int ret; + + /* Enable USART APB1/2 clock */ + + stm32_1wire_set_apb_clock(priv, true); + + /* Configure CR2 */ + /* Clear STOP, CLKEN, CPOL, CPHA, LBCL, and interrupt enable bits */ + /* Set LBDIE */ + + regval = stm32_1wire_in(priv, STM32_USART_CR2_OFFSET); + regval &= ~(USART_CR2_STOP_MASK | USART_CR2_CLKEN | USART_CR2_CPOL | + USART_CR2_CPHA | USART_CR2_LBCL | USART_CR2_LBDIE); + regval |= USART_CR2_LBDIE; + stm32_1wire_out(priv, STM32_USART_CR2_OFFSET, regval); + + /* Configure CR1 */ + /* Clear TE, REm, all interrupt enable bits, PCE, PS and M */ + /* Set RXNEIE */ + + regval = stm32_1wire_in(priv, STM32_USART_CR1_OFFSET); + regval &= ~(USART_CR1_TE | USART_CR1_RE | USART_CR1_ALLINTS | + USART_CR1_PCE | USART_CR1_PS | USART_CR1_M); + regval |= USART_CR1_RXNEIE; + stm32_1wire_out(priv, STM32_USART_CR1_OFFSET, regval); + + /* Configure CR3 */ + /* Clear CTSE, RTSE, and all interrupt enable bits */ + /* Set ONEBIT, HDSEL and EIE */ + + regval = stm32_1wire_in(priv, STM32_USART_CR3_OFFSET); + regval &= ~(USART_CR3_CTSIE | USART_CR3_CTSE | USART_CR3_RTSE | USART_CR3_EIE); + regval |= (USART_CR3_ONEBIT | USART_CR3_HDSEL | USART_CR3_EIE); + stm32_1wire_out(priv, STM32_USART_CR3_OFFSET, regval); + + /* Set baud rate */ + + priv->baud = RESET_BAUD; + stm32_1wire_set_baud(priv); + + /* Enable Rx, Tx, and the USART */ + + regval = stm32_1wire_in(priv, STM32_USART_CR1_OFFSET); + regval |= (USART_CR1_UE | USART_CR1_TE | USART_CR1_RE); + stm32_1wire_out(priv, STM32_USART_CR1_OFFSET, regval); + + /* Configure pins for USART use */ + + stm32_configgpio(config->data_pin); + + ret = irq_attach(config->irq, config->vector); + if (ret == OK) + { + up_enable_irq(config->irq); + } + + return ret; +} + +/**************************************************************************** + * Name: stm32_1wire_deinit + * + * Description: + * Shutdown the 1-Wire hardware + * + ****************************************************************************/ + +static int stm32_1wire_deinit(FAR struct stm32_1wire_priv_s *priv) +{ + const struct stm32_1wire_config_s *config = priv->config; + uint32_t regval; + + up_disable_irq(config->irq); + irq_detach(config->irq); + + /* Unconfigure GPIO pins */ + + stm32_unconfiggpio(config->data_pin); + + /* Disable RXNEIE, Rx, Tx, and the USART */ + + regval = stm32_1wire_in(priv, STM32_USART_CR1_OFFSET); + regval &= ~(USART_CR1_UE | USART_CR1_TE | USART_CR1_RE | USART_CR1_RXNEIE); + stm32_1wire_out(priv, STM32_USART_CR1_OFFSET, regval); + + /* Clear LBDIE */ + + regval = stm32_1wire_in(priv, STM32_USART_CR2_OFFSET); + regval &= ~USART_CR2_LBDIE; + stm32_1wire_out(priv, STM32_USART_CR2_OFFSET, regval); + + /* Clear ONEBIT, HDSEL and EIE */ + + regval = stm32_1wire_in(priv, STM32_USART_CR3_OFFSET); + regval &= ~(USART_CR3_ONEBIT | USART_CR3_HDSEL | USART_CR3_EIE); + stm32_1wire_out(priv, STM32_USART_CR3_OFFSET, regval); + + /* Disable USART APB1/2 clock */ + + stm32_1wire_set_apb_clock(priv, false); + + return OK; +} + +/**************************************************************************** + * Name: stm32_1wire_sem_init + * + * Description: + * Initialize semaphores + * + ****************************************************************************/ + +static inline void stm32_1wire_sem_init(FAR struct stm32_1wire_priv_s *priv) +{ + sem_init(&priv->sem_excl, 0, 1); + sem_init(&priv->sem_isr, 0, 0); +} + +/**************************************************************************** + * Name: stm32_1wire_sem_destroy + * + * Description: + * Destroy semaphores. + * + ****************************************************************************/ + +static inline void stm32_1wire_sem_destroy(FAR struct stm32_1wire_priv_s *priv) +{ + sem_destroy(&priv->sem_excl); + sem_destroy(&priv->sem_isr); +} + +/**************************************************************************** + * Name: stm32_1wire_sem_wait + * + * Description: + * Take the exclusive access, waiting as necessary + * + ****************************************************************************/ + +static inline void stm32_1wire_sem_wait(FAR struct stm32_1wire_priv_s *priv) +{ + while (sem_wait(&priv->sem_excl) != 0) + { + ASSERT(errno == EINTR); + } +} + +/**************************************************************************** + * Name: stm32_1wire_sem_post + * + * Description: + * Release the mutual exclusion semaphore + * + ****************************************************************************/ + +static inline void stm32_1wire_sem_post(FAR struct stm32_1wire_priv_s *priv) +{ + sem_post(&priv->sem_excl); +} + +/**************************************************************************** + * Name: stm32_1wire_exec + * + * Description: + * Execute 1-Wire task + ****************************************************************************/ +static int stm32_1wire_process(struct stm32_1wire_priv_s *priv, + FAR const struct stm32_1wire_msg_s *msgs, + int count) +{ + irqstate_t irqs; + struct timespec abstime; + int indx; + int ret; + + /* Lock out other clients */ + + stm32_1wire_sem_wait(priv); + + priv->result = ERROR; + + for (indx = 0; indx < count; indx++) + { + switch (msgs[indx].task) + { + case ONEWIRETASK_NONE: + priv->result = OK; + break; + + case ONEWIRETASK_RESET: + /* Set baud rate */ + + priv->baud = RESET_BAUD; + stm32_1wire_set_baud(priv); + + /* Atomic */ + + irqs = enter_critical_section(); + priv->msgs = &msgs[indx]; + stm32_1wire_send(priv, RESET_TX); + leave_critical_section(irqs); + + /* Wait */ + + clock_gettime(CLOCK_REALTIME, &abstime); + abstime.tv_sec += BUS_TIMEOUT; + sem_timedwait(&priv->sem_isr, &abstime); /* break on timeout if TX line closed to GND */ + break; + + case ONEWIRETASK_WRITE: + /* Set baud rate */ + + priv->baud = TIMESLOT_BAUD; + stm32_1wire_set_baud(priv); + + /* Atomic */ + + irqs = enter_critical_section(); + priv->msgs = &msgs[indx]; + priv->byte = priv->msgs->buffer; + priv->bit = 0; + stm32_1wire_send(priv, (*priv->byte & (1 << priv->bit)) ? WRITE_TX1 : WRITE_TX0); + leave_critical_section(irqs); + + /* Wait */ + + clock_gettime(CLOCK_REALTIME, &abstime); + abstime.tv_sec += BUS_TIMEOUT; + sem_timedwait(&priv->sem_isr, &abstime); /* break on timeout if TX line closed to GND */ + break; + + case ONEWIRETASK_READ: + /* Set baud rate */ + + priv->baud = TIMESLOT_BAUD; + stm32_1wire_set_baud(priv); + + /* Atomic */ + + irqs = enter_critical_section(); + priv->msgs = &msgs[indx]; + priv->byte = priv->msgs->buffer; + priv->bit = 0; + stm32_1wire_send(priv, READ_TX); + leave_critical_section(irqs); + + /* Wait */ + + clock_gettime(CLOCK_REALTIME, &abstime); + abstime.tv_sec += BUS_TIMEOUT; + sem_timedwait(&priv->sem_isr, &abstime); /* break on timeout if TX line closed to GND */ + break; + } + + if (priv->result != OK) /* break if error */ + { + break; + } + } + + /* Atomic */ + + irqs = enter_critical_section(); + priv->msgs = NULL; + ret = priv->result; + leave_critical_section(irqs); + + /* Release the port for re-use by other clients */ + + stm32_1wire_sem_post(priv); + + return ret; +} + +/**************************************************************************** + * Name: stm32_1wire_isr + * + * Description: + * Common Interrupt Service Routine + ****************************************************************************/ + +static int stm32_1wire_isr(struct stm32_1wire_priv_s *priv) +{ + uint32_t sr, dr; + + /* Get the masked USART status word. */ + + sr = stm32_1wire_in(priv, STM32_USART_SR_OFFSET); + + /* Receive loop */ + + if ((sr & USART_SR_RXNE) != 0) + { + dr = stm32_1wire_recv(priv); + + if (priv->msgs != NULL) + { + switch (priv->msgs->task) + { + case ONEWIRETASK_NONE: + break; + + case ONEWIRETASK_RESET: + priv->msgs = NULL; + priv->result = (dr != RESET_TX) ? OK : -ENODEV; /* if read RESET_TX then no slave */ + sem_post(&priv->sem_isr); + break; + + case ONEWIRETASK_WRITE: + if (++priv->bit >= 8) + { + priv->bit = 0; + if (++priv->byte >= (priv->msgs->buffer + priv->msgs->buflen)) /* Done? */ + { + priv->msgs = NULL; + priv->result = OK; + sem_post(&priv->sem_isr); + break; + } + } + + /* Send next bit */ + + stm32_1wire_send(priv, (*priv->byte & (1 << priv->bit)) ? WRITE_TX1 : WRITE_TX0); + break; + + case ONEWIRETASK_READ: + if (dr == READ_RX1) + { + *priv->byte |= (1 << priv->bit); + } + else + { + *priv->byte &= ~(1 << priv->bit); + } + + if (++priv->bit >= 8) + { + priv->bit = 0; + if (++priv->byte >= (priv->msgs->buffer + priv->msgs->buflen)) /* Done? */ + { + priv->msgs = NULL; + priv->result = OK; + sem_post(&priv->sem_isr); + break; + } + } + + /* Recv next bit */ + + stm32_1wire_send(priv, READ_TX); + break; + } + } + } + + /* Bounce check. */ + + if ((sr & (USART_SR_ORE | USART_SR_NE | USART_SR_FE)) != 0) + { +#if defined(CONFIG_STM32_STM32F30XX) || defined(CONFIG_STM32_STM32F37XX) + /* These errors are cleared by writing the corresponding bit to the + * interrupt clear register (ICR). + */ + + stm32_1wire_out(priv, STM32_USART_ICR_OFFSET, + (USART_ICR_NCF | USART_ICR_ORECF | USART_ICR_FECF)); +#else + /* If an error occurs, read from DR to clear the error (data has + * been lost). If ORE is set along with RXNE then it tells you + * that the byte *after* the one in the data register has been + * lost, but the data register value is correct. That case will + * be handled above if interrupts are enabled. Otherwise, that + * good byte will be lost. + */ + + (void)stm32_1wire_recv(priv); +#endif + + if (priv->msgs != NULL) + { + priv->msgs = NULL; + priv->result = ERROR; + sem_post(&priv->sem_isr); + } + } + + /* Bounce check. LIN break detection */ + + if ((sr & USART_SR_LBD) != 0) + { + sr &= ~USART_SR_LBD; + stm32_1wire_out(priv, STM32_USART_SR_OFFSET, sr); + + if (priv->msgs != NULL) + { + priv->msgs = NULL; + priv->result = ERROR; + sem_post(&priv->sem_isr); + } + } + + return OK; +} + +#ifdef CONFIG_STM32_USART1_1WIREDRIVER +static int stm32_interrupt_1wire1(int irq, void *context) +{ + return stm32_1wire_isr(&stm32_1wire1_priv); +} +#endif +#ifdef CONFIG_STM32_USART2_1WIREDRIVER +static int stm32_interrupt_1wire2(int irq, void *context) +{ + return stm32_1wire_isr(&stm32_1wire2_priv); +} +#endif +#ifdef CONFIG_STM32_USART3_1WIREDRIVER +static int stm32_interrupt_1wire3(int irq, void *context) +{ + return stm32_1wire_isr(&stm32_1wire3_priv); +} +#endif +#ifdef CONFIG_STM32_UART4_1WIREDRIVER +static int stm32_interrupt_1wire4(int irq, void *context) +{ + return stm32_1wire_isr(&stm32_1wire4_priv); +} +#endif +#ifdef CONFIG_STM32_UART5_1WIREDRIVER +static int stm32_interrupt_1wire5(int irq, void *context) +{ + return stm32_1wire_isr(&stm32_1wire5_priv); +} +#endif +#ifdef CONFIG_STM32_USART6_1WIREDRIVER +static int stm32_interrupt_1wire6(int irq, void *context) +{ + return stm32_1wire_isr(&stm32_1wire6_priv); +} +#endif +#ifdef CONFIG_STM32_UART7_1WIREDRIVER +static int stm32_interrupt_1wire7(int irq, void *context) +{ + return stm32_1wire_isr(&stm32_1wire7_priv); +} +#endif +#ifdef CONFIG_STM32_UART8_1WIREDRIVER +static int stm32_interrupt_1wire8(int irq, void *context) +{ + return stm32_1wire_isr(&stm32_1wire8_priv); +} +#endif + +/**************************************************************************** + * Name: stm32_1wire_reset + * + * Description: + * 1-Wire reset pulse and presence detect. + * + ****************************************************************************/ + +static int stm32_1wire_reset(FAR struct onewire_dev_s *dev) +{ + struct stm32_1wire_priv_s *priv = ((struct stm32_1wire_inst_s *)dev)->priv; + const struct stm32_1wire_msg_s msgs[1] = + { + [0].task = ONEWIRETASK_RESET + }; + + return stm32_1wire_process(priv, msgs, 1); +} + +/**************************************************************************** + * Name: stm32_1wire_write + * + * Description: + * Write 1-Wire data + * + ****************************************************************************/ + +static int stm32_1wire_write(FAR struct onewire_dev_s *dev, const uint8_t *buffer, + int buflen) +{ + struct stm32_1wire_priv_s *priv = ((struct stm32_1wire_inst_s *)dev)->priv; + const struct stm32_1wire_msg_s msgs[1] = + { + [0].task = ONEWIRETASK_WRITE, + [0].buffer = (uint8_t *)buffer, + [0].buflen = buflen + }; + + return stm32_1wire_process(priv, msgs, 1); +} + +/**************************************************************************** + * Name: stm32_1wire_read + * + * Description: + * Read 1-Wire data + * + ****************************************************************************/ + +static int stm32_1wire_read(FAR struct onewire_dev_s *dev, uint8_t *buffer, int buflen) +{ + struct stm32_1wire_priv_s *priv = ((struct stm32_1wire_inst_s *)dev)->priv; + const struct stm32_1wire_msg_s msgs[1] = + { + [0].task = ONEWIRETASK_READ, + [0].buffer = buffer, + [0].buflen = buflen + }; + + return stm32_1wire_process(priv, msgs, 1); +} + +/**************************************************************************** + * Name: stm32_1wire_exchange + * + * Description: + * 1-Wire reset pulse and presence detect, + * Write 1-Wire data, + * Read 1-Wire data + * + ****************************************************************************/ + +static int stm32_1wire_exchange(FAR struct onewire_dev_s *dev, bool reset, + const uint8_t *txbuffer, int txbuflen, + uint8_t *rxbuffer, int rxbuflen) + +{ + int result = ERROR; + struct stm32_1wire_priv_s *priv = ((struct stm32_1wire_inst_s *)dev)->priv; + + if (reset) + { + const struct stm32_1wire_msg_s msgs[3] = + { + [0].task = ONEWIRETASK_RESET, + + [1].task = ONEWIRETASK_WRITE, + [1].buffer = (uint8_t *)txbuffer, + [1].buflen = txbuflen, + + [2].task = ONEWIRETASK_READ, + [2].buffer = rxbuffer, + [2].buflen = rxbuflen + }; + + result = stm32_1wire_process(priv, msgs, 3); + } + else + { + const struct stm32_1wire_msg_s msgs[2] = + { + [0].task = ONEWIRETASK_WRITE, + [0].buffer = (uint8_t *)txbuffer, + [0].buflen = txbuflen, + + [1].task = ONEWIRETASK_READ, + [1].buffer = rxbuffer, + [1].buflen = rxbuflen + }; + + result = stm32_1wire_process(priv, msgs, 2); + } + return result; +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: stm32_1wireinitialize + * + * Description: + * Initialize the selected 1-Wire port. And return a unique instance of struct + * struct onewire_dev_s. This function may be called to obtain multiple + * instances of the interface, each of which may be set up with a + * different frequency and slave address. + * + * Input Parameter: + * Port number (for hardware that has multiple 1-Wire interfaces) + * + * Returned Value: + * Valid 1-Wire device structure reference on succcess; a NULL on failure + * + ****************************************************************************/ + +FAR struct onewire_dev_s *stm32_1wireinitialize(int port) +{ + struct stm32_1wire_priv_s *priv = NULL; /* Private data of device with multiple instances */ + struct stm32_1wire_inst_s *inst = NULL; /* Device, single instance */ + int irqs; + + /* Get 1-Wire private structure */ + + switch (port) + { +#ifdef CONFIG_STM32_USART1_1WIREDRIVER + case 1: + priv = &stm32_1wire1_priv; + break; +#endif +#ifdef CONFIG_STM32_USART2_1WIREDRIVER + case 2: + priv = &stm32_1wire2_priv; + break; +#endif +#ifdef CONFIG_STM32_USART3_1WIREDRIVER + case 3: + priv = &stm32_1wire3_priv; + break; +#endif +#ifdef CONFIG_STM32_UART4_1WIREDRIVER + case 4: + priv = &stm32_1wire4_priv; + break; +#endif +#ifdef CONFIG_STM32_UART5_1WIREDRIVER + case 5: + priv = &stm32_1wire5_priv; + break; +#endif +#ifdef CONFIG_STM32_USART6_1WIREDRIVER + case 6: + priv = &stm32_1wire6_priv; + break; +#endif +#ifdef CONFIG_STM32_UART7_1WIREDRIVER + case 7: + priv = &stm32_1wire7_priv; + break; +#endif +#ifdef CONFIG_STM32_UART8_1WIREDRIVER + case 8: + priv = &stm32_1wire8_priv; + break; +#endif + default: + return NULL; + } + + /* Allocate instance */ + + if (!(inst = kmm_malloc(sizeof(struct stm32_1wire_inst_s)))) + { + return NULL; + } + + /* Initialize instance */ + + inst->ops = &stm32_1wire_ops; + inst->priv = priv; + + /* Initialize private data for the first time, increment reference count, + * power-up hardware and configure GPIOs. + */ + + irqs = enter_critical_section(); + + if (priv->refs++ == 0) + { + stm32_1wire_sem_init(priv); + stm32_1wire_init(priv); + } + + leave_critical_section(irqs); + return (struct onewire_dev_s *)inst; +} + +/**************************************************************************** + * Name: stm32_1wireuninitialize + * + * Description: + * De-initialize the selected 1-Wire port, and power down the device. + * + * Input Parameter: + * Device structure as returned by the stm32_1wireinitialize() + * + * Returned Value: + * OK on success, ERROR when internal reference count mismatch or dev + * points to invalid hardware device. + * + ****************************************************************************/ + +int stm32_1wireuninitialize(FAR struct onewire_dev_s *dev) +{ + struct stm32_1wire_priv_s *priv = ((struct stm32_1wire_inst_s *)dev)->priv; + int irqs; + + ASSERT(dev); + + /* Decrement reference count and check for underflow */ + + if (priv->refs == 0) + { + return ERROR; + } + + irqs = enter_critical_section(); + + if (--priv->refs) + { + leave_critical_section(irqs); + kmm_free(priv); + return OK; + } + + leave_critical_section(irqs); + + /* Disable power and other HW resource (GPIO's) */ + + stm32_1wire_deinit(priv); + + /* Release unused resources */ + + stm32_1wire_sem_destroy(priv); + + /* Free instance */ + + kmm_free(dev); + return OK; +} + +#endif /* HAVE_1WIREDRIVER */ diff --git a/arch/arm/src/stm32/stm32_1wire.h b/arch/arm/src/stm32/stm32_1wire.h new file mode 100644 index 00000000000..24cfe45592f --- /dev/null +++ b/arch/arm/src/stm32/stm32_1wire.h @@ -0,0 +1,87 @@ +/************************************************************************************ + * arch/arm/src/stm32/stm32_1wire.h + * + * Copyright (C) 2016 Aleksandr Vyhovanec. All rights reserved. + * Author: Aleksandr Vyhovanec + * + * 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. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_STM32_STM32_1WIRE_H +#define __ARCH_ARM_SRC_STM32_STM32_1WIRE_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include "stm32_uart.h" + +/************************************************************************************ + * Public Function Prototypes + ************************************************************************************/ + +/**************************************************************************** + * Name: stm32_1wireinitialize + * + * Description: + * Initialize the selected 1-Wire port. And return a unique instance of struct + * struct onewire_dev_s. This function may be called to obtain multiple + * instances of the interface, each of which may be set up with a + * different frequency and slave address. + * + * Input Parameter: + * Port number (for hardware that has multiple 1-Wire interfaces) + * + * Returned Value: + * Valid 1-Wire device structure reference on succcess; a NULL on failure + * + ****************************************************************************/ + +FAR struct onewire_dev_s *stm32_1wireinitialize(int port); + +/**************************************************************************** + * Name: stm32_1wireuninitialize + * + * Description: + * De-initialize the selected 1-Wire port, and power down the device. + * + * Input Parameter: + * Device structure as returned by the stm32_1wireinitialize() + * + * Returned Value: + * OK on success, ERROR when internal reference count mismatch or dev + * points to invalid hardware device. + * + ****************************************************************************/ + +int stm32_1wireuninitialize(FAR struct onewire_dev_s *dev); + +#endif /* __ARCH_ARM_SRC_STM32_STM32_1WIRE_H */ diff --git a/arch/arm/src/stm32/stm32_adc.c b/arch/arm/src/stm32/stm32_adc.c index a2d97cf51cd..c24a98dbc75 100644 --- a/arch/arm/src/stm32/stm32_adc.c +++ b/arch/arm/src/stm32/stm32_adc.c @@ -69,7 +69,7 @@ /* ADC "upper half" support must be enabled */ -#ifdef CONFIG_ADC +#ifdef CONFIG_STM32_ADC /* Some ADC peripheral must be enabled */ @@ -272,6 +272,7 @@ struct stm32_dev_s { + FAR const struct adc_callback_s *cb; uint8_t irq; /* Interrupt generated by this ADC block */ uint8_t nchannels; /* Number of channels */ uint8_t cchannels; /* Number of configured channels */ @@ -364,6 +365,8 @@ static int adc123_interrupt(int irq, FAR void *context); /* ADC Driver Methods */ +static int adc_bind(FAR struct adc_dev_s *dev, + FAR const struct adc_callback_s *callback); static void adc_reset(FAR struct adc_dev_s *dev); static int adc_setup(FAR struct adc_dev_s *dev); static void adc_shutdown(FAR struct adc_dev_s *dev); @@ -412,6 +415,7 @@ static void adc_startconv(FAR struct stm32_dev_s *priv, bool enable); static const struct adc_ops_s g_adcops = { + .ao_bind = adc_bind, #if defined(CONFIG_STM32_STM32L15XX) && \ (STM32_CFGR_PLLSRC != 0 || STM32_SYSCLK_SW != RCC_CFGR_SW_HSI) .ao_reset = adc_reset_hsi_disable, @@ -1641,15 +1645,22 @@ static void adc_dmaconvcallback(DMA_HANDLE handle, uint8_t isr, FAR void *arg) FAR struct stm32_dev_s *priv = (FAR struct stm32_dev_s *)dev->ad_priv; int i; - for (i = 0; i < priv->nchannels; i++) - { - adc_receive(dev, priv->current, priv->dmabuffer[priv->current]); - priv->current++; - if (priv->current >= priv->nchannels) - { - /* Restart the conversion sequence from the beginning */ + /* Verify that the upper-half driver has bound its callback functions */ - priv->current = 0; + if (priv->cb != NULL) + { + DEBUGASSERT(priv->cb->au_receive != NULL); + + for (i = 0; i < priv->nchannels; i++) + { + priv->cb->au_receive(dev, priv->current, priv->dmabuffer[priv->current]); + priv->current++; + if (priv->current >= priv->nchannels) + { + /* Restart the conversion sequence from the beginning */ + + priv->current = 0; + } } } @@ -1660,6 +1671,25 @@ static void adc_dmaconvcallback(DMA_HANDLE handle, uint8_t isr, FAR void *arg) } #endif +/**************************************************************************** + * Name: adc_bind + * + * Description: + * Bind the upper-half driver callbacks to the lower-half implementation. This + * must be called early in order to receive ADC event notifications. + * + ****************************************************************************/ + +static int adc_bind(FAR struct adc_dev_s *dev, + FAR const struct adc_callback_s *callback) +{ + FAR struct stm32_dev_s *priv = (FAR struct stm32_dev_s *)dev->ad_priv; + + DEBUGASSERT(priv != NULL); + priv->cb = callback; + return OK; +} + /**************************************************************************** * Name: adc_reset * @@ -2702,15 +2732,21 @@ static int adc_interrupt(FAR struct adc_dev_s *dev) data = adc_getreg(priv, STM32_ADC_DR_OFFSET) & ADC_DR_RDATA_MASK; - /* Give the ADC data to the ADC driver. adc_receive() accepts 3 - * parameters: - * - * 1) The first is the ADC device instance for this ADC block. - * 2) The second is the channel number for the data, and - * 3) The third is the converted data for the channel. - */ + /* Verify that the upper-half driver has bound its callback functions */ - adc_receive(dev, priv->chanlist[priv->current], data); + if (priv->cb != NULL) + { + /* Give the ADC data to the ADC driver. The ADC receive() method + * accepts 3 parameters: + * + * 1) The first is the ADC device instance for this ADC block. + * 2) The second is the channel number for the data, and + * 3) The third is the converted data for the channel. + */ + + DEBUGASSERT(priv->cb->au_receive != NULL); + priv->cb->au_receive(dev, priv->chanlist[priv->current], data); + } /* Set the channel number of the next channel that will complete * conversion. @@ -2995,6 +3031,7 @@ struct adc_dev_s *stm32_adcinitialize(int intf, FAR const uint8_t *chanlist, DEBUGASSERT(cchannels <= ADC_MAX_SAMPLES); + priv->cb = NULL; priv->cchannels = cchannels; memcpy(priv->chanlist, chanlist, cchannels); @@ -3009,4 +3046,4 @@ struct adc_dev_s *stm32_adcinitialize(int intf, FAR const uint8_t *chanlist, #endif /* CONFIG_STM32_ADC1 || CONFIG_STM32_ADC2 || * CONFIG_STM32_ADC3 || CONFIG_STM32_ADC4 */ -#endif /* CONFIG_ADC */ +#endif /* CONFIG_STM32_ADC */ diff --git a/arch/arm/src/stm32/stm32_can.c b/arch/arm/src/stm32/stm32_can.c index 8628b2fa79b..8cb61decf14 100644 --- a/arch/arm/src/stm32/stm32_can.c +++ b/arch/arm/src/stm32/stm32_can.c @@ -4,6 +4,9 @@ * Copyright (C) 2011, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * + * Copyright (C) 2016 Omni Hoverboards Inc. All rights reserved. + * Author: Paul Alexander Patience + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -103,13 +106,13 @@ struct stm32_can_s { - uint8_t port; /* CAN port number (1 or 2) */ - uint8_t canrx0; /* CAN RX FIFO 0 IRQ number */ - uint8_t cantx; /* CAN TX IRQ number */ - uint8_t filter; /* Filter number */ - uint32_t base; /* Base address of the CAN control registers */ - uint32_t fbase; /* Base address of the CAN filter registers */ - uint32_t baud; /* Configured baud */ + uint8_t port; /* CAN port number (1 or 2) */ + uint8_t canrx[2]; /* CAN RX FIFO 0/1 IRQ number */ + uint8_t cantx; /* CAN TX IRQ number */ + uint8_t filter; /* Filter number */ + uint32_t base; /* Base address of the CAN control registers */ + uint32_t fbase; /* Base address of the CAN filter registers */ + uint32_t baud; /* Configured baud */ }; /**************************************************************************** @@ -118,14 +121,19 @@ struct stm32_can_s /* CAN Register access */ -static uint32_t can_getreg(struct stm32_can_s *priv, int offset); -static uint32_t can_getfreg(struct stm32_can_s *priv, int offset); -static void can_putreg(struct stm32_can_s *priv, int offset, uint32_t value); -static void can_putfreg(struct stm32_can_s *priv, int offset, uint32_t value); +static uint32_t can_getreg(FAR struct stm32_can_s *priv, int offset); +static uint32_t can_getfreg(FAR struct stm32_can_s *priv, int offset); +static void can_putreg(FAR struct stm32_can_s *priv, int offset, + uint32_t value); +static void can_putfreg(FAR struct stm32_can_s *priv, int offset, + uint32_t value); #ifdef CONFIG_CAN_REGDEBUG -static void can_dumpctrlregs(struct stm32_can_s *priv, FAR const char *msg); -static void can_dumpmbregs(struct stm32_can_s *priv, FAR const char *msg); -static void can_dumpfiltregs(struct stm32_can_s *priv, FAR const char *msg); +static void can_dumpctrlregs(FAR struct stm32_can_s *priv, + FAR const char *msg); +static void can_dumpmbregs(FAR struct stm32_can_s *priv, + FAR const char *msg); +static void can_dumpfiltregs(FAR struct stm32_can_s *priv, + FAR const char *msg); #else # define can_dumpctrlregs(priv,msg) # define can_dumpmbregs(priv,msg) @@ -147,14 +155,16 @@ static bool can_txempty(FAR struct can_dev_s *dev); /* CAN interrupt handling */ -static int can_rx0interrupt(int irq, void *context); -static int can_txinterrupt(int irq, void *context); +static int can_rxinterrupt(int irq, FAR void *context, int rxmb); +static int can_rx0interrupt(int irq, FAR void *context); +static int can_rx1interrupt(int irq, FAR void *context); +static int can_txinterrupt(int irq, FAR void *context); /* Initialization */ -static int can_bittiming(struct stm32_can_s *priv); -static int can_cellinit(struct stm32_can_s *priv); -static int can_filterinit(struct stm32_can_s *priv); +static int can_bittiming(FAR struct stm32_can_s *priv); +static int can_cellinit(FAR struct stm32_can_s *priv); +static int can_filterinit(FAR struct stm32_can_s *priv); /**************************************************************************** * Private Data @@ -178,7 +188,11 @@ static const struct can_ops_s g_canops = static struct stm32_can_s g_can1priv = { .port = 1, - .canrx0 = STM32_IRQ_CAN1RX0, + .canrx = + { + STM32_IRQ_CAN1RX0, + STM32_IRQ_CAN1RX1, + }, .cantx = STM32_IRQ_CAN1TX, .filter = 0, .base = STM32_CAN1_BASE, @@ -197,7 +211,11 @@ static struct can_dev_s g_can1dev = static struct stm32_can_s g_can2priv = { .port = 2, - .canrx0 = STM32_IRQ_CAN2RX0, + .canrx = + { + STM32_IRQ_CAN2RX0, + STM32_IRQ_CAN2RX1, + }, .cantx = STM32_IRQ_CAN2TX, .filter = CAN_NFILTERS / 2, .base = STM32_CAN2_BASE, @@ -285,23 +303,23 @@ static uint32_t can_vgetreg(uint32_t addr) return val; } -static uint32_t can_getreg(struct stm32_can_s *priv, int offset) +static uint32_t can_getreg(FAR struct stm32_can_s *priv, int offset) { return can_vgetreg(priv->base + offset); } -static uint32_t can_getfreg(struct stm32_can_s *priv, int offset) +static uint32_t can_getfreg(FAR struct stm32_can_s *priv, int offset) { return can_vgetreg(priv->fbase + offset); } #else -static uint32_t can_getreg(struct stm32_can_s *priv, int offset) +static uint32_t can_getreg(FAR struct stm32_can_s *priv, int offset) { return getreg32(priv->base + offset); } -static uint32_t can_getfreg(struct stm32_can_s *priv, int offset) +static uint32_t can_getfreg(FAR struct stm32_can_s *priv, int offset) { return getreg32(priv->fbase + offset); } @@ -338,23 +356,27 @@ static void can_vputreg(uint32_t addr, uint32_t value) putreg32(value, addr); } -static void can_putreg(struct stm32_can_s *priv, int offset, uint32_t value) +static void can_putreg(FAR struct stm32_can_s *priv, int offset, + uint32_t value) { can_vputreg(priv->base + offset, value); } -static void can_putfreg(struct stm32_can_s *priv, int offset, uint32_t value) +static void can_putfreg(FAR struct stm32_can_s *priv, int offset, + uint32_t value) { can_vputreg(priv->fbase + offset, value); } #else -static void can_putreg(struct stm32_can_s *priv, int offset, uint32_t value) +static void can_putreg(FAR struct stm32_can_s *priv, int offset, + uint32_t value) { putreg32(value, priv->base + offset); } -static void can_putfreg(struct stm32_can_s *priv, int offset, uint32_t value) +static void can_putfreg(FAR struct stm32_can_s *priv, int offset, + uint32_t value) { putreg32(value, priv->fbase + offset); } @@ -375,7 +397,8 @@ static void can_putfreg(struct stm32_can_s *priv, int offset, uint32_t value) ****************************************************************************/ #ifdef CONFIG_CAN_REGDEBUG -static void can_dumpctrlregs(struct stm32_can_s *priv, FAR const char *msg) +static void can_dumpctrlregs(FAR struct stm32_can_s *priv, + FAR const char *msg) { if (msg) { @@ -419,7 +442,8 @@ static void can_dumpctrlregs(struct stm32_can_s *priv, FAR const char *msg) ****************************************************************************/ #ifdef CONFIG_CAN_REGDEBUG -static void can_dumpmbregs(struct stm32_can_s *priv, FAR const char *msg) +static void can_dumpmbregs(FAR struct stm32_can_s *priv, + FAR const char *msg) { if (msg) { @@ -479,7 +503,8 @@ static void can_dumpmbregs(struct stm32_can_s *priv, FAR const char *msg) ****************************************************************************/ #ifdef CONFIG_CAN_REGDEBUG -static void can_dumpfiltregs(struct stm32_can_s *priv, FAR const char *msg) +static void can_dumpfiltregs(FAR struct stm32_can_s *priv, + FAR const char *msg) { int i; @@ -553,8 +578,8 @@ static void can_reset(FAR struct can_dev_s *dev) return; } - /* Disable interrupts momentary to stop any ongoing CAN event processing and - * to prevent any concurrent access to the AHB1RSTR register. + /* Disable interrupts momentarily to stop any ongoing CAN event processing + * and to prevent any concurrent access to the AHB1RSTR register. */ flags = enter_critical_section(); @@ -592,7 +617,8 @@ static int can_setup(FAR struct can_dev_s *dev) FAR struct stm32_can_s *priv = dev->cd_priv; int ret; - canllvdbg("CAN%d RX0 irq: %d TX irq: %d\n", priv->port, priv->canrx0, priv->cantx); + canllvdbg("CAN%d RX0 irq: %d RX1 irq: %d TX irq: %d\n", + priv->port, priv->canrx[0], priv->canrx[1], priv->cantx); /* CAN cell initialization */ @@ -616,28 +642,41 @@ static int can_setup(FAR struct can_dev_s *dev) } can_dumpfiltregs(priv, "After filter initialization"); - /* Attach the CAN RX FIFO 0 interrupt and TX interrupts. The others are not used */ + /* Attach the CAN RX FIFO 0/1 interrupts and TX interrupts. + * The others are not used. + */ - ret = irq_attach(priv->canrx0, can_rx0interrupt); + ret = irq_attach(priv->canrx[0], can_rx0interrupt); if (ret < 0) { - canlldbg("Failed to attach CAN%d RX0 IRQ (%d)", priv->port, priv->canrx0); + canlldbg("Failed to attach CAN%d RX0 IRQ (%d)", + priv->port, priv->canrx[0]); + return ret; + } + + ret = irq_attach(priv->canrx[1], can_rx1interrupt); + if (ret < 0) + { + canlldbg("Failed to attach CAN%d RX1 IRQ (%d)", + priv->port, priv->canrx[1]); return ret; } ret = irq_attach(priv->cantx, can_txinterrupt); if (ret < 0) { - canlldbg("Failed to attach CAN%d TX IRQ (%d)", priv->port, priv->cantx); + canlldbg("Failed to attach CAN%d TX IRQ (%d)", + priv->port, priv->cantx); return ret; } - /* Enable the interrupts at the NVIC. Interrupts arestill disabled in + /* Enable the interrupts at the NVIC. Interrupts are still disabled in * the CAN module. Since we coming out of reset here, there should be * no pending interrupts. */ - up_enable_irq(priv->canrx0); + up_enable_irq(priv->canrx[0]); + up_enable_irq(priv->canrx[1]); up_enable_irq(priv->cantx); return OK; } @@ -663,14 +702,16 @@ static void can_shutdown(FAR struct can_dev_s *dev) canllvdbg("CAN%d\n", priv->port); - /* Disable the RX FIFO 0 and TX interrupts */ + /* Disable the RX FIFO 0/1 and TX interrupts */ - up_disable_irq(priv->canrx0); + up_disable_irq(priv->canrx[0]); + up_disable_irq(priv->canrx[1]); up_disable_irq(priv->cantx); - /* Detach the RX FIFO 0 and TX interrupts */ + /* Detach the RX FIFO 0/1 and TX interrupts */ - irq_detach(priv->canrx0); + irq_detach(priv->canrx[0]); + irq_detach(priv->canrx[1]); irq_detach(priv->cantx); /* And reset the hardware */ @@ -699,16 +740,16 @@ static void can_rxint(FAR struct can_dev_s *dev, bool enable) canllvdbg("CAN%d enable: %d\n", priv->port, enable); - /* Enable/disable the FIFO 0 message pending interrupt */ + /* Enable/disable the FIFO 0/1 message pending interrupt */ regval = can_getreg(priv, STM32_CAN_IER_OFFSET); if (enable) { - regval |= CAN_IER_FMPIE0; + regval |= CAN_IER_FMPIE0 | CAN_IER_FMPIE1; } else { - regval &= ~CAN_IER_FMPIE0; + regval &= ~(CAN_IER_FMPIE0 | CAN_IER_FMPIE1); } can_putreg(priv, STM32_CAN_IER_OFFSET, regval); } @@ -817,7 +858,8 @@ static int can_send(FAR struct can_dev_s *dev, FAR struct can_msg_s *msg) int dlc; int txmb; - canllvdbg("CAN%d ID: %d DLC: %d\n", priv->port, msg->cm_hdr.ch_id, msg->cm_hdr.ch_dlc); + canllvdbg("CAN%d ID: %d DLC: %d\n", + priv->port, msg->cm_hdr.ch_id, msg->cm_hdr.ch_dlc); /* Select one empty transmit mailbox */ @@ -843,7 +885,8 @@ static int can_send(FAR struct can_dev_s *dev, FAR struct can_msg_s *msg) /* Clear TXRQ, RTR, IDE, EXID, and STID fields */ regval = can_getreg(priv, STM32_CAN_TIR_OFFSET(txmb)); - regval &= ~(CAN_TIR_TXRQ | CAN_TIR_RTR | CAN_TIR_IDE | CAN_TIR_EXID_MASK | CAN_TIR_STID_MASK); + regval &= ~(CAN_TIR_TXRQ | CAN_TIR_RTR | CAN_TIR_IDE | + CAN_TIR_EXID_MASK | CAN_TIR_STID_MASK); can_putreg(priv, STM32_CAN_TIR_OFFSET(txmb), regval); /* Set up the ID, standard 11-bit or extended 29-bit. */ @@ -886,17 +929,17 @@ static int can_send(FAR struct can_dev_s *dev, FAR struct can_msg_s *msg) if (dlc > 1) { - tmp = (uint32_t)*ptr++; + tmp = (uint32_t)*ptr++; regval |= tmp << CAN_TDLR_DATA1_SHIFT; if (dlc > 2) { - tmp = (uint32_t)*ptr++; + tmp = (uint32_t)*ptr++; regval |= tmp << CAN_TDLR_DATA2_SHIFT; if (dlc > 3) { - tmp = (uint32_t)*ptr++; + tmp = (uint32_t)*ptr++; regval |= tmp << CAN_TDLR_DATA3_SHIFT; } } @@ -912,17 +955,17 @@ static int can_send(FAR struct can_dev_s *dev, FAR struct can_msg_s *msg) if (dlc > 5) { - tmp = (uint32_t)*ptr++; + tmp = (uint32_t)*ptr++; regval |= tmp << CAN_TDHR_DATA5_SHIFT; if (dlc > 6) { - tmp = (uint32_t)*ptr++; + tmp = (uint32_t)*ptr++; regval |= tmp << CAN_TDHR_DATA6_SHIFT; if (dlc > 7) { - tmp = (uint32_t)*ptr++; + tmp = (uint32_t)*ptr++; regval |= tmp << CAN_TDHR_DATA7_SHIFT; } } @@ -970,11 +1013,7 @@ static bool can_txready(FAR struct can_dev_s *dev) regval = can_getreg(priv, STM32_CAN_TSR_OFFSET); canllvdbg("CAN%d TSR: %08x\n", priv->port, regval); - if ((regval & CAN_ALL_MAILBOXES) != 0) - { - return true; - } - return false; + return (regval & CAN_ALL_MAILBOXES) != 0; } /**************************************************************************** @@ -1005,29 +1044,26 @@ static bool can_txempty(FAR struct can_dev_s *dev) regval = can_getreg(priv, STM32_CAN_TSR_OFFSET); canllvdbg("CAN%d TSR: %08x\n", priv->port, regval); - if ((regval & CAN_ALL_MAILBOXES) == CAN_ALL_MAILBOXES) - { - return true; - } - return false; + return (regval & CAN_ALL_MAILBOXES) == CAN_ALL_MAILBOXES; } /**************************************************************************** - * Name: can_rx0interrupt + * Name: can_rxinterrupt * * Description: - * CAN RX FIFO 0 interrupt handler + * CAN RX FIFO 0/1 interrupt handler * * Input Parameters: * irq - The IRQ number of the interrupt. * context - The register state save array at the time of the interrupt. + * rxmb - The RX mailbox number. * * Returned Value: * Zero on success; a negated errno on failure * ****************************************************************************/ -static int can_rx0interrupt(int irq, void *context) +static int can_rxinterrupt(int irq, FAR void *context, int rxmb) { FAR struct can_dev_s *dev = NULL; FAR struct stm32_can_s *priv; @@ -1038,11 +1074,11 @@ static int can_rx0interrupt(int irq, void *context) int ret; #if defined(CONFIG_STM32_CAN1) && defined(CONFIG_STM32_CAN2) - if (g_can1priv.canrx0 == irq) + if (g_can1priv.canrx[rxmb] == irq) { dev = &g_can1dev; } - else if (g_can2priv.canrx0 == irq) + else if (g_can2priv.canrx[rxmb] == irq) { dev = &g_can2dev; } @@ -1057,9 +1093,9 @@ static int can_rx0interrupt(int irq, void *context) #endif priv = dev->cd_priv; - /* Verify that a message is pending in FIFO 0 */ + /* Verify that a message is pending in the FIFO */ - regval = can_getreg(priv, STM32_CAN_RF0R_OFFSET); + regval = can_getreg(priv, STM32_CAN_RFR_OFFSET(rxmb)); npending = (regval & CAN_RFR_FMP_MASK) >> CAN_RFR_FMP_SHIFT; if (npending < 1) { @@ -1067,11 +1103,18 @@ static int can_rx0interrupt(int irq, void *context) return OK; } - can_dumpmbregs(priv, "RX0 interrupt"); + if (rxmb == 0) + { + can_dumpmbregs(priv, "RX0 interrupt"); + } + else + { + can_dumpmbregs(priv, "RX1 interrupt"); + } /* Get the CAN identifier. */ - regval = can_getreg(priv, STM32_CAN_RI0R_OFFSET); + regval = can_getreg(priv, STM32_CAN_RIR_OFFSET(rxmb)); #ifdef CONFIG_CAN_EXTID if ((regval & CAN_RIR_IDE) != 0) @@ -1104,22 +1147,22 @@ static int can_rx0interrupt(int irq, void *context) /* Extract the RTR bit */ - hdr.ch_rtr = (regval & CAN_RIR_RTR) != 0 ? true : false; + hdr.ch_rtr = (regval & CAN_RIR_RTR) != 0; /* Get the DLC */ - regval = can_getreg(priv, STM32_CAN_RDT0R_OFFSET); + regval = can_getreg(priv, STM32_CAN_RDTR_OFFSET(rxmb)); hdr.ch_dlc = (regval & CAN_RDTR_DLC_MASK) >> CAN_RDTR_DLC_SHIFT; /* Save the message data */ - regval = can_getreg(priv, STM32_CAN_RDL0R_OFFSET); + regval = can_getreg(priv, STM32_CAN_RDLR_OFFSET(rxmb)); data[0] = (regval & CAN_RDLR_DATA0_MASK) >> CAN_RDLR_DATA0_SHIFT; data[1] = (regval & CAN_RDLR_DATA1_MASK) >> CAN_RDLR_DATA1_SHIFT; data[2] = (regval & CAN_RDLR_DATA2_MASK) >> CAN_RDLR_DATA2_SHIFT; data[3] = (regval & CAN_RDLR_DATA3_MASK) >> CAN_RDLR_DATA3_SHIFT; - regval = can_getreg(priv, STM32_CAN_RDH0R_OFFSET); + regval = can_getreg(priv, STM32_CAN_RDHR_OFFSET(rxmb)); data[4] = (regval & CAN_RDHR_DATA4_MASK) >> CAN_RDHR_DATA4_SHIFT; data[5] = (regval & CAN_RDHR_DATA5_MASK) >> CAN_RDHR_DATA5_SHIFT; data[6] = (regval & CAN_RDHR_DATA6_MASK) >> CAN_RDHR_DATA6_SHIFT; @@ -1129,17 +1172,57 @@ static int can_rx0interrupt(int irq, void *context) ret = can_receive(dev, &hdr, data); - /* Release the FIFO0 */ + /* Release the FIFO */ #ifndef CONFIG_CAN_EXTID errout: #endif - regval = can_getreg(priv, STM32_CAN_RF0R_OFFSET); + regval = can_getreg(priv, STM32_CAN_RFR_OFFSET(rxmb)); regval |= CAN_RFR_RFOM; - can_putreg(priv, STM32_CAN_RF0R_OFFSET, regval); + can_putreg(priv, STM32_CAN_RFR_OFFSET(rxmb), regval); return ret; } +/**************************************************************************** + * Name: can_rx0interrupt + * + * Description: + * CAN RX FIFO 0 interrupt handler + * + * Input Parameters: + * irq - The IRQ number of the interrupt. + * context - The register state save array at the time of the interrupt. + * + * Returned Value: + * Zero on success; a negated errno on failure + * + ****************************************************************************/ + +static int can_rx0interrupt(int irq, FAR void *context) +{ + return can_rxinterrupt(irq, context, 0); +} + +/**************************************************************************** + * Name: can_rx1interrupt + * + * Description: + * CAN RX FIFO 1 interrupt handler + * + * Input Parameters: + * irq - The IRQ number of the interrupt. + * context - The register state save array at the time of the interrupt. + * + * Returned Value: + * Zero on success; a negated errno on failure + * + ****************************************************************************/ + +static int can_rx1interrupt(int irq, FAR void *context) +{ + return can_rxinterrupt(irq, context, 1); +} + /**************************************************************************** * Name: can_txinterrupt * @@ -1155,7 +1238,7 @@ errout: * ****************************************************************************/ -static int can_txinterrupt(int irq, void *context) +static int can_txinterrupt(int irq, FAR void *context) { FAR struct can_dev_s *dev = NULL; FAR struct stm32_can_s *priv; @@ -1304,7 +1387,7 @@ static int can_txinterrupt(int irq, void *context) * ****************************************************************************/ -static int can_bittiming(struct stm32_can_s *priv) +static int can_bittiming(FAR struct stm32_can_s *priv) { uint32_t tmp; uint32_t brp; @@ -1401,7 +1484,7 @@ static int can_bittiming(struct stm32_can_s *priv) * ****************************************************************************/ -static int can_cellinit(struct stm32_can_s *priv) +static int can_cellinit(FAR struct stm32_can_s *priv) { volatile uint32_t timeout; uint32_t regval; @@ -1415,11 +1498,6 @@ static int can_cellinit(struct stm32_can_s *priv) regval &= ~CAN_MCR_SLEEP; can_putreg(priv, STM32_CAN_MCR_OFFSET, regval); - /* Configure CAN behavior. Priority driven request order, not message ID. */ - - regval |= CAN_MCR_TXFP; - can_putreg(priv, STM32_CAN_MCR_OFFSET, regval); - /* Enter initialization mode */ regval |= CAN_MCR_INRQ; @@ -1457,7 +1535,8 @@ static int can_cellinit(struct stm32_can_s *priv) */ regval = can_getreg(priv, STM32_CAN_MCR_OFFSET); - regval &= ~(CAN_MCR_TXFP | CAN_MCR_RFLM | CAN_MCR_NART | CAN_MCR_AWUM | CAN_MCR_ABOM | CAN_MCR_TTCM); + regval &= ~(CAN_MCR_TXFP | CAN_MCR_RFLM | CAN_MCR_NART | + CAN_MCR_AWUM | CAN_MCR_ABOM | CAN_MCR_TTCM); can_putreg(priv, STM32_CAN_MCR_OFFSET, regval); /* Configure bit timing. */ @@ -1492,7 +1571,8 @@ static int can_cellinit(struct stm32_can_s *priv) if (timeout < 1) { - canlldbg("ERROR: Timed out waiting to exit initialization mode: %08x\n", regval); + canlldbg("ERROR: Timed out waiting to exit initialization mode: %08x\n", + regval); return -ETIMEDOUT; } return OK; @@ -1531,7 +1611,7 @@ static int can_cellinit(struct stm32_can_s *priv) * ****************************************************************************/ -static int can_filterinit(struct stm32_can_s *priv) +static int can_filterinit(FAR struct stm32_can_s *priv) { uint32_t regval; uint32_t bitmask; @@ -1540,7 +1620,7 @@ static int can_filterinit(struct stm32_can_s *priv) /* Get the bitmask associated with the filter used by this CAN block */ - bitmask = ((uint32_t)1) << priv->filter; + bitmask = (uint32_t)1 << priv->filter; /* Enter filter initialization mode */ @@ -1548,6 +1628,17 @@ static int can_filterinit(struct stm32_can_s *priv) regval |= CAN_FMR_FINIT; can_putfreg(priv, STM32_CAN_FMR_OFFSET, regval); + /* Assign half the filters to CAN1, half to CAN2 */ + +#if defined(CONFIG_STM32_CONNECTIVITYLINE) || \ + defined(CONFIG_STM32_STM32F20XX) || \ + defined(CONFIG_STM32_STM32F40XX) + regval = can_getfreg(priv, STM32_CAN_FMR_OFFSET); + regval &= CAN_FMR_CAN2SB_MASK; + regval |= (CAN_NFILTERS / 2) << CAN_FMR_CAN2SB_SHIFT; + can_putfreg(priv, STM32_CAN_FMR_OFFSET, regval); +#endif + /* Disable the filter */ regval = can_getfreg(priv, STM32_CAN_FA1R_OFFSET); @@ -1560,12 +1651,12 @@ static int can_filterinit(struct stm32_can_s *priv) regval |= bitmask; can_putfreg(priv, STM32_CAN_FS1R_OFFSET, regval); - /* There are 14 or 28 filter banks (depending) on the device. Each filter bank is - * composed of two 32-bit registers, CAN_FiR: + /* There are 14 or 28 filter banks (depending) on the device. + * Each filter bank is composed of two 32-bit registers, CAN_FiR: */ - can_putfreg(priv, STM32_CAN_FIR_OFFSET(priv->filter, 1), 0); - can_putfreg(priv, STM32_CAN_FIR_OFFSET(priv->filter, 2), 0); + can_putfreg(priv, STM32_CAN_FIR_OFFSET(priv->filter, 1), 0); + can_putfreg(priv, STM32_CAN_FIR_OFFSET(priv->filter, 2), 0); /* Set Id/Mask mode for the filter */ @@ -1613,7 +1704,7 @@ static int can_filterinit(struct stm32_can_s *priv) FAR struct can_dev_s *stm32_caninitialize(int port) { - struct can_dev_s *dev = NULL; + FAR struct can_dev_s *dev = NULL; canvdbg("CAN%d\n", port); @@ -1662,4 +1753,3 @@ FAR struct can_dev_s *stm32_caninitialize(int port) } #endif /* CONFIG_CAN && (CONFIG_STM32_CAN1 || CONFIG_STM32_CAN2) */ - diff --git a/arch/arm/src/stm32/stm32_lowputc.c b/arch/arm/src/stm32/stm32_lowputc.c index 4307c45748e..0bffb74808a 100644 --- a/arch/arm/src/stm32/stm32_lowputc.c +++ b/arch/arm/src/stm32/stm32_lowputc.c @@ -273,9 +273,9 @@ # define USART_CR3_CLRBITS \ (USART_CR3_EIE | USART_CR3_IREN | USART_CR3_IRLP | USART_CR3_HDSEL | \ USART_CR3_NACK | USART_CR3_SCEN | USART_CR3_DMAR | USART_CR3_DMAT | \ - USART_CR3_RTSE | USART_CR3_CTSE | USART_CR3_CTSIE | USART_CR1_ONEBIT | \ - USART_CR1_OVRDIS | USART_CR1_DDRE | USART_CR1_DEM | USART_CR1_DEP | \ - USART_CR1_SCARCNT_MASK | USART_CR1_WUS_MASK | USART_CR1_WUFIE) + USART_CR3_RTSE | USART_CR3_CTSE | USART_CR3_CTSIE | USART_CR3_ONEBIT | \ + USART_CR3_OVRDIS | USART_CR3_DDRE | USART_CR3_DEM | USART_CR3_DEP | \ + USART_CR3_SCARCNT_MASK | USART_CR3_WUS_MASK | USART_CR3_WUFIE) # else # define USART_CR3_CLRBITS \ (USART_CR3_CTSIE | USART_CR3_CTSE | USART_CR3_RTSE | USART_CR3_EIE) @@ -436,7 +436,7 @@ void up_lowputc(char ch) void stm32_lowsetup(void) { -#if defined(HAVE_UART) +#if defined(HAVE_SERIALDRIVER) uint32_t mapr; #if defined(HAVE_CONSOLE) && !defined(CONFIG_SUPPRESS_UART_CONFIG) uint32_t cr; @@ -559,7 +559,7 @@ void stm32_lowsetup(void) putreg32(cr, STM32_CONSOLE_BASE + STM32_USART_CR1_OFFSET); #endif /* HAVE_CONSOLE && !CONFIG_SUPPRESS_UART_CONFIG */ -#endif /* HAVE_UART */ +#endif /* HAVE_SERIALDRIVER */ } #elif defined(CONFIG_STM32_STM32L15XX) || defined(CONFIG_STM32_STM32F20XX) || \ @@ -568,7 +568,7 @@ void stm32_lowsetup(void) void stm32_lowsetup(void) { -#if defined(HAVE_UART) +#if defined(HAVE_SERIALDRIVER) #if defined(HAVE_CONSOLE) && !defined(CONFIG_SUPPRESS_UART_CONFIG) uint32_t cr; #endif @@ -638,7 +638,7 @@ void stm32_lowsetup(void) putreg32(cr, STM32_CONSOLE_BASE + STM32_USART_CR1_OFFSET); #endif /* HAVE_CONSOLE && !CONFIG_SUPPRESS_UART_CONFIG */ -#endif /* HAVE_UART */ +#endif /* HAVE_SERIALDRIVER */ } #else diff --git a/arch/arm/src/stm32/stm32_serial.c b/arch/arm/src/stm32/stm32_serial.c index 73039dcf6db..eeb5a846a7b 100644 --- a/arch/arm/src/stm32/stm32_serial.c +++ b/arch/arm/src/stm32/stm32_serial.c @@ -255,8 +255,24 @@ # define PM_IDLE_DOMAIN 0 /* Revisit */ #endif +/* Keep track if a Break was set + * + * Note: + * + * 1) This value is set in the priv->ie but never written to the control + * register. It must not collide with USART_CR1_USED_INTS or USART_CR3_EIE + * 2) USART_CR3_EIE is also carried in the up_dev_s ie member. + * + * See up_restoreusartint where the masking is done. + */ + +#ifdef CONFIG_STM32_SERIALBRK_BSDCOMPAT +# define USART_CR1_IE_BREAK_INPROGRESS_SHFTS 15 +# define USART_CR1_IE_BREAK_INPROGRESS (1 << USART_CR1_IE_BREAK_INPROGRESS_SHFTS) +#endif + #ifdef USE_SERIALDRIVER -#ifdef HAVE_UART +#ifdef HAVE_SERIALDRIVER /**************************************************************************** * Private Types @@ -370,28 +386,28 @@ static int up_pm_prepare(struct pm_callback_s *cb, int domain, enum pm_state_e pmstate); #endif -#ifdef CONFIG_STM32_USART1 +#ifdef CONFIG_STM32_USART1_SERIALDRIVER static int up_interrupt_usart1(int irq, void *context); #endif -#ifdef CONFIG_STM32_USART2 +#ifdef CONFIG_STM32_USART2_SERIALDRIVER static int up_interrupt_usart2(int irq, void *context); #endif -#ifdef CONFIG_STM32_USART3 +#ifdef CONFIG_STM32_USART3_SERIALDRIVER static int up_interrupt_usart3(int irq, void *context); #endif -#ifdef CONFIG_STM32_UART4 +#ifdef CONFIG_STM32_UART4_SERIALDRIVER static int up_interrupt_uart4(int irq, void *context); #endif -#ifdef CONFIG_STM32_UART5 +#ifdef CONFIG_STM32_UART5_SERIALDRIVER static int up_interrupt_uart5(int irq, void *context); #endif -#ifdef CONFIG_STM32_USART6 +#ifdef CONFIG_STM32_USART6_SERIALDRIVER static int up_interrupt_usart6(int irq, void *context); #endif -#ifdef CONFIG_STM32_UART7 +#ifdef CONFIG_STM32_UART7_SERIALDRIVER static int up_interrupt_uart7(int irq, void *context); #endif -#ifdef CONFIG_STM32_UART8 +#ifdef CONFIG_STM32_UART8_SERIALDRIVER static int up_interrupt_uart8(int irq, void *context); #endif @@ -443,7 +459,7 @@ static const struct uart_ops_s g_uart_dma_ops = /* I/O buffers */ -#ifdef CONFIG_STM32_USART1 +#ifdef CONFIG_STM32_USART1_SERIALDRIVER static char g_usart1rxbuffer[CONFIG_USART1_RXBUFSIZE]; static char g_usart1txbuffer[CONFIG_USART1_TXBUFSIZE]; # ifdef CONFIG_USART1_RXDMA @@ -451,7 +467,7 @@ static char g_usart1rxfifo[RXDMA_BUFFER_SIZE]; # endif #endif -#ifdef CONFIG_STM32_USART2 +#ifdef CONFIG_STM32_USART2_SERIALDRIVER static char g_usart2rxbuffer[CONFIG_USART2_RXBUFSIZE]; static char g_usart2txbuffer[CONFIG_USART2_TXBUFSIZE]; # ifdef CONFIG_USART2_RXDMA @@ -459,7 +475,7 @@ static char g_usart2rxfifo[RXDMA_BUFFER_SIZE]; # endif #endif -#ifdef CONFIG_STM32_USART3 +#ifdef CONFIG_STM32_USART3_SERIALDRIVER static char g_usart3rxbuffer[CONFIG_USART3_RXBUFSIZE]; static char g_usart3txbuffer[CONFIG_USART3_TXBUFSIZE]; # ifdef CONFIG_USART3_RXDMA @@ -467,7 +483,7 @@ static char g_usart3rxfifo[RXDMA_BUFFER_SIZE]; # endif #endif -#ifdef CONFIG_STM32_UART4 +#ifdef CONFIG_STM32_UART4_SERIALDRIVER static char g_uart4rxbuffer[CONFIG_UART4_RXBUFSIZE]; static char g_uart4txbuffer[CONFIG_UART4_TXBUFSIZE]; # ifdef CONFIG_UART4_RXDMA @@ -475,7 +491,7 @@ static char g_uart4rxfifo[RXDMA_BUFFER_SIZE]; # endif #endif -#ifdef CONFIG_STM32_UART5 +#ifdef CONFIG_STM32_UART5_SERIALDRIVER static char g_uart5rxbuffer[CONFIG_UART5_RXBUFSIZE]; static char g_uart5txbuffer[CONFIG_UART5_TXBUFSIZE]; # ifdef CONFIG_UART5_RXDMA @@ -483,7 +499,7 @@ static char g_uart5rxfifo[RXDMA_BUFFER_SIZE]; # endif #endif -#ifdef CONFIG_STM32_USART6 +#ifdef CONFIG_STM32_USART6_SERIALDRIVER static char g_usart6rxbuffer[CONFIG_USART6_RXBUFSIZE]; static char g_usart6txbuffer[CONFIG_USART6_TXBUFSIZE]; # ifdef CONFIG_USART6_RXDMA @@ -491,7 +507,7 @@ static char g_usart6rxfifo[RXDMA_BUFFER_SIZE]; # endif #endif -#ifdef CONFIG_STM32_UART7 +#ifdef CONFIG_STM32_UART7_SERIALDRIVER static char g_uart7rxbuffer[CONFIG_UART7_RXBUFSIZE]; static char g_uart7txbuffer[CONFIG_UART7_TXBUFSIZE]; # ifdef CONFIG_UART7_RXDMA @@ -499,7 +515,7 @@ static char g_uart7rxfifo[RXDMA_BUFFER_SIZE]; # endif #endif -#ifdef CONFIG_STM32_UART8 +#ifdef CONFIG_STM32_UART8_SERIALDRIVER static char g_uart8rxbuffer[CONFIG_UART8_RXBUFSIZE]; static char g_uart8txbuffer[CONFIG_UART8_TXBUFSIZE]; # ifdef CONFIG_UART8_RXDMA @@ -509,7 +525,7 @@ static char g_uart8rxfifo[RXDMA_BUFFER_SIZE]; /* This describes the state of the STM32 USART1 ports. */ -#ifdef CONFIG_STM32_USART1 +#ifdef CONFIG_STM32_USART1_SERIALDRIVER static struct up_dev_s g_usart1priv = { .dev = @@ -571,7 +587,7 @@ static struct up_dev_s g_usart1priv = /* This describes the state of the STM32 USART2 port. */ -#ifdef CONFIG_STM32_USART2 +#ifdef CONFIG_STM32_USART2_SERIALDRIVER static struct up_dev_s g_usart2priv = { .dev = @@ -633,7 +649,7 @@ static struct up_dev_s g_usart2priv = /* This describes the state of the STM32 USART3 port. */ -#ifdef CONFIG_STM32_USART3 +#ifdef CONFIG_STM32_USART3_SERIALDRIVER static struct up_dev_s g_usart3priv = { .dev = @@ -695,7 +711,7 @@ static struct up_dev_s g_usart3priv = /* This describes the state of the STM32 UART4 port. */ -#ifdef CONFIG_STM32_UART4 +#ifdef CONFIG_STM32_UART4_SERIALDRIVER static struct up_dev_s g_uart4priv = { .dev = @@ -761,7 +777,7 @@ static struct up_dev_s g_uart4priv = /* This describes the state of the STM32 UART5 port. */ -#ifdef CONFIG_STM32_UART5 +#ifdef CONFIG_STM32_UART5_SERIALDRIVER static struct up_dev_s g_uart5priv = { .dev = @@ -827,7 +843,7 @@ static struct up_dev_s g_uart5priv = /* This describes the state of the STM32 USART6 port. */ -#ifdef CONFIG_STM32_USART6 +#ifdef CONFIG_STM32_USART6_SERIALDRIVER static struct up_dev_s g_usart6priv = { .dev = @@ -889,7 +905,7 @@ static struct up_dev_s g_usart6priv = /* This describes the state of the STM32 UART7 port. */ -#ifdef CONFIG_STM32_UART7 +#ifdef CONFIG_STM32_UART7_SERIALDRIVER static struct up_dev_s g_uart7priv = { .dev = @@ -924,11 +940,11 @@ static struct up_dev_s g_uart7priv = .usartbase = STM32_UART7_BASE, .tx_gpio = GPIO_UART7_TX, .rx_gpio = GPIO_UART7_RX, -#if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_USART7_OFLOWCONTROL) +#if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_UART7_OFLOWCONTROL) .oflow = true, .cts_gpio = GPIO_UART7_CTS, #endif -#if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_USART7_IFLOWCONTROL) +#if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_UART7_IFLOWCONTROL) .iflow = true, .rts_gpio = GPIO_UART7_RTS, #endif @@ -951,7 +967,7 @@ static struct up_dev_s g_uart7priv = /* This describes the state of the STM32 UART8 port. */ -#ifdef CONFIG_STM32_UART8 +#ifdef CONFIG_STM32_UART8_SERIALDRIVER static struct up_dev_s g_uart8priv = { .dev = @@ -986,11 +1002,11 @@ static struct up_dev_s g_uart8priv = .usartbase = STM32_UART8_BASE, .tx_gpio = GPIO_UART8_TX, .rx_gpio = GPIO_UART8_RX, -#if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_USART8_OFLOWCONTROL) +#if defined(CONFIG_SERIAL_OFLOWCONTROL) && defined(CONFIG_UART8_OFLOWCONTROL) .oflow = true, .cts_gpio = GPIO_UART8_CTS, #endif -#if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_USART8_IFLOWCONTROL) +#if defined(CONFIG_SERIAL_IFLOWCONTROL) && defined(CONFIG_UART8_IFLOWCONTROL) .iflow = true, .rts_gpio = GPIO_UART8_RTS, #endif @@ -1015,28 +1031,28 @@ static struct up_dev_s g_uart8priv = static struct up_dev_s * const uart_devs[STM32_NUSART] = { -#ifdef CONFIG_STM32_USART1 +#ifdef CONFIG_STM32_USART1_SERIALDRIVER [0] = &g_usart1priv, #endif -#ifdef CONFIG_STM32_USART2 +#ifdef CONFIG_STM32_USART2_SERIALDRIVER [1] = &g_usart2priv, #endif -#ifdef CONFIG_STM32_USART3 +#ifdef CONFIG_STM32_USART3_SERIALDRIVER [2] = &g_usart3priv, #endif -#ifdef CONFIG_STM32_UART4 +#ifdef CONFIG_STM32_UART4_SERIALDRIVER [3] = &g_uart4priv, #endif -#ifdef CONFIG_STM32_UART5 +#ifdef CONFIG_STM32_UART5_SERIALDRIVER [4] = &g_uart5priv, #endif -#ifdef CONFIG_STM32_USART6 +#ifdef CONFIG_STM32_USART6_SERIALDRIVER [5] = &g_usart6priv, #endif -#ifdef CONFIG_STM32_UART7 +#ifdef CONFIG_STM32_UART7_SERIALDRIVER [6] = &g_uart7priv, #endif -#ifdef CONFIG_STM32_UART8 +#ifdef CONFIG_STM32_UART8_SERIALDRIVER [7] = &g_uart8priv, #endif }; @@ -1360,49 +1376,49 @@ static void up_set_apb_clock(struct uart_dev_s *dev, bool on) { default: return; -#ifdef CONFIG_STM32_USART1 +#ifdef CONFIG_STM32_USART1_SERIALDRIVER case STM32_USART1_BASE: rcc_en = RCC_APB2ENR_USART1EN; regaddr = STM32_RCC_APB2ENR; break; #endif -#ifdef CONFIG_STM32_USART2 +#ifdef CONFIG_STM32_USART2_SERIALDRIVER case STM32_USART2_BASE: rcc_en = RCC_APB1ENR_USART2EN; regaddr = STM32_RCC_APB1ENR; break; #endif -#ifdef CONFIG_STM32_USART3 +#ifdef CONFIG_STM32_USART3_SERIALDRIVER case STM32_USART3_BASE: rcc_en = RCC_APB1ENR_USART3EN; regaddr = STM32_RCC_APB1ENR; break; #endif -#ifdef CONFIG_STM32_UART4 +#ifdef CONFIG_STM32_UART4_SERIALDRIVER case STM32_UART4_BASE: rcc_en = RCC_APB1ENR_UART4EN; regaddr = STM32_RCC_APB1ENR; break; #endif -#ifdef CONFIG_STM32_UART5 +#ifdef CONFIG_STM32_UART5_SERIALDRIVER case STM32_UART5_BASE: rcc_en = RCC_APB1ENR_UART5EN; regaddr = STM32_RCC_APB1ENR; break; #endif -#ifdef CONFIG_STM32_USART6 +#ifdef CONFIG_STM32_USART6_SERIALDRIVER case STM32_USART6_BASE: rcc_en = RCC_APB2ENR_USART6EN; regaddr = STM32_RCC_APB2ENR; break; #endif -#ifdef CONFIG_STM32_UART7 +#ifdef CONFIG_STM32_UART7_SERIALDRIVER case STM32_UART7_BASE: rcc_en = RCC_APB1ENR_UART7EN; regaddr = STM32_RCC_APB1ENR; break; #endif -#ifdef CONFIG_STM32_UART8 +#ifdef CONFIG_STM32_UART8_SERIALDRIVER case STM32_UART8_BASE: rcc_en = RCC_APB1ENR_UART8EN; regaddr = STM32_RCC_APB1ENR; @@ -1897,11 +1913,12 @@ static int up_interrupt_common(struct up_dev_s *priv) static int up_ioctl(struct file *filep, int cmd, unsigned long arg) { -#if defined(CONFIG_SERIAL_TERMIOS) || defined(CONFIG_SERIAL_TIOCSERGSTRUCT) +#if defined(CONFIG_SERIAL_TERMIOS) || defined(CONFIG_SERIAL_TIOCSERGSTRUCT) \ + || defined(CONFIG_STM32F7_SERIALBRK_BSDCOMPAT) struct inode *inode = filep->f_inode; struct uart_dev_s *dev = inode->i_private; #endif -#ifdef CONFIG_SERIAL_TERMIOS +#if defined(CONFIG_SERIAL_TERMIOS) || defined(CONFIG_STM32F7_SERIALBRK_BSDCOMPAT) struct up_dev_s *priv = (struct up_dev_s *)dev->priv; #endif int ret = OK; @@ -2057,30 +2074,74 @@ static int up_ioctl(struct file *filep, int cmd, unsigned long arg) break; #endif /* CONFIG_SERIAL_TERMIOS */ -#ifdef CONFIG_USART_BREAKS +#ifdef CONFIG_STM32_USART_BREAKS +# ifdef CONFIG_STM32_SERIALBRK_BSDCOMPAT case TIOCSBRK: /* BSD compatibility: Turn break on, unconditionally */ { - uint32_t cr2; irqstate_t flags; + uint32_t tx_break; flags = enter_critical_section(); - cr2 = up_serialin(priv, STM32_USART_CR2_OFFSET); - up_serialout(priv, STM32_USART_CR2_OFFSET, cr2 | USART_CR2_LINEN); + + /* Disable any further tx activity */ + + priv->ie |= USART_CR1_IE_BREAK_INPROGRESS; + + up_txint(dev, false); + + /* Configure TX as a GPIO output pin and Send a break signal*/ + + tx_break = GPIO_OUTPUT | (~(GPIO_MODE_MASK|GPIO_OUTPUT_SET) & priv->tx_gpio); + stm32_configgpio(tx_break); + leave_critical_section(flags); } break; case TIOCCBRK: /* BSD compatibility: Turn break off, unconditionally */ { - uint32_t cr2; irqstate_t flags; flags = enter_critical_section(); - cr2 = up_serialin(priv, STM32_USART_CR2_OFFSET); - up_serialout(priv, STM32_USART_CR2_OFFSET, cr2 & ~USART_CR2_LINEN); + + /* Configure TX back to U(S)ART */ + + stm32_configgpio(priv->tx_gpio); + + priv->ie &= ~USART_CR1_IE_BREAK_INPROGRESS; + + /* Enable further tx activity */ + + up_txint(dev, true); + leave_critical_section(flags); } break; +# else + case TIOCSBRK: /* No BSD compatibility: Turn break on for M bit times */ + { + uint32_t cr1; + irqstate_t flags; + + flags = enter_critical_section(); + cr1 = up_serialin(priv, STM32_USART_CR1_OFFSET); + up_serialout(priv, STM32_USART_CR1_OFFSET, cr1 | USART_CR1_SBK); + leave_critical_section(flags); + } + break; + + case TIOCCBRK: /* No BSD compatibility: May turn off break too soon */ + { + uint32_t cr1; + irqstate_t flags; + + flags = enter_critical_section(); + cr1 = up_serialin(priv, STM32_USART_CR1_OFFSET); + up_serialout(priv, STM32_USART_CR1_OFFSET, cr1 & ~USART_CR1_SBK); + leave_critical_section(flags); + } + break; +# endif #endif default: @@ -2470,6 +2531,13 @@ static void up_txint(struct uart_dev_s *dev, bool enable) } # endif +# ifdef CONFIG_STM32_SERIALBRK_BSDCOMPAT + if (priv->ie & USART_CR1_IE_BREAK_INPROGRESS) + { + return; + } +# endif + up_restoreusartint(priv, ie); /* Fake a TX interrupt here by just calling uart_xmitchars() with @@ -2511,56 +2579,56 @@ static bool up_txready(struct uart_dev_s *dev) * ****************************************************************************/ -#ifdef CONFIG_STM32_USART1 +#ifdef CONFIG_STM32_USART1_SERIALDRIVER static int up_interrupt_usart1(int irq, void *context) { return up_interrupt_common(&g_usart1priv); } #endif -#ifdef CONFIG_STM32_USART2 +#ifdef CONFIG_STM32_USART2_SERIALDRIVER static int up_interrupt_usart2(int irq, void *context) { return up_interrupt_common(&g_usart2priv); } #endif -#ifdef CONFIG_STM32_USART3 +#ifdef CONFIG_STM32_USART3_SERIALDRIVER static int up_interrupt_usart3(int irq, void *context) { return up_interrupt_common(&g_usart3priv); } #endif -#ifdef CONFIG_STM32_UART4 +#ifdef CONFIG_STM32_UART4_SERIALDRIVER static int up_interrupt_uart4(int irq, void *context) { return up_interrupt_common(&g_uart4priv); } #endif -#ifdef CONFIG_STM32_UART5 +#ifdef CONFIG_STM32_UART5_SERIALDRIVER static int up_interrupt_uart5(int irq, void *context) { return up_interrupt_common(&g_uart5priv); } #endif -#ifdef CONFIG_STM32_USART6 +#ifdef CONFIG_STM32_USART6_SERIALDRIVER static int up_interrupt_usart6(int irq, void *context) { return up_interrupt_common(&g_usart6priv); } #endif -#ifdef CONFIG_STM32_UART7 +#ifdef CONFIG_STM32_UART7_SERIALDRIVER static int up_interrupt_uart7(int irq, void *context) { return up_interrupt_common(&g_uart7priv); } #endif -#ifdef CONFIG_STM32_UART8 +#ifdef CONFIG_STM32_UART8_SERIALDRIVER static int up_interrupt_uart8(int irq, void *context) { return up_interrupt_common(&g_uart8priv); @@ -2703,7 +2771,7 @@ static int up_pm_prepare(struct pm_callback_s *cb, int domain, return OK; } #endif -#endif /* HAVE_UART */ +#endif /* HAVE_SERIALDRIVER */ #endif /* USE_SERIALDRIVER */ /**************************************************************************** @@ -2725,7 +2793,7 @@ static int up_pm_prepare(struct pm_callback_s *cb, int domain, #ifdef USE_EARLYSERIALINIT void up_earlyserialinit(void) { -#ifdef HAVE_UART +#ifdef HAVE_SERIALDRIVER unsigned i; /* Disable all USART interrupts */ @@ -2758,7 +2826,7 @@ void up_earlyserialinit(void) void up_serialinit(void) { -#ifdef HAVE_UART +#ifdef HAVE_SERIALDRIVER char devname[16]; unsigned i; unsigned minor = 0; diff --git a/arch/arm/src/stm32/stm32_uart.h b/arch/arm/src/stm32/stm32_uart.h index 56ae3035439..76fc41e0ba0 100644 --- a/arch/arm/src/stm32/stm32_uart.h +++ b/arch/arm/src/stm32/stm32_uart.h @@ -90,18 +90,97 @@ # undef CONFIG_STM32_USART1 #endif -/* Is there a USART enabled? */ +/* Sanity checks */ -#if defined(CONFIG_STM32_USART1) || defined(CONFIG_STM32_USART2) || \ - defined(CONFIG_STM32_USART3) || defined(CONFIG_STM32_UART4) || \ - defined(CONFIG_STM32_UART5) || defined(CONFIG_STM32_USART6) || \ - defined(CONFIG_STM32_UART7) || defined(CONFIG_STM32_UART8) -# define HAVE_UART 1 +#if !defined(CONFIG_STM32_USART1) +# undef CONFIG_STM32_USART1_SERIALDRIVER +# undef CONFIG_STM32_USART1_1WIREDRIVER +#endif +#if !defined(CONFIG_STM32_USART2) +# undef CONFIG_STM32_USART2_SERIALDRIVER +# undef CONFIG_STM32_USART2_1WIREDRIVER +#endif +#if !defined(CONFIG_STM32_USART3) +# undef CONFIG_STM32_USART3_SERIALDRIVER +# undef CONFIG_STM32_USART3_1WIREDRIVER +#endif +#if !defined(CONFIG_STM32_UART4) +# undef CONFIG_STM32_UART4_SERIALDRIVER +# undef CONFIG_STM32_UART4_1WIREDRIVER +#endif +#if !defined(CONFIG_STM32_UART5) +# undef CONFIG_STM32_UART5_SERIALDRIVER +# undef CONFIG_STM32_UART5_1WIREDRIVER +#endif +#if !defined(CONFIG_STM32_USART6) +# undef CONFIG_STM32_USART6_SERIALDRIVER +# undef CONFIG_STM32_USART6_1WIREDRIVER +#endif +#if !defined(CONFIG_STM32_UART7) +# undef CONFIG_STM32_UART7_SERIALDRIVER +# undef CONFIG_STM32_UART7_1WIREDRIVER +#endif +#if !defined(CONFIG_STM32_UART8) +# undef CONFIG_STM32_UART8_SERIALDRIVER +# undef CONFIG_STM32_UART8_1WIREDRIVER +#endif + +/* Check 1-Wire and U(S)ART conflicts */ + +#if defined(CONFIG_STM32_USART1_1WIREDRIVER) && defined(CONFIG_STM32_USART1_SERIALDRIVER) +# error Both CONFIG_STM32_USART1_1WIREDRIVER and CONFIG_STM32_USART1_SERIALDRIVER defined +# undef CONFIG_STM32_USART1_1WIREDRIVER +#endif +#if defined(CONFIG_STM32_USART2_1WIREDRIVER) && defined(CONFIG_STM32_USART2_SERIALDRIVER) +# error Both CONFIG_STM32_USART2_1WIREDRIVER and CONFIG_STM32_USART2_SERIALDRIVER defined +# undef CONFIG_STM32_USART2_1WIREDRIVER +#endif +#if defined(CONFIG_STM32_USART3_1WIREDRIVER) && defined(CONFIG_STM32_USART3_SERIALDRIVER) +# error Both CONFIG_STM32_USART3_1WIREDRIVER and CONFIG_STM32_USART3_SERIALDRIVER defined +# undef CONFIG_STM32_USART3_1WIREDRIVER +#endif +#if defined(CONFIG_STM32_UART4_1WIREDRIVER) && defined(CONFIG_STM32_UART4_SERIALDRIVER) +# error Both CONFIG_STM32_UART4_1WIREDRIVER and CONFIG_STM32_UART4_SERIALDRIVER defined +# undef CONFIG_STM32_UART4_1WIREDRIVER +#endif +#if defined(CONFIG_STM32_UART5_1WIREDRIVER) && defined(CONFIG_STM32_UART5_SERIALDRIVER) +# error Both CONFIG_STM32_UART5_1WIREDRIVER and CONFIG_STM32_UART5_SERIALDRIVER defined +# undef CONFIG_STM32_UART5_1WIREDRIVER +#endif +#if defined(CONFIG_STM32_USART6_1WIREDRIVER) && defined(CONFIG_STM32_USART6_SERIALDRIVER) +# error Both CONFIG_STM32_USART6_1WIREDRIVER and CONFIG_STM32_USART6_SERIALDRIVER defined +# undef CONFIG_STM32_USART6_1WIREDRIVER +#endif +#if defined(CONFIG_STM32_UART7_1WIREDRIVER) && defined(CONFIG_STM32_UART7_SERIALDRIVER) +# error Both CONFIG_STM32_UART7_1WIREDRIVER and CONFIG_STM32_UART7_SERIALDRIVER defined +# undef CONFIG_STM32_UART7_1WIREDRIVER +#endif +#if defined(CONFIG_STM32_UART8_1WIREDRIVER) && defined(CONFIG_STM32_UART8_SERIALDRIVER) +# error Both CONFIG_STM32_UART8_1WIREDRIVER and CONFIG_STM32_UART8_SERIALDRIVER defined +# undef CONFIG_STM32_UART8_1WIREDRIVER +#endif + +/* Is the serial driver enabled? */ + +#if defined(CONFIG_STM32_USART1_SERIALDRIVER) || defined(CONFIG_STM32_USART2_SERIALDRIVER) || \ + defined(CONFIG_STM32_USART3_SERIALDRIVER) || defined(CONFIG_STM32_UART4_SERIALDRIVER) || \ + defined(CONFIG_STM32_UART5_SERIALDRIVER) || defined(CONFIG_STM32_USART6_SERIALDRIVER) || \ + defined(CONFIG_STM32_UART7_SERIALDRIVER) || defined(CONFIG_STM32_UART8_SERIALDRIVER) +# define HAVE_SERIALDRIVER 1 +#endif + +/* Is the 1-Wire driver? */ + +#if defined(CONFIG_STM32_USART1_1WIREDRIVER) || defined(CONFIG_STM32_USART2_1WIREDRIVER) || \ + defined(CONFIG_STM32_USART3_1WIREDRIVER) || defined(CONFIG_STM32_UART4_1WIREDRIVER) || \ + defined(CONFIG_STM32_UART5_1WIREDRIVER) || defined(CONFIG_STM32_USART6_1WIREDRIVER) || \ + defined(CONFIG_STM32_UART7_1WIREDRIVER) || defined(CONFIG_STM32_UART8_1WIREDRIVER) +# define HAVE_1WIREDRIVER 1 #endif /* Is there a serial console? */ -#if defined(CONFIG_USART1_SERIAL_CONSOLE) && defined(CONFIG_STM32_USART1) +#if defined(CONFIG_USART1_SERIAL_CONSOLE) && defined(CONFIG_STM32_USART1_SERIALDRIVER) # undef CONFIG_USART2_SERIAL_CONSOLE # undef CONFIG_USART3_SERIAL_CONSOLE # undef CONFIG_UART4_SERIAL_CONSOLE @@ -111,7 +190,7 @@ # undef CONFIG_UART8_SERIAL_CONSOLE # define CONSOLE_UART 1 # define HAVE_CONSOLE 1 -#elif defined(CONFIG_USART2_SERIAL_CONSOLE) && defined(CONFIG_STM32_USART2) +#elif defined(CONFIG_USART2_SERIAL_CONSOLE) && defined(CONFIG_STM32_USART2_SERIALDRIVER) # undef CONFIG_USART1_SERIAL_CONSOLE # undef CONFIG_USART3_SERIAL_CONSOLE # undef CONFIG_UART4_SERIAL_CONSOLE @@ -121,7 +200,7 @@ # undef CONFIG_UART8_SERIAL_CONSOLE # define CONSOLE_UART 2 # define HAVE_CONSOLE 1 -#elif defined(CONFIG_USART3_SERIAL_CONSOLE) && defined(CONFIG_STM32_USART3) +#elif defined(CONFIG_USART3_SERIAL_CONSOLE) && defined(CONFIG_STM32_USART3_SERIALDRIVER) # undef CONFIG_USART1_SERIAL_CONSOLE # undef CONFIG_USART2_SERIAL_CONSOLE # undef CONFIG_UART4_SERIAL_CONSOLE @@ -131,7 +210,7 @@ # undef CONFIG_UART8_SERIAL_CONSOLE # define CONSOLE_UART 3 # define HAVE_CONSOLE 1 -#elif defined(CONFIG_UART4_SERIAL_CONSOLE) && defined(CONFIG_STM32_UART4) +#elif defined(CONFIG_UART4_SERIAL_CONSOLE) && defined(CONFIG_STM32_UART4_SERIALDRIVER) # undef CONFIG_USART1_SERIAL_CONSOLE # undef CONFIG_USART2_SERIAL_CONSOLE # undef CONFIG_USART3_SERIAL_CONSOLE @@ -141,7 +220,7 @@ # undef CONFIG_UART8_SERIAL_CONSOLE # define CONSOLE_UART 4 # define HAVE_CONSOLE 1 -#elif defined(CONFIG_UART5_SERIAL_CONSOLE) && defined(CONFIG_STM32_UART5) +#elif defined(CONFIG_UART5_SERIAL_CONSOLE) && defined(CONFIG_STM32_UART5_SERIALDRIVER) # undef CONFIG_USART1_SERIAL_CONSOLE # undef CONFIG_USART2_SERIAL_CONSOLE # undef CONFIG_USART3_SERIAL_CONSOLE @@ -151,7 +230,7 @@ # undef CONFIG_UART8_SERIAL_CONSOLE # define CONSOLE_UART 5 # define HAVE_CONSOLE 1 -#elif defined(CONFIG_USART6_SERIAL_CONSOLE) && defined(CONFIG_STM32_USART6) +#elif defined(CONFIG_USART6_SERIAL_CONSOLE) && defined(CONFIG_STM32_USART6_SERIALDRIVER) # undef CONFIG_USART1_SERIAL_CONSOLE # undef CONFIG_USART2_SERIAL_CONSOLE # undef CONFIG_USART3_SERIAL_CONSOLE @@ -161,7 +240,7 @@ # undef CONFIG_UART8_SERIAL_CONSOLE # define CONSOLE_UART 6 # define HAVE_CONSOLE 1 -#elif defined(CONFIG_UART7_SERIAL_CONSOLE) && defined(CONFIG_STM32_UART7) +#elif defined(CONFIG_UART7_SERIAL_CONSOLE) && defined(CONFIG_STM32_UART7_SERIALDRIVER) # undef CONFIG_USART1_SERIAL_CONSOLE # undef CONFIG_USART2_SERIAL_CONSOLE # undef CONFIG_USART3_SERIAL_CONSOLE @@ -172,7 +251,7 @@ # undef CONFIG_UART8_SERIAL_CONSOLE # define CONSOLE_UART 7 # define HAVE_CONSOLE 1 -#elif defined(CONFIG_UART8_SERIAL_CONSOLE) && defined(CONFIG_STM32_UART8) +#elif defined(CONFIG_UART8_SERIAL_CONSOLE) && defined(CONFIG_STM32_UART8_SERIALDRIVER) # undef CONFIG_USART1_SERIAL_CONSOLE # undef CONFIG_USART2_SERIAL_CONSOLE # undef CONFIG_USART3_SERIAL_CONSOLE @@ -197,7 +276,7 @@ /* DMA support is only provided if CONFIG_ARCH_DMA is in the NuttX configuration */ -#if !defined(HAVE_UART) || !defined(CONFIG_ARCH_DMA) +#if !defined(HAVE_SERIALDRIVER) || !defined(CONFIG_ARCH_DMA) # undef CONFIG_USART1_RXDMA # undef CONFIG_USART2_RXDMA # undef CONFIG_USART3_RXDMA @@ -210,35 +289,35 @@ /* Disable the DMA configuration on all unused USARTs */ -#ifndef CONFIG_STM32_USART1 +#ifndef CONFIG_STM32_USART1_SERIALDRIVER # undef CONFIG_USART1_RXDMA #endif -#ifndef CONFIG_STM32_USART2 +#ifndef CONFIG_STM32_USART2_SERIALDRIVER # undef CONFIG_USART2_RXDMA #endif -#ifndef CONFIG_STM32_USART3 +#ifndef CONFIG_STM32_USART3_SERIALDRIVER # undef CONFIG_USART3_RXDMA #endif -#ifndef CONFIG_STM32_UART4 +#ifndef CONFIG_STM32_UART4_SERIALDRIVER # undef CONFIG_UART4_RXDMA #endif -#ifndef CONFIG_STM32_UART5 +#ifndef CONFIG_STM32_UART5_SERIALDRIVER # undef CONFIG_UART5_RXDMA #endif -#ifndef CONFIG_STM32_USART6 +#ifndef CONFIG_STM32_USART6_SERIALDRIVER # undef CONFIG_USART6_RXDMA #endif -#ifndef CONFIG_STM32_UART7 +#ifndef CONFIG_STM32_UART7_SERIALDRIVER # undef CONFIG_UART7_RXDMA #endif -#ifndef CONFIG_STM32_UART8 +#ifndef CONFIG_STM32_UART8_SERIALDRIVER # undef CONFIG_UART8_RXDMA #endif @@ -276,21 +355,21 @@ /* Is DMA used on all (enabled) USARTs */ #define SERIAL_HAVE_ONLY_DMA 1 -#if defined(CONFIG_STM32_USART1) && !defined(CONFIG_USART1_RXDMA) +#if defined(CONFIG_STM32_USART1_SERIALDRIVER) && !defined(CONFIG_USART1_RXDMA) # undef SERIAL_HAVE_ONLY_DMA -#elif defined(CONFIG_STM32_USART2) && !defined(CONFIG_USART2_RXDMA) +#elif defined(CONFIG_STM32_USART2_SERIALDRIVER) && !defined(CONFIG_USART2_RXDMA) # undef SERIAL_HAVE_ONLY_DMA -#elif defined(CONFIG_STM32_USART3) && !defined(CONFIG_USART3_RXDMA) +#elif defined(CONFIG_STM32_USART3_SERIALDRIVER) && !defined(CONFIG_USART3_RXDMA) # undef SERIAL_HAVE_ONLY_DMA -#elif defined(CONFIG_STM32_UART4) && !defined(CONFIG_UART4_RXDMA) +#elif defined(CONFIG_STM32_UART4_SERIALDRIVER) && !defined(CONFIG_UART4_RXDMA) # undef SERIAL_HAVE_ONLY_DMA -#elif defined(CONFIG_STM32_UART5) && !defined(CONFIG_UART5_RXDMA) +#elif defined(CONFIG_STM32_UART5_SERIALDRIVER) && !defined(CONFIG_UART5_RXDMA) # undef SERIAL_HAVE_ONLY_DMA -#elif defined(CONFIG_STM32_USART6) && !defined(CONFIG_USART6_RXDMA) +#elif defined(CONFIG_STM32_USART6_SERIALDRIVER) && !defined(CONFIG_USART6_RXDMA) # undef SERIAL_HAVE_ONLY_DMA -#elif defined(CONFIG_STM32_UART7) && !defined(CONFIG_UART7_RXDMA) +#elif defined(CONFIG_STM32_UART7_SERIALDRIVER) && !defined(CONFIG_UART7_RXDMA) # undef SERIAL_HAVE_ONLY_DMA -#elif defined(CONFIG_STM32_UART8) && !defined(CONFIG_UART8_RXDMA) +#elif defined(CONFIG_STM32_UART8_SERIALDRIVER) && !defined(CONFIG_UART8_RXDMA) # undef SERIAL_HAVE_ONLY_DMA #endif diff --git a/arch/arm/src/stm32f7/Kconfig b/arch/arm/src/stm32f7/Kconfig index d31b3a6ea54..e3a8d2b42cd 100644 --- a/arch/arm/src/stm32f7/Kconfig +++ b/arch/arm/src/stm32f7/Kconfig @@ -370,14 +370,14 @@ config STM32F7_TIM15 config STM32F7_USART1 bool "USART1" default n - select ARCH_HAVE_USART1 + select USART1_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS select STM32F7_USART config STM32F7_USART2 bool "USART2" default n - select ARCH_HAVE_USART2 + select USART2_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS select STM32F7_USART @@ -385,42 +385,42 @@ config STM32F7_USART3 bool "USART3" default n select ARCH_HAVE_SERIAL_TERMIOS - select ARCH_HAVE_USART3 + select USART3_SERIALDRIVER select STM32F7_USART config STM32F7_UART4 bool "UART4" default n select ARCH_HAVE_SERIAL_TERMIOS - select ARCH_HAVE_UART4 + select UART4_SERIALDRIVER select STM32F7_USART config STM32F7_UART5 bool "UART5" default n select ARCH_HAVE_SERIAL_TERMIOS - select ARCH_HAVE_UART5 + select UART5_SERIALDRIVER select STM32F7_USART config STM32F7_USART6 bool "USART6" default n select ARCH_HAVE_SERIAL_TERMIOS - select ARCH_HAVE_USART6 + select USART6_SERIALDRIVER select STM32F7_USART config STM32F7_UART7 bool "UART7" default n select ARCH_HAVE_SERIAL_TERMIOS - select ARCH_HAVE_UART7 + select UART7_SERIALDRIVER select STM32F7_USART config STM32F7_UART8 bool "UART8" default n select ARCH_HAVE_SERIAL_TERMIOS - select ARCH_HAVE_UART8 + select UART8_SERIALDRIVER select STM32F7_USART config STM32F7_IWDG @@ -435,6 +435,255 @@ config STM32F7_WWDG endmenu +menu "U[S]ART Configuration" + depends on STM32F7_USART + +config USART1_RS485 + bool "RS-485 on USART1" + default n + depends on STM32F7_USART1 + ---help--- + Enable RS-485 interface on USART1. Your board config will have to + provide GPIO_USART1_RS485_DIR pin definition. Currently it cannot be + used with USART1_RXDMA. + +config USART1_RS485_DIR_POLARITY + int "USART1 RS-485 DIR pin polarity" + default 1 + range 0 1 + depends on USART1_RS485 + ---help--- + Polarity of DIR pin for RS-485 on USART1. Set to state on DIR pin which + enables TX (0 - low / nTXEN, 1 - high / TXEN). + +config USART1_RXDMA + bool "USART1 Rx DMA" + default n + depends on STM32F7_USART1 && STM32F7_DMA1 + ---help--- + In high data rate usage, Rx DMA may eliminate Rx overrun errors + +config USART2_RS485 + bool "RS-485 on USART2" + default n + depends on STM32F7_USART2 + ---help--- + Enable RS-485 interface on USART2. Your board config will have to + provide GPIO_USART2_RS485_DIR pin definition. Currently it cannot be + used with USART2_RXDMA. + +config USART2_RS485_DIR_POLARITY + int "USART2 RS-485 DIR pin polarity" + default 1 + range 0 1 + depends on USART2_RS485 + ---help--- + Polarity of DIR pin for RS-485 on USART2. Set to state on DIR pin which + enables TX (0 - low / nTXEN, 1 - high / TXEN). + +config USART2_RXDMA + bool "USART2 Rx DMA" + default n + depends on STM32F7_USART2 && STM32F7_DMA1 + ---help--- + In high data rate usage, Rx DMA may eliminate Rx overrun errors + +config USART3_RS485 + bool "RS-485 on USART3" + default n + depends on STM32F7_USART3 + ---help--- + Enable RS-485 interface on USART3. Your board config will have to + provide GPIO_USART3_RS485_DIR pin definition. Currently it cannot be + used with USART3_RXDMA. + +config USART3_RS485_DIR_POLARITY + int "USART3 RS-485 DIR pin polarity" + default 1 + range 0 1 + depends on USART3_RS485 + ---help--- + Polarity of DIR pin for RS-485 on USART3. Set to state on DIR pin which + enables TX (0 - low / nTXEN, 1 - high / TXEN). + +config USART3_RXDMA + bool "USART3 Rx DMA" + default n + depends on STM32F7_USART3 && STM32F7_DMA1 + ---help--- + In high data rate usage, Rx DMA may eliminate Rx overrun errors + +config UART4_RS485 + bool "RS-485 on UART4" + default n + depends on STM32F7_UART4 + ---help--- + Enable RS-485 interface on UART4. Your board config will have to + provide GPIO_UART4_RS485_DIR pin definition. Currently it cannot be + used with UART4_RXDMA. + +config UART4_RS485_DIR_POLARITY + int "UART4 RS-485 DIR pin polarity" + default 1 + range 0 1 + depends on UART4_RS485 + ---help--- + Polarity of DIR pin for RS-485 on UART4. Set to state on DIR pin which + enables TX (0 - low / nTXEN, 1 - high / TXEN). + +config UART4_RXDMA + bool "UART4 Rx DMA" + default n + depends on STM32F7_UART4 && STM32F7_DMA1 + ---help--- + In high data rate usage, Rx DMA may eliminate Rx overrun errors + +config UART5_RS485 + bool "RS-485 on UART5" + default n + depends on STM32F7_UART5 + ---help--- + Enable RS-485 interface on UART5. Your board config will have to + provide GPIO_UART5_RS485_DIR pin definition. Currently it cannot be + used with UART5_RXDMA. + +config UART5_RS485_DIR_POLARITY + int "UART5 RS-485 DIR pin polarity" + default 1 + range 0 1 + depends on UART5_RS485 + ---help--- + Polarity of DIR pin for RS-485 on UART5. Set to state on DIR pin which + enables TX (0 - low / nTXEN, 1 - high / TXEN). + +config UART5_RXDMA + bool "UART5 Rx DMA" + default n + depends on STM32F7_UART5 && STM32F7_DMA1 + ---help--- + In high data rate usage, Rx DMA may eliminate Rx overrun errors + +config USART6_RS485 + bool "RS-485 on USART6" + default n + depends on STM32F7_USART6 + ---help--- + Enable RS-485 interface on USART6. Your board config will have to + provide GPIO_USART6_RS485_DIR pin definition. Currently it cannot be + used with USART6_RXDMA. + +config USART6_RS485_DIR_POLARITY + int "USART6 RS-485 DIR pin polarity" + default 1 + range 0 1 + depends on USART6_RS485 + ---help--- + Polarity of DIR pin for RS-485 on USART6. Set to state on DIR pin which + enables TX (0 - low / nTXEN, 1 - high / TXEN). + +config USART6_RXDMA + bool "USART6 Rx DMA" + default n + depends on STM32F7_USART6 && STM32F7_DMA2 + ---help--- + In high data rate usage, Rx DMA may eliminate Rx overrun errors + +config UART7_RS485 + bool "RS-485 on UART7" + default n + depends on STM32F7_UART7 + ---help--- + Enable RS-485 interface on UART7. Your board config will have to + provide GPIO_UART7_RS485_DIR pin definition. Currently it cannot be + used with UART7_RXDMA. + +config UART7_RS485_DIR_POLARITY + int "UART7 RS-485 DIR pin polarity" + default 1 + range 0 1 + depends on UART7_RS485 + ---help--- + Polarity of DIR pin for RS-485 on UART7. Set to state on DIR pin which + enables TX (0 - low / nTXEN, 1 - high / TXEN). + +config UART7_RXDMA + bool "UART7 Rx DMA" + default n + depends on STM32F7_UART7 && STM32F7_DMA2 + ---help--- + In high data rate usage, Rx DMA may eliminate Rx overrun errors + +config UART8_RS485 + bool "RS-485 on UART8" + default n + depends on STM32F7_UART8 + ---help--- + Enable RS-485 interface on UART8. Your board config will have to + provide GPIO_UART8_RS485_DIR pin definition. Currently it cannot be + used with UART8_RXDMA. + +config UART8_RS485_DIR_POLARITY + int "UART8 RS-485 DIR pin polarity" + default 1 + range 0 1 + depends on UART8_RS485 + ---help--- + Polarity of DIR pin for RS-485 on UART8. Set to state on DIR pin which + enables TX (0 - low / nTXEN, 1 - high / TXEN). + +config UART8_RXDMA + bool "UART8 Rx DMA" + default n + depends on STM32F7_UART8 && STM32F7_DMA2 + ---help--- + In high data rate usage, Rx DMA may eliminate Rx overrun errors + +config SERIAL_DISABLE_REORDERING + bool "Disable reordering of ttySx devices." + depends on STM32F7_USART1 || STM32F7_USART2 || STM32F7_USART3 || STM32F7_UART4 || STM32F7_UART5 || STM32F7_USART6 || STM32F7_UART7 || STM32F7_UART8 + default n + ---help--- + NuttX per default reorders the serial ports (/dev/ttySx) so that the + console is always on /dev/ttyS0. If more than one UART is in use this + can, however, have the side-effect that all port mappings + (hardware USART1 -> /dev/ttyS0) change if the console is moved to another + UART. This is in particular relevant if a project uses the USB console + in some configs and a serial console in other configs, but does not + want the side effect of having all serial port names change when just + the console is moved from serial to USB. + +config STM32F7_FLOWCONTROL_BROKEN + bool "Use Software UART RTS flow control" + depends on STM32F7_USART + default n + ---help--- + Enable UART RTS flow control using Software. Because STM + Current STM32 have broken HW based RTS behavior (they assert + nRTS after every byte received) Enable this setting workaround + this issue by useing software based management of RTS + +config STM32F7_USART_BREAKS + bool "Add TIOxSBRK to support sending Breaks" + depends on STM32F7_USART + default n + ---help--- + Add TIOCxBRK routines to send a line break per the STM32 manual, the + break will be a pulse based on the value M. This is not a BSD compatible + break. + +config STM32F7_SERIALBRK_BSDCOMPAT + bool "Use GPIO To send Break" + depends on STM32F7_USART && STM32F7_USART_BREAKS + default n + ---help--- + Enable using GPIO on the TX pin to send a BSD compatible break: + TIOCSBRK will start the break and TIOCCBRK will end the break. + The current STM32 U[S]ARTS have no way to leave the break (TX=LOW) + on because the SW starts the break and then the HW automatically clears + the break. This makes it is difficult to sent a long break. + +endmenu # U[S]ART Configuration + config STM32F7_CUSTOM_CLOCKCONFIG bool "Custom clock configuration" default n diff --git a/arch/arm/src/stm32f7/stm32_config.h b/arch/arm/src/stm32f7/stm32_config.h index 09762b9c6b6..d26fee87139 100644 --- a/arch/arm/src/stm32f7/stm32_config.h +++ b/arch/arm/src/stm32f7/stm32_config.h @@ -113,13 +113,13 @@ * for our purposes. */ -#ifndef CONFIG_USART0_ISUART +#ifndef CONFIG_USART0_SERIALDRIVER # undef CONFIG_STM32F7_USART0 #endif -#ifndef CONFIG_USART1_ISUART +#ifndef CONFIG_USART1_SERIALDRIVER # undef CONFIG_STM32F7_USART1 #endif -#ifndef CONFIG_USART2_ISUART +#ifndef CONFIG_USART2_SERIALDRIVER # undef CONFIG_STM32F7_USART2 #endif diff --git a/arch/arm/src/stm32f7/stm32_serial.c b/arch/arm/src/stm32f7/stm32_serial.c index 78810f52f36..5b57549a8ef 100644 --- a/arch/arm/src/stm32f7/stm32_serial.c +++ b/arch/arm/src/stm32f7/stm32_serial.c @@ -208,6 +208,22 @@ # define PM_IDLE_DOMAIN 0 /* Revisit */ #endif +/* Keep track if a Break was set + * + * Note: + * + * 1) This value is set in the priv->ie but never written to the control + * register. It must not collide with USART_CR1_USED_INTS or USART_CR3_EIE + * 2) USART_CR3_EIE is also carried in the up_dev_s ie member. + * + * See up_restoreusartint where the masking is done. + */ + +#ifdef CONFIG_STM32F7_SERIALBRK_BSDCOMPAT +# define USART_CR1_IE_BREAK_INPROGRESS_SHFTS 15 +# define USART_CR1_IE_BREAK_INPROGRESS (1 << USART_CR1_IE_BREAK_INPROGRESS_SHFTS) +#endif + #ifdef USE_SERIALDRIVER #ifdef HAVE_UART @@ -1817,11 +1833,12 @@ static int up_interrupt_common(struct up_dev_s *priv) static int up_ioctl(struct file *filep, int cmd, unsigned long arg) { -#if defined(CONFIG_SERIAL_TERMIOS) || defined(CONFIG_SERIAL_TIOCSERGSTRUCT) +#if defined(CONFIG_SERIAL_TERMIOS) || defined(CONFIG_SERIAL_TIOCSERGSTRUCT) \ + || defined(CONFIG_STM32F7_SERIALBRK_BSDCOMPAT) struct inode *inode = filep->f_inode; struct uart_dev_s *dev = inode->i_private; #endif -#ifdef CONFIG_SERIAL_TERMIOS +#if defined(CONFIG_SERIAL_TERMIOS) || defined(CONFIG_STM32F7_SERIALBRK_BSDCOMPAT) struct up_dev_s *priv = (struct up_dev_s *)dev->priv; #endif int ret = OK; @@ -1964,30 +1981,74 @@ static int up_ioctl(struct file *filep, int cmd, unsigned long arg) break; #endif /* CONFIG_SERIAL_TERMIOS */ -#ifdef CONFIG_USART_BREAKS +#ifdef CONFIG_STM32F7_USART_BREAKS +# ifdef CONFIG_STM32F7_SERIALBRK_BSDCOMPAT case TIOCSBRK: /* BSD compatibility: Turn break on, unconditionally */ { - uint32_t cr2; irqstate_t flags; + uint32_t tx_break; flags = enter_critical_section(); - cr2 = up_serialin(priv, STM32_USART_CR2_OFFSET); - up_serialout(priv, STM32_USART_CR2_OFFSET, cr2 | USART_CR2_LINEN); + + /* Disable any further tx activity */ + + priv->ie |= USART_CR1_IE_BREAK_INPROGRESS; + + up_txint(dev, false); + + /* Configure TX as a GPIO output pin and Send a break signal*/ + + tx_break = GPIO_OUTPUT | (~(GPIO_MODE_MASK|GPIO_OUTPUT_SET) & priv->tx_gpio); + stm32_configgpio(tx_break); + leave_critical_section(flags); } break; case TIOCCBRK: /* BSD compatibility: Turn break off, unconditionally */ { - uint32_t cr2; irqstate_t flags; flags = enter_critical_section(); - cr2 = up_serialin(priv, STM32_USART_CR2_OFFSET); - up_serialout(priv, STM32_USART_CR2_OFFSET, cr2 & ~USART_CR2_LINEN); + + /* Configure TX back to U(S)ART */ + + stm32_configgpio(priv->tx_gpio); + + priv->ie &= ~USART_CR1_IE_BREAK_INPROGRESS; + + /* Enable further tx activity */ + + up_txint(dev, true); + leave_critical_section(flags); } break; +# else + case TIOCSBRK: /* No BSD compatibility: Turn break on for M bit times */ + { + uint32_t cr1; + irqstate_t flags; + + flags = enter_critical_section(); + cr1 = up_serialin(priv, STM32_USART_CR1_OFFSET); + up_serialout(priv, STM32_USART_CR1_OFFSET, cr1 | USART_CR1_SBK); + leave_critical_section(flags); + } + break; + + case TIOCCBRK: /* No BSD compatibility: May turn off break too soon */ + { + uint32_t cr1; + irqstate_t flags; + + flags = enter_critical_section(); + cr1 = up_serialin(priv, STM32_USART_CR1_OFFSET); + up_serialout(priv, STM32_USART_CR1_OFFSET, cr1 & ~USART_CR1_SBK); + leave_critical_section(flags); + } + break; +# endif #endif default: @@ -2400,6 +2461,13 @@ static void up_txint(struct uart_dev_s *dev, bool enable) } # endif +# ifdef CONFIG_STM32_SERIALBRK_BSDCOMPAT + if (priv->ie & USART_CR1_IE_BREAK_INPROGRESS) + { + return; + } +# endif + up_restoreusartint(priv, ie); /* Fake a TX interrupt here by just calling uart_xmitchars() with diff --git a/arch/arm/src/stm32l4/Kconfig b/arch/arm/src/stm32l4/Kconfig index f334ca32bc6..eccd8469bfb 100644 --- a/arch/arm/src/stm32l4/Kconfig +++ b/arch/arm/src/stm32l4/Kconfig @@ -400,14 +400,14 @@ config STM32L4_SPI3 config STM32L4_USART1 bool "USART1" default n - select ARCH_HAVE_USART1 + select USART1_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS select STM32L4_USART config STM32L4_USART2 bool "USART2" default n - select ARCH_HAVE_USART2 + select USART2_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS select STM32L4_USART @@ -415,21 +415,21 @@ config STM32L4_USART3 bool "USART3" default n select ARCH_HAVE_SERIAL_TERMIOS - select ARCH_HAVE_USART3 + select USART3_SERIALDRIVER select STM32L4_USART config STM32L4_UART4 bool "UART4" default n select ARCH_HAVE_SERIAL_TERMIOS - select ARCH_HAVE_UART4 + select UART4_SERIALDRIVER select STM32L4_USART config STM32L4_UART5 bool "UART5" default n select ARCH_HAVE_SERIAL_TERMIOS - select ARCH_HAVE_UART5 + select UART5_SERIALDRIVER select STM32L4_USART config STM32L4_I2C1 @@ -520,7 +520,7 @@ config STM32L4_TIM8 config STM32L4_USART1 bool "USART1" default n - select ARCH_HAVE_USART1 + select USART1_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS select STM32L4_USART @@ -782,7 +782,27 @@ config STM32L4_FLOWCONTROL_BROKEN nRTS after every byte received) Enable this setting workaround this issue by useing software based management of RTS -endmenu +config STM32L4_USART_BREAKS + bool "Add TIOxSBRK to support sending Breaks" + depends on STM32_USART + default n + ---help--- + Add TIOCxBRK routines to send a line break per the STM32 manual, the + break will be a pulse based on the value M. This is not a BSD compatible + break. + +config STM32L4_SERIALBRK_BSDCOMPAT + bool "Use GPIO To send Break" + depends on STM32_USART && STM32_USART_BREAKS + default n + ---help--- + Enable using GPIO on the TX pin to send a BSD compatible break: + TIOCSBRK will start the break and TIOCCBRK will end the break. + The current STM32 U[S]ARTS have no way to leave the break (TX=LOW) + on because the SW starts the break and then the HW automatically clears + the break. This makes it is difficult to sent a long break. + +endmenu # U[S]ART Configuration menu "SPI Configuration" depends on STM32L4_SPI @@ -843,4 +863,27 @@ config STM32L4_I2C_DUTY16_9 endmenu +menu "CAN driver configuration" + depends on STM32L4_CAN1 + +config CAN1_BAUD + int "CAN1 BAUD" + default 250000 + depends on STM32L4_CAN1 + ---help--- + CAN1 BAUD rate. Required if STM32L4_CAN1 is defined. + +config CAN_TSEG1 + int "TSEG1 quanta" + default 6 + ---help--- + The number of CAN time quanta in segment 1. Default: 6 + +config CAN_TSEG2 + int "TSEG2 quanta" + default 7 + ---help--- + The number of CAN time quanta in segment 2. Default: 7 +endmenu + endif # ARCH_CHIP_STM32L4 diff --git a/arch/arm/src/stm32l4/Make.defs b/arch/arm/src/stm32l4/Make.defs index fbbb3b53876..7cda554e564 100644 --- a/arch/arm/src/stm32l4/Make.defs +++ b/arch/arm/src/stm32l4/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # arch/arm/src/stm32l4/Make.defs # -# Copyright (C) 2015 Sebastien Lorquet. All rights reserved. +# Copyright (C) 2015-2016 Sebastien Lorquet. All rights reserved. # Author: Sebastien Lorquet # # Redistribution and use in source and binary forms, with or without @@ -163,12 +163,12 @@ CHIP_CSRCS += stm32l4_exti_pwr.c endif ifeq ($(CONFIG_RTC),y) -CHIP_CSRCS += stm32l4_rtcc.c ifeq ($(CONFIG_RTC_ALARM),y) CHIP_CSRCS += stm32l4_exti_alarm.c endif ifeq ($(CONFIG_RTC_DRIVER),y) CHIP_CSRCS += stm32l4_rtc_lowerhalf.c +CHIP_CSRCS += stm32l4_rtcc.c endif endif @@ -183,3 +183,8 @@ endif ifeq ($(CONFIG_STM32L4_QSPI),y) CHIP_CSRCS += stm32l4_qspi.c endif + +ifeq ($(CONFIG_STM32L4_CAN),y) +CHIP_CSRCS += stm32l4_can.c +endif + diff --git a/arch/arm/src/stm32l4/chip/stm32l4_can.h b/arch/arm/src/stm32l4/chip/stm32l4_can.h new file mode 100644 index 00000000000..75c48cfeb8a --- /dev/null +++ b/arch/arm/src/stm32l4/chip/stm32l4_can.h @@ -0,0 +1,447 @@ +/************************************************************************************ + * arch/arm/src/stm32l4/chip/stm32l4_can.h + * + * Copyright (C) 2009, 2011, 2013 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Adaptations for stm32l4: + * Copyright (C) 2016 Sebastien Lorquet. All rights reserved. + * Author: Sebastien Lorquet + * + * 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. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_STM32L4_CHIP_STM32L4_CAN_H +#define __ARCH_ARM_SRC_STM32L4_CHIP_STM32L4_CAN_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include "chip.h" + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ + +/* 3 TX mailboxes */ + +#define CAN_TXMBOX1 0 +#define CAN_TXMBOX2 1 +#define CAN_TXMBOX3 2 + +/* 2 RX mailboxes */ + +#define CAN_RXMBOX1 0 +#define CAN_RXMBOX2 1 + +/* Number of filters depends on silicon */ + +#define CAN_NFILTERS 14 + +/* Register Offsets *****************************************************************/ + +/* CAN control and status registers */ + +#define STM32L4_CAN_MCR_OFFSET 0x0000 /* CAN master control register */ +#define STM32L4_CAN_MSR_OFFSET 0x0004 /* CAN master status register */ +#define STM32L4_CAN_TSR_OFFSET 0x0008 /* CAN transmit status register */ +#define STM32L4_CAN_RF0R_OFFSET 0x000c /* CAN receive FIFO 0 register */ +#define STM32L4_CAN_RF1R_OFFSET 0x0010 /* CAN receive FIFO 1 register */ +#define STM32L4_CAN_IER_OFFSET 0x0014 /* CAN interrupt enable register */ +#define STM32L4_CAN_ESR_OFFSET 0x0018 /* CAN error status register */ +#define STM32L4_CAN_BTR_OFFSET 0x001c /* CAN bit timing register */ + +/* CAN mailbox registers (3 TX and 2 RX) */ + +#define STM32L4_CAN_TIR_OFFSET(m) (0x0180+((m)<<4)) +#define STM32L4_CAN_TI0R_OFFSET 0x0180 /* TX mailbox identifier register 0 */ +#define STM32L4_CAN_TI1R_OFFSET 0x0190 /* TX mailbox identifier register 1 */ +#define STM32L4_CAN_TI2R_OFFSET 0x01a0 /* TX mailbox identifier register 2 */ + +#define STM32L4_CAN_TDTR_OFFSET(m) (0x0184+((m)<<4)) +#define STM32L4_CAN_TDT0R_OFFSET 0x0184 /* Mailbox data length control and time stamp register 0 */ +#define STM32L4_CAN_TDT1R_OFFSET 0x0194 /* Mailbox data length control and time stamp register 1 */ +#define STM32L4_CAN_TDT2R_OFFSET 0x01a4 /* Mailbox data length control and time stamp register 2 */ + +#define STM32L4_CAN_TDLR_OFFSET(m) (0x0188+((m)<<4)) +#define STM32L4_CAN_TDL0R_OFFSET 0x0188 /* Mailbox data low register 0 */ +#define STM32L4_CAN_TDL1R_OFFSET 0x0198 /* Mailbox data low register 1 */ +#define STM32L4_CAN_TDL2R_OFFSET 0x01a8 /* Mailbox data low register 2 */ + +#define STM32L4_CAN_TDHR_OFFSET(m) (0x018c+((m)<<4)) +#define STM32L4_CAN_TDH0R_OFFSET 0x018c /* Mailbox data high register 0 */ +#define STM32L4_CAN_TDH1R_OFFSET 0x019c /* Mailbox data high register 1 */ +#define STM32L4_CAN_TDH2R_OFFSET 0x01ac /* Mailbox data high register 2 */ + +#define STM32L4_CAN_RIR_OFFSET(m) (0x01b0+((m)<<4)) +#define STM32L4_CAN_RI0R_OFFSET 0x01b0 /* Rx FIFO mailbox identifier register 0 */ +#define STM32L4_CAN_RI1R_OFFSET 0x01c0 /* Rx FIFO mailbox identifier register 1 */ + +#define STM32L4_CAN_RDTR_OFFSET(m) (0x01b4+((m)<<4)) +#define STM32L4_CAN_RDT0R_OFFSET 0x01b4 /* Rx FIFO mailbox data length control and time stamp register 0 */ +#define STM32L4_CAN_RDT1R_OFFSET 0x01c4 /* Rx FIFO mailbox data length control and time stamp register 1 */ + +#define STM32L4_CAN_RDLR_OFFSET(m) (0x01b8+((m)<<4)) +#define STM32L4_CAN_RDL0R_OFFSET 0x01b8 /* Receive FIFO mailbox data low register 0 */ +#define STM32L4_CAN_RDL1R_OFFSET 0x01c8 /* Receive FIFO mailbox data low register 1 */ + +#define STM32L4_CAN_RDHR_OFFSET(m) (0x01bc+((m)<<4)) +#define STM32L4_CAN_RDH0R_OFFSET 0x01bc /* Receive FIFO mailbox data high register 0 */ +#define STM32L4_CAN_RDH1R_OFFSET 0x01cc /* Receive FIFO mailbox data high register 1 */ + +/* CAN filter registers */ + +#define STM32L4_CAN_FMR_OFFSET 0x0200 /* CAN filter master register */ +#define STM32L4_CAN_FM1R_OFFSET 0x0204 /* CAN filter mode register */ +#define STM32L4_CAN_FS1R_OFFSET 0x020c /* CAN filter scale register */ +#define STM32L4_CAN_FFA1R_OFFSET 0x0214 /* CAN filter FIFO assignment register */ +#define STM32L4_CAN_FA1R_OFFSET 0x021c /* CAN filter activation register */ + +/* There are 14 or 28 filter banks (depending) on the device. Each filter bank is + * composed of two 32-bit registers, CAN_FiR: + * F0R1 Offset 0x240 + * F0R2 Offset 0x244 + * F1R1 Offset 0x248 + * F1R2 Offset 0x24c + * ... + */ + +#define STM32L4_CAN_FIR_OFFSET(f,i) (0x240+((f)<<3)+(((i)-1)<<2)) + +/* Register Addresses ***************************************************************/ + +#if STM32L4_NCAN > 0 +# define STM32L4_CAN1_MCR (STM32L4_CAN1_BASE+STM32L4_CAN_MCR_OFFSET) +# define STM32L4_CAN1_MSR (STM32L4_CAN1_BASE+STM32L4_CAN_MSR_OFFSET) +# define STM32L4_CAN1_TSR (STM32L4_CAN1_BASE+STM32L4_CAN_TSR_OFFSET) +# define STM32L4_CAN1_RF0R (STM32L4_CAN1_BASE+STM32L4_CAN_RF0R_OFFSET) +# define STM32L4_CAN1_RF1R (STM32L4_CAN1_BASE+STM32L4_CAN_RF1R_OFFSET) +# define STM32L4_CAN1_IER (STM32L4_CAN1_BASE+STM32L4_CAN_IER_OFFSET) +# define STM32L4_CAN1_ESR (STM32L4_CAN1_BASE+STM32L4_CAN_ESR_OFFSET) +# define STM32L4_CAN1_BTR (STM32L4_CAN1_BASE+STM32L4_CAN_BTR_OFFSET) + +# define STM32L4_CAN1_TIR(m) (STM32L4_CAN1_BASE+STM32L4_CAN_TIR_OFFSET(m)) +# define STM32L4_CAN1_TI0R (STM32L4_CAN1_BASE+STM32L4_CAN_TI0R_OFFSET) +# define STM32L4_CAN1_TI1R (STM32L4_CAN1_BASE+STM32L4_CAN_TI1R_OFFSET) +# define STM32L4_CAN1_TI2R (STM32L4_CAN1_BASE+STM32L4_CAN_TI2R_OFFSET) + +# define STM32L4_CAN1_TDTR(m) (STM32L4_CAN1_BASE+STM32L4_CAN_TDTR_OFFSET(m)) +# define STM32L4_CAN1_TDT0R (STM32L4_CAN1_BASE+STM32L4_CAN_TDT0R_OFFSET) +# define STM32L4_CAN1_TDT1R (STM32L4_CAN1_BASE+STM32L4_CAN_TDT1R_OFFSET) +# define STM32L4_CAN1_TDT2R (STM32L4_CAN1_BASE+STM32L4_CAN_TDT2R_OFFSET) + +# define STM32L4_CAN1_TDLR(m) (STM32L4_CAN1_BASE+STM32L4_CAN_TDLR_OFFSET(m)) +# define STM32L4_CAN1_TDL0R (STM32L4_CAN1_BASE+STM32L4_CAN_TDL0R_OFFSET) +# define STM32L4_CAN1_TDL1R (STM32L4_CAN1_BASE+STM32L4_CAN_TDL1R_OFFSET) +# define STM32L4_CAN1_TDL2R (STM32L4_CAN1_BASE+STM32L4_CAN_TDL2R_OFFSET) + +# define STM32L4_CAN1_TDHR(m) (STM32L4_CAN1_BASE+STM32L4_CAN_TDHR_OFFSET(m)) +# define STM32L4_CAN1_TDH0R (STM32L4_CAN1_BASE+STM32L4_CAN_TDH0R_OFFSET) +# define STM32L4_CAN1_TDH1R (STM32L4_CAN1_BASE+STM32L4_CAN_TDH1R_OFFSET) +# define STM32L4_CAN1_TDH2R (STM32L4_CAN1_BASE+STM32L4_CAN_TDH2R_OFFSET) + +# define STM32L4_CAN1_RIR(m) (STM32L4_CAN1_BASE+STM32L4_CAN_RIR_OFFSET(m)) +# define STM32L4_CAN1_RI0R (STM32L4_CAN1_BASE+STM32L4_CAN_RI0R_OFFSET) +# define STM32L4_CAN1_RI1R (STM32L4_CAN1_BASE+STM32L4_CAN_RI1R_OFFSET) + +# define STM32L4_CAN1_RDTR(m) (STM32L4_CAN1_BASE+STM32L4_CAN_RDTR_OFFSET(m)) +# define STM32L4_CAN1_RDT0R (STM32L4_CAN1_BASE+STM32L4_CAN_RDT0R_OFFSET) +# define STM32L4_CAN1_RDT1R (STM32L4_CAN1_BASE+STM32L4_CAN_RDT1R_OFFSET) + +# define STM32L4_CAN1_RDLR(m) (STM32L4_CAN1_BASE+STM32L4_CAN_RDLR_OFFSET(m)) +# define STM32L4_CAN1_RDL0R (STM32L4_CAN1_BASE+STM32L4_CAN_RDL0R_OFFSET) +# define STM32L4_CAN1_RDL1R (STM32L4_CAN1_BASE+STM32L4_CAN_RDL1R_OFFSET) + +# define STM32L4_CAN1_RDHR(m) (STM32L4_CAN1_BASE+STM32L4_CAN_RDHR_OFFSET(m)) +# define STM32L4_CAN1_RDH0R (STM32L4_CAN1_BASE+STM32L4_CAN_RDH0R_OFFSET) +# define STM32L4_CAN1_RDH1R (STM32L4_CAN1_BASE+STM32L4_CAN_RDH1R_OFFSET) + +# define STM32L4_CAN1_FMR (STM32L4_CAN1_BASE+STM32L4_CAN_FMR_OFFSET) +# define STM32L4_CAN1_FM1R (STM32L4_CAN1_BASE+STM32L4_CAN_FM1R_OFFSET) +# define STM32L4_CAN1_FS1R (STM32L4_CAN1_BASE+STM32L4_CAN_FS1R_OFFSET) +# define STM32L4_CAN1_FFA1R (STM32L4_CAN1_BASE+STM32L4_CAN_FFA1R_OFFSET) +# define STM32L4_CAN1_FA1R (STM32L4_CAN1_BASE+STM32L4_CAN_FA1R_OFFSET) +# define STM32L4_CAN1_FIR(b,i) (STM32L4_CAN1_BASE+STM32L4_CAN_FIR_OFFSET(b,i)) +#endif + +/* Register Bitfield Definitions ****************************************************/ + +/* CAN master control register */ + +#define CAN_MCR_INRQ (1 << 0) /* Bit 0: Initialization Request */ +#define CAN_MCR_SLEEP (1 << 1) /* Bit 1: Sleep Mode Request */ +#define CAN_MCR_TXFP (1 << 2) /* Bit 2: Transmit FIFO Priority */ +#define CAN_MCR_RFLM (1 << 3) /* Bit 3: Receive FIFO Locked Mode */ +#define CAN_MCR_NART (1 << 4) /* Bit 4: No Automatic Retransmission */ +#define CAN_MCR_AWUM (1 << 5) /* Bit 5: Automatic Wakeup Mode */ +#define CAN_MCR_ABOM (1 << 6) /* Bit 6: Automatic Bus-Off Management */ +#define CAN_MCR_TTCM (1 << 7) /* Bit 7: Time Triggered Communication Mode Enable */ +#define CAN_MCR_RESET (1 << 15) /* Bit 15: bxCAN software master reset */ +#define CAN_MCR_DBF (1 << 16) /* Bit 16: Debug freeze */ + +/* CAN master status register */ + +#define CAN_MSR_INAK (1 << 0) /* Bit 0: Initialization Acknowledge */ +#define CAN_MSR_SLAK (1 << 1) /* Bit 1: Sleep Acknowledge */ +#define CAN_MSR_ERRI (1 << 2) /* Bit 2: Error Interrupt */ +#define CAN_MSR_WKUI (1 << 3) /* Bit 3: Wakeup Interrupt */ +#define CAN_MSR_SLAKI (1 << 4) /* Bit 4: Sleep acknowledge interrupt */ +#define CAN_MSR_TXM (1 << 8) /* Bit 8: Transmit Mode */ +#define CAN_MSR_RXM (1 << 9) /* Bit 9: Receive Mode */ +#define CAN_MSR_SAMP (1 << 10) /* Bit 10: Last Sample Point */ +#define CAN_MSR_RX (1 << 11) /* Bit 11: CAN Rx Signal */ + +/* CAN transmit status register */ + +#define CAN_TSR_RQCP0 (1 << 0) /* Bit 0: Request Completed Mailbox 0 */ +#define CAN_TSR_TXOK0 (1 << 1) /* Bit 1 : Transmission OK of Mailbox 0 */ +#define CAN_TSR_ALST0 (1 << 2) /* Bit 2 : Arbitration Lost for Mailbox 0 */ +#define CAN_TSR_TERR0 (1 << 3) /* Bit 3 : Transmission Error of Mailbox 0 */ +#define CAN_TSR_ABRQ0 (1 << 7) /* Bit 7 : Abort Request for Mailbox 0 */ +#define CAN_TSR_RQCP1 (1 << 8) /* Bit 8 : Request Completed Mailbox 1 */ +#define CAN_TSR_TXOK1 (1 << 9) /* Bit 9 : Transmission OK of Mailbox 1 */ +#define CAN_TSR_ALST1 (1 << 10) /* Bit 10 : Arbitration Lost for Mailbox 1 */ +#define CAN_TSR_TERR1 (1 << 11) /* Bit 11 : Transmission Error of Mailbox 1 */ +#define CAN_TSR_ABRQ1 (1 << 15) /* Bit 15 : Abort Request for Mailbox 1 */ +#define CAN_TSR_RQCP2 (1 << 16) /* Bit 16 : Request Completed Mailbox 2 */ +#define CAN_TSR_TXOK2 (1 << 17) /* Bit 17 : Transmission OK of Mailbox 2 */ +#define CAN_TSR_ALST2 (1 << 18) /* Bit 18: Arbitration Lost for Mailbox 2 */ +#define CAN_TSR_TERR2 (1 << 19) /* Bit 19: Transmission Error of Mailbox 2 */ +#define CAN_TSR_ABRQ2 (1 << 23) /* Bit 23: Abort Request for Mailbox 2 */ +#define CAN_TSR_CODE_SHIFT (24) /* Bits 25-24: Mailbox Code */ +#define CAN_TSR_CODE_MASK (3 << CAN_TSR_CODE_SHIFT) +#define CAN_TSR_TME0 (1 << 26) /* Bit 26: Transmit Mailbox 0 Empty */ +#define CAN_TSR_TME1 (1 << 27) /* Bit 27: Transmit Mailbox 1 Empty */ +#define CAN_TSR_TME2 (1 << 28) /* Bit 28: Transmit Mailbox 2 Empty */ +#define CAN_TSR_LOW0 (1 << 29) /* Bit 29: Lowest Priority Flag for Mailbox 0 */ +#define CAN_TSR_LOW1 (1 << 30) /* Bit 30: Lowest Priority Flag for Mailbox 1 */ +#define CAN_TSR_LOW2 (1 << 31) /* Bit 31: Lowest Priority Flag for Mailbox 2 */ + +/* CAN receive FIFO 0/1 registers */ + +#define CAN_RFR_FMP_SHIFT (0) /* Bits 1-0: FIFO Message Pending */ +#define CAN_RFR_FMP_MASK (3 << CAN_RFR_FMP_SHIFT) +#define CAN_RFR_FULL (1 << 3) /* Bit 3: FIFO 0 Full */ +#define CAN_RFR_FOVR (1 << 4) /* Bit 4: FIFO 0 Overrun */ +#define CAN_RFR_RFOM (1 << 5) /* Bit 5: Release FIFO 0 Output Mailbox */ + +/* CAN interrupt enable register */ + +#define CAN_IER_TMEIE (1 << 0) /* Bit 0: Transmit Mailbox Empty Interrupt Enable */ +#define CAN_IER_FMPIE0 (1 << 1) /* Bit 1: FIFO Message Pending Interrupt Enable */ +#define CAN_IER_FFIE0 (1 << 2) /* Bit 2: FIFO Full Interrupt Enable */ +#define CAN_IER_FOVIE0 (1 << 3) /* Bit 3: FIFO Overrun Interrupt Enable */ +#define CAN_IER_FMPIE1 (1 << 4) /* Bit 4: FIFO Message Pending Interrupt Enable */ +#define CAN_IER_FFIE1 (1 << 5) /* Bit 5: FIFO Full Interrupt Enable */ +#define CAN_IER_FOVIE1 (1 << 6) /* Bit 6: FIFO Overrun Interrupt Enable */ +#define CAN_IER_EWGIE (1 << 8) /* Bit 8: Error Warning Interrupt Enable */ +#define CAN_IER_EPVIE (1 << 9) /* Bit 9: Error Passive Interrupt Enable */ +#define CAN_IER_BOFIE (1 << 10) /* Bit 10: Bus-Off Interrupt Enable */ +#define CAN_IER_LECIE (1 << 11) /* Bit 11: Last Error Code Interrupt Enable */ +#define CAN_IER_ERRIE (1 << 15) /* Bit 15: Error Interrupt Enable */ +#define CAN_IER_WKUIE (1 << 16) /* Bit 16: Wakeup Interrupt Enable */ +#define CAN_IER_SLKIE (1 << 17) /* Bit 17: Sleep Interrupt Enable */ + +/* CAN error status register */ + +#define CAN_ESR_EWGF (1 << 0) /* Bit 0: Error Warning Flag */ +#define CAN_ESR_EPVF (1 << 1) /* Bit 1: Error Passive Flag */ +#define CAN_ESR_BOFF (1 << 2) /* Bit 2: Bus-Off Flag */ +#define CAN_ESR_LEC_SHIFT (4) /* Bits 6-4: Last Error Code */ +#define CAN_ESR_LEC_MASK (7 << CAN_ESR_LEC_SHIFT) +# define CAN_ESR_NOERROR (0 << CAN_ESR_LEC_SHIFT) /* 000: No Error */ +# define CAN_ESR_STUFFERROR (1 << CAN_ESR_LEC_SHIFT) /* 001: Stuff Error */ +# define CAN_ESR_FORMERROR (2 << CAN_ESR_LEC_SHIFT) /* 010: Form Error */ +# define CAN_ESR_ACKERROR (3 << CAN_ESR_LEC_SHIFT) /* 011: Acknowledgment Error */ +# define CAN_ESR_BRECERROR (4 << CAN_ESR_LEC_SHIFT) /* 100: Bit recessive Error */ +# define CAN_ESR_BDOMERROR (5 << CAN_ESR_LEC_SHIFT) /* 101: Bit dominant Error */ +# define CAN_ESR_CRCERRPR (6 << CAN_ESR_LEC_SHIFT) /* 110: CRC Error */ +# define CAN_ESR_SWERROR (7 << CAN_ESR_LEC_SHIFT) /* 111: Set by software */ +#define CAN_ESR_TEC_SHIFT (16) /* Bits 23-16: LS byte of the 9-bit Transmit Error Counter */ +#define CAN_ESR_TEC_MASK (0xff << CAN_ESR_TEC_SHIF) +#define CAN_ESR_REC_SHIFT (24) /* Bits 31-24: Receive Error Counter */ +#define CAN_ESR_REC_MASK (0xff << CAN_ESR_REC_SHIFT) + +/* CAN bit timing register */ + +#define CAN_BTR_BRP_SHIFT (0) /* Bits 9-0: Baud Rate Prescaler */ +#define CAN_BTR_BRP_MASK (0x03ff << CAN_BTR_BRP_SHIFT) +#define CAN_BTR_TS1_SHIFT (16) /* Bits 19-16: Time Segment 1 */ +#define CAN_BTR_TS1_MASK (0x0f << CAN_BTR_TS1_SHIFT) +#define CAN_BTR_TS2_SHIFT (20) /* Bits 22-20: Time Segment 2 */ +#define CAN_BTR_TS2_MASK (7 << CAN_BTR_TS2_SHIFT) +#define CAN_BTR_SJW_SHIFT (24) /* Bits 25-24: Resynchronization Jump Width */ +#define CAN_BTR_SJW_MASK (3 << CAN_BTR_SJW_SHIFT) +#define CAN_BTR_LBKM (1 << 30) /* Bit 30: Loop Back Mode (Debug) */ +#define CAN_BTR_SILM (1 << 31) /* Bit 31: Silent Mode (Debug) */ + +#define CAN_BTR_BRP_MAX (1024) /* Maximum BTR value (without decrement) */ +#define CAN_BTR_TSEG1_MAX (16) /* Maximum TSEG1 value (without decrement) */ +#define CAN_BTR_TSEG2_MAX (8) /* Maximum TSEG2 value (without decrement) */ + +/* TX mailbox identifier register */ + +#define CAN_TIR_TXRQ (1 << 0) /* Bit 0: Transmit Mailbox Request */ +#define CAN_TIR_RTR (1 << 1) /* Bit 1: Remote Transmission Request */ +#define CAN_TIR_IDE (1 << 2) /* Bit 2: Identifier Extension */ +#define CAN_TIR_EXID_SHIFT (3) /* Bit 3-31: Extended Identifier */ +#define CAN_TIR_EXID_MASK (0x1fffffff << CAN_TIR_EXID_SHIFT) +#define CAN_TIR_STID_SHIFT (21) /* Bits 21-31: Standard Identifier */ +#define CAN_TIR_STID_MASK (0x07ff << CAN_TIR_STID_SHIFT) + +/* Mailbox data length control and time stamp register */ + +#define CAN_TDTR_DLC_SHIFT (0) /* Bits 3:0: Data Length Code */ +#define CAN_TDTR_DLC_MASK (0x0f << CAN_TDTR_DLC_SHIFT) +#define CAN_TDTR_TGT (1 << 8) /* Bit 8: Transmit Global Time */ +#define CAN_TDTR_TIME_SHIFT (16) /* Bits 31:16: Message Time Stamp */ +#define CAN_TDTR_TIME_MASK (0xffff << CAN_TDTR_TIME_SHIFT) + +/* Mailbox data low register */ + +#define CAN_TDLR_DATA0_SHIFT (0) /* Bits 7-0: Data Byte 0 */ +#define CAN_TDLR_DATA0_MASK (0xff << CAN_TDLR_DATA0_SHIFT) +#define CAN_TDLR_DATA1_SHIFT (8) /* Bits 15-8: Data Byte 1 */ +#define CAN_TDLR_DATA1_MASK (0xff << CAN_TDLR_DATA1_SHIFT) +#define CAN_TDLR_DATA2_SHIFT (16) /* Bits 23-16: Data Byte 2 */ +#define CAN_TDLR_DATA2_MASK (0xff << CAN_TDLR_DATA2_SHIFT) +#define CAN_TDLR_DATA3_SHIFT (24) /* Bits 31-24: Data Byte 3 */ +#define CAN_TDLR_DATA3_MASK (0xff << CAN_TDLR_DATA3_SHIFT) + +/* Mailbox data high register */ + +#define CAN_TDHR_DATA4_SHIFT (0) /* Bits 7-0: Data Byte 4 */ +#define CAN_TDHR_DATA4_MASK (0xff << CAN_TDHR_DATA4_SHIFT) +#define CAN_TDHR_DATA5_SHIFT (8) /* Bits 15-8: Data Byte 5 */ +#define CAN_TDHR_DATA5_MASK (0xff << CAN_TDHR_DATA5_SHIFT) +#define CAN_TDHR_DATA6_SHIFT (16) /* Bits 23-16: Data Byte 6 */ +#define CAN_TDHR_DATA6_MASK (0xff << CAN_TDHR_DATA6_SHIFT) +#define CAN_TDHR_DATA7_SHIFT (24) /* Bits 31-24: Data Byte 7 */ +#define CAN_TDHR_DATA7_MASK (0xff << CAN_TDHR_DATA7_SHIFT) + +/* Rx FIFO mailbox identifier register */ + +#define CAN_RIR_RTR (1 << 1) /* Bit 1: Remote Transmission Request */ +#define CAN_RIR_IDE (1 << 2) /* Bit 2: Identifier Extension */ +#define CAN_RIR_EXID_SHIFT (3) /* Bit 3-31: Extended Identifier */ +#define CAN_RIR_EXID_MASK (0x1fffffff << CAN_RIR_EXID_SHIFT) +#define CAN_RIR_STID_SHIFT (21) /* Bits 21-31: Standard Identifier */ +#define CAN_RIR_STID_MASK (0x07ff << CAN_RIR_STID_SHIFT) + +/* Receive FIFO mailbox data length control and time stamp register */ + +#define CAN_RDTR_DLC_SHIFT (0) /* Bits 3:0: Data Length Code */ +#define CAN_RDTR_DLC_MASK (0x0f << CAN_RDTR_DLC_SHIFT) +#define CAN_RDTR_FM_SHIFT (8) /* Bits 15-8: Filter Match Index */ +#define CAN_RDTR_FM_MASK (0xff << CAN_RDTR_FM_SHIFT) +#define CAN_RDTR_TIME_SHIFT (16) /* Bits 31:16: Message Time Stamp */ +#define CAN_RDTR_TIME_MASK (0xffff << CAN_RDTR_TIME_SHIFT) + +/* Receive FIFO mailbox data low register */ + +#define CAN_RDLR_DATA0_SHIFT (0) /* Bits 7-0: Data Byte 0 */ +#define CAN_RDLR_DATA0_MASK (0xff << CAN_RDLR_DATA0_SHIFT) +#define CAN_RDLR_DATA1_SHIFT (8) /* Bits 15-8: Data Byte 1 */ +#define CAN_RDLR_DATA1_MASK (0xff << CAN_RDLR_DATA1_SHIFT) +#define CAN_RDLR_DATA2_SHIFT (16) /* Bits 23-16: Data Byte 2 */ +#define CAN_RDLR_DATA2_MASK (0xff << CAN_RDLR_DATA2_SHIFT) +#define CAN_RDLR_DATA3_SHIFT (24) /* Bits 31-24: Data Byte 3 */ +#define CAN_RDLR_DATA3_MASK (0xff << CAN_RDLR_DATA3_SHIFT) + +/* Receive FIFO mailbox data high register */ + +#define CAN_RDHR_DATA4_SHIFT (0) /* Bits 7-0: Data Byte 4 */ +#define CAN_RDHR_DATA4_MASK (0xff << CAN_RDHR_DATA4_SHIFT) +#define CAN_RDHR_DATA5_SHIFT (8) /* Bits 15-8: Data Byte 5 */ +#define CAN_RDHR_DATA5_MASK (0xff << CAN_RDHR_DATA5_SHIFT) +#define CAN_RDHR_DATA6_SHIFT (16) /* Bits 23-16: Data Byte 6 */ +#define CAN_RDHR_DATA6_MASK (0xff << CAN_RDHR_DATA6_SHIFT) +#define CAN_RDHR_DATA7_SHIFT (24) /* Bits 31-24: Data Byte 7 */ +#define CAN_RDHR_DATA7_MASK (0xff << CAN_RDHR_DATA7_SHIFT) + +/* CAN filter master register */ + +#define CAN_FMR_FINIT (1 << 0) /* Bit 0: Filter Init Mode */ + +/* CAN filter mode register */ + +#if defined(CONFIG_STM32L4_CONNECTIVITYLINE) || defined(CONFIG_STM32L4_STM32F20XX) || defined(CONFIG_STM32L4_STM32F40XX) +# define CAN_FM1R_FBM_SHIFT (0) /* Bits 13:0: Filter Mode */ +# define CAN_FM1R_FBM_MASK (0x3fff << CAN_FM1R_FBM_SHIFT) +#else +# define CAN_FM1R_FBM_SHIFT (0) /* Bits 27:0: Filter Mode */ +# define CAN_FM1R_FBM_MASK (0x0fffffff << CAN_FM1R_FBM_SHIFT) +#endif + +/* CAN filter scale register */ + +#if defined(CONFIG_STM32L4_CONNECTIVITYLINE) || defined(CONFIG_STM32L4_STM32F20XX) || defined(CONFIG_STM32L4_STM32F40XX) +# define CAN_FS1R_FSC_SHIFT (0) /* Bits 13:0: Filter Scale Configuration */ +# define CAN_FS1R_FSC_MASK (0x3fff << CAN_FS1R_FSC_SHIFT) +#else +# define CAN_FS1R_FSC_SHIFT (0) /* Bits 27:0: Filter Scale Configuration */ +# define CAN_FS1R_FSC_MASK (0x0fffffff << CAN_FS1R_FSC_SHIFT) +#endif + +/* CAN filter FIFO assignment register */ + +#if defined(CONFIG_STM32L4_CONNECTIVITYLINE) || defined(CONFIG_STM32L4_STM32F20XX) || defined(CONFIG_STM32L4_STM32F40XX) +# define CAN_FFA1R_FFA_SHIFT (0) /* Bits 13:0: Filter FIFO Assignment */ +# define CAN_FFA1R_FFA_MASK (0x3fff << CAN_FFA1R_FFA_SHIFT) +#else +# define CAN_FFA1R_FFA_SHIFT (0) /* Bits 27:0: Filter FIFO Assignment */ +# define CAN_FFA1R_FFA_MASK (0x0fffffff << CAN_FFA1R_FFA_SHIFT) +#endif + +/* CAN filter activation register */ + +#if defined(CONFIG_STM32L4_CONNECTIVITYLINE) || defined(CONFIG_STM32L4_STM32F20XX) || defined(CONFIG_STM32L4_STM32F40XX) +# define CAN_FA1R_FACT_SHIFT (0) /* Bits 13:0: Filter Active */ +# define CAN_FA1R_FACT_MASK (0x3fff << CAN_FA1R_FACT_SHIFT) +#else +# define CAN_FA1R_FACT_SHIFT (0) /* Bits 27:0: Filter Active */ +# define CAN_FA1R_FACT_MASK (0x0fffffff << CAN_FA1R_FACT_SHIFT) +#endif + +/************************************************************************************ + * Public Types + ************************************************************************************/ + +/************************************************************************************ + * Public Data + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +#endif /* __ARCH_ARM_SRC_STM32L4_CHIP_STM32L4_CAN_H */ diff --git a/arch/arm/src/stm32l4/stm32l4_can.c b/arch/arm/src/stm32l4/stm32l4_can.c new file mode 100644 index 00000000000..81efb677d2c --- /dev/null +++ b/arch/arm/src/stm32l4/stm32l4_can.c @@ -0,0 +1,1598 @@ +/************************************************************************************ + * arch/arm/src/stm32l4/stm32l4_can.c + * + * Copyright (C) 2011, 2016 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Adaptations for stm32l4: + * Copyright (C) 2016 Sebastien Lorquet. All rights reserved. + * Author: Sebastien Lorquet + * + * 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. + * + ************************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "up_internal.h" +#include "up_arch.h" + +#include "chip.h" +#include "stm32l4.h" +#include "stm32l4_can.h" + +#if defined(CONFIG_CAN) && defined(CONFIG_STM32L4_CAN1) + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/* Delays *******************************************************************/ +/* Time out for INAK bit */ + +#define INAK_TIMEOUT 65535 + +/* Mailboxes ****************************************************************/ + +#define CAN_ALL_MAILBOXES (CAN_TSR_TME0 | CAN_TSR_TME1 | CAN_TSR_TME2) + +/* Bit timing ***************************************************************/ + +#define CAN_BIT_QUANTA (CONFIG_CAN_TSEG1 + CONFIG_CAN_TSEG2 + 1) + +/* Debug ********************************************************************/ +/* Non-standard debug that may be enabled just for testing CAN */ + +#ifdef CONFIG_DEBUG_CAN +# define candbg dbg +# define canvdbg vdbg +# define canlldbg lldbg +# define canllvdbg llvdbg +#else +# define candbg(x...) +# define canvdbg(x...) +# define canlldbg(x...) +# define canllvdbg(x...) +#endif + +#if !defined(CONFIG_DEBUG) || !defined(CONFIG_DEBUG_CAN) +# undef CONFIG_CAN_REGDEBUG +#endif + +/**************************************************************************** + * Private Types + ****************************************************************************/ + +struct stm32l4_can_s +{ + uint8_t port; /* CAN port number (1 or 2) */ + uint8_t canrx0; /* CAN RX FIFO 0 IRQ number */ + uint8_t cantx; /* CAN TX IRQ number */ + uint8_t filter; /* Filter number */ + uint32_t base; /* Base address of the CAN control registers */ + uint32_t fbase; /* Base address of the CAN filter registers */ + uint32_t baud; /* Configured baud */ +}; + +/**************************************************************************** + * Private Function Prototypes + ****************************************************************************/ + +/* CAN Register access */ + +static uint32_t can_getreg(struct stm32l4_can_s *priv, int offset); +static uint32_t can_getfreg(struct stm32l4_can_s *priv, int offset); +static void can_putreg(struct stm32l4_can_s *priv, int offset, uint32_t value); +static void can_putfreg(struct stm32l4_can_s *priv, int offset, uint32_t value); +#ifdef CONFIG_CAN_REGDEBUG +static void can_dumpctrlregs(struct stm32l4_can_s *priv, FAR const char *msg); +static void can_dumpmbregs(struct stm32l4_can_s *priv, FAR const char *msg); +static void can_dumpfiltregs(struct stm32l4_can_s *priv, FAR const char *msg); +#else +# define can_dumpctrlregs(priv,msg) +# define can_dumpmbregs(priv,msg) +# define can_dumpfiltregs(priv,msg) +#endif + +/* CAN driver methods */ + +static void can_reset(FAR struct can_dev_s *dev); +static int can_setup(FAR struct can_dev_s *dev); +static void can_shutdown(FAR struct can_dev_s *dev); +static void can_rxint(FAR struct can_dev_s *dev, bool enable); +static void can_txint(FAR struct can_dev_s *dev, bool enable); +static int can_ioctl(FAR struct can_dev_s *dev, int cmd, unsigned long arg); +static int can_remoterequest(FAR struct can_dev_s *dev, uint16_t id); +static int can_send(FAR struct can_dev_s *dev, FAR struct can_msg_s *msg); +static bool can_txready(FAR struct can_dev_s *dev); +static bool can_txempty(FAR struct can_dev_s *dev); + +/* CAN interrupt handling */ + +static int can_rx0interrupt(int irq, void *context); +static int can_txinterrupt(int irq, void *context); + +/* Initialization */ + +static int can_bittiming(struct stm32l4_can_s *priv); +static int can_cellinit(struct stm32l4_can_s *priv); +static int can_filterinit(struct stm32l4_can_s *priv); + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +static const struct can_ops_s g_canops = +{ + .co_reset = can_reset, + .co_setup = can_setup, + .co_shutdown = can_shutdown, + .co_rxint = can_rxint, + .co_txint = can_txint, + .co_ioctl = can_ioctl, + .co_remoterequest = can_remoterequest, + .co_send = can_send, + .co_txready = can_txready, + .co_txempty = can_txempty, +}; + +#ifdef CONFIG_STM32L4_CAN1 +static struct stm32l4_can_s g_can1priv = +{ + .port = 1, + .canrx0 = STM32L4_IRQ_CAN1RX0, + .cantx = STM32L4_IRQ_CAN1TX, + .filter = 0, + .base = STM32L4_CAN1_BASE, + .fbase = STM32L4_CAN1_BASE, + .baud = CONFIG_CAN1_BAUD, +}; + +static struct can_dev_s g_can1dev = +{ + .cd_ops = &g_canops, + .cd_priv = &g_can1priv, +}; +#endif + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: can_getreg + * Name: can_getfreg + * + * Description: + * Read the value of a CAN register or filter block register. + * + * Input Parameters: + * priv - A reference to the CAN block status + * offset - The offset to the register to read + * + * Returned Value: + * + ****************************************************************************/ + +#ifdef CONFIG_CAN_REGDEBUG +static uint32_t can_vgetreg(uint32_t addr) +{ + static uint32_t prevaddr = 0; + static uint32_t preval = 0; + static uint32_t count = 0; + + /* Read the value from the register */ + + uint32_t val = getreg32(addr); + + /* Is this the same value that we read from the same register last time? + * Are we polling the register? If so, suppress some of the output. + */ + + if (addr == prevaddr && val == preval) + { + if (count == 0xffffffff || ++count > 3) + { + if (count == 4) + { + lldbg("...\n"); + } + + return val; + } + } + + /* No this is a new address or value */ + + else + { + /* Did we print "..." for the previous value? */ + + if (count > 3) + { + /* Yes.. then show how many times the value repeated */ + + lldbg("[repeats %d more times]\n", count-3); + } + + /* Save the new address, value, and count */ + + prevaddr = addr; + preval = val; + count = 1; + } + + /* Show the register value read */ + + lldbg("%08x->%08x\n", addr, val); + return val; +} + +static uint32_t can_getreg(struct stm32l4_can_s *priv, int offset) +{ + return can_vgetreg(priv->base + offset); +} + +static uint32_t can_getfreg(struct stm32l4_can_s *priv, int offset) +{ + return can_vgetreg(priv->fbase + offset); +} + +#else +static uint32_t can_getreg(struct stm32l4_can_s *priv, int offset) +{ + return getreg32(priv->base + offset); +} + +static uint32_t can_getfreg(struct stm32l4_can_s *priv, int offset) +{ + return getreg32(priv->fbase + offset); +} + +#endif + +/**************************************************************************** + * Name: can_putreg + * Name: can_putfreg + * + * Description: + * Set the value of a CAN register or filter block register. + * + * Input Parameters: + * priv - A reference to the CAN block status + * offset - The offset to the register to write + * value - The value to write to the register + * + * Returned Value: + * None + * + ****************************************************************************/ + +#ifdef CONFIG_CAN_REGDEBUG +static void can_vputreg(uint32_t addr, uint32_t value) +{ + /* Show the register value being written */ + + lldbg("%08x<-%08x\n", addr, value); + + /* Write the value */ + + putreg32(value, addr); +} + +static void can_putreg(struct stm32l4_can_s *priv, int offset, uint32_t value) +{ + can_vputreg(priv->base + offset, value); +} + +static void can_putfreg(struct stm32l4_can_s *priv, int offset, uint32_t value) +{ + can_vputreg(priv->fbase + offset, value); +} + +#else +static void can_putreg(struct stm32l4_can_s *priv, int offset, uint32_t value) +{ + putreg32(value, priv->base + offset); +} + +static void can_putfreg(struct stm32l4_can_s *priv, int offset, uint32_t value) +{ + putreg32(value, priv->fbase + offset); +} +#endif + +/**************************************************************************** + * Name: can_dumpctrlregs + * + * Description: + * Dump the contents of all CAN control registers + * + * Input Parameters: + * priv - A reference to the CAN block status + * + * Returned Value: + * None + * + ****************************************************************************/ + +#ifdef CONFIG_CAN_REGDEBUG +static void can_dumpctrlregs(struct stm32l4_can_s *priv, FAR const char *msg) +{ + if (msg) + { + canlldbg("Control Registers: %s\n", msg); + } + else + { + canlldbg("Control Registers:\n"); + } + + /* CAN control and status registers */ + + lldbg(" MCR: %08x MSR: %08x TSR: %08x\n", + getreg32(priv->base + STM32L4_CAN_MCR_OFFSET), + getreg32(priv->base + STM32L4_CAN_MSR_OFFSET), + getreg32(priv->base + STM32L4_CAN_TSR_OFFSET)); + + lldbg(" RF0R: %08x RF1R: %08x\n", + getreg32(priv->base + STM32L4_CAN_RF0R_OFFSET), + getreg32(priv->base + STM32L4_CAN_RF1R_OFFSET)); + + lldbg(" IER: %08x ESR: %08x BTR: %08x\n", + getreg32(priv->base + STM32L4_CAN_IER_OFFSET), + getreg32(priv->base + STM32L4_CAN_ESR_OFFSET), + getreg32(priv->base + STM32L4_CAN_BTR_OFFSET)); +} +#endif + +/**************************************************************************** + * Name: can_dumpmbregs + * + * Description: + * Dump the contents of all CAN mailbox registers + * + * Input Parameters: + * priv - A reference to the CAN block status + * + * Returned Value: + * None + * + ****************************************************************************/ + +#ifdef CONFIG_CAN_REGDEBUG +static void can_dumpmbregs(struct stm32l4_can_s *priv, FAR const char *msg) +{ + if (msg) + { + canlldbg("Mailbox Registers: %s\n", msg); + } + else + { + canlldbg("Mailbox Registers:\n"); + } + + /* CAN mailbox registers (3 TX and 2 RX) */ + + lldbg(" TI0R: %08x TDT0R: %08x TDL0R: %08x TDH0R: %08x\n", + getreg32(priv->base + STM32L4_CAN_TI0R_OFFSET), + getreg32(priv->base + STM32L4_CAN_TDT0R_OFFSET), + getreg32(priv->base + STM32L4_CAN_TDL0R_OFFSET), + getreg32(priv->base + STM32L4_CAN_TDH0R_OFFSET)); + + lldbg(" TI1R: %08x TDT1R: %08x TDL1R: %08x TDH1R: %08x\n", + getreg32(priv->base + STM32L4_CAN_TI1R_OFFSET), + getreg32(priv->base + STM32L4_CAN_TDT1R_OFFSET), + getreg32(priv->base + STM32L4_CAN_TDL1R_OFFSET), + getreg32(priv->base + STM32L4_CAN_TDH1R_OFFSET)); + + lldbg(" TI2R: %08x TDT2R: %08x TDL2R: %08x TDH2R: %08x\n", + getreg32(priv->base + STM32L4_CAN_TI2R_OFFSET), + getreg32(priv->base + STM32L4_CAN_TDT2R_OFFSET), + getreg32(priv->base + STM32L4_CAN_TDL2R_OFFSET), + getreg32(priv->base + STM32L4_CAN_TDH2R_OFFSET)); + + lldbg(" RI0R: %08x RDT0R: %08x RDL0R: %08x RDH0R: %08x\n", + getreg32(priv->base + STM32L4_CAN_RI0R_OFFSET), + getreg32(priv->base + STM32L4_CAN_RDT0R_OFFSET), + getreg32(priv->base + STM32L4_CAN_RDL0R_OFFSET), + getreg32(priv->base + STM32L4_CAN_RDH0R_OFFSET)); + + lldbg(" RI1R: %08x RDT1R: %08x RDL1R: %08x RDH1R: %08x\n", + getreg32(priv->base + STM32L4_CAN_RI1R_OFFSET), + getreg32(priv->base + STM32L4_CAN_RDT1R_OFFSET), + getreg32(priv->base + STM32L4_CAN_RDL1R_OFFSET), + getreg32(priv->base + STM32L4_CAN_RDH1R_OFFSET)); +} +#endif + +/**************************************************************************** + * Name: can_dumpfiltregs + * + * Description: + * Dump the contents of all CAN filter registers + * + * Input Parameters: + * priv - A reference to the CAN block status + * + * Returned Value: + * None + * + ****************************************************************************/ + +#ifdef CONFIG_CAN_REGDEBUG +static void can_dumpfiltregs(struct stm32l4_can_s *priv, FAR const char *msg) +{ + int i; + + if (msg) + { + canlldbg("Filter Registers: %s\n", msg); + } + else + { + canlldbg("Filter Registers:\n"); + } + + lldbg(" FMR: %08x FM1R: %08x FS1R: %08x FFA1R: %08x FA1R: %08x\n", + getreg32(priv->base + STM32L4_CAN_FMR_OFFSET), + getreg32(priv->base + STM32L4_CAN_FM1R_OFFSET), + getreg32(priv->base + STM32L4_CAN_FS1R_OFFSET), + getreg32(priv->base + STM32L4_CAN_FFA1R_OFFSET), + getreg32(priv->base + STM32L4_CAN_FA1R_OFFSET)); + + for (i = 0; i < CAN_NFILTERS; i++) + { + lldbg(" F%dR1: %08x F%dR2: %08x\n", + i, getreg32(priv->base + STM32L4_CAN_FIR_OFFSET(i, 1)), + i, getreg32(priv->base + STM32L4_CAN_FIR_OFFSET(i, 2))); + } +} +#endif + +/**************************************************************************** + * Name: can_reset + * + * Description: + * Reset the CAN device. Called early to initialize the hardware. This + * function is called, before can_setup() and on error conditions. + * + * Input Parameters: + * dev - An instance of the "upper half" can driver state structure. + * + * Returned Value: + * None + * + ****************************************************************************/ + +static void can_reset(FAR struct can_dev_s *dev) +{ + FAR struct stm32l4_can_s *priv = dev->cd_priv; + uint32_t regval; + uint32_t regbit = 0; + irqstate_t flags; + + canllvdbg("CAN%d\n", priv->port); + + /* Get the bits in the AHB1RSTR1 register needed to reset this CAN device */ + +#ifdef CONFIG_STM32L4_CAN1 + if (priv->port == 1) + { + regbit = RCC_APB1RSTR1_CAN1RST; + } + else +#endif + { + canlldbg("Unsupported port %d\n", priv->port); + return; + } + + /* Disable interrupts momentary to stop any ongoing CAN event processing and + * to prevent any concurrent access to the AHB1RSTR1 register. + */ + + flags = enter_critical_section(); + + /* Reset the CAN */ + + regval = getreg32(STM32L4_RCC_APB1RSTR1); + regval |= regbit; + putreg32(regval, STM32L4_RCC_APB1RSTR1); + + regval &= ~regbit; + putreg32(regval, STM32L4_RCC_APB1RSTR1); + leave_critical_section(flags); +} + +/**************************************************************************** + * Name: can_setup + * + * Description: + * Configure the CAN. This method is called the first time that the CAN + * device is opened. This will occur when the port is first opened. + * This setup includes configuring and attaching CAN interrupts. + * All CAN interrupts are disabled upon return. + * + * Input Parameters: + * dev - An instance of the "upper half" can driver state structure. + * + * Returned Value: + * Zero on success; a negated errno on failure + * + ****************************************************************************/ + +static int can_setup(FAR struct can_dev_s *dev) +{ + FAR struct stm32l4_can_s *priv = dev->cd_priv; + int ret; + + canllvdbg("CAN%d RX0 irq: %d TX irq: %d\n", priv->port, priv->canrx0, priv->cantx); + + /* CAN cell initialization */ + + ret = can_cellinit(priv); + if (ret < 0) + { + canlldbg("CAN%d cell initialization failed: %d\n", priv->port, ret); + return ret; + } + + can_dumpctrlregs(priv, "After cell initialization"); + can_dumpmbregs(priv, NULL); + + /* CAN filter initialization */ + + ret = can_filterinit(priv); + if (ret < 0) + { + canlldbg("CAN%d filter initialization failed: %d\n", priv->port, ret); + return ret; + } + + can_dumpfiltregs(priv, "After filter initialization"); + + /* Attach the CAN RX FIFO 0 interrupt and TX interrupts. The others are not used */ + + ret = irq_attach(priv->canrx0, can_rx0interrupt); + if (ret < 0) + { + canlldbg("Failed to attach CAN%d RX0 IRQ (%d)", priv->port, priv->canrx0); + return ret; + } + + ret = irq_attach(priv->cantx, can_txinterrupt); + if (ret < 0) + { + canlldbg("Failed to attach CAN%d TX IRQ (%d)", priv->port, priv->cantx); + return ret; + } + + /* Enable the interrupts at the NVIC. Interrupts arestill disabled in + * the CAN module. Since we coming out of reset here, there should be + * no pending interrupts. + */ + + up_enable_irq(priv->canrx0); + up_enable_irq(priv->cantx); + return OK; +} + +/**************************************************************************** + * Name: can_shutdown + * + * Description: + * Disable the CAN. This method is called when the CAN device is closed. + * This method reverses the operation the setup method. + * + * Input Parameters: + * dev - An instance of the "upper half" can driver state structure. + * + * Returned Value: + * None + * + ****************************************************************************/ + +static void can_shutdown(FAR struct can_dev_s *dev) +{ + FAR struct stm32l4_can_s *priv = dev->cd_priv; + + canllvdbg("CAN%d\n", priv->port); + + /* Disable the RX FIFO 0 and TX interrupts */ + + up_disable_irq(priv->canrx0); + up_disable_irq(priv->cantx); + + /* Detach the RX FIFO 0 and TX interrupts */ + + irq_detach(priv->canrx0); + irq_detach(priv->cantx); + + /* And reset the hardware */ + + can_reset(dev); +} + +/**************************************************************************** + * Name: can_rxint + * + * Description: + * Call to enable or disable RX interrupts. + * + * Input Parameters: + * dev - An instance of the "upper half" can driver state structure. + * + * Returned Value: + * None + * + ****************************************************************************/ + +static void can_rxint(FAR struct can_dev_s *dev, bool enable) +{ + FAR struct stm32l4_can_s *priv = dev->cd_priv; + uint32_t regval; + + canllvdbg("CAN%d enable: %d\n", priv->port, enable); + + /* Enable/disable the FIFO 0 message pending interrupt */ + + regval = can_getreg(priv, STM32L4_CAN_IER_OFFSET); + if (enable) + { + regval |= CAN_IER_FMPIE0; + } + else + { + regval &= ~CAN_IER_FMPIE0; + } + + can_putreg(priv, STM32L4_CAN_IER_OFFSET, regval); +} + +/**************************************************************************** + * Name: can_txint + * + * Description: + * Call to enable or disable TX interrupts. + * + * Input Parameters: + * dev - An instance of the "upper half" can driver state structure. + * + * Returned Value: + * None + * + ****************************************************************************/ + +static void can_txint(FAR struct can_dev_s *dev, bool enable) +{ + FAR struct stm32l4_can_s *priv = dev->cd_priv; + uint32_t regval; + + canllvdbg("CAN%d enable: %d\n", priv->port, enable); + + /* Support only disabling the transmit mailbox interrupt */ + + if (!enable) + { + regval = can_getreg(priv, STM32L4_CAN_IER_OFFSET); + regval &= ~CAN_IER_TMEIE; + can_putreg(priv, STM32L4_CAN_IER_OFFSET, regval); + } +} + +/**************************************************************************** + * Name: can_ioctl + * + * Description: + * All ioctl calls will be routed through this method + * + * Input Parameters: + * dev - An instance of the "upper half" can driver state structure. + * + * Returned Value: + * Zero on success; a negated errno on failure + * + ****************************************************************************/ + +static int can_ioctl(FAR struct can_dev_s *dev, int cmd, unsigned long arg) +{ + /* No CAN ioctls are supported */ + + return -ENOTTY; +} + +/**************************************************************************** + * Name: can_remoterequest + * + * Description: + * Send a remote request + * + * Input Parameters: + * dev - An instance of the "upper half" can driver state structure. + * + * Returned Value: + * Zero on success; a negated errno on failure + * + ****************************************************************************/ + +static int can_remoterequest(FAR struct can_dev_s *dev, uint16_t id) +{ +#warning "Remote request not implemented" + return -ENOSYS; +} + +/**************************************************************************** + * Name: can_send + * + * Description: + * Send one can message. + * + * One CAN-message consists of a maximum of 10 bytes. A message is + * composed of at least the first 2 bytes (when there are no data bytes). + * + * Byte 0: Bits 0-7: Bits 3-10 of the 11-bit CAN identifier + * Byte 1: Bits 5-7: Bits 0-2 of the 11-bit CAN identifier + * Bit 4: Remote Tranmission Request (RTR) + * Bits 0-3: Data Length Code (DLC) + * Bytes 2-10: CAN data + * + * Input Parameters: + * dev - An instance of the "upper half" can driver state structure. + * + * Returned Value: + * Zero on success; a negated errno on failure + * + ****************************************************************************/ + +static int can_send(FAR struct can_dev_s *dev, FAR struct can_msg_s *msg) +{ + FAR struct stm32l4_can_s *priv = dev->cd_priv; + FAR uint8_t *ptr; + uint32_t regval; + uint32_t tmp; + int dlc; + int txmb; + + canllvdbg("CAN%d ID: %d DLC: %d\n", priv->port, msg->cm_hdr.ch_id, msg->cm_hdr.ch_dlc); + + /* Select one empty transmit mailbox */ + + regval = can_getreg(priv, STM32L4_CAN_TSR_OFFSET); + if ((regval & CAN_TSR_TME0) != 0 && (regval & CAN_TSR_RQCP0) == 0) + { + txmb = 0; + } + else if ((regval & CAN_TSR_TME1) != 0 && (regval & CAN_TSR_RQCP1) == 0) + { + txmb = 1; + } + else if ((regval & CAN_TSR_TME2) != 0 && (regval & CAN_TSR_RQCP2) == 0) + { + txmb = 2; + } + else + { + canlldbg("ERROR: No available mailbox\n"); + return -EBUSY; + } + + /* Clear TXRQ, RTR, IDE, EXID, and STID fields */ + + regval = can_getreg(priv, STM32L4_CAN_TIR_OFFSET(txmb)); + regval &= ~(CAN_TIR_TXRQ | CAN_TIR_RTR | CAN_TIR_IDE | CAN_TIR_EXID_MASK | CAN_TIR_STID_MASK); + can_putreg(priv, STM32L4_CAN_TIR_OFFSET(txmb), regval); + + /* Set up the ID, standard 11-bit or extended 29-bit. */ + +#ifdef CONFIG_CAN_EXTID + regval &= ~CAN_TIR_EXID_MASK; + if (msg->cm_hdr.ch_extid) + { + DEBUGASSERT(msg->cm_hdr.ch_id < (1 << 29)); + regval |= (msg->cm_hdr.ch_id << CAN_TIR_EXID_SHIFT) | CAN_TIR_IDE; + } + else + { + DEBUGASSERT(msg->cm_hdr.ch_id < (1 << 11)); + regval |= msg->cm_hdr.ch_id << CAN_TIR_STID_SHIFT; + } +#else + regval &= ~CAN_TIR_STID_MASK; + regval |= (uint32_t)msg->cm_hdr.ch_id << CAN_TIR_STID_SHIFT; +#endif + can_putreg(priv, STM32L4_CAN_TIR_OFFSET(txmb), regval); + + /* Set up the DLC */ + + dlc = msg->cm_hdr.ch_dlc; + regval = can_getreg(priv, STM32L4_CAN_TDTR_OFFSET(txmb)); + regval &= ~(CAN_TDTR_DLC_MASK | CAN_TDTR_TGT); + regval |= (uint32_t)dlc << CAN_TDTR_DLC_SHIFT; + can_putreg(priv, STM32L4_CAN_TDTR_OFFSET(txmb), regval); + + /* Set up the data fields */ + + ptr = msg->cm_data; + regval = 0; + + if (dlc > 0) + { + tmp = (uint32_t)*ptr++; + regval = tmp << CAN_TDLR_DATA0_SHIFT; + + if (dlc > 1) + { + tmp = (uint32_t)*ptr++; + regval |= tmp << CAN_TDLR_DATA1_SHIFT; + + if (dlc > 2) + { + tmp = (uint32_t)*ptr++; + regval |= tmp << CAN_TDLR_DATA2_SHIFT; + + if (dlc > 3) + { + tmp = (uint32_t)*ptr++; + regval |= tmp << CAN_TDLR_DATA3_SHIFT; + } + } + } + } + + can_putreg(priv, STM32L4_CAN_TDLR_OFFSET(txmb), regval); + + regval = 0; + if (dlc > 4) + { + tmp = (uint32_t)*ptr++; + regval = tmp << CAN_TDHR_DATA4_SHIFT; + + if (dlc > 5) + { + tmp = (uint32_t)*ptr++; + regval |= tmp << CAN_TDHR_DATA5_SHIFT; + + if (dlc > 6) + { + tmp = (uint32_t)*ptr++; + regval |= tmp << CAN_TDHR_DATA6_SHIFT; + + if (dlc > 7) + { + tmp = (uint32_t)*ptr++; + regval |= tmp << CAN_TDHR_DATA7_SHIFT; + } + } + } + } + + can_putreg(priv, STM32L4_CAN_TDHR_OFFSET(txmb), regval); + + /* Enable the transmit mailbox empty interrupt (may already be enabled) */ + + regval = can_getreg(priv, STM32L4_CAN_IER_OFFSET); + regval |= CAN_IER_TMEIE; + can_putreg(priv, STM32L4_CAN_IER_OFFSET, regval); + + /* Request transmission */ + + regval = can_getreg(priv, STM32L4_CAN_TIR_OFFSET(txmb)); + regval |= CAN_TIR_TXRQ; /* Transmit Mailbox Request */ + can_putreg(priv, STM32L4_CAN_TIR_OFFSET(txmb), regval); + + can_dumpmbregs(priv, "After send"); + return OK; +} + +/**************************************************************************** + * Name: can_txready + * + * Description: + * Return true if the CAN hardware can accept another TX message. + * + * Input Parameters: + * dev - An instance of the "upper half" can driver state structure. + * + * Returned Value: + * True if the CAN hardware is ready to accept another TX message. + * + ****************************************************************************/ + +static bool can_txready(FAR struct can_dev_s *dev) +{ + FAR struct stm32l4_can_s *priv = dev->cd_priv; + uint32_t regval; + + /* Return true if any mailbox is available */ + + regval = can_getreg(priv, STM32L4_CAN_TSR_OFFSET); + canllvdbg("CAN%d TSR: %08x\n", priv->port, regval); + + if ((regval & CAN_ALL_MAILBOXES) != 0) + { + return true; + } + + return false; +} + +/**************************************************************************** + * Name: can_txempty + * + * Description: + * Return true if all message have been sent. If for example, the CAN + * hardware implements FIFOs, then this would mean the transmit FIFO is + * empty. This method is called when the driver needs to make sure that + * all characters are "drained" from the TX hardware before calling + * co_shutdown(). + * + * Input Parameters: + * dev - An instance of the "upper half" can driver state structure. + * + * Returned Value: + * True if there are no pending TX transfers in the CAN hardware. + * + ****************************************************************************/ + +static bool can_txempty(FAR struct can_dev_s *dev) +{ + FAR struct stm32l4_can_s *priv = dev->cd_priv; + uint32_t regval; + + /* Return true if all mailboxes are available */ + + regval = can_getreg(priv, STM32L4_CAN_TSR_OFFSET); + canllvdbg("CAN%d TSR: %08x\n", priv->port, regval); + + if ((regval & CAN_ALL_MAILBOXES) == CAN_ALL_MAILBOXES) + { + return true; + } + + return false; +} + +/**************************************************************************** + * Name: can_rx0interrupt + * + * Description: + * CAN RX FIFO 0 interrupt handler + * + * Input Parameters: + * irq - The IRQ number of the interrupt. + * context - The register state save array at the time of the interrupt. + * + * Returned Value: + * Zero on success; a negated errno on failure + * + ****************************************************************************/ + +static int can_rx0interrupt(int irq, void *context) +{ + FAR struct can_dev_s *dev = NULL; + FAR struct stm32l4_can_s *priv; + struct can_hdr_s hdr; + uint8_t data[CAN_MAXDATALEN]; + uint32_t regval; + int npending; + int ret; + + dev = &g_can1dev; + priv = dev->cd_priv; + + /* Verify that a message is pending in FIFO 0 */ + + regval = can_getreg(priv, STM32L4_CAN_RF0R_OFFSET); + npending = (regval & CAN_RFR_FMP_MASK) >> CAN_RFR_FMP_SHIFT; + if (npending < 1) + { + canlldbg("WARNING: No messages pending\n"); + return OK; + } + + can_dumpmbregs(priv, "RX0 interrupt"); + + /* Get the CAN identifier. */ + + regval = can_getreg(priv, STM32L4_CAN_RI0R_OFFSET); + +#ifdef CONFIG_CAN_EXTID + if ((regval & CAN_RIR_IDE) != 0) + { + hdr.ch_id = (regval & CAN_RIR_EXID_MASK) >> CAN_RIR_EXID_SHIFT; + hdr.ch_extid = true; + } + else + { + hdr.ch_id = (regval & CAN_RIR_STID_MASK) >> CAN_RIR_STID_SHIFT; + hdr.ch_extid = false; + } +#else + if ((regval & CAN_RIR_IDE) != 0) + { + canlldbg("ERROR: Received message with extended identifier. Dropped\n"); + ret = -ENOSYS; + goto errout; + } + + hdr.ch_id = (regval & CAN_RIR_STID_MASK) >> CAN_RIR_STID_SHIFT; +#endif + + /* Clear the error indication and unused bits */ + +#ifdef CONFIG_CAN_ERRORS + hdr.ch_error = 0; /* Error reporting not supported */ +#endif + hdr.ch_unused = 0; + + /* Extract the RTR bit */ + + hdr.ch_rtr = (regval & CAN_RIR_RTR) != 0 ? true : false; + + /* Get the DLC */ + + regval = can_getreg(priv, STM32L4_CAN_RDT0R_OFFSET); + hdr.ch_dlc = (regval & CAN_RDTR_DLC_MASK) >> CAN_RDTR_DLC_SHIFT; + + /* Save the message data */ + + regval = can_getreg(priv, STM32L4_CAN_RDL0R_OFFSET); + data[0] = (regval & CAN_RDLR_DATA0_MASK) >> CAN_RDLR_DATA0_SHIFT; + data[1] = (regval & CAN_RDLR_DATA1_MASK) >> CAN_RDLR_DATA1_SHIFT; + data[2] = (regval & CAN_RDLR_DATA2_MASK) >> CAN_RDLR_DATA2_SHIFT; + data[3] = (regval & CAN_RDLR_DATA3_MASK) >> CAN_RDLR_DATA3_SHIFT; + + regval = can_getreg(priv, STM32L4_CAN_RDH0R_OFFSET); + data[4] = (regval & CAN_RDHR_DATA4_MASK) >> CAN_RDHR_DATA4_SHIFT; + data[5] = (regval & CAN_RDHR_DATA5_MASK) >> CAN_RDHR_DATA5_SHIFT; + data[6] = (regval & CAN_RDHR_DATA6_MASK) >> CAN_RDHR_DATA6_SHIFT; + data[7] = (regval & CAN_RDHR_DATA7_MASK) >> CAN_RDHR_DATA7_SHIFT; + + /* Provide the data to the upper half driver */ + + ret = can_receive(dev, &hdr, data); + + /* Release the FIFO0 */ + +#ifndef CONFIG_CAN_EXTID +errout: +#endif + regval = can_getreg(priv, STM32L4_CAN_RF0R_OFFSET); + regval |= CAN_RFR_RFOM; + can_putreg(priv, STM32L4_CAN_RF0R_OFFSET, regval); + return ret; +} + +/**************************************************************************** + * Name: can_txinterrupt + * + * Description: + * CAN TX mailbox complete interrupt handler + * + * Input Parameters: + * irq - The IRQ number of the interrupt. + * context - The register state save array at the time of the interrupt. + * + * Returned Value: + * Zero on success; a negated errno on failure + * + ****************************************************************************/ + +static int can_txinterrupt(int irq, void *context) +{ + FAR struct can_dev_s *dev = NULL; + FAR struct stm32l4_can_s *priv; + uint32_t regval; + + dev = &g_can1dev; + priv = dev->cd_priv; + + /* Get the transmit status */ + + regval = can_getreg(priv, STM32L4_CAN_TSR_OFFSET); + + /* Check for RQCP0: Request completed mailbox 0 */ + + if ((regval & CAN_TSR_RQCP0) != 0) + { + /* Writing '1' to RCP0 clears RCP0 and all the status bits (TXOK0, + * ALST0 and TERR0) for Mailbox 0. + */ + + can_putreg(priv, STM32L4_CAN_TSR_OFFSET, CAN_TSR_RQCP0); + + /* Check for errors */ + + if ((regval & CAN_TSR_TXOK0) != 0) + { + /* Tell the upper half that the tansfer is finished. */ + + (void)can_txdone(dev); + } + } + + /* Check for RQCP1: Request completed mailbox 1 */ + + if ((regval & CAN_TSR_RQCP1) != 0) + { + /* Writing '1' to RCP1 clears RCP1 and all the status bits (TXOK1, + * ALST1 and TERR1) for Mailbox 1. + */ + + can_putreg(priv, STM32L4_CAN_TSR_OFFSET, CAN_TSR_RQCP1); + + /* Check for errors */ + + if ((regval & CAN_TSR_TXOK1) != 0) + { + /* Tell the upper half that the tansfer is finished. */ + + (void)can_txdone(dev); + } + } + + /* Check for RQCP2: Request completed mailbox 2 */ + + if ((regval & CAN_TSR_RQCP2) != 0) + { + /* Writing '1' to RCP2 clears RCP2 and all the status bits (TXOK2, + * ALST2 and TERR2) for Mailbox 2. + */ + + can_putreg(priv, STM32L4_CAN_TSR_OFFSET, CAN_TSR_RQCP2); + + /* Check for errors */ + + if ((regval & CAN_TSR_TXOK2) != 0) + { + /* Tell the upper half that the tansfer is finished. */ + + (void)can_txdone(dev); + } + } + + return OK; +} + +/**************************************************************************** + * Name: can_bittiming + * + * Description: + * Set the CAN bit timing register (BTR) based on the configured BAUD. + * + * "The bit timing logic monitors the serial bus-line and performs sampling + * and adjustment of the sample point by synchronizing on the start-bit edge + * and resynchronizing on the following edges. + * + * "Its operation may be explained simply by splitting nominal bit time into + * three segments as follows: + * + * 1. "Synchronization segment (SYNC_SEG): a bit change is expected to occur + * within this time segment. It has a fixed length of one time quantum + * (1 x tCAN). + * 2. "Bit segment 1 (BS1): defines the location of the sample point. It + * includes the PROP_SEG and PHASE_SEG1 of the CAN standard. Its duration + * is programmable between 1 and 16 time quanta but may be automatically + * lengthened to compensate for positive phase drifts due to differences + * in the frequency of the various nodes of the network. + * 3. "Bit segment 2 (BS2): defines the location of the transmit point. It + * represents the PHASE_SEG2 of the CAN standard. Its duration is + * programmable between 1 and 8 time quanta but may also be automatically + * shortened to compensate for negative phase drifts." + * + * Pictorially: + * + * |<----------------- NOMINAL BIT TIME ----------------->| + * |<- SYNC_SEG ->|<------ BS1 ------>|<------ BS2 ------>| + * |<---- Tq ---->|<----- Tbs1 ------>|<----- Tbs2 ------>| + * + * Where + * Tbs1 is the duration of the BS1 segment + * Tbs2 is the duration of the BS2 segment + * Tq is the "Time Quantum" + * + * Relationships: + * + * baud = 1 / bit_time + * bit_time = Tq + Tbs1 + Tbs2 + * Tbs1 = Tq * ts1 + * Tbs2 = Tq * ts2 + * Tq = brp * Tpclk1 + * + * Where: + * Tpclk1 is the period of the APB1 clock (PCLK1). + * + * Input Parameter: + * priv - A reference to the CAN block status + * + * Returned Value: + * Zero on success; a negated errno on failure + * + ****************************************************************************/ + +static int can_bittiming(struct stm32l4_can_s *priv) +{ + uint32_t tmp; + uint32_t brp; + uint32_t ts1; + uint32_t ts2; + + canllvdbg("CAN%d PCLK1: %d baud: %d\n", + priv->port, STM32L4_PCLK1_FREQUENCY, priv->baud); + + /* Try to get CAN_BIT_QUANTA quanta in one bit_time. + * + * bit_time = Tq*(ts1 + ts2 + 1) + * nquanta = bit_time / Tq + * nquanta = (ts1 + ts2 + 1) + * + * bit_time = brp * Tpclk1 * (ts1 + ts2 + 1) + * nquanta = bit_time / brp / Tpclk1 + * = PCLK1 / baud / brp + * brp = PCLK1 / baud / nquanta; + * + * Example: + * PCLK1 = 42,000,000 baud = 1,000,000 nquanta = 14 : brp = 3 + * PCLK1 = 42,000,000 baud = 700,000 nquanta = 14 : brp = 4 + */ + + tmp = STM32L4_PCLK1_FREQUENCY / priv->baud; + if (tmp < CAN_BIT_QUANTA) + { + /* At the smallest brp value (1), there are already too few bit times + * (PCLCK1 / baud) to meet our goal. brp must be one and we need + * make some reasonable guesses about ts1 and ts2. + */ + + brp = 1; + + /* In this case, we have to guess a good value for ts1 and ts2 */ + + ts1 = (tmp - 1) >> 1; + ts2 = tmp - ts1 - 1; + + if (ts1 == ts2 && ts1 > 1 && ts2 < CAN_BTR_TSEG2_MAX) + { + ts1--; + ts2++; + } + } + + /* Otherwise, nquanta is CAN_BIT_QUANTA, ts1 is CONFIG_CAN_TSEG1, ts2 is + * CONFIG_CAN_TSEG2 and we calculate brp to achieve CAN_BIT_QUANTA quanta + * in the bit time + */ + + else + { + ts1 = CONFIG_CAN_TSEG1; + ts2 = CONFIG_CAN_TSEG2; + brp = (tmp + (CAN_BIT_QUANTA/2)) / CAN_BIT_QUANTA; + DEBUGASSERT(brp >= 1 && brp <= CAN_BTR_BRP_MAX); + } + + canllvdbg("TS1: %d TS2: %d BRP: %d\n", ts1, ts2, brp); + + /* Configure bit timing. This also does the following, less obvious + * things. Unless loopback mode is enabled, it: + * + * - Disables silent mode. + * - Disables loopback mode. + * + * NOTE that for the time being, SJW is set to 1 just because I don't + * know any better. + */ + + tmp = ((brp - 1) << CAN_BTR_BRP_SHIFT) | ((ts1 - 1) << CAN_BTR_TS1_SHIFT) | + ((ts2 - 1) << CAN_BTR_TS2_SHIFT) | ((1 - 1) << CAN_BTR_SJW_SHIFT); +#ifdef CONFIG_CAN_LOOPBACK +//tmp |= (CAN_BTR_LBKM | CAN_BTR_SILM); + tmp |= CAN_BTR_LBKM; +#endif + + can_putreg(priv, STM32L4_CAN_BTR_OFFSET, tmp); + return OK; +} + +/**************************************************************************** + * Name: can_cellinit + * + * Description: + * CAN cell initialization + * + * Input Parameter: + * priv - A pointer to the private data structure for this CAN block + * + * Returned Value: + * Zero on success; a negated errno value on failure. + * + ****************************************************************************/ + +static int can_cellinit(struct stm32l4_can_s *priv) +{ + volatile uint32_t timeout; + uint32_t regval; + int ret; + + canllvdbg("CAN%d\n", priv->port); + + /* Exit from sleep mode */ + + regval = can_getreg(priv, STM32L4_CAN_MCR_OFFSET); + regval &= ~CAN_MCR_SLEEP; + can_putreg(priv, STM32L4_CAN_MCR_OFFSET, regval); + + /* Configure CAN behavior. Priority driven request order, not message ID. */ + + regval |= CAN_MCR_TXFP; + can_putreg(priv, STM32L4_CAN_MCR_OFFSET, regval); + + /* Enter initialization mode */ + + regval |= CAN_MCR_INRQ; + can_putreg(priv, STM32L4_CAN_MCR_OFFSET, regval); + + /* Wait until initialization mode is acknowledged */ + + for (timeout = INAK_TIMEOUT; timeout > 0; timeout--) + { + regval = can_getreg(priv, STM32L4_CAN_MSR_OFFSET); + if ((regval & CAN_MSR_INAK) != 0) + { + /* We are in initialization mode */ + + break; + } + } + + /* Check for a timeout */ + + if (timeout < 1) + { + canlldbg("ERROR: Timed out waiting to enter initialization mode\n"); + return -ETIMEDOUT; + } + + /* Disable the following modes: + * + * - Time triggered communication mode + * - Automatic bus-off management + * - Automatic wake-up mode + * - No automatic retransmission + * - Receive FIFO locked mode + * - Transmit FIFO priority + */ + + regval = can_getreg(priv, STM32L4_CAN_MCR_OFFSET); + regval &= ~(CAN_MCR_TXFP | CAN_MCR_RFLM | CAN_MCR_NART | CAN_MCR_AWUM | CAN_MCR_ABOM | CAN_MCR_TTCM); + can_putreg(priv, STM32L4_CAN_MCR_OFFSET, regval); + + /* Configure bit timing. */ + + ret = can_bittiming(priv); + if (ret < 0) + { + canlldbg("ERROR: Failed to set bit timing: %d\n", ret); + return ret; + } + + /* Exit initialization mode */ + + regval = can_getreg(priv, STM32L4_CAN_MCR_OFFSET); + regval &= ~CAN_MCR_INRQ; + can_putreg(priv, STM32L4_CAN_MCR_OFFSET, regval); + + /* Wait until the initialization mode exit is acknowledged */ + + for (timeout = INAK_TIMEOUT; timeout > 0; timeout--) + { + regval = can_getreg(priv, STM32L4_CAN_MSR_OFFSET); + if ((regval & CAN_MSR_INAK) == 0) + { + /* We are out of initialization mode */ + + break; + } + } + + /* Check for a timeout */ + + if (timeout < 1) + { + canlldbg("ERROR: Timed out waiting to exit initialization mode: %08x\n", regval); + return -ETIMEDOUT; + } + + return OK; +} + +/**************************************************************************** + * Name: can_filterinit + * + * Description: + * CAN filter initialization. CAN filters are not currently used by this + * driver. The CAN filters can be configured in a different way: + * + * 1. As a match of specific IDs in a list (IdList mode), or as + * 2. And ID and a mask (IdMask mode). + * + * Filters can also be configured as: + * + * 3. 16- or 32-bit. The advantage of 16-bit filters is that you get + * more filters; The advantage of 32-bit filters is that you get + * finer control of the filtering. + * + * There is no need to set up one filter for each CAN since STM32L4 only + * contains one CAN devices. If one day some STM32L4 has 2 CANs, then + * code will have to be imported from the STM32 port. + * + * 32-bit IdMask mode is configured. However, both the ID and the MASK + * are set to zero thus supressing all filtering because anything masked + * with zero matches zero. + * + * Input Parameter: + * priv - A pointer to the private data structure for this CAN block + * + * Returned Value: + * Zero on success; a negated errno value on failure. + * + ****************************************************************************/ + +static int can_filterinit(struct stm32l4_can_s *priv) +{ + uint32_t regval; + uint32_t bitmask; + + canllvdbg("CAN%d filter: %d\n", priv->port, priv->filter); + + /* Get the bitmask associated with the filter used by this CAN block */ + + bitmask = ((uint32_t)1) << priv->filter; + + /* Enter filter initialization mode */ + + regval = can_getfreg(priv, STM32L4_CAN_FMR_OFFSET); + regval |= CAN_FMR_FINIT; + can_putfreg(priv, STM32L4_CAN_FMR_OFFSET, regval); + + /* Disable the filter */ + + regval = can_getfreg(priv, STM32L4_CAN_FA1R_OFFSET); + regval &= ~bitmask; + can_putfreg(priv, STM32L4_CAN_FA1R_OFFSET, regval); + + /* Select the 32-bit scale for the filter */ + + regval = can_getfreg(priv, STM32L4_CAN_FS1R_OFFSET); + regval |= bitmask; + can_putfreg(priv, STM32L4_CAN_FS1R_OFFSET, regval); + + /* There are 14 or 28 filter banks (depending) on the device. Each filter bank is + * composed of two 32-bit registers, CAN_FiR: + */ + + can_putfreg(priv, STM32L4_CAN_FIR_OFFSET(priv->filter, 1), 0); + can_putfreg(priv, STM32L4_CAN_FIR_OFFSET(priv->filter, 2), 0); + + /* Set Id/Mask mode for the filter */ + + regval = can_getfreg(priv, STM32L4_CAN_FM1R_OFFSET); + regval &= ~bitmask; + can_putfreg(priv, STM32L4_CAN_FM1R_OFFSET, regval); + + /* Assign FIFO 0 for the filter */ + + regval = can_getfreg(priv, STM32L4_CAN_FFA1R_OFFSET); + regval &= ~bitmask; + can_putfreg(priv, STM32L4_CAN_FFA1R_OFFSET, regval); + + /* Enable the filter */ + + regval = can_getfreg(priv, STM32L4_CAN_FA1R_OFFSET); + regval |= bitmask; + can_putfreg(priv, STM32L4_CAN_FA1R_OFFSET, regval); + + /* Exit filter initialization mode */ + + regval = can_getfreg(priv, STM32L4_CAN_FMR_OFFSET); + regval &= ~CAN_FMR_FINIT; + can_putfreg(priv, STM32L4_CAN_FMR_OFFSET, regval); + return OK; +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: stm32l4_caninitialize + * + * Description: + * Initialize the selected CAN port + * + * Input Parameter: + * Port number (for hardware that has mutiple CAN interfaces) + * + * Returned Value: + * Valid CAN device structure reference on succcess; a NULL on failure + * + ****************************************************************************/ + +FAR struct can_dev_s *stm32l4_caninitialize(int port) +{ + struct can_dev_s *dev = NULL; + + canvdbg("CAN%d\n", port); + + /* NOTE: Peripherical clocking for CAN1 and/or CAN2 was already provided + * by stm32l4_clockconfig() early in the reset sequence. + */ + +#ifdef CONFIG_STM32L4_CAN1 + if (port == 1) + { + /* Select the CAN1 device structure */ + + dev = &g_can1dev; + + /* Configure CAN1 pins. The ambiguous settings in the stm32*_pinmap.h + * file must have been disambiguated in the board.h file. + */ + + stm32l4_configgpio(GPIO_CAN1_RX); + stm32l4_configgpio(GPIO_CAN1_TX); + } + else +#endif + { + candbg("ERROR: Unsupported port %d\n", port); + return NULL; + } + + return dev; +} + +#endif /* CONFIG_CAN && (CONFIG_STM32L4_CAN1 || CONFIG_STM32L4_CAN2) */ diff --git a/arch/arm/src/stm32l4/stm32l4_can.h b/arch/arm/src/stm32l4/stm32l4_can.h index e69de29bb2d..f9dad5d89fd 100644 --- a/arch/arm/src/stm32l4/stm32l4_can.h +++ b/arch/arm/src/stm32l4/stm32l4_can.h @@ -0,0 +1,143 @@ +/************************************************************************************ + * arch/arm/src/stm32l4/stm32l4_can.h + * + * Copyright (C) 2009, 2011, 2015 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Adaptations for stm32l4: + * Copyright (C) 2016 Sebastien Lorquet. All rights reserved. + * Author: Sebastien Lorquet + * + * 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. + * + ************************************************************************************/ + +#ifndef __ARCH_ARM_SRC_STM32L4_STM32L4_CAN_H +#define __ARCH_ARM_SRC_STM32L4_STM32L4_CAN_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include "chip.h" +#include "chip/stm32l4_can.h" + +#include + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ + +/* Configuration ********************************************************************/ +/* Up to 1 CAN interfaces are supported */ + +#if STM32L4_NCAN < 1 +# undef CONFIG_STM32L4_CAN1 +#endif + +#if defined(CONFIG_CAN) && defined(CONFIG_STM32L4_CAN1) + +/* CAN BAUD */ + +#if defined(CONFIG_STM32L4_CAN1) && !defined(CONFIG_CAN1_BAUD) +# error "CONFIG_CAN1_BAUD is not defined" +#endif + +/* User-defined TSEG1 and TSEG2 settings may be used. + * + * CONFIG_CAN_TSEG1 = the number of CAN time quanta in segment 1 + * CONFIG_CAN_TSEG2 = the number of CAN time quanta in segment 2 + * CAN_BIT_QUANTA = The number of CAN time quanta in on bit time + */ + +#ifndef CONFIG_CAN_TSEG1 +# define CONFIG_CAN_TSEG1 6 +#endif + +#if CONFIG_CAN_TSEG1 < 1 || CONFIG_CAN_TSEG1 > CAN_BTR_TSEG1_MAX +# errror "CONFIG_CAN_TSEG1 is out of range" +#endif + +#ifndef CONFIG_CAN_TSEG2 +# define CONFIG_CAN_TSEG2 7 +#endif + +#if CONFIG_CAN_TSEG2 < 1 || CONFIG_CAN_TSEG2 > CAN_BTR_TSEG2_MAX +# errror "CONFIG_CAN_TSEG2 is out of range" +#endif + +/************************************************************************************ + * Public Types + ************************************************************************************/ + +#ifndef __ASSEMBLY__ + +/************************************************************************************ + * Public Data + ************************************************************************************/ + +#undef EXTERN +#if defined(__cplusplus) +#define EXTERN extern "C" +extern "C" +{ +#else +#define EXTERN extern +#endif + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/**************************************************************************** + * Name: stm32l4_caninitialize + * + * Description: + * Initialize the selected CAN port + * + * Input Parameter: + * Port number (for hardware that has mutiple CAN interfaces) + * + * Returned Value: + * Valid CAN device structure reference on succcess; a NULL on failure + * + ****************************************************************************/ + +struct can_dev_s; +FAR struct can_dev_s *stm32l4_caninitialize(int port); + +#undef EXTERN +#if defined(__cplusplus) +} +#endif + +#endif /* __ASSEMBLY__ */ +#endif /* CONFIG_CAN && CONFIG_STM32L4_CAN1 */ +#endif /* __ARCH_ARM_SRC_STM32L4_STM32L4_CAN_H */ diff --git a/arch/arm/src/stm32l4/stm32l4_i2c.c b/arch/arm/src/stm32l4/stm32l4_i2c.c index 3a394cda750..452b125e361 100644 --- a/arch/arm/src/stm32l4/stm32l4_i2c.c +++ b/arch/arm/src/stm32l4/stm32l4_i2c.c @@ -1,22 +1,14 @@ /************************************************************************************ - * arch/arm/src/stm32l4/stm32f3xx_i2c.c + * arch/arm/src/stm32l4/stm32l4_i2c.c * STM32L4 I2C driver - based on STM32F3 I2C Hardware Layer - Device Driver * * Copyright (C) 2011 Uros Platise. All rights reserved. * Author: Uros Platise - * - * With extensions and modifications for the F1, F2, and F4 by: - * * Copyright (C) 2011-2013, 2016 Gregory Nutt. All rights reserved. * Author: Gregroy Nutt - * - * And this version for the STM32 F3 by - * * Author: John Wharington - * - * Modified for STM32L4 by - * * Author: Sebastien Lorquet + * Author: dev@ziggurat29.com * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -96,6 +88,7 @@ #include "up_arch.h" +#include "stm32l4_gpio.h" #include "stm32l4_rcc.h" #include "stm32l4_i2c.h" #include "stm32l4_waste.h" @@ -103,9 +96,6 @@ /* At least one I2C peripheral must be enabled */ #if defined(CONFIG_STM32L4_I2C1) || defined(CONFIG_STM32L4_I2C2) || defined(CONFIG_STM32L4_I2C3) -/* This implementation is for the STM32 F1, F2, and F4 only */ - -#if defined(CONFIG_STM32L4_STM32F30XX) /************************************************************************************ * Pre-processor Definitions @@ -138,12 +128,10 @@ #endif #define I2C_OUTPUT \ - (GPIO_OUTPUT | GPIO_OUTPUT_SET | GPIO_CNF_OUTOD | GPIO_MODE_50MHz) + (GPIO_OUTPUT | GPIO_OUTPUT_SET | GPIO_OPENDRAIN | GPIO_SPEED_50MHz) #define MKI2C_OUTPUT(p) \ (((p) & (GPIO_PORT_MASK | GPIO_PIN_MASK)) | I2C_OUTPUT) -/* Register setting unique to the STM32F30xx */ - #define I2C_CR1_TXRX \ (I2C_CR1_RXIE | I2C_CR1_TXIE) #define I2C_CR1_ALLINTS \ @@ -246,7 +234,7 @@ struct stm32l4_i2c_priv_s { const struct i2c_ops_s *ops; /* Standard I2C operations */ const struct stm32l4_i2c_config_s *config; /* Port configuration */ - int refs; /* Referernce count */ + int refs; /* Reference count */ sem_t sem_excl; /* Mutual exclusion semaphore */ #ifndef CONFIG_I2C_POLLED sem_t sem_isr; /* Interrupt wait semaphore */ @@ -279,15 +267,10 @@ struct stm32l4_i2c_priv_s * Private Function Prototypes ************************************************************************************/ -static inline uint16_t stm32l4_i2c_getreg(FAR struct stm32l4_i2c_priv_s *priv, - uint8_t offset); -static inline void stm32l4_i2c_putreg(FAR struct stm32l4_i2c_priv_s *priv, uint8_t offset, - uint16_t value); -static inline void stm32l4_i2c_putreg32(FAR struct stm32l4_i2c_priv_s *priv, uint8_t offset, - uint32_t value); -static inline void stm32l4_i2c_modifyreg(FAR struct stm32l4_i2c_priv_s *priv, - uint8_t offset, uint16_t clearbits, - uint16_t setbits); +static inline uint32_t stm32l4_i2c_getreg32(FAR struct stm32l4_i2c_priv_s *priv, + uint8_t offset); +static inline void stm32l4_i2c_putreg32(FAR struct stm32l4_i2c_priv_s *priv, + uint8_t offset, uint32_t value); static inline void stm32l4_i2c_modifyreg32(FAR struct stm32l4_i2c_priv_s *priv, uint8_t offset, uint32_t clearbits, uint32_t setbits); @@ -302,13 +285,14 @@ static inline void stm32l4_i2c_sem_init(FAR struct stm32l4_i2c_priv_s *priv); static inline void stm32l4_i2c_sem_destroy(FAR struct stm32l4_i2c_priv_s *priv); #ifdef CONFIG_I2C_TRACE static void stm32l4_i2c_tracereset(FAR struct stm32l4_i2c_priv_s *priv); -static void stm32l4_i2c_tracenew(FAR struct stm32l4_i2c_priv_s *priv, uint32_t status); +static void stm32l4_i2c_tracenew(FAR struct stm32l4_i2c_priv_s *priv, + uint32_t status); static void stm32l4_i2c_traceevent(FAR struct stm32l4_i2c_priv_s *priv, - enum stm32l4_trace_e event, uint32_t parm); + enum stm32l4_trace_e event, uint32_t parm); static void stm32l4_i2c_tracedump(FAR struct stm32l4_i2c_priv_s *priv); #endif /* CONFIG_I2C_TRACE */ static void stm32l4_i2c_setclock(FAR struct stm32l4_i2c_priv_s *priv, - uint32_t frequency); + uint32_t frequency); static inline void stm32l4_i2c_sendstart(FAR struct stm32l4_i2c_priv_s *priv); static inline void stm32l4_i2c_clrstart(FAR struct stm32l4_i2c_priv_s *priv); static inline void stm32l4_i2c_sendstop(FAR struct stm32l4_i2c_priv_s *priv); @@ -327,8 +311,8 @@ static int stm32l4_i2c3_isr(int irq, void *context); #endif static int stm32l4_i2c_init(FAR struct stm32l4_i2c_priv_s *priv); static int stm32l4_i2c_deinit(FAR struct stm32l4_i2c_priv_s *priv); -static int stm32l4_i2c_transfer(FAR struct i2c_master_s *dev, FAR struct i2c_msg_s *msgs, - int count); +static int stm32l4_i2c_transfer(FAR struct i2c_master_s *dev, + FAR struct i2c_msg_s *msgs, int count); #ifdef CONFIG_I2C_RESET static int stm32l4_i2c_reset(FAR struct i2c_master_s *dev); #endif @@ -351,8 +335,8 @@ const struct i2c_ops_s stm32l4_i2c_ops = static const struct stm32l4_i2c_config_s stm32l4_i2c1_config = { .base = STM32L4_I2C1_BASE, - .clk_bit = RCC_APB1ENR_I2C1EN, - .reset_bit = RCC_APB1RSTR_I2C1RST, + .clk_bit = RCC_APB1ENR1_I2C1EN, + .reset_bit = RCC_APB1RSTR1_I2C1RST, .scl_pin = GPIO_I2C1_SCL, .sda_pin = GPIO_I2C1_SDA, #ifndef CONFIG_I2C_POLLED @@ -441,20 +425,6 @@ struct stm32l4_i2c_priv_s stm32l4_i2c3_priv = * Private Functions ************************************************************************************/ -/************************************************************************************ - * Name: stm32l4_i2c_getreg - * - * Description: - * Get a 16-bit register value by offset - * - ************************************************************************************/ - -static inline uint16_t stm32l4_i2c_getreg(FAR struct stm32l4_i2c_priv_s *priv, - uint8_t offset) -{ - return getreg16(priv->config->base + offset); -} - /************************************************************************************ * Name: stm32l4_i2c_getreg32 * @@ -469,20 +439,6 @@ static inline uint32_t stm32l4_i2c_getreg32(FAR struct stm32l4_i2c_priv_s *priv, return getreg32(priv->config->base + offset); } -/************************************************************************************ - * Name: stm32l4_i2c_putreg - * - * Description: - * Put a 16-bit register value by offset - * - ************************************************************************************/ - -static inline void stm32l4_i2c_putreg(FAR struct stm32l4_i2c_priv_s *priv, uint8_t offset, - uint16_t value) -{ - putreg16(value, priv->config->base + offset); -} - /************************************************************************************ * Name: stm32l4_i2c_putreg32 * @@ -497,21 +453,6 @@ static inline void stm32l4_i2c_putreg32(FAR struct stm32l4_i2c_priv_s *priv, putreg32(value, priv->config->base + offset); } -/************************************************************************************ - * Name: stm32l4_i2c_modifyreg - * - * Description: - * Modify a 16-bit register value by offset - * - ************************************************************************************/ - -static inline void stm32l4_i2c_modifyreg(FAR struct stm32l4_i2c_priv_s *priv, - uint8_t offset, uint16_t clearbits, - uint16_t setbits) -{ - modifyreg16(priv->config->base + offset, clearbits, setbits); -} - /************************************************************************************ * Name: stm32l4_i2c_modifyreg32 * @@ -615,7 +556,6 @@ static inline int stm32l4_i2c_sem_waitdone(FAR struct stm32l4_i2c_priv_s *priv) { struct timespec abstime; irqstate_t flags; - uint32_t regval; int ret; flags = enter_critical_section(); @@ -866,7 +806,7 @@ static inline void stm32l4_i2c_sem_waitstop(FAR struct stm32l4_i2c_priv_s *priv) /* Check for timeout error */ - sr = stm32l4_i2c_getreg(priv, STM32L4_I2C_ISR_OFFSET); + sr = stm32l4_i2c_getreg32(priv, STM32L4_I2C_ISR_OFFSET); if ((sr & I2C_INT_TIMEOUT) != 0) { return; @@ -1065,6 +1005,28 @@ static void stm32l4_i2c_setclock(FAR struct stm32l4_i2c_priv_s *priv, uint32_t f uint8_t scl_h_period; uint8_t scl_l_period; + /* XXX haque; these are the only freqs we support at the moment, until we can + * compute the values ourself. + */ + + if (frequency == 10000) + { + } + else if (frequency == 100000) + { + } + else if (frequency == 400000) + { + } + else + { +#if 1 + frequency = 1000000; +#else + frequency = 500000; +#endif + } + /* Has the I2C bus frequency changed? */ if (frequency != priv->frequency) @@ -1079,41 +1041,101 @@ static void stm32l4_i2c_setclock(FAR struct stm32l4_i2c_priv_s *priv, uint32_t f /* Update timing and control registers */ - /* TODO: speed/timing calcs */ -#warning "check set filters before timing, see RM0316" - - /* values from 100khz at 8mhz i2c clock */ - - /* prescaler */ - /* t_presc= (presc+1)*t_i2cclk */ - /* RM0316 */ + /* TODO: speed/timing calcs, taking into consideration + * STM32L4_PCLK1_FREQUENCY, or SYSCLK, or HSI16 + * clock source, RCC_CCIPR, I2CxSEL, 0 = PCKL, 1 = SCLK, 2 = HSI16, 3 = reserved +#warning "check set filters before timing, see RM0351 35.4.4 p 1112" + * analog filter; suppress spikes up to 50 ns in fast-mode and fast-mode plus + * ANFOFF cr1 + * DNF cr1; 1-15 I2CCLK periods + */ + /* RM0351 35.4.9 p 1140 */ if (frequency == 10000) { - presc = 0x01; - scl_l_period = 0xc7; - scl_h_period = 0xc3; - h_time = 0x02; - s_time = 0x04; +#if 1 + /* 10 KHz values from I2C timing tool with clock 80mhz */ + + presc = 0x0b; /* PRESC - (+1) prescale I2CCLK */ + scl_l_period = 0xff; /* SCLL - SCL low period in master mode */ + scl_h_period = 0xba; /* SCLH - SCL high period in master mode */ + h_time = 0x00; /* SDADEL - (+1) data hold time after SCL falling edge */ + s_time = 0x01; /* SCLDEL - (+1) data setup time from SDA edge to SCL rising edge */ + +#else + /* 10 KHz values from datasheet with clock 8mhz */ + + presc = 0x03; /* PRESC - (+1) prescale I2CCLK */ + scl_l_period = 0xc7; /* SCLL - SCL low period in master mode */ + scl_h_period = 0xc3; /* SCLH - SCL high period in master mode */ + h_time = 0x02; /* SDADEL - (+1) data hold time after SCL falling edge */ + s_time = 0x04; /* SCLDEL - (+1) data setup time from SDA edge to SCL rising edge */ +#endif } else if (frequency == 100000) { - /* values from datasheet with clock 8mhz */ +#if 1 + /* 100 KHz values from I2C timing tool with clock 80mhz */ + + presc = 0x01; /* PRESC - (+1) prescale I2CCLK */ + scl_l_period = 0xe7; /* SCLL - SCL low period in master mode */ + scl_h_period = 0x9b; /* SCLH - SCL high period in master mode */ + h_time = 0x00; /* SDADEL - (+1) data hold time after SCL falling edge */ + s_time = 0x0d; /* SCLDEL - (+1) data setup time from SDA edge to SCL rising edge */ +#else + /* 100 KHz values from datasheet with clock 8mhz */ presc = 0x01; scl_l_period = 0x13; scl_h_period = 0x0f; h_time = 0x02; s_time = 0x04; +#endif } - else + else if (frequency == 400000) { +#if 1 + /* 400 KHz values from I2C timing tool for clock of 80mhz */ + + presc = 0x01; /* PRESC - (+1) prescale I2CCLK */ + scl_l_period = 0x43; /* SCLL - SCL low period in master mode */ + scl_h_period = 0x13; /* SCLH - SCL high period in master mode */ + h_time = 0x00; /* SDADEL - (+1) data hold time after SCL falling edge */ + s_time = 0x07; /* SCLDEL - (+1) data setup time from SDA edge to SCL rising edge */ +#else + /* 400 KHz values from datasheet for clock of 8mhz */ + presc = 0x00; scl_l_period = 0x09; scl_h_period = 0x03; h_time = 0x01; s_time = 0x03; +#endif } + else + { +#if 1 + /* 1000 KHhz values from I2C timing tool for clock of 80mhz */ + + presc = 0x01; /* PRESC - (+1) prescale I2CCLK */ + scl_l_period = 0x14; /* SCLL - SCL low period in master mode */ + scl_h_period = 0x13; /* SCLH - SCL high period in master mode */ + h_time = 0x00; /* SDADEL - (+1) data hold time after SCL falling edge */ + s_time = 0x05; /* SCLDEL - (+1) data setup time from SDA edge to SCL rising edge */ + + frequency = 1000000; +#else + /* 500 KHhz values from datasheet for clock of 8mhz */ + + presc = 0x00; + scl_l_period = 0x06; + scl_h_period = 0x03; + h_time = 0x00; + s_time = 0x01; + + frequency = 500000; +#endif + } uint32_t timingr = (presc << I2C_TIMINGR_PRESC_SHIFT) | @@ -1124,10 +1146,6 @@ static void stm32l4_i2c_setclock(FAR struct stm32l4_i2c_priv_s *priv, uint32_t f stm32l4_i2c_putreg32(priv, STM32L4_I2C_TIMINGR_OFFSET, timingr); - /* Bit 14 of OAR1 must be configured and kept at 1 */ - - stm32l4_i2c_putreg(priv, STM32L4_I2C_OAR1_OFFSET, I2C_OAR1_ONE); - /* Re-enable the peripheral (or not) */ if (pe) @@ -1318,7 +1336,7 @@ static int stm32l4_i2c_isr(struct stm32l4_i2c_priv_s *priv) /* Send a byte */ stm32l4_i2c_traceevent(priv, I2CEVENT_SENDBYTE, priv->dcnt); - stm32l4_i2c_putreg(priv, STM32L4_I2C_TXDR_OFFSET, *priv->ptr++); + stm32l4_i2c_putreg32(priv, STM32L4_I2C_TXDR_OFFSET, *priv->ptr++); priv->dcnt--; } } @@ -1354,7 +1372,7 @@ static int stm32l4_i2c_isr(struct stm32l4_i2c_priv_s *priv) #endif /* Receive a byte */ - *priv->ptr++ = stm32l4_i2c_getreg(priv, STM32L4_I2C_RXDR_OFFSET); + *priv->ptr++ = (uint8_t) stm32l4_i2c_getreg32(priv, STM32L4_I2C_RXDR_OFFSET); /* Disable acknowledge when last byte is to be received */ @@ -1554,9 +1572,9 @@ static int stm32l4_i2c_init(FAR struct stm32l4_i2c_priv_s *priv) /* Enable power and reset the peripheral */ - modifyreg32(STM32L4_RCC_APB1ENR, 0, priv->config->clk_bit); - modifyreg32(STM32L4_RCC_APB1RSTR, 0, priv->config->reset_bit); - modifyreg32(STM32L4_RCC_APB1RSTR, priv->config->reset_bit, 0); + modifyreg32(STM32L4_RCC_APB1ENR1, 0, priv->config->clk_bit); + modifyreg32(STM32L4_RCC_APB1RSTR1, 0, priv->config->reset_bit); + modifyreg32(STM32L4_RCC_APB1RSTR1, priv->config->reset_bit, 0); /* Configure pins */ @@ -1588,8 +1606,8 @@ static int stm32l4_i2c_init(FAR struct stm32l4_i2c_priv_s *priv) priv->frequency = 0; - /* TODO: f303 i2c clock source RCC_CFGR3 */ - /* RCC_CFGR3_I2C1SW (default is HSI clock) */ + /* TODO: i2c clock source RCC_CCIPR */ + /* RCC_CCIPR I2CxSEL (default is PCLK clock) */ stm32l4_i2c_setclock(priv, 100000); @@ -1629,7 +1647,7 @@ static int stm32l4_i2c_deinit(FAR struct stm32l4_i2c_priv_s *priv) /* Disable clocking */ - modifyreg32(STM32L4_RCC_APB1ENR, priv->config->clk_bit, 0); + modifyreg32(STM32L4_RCC_APB1ENR1, priv->config->clk_bit, 0); return OK; } @@ -1713,8 +1731,8 @@ static int stm32l4_i2c_transfer(FAR struct i2c_master_s *dev, FAR struct i2c_msg status = stm32l4_i2c_getstatus(priv); ret = -ETIMEDOUT; - i2cdbg("Timed out: CR1: %04x status: %08x\n", - stm32l4_i2c_getreg(priv, STM32L4_I2C_CR1_OFFSET), status); + i2cdbg("Timed out: CR1: %08x status: %08x\n", + stm32l4_i2c_getreg32(priv, STM32L4_I2C_CR1_OFFSET), status); /* "Note: When the STOP, START or PEC bit is set, the software must * not perform any write access to I2C_CR1 before this bit is @@ -1836,6 +1854,7 @@ static int stm32l4_i2c_transfer(FAR struct i2c_master_s *dev, FAR struct i2c_msg #ifdef CONFIG_I2C_RESET static int stm32l4_i2c_reset(FAR struct i2c_master_s * dev) { + FAR struct stm32l4_i2c_priv_s *priv = (struct stm32l4_i2c_priv_s *)dev; unsigned int clock_count; unsigned int stretch_count; uint32_t scl_gpio; @@ -1962,7 +1981,7 @@ out: FAR struct i2c_master_s *stm32l4_i2cbus_initialize(int port) { struct stm32l4_i2c_priv_s * priv = NULL; /* private data of device with multiple instances */ - irqtate_t flags; + irqstate_t flags; #if STM32L4_PCLK1_FREQUENCY < 4000000 # warning STM32L4_I2C_INIT: Peripheral clock must be at least 4 MHz to support 400 kHz operation. @@ -2054,6 +2073,5 @@ int stm32l4_i2cbus_uninitialize(FAR struct i2c_master_s * dev) return OK; } -#endif /* CONFIG_STM32L4_STM32F30XX */ #endif /* CONFIG_STM32L4_I2C1 || CONFIG_STM32L4_I2C2 || CONFIG_STM32L4_I2C3 */ diff --git a/arch/arm/src/stm32l4/stm32l4_serial.c b/arch/arm/src/stm32l4/stm32l4_serial.c index 8f68409dba5..f29a229992e 100644 --- a/arch/arm/src/stm32l4/stm32l4_serial.c +++ b/arch/arm/src/stm32l4/stm32l4_serial.c @@ -208,6 +208,22 @@ # define PM_IDLE_DOMAIN 0 /* Revisit */ #endif +/* Keep track if a Break was set + * + * Note: + * + * 1) This value is set in the priv->ie but never written to the control + * register. It must not collide with USART_CR1_USED_INTS or USART_CR3_EIE + * 2) USART_CR3_EIE is also carried in the up_dev_s ie member. + * + * See up_restoreusartint where the masking is done. + */ + +#ifdef CONFIG_STM32L4_SERIALBRK_BSDCOMPAT +# define USART_CR1_IE_BREAK_INPROGRESS_SHFTS 15 +# define USART_CR1_IE_BREAK_INPROGRESS (1 << USART_CR1_IE_BREAK_INPROGRESS_SHFTS) +#endif + #ifdef USE_SERIALDRIVER #ifdef HAVE_UART @@ -1560,11 +1576,12 @@ static int up_interrupt_common(struct up_dev_s *priv) static int up_ioctl(struct file *filep, int cmd, unsigned long arg) { -#if defined(CONFIG_SERIAL_TERMIOS) || defined(CONFIG_SERIAL_TIOCSERGSTRUCT) +#if defined(CONFIG_SERIAL_TERMIOS) || defined(CONFIG_SERIAL_TIOCSERGSTRUCT) \ + || defined(CONFIG_STM32F7_SERIALBRK_BSDCOMPAT) struct inode *inode = filep->f_inode; struct uart_dev_s *dev = inode->i_private; #endif -#ifdef CONFIG_SERIAL_TERMIOS +#if defined(CONFIG_SERIAL_TERMIOS) || defined(CONFIG_STM32F7_SERIALBRK_BSDCOMPAT) struct up_dev_s *priv = (struct up_dev_s *)dev->priv; #endif int ret = OK; @@ -1720,30 +1737,74 @@ static int up_ioctl(struct file *filep, int cmd, unsigned long arg) break; #endif /* CONFIG_SERIAL_TERMIOS */ -#ifdef CONFIG_USART_BREAKS +#ifdef CONFIG_STM32L4_USART_BREAKS +# ifdef CONFIG_STM32L4_SERIALBRK_BSDCOMPAT case TIOCSBRK: /* BSD compatibility: Turn break on, unconditionally */ { - uint32_t cr2; irqstate_t flags; + uint32_t tx_break; flags = enter_critical_section(); - cr2 = up_serialin(priv, STM32L4_USART_CR2_OFFSET); - up_serialout(priv, STM32L4_USART_CR2_OFFSET, cr2 | USART_CR2_LINEN); + + /* Disable any further tx activity */ + + priv->ie |= USART_CR1_IE_BREAK_INPROGRESS; + + up_txint(dev, false); + + /* Configure TX as a GPIO output pin and Send a break signal*/ + + tx_break = GPIO_OUTPUT | (~(GPIO_MODE_MASK|GPIO_OUTPUT_SET) & priv->tx_gpio); + stm32_configgpio(tx_break); + leave_critical_section(flags); } break; case TIOCCBRK: /* BSD compatibility: Turn break off, unconditionally */ { - uint32_t cr2; irqstate_t flags; flags = enter_critical_section(); - cr2 = up_serialin(priv, STM32L4_USART_CR2_OFFSET); - up_serialout(priv, STM32L4_USART_CR2_OFFSET, cr2 & ~USART_CR2_LINEN); + + /* Configure TX back to U(S)ART */ + + stm32_configgpio(priv->tx_gpio); + + priv->ie &= ~USART_CR1_IE_BREAK_INPROGRESS; + + /* Enable further tx activity */ + + up_txint(dev, true); + leave_critical_section(flags); } break; +# else + case TIOCSBRK: /* No BSD compatibility: Turn break on for M bit times */ + { + uint32_t cr1; + irqstate_t flags; + + flags = enter_critical_section(); + cr1 = up_serialin(priv, STM32_USART_CR1_OFFSET); + up_serialout(priv, STM32_USART_CR1_OFFSET, cr1 | USART_CR1_SBK); + leave_critical_section(flags); + } + break; + + case TIOCCBRK: /* No BSD compatibility: May turn off break too soon */ + { + uint32_t cr1; + irqstate_t flags; + + flags = enter_critical_section(); + cr1 = up_serialin(priv, STM32_USART_CR1_OFFSET); + up_serialout(priv, STM32_USART_CR1_OFFSET, cr1 & ~USART_CR1_SBK); + leave_critical_section(flags); + } + break; +# endif #endif default: @@ -2133,6 +2194,13 @@ static void up_txint(struct uart_dev_s *dev, bool enable) } # endif +# ifdef CONFIG_STM32L4_SERIALBRK_BSDCOMPAT + if (priv->ie & USART_CR1_IE_BREAK_INPROGRESS) + { + return; + } +# endif + up_restoreusartint(priv, ie); /* Fake a TX interrupt here by just calling uart_xmitchars() with diff --git a/arch/arm/src/str71x/Kconfig b/arch/arm/src/str71x/Kconfig index 2b8bc7278ff..db945aaf599 100644 --- a/arch/arm/src/str71x/Kconfig +++ b/arch/arm/src/str71x/Kconfig @@ -80,25 +80,25 @@ config STR71X_UART0 bool "UART0" default n select STR71X_GPIO0 - select ARCH_HAVE_UART0 + select UART0_SERIALDRIVER config STR71X_UART1 bool "UART1" default n select STR71X_GPIO0 - select ARCH_HAVE_UART1 + select UART1_SERIALDRIVER config STR71X_UART2 bool "UART2" default n select STR71X_GPIO0 - select ARCH_HAVE_UART2 + select UART2_SERIALDRIVER config STR71X_UART3 bool "UART3" default n select STR71X_GPIO0 - select ARCH_HAVE_UART3 + select UART3_SERIALDRIVER config STR71X_USB bool "USB" diff --git a/arch/arm/src/tiva/Kconfig b/arch/arm/src/tiva/Kconfig index 96b82a46913..20be1413092 100644 --- a/arch/arm/src/tiva/Kconfig +++ b/arch/arm/src/tiva/Kconfig @@ -414,48 +414,48 @@ config TIVA_I2C9 config TIVA_UART0 bool "UART0" - select ARCH_HAVE_UART0 + select UART0_SERIALDRIVER default n config TIVA_UART1 bool "UART1" - select ARCH_HAVE_UART1 + select UART1_SERIALDRIVER default n config TIVA_UART2 bool "UART2" - select ARCH_HAVE_UART2 + select UART2_SERIALDRIVER default n config TIVA_UART3 bool "UART3" default n depends on TIVA_HAVE_UART3 - select ARCH_HAVE_UART3 + select UART3_SERIALDRIVER config TIVA_UART4 bool "UART4" default n depends on TIVA_HAVE_UART4 - select ARCH_HAVE_UART4 + select UART4_SERIALDRIVER config TIVA_UART5 bool "UART5" default n depends on TIVA_HAVE_UART5 - select ARCH_HAVE_UART5 + select UART5_SERIALDRIVER config TIVA_UART6 bool "UART6" default n depends on TIVA_HAVE_UART6 - select ARCH_HAVE_UART6 + select UART6_SERIALDRIVER config TIVA_UART7 bool "UART7" default n depends on TIVA_HAVE_UART7 - select ARCH_HAVE_UART7 + select UART7_SERIALDRIVER config TIVA_SSI0 bool "SSI0" diff --git a/arch/arm/src/tiva/tiva_adc.h b/arch/arm/src/tiva/tiva_adc.h index c6fc9ac2e07..693252ad35d 100644 --- a/arch/arm/src/tiva/tiva_adc.h +++ b/arch/arm/src/tiva/tiva_adc.h @@ -125,32 +125,32 @@ struct tiva_adc_step_cfg_s { - uint8_t adc; /* Parent peripheral */ - uint8_t sse; /* Parent sample sequencer (SSE) */ - uint8_t step; /* Which step in the sequencer */ - uint8_t shold; /* Sample and hold time */ - uint8_t flags; /* Last step? Interrupt enabled? - * Internal temperature sensor? */ - uint8_t ain; /* Which analog input */ + uint8_t adc; /* Parent peripheral */ + uint8_t sse; /* Parent sample sequencer (SSE) */ + uint8_t step; /* Which step in the sequencer */ + uint8_t shold; /* Sample and hold time */ + uint8_t flags; /* Last step? Interrupt enabled? + * Internal temperature sensor? */ + uint8_t ain; /* Which analog input */ }; /* Sample Sequencer configuration options */ struct tiva_adc_sse_cfg_s { - uint8_t priority; /* Conversion priority, 0-3 no duplicates */ - uint8_t trigger; /* Trigger source */ + uint8_t priority; /* Conversion priority, 0-3 no duplicates */ + uint8_t trigger; /* Trigger source */ }; /* ADC peripheral configuration options */ struct tiva_adc_cfg_s { - uint8_t adc; /* ADC peripheral number */ - bool sse[4]; /* active SSEs in a bitmask */ - struct tiva_adc_sse_cfg_s ssecfg[4]; /* SSE configuration */ - uint8_t steps; /* Size of the stepcfg array */ - struct tiva_adc_step_cfg_s *stepcfg; /* Step configuration array */ + uint8_t adc; /* ADC peripheral number */ + bool sse[4]; /* active SSEs in a bitmask */ + struct tiva_adc_sse_cfg_s ssecfg[4]; /* SSE configuration */ + uint8_t steps; /* Size of the stepcfg array */ + struct tiva_adc_step_cfg_s *stepcfg; /* Step configuration array */ }; /**************************************************************************** @@ -165,16 +165,11 @@ extern "C" #define EXTERN extern #endif -/**************************************************************************** - * Inline Functions - ****************************************************************************/ - /**************************************************************************** * Public Function Prototypes ****************************************************************************/ -/* Only allow access to upper level ADC drivers if they are enabled */ -#ifdef CONFIG_ADC +#ifdef CONFIG_TIVA_ADC /**************************************************************************** * Driver Function Prototypes @@ -228,7 +223,7 @@ void tiva_adc_lock(FAR struct tiva_adc_s *priv, int sse); void tiva_adc_unlock(FAR struct tiva_adc_s *priv, int sse); -#endif /* CONFIG_ADC */ +#endif /* CONFIG_TIVA_ADC */ /**************************************************************************** * Library Function Prototypes diff --git a/arch/arm/src/tiva/tiva_adclow.c b/arch/arm/src/tiva/tiva_adclow.c index 7b2f8e2d9d0..7a0b5509ce9 100644 --- a/arch/arm/src/tiva/tiva_adclow.c +++ b/arch/arm/src/tiva/tiva_adclow.c @@ -1,8 +1,10 @@ /**************************************************************************** * arch/arm/src/tiva/tiva_adclow.c * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. * Copyright (C) 2015 TRD2 Inc. All rights reserved. * Author: Calvin Maguranis + * Gregory Nutt * * References: * @@ -67,8 +69,8 @@ #include #include #include -#include #include +#include #include @@ -80,7 +82,7 @@ #include "chip/tiva_pinmap.h" #include "chip/tiva_syscontrol.h" -#if defined (CONFIG_TIVA_ADC) && defined (CONFIG_ADC) +#ifdef CONFIG_TIVA_ADC /**************************************************************************** * Pre-processor Definitions @@ -135,6 +137,8 @@ /* Upper level ADC driver ***************************************************/ +static int tiva_adc_bind(FAR struct adc_dev_s *dev, + FAR const struct adc_callback_s *callback); static void tiva_adc_reset(struct adc_dev_s *dev); static int tiva_adc_setup(struct adc_dev_s *dev); static void tiva_adc_shutdown(struct adc_dev_s *dev); @@ -149,6 +153,7 @@ static int tiva_adc_ioctl(struct adc_dev_s *dev, int cmd, unsigned long arg); static const struct adc_ops_s g_adcops = { + .ao_bind = tiva_adc_bind, .ao_reset = tiva_adc_reset, .ao_setup = tiva_adc_setup, .ao_shutdown = tiva_adc_shutdown, @@ -163,6 +168,7 @@ static const struct adc_ops_s g_adcops = struct tiva_adc_s { struct adc_dev_s *dev; + const struct adc_callback_s *cb; bool cfg; /* Configuration state */ bool ena; /* Operation state */ uint8_t devno; /* ADC device number */ @@ -373,6 +379,25 @@ static void tiva_adc_irqinitialize(struct tiva_adc_cfg_s *cfg) #endif } +/**************************************************************************** + * Name: tiva_adc_bind + * + * Description: + * Bind the upper-half driver callbacks to the lower-half implementation. This + * must be called early in order to receive ADC event notifications. + * + ****************************************************************************/ + +static int tiva_adc_bind(FAR struct adc_dev_s *dev, + FAR const struct adc_callback_s *callback) +{ + struct tiva_adc_s *priv = (struct tiva_adc_s *)dev->ad_priv; + + DEBUGASSERT(priv != NULL); + priv->cb = callback; + return OK; +} + /**************************************************************************** * Name: tiva_adc_reset * @@ -559,11 +584,20 @@ static int tiva_adc_ioctl(struct adc_dev_s *dev, int cmd, unsigned long arg) fifo_count = tiva_adc_sse_data(priv->devno, sse, buf); - for (i = 0; i < fifo_count; ++i) + /* Verify that the upper-half driver has bound its callback functions */ + + if (priv->cb != NULL) { - (void)adc_receive(dev, - tiva_adc_get_ain(priv->devno, sse, i), - buf[i]); + DEBUGASSERT(priv->cb->au_receive != NULL); + + for (i = 0; i < fifo_count; ++i) + { + /* Perform the data received callback */ + + priv->cb->au_receive(dev, + tiva_adc_get_ain(priv->devno, sse, i), + buf[i]); + } } /* Release our lock on the ADC structure */ @@ -651,18 +685,28 @@ static void tiva_adc_read(void *arg) /* This is a serious error: indicates invalid pointer indirection * and should cause a full system stop. */ + alldbg("PANIC!!! Invalid ADC device number given %d\n", sse->adc); PANIC(); return; } - for (i = 0; i < fifo_count; ++i) + /* Verify that the upper-half driver has bound its callback functions */ + + if (priv->cb != NULL) { - (void)adc_receive(dev, - tiva_adc_get_ain(sse->adc, sse->num, i), - buf[i]); - avdbg("AIN%d=0x%04x\n", - tiva_adc_get_ain(sse->adc, sse->num, i), buf[i]); + DEBUGASSERT(priv->cb->au_receive != NULL); + + for (i = 0; i < fifo_count; ++i) + { + /* Perform the data received callback */ + + priv->cb->au_receive(dev, + tiva_adc_get_ain(sse->adc, sse->num, i), + buf[i]); + avdbg("AIN%d = 0x%04x\n", + tiva_adc_get_ain(sse->adc, sse->num, i), buf[i]); + } } /* Exit, re-enabling ADC interrupts */ @@ -858,6 +902,7 @@ int tiva_adc_initialize(const char *devpath, struct tiva_adc_cfg_s *cfg, /* Now we are initialized */ adc->ena = true; + adc->cb = NULL; #ifdef CONFIG_DEBUG_ANALOG tiva_adc_runtimeobj_vals(); @@ -1041,4 +1086,4 @@ static void tiva_adc_dump_dev(void) } #endif -#endif /* CONFIG_TIVA_ADC && CONFIG_ADC */ +#endif /* CONFIG_TIVA_ADC */ diff --git a/arch/arm/src/tms570/Kconfig b/arch/arm/src/tms570/Kconfig index 81136d3e339..7c2f6a8bf85 100644 --- a/arch/arm/src/tms570/Kconfig +++ b/arch/arm/src/tms570/Kconfig @@ -88,14 +88,14 @@ config TMS570_MIBASPI1 config TMS570_SCI1 bool "Serial Communication Interface 1 (SCI1)" default n - select ARCH_HAVE_SCI1 + select SCI1_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config TMS570_SCI2 bool "Serial Communication Interface 2 (SCI2)" default n depends on TMS570_HAVE_SCI2 - select ARCH_HAVE_SCI1 + select SCI1_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS endmenu # TMS570 Peripheral Support diff --git a/arch/avr/src/Makefile b/arch/avr/src/Makefile index 2905a755652..84c19eca52a 100644 --- a/arch/avr/src/Makefile +++ b/arch/avr/src/Makefile @@ -1,7 +1,7 @@ ############################################################################ # arch/avr/src/Makefile # -# Copyright (C) 2010-2012, 2014 Gregory Nutt. All rights reserved. +# Copyright (C) 2010-2012, 2014, 2016 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -83,6 +83,11 @@ COBJS = $(CSRCS:.c=$(OBJEXT)) SRCS = $(ASRCS) $(CSRCS) OBJS = $(AOBJS) $(COBJS) +# Override in Make.defs if linker is not 'ld' + +LDSTARTGROUP ?= --start-group +LDENDGROUP ?= --end-group + LDFLAGS += $(ARCHSCRIPT) EXTRA_LIBS ?= LINKLIBS ?= @@ -139,7 +144,7 @@ board/libboard$(LIBEXT): nuttx$(EXEEXT): $(HEAD_OBJ) board/libboard$(LIBEXT) @echo "LD: nuttx" $(Q) $(LD) --entry=__start $(LDFLAGS) $(LIBPATHS) -o $(NUTTX) $(HEAD_OBJ) $(EXTRA_OBJS) \ - --start-group $(LDLIBS) $(EXTRA_LIBS) $(LIBGCC) --end-group + $(LDSTARTGROUP) $(LDLIBS) $(EXTRA_LIBS) $(LIBGCC) $(LDENDGROUP) ifneq ($(CONFIG_WINDOWS_NATIVE),y) $(Q) $(NM) $(NUTTX) | \ grep -v '\(compiled\)\|\(\$(OBJEXT)$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \ diff --git a/arch/avr/src/at32uc3/Kconfig b/arch/avr/src/at32uc3/Kconfig index d12c0ad17de..4f244e530cb 100644 --- a/arch/avr/src/at32uc3/Kconfig +++ b/arch/avr/src/at32uc3/Kconfig @@ -73,18 +73,15 @@ menu "AT32U3 Peripheral Selections" config AVR32_USART0 bool "USART0" default n - select ARCH_HAVE_USART0 config AVR32_USART1 bool "USART1" default n - select ARCH_HAVE_USART1 config AVR32_USART2 bool "USART2" default n depends on ARCH_CHIP_AT32UC3B0 - select ARCH_HAVE_USART2 endmenu # AT32U3 Peripheral Selections @@ -108,7 +105,7 @@ config AVR32_USART0_MODEM config AVR32_USART0_RS232 bool "USART0 is RS-232" - select USART0_ISUART + select USART0_SERIALDRIVER config AVR32_USART0_RS485 bool "USART0 is RS-485" @@ -140,7 +137,7 @@ config AVR32_USART1_MODEM config AVR32_USART1_RS232 bool "USART1 is RS-232" - select USART1_ISUART + select USART1_SERIALDRIVER config AVR32_USART1_RS485 bool "USART1 is RS-485" @@ -172,7 +169,7 @@ config AVR32_USART2_MODEM config AVR32_USART2_RS232 bool "USART2 is RS-232" - select USART2_ISUART + select USART2_SERIALDRIVER config AVR32_USART2_RS485 bool "USART2 is RS-485" diff --git a/arch/avr/src/at90usb/Kconfig b/arch/avr/src/at90usb/Kconfig index 6481e6973f0..cef96598288 100644 --- a/arch/avr/src/at90usb/Kconfig +++ b/arch/avr/src/at90usb/Kconfig @@ -41,7 +41,7 @@ config AVR_SPI config AVR_USART1 bool "USART1" default n - select ARCH_HAVE_USART1 + select USART1_SERIALDRIVER config AVR_USBDEV bool "USB device" diff --git a/arch/avr/src/atmega/Kconfig b/arch/avr/src/atmega/Kconfig index 8c3d6c01456..2d2c4d813a9 100644 --- a/arch/avr/src/atmega/Kconfig +++ b/arch/avr/src/atmega/Kconfig @@ -31,11 +31,11 @@ menu "ATMega Peripheral Selections" config AVR_USART0 bool "USART0" - select ARCH_HAVE_USART0 + select USART0_SERIALDRIVER config AVR_USART1 bool "USART1" - select ARCH_HAVE_USART1 + select USART1_SERIALDRIVER endmenu # ATMega Peripheral Selections diff --git a/arch/hc/src/Makefile b/arch/hc/src/Makefile index fb165188fe1..efe3876f18c 100644 --- a/arch/hc/src/Makefile +++ b/arch/hc/src/Makefile @@ -1,7 +1,7 @@ ############################################################################ # arch/hc/src/Makefile # -# Copyright (C) 2009, 2011-2012, 2014 Gregory Nutt. All rights reserved. +# Copyright (C) 2009, 2011-2012, 2014, 2016 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -83,6 +83,11 @@ COBJS = $(CSRCS:.c=$(OBJEXT)) SRCS = $(ASRCS) $(CSRCS) OBJS = $(AOBJS) $(COBJS) +# Override in Make.defs if linker is not 'ld' + +LDSTARTGROUP ?= --start-group +LDENDGROUP ?= --end-group + LDFLAGS += $(ARCHSCRIPT) EXTRA_LIBS ?= LINKLIBS ?= @@ -138,7 +143,7 @@ board/libboard$(LIBEXT): nuttx$(EXEEXT): $(HEAD_OBJ) board/libboard$(LIBEXT) $(Q) echo "LD: nuttx" $(Q) $(LD) --entry=__start $(LDFLAGS) $(LIBPATHS) -o $(NUTTX)$(EXEEXT) $(HEAD_OBJ) \ - --start-group $(LDLIBS) $(EXTRA_LIBS) $(LIBGCC) --end-group + $(LDSTARTGROUP) $(LDLIBS) $(EXTRA_LIBS) $(LIBGCC) $(LDENDGROUP) ifneq ($(CONFIG_WINDOWS_NATIVE),y) $(Q) $(NM) $(NUTTX)$(EXEEXT) | \ grep -v '\(compiled\)\|\(\$(OBJEXT)$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \ diff --git a/arch/hc/src/m9s12/Kconfig b/arch/hc/src/m9s12/Kconfig index cd70fc9814a..9e05745e49c 100644 --- a/arch/hc/src/m9s12/Kconfig +++ b/arch/hc/src/m9s12/Kconfig @@ -11,12 +11,12 @@ menu "M9S12 Peripheral Selection" config HCS12_SCI0 bool "SCI0" default n - select ARCH_HAVE_SCI0 + select SCI0_SERIALDRIVER config HCS12_SCI1 bool "SCI1" default n - select ARCH_HAVE_SCI1 + select SCI1_SERIALDRIVER endmenu # M9S12 Peripheral Selection diff --git a/arch/mips/src/Makefile b/arch/mips/src/Makefile index a746fd22301..9efc9af5776 100644 --- a/arch/mips/src/Makefile +++ b/arch/mips/src/Makefile @@ -1,7 +1,7 @@ ############################################################################ # arch/mips/src/Makefile # -# Copyright (C) 2011-2012, 2014 Gregory Nutt. All rights reserved. +# Copyright (C) 2011-2012, 2014, 2016 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -80,6 +80,11 @@ COBJS = $(CSRCS:.c=$(OBJEXT)) SRCS = $(ASRCS) $(CSRCS) OBJS = $(AOBJS) $(COBJS) +# Override in Make.defs if linker is not 'ld' + +LDSTARTGROUP ?= --start-group +LDENDGROUP ?= --end-group + LDFLAGS += $(ARCHSCRIPT) EXTRA_LIBS ?= LINKLIBS ?= @@ -136,7 +141,7 @@ board/libboard$(LIBEXT): nuttx$(EXEEXT): $(HEAD_OBJ) board/libboard$(LIBEXT) @echo "LD: nuttx" $(Q) $(LD) --entry=__start $(LDFLAGS) $(LIBPATHS) -o $(NUTTX)$(EXEEXT) $(HEAD_OBJ) $(EXTRA_OBJS) \ - --start-group $(LDLIBS) $(EXTRA_LIBS) $(LIBGCC) --end-group + $(LDSTARTGROUP) $(LDLIBS) $(EXTRA_LIBS) $(LIBGCC) $(LDENDGROUP) ifneq ($(CONFIG_WINDOWS_NATIVE),y) $(Q) $(NM) $(NUTTX)$(EXEEXT) | \ grep -v '\(compiled\)\|\(\$(OBJEXT)$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \ diff --git a/arch/mips/src/pic32mx/Kconfig b/arch/mips/src/pic32mx/Kconfig index 6d8894bf624..3da65ead359 100644 --- a/arch/mips/src/pic32mx/Kconfig +++ b/arch/mips/src/pic32mx/Kconfig @@ -579,37 +579,37 @@ config PIC32MX_SPI4 config PIC32MX_UART1 bool "UART1" default n - select ARCH_HAVE_UART1 + select UART1_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config PIC32MX_UART2 bool "UART2" default n - select ARCH_HAVE_UART2 + select UART2_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config PIC32MX_UART3 bool "UART3" default n - select ARCH_HAVE_UART3 + select UART3_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config PIC32MX_UART4 bool "UART4" default n - select ARCH_HAVE_UART4 + select UART4_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config PIC32MX_UART5 bool "UART5" default n - select ARCH_HAVE_UART5 + select UART5_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config PIC32MX_UART6 bool "UART6" default n - select ARCH_HAVE_UART6 + select UART6_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config PIC32MX_ADC diff --git a/arch/mips/src/pic32mz/Kconfig b/arch/mips/src/pic32mz/Kconfig index bca6f2b7644..ac412b6dc52 100644 --- a/arch/mips/src/pic32mz/Kconfig +++ b/arch/mips/src/pic32mz/Kconfig @@ -172,37 +172,37 @@ config PIC32MZ_SPI6 config PIC32MZ_UART1 bool "UART1" default n - select ARCH_HAVE_UART1 + select UART1_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config PIC32MZ_UART2 bool "UART2" default n - select ARCH_HAVE_UART2 + select UART2_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config PIC32MZ_UART3 bool "UART3" default n - select ARCH_HAVE_UART3 + select UART3_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config PIC32MZ_UART4 bool "UART4" default n - select ARCH_HAVE_UART4 + select UART4_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config PIC32MZ_UART5 bool "UART5" default n - select ARCH_HAVE_UART5 + select UART5_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config PIC32MZ_UART6 bool "UART6" default n - select ARCH_HAVE_UART6 + select UART6_SERIALDRIVER select ARCH_HAVE_SERIAL_TERMIOS config PIC32MZ_ADC diff --git a/arch/rgmp/src/Makefile b/arch/rgmp/src/Makefile index 1fb3618d96f..4fe3bbfbfd9 100644 --- a/arch/rgmp/src/Makefile +++ b/arch/rgmp/src/Makefile @@ -1,7 +1,7 @@ ############################################################################ # arch/rgmp/src/Makefile # -# Copyright (C) 2011-2012, 2014 Gregory Nutt. All rights reserved. +# Copyright (C) 2011-2012, 2014, 2016 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -39,25 +39,30 @@ include $(CONFIG_RGMP_SUBARCH)/Make.defs RGMP_ARCH_ASRCS := $(addprefix $(CONFIG_RGMP_SUBARCH)/,$(RGMP_ARCH_ASRCS)) RGMP_ARCH_CSRCS := $(addprefix $(CONFIG_RGMP_SUBARCH)/,$(RGMP_ARCH_CSRCS)) -CPPFLAGS += -I$(TOPDIR)/sched -I$(TOPDIR)/fs $(EXTRADEFINES) -CFLAGS += -I$(TOPDIR)/sched -I$(TOPDIR)/fs $(EXTRADEFINES) -CXXFLAGS += -I$(TOPDIR)/sched -I$(TOPDIR)/fs $(EXTRADEFINES) +CPPFLAGS += -I$(TOPDIR)/sched -I$(TOPDIR)/fs $(EXTRADEFINES) +CFLAGS += -I$(TOPDIR)/sched -I$(TOPDIR)/fs $(EXTRADEFINES) +CXXFLAGS += -I$(TOPDIR)/sched -I$(TOPDIR)/fs $(EXTRADEFINES) -ASRCS = $(RGMP_ARCH_ASRCS) -CSRCS = nuttx.c cxx.c $(RGMP_ARCH_CSRCS) -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +ASRCS = $(RGMP_ARCH_ASRCS) +CSRCS = nuttx.c cxx.c $(RGMP_ARCH_CSRCS) +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) -SRCS = $(ASRCS) $(CSRCS) -OBJS = $(AOBJS) $(COBJS) +SRCS = $(ASRCS) $(CSRCS) +OBJS = $(AOBJS) $(COBJS) -LINKSRCS = rgmp.c bridge.c -LINKOBJS = $(LINKSRCS:.c=$(OBJEXT)) +LINKSRCS = rgmp.c bridge.c +LINKOBJS = $(LINKSRCS:.c=$(OBJEXT)) -LDFLAGS += -T$(RGMPLKSCPT) -LDLIBS = $(patsubst %.a,%,$(patsubst lib%,-l%,$(LINKLIBS))) -LIBPATHS += -L"$(TOPDIR)/lib" -L$(RGMPLIBDIR) -LDLIBS += -lrgmp $(shell "$(CC)" -print-libgcc-file-name) +# Override in Make.defs if linker is not 'ld' + +LDSTARTGROUP ?= --start-group +LDENDGROUP ?= --end-group + +LDFLAGS += -T$(RGMPLKSCPT) +LDLIBS = $(patsubst %.a,%,$(patsubst lib%,-l%,$(LINKLIBS))) +LIBPATHS += -L"$(TOPDIR)/lib" -L$(RGMPLIBDIR) +LDLIBS += -lrgmp $(shell "$(CC)" -print-libgcc-file-name) all: libarch$(LIBEXT) @@ -79,7 +84,7 @@ libarch$(LIBEXT): $(OBJS) nuttx$(EXEEXT): $(LINKOBJS) @echo "LD: nuttx$(EXEEXT)" - @$(LD) $(LDFLAGS) $(LIBPATHS) $(LINKOBJS) --start-group $(LDLIBS) $(EXTRA_LIBS) --end-group -o $(TOPDIR)/$@ + @$(LD) $(LDFLAGS) $(LIBPATHS) $(LINKOBJS) $(LDSTARTGROUP) $(LDLIBS) $(EXTRA_LIBS) $(LDENDGROUP) -o $(TOPDIR)/$@ @$(OBJDUMP) -S $(TOPDIR)/$@ > $(TOPDIR)/nuttx.asm @$(NM) -n $(TOPDIR)/$@ > $(TOPDIR)/nuttx.sym @$(OBJCOPY) -S -O binary $(TOPDIR)/$@ nuttx.img diff --git a/arch/sh/src/Makefile b/arch/sh/src/Makefile index 967818df2a8..81e0b5b8c14 100644 --- a/arch/sh/src/Makefile +++ b/arch/sh/src/Makefile @@ -1,7 +1,7 @@ ############################################################################ # arch/sh/src/Makefile # -# Copyright (C) 2008, 2011-2012, 2014 Gregory Nutt. All rights reserved. +# Copyright (C) 2008, 2011-2012, 2014, 2016 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -78,6 +78,11 @@ COBJS = $(CSRCS:.c=$(OBJEXT)) SRCS = $(ASRCS) $(CSRCS) OBJS = $(AOBJS) $(COBJS) +# Override in Make.defs if linker is not 'ld' + +LDSTARTGROUP ?= --start-group +LDENDGROUP ?= --end-group + LDFLAGS += $(ARCHSCRIPT) EXTRA_LIBS ?= LINKLIBS ?= @@ -134,7 +139,7 @@ board/libboard$(LIBEXT): nuttx$(EXEEXT): $(HEAD_OBJ) board/libboard$(LIBEXT) @echo "LD: nuttx" $(Q) $(LD) --entry=__start $(LDFLAGS) $(LIBPATHS) -o $(TOPDIR)/$@ $(HEAD_OBJ) \ - --start-group $(LDLIBS) $(EXTRA_LIBS) $(LIBGCC) --end-group + $(LDSTARTGROUP) $(LDLIBS) $(EXTRA_LIBS) $(LIBGCC) $(LDENDGROUP) ifneq ($(CONFIG_WINDOWS_NATIVE),y) $(Q) $(NM) $(TOPDIR)/$@ | \ grep -v '\(compiled\)\|\(\$(OBJEXT)$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \ diff --git a/arch/sh/src/m16c/Kconfig b/arch/sh/src/m16c/Kconfig index e1f81d0727b..f70092dfa22 100644 --- a/arch/sh/src/m16c/Kconfig +++ b/arch/sh/src/m16c/Kconfig @@ -7,17 +7,17 @@ if ARCH_M16C config M16C_UART0 bool "UART0" - select ARCH_HAVE_UART0 + select UART0_SERIALDRIVER default n config M16C_UART1 bool "UART1" - select ARCH_HAVE_UART1 + select UART1_SERIALDRIVER default n config M16C_UART2 bool "UART2" - select ARCH_HAVE_UART2 + select UART2_SERIALDRIVER default n endif diff --git a/arch/sh/src/sh1/Kconfig b/arch/sh/src/sh1/Kconfig index f3002c37370..2d0723b42b2 100644 --- a/arch/sh/src/sh1/Kconfig +++ b/arch/sh/src/sh1/Kconfig @@ -43,12 +43,12 @@ config SH1_ITU4 config SH1_SCI0 bool "SCI0" default n - select ARCH_HAVE_SCI0 + select SCI0_SERIALDRIVER config SH1_SCI1 bool "SCI1" default n - select ARCH_HAVE_SCI1 + select SCI1_SERIALDRIVER config SH1_PCU bool "PCU" diff --git a/arch/sim/Kconfig b/arch/sim/Kconfig index b0395968d79..7384d3d7230 100644 --- a/arch/sim/Kconfig +++ b/arch/sim/Kconfig @@ -100,6 +100,39 @@ config SIM_WALLTIME correct for the system timer tick rate. With this definition in the configuration, sleep() behavior is more or less normal. +if HOST_LINUX +choice + prompt "Simulation Network Type" + default SIM_NET_HOST_ROUTE + +config SIM_NET_HOST_ROUTE + bool "Use local host route" + ---help--- + Add a host route for the simulation that points to the created tap device. The + simulation will not be able to access the public network unless iptables is + configured to masquerade for it. See configs/sim/NETWORK-LINUX.txt for more + information. + +config SIM_NET_BRIDGE + bool "Attach to Linux bridge" + ---help--- + Add the created tap device to the specified bridge. You will need to manually + configure the bridge IP address (if any) and routes that point to the bridge. + See configs/sim/NETWORK-LINUX.txt for more information. + +endchoice +endif + +if SIM_NET_BRIDGE +config SIM_NET_BRIDGE_DEVICE + string "Bridge device to attach" + default "nuttx0" + ---help--- + The name of the bridge device (as passed to "brctl create") to which the simulation's + TAP interface should be added. + +endif + config SIM_LCDDRIVER bool "Build a simulated LCD driver" default y diff --git a/arch/sim/src/Makefile b/arch/sim/src/Makefile index 406ac4ee934..72401d6c773 100644 --- a/arch/sim/src/Makefile +++ b/arch/sim/src/Makefile @@ -1,7 +1,7 @@ ############################################################################ # arch/sim/src/Makefile # -# Copyright (C) 2007, 2008, 2011-2012, 2014 Gregory Nutt. All rights reserved. +# Copyright (C) 2007, 2008, 2011-2012, 2014, 2016 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -120,6 +120,13 @@ ifeq ($(CONFIG_NET_ETHERNET),y) HOSTCFLAGS += -DNETDEV_BUFSIZE=$(CONFIG_NET_ETH_MTU) ifneq ($(HOSTOS),Cygwin) HOSTSRCS += up_tapdev.c up_netdev.c +ifeq ($(CONFIG_SIM_NET_BRIDGE),y) + HOSTCFLAGS += -DCONFIG_SIM_NET_BRIDGE + HOSTCFLAGS += -DCONFIG_SIM_NET_BRIDGE_DEVICE=\"$(CONFIG_SIM_NET_BRIDGE_DEVICE)\" +endif +ifeq ($(CONFIG_SIM_NET_HOST_ROUTE),y) + HOSTCFLAGS += -DCONFIG_SIM_NET_HOST_ROUTE +endif else HOSTSRCS += up_wpcap.c up_netdev.c DRVLIB = /lib/w32api/libws2_32.a /lib/w32api/libiphlpapi.a @@ -154,6 +161,11 @@ ifeq ($(CONFIG_SIM_X11FB),y) STDLIBS += -lX11 -lXext endif +# Override in Make.defs if linker is not 'ld' + +LDSTARTGROUP ?= --start-group +LDENDGROUP ?= --end-group + EXTRA_LIBS ?= EXTRA_LIBPATHS ?= @@ -245,7 +257,7 @@ endif nuttx.rel : libarch$(LIBEXT) board/libboard$(LIBEXT) $(HOSTOS)-names.dat $(LINKOBJS) $(Q) echo "LD: nuttx.rel" - $(Q) $(LD) -r $(LDLINKFLAGS) $(RELPATHS) $(EXTRA_LIBPATHS) -o $@ $(REQUIREDOBJS) --start-group $(RELLIBS) $(EXTRA_LIBS) --end-group + $(Q) $(LD) -r $(LDLINKFLAGS) $(RELPATHS) $(EXTRA_LIBPATHS) -o $@ $(REQUIREDOBJS) $(LDSTARTGROUP) $(RELLIBS) $(EXTRA_LIBS) $(LDENDGROUP) $(Q) $(OBJCOPY) --redefine-syms=$(HOSTOS)-names.dat $@ # Generate the final NuttX binary by linking the host-specific objects with the NuttX diff --git a/arch/sim/src/up_internal.h b/arch/sim/src/up_internal.h index e1e69dc25bd..ddae194a6a1 100644 --- a/arch/sim/src/up_internal.h +++ b/arch/sim/src/up_internal.h @@ -1,7 +1,7 @@ /**************************************************************************** * arch/sim/src/up_internal.h * - * Copyright (C) 2007, 2009, 2011-2012, 2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2009, 2011-2012, 2014, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -46,6 +46,7 @@ #ifndef __ASSEMBLY__ # include # include +# include # include # include @@ -308,10 +309,14 @@ int sim_ajoy_initialize(void); void tapdev_init(void); unsigned int tapdev_read(unsigned char *buf, unsigned int buflen); void tapdev_send(unsigned char *buf, unsigned int buflen); +void tapdev_ifup(in_addr_t ifaddr); +void tapdev_ifdown(void); -#define netdev_init() tapdev_init() -#define netdev_read(buf,buflen) tapdev_read(buf,buflen) -#define netdev_send(buf,buflen) tapdev_send(buf,buflen) +# define netdev_init() tapdev_init() +# define netdev_read(buf,buflen) tapdev_read(buf,buflen) +# define netdev_send(buf,buflen) tapdev_send(buf,buflen) +# define netdev_ifup(ifaddr) tapdev_ifup(ifaddr) +# define netdev_ifdown() tapdev_ifdown() #endif /* up_wpcap.c *************************************************************/ @@ -321,9 +326,11 @@ void wpcap_init(void); unsigned int wpcap_read(unsigned char *buf, unsigned int buflen); void wpcap_send(unsigned char *buf, unsigned int buflen); -#define netdev_init() wpcap_init() -#define netdev_read(buf,buflen) wpcap_read(buf,buflen) -#define netdev_send(buf,buflen) wpcap_send(buf,buflen) +# define netdev_init() wpcap_init() +# define netdev_read(buf,buflen) wpcap_read(buf,buflen) +# define netdev_send(buf,buflen) wpcap_send(buf,buflen) +# define netdev_ifup(ifaddr) {} +# define netdev_ifdown() {} #endif /* up_netdriver.c *********************************************************/ diff --git a/arch/sim/src/up_netdriver.c b/arch/sim/src/up_netdriver.c index 346159157f3..c785f497460 100644 --- a/arch/sim/src/up_netdriver.c +++ b/arch/sim/src/up_netdriver.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/sim/src/up_netdriver.c * - * Copyright (C) 2007, 2009-2012, 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2007, 2009-2012, 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Based on code from uIP which also has a BSD-like license: @@ -186,21 +186,32 @@ void netdriver_loop(void) */ eth = BUF; - if (g_sim_dev.d_len > ETH_HDRLEN && - up_comparemac(eth->dest, &g_sim_dev.d_mac) == 0) + if (g_sim_dev.d_len > ETH_HDRLEN) { + int is_ours; + + /* Figure out if this ethernet frame is addressed to us. This affects + * what we're willing to receive. Note that in promiscuous mode, the + * up_comparemac will always return 0. + */ + + is_ours = (up_comparemac(eth->dest, &g_sim_dev.d_mac) == 0); + #ifdef CONFIG_NET_PKT /* When packet sockets are enabled, feed the frame into the packet * tap. */ - pkt_input(&g_sim_dev); + if (is_ours) + { + pkt_input(&g_sim_dev); + } #endif /* We only accept IP packets of the configured type and ARP packets */ #ifdef CONFIG_NET_IPv4 - if (eth->type == HTONS(ETHTYPE_IP)) + if (eth->type == HTONS(ETHTYPE_IP) && is_ours) { nllvdbg("IPv4 frame\n"); @@ -241,7 +252,7 @@ void netdriver_loop(void) else #endif #ifdef CONFIG_NET_IPv6 - if (eth->type == HTONS(ETHTYPE_IP6)) + if (eth->type == HTONS(ETHTYPE_IP6) && is_ours) { nllvdbg("Iv6 frame\n"); @@ -304,9 +315,22 @@ void netdriver_loop(void) timer_reset(&g_periodic_timer); devif_timer(&g_sim_dev, sim_txpoll); } + sched_unlock(); } +int netdriver_ifup(struct net_driver_s *dev) +{ + netdev_ifup(dev->d_ipaddr); + return OK; +} + +int netdriver_ifdown(struct net_driver_s *dev) +{ + netdev_ifdown(); + return OK; +} + int netdriver_init(void) { /* Internal initalization */ @@ -314,6 +338,11 @@ int netdriver_init(void) timer_set(&g_periodic_timer, 500); netdev_init(); + /* Set callbacks */ + + g_sim_dev.d_ifup = netdriver_ifup; + g_sim_dev.d_ifdown = netdriver_ifdown; + /* Register the device with the OS so that socket IOCTLs can be performed */ (void)netdev_register(&g_sim_dev, NET_LL_ETHERNET); diff --git a/arch/sim/src/up_tapdev.c b/arch/sim/src/up_tapdev.c index 4fc1394e377..ce18dee054c 100644 --- a/arch/sim/src/up_tapdev.c +++ b/arch/sim/src/up_tapdev.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/sim/src/up_tapdev.c * - * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved. + * Copyright (C) 2007-2009, 2011, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Based on code from uIP which also has a BSD-like license: @@ -56,30 +56,25 @@ #include #include #include +#include -#include +#ifdef CONFIG_SIM_NET_HOST_ROUTE +# include +#endif + +#include +#include #include #include +#include /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ -#define TAPDEV_DEBUG 1 +//#define TAPDEV_DEBUG 1 -#define DEVTAP "/dev/net/tun" - -#ifndef CONFIG_EXAMPLES_WEBSERVER_DHCPC -# define TAP_IPADDR0 192 -# define TAP_IPADDR1 168 -# define TAP_IPADDR2 0 -# define TAP_IPADDR3 128 -#else -# define TAP_IPADDR0 0 -# define TAP_IPADDR1 0 -# define TAP_IPADDR2 0 -# define TAP_IPADDR3 0 -#endif +#define DEVTAP "/dev/net/tun" /* Syslog priority (must match definitions in nuttx/include/syslog.h) */ @@ -101,10 +96,6 @@ struct sel_arg_struct struct timeval *tvp; }; -/**************************************************************************** - * Private Function Prototypes - ****************************************************************************/ - /**************************************************************************** * NuttX Domain Public Function Prototypes ****************************************************************************/ @@ -117,9 +108,14 @@ int netdriver_setmacaddr(unsigned char *macaddr); ****************************************************************************/ #ifdef TAPDEV_DEBUG -static int gdrop = 0; +static int gdrop = 0; +#endif +static int gtapdevfd; +static char gdevname[IFNAMSIZ]; + +#ifdef CONFIG_SIM_NET_HOST_ROUTE +static struct rtentry ghostroute; #endif -static int gtapdevfd; /**************************************************************************** * Private Functions @@ -145,32 +141,32 @@ static inline void dump_ethhdr(const char *msg, unsigned char *buf, int buflen) static int up_setmacaddr(void) { - int sockfd; + unsigned char mac[7]; int ret = -1; - /* Get a socket (only so that we get access to the INET subsystem) */ + /* Assign a random locally-created MAC address. + * + * This previously took the address from the TAP interface; that was + * incorrect, as that hardware address belongs to the host system. Packets + * destined for the application aren't guaranteed to reach it if you do + * that, as the host may handle them at its discretion. + * + * With a unique MAC address, we get ALL the packets. + * + * TODO: The generated MAC address should be checked to see if it + * conflicts with something else on the network. + */ - sockfd = socket(PF_INET, SOCK_DGRAM, 0); - if (sockfd >= 0) - { - struct ifreq req; - memset(&req, 0, sizeof(struct ifreq)); - - /* Put the driver name into the request */ - - strncpy(req.ifr_name, "tap0", IFNAMSIZ); - - /* Perform the ioctl to get the MAC address */ - - ret = ioctl(sockfd, SIOCGIFHWADDR, (unsigned long)&req); - if (!ret) - { - /* Set the MAC address */ - - ret = netdriver_setmacaddr((unsigned char *)&req.ifr_hwaddr.sa_data); - } - } + srand(time(NULL)); + mac[0] = 0x42; + mac[1] = rand() % 256; + mac[2] = rand() % 256; + mac[3] = rand() % 256; + mac[4] = rand() % 256; + mac[5] = rand() % 256; + mac[6] = 0; + ret = netdriver_setmacaddr(mac); return ret; } @@ -181,9 +177,12 @@ static int up_setmacaddr(void) void tapdev_init(void) { struct ifreq ifr; - char buf[1024]; int ret; +#ifdef CONFIG_SIM_NET_BRIDGE + int sockfd; +#endif + /* Open the tap device */ gtapdevfd = open(DEVTAP, O_RDWR, 0644); @@ -204,11 +203,37 @@ void tapdev_init(void) return; } - /* Assign an IPv4 address to the tap device */ + /* Save the tap device name */ - snprintf(buf, sizeof(buf), "/sbin/ifconfig tap0 inet %d.%d.%d.%d\n", - TAP_IPADDR0, TAP_IPADDR1, TAP_IPADDR2, TAP_IPADDR3); - system(buf); + strncpy(gdevname, ifr.ifr_name, IFNAMSIZ); + +#ifdef CONFIG_SIM_NET_BRIDGE + /* Get a socket with which to manipulate the tap device; the remaining + * ioctl calls unfortunately won't work on the tap device fd. + */ + + sockfd = socket(AF_INET, SOCK_DGRAM, 0); + if (sockfd < 0) + { + syslog(LOG_ERR, "TAPDEV: Can't open socket: %d\n", -sockfd); + return; + } + + /* Assign the tap device to a bridge */ + + memset(&ifr, 0, sizeof(ifr)); + strncpy(ifr.ifr_name, CONFIG_SIM_NET_BRIDGE_DEVICE, IFNAMSIZ); + ifr.ifr_ifindex = if_nametoindex(gdevname); + + ret = ioctl(sockfd, SIOCBRADDIF, &ifr); + if (ret < 0) + { + syslog(LOG_ERR, "TAPDEV: ioctl failed (can't add interface %s to bridge %s): %d\n", + gdevname, CONFIG_SIM_NET_BRIDGE_DEVICE, -ret); + } + + close(sockfd); +#endif /* Set the MAC address */ @@ -273,9 +298,101 @@ void tapdev_send(unsigned char *buf, unsigned int buflen) syslog(LOG_ERR, "TAPDEV: write failed: %d", -ret); exit(1); } + dump_ethhdr("write", buf, buflen); } +void tapdev_ifup(in_addr_t ifaddr) +{ + struct ifreq ifr; + int sockfd; + int ret; + +#ifdef CONFIG_SIM_NET_HOST_ROUTE + struct sockaddr_in *addr; +#endif + + /* Get a socket with which to manipulate the tap device */ + + sockfd = socket(AF_INET, SOCK_DGRAM, 0); + if (sockfd < 0) + { + syslog(LOG_ERR, "TAPDEV: Can't open socket: %d\n", -sockfd); + return; + } + + /* Bring the TAP interface up */ + + strncpy(ifr.ifr_name, gdevname, IFNAMSIZ); + + ret = ioctl(sockfd, SIOCGIFFLAGS, (unsigned long)&ifr); + if (ret < 0) + { + syslog(LOG_ERR, "TAPDEV: ioctl failed (can't get interface flags): %d\n", -ret); + close(sockfd); + return; + } + + ifr.ifr_flags |= IFF_UP; + ret = ioctl(sockfd, SIOCSIFFLAGS, (unsigned long)&ifr); + if (ret < 0) + { + syslog(LOG_ERR, "TAPDEV: ioctl failed (can't set interface flags): %d\n", -ret); + close(sockfd); + return; + } + +#ifdef CONFIG_SIM_NET_HOST_ROUTE + /* Add host route */ + + memset(&ghostroute, 0, sizeof(ghostroute)); + + addr = (struct sockaddr_in *)&ghostroute.rt_dst; + addr->sin_family = AF_INET; + addr->sin_addr.s_addr = ifaddr; + + ghostroute.rt_dev = gdevname; + ghostroute.rt_flags = RTF_UP | RTF_HOST; + ghostroute.rt_metric = 0; + + ret = ioctl(sockfd, SIOCADDRT, (unsigned long)&ghostroute); + if (ret < 0) + { + syslog(LOG_ERR, "TAPDEV: ioctl failed (can't add host route): %d\n", -ret); + close(sockfd); + return; + } +#endif + + close(sockfd); +} + +void tapdev_ifdown(void) +{ +#ifdef CONFIG_SIM_NET_HOST_ROUTE + int sockfd; + int ret; + + if (((struct sockaddr_in *)&ghostroute.rt_dst)->sin_addr.s_addr != 0) + { + /* Get a socket with which to manipulate the tap device */ + + sockfd = socket(AF_INET, SOCK_DGRAM, 0); + if (sockfd < 0) + { + syslog(LOG_ERR, "TAPDEV: Can't open socket: %d\n", -sockfd); + return; + } + + ret = ioctl(sockfd, SIOCDELRT, (unsigned long)&ghostroute); + if (ret < 0) + { + syslog(LOG_ERR, "TAPDEV: ioctl failed (can't delete host route): %d\n", -ret); + } + + close(sockfd); + } +#endif +} + #endif /* !__CYGWIN__ */ - - diff --git a/arch/x86/src/Makefile b/arch/x86/src/Makefile index f38bcee148d..16fbc8206c1 100644 --- a/arch/x86/src/Makefile +++ b/arch/x86/src/Makefile @@ -1,7 +1,7 @@ ############################################################################ # arch/x86/src/Makefile # -# Copyright (C) 2011-2012, 2014 Gregory Nutt. All rights reserved. +# Copyright (C) 2011-2012, 2014, 2016 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -80,6 +80,11 @@ COBJS = $(CSRCS:.c=$(OBJEXT)) SRCS = $(ASRCS) $(CSRCS) OBJS = $(AOBJS) $(COBJS) +# Override in Make.defs if linker is not 'ld' + +LDSTARTGROUP ?= --start-group +LDENDGROUP ?= --end-group + LDFLAGS += $(ARCHSCRIPT) EXTRA_LIBS ?= LINKLIBS ?= @@ -144,7 +149,7 @@ board/libboard$(LIBEXT): nuttx$(EXEEXT): $(HEAD_OBJ) board/libboard$(LIBEXT) @echo "LD: nuttx$(EXEEXT)" $(Q) $(LD) --entry=__start $(LDFLAGS) $(LIBPATHS) -o $(NUTTX)$(EXEEXT) $(HEAD_OBJ) $(EXTRA_OBJS) \ - --start-group $(LDLIBS) $(EXTRA_LIBS) $(LIBGCC) --end-group + $(LDSTARTGROUP) $(LDLIBS) $(EXTRA_LIBS) $(LIBGCC) $(LDENDGROUP) ifneq ($(CONFIG_WINDOWS_NATIVE),y) $(Q) $(NM) $(NUTTX)$(EXEEXT) | \ grep -v '\(compiled\)\|\(\$(OBJEXT)$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \ diff --git a/arch/z16/src/z16f/Kconfig b/arch/z16/src/z16f/Kconfig index 229a1aa72f1..8861726aee3 100644 --- a/arch/z16/src/z16f/Kconfig +++ b/arch/z16/src/z16f/Kconfig @@ -18,12 +18,12 @@ config Z16F_ESPI config Z16F_UART0 bool "UART0" default y - select ARCH_HAVE_UART0 + select UART0_SERIALDRIVER config Z16F_UART1 bool "UART1" default y - select ARCH_HAVE_UART1 + select UART1_SERIALDRIVER endmenu # Z16F Peripheral Selection diff --git a/arch/z80/src/ez80/Kconfig b/arch/z80/src/ez80/Kconfig index df8cc5a1978..7529e2c7adc 100644 --- a/arch/z80/src/ez80/Kconfig +++ b/arch/z80/src/ez80/Kconfig @@ -9,17 +9,17 @@ menu "ez80 Peripheral Support" config EZ80_UART0 bool "UART0" - select ARCH_HAVE_UART0 + select UART0_SERIALDRIVER default n config EZ80_UART1 bool "UART1" - select ARCH_HAVE_UART1 + select UART1_SERIALDRIVER default n config EZ80_UART2 bool "UART2" - select ARCH_HAVE_UART2 + select UART2_SERIALDRIVER default n config EZ80_EMAC diff --git a/arch/z80/src/z8/Kconfig b/arch/z80/src/z8/Kconfig index d7e51403104..3c77bb14264 100644 --- a/arch/z80/src/z8/Kconfig +++ b/arch/z80/src/z8/Kconfig @@ -10,12 +10,12 @@ if ARCH_CHIP_Z8 config Z8_UART0 bool default y - select ARCH_HAVE_UART0 + select UART0_SERIALDRIVER config Z8_UART1 bool default y - select ARCH_HAVE_UART1 + select UART1_SERIALDRIVER # The ZiLOG ZDS-II Windows toolchain is the only toolchain available for # the ez80. diff --git a/configs/Kconfig b/configs/Kconfig index c2d650557c3..c8169d0086f 100644 --- a/configs/Kconfig +++ b/configs/Kconfig @@ -906,6 +906,13 @@ config ARCH_BOARD_STM32_TINY STM32F103C8T6 micro-controller chip, and is (always ?) bundled with an nRF24L01+ wireless module. +config ARCH_BOARD_STM32F103_MINIMUM + bool "STM32F103C8T6 Minimum ARM Development Board" + depends on ARCH_CHIP_STM32F103C8 + select ARCH_HAVE_LEDS + ---help--- + A configuration for the STM32F103 Minimum board. + config ARCH_BOARD_STM3210E_EVAL bool "STMicro STM3210E-EVAL development board" depends on ARCH_CHIP_STM32F103ZE @@ -956,6 +963,16 @@ config ARCH_BOARD_STM32F4_DISCOVERY ---help--- STMicro STM32F4-Discovery board based on the STMicro STM32F407VGT6 MCU. +config ARCH_BOARD_STM32F411E_DISCO + bool "STMicro STM32F411E-Discovery board" + depends on ARCH_CHIP_STM32F411VE + select ARCH_HAVE_LEDS + select ARCH_HAVE_BUTTONS + select ARCH_HAVE_IRQBUTTONS + ---help--- + This is a minimal configuration that supports low-level test of the + STMicro STM32F411E-Discovery Board. + config ARCH_BOARD_STM32F429I_DISCO bool "STMicro STM32F429I-Discovery board" depends on ARCH_CHIP_STM32F429Z @@ -1146,7 +1163,7 @@ config ARCH_BOARD_VIEWTOOL_STM32F107 config ARCH_BOARD_XTRS bool "XTRS TRS80 Model 3 emulation" depends on ARCH_CHIP_Z80 - select ARCH_HAVE_UART + select UART_SERIALDRIVER ---help--- TRS80 Model 3. This port uses a vintage computer based on the Z80. An emulator for this computer is available to run TRS80 programs on a @@ -1164,7 +1181,7 @@ config ARCH_BOARD_Z16F2800100ZCOG config ARCH_BOARD_Z80SIM bool "Z80 Instruction Set Simulator" depends on ARCH_CHIP_Z80 - select ARCH_HAVE_UART + select UART_SERIALDRIVER ---help--- z80 Microcontroller. This port uses a Z80 instruction set simulator called z80sim. This port also uses the SDCC toolchain @@ -1399,11 +1416,13 @@ config ARCH_BOARD default "skp16c26" if ARCH_BOARD_SKP16C26 default "spark" if ARCH_BOARD_SPARK default "stm32_tiny" if ARCH_BOARD_STM32_TINY + default "stm32f103-minimum" if ARCH_BOARD_STM32F103_MINIMUM default "stm3210e-eval" if ARCH_BOARD_STM3210E_EVAL default "stm3220g-eval" if ARCH_BOARD_STM3220G_EVAL default "stm3240g-eval" if ARCH_BOARD_STM3240G_EVAL default "stm32f3discovery" if ARCH_BOARD_STM32F3_DISCOVERY default "stm32f4discovery" if ARCH_BOARD_STM32F4_DISCOVERY + default "stm32f411e-disco" if ARCH_BOARD_STM32F411E_DISCO default "stm32f429i-disco" if ARCH_BOARD_STM32F429I_DISCO default "stm32f746g-disco" if ARCH_BOARD_STM32F746G_DISCO default "stm32l476vg-disco" if ARCH_BOARD_STM32L476VG_DISCO @@ -1756,6 +1775,9 @@ endif if ARCH_BOARD_STM32_TINY source "configs/stm32_tiny/Kconfig" endif +if ARCH_BOARD_STM32F103_MINIMUM +source "configs/stm32f103-minimum/Kconfig" +endif if ARCH_BOARD_STM3210E_EVAL source "configs/stm3210e-eval/Kconfig" endif @@ -1768,6 +1790,9 @@ endif if ARCH_BOARD_STM32F4_DISCOVERY source "configs/stm32f4discovery/Kconfig" endif +if ARCH_BOARD_STM32F411E_DISCO +source "configs/stm32f411e-disco/Kconfig" +endif if ARCH_BOARD_STM32F429I_DISCO source "configs/stm32f429i-disco/Kconfig" endif diff --git a/configs/README.txt b/configs/README.txt index 4b1b2017070..9b1c8486bac 100644 --- a/configs/README.txt +++ b/configs/README.txt @@ -637,9 +637,16 @@ configs/stm3240g-eval microcontroller (ARM Cortex-M4 with FPU). This port uses a GNU Cortex-M4 toolchain (such as CodeSourcery). +configs/stm32f103-minimum + Generic STM32F103C8T6 Minimum ARM Development Board. + configs/stm32f4discovery STMicro STM32F4-Discovery board based on the STMIcro STM32F407VGT6 MCU. +configs/stm32f411e-disco + This is a minimal configuration that supports low-level test of the + STMicro STM32F411E-Discovery Board. + configs/stm32f429i-disco STMicro STM32F429I-Discovery board based on the STMicro STM32F429ZIT6 MCU. diff --git a/configs/amber/hello/defconfig b/configs/amber/hello/defconfig index 57a095a0e10..5c62c54f886 100644 --- a/configs/amber/hello/defconfig +++ b/configs/amber/hello/defconfig @@ -238,12 +238,11 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set -CONFIG_ARCH_HAVE_USART0=y +CONFIG_USART0_SERIALDRIVER=y # # USART Configuration # -CONFIG_USART0_ISUART=y CONFIG_MCU_SERIAL=y CONFIG_USART0_SERIAL_CONSOLE=y # CONFIG_NO_SERIAL_CONSOLE is not set diff --git a/configs/arduino-due/README.txt b/configs/arduino-due/README.txt index 290c095ef3a..e128fb71d68 100644 --- a/configs/arduino-due/README.txt +++ b/configs/arduino-due/README.txt @@ -822,10 +822,10 @@ Arduino DUE-specific Configuration Options CONFIG_SAM34_GPIOD_IRQ CONFIG_SAM34_GPIOE_IRQ CONFIG_SAM34_GPIOF_IRQ - CONFIG_USART0_ISUART - CONFIG_USART1_ISUART - CONFIG_USART2_ISUART - CONFIG_USART3_ISUART + CONFIG_USART0_SERIALDRIVER + CONFIG_USART1_SERIALDRIVER + CONFIG_USART2_SERIALDRIVER + CONFIG_USART3_SERIALDRIVER ST91SAM4S specific device driver settings @@ -885,7 +885,7 @@ Configurations Board Selection -> Peripheral CONFIG_SAM34_UART0=n : Disable UART0. Can't use with this shield CONFIG_SAM34_USART0=y : Enable USART0 - CONFIG_USART0_ISUART=y + CONFIG_USART0_SERIALDRIVER=y Device Drivers -> Serial CONFIG_USART0_SERIAL_CONSOLE=y : Configure the console on USART0 @@ -966,7 +966,7 @@ Configuration sub-directories Board Selection -> Peripheral CONFIG_SAM34_UART0=n : Disable UART0. Can't use with this shield CONFIG_SAM34_USART0=y : Enable USART0 - CONFIG_USART0_ISUART=y + CONFIG_USART0_SERIALDRIVER=y Device Drivers -> Serial CONFIG_USART0_SERIAL_CONSOLE=y : Configure the console on USART0 diff --git a/configs/arduino-due/nsh/defconfig b/configs/arduino-due/nsh/defconfig index 7fdcc2c51cc..51cf6e0923d 100644 --- a/configs/arduino-due/nsh/defconfig +++ b/configs/arduino-due/nsh/defconfig @@ -493,28 +493,28 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/arduino-due/src/sam_appinit.c b/configs/arduino-due/src/sam_appinit.c index ef52d100ccf..32132ee3302 100644 --- a/configs/arduino-due/src/sam_appinit.c +++ b/configs/arduino-due/src/sam_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/arduino-due/src/sam_appinit.c * - * Copyright (C) 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2013, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -76,11 +76,28 @@ * Name: board_app_initialize * * Description: - * Perform architecture specific initialization + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface using the command BOARDIOC_INIT. + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #if defined(CONFIG_ARDUINO_ITHEAD_TFT) && defined(CONFIG_SPI_BITBANG) && \ defined(CONFIG_MMCSD_SPI) diff --git a/configs/arduino-mega2560/hello/defconfig b/configs/arduino-mega2560/hello/defconfig index ffa94ad0e93..4459053ee1b 100644 --- a/configs/arduino-mega2560/hello/defconfig +++ b/configs/arduino-mega2560/hello/defconfig @@ -301,33 +301,32 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -CONFIG_ARCH_HAVE_USART0=y -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +CONFIG_USART0_SERIALDRIVER=y +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration # -CONFIG_USART0_ISUART=y CONFIG_MCU_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set # CONFIG_SERIAL_OFLOWCONTROL is not set diff --git a/configs/arduino-mega2560/nsh/defconfig b/configs/arduino-mega2560/nsh/defconfig index d22cb731617..9aee289d6d7 100644 --- a/configs/arduino-mega2560/nsh/defconfig +++ b/configs/arduino-mega2560/nsh/defconfig @@ -309,33 +309,32 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -CONFIG_ARCH_HAVE_USART0=y -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +CONFIG_USART0_SERIALDRIVER=y +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration # -CONFIG_USART0_ISUART=y CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set diff --git a/configs/avr32dev1/nsh/defconfig b/configs/avr32dev1/nsh/defconfig index dadecbc7139..0f87f200461 100644 --- a/configs/avr32dev1/nsh/defconfig +++ b/configs/avr32dev1/nsh/defconfig @@ -276,12 +276,11 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -CONFIG_ARCH_HAVE_USART1=y +CONFIG_USART1_SERIALDRIVER=y # # USART Configuration # -CONFIG_USART1_ISUART=y CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y CONFIG_USART1_SERIAL_CONSOLE=y diff --git a/configs/avr32dev1/ostest/defconfig b/configs/avr32dev1/ostest/defconfig index 83d72fda29d..6fc2eed59f4 100644 --- a/configs/avr32dev1/ostest/defconfig +++ b/configs/avr32dev1/ostest/defconfig @@ -275,12 +275,11 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set -CONFIG_ARCH_HAVE_USART1=y +CONFIG_USART1_SERIALDRIVER=y # # USART Configuration # -CONFIG_USART1_ISUART=y CONFIG_MCU_SERIAL=y CONFIG_USART1_SERIAL_CONSOLE=y # CONFIG_NO_SERIAL_CONSOLE is not set diff --git a/configs/boardctl.c b/configs/boardctl.c index 82c52890656..749056d82a5 100644 --- a/configs/boardctl.c +++ b/configs/boardctl.c @@ -250,14 +250,24 @@ int boardctl(unsigned int cmd, uintptr_t arg) { /* CMD: BOARDIOC_INIT * DESCRIPTION: Perform one-time application initialization. - * ARG: None + * ARG: The boardctl() argument is passed to the + * board_app_initialize() implementation without modification. + * The argument has no meaning to NuttX; the meaning of the + * argument is a contract between the board-specific + * initalization logic and the the matching application logic. + * The value cold be such things as a mode enumeration value, + * a set of DIP switch switch settings, a pointer to + * configuration data read from a file or serial FLASH, or + * whatever you would like to do with it. Every + * implementation should accept zero/NULL as a default + * configuration. * CONFIGURATION: CONFIG_LIB_BOARDCTL * DEPENDENCIES: Board logic must provide board_app_initialization */ case BOARDIOC_INIT: { - ret = board_app_initialize(); + ret = board_app_initialize(arg); } break; diff --git a/configs/c5471evm/httpd/defconfig b/configs/c5471evm/httpd/defconfig index c3635191e01..895892b2462 100644 --- a/configs/c5471evm/httpd/defconfig +++ b/configs/c5471evm/httpd/defconfig @@ -348,28 +348,28 @@ CONFIG_WATCHDOG_DEVPATH="/dev/watchdog0" CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -CONFIG_ARCH_HAVE_OTHER_UART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +CONFIG_OTHER_UART_SERIALDRIVER=y # # USART Configuration diff --git a/configs/c5471evm/nettest/defconfig b/configs/c5471evm/nettest/defconfig index 99517514155..006c9b09b0e 100644 --- a/configs/c5471evm/nettest/defconfig +++ b/configs/c5471evm/nettest/defconfig @@ -358,28 +358,28 @@ CONFIG_WATCHDOG_DEVPATH="/dev/watchdog0" CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -CONFIG_ARCH_HAVE_OTHER_UART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +CONFIG_OTHER_UART_SERIALDRIVER=y # # USART Configuration diff --git a/configs/c5471evm/nsh/defconfig b/configs/c5471evm/nsh/defconfig index e36be6f8ff7..fe48c98b95b 100644 --- a/configs/c5471evm/nsh/defconfig +++ b/configs/c5471evm/nsh/defconfig @@ -367,28 +367,28 @@ CONFIG_NETDEV_TELNET=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -CONFIG_ARCH_HAVE_OTHER_UART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +CONFIG_OTHER_UART_SERIALDRIVER=y # # USART Configuration diff --git a/configs/cc3200-launchpad/nsh/defconfig b/configs/cc3200-launchpad/nsh/defconfig index 0ab668e23dc..68c1a21f1c5 100644 --- a/configs/cc3200-launchpad/nsh/defconfig +++ b/configs/cc3200-launchpad/nsh/defconfig @@ -354,27 +354,27 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/cc3200-launchpad/src/cc3200_boot.c b/configs/cc3200-launchpad/src/cc3200_boot.c index 9d466b2d75c..cf644905e0f 100644 --- a/configs/cc3200-launchpad/src/cc3200_boot.c +++ b/configs/cc3200-launchpad/src/cc3200_boot.c @@ -67,6 +67,7 @@ /**************************************************************************** * Public Functions ****************************************************************************/ + /**************************************************************************** * Name: board_app_initialize * @@ -80,9 +81,24 @@ * CONFIG_LIB_BOARDCTL=n : * Called from board_initialize(). * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { return OK; } diff --git a/configs/cloudctrl/nsh/defconfig b/configs/cloudctrl/nsh/defconfig index ed97bcc4b9d..ece509d9cf6 100644 --- a/configs/cloudctrl/nsh/defconfig +++ b/configs/cloudctrl/nsh/defconfig @@ -80,6 +80,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -98,6 +99,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -119,6 +121,7 @@ CONFIG_ARCH_CORTEXM3=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -126,6 +129,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y # CONFIG_ARMV7M_LAZYFPU is not set # CONFIG_ARCH_HAVE_FPU is not set # CONFIG_ARCH_HAVE_DPFPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -136,6 +140,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARW is not set # CONFIG_ARMV7M_TOOLCHAIN_ATOLLIC is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDW is not set @@ -246,6 +251,7 @@ CONFIG_ARCH_CHIP_STM32F107VC=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -417,13 +423,17 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_STM32_TIM5_CAP is not set # CONFIG_STM32_TIM8_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART2_SERIALDRIVER=y +# CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # @@ -787,33 +797,28 @@ CONFIG_ETH0_PHY_DM9161=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -CONFIG_ARCH_HAVE_USART2=y -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART2_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +CONFIG_USART2_SERIALDRIVER=y +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y CONFIG_SERIAL_NPOLLWAITERS=2 @@ -1076,6 +1081,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set CONFIG_LIBC_NETDB=y # CONFIG_NETDB_HOSTFILE is not set CONFIG_NETDB_DNSCLIENT=y @@ -1216,6 +1223,7 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_NETUTILS_CHAT is not set # CONFIG_NETUTILS_CODECS is not set # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_FTPD is not set # CONFIG_NETUTILS_JSON is not set diff --git a/configs/cloudctrl/src/Makefile b/configs/cloudctrl/src/Makefile index f18f63eba3f..f0ee184e64c 100644 --- a/configs/cloudctrl/src/Makefile +++ b/configs/cloudctrl/src/Makefile @@ -73,10 +73,6 @@ ifeq ($(CONFIG_ADC),y) CSRCS += stm32_adc.c endif -ifeq ($(CONFIG_WATCHDOG),y) -CSRCS += stm32_watchdog.c -endif - ifeq ($(CONFIG_STM32_PHYINIT),y) CSRCS += stm32_phyinit.c endif diff --git a/configs/cloudctrl/src/stm32_appinit.c b/configs/cloudctrl/src/stm32_appinit.c index 6bd5e5a203b..cc772b5add3 100644 --- a/configs/cloudctrl/src/stm32_appinit.c +++ b/configs/cloudctrl/src/stm32_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/cloudctrl/src/stm32_appinit.c * - * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2012, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * Darcy Gong * @@ -108,9 +108,24 @@ * Description: * Perform architecture specific initialization * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #if defined(HAVE_USBHOST) || defined(HAVE_W25) int ret; diff --git a/configs/compal_e86/nsh_highram/defconfig b/configs/compal_e86/nsh_highram/defconfig index c5dcaa04d3f..e521e8e7daf 100644 --- a/configs/compal_e86/nsh_highram/defconfig +++ b/configs/compal_e86/nsh_highram/defconfig @@ -368,28 +368,28 @@ CONFIG_SPI_EXCHANGE=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -CONFIG_ARCH_HAVE_OTHER_UART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +CONFIG_OTHER_UART_SERIALDRIVER=y # # USART Configuration diff --git a/configs/compal_e86/src/boot.c b/configs/compal_e86/src/boot.c index 32364c631e4..8c214a004c3 100644 --- a/configs/compal_e86/src/boot.c +++ b/configs/compal_e86/src/boot.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/compal_e86/boot.c * - * Copyright (C) 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -44,10 +44,31 @@ * Public Functions ****************************************************************************/ -/* Application initialization stub for boardctl() */ +/**************************************************************************** + * Name: board_app_initialize + * + * Description: + * Perform architecture specific initialization + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. + * + ****************************************************************************/ #ifdef CONFIG_LIB_BOARDCTL -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { return 0; } diff --git a/configs/compal_e88/nsh_highram/defconfig b/configs/compal_e88/nsh_highram/defconfig index 8db78614871..85ad3ce661b 100644 --- a/configs/compal_e88/nsh_highram/defconfig +++ b/configs/compal_e88/nsh_highram/defconfig @@ -368,28 +368,28 @@ CONFIG_SPI_EXCHANGE=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -CONFIG_ARCH_HAVE_OTHER_UART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +CONFIG_OTHER_UART_SERIALDRIVER=y # # USART Configuration diff --git a/configs/compal_e88/src/boot.c b/configs/compal_e88/src/boot.c index 540bc39ca16..a3c68292275 100644 --- a/configs/compal_e88/src/boot.c +++ b/configs/compal_e88/src/boot.c @@ -44,10 +44,31 @@ * Public Functions ****************************************************************************/ -/* Application initialization stub for boardctl() */ +/**************************************************************************** + * Name: board_app_initialize + * + * Description: + * Perform architecture specific initialization + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. + * + ****************************************************************************/ #ifdef CONFIG_LIB_BOARDCTL -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { return 0; } diff --git a/configs/compal_e99/nsh_compalram/defconfig b/configs/compal_e99/nsh_compalram/defconfig index 3ad08465712..e3107fc8470 100644 --- a/configs/compal_e99/nsh_compalram/defconfig +++ b/configs/compal_e99/nsh_compalram/defconfig @@ -405,28 +405,28 @@ CONFIG_LCD_LANDSCAPE=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -CONFIG_ARCH_HAVE_OTHER_UART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +CONFIG_OTHER_UART_SERIALDRIVER=y # # USART Configuration diff --git a/configs/compal_e99/nsh_highram/defconfig b/configs/compal_e99/nsh_highram/defconfig index cb3fa5526b7..a7cbecbe981 100644 --- a/configs/compal_e99/nsh_highram/defconfig +++ b/configs/compal_e99/nsh_highram/defconfig @@ -404,28 +404,28 @@ CONFIG_LCD_LANDSCAPE=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -CONFIG_ARCH_HAVE_OTHER_UART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +CONFIG_OTHER_UART_SERIALDRIVER=y # # USART Configuration diff --git a/configs/compal_e99/src/boot.c b/configs/compal_e99/src/boot.c index 74f17a2ebdb..8bc7061daf3 100644 --- a/configs/compal_e99/src/boot.c +++ b/configs/compal_e99/src/boot.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/compal_e99/boot.c * - * Copyright (C) 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -44,10 +44,31 @@ * Public Functions ****************************************************************************/ -/* Application initialization stub for boardctl() */ +/**************************************************************************** + * Name: board_app_initialize + * + * Description: + * Perform architecture specific initialization + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. + * + ****************************************************************************/ #ifdef CONFIG_LIB_BOARDCTL -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { return 0; } diff --git a/configs/demo9s12ne64/src/m9s12_appinit.c b/configs/demo9s12ne64/src/m9s12_appinit.c index ec3d9ba21cf..0010a71e689 100644 --- a/configs/demo9s12ne64/src/m9s12_appinit.c +++ b/configs/demo9s12ne64/src/m9s12_appinit.c @@ -61,9 +61,24 @@ * Description: * Perform architecture specific initialization * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { /* Configure SPI-based devices */ diff --git a/configs/dk-tm4c129x/ipv6/defconfig b/configs/dk-tm4c129x/ipv6/defconfig index fdd2e40140a..de1c4d8fbd5 100644 --- a/configs/dk-tm4c129x/ipv6/defconfig +++ b/configs/dk-tm4c129x/ipv6/defconfig @@ -490,28 +490,28 @@ CONFIG_LM75=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/dk-tm4c129x/nsh/defconfig b/configs/dk-tm4c129x/nsh/defconfig index 158188fc44b..0b9e6a5f03f 100644 --- a/configs/dk-tm4c129x/nsh/defconfig +++ b/configs/dk-tm4c129x/nsh/defconfig @@ -545,28 +545,28 @@ CONFIG_LM75=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/dk-tm4c129x/src/dk-tm4c129x.h b/configs/dk-tm4c129x/src/dk-tm4c129x.h index 5f0b89a7079..2c78317ba9d 100644 --- a/configs/dk-tm4c129x/src/dk-tm4c129x.h +++ b/configs/dk-tm4c129x/src/dk-tm4c129x.h @@ -177,7 +177,7 @@ void tm4c_led_initialize(void); int tm4c_bringup(void); /**************************************************************************** - * Name: tiva_timer_initialize + * Name: tiva_timer_configure * * Description: * Configure the timer driver @@ -185,7 +185,7 @@ int tm4c_bringup(void); ****************************************************************************/ #ifdef CONFIG_DK_TM4C129X_TIMER -int tiva_timer_initialize(void); +int tiva_timer_configure(void); #endif #endif /* __ASSEMBLY__ */ diff --git a/configs/dk-tm4c129x/src/tm4c_appinit.c b/configs/dk-tm4c129x/src/tm4c_appinit.c index bd6c1b4b6b9..20d889d47e9 100644 --- a/configs/dk-tm4c129x/src/tm4c_appinit.c +++ b/configs/dk-tm4c129x/src/tm4c_appinit.c @@ -53,9 +53,24 @@ * Description: * Perform architecture specific initialization * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { /* If CONFIG_BOARD_INITIALIZE is selected then board initialization was * already performed in board_initialize. diff --git a/configs/dk-tm4c129x/src/tm4c_bringup.c b/configs/dk-tm4c129x/src/tm4c_bringup.c index 16ebb76ed9e..72fcac02928 100644 --- a/configs/dk-tm4c129x/src/tm4c_bringup.c +++ b/configs/dk-tm4c129x/src/tm4c_bringup.c @@ -181,7 +181,7 @@ int tm4c_bringup(void) #ifdef HAVE_TIMER /* Initialize the timer driver */ - ret = tiva_timer_initialize(); + ret = tiva_timer_configure(); if (ret < 0) { dbg("ERROR: Failed to initialize timer driver: %d\n", ret); diff --git a/configs/dk-tm4c129x/src/tm4c_timer.c b/configs/dk-tm4c129x/src/tm4c_timer.c index e5b82d71417..e6cfe3e13cb 100644 --- a/configs/dk-tm4c129x/src/tm4c_timer.c +++ b/configs/dk-tm4c129x/src/tm4c_timer.c @@ -91,14 +91,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: tiva_timer_initialize + * Name: tiva_timer_configure * * Description: * Configure the timer driver * ****************************************************************************/ -int tiva_timer_initialize(void) +int tiva_timer_configure(void) { int ret; diff --git a/configs/ea3131/nsh/defconfig b/configs/ea3131/nsh/defconfig index 1edd39ab7e2..847486498eb 100644 --- a/configs/ea3131/nsh/defconfig +++ b/configs/ea3131/nsh/defconfig @@ -358,27 +358,27 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -CONFIG_ARCH_HAVE_UART=y -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set +CONFIG_UART_SERIALDRIVER=y +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/ea3131/pgnsh/defconfig b/configs/ea3131/pgnsh/defconfig index e245da9a3c6..68215a41b38 100644 --- a/configs/ea3131/pgnsh/defconfig +++ b/configs/ea3131/pgnsh/defconfig @@ -451,28 +451,28 @@ CONFIG_M25P_MEMORY_TYPE=0x20 CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -CONFIG_ARCH_HAVE_UART=y -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +CONFIG_UART_SERIALDRIVER=y +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/ea3131/src/lpc31_appinit.c b/configs/ea3131/src/lpc31_appinit.c index 58e58709ca8..43ef50be72c 100644 --- a/configs/ea3131/src/lpc31_appinit.c +++ b/configs/ea3131/src/lpc31_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/ea3131/src/lpc31_appinit.c * - * Copyright (C) 2009, 2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2009, 2012, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -107,9 +107,24 @@ * Description: * Perform architecture specific initialization * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #ifdef NSH_HAVEMMCSD FAR struct sdio_dev_s *sdio; diff --git a/configs/ea3131/usbserial/defconfig b/configs/ea3131/usbserial/defconfig index c7e919046a3..e7a88724c9d 100644 --- a/configs/ea3131/usbserial/defconfig +++ b/configs/ea3131/usbserial/defconfig @@ -431,28 +431,28 @@ CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y CONFIG_SERIAL_REMOVABLE=y # CONFIG_16550_UART is not set -CONFIG_ARCH_HAVE_UART=y -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +CONFIG_UART_SERIALDRIVER=y +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/ea3152/ostest/defconfig b/configs/ea3152/ostest/defconfig index bf1647db111..598fabeb5ab 100644 --- a/configs/ea3152/ostest/defconfig +++ b/configs/ea3152/ostest/defconfig @@ -357,27 +357,27 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set -CONFIG_ARCH_HAVE_UART=y -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set +CONFIG_UART_SERIALDRIVER=y +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/ea3152/src/lpc31_appinit.c b/configs/ea3152/src/lpc31_appinit.c index e77cdb63ef3..e05327622c1 100644 --- a/configs/ea3152/src/lpc31_appinit.c +++ b/configs/ea3152/src/lpc31_appinit.c @@ -107,9 +107,24 @@ * Description: * Perform architecture specific initialization * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #ifdef NSH_HAVEMMCSD FAR struct sdio_dev_s *sdio; diff --git a/configs/eagle100/httpd/defconfig b/configs/eagle100/httpd/defconfig index f894505a3a7..96e0b09524e 100644 --- a/configs/eagle100/httpd/defconfig +++ b/configs/eagle100/httpd/defconfig @@ -352,7 +352,7 @@ CONFIG_NETDEVICES=y CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set -CONFIG_ARCH_HAVE_UART0=y +CONFIG_UART0_SERIALDRIVER=y # # USART Configuration diff --git a/configs/eagle100/nettest/defconfig b/configs/eagle100/nettest/defconfig index aaf5566121d..bd692c7ffa9 100644 --- a/configs/eagle100/nettest/defconfig +++ b/configs/eagle100/nettest/defconfig @@ -475,28 +475,28 @@ CONFIG_NETDEVICES=y CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/eagle100/nsh/defconfig b/configs/eagle100/nsh/defconfig index 03426ceba06..b8227f844f6 100644 --- a/configs/eagle100/nsh/defconfig +++ b/configs/eagle100/nsh/defconfig @@ -518,28 +518,28 @@ CONFIG_ARCH_HAVE_NETDEV_STATISTICS=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/eagle100/nxflat/defconfig b/configs/eagle100/nxflat/defconfig index ee72ff1b14d..67b18010a40 100644 --- a/configs/eagle100/nxflat/defconfig +++ b/configs/eagle100/nxflat/defconfig @@ -325,27 +325,27 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/eagle100/src/lm_appinit.c b/configs/eagle100/src/lm_appinit.c index 6594f5abb1a..72b7206fad2 100644 --- a/configs/eagle100/src/lm_appinit.c +++ b/configs/eagle100/src/lm_appinit.c @@ -103,9 +103,24 @@ * Description: * Perform architecture specific initialization * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { FAR struct spi_dev_s *spi; int ret; diff --git a/configs/eagle100/thttpd/defconfig b/configs/eagle100/thttpd/defconfig index 081cb7a9830..9bd0ee452b5 100644 --- a/configs/eagle100/thttpd/defconfig +++ b/configs/eagle100/thttpd/defconfig @@ -459,28 +459,28 @@ CONFIG_NETDEVICES=y CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/efm32-g8xx-stk/nsh/defconfig b/configs/efm32-g8xx-stk/nsh/defconfig index 899fdd919c7..a3112c194cb 100644 --- a/configs/efm32-g8xx-stk/nsh/defconfig +++ b/configs/efm32-g8xx-stk/nsh/defconfig @@ -384,28 +384,28 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -CONFIG_ARCH_HAVE_OTHER_UART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +CONFIG_OTHER_UART_SERIALDRIVER=y # # USART Configuration diff --git a/configs/efm32gg-stk3700/nsh/defconfig b/configs/efm32gg-stk3700/nsh/defconfig index 0649d6b5e1a..d8d3ea37a76 100644 --- a/configs/efm32gg-stk3700/nsh/defconfig +++ b/configs/efm32gg-stk3700/nsh/defconfig @@ -411,28 +411,28 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -CONFIG_ARCH_HAVE_OTHER_UART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +CONFIG_OTHER_UART_SERIALDRIVER=y # # USART Configuration diff --git a/configs/ekk-lm3s9b96/nsh/defconfig b/configs/ekk-lm3s9b96/nsh/defconfig index 146fb4c3cce..3d89e90c42e 100644 --- a/configs/ekk-lm3s9b96/nsh/defconfig +++ b/configs/ekk-lm3s9b96/nsh/defconfig @@ -507,28 +507,28 @@ CONFIG_ARCH_HAVE_NETDEV_STATISTICS=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/ekk-lm3s9b96/src/lm_appinit.c b/configs/ekk-lm3s9b96/src/lm_appinit.c index 313bdc9783f..21be2c1952a 100644 --- a/configs/ekk-lm3s9b96/src/lm_appinit.c +++ b/configs/ekk-lm3s9b96/src/lm_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/ekk-lm3s9b96/src/lm_appinit.c * - * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2012, 2016 Gregory Nutt. All rights reserved. * Authors: Gregory Nutt * Jose Pablo Rojas V. * @@ -60,9 +60,24 @@ * Description: * Perform architecture specific initialization * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { return OK; } diff --git a/configs/ez80f910200kitg/ostest/defconfig b/configs/ez80f910200kitg/ostest/defconfig index b85a58b23ce..106998a223d 100644 --- a/configs/ez80f910200kitg/ostest/defconfig +++ b/configs/ez80f910200kitg/ostest/defconfig @@ -381,28 +381,28 @@ CONFIG_MMCSD_HAVECARDDETECT=y CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/ez80f910200zco/dhcpd/defconfig b/configs/ez80f910200zco/dhcpd/defconfig index 7767fcc543a..615994d436c 100644 --- a/configs/ez80f910200zco/dhcpd/defconfig +++ b/configs/ez80f910200zco/dhcpd/defconfig @@ -427,28 +427,28 @@ CONFIG_ETH0_PHY_AM79C874=y CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/ez80f910200zco/httpd/defconfig b/configs/ez80f910200zco/httpd/defconfig index 084ec33edf6..fe55d601b77 100644 --- a/configs/ez80f910200zco/httpd/defconfig +++ b/configs/ez80f910200zco/httpd/defconfig @@ -436,28 +436,28 @@ CONFIG_ETH0_PHY_AM79C874=y CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/ez80f910200zco/nettest/defconfig b/configs/ez80f910200zco/nettest/defconfig index 8dd72d76fbc..66eb97ef721 100644 --- a/configs/ez80f910200zco/nettest/defconfig +++ b/configs/ez80f910200zco/nettest/defconfig @@ -428,28 +428,28 @@ CONFIG_ETH0_PHY_AM79C874=y CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/ez80f910200zco/nsh/defconfig b/configs/ez80f910200zco/nsh/defconfig index 714dccfa3f3..4ddd6319825 100644 --- a/configs/ez80f910200zco/nsh/defconfig +++ b/configs/ez80f910200zco/nsh/defconfig @@ -439,28 +439,28 @@ CONFIG_ETH0_PHY_AM79C874=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/ez80f910200zco/poll/defconfig b/configs/ez80f910200zco/poll/defconfig index 336e8aa08a7..b8effce8d09 100644 --- a/configs/ez80f910200zco/poll/defconfig +++ b/configs/ez80f910200zco/poll/defconfig @@ -435,28 +435,28 @@ CONFIG_ETH0_PHY_AM79C874=y CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/fire-stm32v2/nsh/defconfig b/configs/fire-stm32v2/nsh/defconfig index bc729a38586..c45b204918d 100644 --- a/configs/fire-stm32v2/nsh/defconfig +++ b/configs/fire-stm32v2/nsh/defconfig @@ -80,6 +80,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -98,6 +99,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -119,6 +121,7 @@ CONFIG_ARCH_CORTEXM3=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -126,6 +129,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y # CONFIG_ARMV7M_LAZYFPU is not set # CONFIG_ARCH_HAVE_FPU is not set # CONFIG_ARCH_HAVE_DPFPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -136,6 +140,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARW is not set # CONFIG_ARMV7M_TOOLCHAIN_ATOLLIC is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDW is not set @@ -248,6 +253,7 @@ CONFIG_ARCH_CHIP_STM32F103VE=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -424,14 +430,20 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_STM32_TIM5_CAP is not set # CONFIG_STM32_TIM8_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART1_SERIALDRIVER=y +# CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set +CONFIG_STM32_USART2_SERIALDRIVER=y +# CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # @@ -793,34 +805,28 @@ CONFIG_ENC28J60_FREQUENCY=20000000 CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -CONFIG_ARCH_HAVE_USART1=y -CONFIG_ARCH_HAVE_USART2=y -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART1_ISUART=y -CONFIG_USART2_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +CONFIG_USART2_SERIALDRIVER=y +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -1131,6 +1137,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set CONFIG_LIBC_NETDB=y # CONFIG_NETDB_HOSTFILE is not set CONFIG_NETDB_DNSCLIENT=y @@ -1261,6 +1269,7 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_NETUTILS_CODECS is not set # CONFIG_NETUTILS_DHCPC is not set # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/fire-stm32v2/src/Makefile b/configs/fire-stm32v2/src/Makefile index c9c97c43e83..ea45dc76231 100644 --- a/configs/fire-stm32v2/src/Makefile +++ b/configs/fire-stm32v2/src/Makefile @@ -72,8 +72,4 @@ ifeq ($(CONFIG_USBDEV_COMPOSITE),y) CSRCS += stm32_composite.c endif -ifeq ($(CONFIG_WATCHDOG),y) -CSRCS += stm32_watchdog.c -endif - include $(TOPDIR)/configs/Board.mk diff --git a/configs/fire-stm32v2/src/stm32_appinit.c b/configs/fire-stm32v2/src/stm32_appinit.c index 8c45062a8f3..e8711ef204a 100644 --- a/configs/fire-stm32v2/src/stm32_appinit.c +++ b/configs/fire-stm32v2/src/stm32_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/fire-stm32v2/src/stm32_appinit.c * - * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2012, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -196,9 +196,24 @@ static void stm32_i2ctool(void) * Description: * Perform architecture specific initialization * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #if defined(HAVE_MMCSD) || defined(HAVE_W25) int ret; diff --git a/configs/freedom-kl25z/minnsh/defconfig b/configs/freedom-kl25z/minnsh/defconfig index 0bcfe2f3407..753da383ba1 100644 --- a/configs/freedom-kl25z/minnsh/defconfig +++ b/configs/freedom-kl25z/minnsh/defconfig @@ -353,28 +353,28 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/freedom-kl25z/nsh/defconfig b/configs/freedom-kl25z/nsh/defconfig index b95602880d4..7a97b9a5bb5 100644 --- a/configs/freedom-kl25z/nsh/defconfig +++ b/configs/freedom-kl25z/nsh/defconfig @@ -385,28 +385,28 @@ CONFIG_PWM=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/freedom-kl25z/src/kl_appinit.c b/configs/freedom-kl25z/src/kl_appinit.c index a58a43c0bd6..a00e675cdd8 100644 --- a/configs/freedom-kl25z/src/kl_appinit.c +++ b/configs/freedom-kl25z/src/kl_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/stm32f4discovery/src/kl_appinit.c * - * Copyright (C) 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2013, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -59,13 +59,26 @@ * Name: board_app_initialize * * Description: - * Perform application specific initialization. This function is never - * called directly from application code, but only indirectly via the - * (non-standard) boardctl() interface using the command BOARDIOC_INIT. + * Perform architecture specific initialization + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #if defined(CONFIG_SENSORS_ADXL345) int ret; diff --git a/configs/freedom-kl25z/src/kl_boardinitialize.c b/configs/freedom-kl25z/src/kl_boardinitialize.c index 2ab54047bef..4da407d2385 100644 --- a/configs/freedom-kl25z/src/kl_boardinitialize.c +++ b/configs/freedom-kl25z/src/kl_boardinitialize.c @@ -124,7 +124,7 @@ void board_initialize(void) */ #if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_LIB_BOARDCTL) - (void)board_app_initialize(); + (void)board_app_initialize(0); #endif /* CC3000 wireless initialization */ diff --git a/configs/freedom-kl26z/minnsh/defconfig b/configs/freedom-kl26z/minnsh/defconfig index 74c11f304a5..843bd482e05 100644 --- a/configs/freedom-kl26z/minnsh/defconfig +++ b/configs/freedom-kl26z/minnsh/defconfig @@ -356,28 +356,28 @@ CONFIG_SPI_EXCHANGE=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/freedom-kl26z/nsh/defconfig b/configs/freedom-kl26z/nsh/defconfig index ec69cb5241e..40157e1b53b 100644 --- a/configs/freedom-kl26z/nsh/defconfig +++ b/configs/freedom-kl26z/nsh/defconfig @@ -385,28 +385,28 @@ CONFIG_PWM=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/freedom-kl26z/src/kl_appinit.c b/configs/freedom-kl26z/src/kl_appinit.c index c4e5ad7d424..96ac70a0617 100644 --- a/configs/freedom-kl26z/src/kl_appinit.c +++ b/configs/freedom-kl26z/src/kl_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/stm32f4discovery/src/kl_appinit.c * - * Copyright (C) 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -57,13 +57,26 @@ * Name: board_app_initialize * * Description: - * Perform application specific initialization. This function is never - * called directly from application code, but only indirectly via the - * (non-standard) boardctl() interface using the command BOARDIOC_INIT. + * Perform architecture specific initialization + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { return OK; } diff --git a/configs/freedom-kl26z/src/kl_boardinitialize.c b/configs/freedom-kl26z/src/kl_boardinitialize.c index 004274c6f62..3a3be5190a2 100644 --- a/configs/freedom-kl26z/src/kl_boardinitialize.c +++ b/configs/freedom-kl26z/src/kl_boardinitialize.c @@ -124,7 +124,7 @@ void board_initialize(void) */ #if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_LIB_BOARDCTL) - (void)board_app_initialize(); + (void)board_app_initialize(0); #endif } #endif diff --git a/configs/hymini-stm32v/buttons/defconfig b/configs/hymini-stm32v/buttons/defconfig index edda72f4cff..3141e0c1605 100644 --- a/configs/hymini-stm32v/buttons/defconfig +++ b/configs/hymini-stm32v/buttons/defconfig @@ -76,6 +76,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -94,6 +95,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -115,6 +117,7 @@ CONFIG_ARCH_CORTEXM3=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -122,6 +125,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y # CONFIG_ARMV7M_LAZYFPU is not set # CONFIG_ARCH_HAVE_FPU is not set # CONFIG_ARCH_HAVE_DPFPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -132,6 +136,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set # CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set @@ -238,6 +243,7 @@ CONFIG_ARCH_CHIP_STM32F103VC=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -408,13 +414,17 @@ CONFIG_STM32_JTAG_DISABLE=y # CONFIG_STM32_TIM5_CAP is not set # CONFIG_STM32_TIM8_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART1_SERIALDRIVER=y +# CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set CONFIG_STM32_HAVE_RTC_COUNTER=y # CONFIG_STM32_HAVE_RTC_SUBSECONDS is not set @@ -677,33 +687,28 @@ CONFIG_ARCH_HAVE_I2CRESET=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -CONFIG_ARCH_HAVE_USART1=y -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART1_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -841,6 +846,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # @@ -925,7 +932,6 @@ CONFIG_EXAMPLES_BUTTONS_NAME7="Button 7" # CONFIG_EXAMPLES_TIFF is not set # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_WEBSERVER is not set -# CONFIG_EXAMPLES_USBSERIAL is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set @@ -961,6 +967,7 @@ CONFIG_EXAMPLES_BUTTONS_NAME7="Button 7" # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/hymini-stm32v/nsh/defconfig b/configs/hymini-stm32v/nsh/defconfig index c968013077c..69662e887c4 100644 --- a/configs/hymini-stm32v/nsh/defconfig +++ b/configs/hymini-stm32v/nsh/defconfig @@ -76,6 +76,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -94,6 +95,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -115,6 +117,7 @@ CONFIG_ARCH_CORTEXM3=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -122,6 +125,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y # CONFIG_ARMV7M_LAZYFPU is not set # CONFIG_ARCH_HAVE_FPU is not set # CONFIG_ARCH_HAVE_DPFPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -132,6 +136,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set # CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set @@ -240,6 +245,7 @@ CONFIG_ARCH_CHIP_STM32F103VC=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -411,13 +417,17 @@ CONFIG_STM32_JTAG_DISABLE=y # CONFIG_STM32_TIM5_CAP is not set # CONFIG_STM32_TIM8_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART1_SERIALDRIVER=y +# CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # @@ -706,33 +716,28 @@ CONFIG_SDIO_PREFLIGHT=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -CONFIG_ARCH_HAVE_USART1=y -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART1_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -878,6 +883,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # CONFIG_NETDB_HOSTFILE is not set @@ -990,6 +997,7 @@ CONFIG_EXAMPLES_NSH=y # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/hymini-stm32v/nsh2/defconfig b/configs/hymini-stm32v/nsh2/defconfig index faabb689b9a..e36492fc6aa 100644 --- a/configs/hymini-stm32v/nsh2/defconfig +++ b/configs/hymini-stm32v/nsh2/defconfig @@ -76,6 +76,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -94,6 +95,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -115,6 +117,7 @@ CONFIG_ARCH_CORTEXM3=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -122,6 +125,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y # CONFIG_ARMV7M_LAZYFPU is not set # CONFIG_ARCH_HAVE_FPU is not set # CONFIG_ARCH_HAVE_DPFPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -132,6 +136,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set # CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set @@ -240,6 +245,7 @@ CONFIG_ARCH_CHIP_STM32F103VC=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -418,13 +424,17 @@ CONFIG_STM32_JTAG_DISABLE=y # CONFIG_STM32_TIM5_CAP is not set # CONFIG_STM32_TIM8_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART1_SERIALDRIVER=y +# CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # @@ -794,33 +804,28 @@ CONFIG_SDIO_PREFLIGHT=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -CONFIG_ARCH_HAVE_USART1=y -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART1_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -857,7 +862,6 @@ CONFIG_USBDEV_MAXPOWER=100 # CONFIG_ARCH_USBDEV_STALLQUEUE is not set CONFIG_USBDEV_TRACE=y CONFIG_USBDEV_TRACE_NRECORDS=128 -# CONFIG_USBDEV_TRACE_STRINGS is not set # CONFIG_USBDEV_TRACE_INITIALIDSET is not set # @@ -952,6 +956,7 @@ CONFIG_NX_LCDDRIVER=y CONFIG_NX_NPLANES=1 CONFIG_NX_BGCOLOR=0x0 # CONFIG_NX_WRITEONLY is not set +# CONFIG_NX_UPDATE is not set # # Supported Pixel Depths @@ -1096,6 +1101,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # CONFIG_NETDB_HOSTFILE is not set @@ -1191,6 +1198,7 @@ CONFIG_EXAMPLES_NXIMAGE=y CONFIG_EXAMPLES_NXIMAGE_VPLANE=0 CONFIG_EXAMPLES_NXIMAGE_DEVNO=0 CONFIG_EXAMPLES_NXIMAGE_BPP=16 +# CONFIG_EXAMPLES_NXIMAGE_GREYSCALE is not set # CONFIG_EXAMPLES_NXIMAGE_XSCALEp5 is not set CONFIG_EXAMPLES_NXIMAGE_XSCALE1p0=y # CONFIG_EXAMPLES_NXIMAGE_XSCALE1p5 is not set @@ -1266,6 +1274,7 @@ CONFIG_EXAMPLES_TOUCHSCREEN_ARCHINIT=y # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/hymini-stm32v/src/Makefile b/configs/hymini-stm32v/src/Makefile index f4a6dc26033..f709a57b8d2 100644 --- a/configs/hymini-stm32v/src/Makefile +++ b/configs/hymini-stm32v/src/Makefile @@ -59,8 +59,4 @@ ifeq ($(CONFIG_USBMSC),y) CSRCS += stm32_usbmsc.c endif -ifeq ($(CONFIG_WATCHDOG),y) -CSRCS += stm32_watchdog.c -endif - include $(TOPDIR)/configs/Board.mk diff --git a/configs/hymini-stm32v/src/stm32_appinit.c b/configs/hymini-stm32v/src/stm32_appinit.c index df8adca9070..4a7b2206337 100644 --- a/configs/hymini-stm32v/src/stm32_appinit.c +++ b/configs/hymini-stm32v/src/stm32_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/hymini-stm32v/src/stm32_appinit.c * - * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved. + * Copyright (C) 2009, 2011, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -151,9 +151,24 @@ static int nsh_cdinterrupt(int irq, FAR void *context) * Description: * Perform architecture specific initialization * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #ifdef NSH_HAVEMMCSD int ret; diff --git a/configs/hymini-stm32v/src/stm32_watchdog.c b/configs/hymini-stm32v/src/stm32_watchdog.c deleted file mode 100644 index db143f67b1f..00000000000 --- a/configs/hymini-stm32v/src/stm32_watchdog.c +++ /dev/null @@ -1,135 +0,0 @@ -/************************************************************************************ - * configs/hymini-stm32v/src/stm32_watchdog.c - * - * Copyright (C) 2012 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * 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. - * - ************************************************************************************/ - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include -#include - -#include -#include - -#include "stm32_wdg.h" - -#ifdef CONFIG_WATCHDOG - -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ -/* Configuration *******************************************************************/ -/* Wathdog hardware should be enabled */ - -#if !defined(CONFIG_STM32_WWDG) && !defined(CONFIG_STM32_IWDG) -# warning "One of CONFIG_STM32_WWDG or CONFIG_STM32_IWDG must be defined" -#endif - -/* Select the path to the registered watchdog timer device */ - -#ifndef CONFIG_STM32_WDG_DEVPATH -# ifdef CONFIG_EXAMPLES_WATCHDOG_DEVPATH -# define CONFIG_STM32_WDG_DEVPATH CONFIG_EXAMPLES_WATCHDOG_DEVPATH -# else -# define CONFIG_STM32_WDG_DEVPATH "/dev/watchdog0" -# endif -#endif - -/* Use the un-calibrated LSI frequency if we have nothing better */ - -#if defined(CONFIG_STM32_IWDG) && !defined(CONFIG_STM32_LSIFREQ) -# define CONFIG_STM32_LSIFREQ STM32_LSI_FREQUENCY -#endif - -/* Debug ***************************************************************************/ -/* Non-standard debug that may be enabled just for testing the watchdog timer */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_WATCHDOG -#endif - -#ifdef CONFIG_DEBUG_WATCHDOG -# define wdgdbg dbg -# define wdglldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define wdgvdbg vdbg -# define wdgllvdbg llvdbg -# else -# define wdgvdbg(x...) -# define wdgllvdbg(x...) -# endif -#else -# define wdgdbg(x...) -# define wdglldbg(x...) -# define wdgvdbg(x...) -# define wdgllvdbg(x...) -#endif - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -/**************************************************************************** - * Name: up_wdginitialize() - * - * Description: - * Perform architecuture-specific initialization of the Watchdog hardware. - * This interface must be provided by all configurations using - * apps/examples/watchdog - * - ****************************************************************************/ - -int up_wdginitialize(void) -{ - /* Initialize tha register the watchdog timer device */ - -#if defined(CONFIG_STM32_WWDG) - stm32_wwdginitialize(CONFIG_STM32_WDG_DEVPATH); - return OK; -#elif defined(CONFIG_STM32_IWDG) - stm32_iwdginitialize(CONFIG_STM32_WDG_DEVPATH, CONFIG_STM32_LSIFREQ); - return OK; -#else - return -ENODEV; -#endif -} - -#endif /* CONFIG_WATCHDOG */ diff --git a/configs/hymini-stm32v/usbmsc/defconfig b/configs/hymini-stm32v/usbmsc/defconfig index b5514012449..a38efa7b82f 100644 --- a/configs/hymini-stm32v/usbmsc/defconfig +++ b/configs/hymini-stm32v/usbmsc/defconfig @@ -76,6 +76,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -94,6 +95,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -115,6 +117,7 @@ CONFIG_ARCH_CORTEXM3=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -122,6 +125,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y # CONFIG_ARMV7M_LAZYFPU is not set # CONFIG_ARCH_HAVE_FPU is not set # CONFIG_ARCH_HAVE_DPFPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -132,6 +136,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL=y @@ -240,6 +245,7 @@ CONFIG_ARCH_CHIP_STM32F103VC=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -413,14 +419,20 @@ CONFIG_STM32_JTAG_DISABLE=y # CONFIG_STM32_TIM5_CAP is not set # CONFIG_STM32_TIM8_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART1_SERIALDRIVER=y +# CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set +CONFIG_STM32_USART2_SERIALDRIVER=y +# CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # @@ -525,7 +537,14 @@ CONFIG_ARCH_HAVE_IRQBUTTONS=y # Board-Specific Options # CONFIG_LIB_BOARDCTL=y +# CONFIG_BOARDCTL_RESET is not set +# CONFIG_BOARDCTL_UNIQUEID is not set CONFIG_BOARDCTL_USBDEVCTRL=y +# CONFIG_BOARDCTL_TSCTEST is not set +# CONFIG_BOARDCTL_ADCTEST is not set +# CONFIG_BOARDCTL_PWMTEST is not set +# CONFIG_BOARDCTL_GRAPHICS is not set +# CONFIG_BOARDCTL_IOCTL is not set # # RTOS Features @@ -701,34 +720,28 @@ CONFIG_SDIO_PREFLIGHT=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -CONFIG_ARCH_HAVE_USART1=y -CONFIG_ARCH_HAVE_USART2=y -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART1_ISUART=y -CONFIG_USART2_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +CONFIG_USART2_SERIALDRIVER=y +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -922,6 +935,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # CONFIG_NETDB_HOSTFILE is not set @@ -1033,6 +1048,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/hymini-stm32v/usbnsh/defconfig b/configs/hymini-stm32v/usbnsh/defconfig index a5bc5c22840..d744b1a2ca9 100644 --- a/configs/hymini-stm32v/usbnsh/defconfig +++ b/configs/hymini-stm32v/usbnsh/defconfig @@ -76,6 +76,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -94,6 +95,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -115,6 +117,7 @@ CONFIG_ARCH_CORTEXM3=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -122,6 +125,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y # CONFIG_ARMV7M_LAZYFPU is not set # CONFIG_ARCH_HAVE_FPU is not set # CONFIG_ARCH_HAVE_DPFPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -132,6 +136,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set # CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set @@ -238,6 +243,7 @@ CONFIG_ARCH_CHIP_STM32F103VC=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -408,13 +414,17 @@ CONFIG_STM32_JTAG_DISABLE=y # CONFIG_STM32_TIM5_CAP is not set # CONFIG_STM32_TIM8_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART1_SERIALDRIVER=y +# CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set CONFIG_STM32_HAVE_RTC_COUNTER=y # CONFIG_STM32_HAVE_RTC_SUBSECONDS is not set @@ -516,7 +526,14 @@ CONFIG_NSH_MMCSDMINOR=0 # Board-Specific Options # CONFIG_LIB_BOARDCTL=y +# CONFIG_BOARDCTL_RESET is not set +# CONFIG_BOARDCTL_UNIQUEID is not set CONFIG_BOARDCTL_USBDEVCTRL=y +# CONFIG_BOARDCTL_TSCTEST is not set +# CONFIG_BOARDCTL_ADCTEST is not set +# CONFIG_BOARDCTL_PWMTEST is not set +# CONFIG_BOARDCTL_GRAPHICS is not set +# CONFIG_BOARDCTL_IOCTL is not set # # RTOS Features @@ -680,33 +697,28 @@ CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set CONFIG_SERIAL_REMOVABLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -CONFIG_ARCH_HAVE_USART1=y -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART1_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -760,8 +772,8 @@ CONFIG_CDCACM_EPBULKOUT_HSSIZE=512 CONFIG_CDCACM_EPBULKIN=2 CONFIG_CDCACM_EPBULKIN_FSSIZE=64 CONFIG_CDCACM_EPBULKIN_HSSIZE=512 -CONFIG_CDCACM_NWRREQS=4 CONFIG_CDCACM_NRDREQS=4 +CONFIG_CDCACM_NWRREQS=4 CONFIG_CDCACM_BULKIN_REQLEN=96 CONFIG_CDCACM_RXBUFSIZE=256 CONFIG_CDCACM_TXBUFSIZE=256 @@ -886,6 +898,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # @@ -1006,6 +1020,7 @@ CONFIG_EXAMPLES_NSH=y # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/hymini-stm32v/usbserial/defconfig b/configs/hymini-stm32v/usbserial/defconfig index 7d41d164709..6183ec98d4f 100644 --- a/configs/hymini-stm32v/usbserial/defconfig +++ b/configs/hymini-stm32v/usbserial/defconfig @@ -117,6 +117,7 @@ CONFIG_ARCH_CORTEXM3=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -135,6 +136,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL=y @@ -241,6 +243,7 @@ CONFIG_ARCH_CHIP_STM32F103VC=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -412,14 +415,20 @@ CONFIG_STM32_JTAG_DISABLE=y # CONFIG_STM32_TIM5_CAP is not set # CONFIG_STM32_TIM8_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART1_SERIALDRIVER=y +# CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set +CONFIG_STM32_USART2_SERIALDRIVER=y +# CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set CONFIG_STM32_HAVE_RTC_COUNTER=y # CONFIG_STM32_HAVE_RTC_SUBSECONDS is not set @@ -686,34 +695,28 @@ CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set CONFIG_SERIAL_REMOVABLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -CONFIG_ARCH_HAVE_USART1=y -CONFIG_ARCH_HAVE_USART2=y -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART1_ISUART=y -CONFIG_USART2_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +CONFIG_USART2_SERIALDRIVER=y +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -1008,6 +1011,7 @@ CONFIG_EXAMPLES_USBSERIAL_BUFSIZE=512 # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/kwikstik-k40/ostest/defconfig b/configs/kwikstik-k40/ostest/defconfig index 1f886be274e..51b5c56a7a4 100644 --- a/configs/kwikstik-k40/ostest/defconfig +++ b/configs/kwikstik-k40/ostest/defconfig @@ -420,28 +420,28 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -CONFIG_ARCH_HAVE_UART5=y -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +CONFIG_UART5_SERIALDRIVER=y +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/kwikstik-k40/src/k40_appinit.c b/configs/kwikstik-k40/src/k40_appinit.c index 1fb77c36346..43694bce935 100644 --- a/configs/kwikstik-k40/src/k40_appinit.c +++ b/configs/kwikstik-k40/src/k40_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/kwikstik-k40/src/k40_appinit.c * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. + * Copyright (C) 2011, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -185,9 +185,24 @@ static int kinetis_cdinterrupt(int irq, FAR void *context) * Description: * Perform architecture specific initialization * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #ifdef NSH_HAVEMMCSD int ret; diff --git a/configs/launchxl-tms57004/nsh/defconfig b/configs/launchxl-tms57004/nsh/defconfig index c0a16a9c21c..082be95f2bd 100644 --- a/configs/launchxl-tms57004/nsh/defconfig +++ b/configs/launchxl-tms57004/nsh/defconfig @@ -424,28 +424,28 @@ CONFIG_SPI_EXCHANGE=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -CONFIG_ARCH_HAVE_SCI1=y -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +CONFIG_SCI1_SERIALDRIVER=y +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/launchxl-tms57004/src/tms570_appinit.c b/configs/launchxl-tms57004/src/tms570_appinit.c index 448ea165775..6a187b033fd 100644 --- a/configs/launchxl-tms57004/src/tms570_appinit.c +++ b/configs/launchxl-tms57004/src/tms570_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/launchxl_tms57004/src/sim_appinit.c * - * Copyright (C) 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -50,14 +50,27 @@ * Name: board_app_initialize * * Description: - * Perform application specific initialization. This function is never - * called directly from application code, but only indirectly via the - * (non-standard) boardctl() interface using the command BOARDIOC_INIT. + * Perform architecture specific initialization + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. * ****************************************************************************/ #ifdef CONFIG_LIB_BOARDCTL -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #ifndef CONFIG_BOARD_INITIALIZE /* Perform application level board initialization (if that was not already diff --git a/configs/lincoln60/netnsh/defconfig b/configs/lincoln60/netnsh/defconfig index d8da29e553d..95feb4b7f4d 100644 --- a/configs/lincoln60/netnsh/defconfig +++ b/configs/lincoln60/netnsh/defconfig @@ -502,28 +502,28 @@ CONFIG_ETH0_PHY_KSZ8041=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/lincoln60/nsh/defconfig b/configs/lincoln60/nsh/defconfig index 71ddd71b843..54c6ad3f8cc 100644 --- a/configs/lincoln60/nsh/defconfig +++ b/configs/lincoln60/nsh/defconfig @@ -428,28 +428,28 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/lincoln60/src/lpc17_appinit.c b/configs/lincoln60/src/lpc17_appinit.c index a10646e7517..2e1426635ca 100644 --- a/configs/lincoln60/src/lpc17_appinit.c +++ b/configs/lincoln60/src/lpc17_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/lincoln60/src/lpc17_appinit.c * - * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2012, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -47,10 +47,6 @@ #include #include -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -61,9 +57,24 @@ * Description: * Perform architecture specific initialization * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { return OK; } diff --git a/configs/lincoln60/thttpd-binfs/defconfig b/configs/lincoln60/thttpd-binfs/defconfig index fe49078c526..a752c4c72ff 100644 --- a/configs/lincoln60/thttpd-binfs/defconfig +++ b/configs/lincoln60/thttpd-binfs/defconfig @@ -466,28 +466,28 @@ CONFIG_ETH0_PHY_KSZ8041=y CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/lm3s6432-s2e/nsh/defconfig b/configs/lm3s6432-s2e/nsh/defconfig index 0c8509b814c..e2984929334 100644 --- a/configs/lm3s6432-s2e/nsh/defconfig +++ b/configs/lm3s6432-s2e/nsh/defconfig @@ -485,28 +485,28 @@ CONFIG_ARCH_HAVE_NETDEV_STATISTICS=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -CONFIG_ARCH_HAVE_UART1=y -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +CONFIG_UART1_SERIALDRIVER=y +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/lm3s6432-s2e/src/lm_appinit.c b/configs/lm3s6432-s2e/src/lm_appinit.c index ff747854259..d787ea32583 100644 --- a/configs/lm3s6432-s2e/src/lm_appinit.c +++ b/configs/lm3s6432-s2e/src/lm_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/lm3s6432-s2e/src/lm_appinit.c * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. + * Copyright (C) 2010, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -47,10 +47,6 @@ #include #include -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -61,9 +57,24 @@ * Description: * Perform architecture specific initialization * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { return OK; } diff --git a/configs/lm3s6965-ek/discover/defconfig b/configs/lm3s6965-ek/discover/defconfig index 3a0a9d97456..b43f67b956b 100644 --- a/configs/lm3s6965-ek/discover/defconfig +++ b/configs/lm3s6965-ek/discover/defconfig @@ -512,28 +512,28 @@ CONFIG_ARCH_HAVE_NETDEV_STATISTICS=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/lm3s6965-ek/nsh/defconfig b/configs/lm3s6965-ek/nsh/defconfig index 3a0a9d97456..b43f67b956b 100644 --- a/configs/lm3s6965-ek/nsh/defconfig +++ b/configs/lm3s6965-ek/nsh/defconfig @@ -512,28 +512,28 @@ CONFIG_ARCH_HAVE_NETDEV_STATISTICS=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/lm3s6965-ek/nx/defconfig b/configs/lm3s6965-ek/nx/defconfig index bdafa45c256..3d779630f9d 100644 --- a/configs/lm3s6965-ek/nx/defconfig +++ b/configs/lm3s6965-ek/nx/defconfig @@ -491,28 +491,28 @@ CONFIG_LCD_LANDSCAPE=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/lm3s6965-ek/src/lm_appinit.c b/configs/lm3s6965-ek/src/lm_appinit.c index 6f2480b80d0..c9eaf61d81c 100644 --- a/configs/lm3s6965-ek/src/lm_appinit.c +++ b/configs/lm3s6965-ek/src/lm_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/lm3s6965-ek/src/lm_appinit.c * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. + * Copyright (C) 2010, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -107,9 +107,24 @@ * Description: * Perform architecture specific initialization * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #ifdef NSH_HAVEMMCSD FAR struct spi_dev_s *spi; diff --git a/configs/lm3s6965-ek/tcpecho/defconfig b/configs/lm3s6965-ek/tcpecho/defconfig index a50ae7f2bc9..e655d4d6c13 100644 --- a/configs/lm3s6965-ek/tcpecho/defconfig +++ b/configs/lm3s6965-ek/tcpecho/defconfig @@ -481,28 +481,28 @@ CONFIG_ARCH_HAVE_NETDEV_STATISTICS=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/lm3s8962-ek/nsh/defconfig b/configs/lm3s8962-ek/nsh/defconfig index 0a28a1cea2a..48aac15aa02 100644 --- a/configs/lm3s8962-ek/nsh/defconfig +++ b/configs/lm3s8962-ek/nsh/defconfig @@ -522,28 +522,28 @@ CONFIG_ARCH_HAVE_NETDEV_STATISTICS=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/lm3s8962-ek/nx/defconfig b/configs/lm3s8962-ek/nx/defconfig index db5c996245f..c72dc447b56 100644 --- a/configs/lm3s8962-ek/nx/defconfig +++ b/configs/lm3s8962-ek/nx/defconfig @@ -501,28 +501,28 @@ CONFIG_LCD_LANDSCAPE=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/lm3s8962-ek/src/lm_appinit.c b/configs/lm3s8962-ek/src/lm_appinit.c index 7a027dda55a..ba601eacb67 100644 --- a/configs/lm3s8962-ek/src/lm_appinit.c +++ b/configs/lm3s8962-ek/src/lm_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/lm3s8962-ek/src/lm_appinit.c * - * Copyright (C) 2010, 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2010, 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -109,9 +109,24 @@ * Description: * Perform architecture specific initialization * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #ifdef NSH_HAVEMMCSD FAR struct spi_dev_s *spi; diff --git a/configs/lm4f120-launchpad/nsh/defconfig b/configs/lm4f120-launchpad/nsh/defconfig index 8156396e3e6..61ff3481e35 100644 --- a/configs/lm4f120-launchpad/nsh/defconfig +++ b/configs/lm4f120-launchpad/nsh/defconfig @@ -327,27 +327,27 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/lm4f120-launchpad/src/lm4f_appinit.c b/configs/lm4f120-launchpad/src/lm4f_appinit.c index b557f771f57..f667597398d 100644 --- a/configs/lm4f120-launchpad/src/lm4f_appinit.c +++ b/configs/lm4f120-launchpad/src/lm4f_appinit.c @@ -2,7 +2,7 @@ * config/lm4f120-launchpad/src/lm4f_appinit.c * arch/arm/src/board/lm4f_appinit.c * - * Copyright (C) 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2013, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -79,9 +79,24 @@ * Description: * Perform architecture specific initialization * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { return OK; } diff --git a/configs/lpc4330-xplorer/nsh/defconfig b/configs/lpc4330-xplorer/nsh/defconfig index 5250c0f226c..a6a461ba6c9 100644 --- a/configs/lpc4330-xplorer/nsh/defconfig +++ b/configs/lpc4330-xplorer/nsh/defconfig @@ -471,33 +471,32 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -CONFIG_ARCH_HAVE_USART0=y -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +CONFIG_USART0_SERIALDRIVER=y +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration # -CONFIG_USART0_ISUART=y CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y CONFIG_SERIAL_NPOLLWAITERS=2 diff --git a/configs/lpc4330-xplorer/src/lpc43_appinit.c b/configs/lpc4330-xplorer/src/lpc43_appinit.c index 6377c62de57..48225e0dde4 100644 --- a/configs/lpc4330-xplorer/src/lpc43_appinit.c +++ b/configs/lpc4330-xplorer/src/lpc43_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/lpc4330-xplorer/src/lpc43_appinit.c * - * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2012, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -139,9 +139,24 @@ static int nsh_spifi_initialize(void) * Description: * Perform architecture specific initialization * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { /* Initialize the SPIFI block device */ diff --git a/configs/lpc4337-ws/nsh/defconfig b/configs/lpc4337-ws/nsh/defconfig index 52536d55b2b..4f36719c26f 100644 --- a/configs/lpc4337-ws/nsh/defconfig +++ b/configs/lpc4337-ws/nsh/defconfig @@ -468,33 +468,32 @@ CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set CONFIG_SERIAL_REMOVABLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -CONFIG_ARCH_HAVE_USART2=y -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +CONFIG_USART2_SERIALDRIVER=y +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration # -CONFIG_USART2_ISUART=y CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y CONFIG_SERIAL_NPOLLWAITERS=2 diff --git a/configs/lpc4337-ws/src/lpc43_appinit.c b/configs/lpc4337-ws/src/lpc43_appinit.c index 83b8cddc1e9..976b78a4181 100644 --- a/configs/lpc4337-ws/src/lpc43_appinit.c +++ b/configs/lpc4337-ws/src/lpc43_appinit.c @@ -116,9 +116,24 @@ static void lpc43_i2ctool(void) * Description: * Perform architecture specific initialization * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { /* Register I2C drivers on behalf of the I2C tool */ diff --git a/configs/lpc4357-evb/nsh/defconfig b/configs/lpc4357-evb/nsh/defconfig index 68050c94d6d..e1f25c97d57 100644 --- a/configs/lpc4357-evb/nsh/defconfig +++ b/configs/lpc4357-evb/nsh/defconfig @@ -403,33 +403,32 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -CONFIG_ARCH_HAVE_USART0=y -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +CONFIG_USART0_SERIALDRIVER=y +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration # -CONFIG_USART0_ISUART=y CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y CONFIG_SERIAL_NPOLLWAITERS=2 diff --git a/configs/lpc4357-evb/src/lpc43_appinit.c b/configs/lpc4357-evb/src/lpc43_appinit.c index 2555797f22c..43efc040cee 100644 --- a/configs/lpc4357-evb/src/lpc43_appinit.c +++ b/configs/lpc4357-evb/src/lpc43_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/lpc4357-evb/src/lpc43_appinit.c * - * Copyright (C) 2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2014, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -139,9 +139,24 @@ static int nsh_spifi_initialize(void) * Description: * Perform architecture specific initialization * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { /* Initialize the SPIFI block device */ diff --git a/configs/lpc4370-link2/nsh/defconfig b/configs/lpc4370-link2/nsh/defconfig index 949db2b1e72..8a14cef0675 100644 --- a/configs/lpc4370-link2/nsh/defconfig +++ b/configs/lpc4370-link2/nsh/defconfig @@ -466,33 +466,32 @@ CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set CONFIG_SERIAL_REMOVABLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -CONFIG_ARCH_HAVE_USART2=y -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +CONFIG_USART2_SERIALDRIVER=y +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration # -CONFIG_USART2_ISUART=y CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y CONFIG_SERIAL_NPOLLWAITERS=2 diff --git a/configs/lpc4370-link2/src/lpc43_appinit.c b/configs/lpc4370-link2/src/lpc43_appinit.c index 74fce0eb1f4..660fb2e5f7c 100644 --- a/configs/lpc4370-link2/src/lpc43_appinit.c +++ b/configs/lpc4370-link2/src/lpc43_appinit.c @@ -116,9 +116,24 @@ static void lpc43_i2ctool(void) * Description: * Perform architecture specific initialization * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { /* Register I2C drivers on behalf of the I2C tool */ diff --git a/configs/lpcxpresso-lpc1115/minnsh/defconfig b/configs/lpcxpresso-lpc1115/minnsh/defconfig index d17358614bc..58ea587ca6b 100644 --- a/configs/lpcxpresso-lpc1115/minnsh/defconfig +++ b/configs/lpcxpresso-lpc1115/minnsh/defconfig @@ -367,28 +367,28 @@ CONFIG_DISABLE_POLL=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/lpcxpresso-lpc1115/nsh/defconfig b/configs/lpcxpresso-lpc1115/nsh/defconfig index bca4b63188b..fc7f470f6da 100644 --- a/configs/lpcxpresso-lpc1115/nsh/defconfig +++ b/configs/lpcxpresso-lpc1115/nsh/defconfig @@ -385,28 +385,28 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/lpcxpresso-lpc1115/src/lpc11_appinit.c b/configs/lpcxpresso-lpc1115/src/lpc11_appinit.c index bbe61c493da..3ca2de59692 100644 --- a/configs/lpcxpresso-lpc1115/src/lpc11_appinit.c +++ b/configs/lpcxpresso-lpc1115/src/lpc11_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/lpcxpresso-lpc1115/src/lpc11_appinit.c * - * Copyright (C) 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -99,14 +99,6 @@ # define CONFIG_NSH_MMCSDMINOR 0 #endif -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -117,9 +109,24 @@ * Description: * Perform architecture specific initialization * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #ifdef NSH_HAVEMMCSD FAR struct spi_dev_s *ssp; diff --git a/configs/lpcxpresso-lpc1768/dhcpd/defconfig b/configs/lpcxpresso-lpc1768/dhcpd/defconfig index c7504dbae6c..aca1a2a69b5 100644 --- a/configs/lpcxpresso-lpc1768/dhcpd/defconfig +++ b/configs/lpcxpresso-lpc1768/dhcpd/defconfig @@ -457,28 +457,28 @@ CONFIG_ETH0_PHY_LAN8720=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -CONFIG_ARCH_HAVE_UART3=y -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +CONFIG_UART3_SERIALDRIVER=y +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/lpcxpresso-lpc1768/nsh/defconfig b/configs/lpcxpresso-lpc1768/nsh/defconfig index 2726b4626c4..082098ca9fd 100644 --- a/configs/lpcxpresso-lpc1768/nsh/defconfig +++ b/configs/lpcxpresso-lpc1768/nsh/defconfig @@ -537,28 +537,28 @@ CONFIG_ETH0_PHY_LAN8720=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -CONFIG_ARCH_HAVE_UART3=y -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +CONFIG_UART3_SERIALDRIVER=y +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/lpcxpresso-lpc1768/nx/defconfig b/configs/lpcxpresso-lpc1768/nx/defconfig index bc3568b5aee..e604f2997f8 100644 --- a/configs/lpcxpresso-lpc1768/nx/defconfig +++ b/configs/lpcxpresso-lpc1768/nx/defconfig @@ -469,28 +469,28 @@ CONFIG_LCD_LANDSCAPE=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -CONFIG_ARCH_HAVE_UART3=y -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +CONFIG_UART3_SERIALDRIVER=y +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/lpcxpresso-lpc1768/src/lpc17_appinit.c b/configs/lpcxpresso-lpc1768/src/lpc17_appinit.c index a9b760b87c7..0aefdd37d44 100644 --- a/configs/lpcxpresso-lpc1768/src/lpc17_appinit.c +++ b/configs/lpcxpresso-lpc1768/src/lpc17_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/lpcxpresso-lpc1768/src/lpc17_appinit.c * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. + * Copyright (C) 2011, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -120,9 +120,24 @@ * Description: * Perform architecture specific initialization * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #ifdef NSH_HAVEMMCSD FAR struct spi_dev_s *ssp; diff --git a/configs/lpcxpresso-lpc1768/thttpd/defconfig b/configs/lpcxpresso-lpc1768/thttpd/defconfig index 5fc4662adc7..69b2148fdfc 100644 --- a/configs/lpcxpresso-lpc1768/thttpd/defconfig +++ b/configs/lpcxpresso-lpc1768/thttpd/defconfig @@ -457,28 +457,28 @@ CONFIG_ETH0_PHY_LAN8720=y CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -CONFIG_ARCH_HAVE_UART3=y -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +CONFIG_UART3_SERIALDRIVER=y +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/lpcxpresso-lpc1768/usbmsc/defconfig b/configs/lpcxpresso-lpc1768/usbmsc/defconfig index 8d68fff8ce0..a6d2fa0c3da 100644 --- a/configs/lpcxpresso-lpc1768/usbmsc/defconfig +++ b/configs/lpcxpresso-lpc1768/usbmsc/defconfig @@ -447,28 +447,28 @@ CONFIG_MMCSD_SPIMODE=0 CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -CONFIG_ARCH_HAVE_UART3=y -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +CONFIG_UART3_SERIALDRIVER=y +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/maple/nsh/defconfig b/configs/maple/nsh/defconfig index b791dbad74a..54ebb6d22ea 100644 --- a/configs/maple/nsh/defconfig +++ b/configs/maple/nsh/defconfig @@ -76,6 +76,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -94,6 +95,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -115,6 +117,7 @@ CONFIG_ARCH_CORTEXM3=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -122,6 +125,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y # CONFIG_ARMV7M_LAZYFPU is not set # CONFIG_ARCH_HAVE_FPU is not set # CONFIG_ARCH_HAVE_DPFPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -132,6 +136,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set # CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set @@ -238,6 +243,7 @@ CONFIG_ARCH_CHIP_STM32F103CB=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -405,13 +411,17 @@ CONFIG_STM32_JTAG_DISABLE=y # CONFIG_STM32_TIM5_CAP is not set # CONFIG_STM32_TIM8_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART1_SERIALDRIVER=y +# CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set CONFIG_STM32_HAVE_RTC_COUNTER=y # CONFIG_STM32_HAVE_RTC_SUBSECONDS is not set @@ -667,33 +677,28 @@ CONFIG_ARCH_HAVE_I2CRESET=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -CONFIG_ARCH_HAVE_USART1=y -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART1_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -730,7 +735,6 @@ CONFIG_USBDEV_MAXPOWER=100 # CONFIG_ARCH_USBDEV_STALLQUEUE is not set CONFIG_USBDEV_TRACE=y CONFIG_USBDEV_TRACE_NRECORDS=32 -# CONFIG_USBDEV_TRACE_STRINGS is not set # CONFIG_USBDEV_TRACE_INITIALIDSET is not set # @@ -860,6 +864,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # @@ -936,7 +942,6 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_TIFF is not set # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_WEBSERVER is not set -# CONFIG_EXAMPLES_USBSERIAL is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set @@ -972,6 +977,7 @@ CONFIG_EXAMPLES_NSH=y # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/maple/nx/defconfig b/configs/maple/nx/defconfig index 3d35cb2cfc0..b60f26e071e 100644 --- a/configs/maple/nx/defconfig +++ b/configs/maple/nx/defconfig @@ -76,6 +76,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -94,6 +95,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -115,6 +117,7 @@ CONFIG_ARCH_CORTEXM3=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -122,6 +125,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y # CONFIG_ARMV7M_LAZYFPU is not set # CONFIG_ARCH_HAVE_FPU is not set # CONFIG_ARCH_HAVE_DPFPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -132,6 +136,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set # CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set @@ -238,6 +243,7 @@ CONFIG_ARCH_CHIP_STM32F103CB=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -414,13 +420,17 @@ CONFIG_STM32_JTAG_DISABLE=y # CONFIG_STM32_TIM5_CAP is not set # CONFIG_STM32_TIM8_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART1_SERIALDRIVER=y +# CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # @@ -539,7 +549,14 @@ CONFIG_NSH_MMCSDMINOR=0 # CONFIG_MAPLE_MINI=y CONFIG_LIB_BOARDCTL=y +# CONFIG_BOARDCTL_RESET is not set +# CONFIG_BOARDCTL_UNIQUEID is not set CONFIG_BOARDCTL_USBDEVCTRL=y +# CONFIG_BOARDCTL_TSCTEST is not set +# CONFIG_BOARDCTL_ADCTEST is not set +# CONFIG_BOARDCTL_PWMTEST is not set +# CONFIG_BOARDCTL_GRAPHICS is not set +# CONFIG_BOARDCTL_IOCTL is not set # # RTOS Features @@ -728,6 +745,7 @@ CONFIG_LCD_LANDSCAPE=y # Alphanumeric/Segment LCD Devices # # CONFIG_LCD_LCD1602 is not set +# CONFIG_LCD_BACKPACK is not set # # LED Support @@ -747,33 +765,28 @@ CONFIG_LCD_LANDSCAPE=y CONFIG_SERIAL=y CONFIG_SERIAL_REMOVABLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -CONFIG_ARCH_HAVE_USART1=y -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART1_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -810,7 +823,6 @@ CONFIG_USBDEV_MAXPOWER=100 # CONFIG_ARCH_USBDEV_STALLQUEUE is not set CONFIG_USBDEV_TRACE=y CONFIG_USBDEV_TRACE_NRECORDS=32 -# CONFIG_USBDEV_TRACE_STRINGS is not set # CONFIG_USBDEV_TRACE_INITIALIDSET is not set # @@ -830,8 +842,8 @@ CONFIG_CDCACM_EPBULKOUT_HSSIZE=512 CONFIG_CDCACM_EPBULKIN=2 CONFIG_CDCACM_EPBULKIN_FSSIZE=64 CONFIG_CDCACM_EPBULKIN_HSSIZE=512 -CONFIG_CDCACM_NWRREQS=4 CONFIG_CDCACM_NRDREQS=4 +CONFIG_CDCACM_NWRREQS=4 CONFIG_CDCACM_BULKIN_REQLEN=96 CONFIG_CDCACM_RXBUFSIZE=256 CONFIG_CDCACM_TXBUFSIZE=256 @@ -902,6 +914,7 @@ CONFIG_NX_LCDDRIVER=y CONFIG_NX_NPLANES=1 CONFIG_NX_BGCOLOR=0x0 # CONFIG_NX_WRITEONLY is not set +# CONFIG_NX_UPDATE is not set # # Supported Pixel Depths @@ -1044,6 +1057,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # @@ -1102,6 +1117,7 @@ CONFIG_EXAMPLES_NX_DEFAULT_FONT=y CONFIG_EXAMPLES_NX_BPP=1 # CONFIG_EXAMPLES_NX_RAWWINDOWS is not set CONFIG_EXAMPLES_NX_TOOLBAR_HEIGHT=16 +# CONFIG_EXAMPLES_NX_EXTERNINIT is not set # CONFIG_EXAMPLES_NXTERM is not set # CONFIG_EXAMPLES_NXFFS is not set CONFIG_EXAMPLES_NXHELLO=y @@ -1118,6 +1134,7 @@ CONFIG_EXAMPLES_NXHELLO_DEFAULT_COLORS=y # Example Font Configuration # CONFIG_EXAMPLES_NXHELLO_DEFAULT_FONT=y +# CONFIG_EXAMPLES_NXHELLO_EXTERNINIT is not set # CONFIG_EXAMPLES_NXIMAGE is not set # CONFIG_EXAMPLES_NXLINES is not set # CONFIG_EXAMPLES_NXTEXT is not set @@ -1177,6 +1194,7 @@ CONFIG_EXAMPLES_NXHELLO_DEFAULT_FONT=y # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/maple/src/Makefile b/configs/maple/src/Makefile index 99f214e5ea0..b9191381083 100644 --- a/configs/maple/src/Makefile +++ b/configs/maple/src/Makefile @@ -52,10 +52,6 @@ endif ifeq ($(CONFIG_USBMSC),y) endif -ifeq ($(CONFIG_WATCHDOG),y) -CSRCS += stm32_watchdog.c -endif - ifeq ($(CONFIG_LIB_BOARDCTL),y) CSRCS += stm32_appinit.c endif diff --git a/configs/maple/src/stm32_appinit.c b/configs/maple/src/stm32_appinit.c index 37878339005..d1a7c50d22b 100644 --- a/configs/maple/src/stm32_appinit.c +++ b/configs/maple/src/stm32_appinit.c @@ -55,9 +55,24 @@ * Description: * Perform architecture specific initialization * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { return OK; } diff --git a/configs/maple/usbnsh/defconfig b/configs/maple/usbnsh/defconfig index be3bc097cb6..fe4466fd045 100644 --- a/configs/maple/usbnsh/defconfig +++ b/configs/maple/usbnsh/defconfig @@ -76,6 +76,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -94,6 +95,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -115,6 +117,7 @@ CONFIG_ARCH_CORTEXM3=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -122,6 +125,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y # CONFIG_ARMV7M_LAZYFPU is not set # CONFIG_ARCH_HAVE_FPU is not set # CONFIG_ARCH_HAVE_DPFPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -132,6 +136,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set # CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set @@ -238,6 +243,7 @@ CONFIG_ARCH_CHIP_STM32F103CB=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -405,13 +411,17 @@ CONFIG_STM32_JTAG_DISABLE=y # CONFIG_STM32_TIM5_CAP is not set # CONFIG_STM32_TIM8_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART1_SERIALDRIVER=y +# CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set CONFIG_STM32_HAVE_RTC_COUNTER=y # CONFIG_STM32_HAVE_RTC_SUBSECONDS is not set @@ -514,7 +524,14 @@ CONFIG_NSH_MMCSDMINOR=0 # CONFIG_MAPLE_MINI=y CONFIG_LIB_BOARDCTL=y +# CONFIG_BOARDCTL_RESET is not set +# CONFIG_BOARDCTL_UNIQUEID is not set CONFIG_BOARDCTL_USBDEVCTRL=y +# CONFIG_BOARDCTL_TSCTEST is not set +# CONFIG_BOARDCTL_ADCTEST is not set +# CONFIG_BOARDCTL_PWMTEST is not set +# CONFIG_BOARDCTL_GRAPHICS is not set +# CONFIG_BOARDCTL_IOCTL is not set # # RTOS Features @@ -674,33 +691,28 @@ CONFIG_I2C=y CONFIG_SERIAL=y CONFIG_SERIAL_REMOVABLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -CONFIG_ARCH_HAVE_USART1=y -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART1_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -737,7 +749,6 @@ CONFIG_USBDEV_MAXPOWER=100 # CONFIG_ARCH_USBDEV_STALLQUEUE is not set CONFIG_USBDEV_TRACE=y CONFIG_USBDEV_TRACE_NRECORDS=32 -# CONFIG_USBDEV_TRACE_STRINGS is not set # CONFIG_USBDEV_TRACE_INITIALIDSET is not set # @@ -757,8 +768,8 @@ CONFIG_CDCACM_EPBULKOUT_HSSIZE=512 CONFIG_CDCACM_EPBULKIN=2 CONFIG_CDCACM_EPBULKIN_FSSIZE=64 CONFIG_CDCACM_EPBULKIN_HSSIZE=512 -CONFIG_CDCACM_NWRREQS=4 CONFIG_CDCACM_NRDREQS=4 +CONFIG_CDCACM_NWRREQS=4 CONFIG_CDCACM_BULKIN_REQLEN=96 CONFIG_CDCACM_RXBUFSIZE=256 CONFIG_CDCACM_TXBUFSIZE=256 @@ -886,6 +897,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # @@ -998,6 +1011,7 @@ CONFIG_EXAMPLES_NSH=y # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/mbed/hidkbd/defconfig b/configs/mbed/hidkbd/defconfig index 87f20d30da4..ef889a04118 100644 --- a/configs/mbed/hidkbd/defconfig +++ b/configs/mbed/hidkbd/defconfig @@ -360,7 +360,7 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -CONFIG_ARCH_HAVE_UART0=y +CONFIG_UART0_SERIALDRIVER=y # # USART Configuration diff --git a/configs/mbed/nsh/defconfig b/configs/mbed/nsh/defconfig index 420f83f9917..dcfda7b8c9b 100644 --- a/configs/mbed/nsh/defconfig +++ b/configs/mbed/nsh/defconfig @@ -453,28 +453,28 @@ CONFIG_MTD=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/mbed/src/lpc17_appinit.c b/configs/mbed/src/lpc17_appinit.c index 505ae45545f..f70e811f3bb 100644 --- a/configs/mbed/src/lpc17_appinit.c +++ b/configs/mbed/src/lpc17_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/mbed/src/lpc17_appinit.c * - * Copyright (C) 2010 Gregory Nutt. All rights reserved. + * Copyright (C) 2010, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -78,9 +78,24 @@ * Description: * Perform architecture specific initialization * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { return OK; } diff --git a/configs/mcu123-lpc214x/composite/defconfig b/configs/mcu123-lpc214x/composite/defconfig index 770a258ebad..73d1c5912dc 100644 --- a/configs/mcu123-lpc214x/composite/defconfig +++ b/configs/mcu123-lpc214x/composite/defconfig @@ -388,28 +388,28 @@ CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set CONFIG_SERIAL_REMOVABLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -CONFIG_ARCH_HAVE_UART1=y -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +CONFIG_UART1_SERIALDRIVER=y +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/mcu123-lpc214x/nsh/defconfig b/configs/mcu123-lpc214x/nsh/defconfig index ba8ec854ec2..4d7bbb44e84 100644 --- a/configs/mcu123-lpc214x/nsh/defconfig +++ b/configs/mcu123-lpc214x/nsh/defconfig @@ -385,28 +385,28 @@ CONFIG_MMCSD_SPIMODE=0 CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -CONFIG_ARCH_HAVE_UART1=y -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +CONFIG_UART1_SERIALDRIVER=y +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/mcu123-lpc214x/src/lpc2148_appinit.c b/configs/mcu123-lpc214x/src/lpc2148_appinit.c index 6437d12bf57..1e840af3613 100644 --- a/configs/mcu123-lpc214x/src/lpc2148_appinit.c +++ b/configs/mcu123-lpc214x/src/lpc2148_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/mcu123-lpc214x/src/lpc2148_appinit.c * - * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved. + * Copyright (C) 2008-2009, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -108,9 +108,24 @@ * Description: * Perform architecture specific initialization * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #ifdef HAVE_MMCSD FAR struct spi_dev_s *spi; diff --git a/configs/mcu123-lpc214x/usbmsc/defconfig b/configs/mcu123-lpc214x/usbmsc/defconfig index 68b89aa1488..5d58f0bba79 100644 --- a/configs/mcu123-lpc214x/usbmsc/defconfig +++ b/configs/mcu123-lpc214x/usbmsc/defconfig @@ -387,28 +387,28 @@ CONFIG_MMCSD_SPIMODE=0 CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -CONFIG_ARCH_HAVE_UART1=y -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +CONFIG_UART1_SERIALDRIVER=y +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/mcu123-lpc214x/usbserial/defconfig b/configs/mcu123-lpc214x/usbserial/defconfig index bd06293269b..e13970db02d 100644 --- a/configs/mcu123-lpc214x/usbserial/defconfig +++ b/configs/mcu123-lpc214x/usbserial/defconfig @@ -409,28 +409,28 @@ CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set CONFIG_SERIAL_REMOVABLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -CONFIG_ARCH_HAVE_UART1=y -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +CONFIG_UART1_SERIALDRIVER=y +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/micropendous3/hello/defconfig b/configs/micropendous3/hello/defconfig index 688b012fc2d..a1a6f7ceeca 100644 --- a/configs/micropendous3/hello/defconfig +++ b/configs/micropendous3/hello/defconfig @@ -246,12 +246,11 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set -CONFIG_ARCH_HAVE_USART1=y +CONFIG_USART1_SERIALDRIVER=y # # USART Configuration # -CONFIG_USART1_ISUART=y CONFIG_MCU_SERIAL=y CONFIG_USART1_SERIAL_CONSOLE=y # CONFIG_NO_SERIAL_CONSOLE is not set diff --git a/configs/mikroe-stm32f4/fulldemo/defconfig b/configs/mikroe-stm32f4/fulldemo/defconfig index 0475e67b8fa..65b3ac8069f 100644 --- a/configs/mikroe-stm32f4/fulldemo/defconfig +++ b/configs/mikroe-stm32f4/fulldemo/defconfig @@ -76,6 +76,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -94,6 +95,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -115,6 +117,7 @@ CONFIG_ARCH_CORTEXM4=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -123,6 +126,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y CONFIG_ARCH_HAVE_FPU=y # CONFIG_ARCH_HAVE_DPFPU is not set # CONFIG_ARCH_FPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -133,6 +137,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set # CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set @@ -239,6 +244,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -443,14 +449,18 @@ CONFIG_STM32_DMACAPABLE=y # ADC Configuration # CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART2_SERIALDRIVER=y +# CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set # CONFIG_USART2_RXDMA is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # @@ -719,6 +729,7 @@ CONFIG_SPI_CALLBACK=y CONFIG_RTC=y CONFIG_RTC_DATETIME=y CONFIG_RTC_ALARM=y +CONFIG_RTC_NALARMS=1 # CONFIG_RTC_DRIVER is not set # CONFIG_RTC_EXTERNAL is not set # CONFIG_WATCHDOG is not set @@ -825,10 +836,12 @@ CONFIG_RAMMTD_ERASESTATE=0xff # CONFIG_MTD_AT45DB is not set CONFIG_MTD_M25P=y CONFIG_M25P_SPIMODE=0 +CONFIG_M25P_SPIFREQUENCY=20000000 CONFIG_M25P_MANUFACTURER=0x1C CONFIG_M25P_MEMORY_TYPE=0x31 CONFIG_M25P_SUBSECTOR_ERASE=y # CONFIG_MTD_S25FL1 is not set +# CONFIG_MTD_N25QXXX is not set CONFIG_MTD_SMART=y # CONFIG_SMART_DEV_LOOP is not set CONFIG_MTD_SMART_SECTOR_SIZE=512 @@ -841,6 +854,7 @@ CONFIG_MTD_SMART_WEAR_LEVEL=y # CONFIG_MTD_RAMTRON is not set # CONFIG_MTD_SST25 is not set # CONFIG_MTD_SST25XX is not set +# CONFIG_MTD_SST26 is not set # CONFIG_MTD_SST39FV is not set # CONFIG_MTD_W25 is not set # CONFIG_EEPROM is not set @@ -852,33 +866,28 @@ CONFIG_MTD_SMART_WEAR_LEVEL=y CONFIG_SERIAL=y CONFIG_SERIAL_REMOVABLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -CONFIG_ARCH_HAVE_USART2=y -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART2_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +CONFIG_USART2_SERIALDRIVER=y +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -932,8 +941,8 @@ CONFIG_CDCACM_EPBULKOUT_HSSIZE=512 CONFIG_CDCACM_EPBULKIN=2 CONFIG_CDCACM_EPBULKIN_FSSIZE=64 CONFIG_CDCACM_EPBULKIN_HSSIZE=512 -CONFIG_CDCACM_NWRREQS=4 CONFIG_CDCACM_NRDREQS=4 +CONFIG_CDCACM_NWRREQS=4 CONFIG_CDCACM_BULKIN_REQLEN=96 CONFIG_CDCACM_RXBUFSIZE=256 CONFIG_CDCACM_TXBUFSIZE=256 @@ -1016,6 +1025,7 @@ CONFIG_NX_LCDDRIVER=y CONFIG_NX_NPLANES=1 CONFIG_NX_BGCOLOR=0x0 # CONFIG_NX_WRITEONLY is not set +# CONFIG_NX_UPDATE is not set # # Supported Pixel Depths @@ -1218,6 +1228,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # CONFIG_NETDB_HOSTFILE is not set @@ -1373,6 +1385,7 @@ CONFIG_FSUTILS_MKSMARTFS=y # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set @@ -1513,6 +1526,7 @@ CONFIG_NXWIDGETS_LISTENERSTACK=2048 # NXWidget Configuration # CONFIG_NXWIDGETS_BPP=16 +# CONFIG_NXWIDGETS_GREYSCALE is not set CONFIG_NXWIDGETS_SIZEOFCHAR=1 # diff --git a/configs/mikroe-stm32f4/kostest/defconfig b/configs/mikroe-stm32f4/kostest/defconfig index ce0b865be0e..53c51bc66f8 100644 --- a/configs/mikroe-stm32f4/kostest/defconfig +++ b/configs/mikroe-stm32f4/kostest/defconfig @@ -81,6 +81,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -99,6 +100,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -120,6 +122,7 @@ CONFIG_ARCH_CORTEXM4=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -128,6 +131,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y CONFIG_ARCH_HAVE_FPU=y # CONFIG_ARCH_HAVE_DPFPU is not set # CONFIG_ARCH_FPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y CONFIG_ARM_MPU=y CONFIG_ARM_MPU_NREGIONS=8 @@ -139,6 +143,7 @@ CONFIG_ARM_MPU_NREGIONS=8 # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set # CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set @@ -245,6 +250,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -448,13 +454,17 @@ CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG=y # ADC Configuration # CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART2_SERIALDRIVER=y +# CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # @@ -722,6 +732,7 @@ CONFIG_SPI_EXCHANGE=y CONFIG_RTC=y CONFIG_RTC_DATETIME=y CONFIG_RTC_ALARM=y +CONFIG_RTC_NALARMS=1 # CONFIG_RTC_DRIVER is not set # CONFIG_RTC_EXTERNAL is not set # CONFIG_WATCHDOG is not set @@ -776,10 +787,12 @@ CONFIG_RAMMTD_ERASESTATE=0xff # CONFIG_MTD_AT45DB is not set CONFIG_MTD_M25P=y CONFIG_M25P_SPIMODE=0 +CONFIG_M25P_SPIFREQUENCY=20000000 CONFIG_M25P_MANUFACTURER=0x1C CONFIG_M25P_MEMORY_TYPE=0x31 CONFIG_M25P_SUBSECTOR_ERASE=y # CONFIG_MTD_S25FL1 is not set +# CONFIG_MTD_N25QXXX is not set CONFIG_MTD_SMART=y # CONFIG_SMART_DEV_LOOP is not set CONFIG_MTD_SMART_SECTOR_SIZE=512 @@ -792,6 +805,7 @@ CONFIG_MTD_SMART_WEAR_LEVEL=y # CONFIG_MTD_RAMTRON is not set # CONFIG_MTD_SST25 is not set # CONFIG_MTD_SST25XX is not set +# CONFIG_MTD_SST26 is not set # CONFIG_MTD_SST39FV is not set # CONFIG_MTD_W25 is not set # CONFIG_EEPROM is not set @@ -803,33 +817,28 @@ CONFIG_MTD_SMART_WEAR_LEVEL=y CONFIG_SERIAL=y CONFIG_SERIAL_REMOVABLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -CONFIG_ARCH_HAVE_USART2=y -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART2_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +CONFIG_USART2_SERIALDRIVER=y +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -883,8 +892,8 @@ CONFIG_CDCACM_EPBULKOUT_HSSIZE=512 CONFIG_CDCACM_EPBULKIN=2 CONFIG_CDCACM_EPBULKIN_FSSIZE=64 CONFIG_CDCACM_EPBULKIN_HSSIZE=512 -CONFIG_CDCACM_NWRREQS=4 CONFIG_CDCACM_NRDREQS=4 +CONFIG_CDCACM_NWRREQS=4 CONFIG_CDCACM_BULKIN_REQLEN=96 CONFIG_CDCACM_RXBUFSIZE=256 CONFIG_CDCACM_TXBUFSIZE=256 @@ -1027,6 +1036,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # CONFIG_NETDB_HOSTFILE is not set @@ -1156,6 +1167,7 @@ CONFIG_FSUTILS_MKSMARTFS=y # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/mikroe-stm32f4/nsh/defconfig b/configs/mikroe-stm32f4/nsh/defconfig index b4116fb37d1..ed18e9a0b9c 100644 --- a/configs/mikroe-stm32f4/nsh/defconfig +++ b/configs/mikroe-stm32f4/nsh/defconfig @@ -76,6 +76,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -94,6 +95,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -115,6 +117,7 @@ CONFIG_ARCH_CORTEXM4=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -123,6 +126,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y CONFIG_ARCH_HAVE_FPU=y # CONFIG_ARCH_HAVE_DPFPU is not set # CONFIG_ARCH_FPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -133,6 +137,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set # CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set @@ -239,6 +244,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -435,13 +441,17 @@ CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG=y # CONFIG_STM32_TIM13_CAP is not set # CONFIG_STM32_TIM14_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART2_SERIALDRIVER=y +# CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # @@ -744,10 +754,12 @@ CONFIG_RAMMTD_ERASESTATE=0xff # CONFIG_MTD_AT45DB is not set CONFIG_MTD_M25P=y CONFIG_M25P_SPIMODE=0 +CONFIG_M25P_SPIFREQUENCY=20000000 CONFIG_M25P_MANUFACTURER=0x1C CONFIG_M25P_MEMORY_TYPE=0x31 CONFIG_M25P_SUBSECTOR_ERASE=y # CONFIG_MTD_S25FL1 is not set +# CONFIG_MTD_N25QXXX is not set CONFIG_MTD_SMART=y # CONFIG_SMART_DEV_LOOP is not set CONFIG_MTD_SMART_SECTOR_SIZE=512 @@ -760,6 +772,7 @@ CONFIG_MTD_SMART_WEAR_LEVEL=y # CONFIG_MTD_RAMTRON is not set # CONFIG_MTD_SST25 is not set # CONFIG_MTD_SST25XX is not set +# CONFIG_MTD_SST26 is not set # CONFIG_MTD_SST39FV is not set # CONFIG_MTD_W25 is not set # CONFIG_EEPROM is not set @@ -770,33 +783,28 @@ CONFIG_MTD_SMART_WEAR_LEVEL=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -CONFIG_ARCH_HAVE_USART2=y -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART2_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +CONFIG_USART2_SERIALDRIVER=y +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -954,6 +962,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # CONFIG_NETDB_HOSTFILE is not set @@ -1087,6 +1097,7 @@ CONFIG_FSUTILS_MKSMARTFS=y # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/mikroe-stm32f4/nx/defconfig b/configs/mikroe-stm32f4/nx/defconfig index bdb7a11c41a..e0bd19efdd3 100644 --- a/configs/mikroe-stm32f4/nx/defconfig +++ b/configs/mikroe-stm32f4/nx/defconfig @@ -76,6 +76,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -94,6 +95,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -115,6 +117,7 @@ CONFIG_ARCH_CORTEXM4=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -123,6 +126,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y CONFIG_ARCH_HAVE_FPU=y # CONFIG_ARCH_HAVE_DPFPU is not set # CONFIG_ARCH_FPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -133,6 +137,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set # CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set @@ -238,6 +243,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -790,6 +796,7 @@ CONFIG_NX_LCDDRIVER=y CONFIG_NX_NPLANES=1 CONFIG_NX_BGCOLOR=0x0 # CONFIG_NX_WRITEONLY is not set +# CONFIG_NX_UPDATE is not set # # Supported Pixel Depths @@ -936,6 +943,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # @@ -1066,6 +1075,7 @@ CONFIG_EXAMPLES_NX_TOOLBAR_HEIGHT=16 # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/mikroe-stm32f4/nxlines/defconfig b/configs/mikroe-stm32f4/nxlines/defconfig index f1251731bbb..61f68f82d86 100644 --- a/configs/mikroe-stm32f4/nxlines/defconfig +++ b/configs/mikroe-stm32f4/nxlines/defconfig @@ -76,6 +76,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -94,6 +95,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -115,6 +117,7 @@ CONFIG_ARCH_CORTEXM4=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -123,6 +126,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y CONFIG_ARCH_HAVE_FPU=y # CONFIG_ARCH_HAVE_DPFPU is not set # CONFIG_ARCH_FPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -133,6 +137,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set # CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set @@ -238,6 +243,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -790,6 +796,7 @@ CONFIG_NX_LCDDRIVER=y CONFIG_NX_NPLANES=1 CONFIG_NX_BGCOLOR=0x0 # CONFIG_NX_WRITEONLY is not set +# CONFIG_NX_UPDATE is not set # # Supported Pixel Depths @@ -935,6 +942,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # @@ -1068,6 +1077,7 @@ CONFIG_EXAMPLES_NXLINES_BPP=16 # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/mikroe-stm32f4/nxtext/defconfig b/configs/mikroe-stm32f4/nxtext/defconfig index 7e01d3ae991..06e3ab7ab25 100644 --- a/configs/mikroe-stm32f4/nxtext/defconfig +++ b/configs/mikroe-stm32f4/nxtext/defconfig @@ -76,6 +76,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -94,6 +95,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -115,6 +117,7 @@ CONFIG_ARCH_CORTEXM4=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -123,6 +126,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y CONFIG_ARCH_HAVE_FPU=y # CONFIG_ARCH_HAVE_DPFPU is not set # CONFIG_ARCH_FPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -133,6 +137,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set # CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set @@ -238,6 +243,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -790,6 +796,7 @@ CONFIG_NX_LCDDRIVER=y CONFIG_NX_NPLANES=1 CONFIG_NX_BGCOLOR=0x0 # CONFIG_NX_WRITEONLY is not set +# CONFIG_NX_UPDATE is not set # # Supported Pixel Depths @@ -935,6 +942,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # @@ -1077,6 +1086,7 @@ CONFIG_EXAMPLES_NXTEXT_DEFAULT_FONT=y # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/mikroe-stm32f4/src/Makefile b/configs/mikroe-stm32f4/src/Makefile index d19eda17f71..3fba8bdc715 100644 --- a/configs/mikroe-stm32f4/src/Makefile +++ b/configs/mikroe-stm32f4/src/Makefile @@ -58,10 +58,6 @@ ifeq ($(CONFIG_QENCODER),y) CSRCS += stm32_qencoder.c endif -ifeq ($(CONFIG_WATCHDOG),y) -CSRCS += stm32_watchdog.c -endif - ifeq ($(CONFIG_LIB_BOARDCTL),y) CSRCS += stm32_appinit.c endif diff --git a/configs/mikroe-stm32f4/src/stm32_appinit.c b/configs/mikroe-stm32f4/src/stm32_appinit.c index 4ac23362d30..9970d6927be 100644 --- a/configs/mikroe-stm32f4/src/stm32_appinit.c +++ b/configs/mikroe-stm32f4/src/stm32_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/mikroe_stm32f4/src/stm32_appinit.c * - * Copyright (C) 2012-2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2012-2013, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -147,10 +147,6 @@ # endif #endif -/**************************************************************************** - * Private Data - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -161,9 +157,24 @@ * Description: * Perform architecture specific initialization * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #ifdef CONFIG_STM32_SPI3 FAR struct spi_dev_s *spi; diff --git a/configs/mikroe-stm32f4/src/stm32_watchdog.c b/configs/mikroe-stm32f4/src/stm32_watchdog.c deleted file mode 100644 index 71cf65061de..00000000000 --- a/configs/mikroe-stm32f4/src/stm32_watchdog.c +++ /dev/null @@ -1,135 +0,0 @@ -/************************************************************************************ - * configs/mikroe_stm32f4/src/stm32_watchdog.c - * - * Copyright (C) 2012-2013 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * 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. - * - ************************************************************************************/ - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include -#include - -#include -#include - -#include "stm32_wdg.h" - -#ifdef CONFIG_WATCHDOG - -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ -/* Configuration *******************************************************************/ -/* Wathdog hardware should be enabled */ - -#if !defined(CONFIG_STM32_WWDG) && !defined(CONFIG_STM32_IWDG) -# warning "One of CONFIG_STM32_WWDG or CONFIG_STM32_IWDG must be defined" -#endif - -/* Select the path to the registered watchdog timer device */ - -#ifndef CONFIG_STM32_WDG_DEVPATH -# ifdef CONFIG_EXAMPLES_WATCHDOG_DEVPATH -# define CONFIG_STM32_WDG_DEVPATH CONFIG_EXAMPLES_WATCHDOG_DEVPATH -# else -# define CONFIG_STM32_WDG_DEVPATH "/dev/watchdog0" -# endif -#endif - -/* Use the un-calibrated LSI frequency if we have nothing better */ - -#if defined(CONFIG_STM32_IWDG) && !defined(CONFIG_STM32_LSIFREQ) -# define CONFIG_STM32_LSIFREQ STM32_LSI_FREQUENCY -#endif - -/* Debug ***************************************************************************/ -/* Non-standard debug that may be enabled just for testing the watchdog timer */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_WATCHDOG -#endif - -#ifdef CONFIG_DEBUG_WATCHDOG -# define wdgdbg dbg -# define wdglldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define wdgvdbg vdbg -# define wdgllvdbg llvdbg -# else -# define wdgvdbg(x...) -# define wdgllvdbg(x...) -# endif -#else -# define wdgdbg(x...) -# define wdglldbg(x...) -# define wdgvdbg(x...) -# define wdgllvdbg(x...) -#endif - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -/**************************************************************************** - * Name: up_wdginitialize() - * - * Description: - * Perform architecuture-specific initialization of the Watchdog hardware. - * This interface must be provided by all configurations using - * apps/examples/watchdog - * - ****************************************************************************/ - -int up_wdginitialize(void) -{ - /* Initialize tha register the watchdog timer device */ - -#if defined(CONFIG_STM32_WWDG) - stm32_wwdginitialize(CONFIG_STM32_WDG_DEVPATH); - return OK; -#elif defined(CONFIG_STM32_IWDG) - stm32_iwdginitialize(CONFIG_STM32_WDG_DEVPATH, CONFIG_STM32_LSIFREQ); - return OK; -#else - return -ENODEV; -#endif -} - -#endif /* CONFIG_WATCHDOG */ diff --git a/configs/mikroe-stm32f4/usbnsh/defconfig b/configs/mikroe-stm32f4/usbnsh/defconfig index 1549f45fa16..ae0211b6ade 100644 --- a/configs/mikroe-stm32f4/usbnsh/defconfig +++ b/configs/mikroe-stm32f4/usbnsh/defconfig @@ -76,6 +76,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -94,6 +95,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -115,6 +117,7 @@ CONFIG_ARCH_CORTEXM4=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -123,6 +126,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y CONFIG_ARCH_HAVE_FPU=y # CONFIG_ARCH_HAVE_DPFPU is not set # CONFIG_ARCH_FPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -133,6 +137,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set # CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set @@ -239,6 +244,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -435,13 +441,17 @@ CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG=y # CONFIG_STM32_TIM13_CAP is not set # CONFIG_STM32_TIM14_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART2_SERIALDRIVER=y +# CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # @@ -752,10 +762,12 @@ CONFIG_RAMMTD_ERASESTATE=0xff # CONFIG_MTD_AT45DB is not set CONFIG_MTD_M25P=y CONFIG_M25P_SPIMODE=0 +CONFIG_M25P_SPIFREQUENCY=20000000 CONFIG_M25P_MANUFACTURER=0x1C CONFIG_M25P_MEMORY_TYPE=0x31 CONFIG_M25P_SUBSECTOR_ERASE=y # CONFIG_MTD_S25FL1 is not set +# CONFIG_MTD_N25QXXX is not set CONFIG_MTD_SMART=y # CONFIG_SMART_DEV_LOOP is not set CONFIG_MTD_SMART_SECTOR_SIZE=512 @@ -768,6 +780,7 @@ CONFIG_MTD_SMART_WEAR_LEVEL=y # CONFIG_MTD_RAMTRON is not set # CONFIG_MTD_SST25 is not set # CONFIG_MTD_SST25XX is not set +# CONFIG_MTD_SST26 is not set # CONFIG_MTD_SST39FV is not set # CONFIG_MTD_W25 is not set # CONFIG_EEPROM is not set @@ -779,33 +792,28 @@ CONFIG_MTD_SMART_WEAR_LEVEL=y CONFIG_SERIAL=y CONFIG_SERIAL_REMOVABLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -CONFIG_ARCH_HAVE_USART2=y -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART2_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +CONFIG_USART2_SERIALDRIVER=y +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -859,8 +867,8 @@ CONFIG_CDCACM_EPBULKOUT_HSSIZE=512 CONFIG_CDCACM_EPBULKIN=2 CONFIG_CDCACM_EPBULKIN_FSSIZE=64 CONFIG_CDCACM_EPBULKIN_HSSIZE=512 -CONFIG_CDCACM_NWRREQS=4 CONFIG_CDCACM_NRDREQS=4 +CONFIG_CDCACM_NWRREQS=4 CONFIG_CDCACM_BULKIN_REQLEN=96 CONFIG_CDCACM_RXBUFSIZE=256 CONFIG_CDCACM_TXBUFSIZE=256 @@ -1003,6 +1011,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # CONFIG_NETDB_HOSTFILE is not set @@ -1136,6 +1146,7 @@ CONFIG_FSUTILS_MKSMARTFS=y # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/mirtoo/nsh/defconfig b/configs/mirtoo/nsh/defconfig index 168cfab8dd8..1925e947cf0 100644 --- a/configs/mirtoo/nsh/defconfig +++ b/configs/mirtoo/nsh/defconfig @@ -475,28 +475,28 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -CONFIG_ARCH_HAVE_UART1=y -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +CONFIG_UART1_SERIALDRIVER=y +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/mirtoo/nxffs/defconfig b/configs/mirtoo/nxffs/defconfig index ffe67df93d3..876d762db04 100644 --- a/configs/mirtoo/nxffs/defconfig +++ b/configs/mirtoo/nxffs/defconfig @@ -506,28 +506,28 @@ CONFIG_SST25_SPIFREQUENCY=20000000 CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -CONFIG_ARCH_HAVE_UART1=y -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +CONFIG_UART1_SERIALDRIVER=y +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/mirtoo/src/pic32_appinit.c b/configs/mirtoo/src/pic32_appinit.c index 459e97b844a..9fad1495bfa 100644 --- a/configs/mirtoo/src/pic32_appinit.c +++ b/configs/mirtoo/src/pic32_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/mirtoo/src/pic32_appinit.c * - * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2012, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -96,9 +96,24 @@ * Description: * Perform architecture specific initialization * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #ifdef HAVE_SST25 FAR struct spi_dev_s *spi; diff --git a/configs/moteino-mega/hello/defconfig b/configs/moteino-mega/hello/defconfig index 66a682dbcc3..92218c71f21 100644 --- a/configs/moteino-mega/hello/defconfig +++ b/configs/moteino-mega/hello/defconfig @@ -274,33 +274,32 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -CONFIG_ARCH_HAVE_USART0=y -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +CONFIG_USART0_SERIALDRIVER=y +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration # -CONFIG_USART0_ISUART=y CONFIG_MCU_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set # CONFIG_SERIAL_OFLOWCONTROL is not set diff --git a/configs/moteino-mega/nsh/defconfig b/configs/moteino-mega/nsh/defconfig index 852f653da5e..3625027ae26 100644 --- a/configs/moteino-mega/nsh/defconfig +++ b/configs/moteino-mega/nsh/defconfig @@ -282,33 +282,32 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -CONFIG_ARCH_HAVE_USART0=y -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +CONFIG_USART0_SERIALDRIVER=y +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration # -CONFIG_USART0_ISUART=y CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set diff --git a/configs/moxa/nsh/defconfig b/configs/moxa/nsh/defconfig index 20cf894fdf5..f4e06794072 100644 --- a/configs/moxa/nsh/defconfig +++ b/configs/moxa/nsh/defconfig @@ -426,28 +426,28 @@ CONFIG_16550_SUPRESS_CONFIG=y CONFIG_16550_REGINCR=1 CONFIG_16550_REGWIDTH=32 CONFIG_16550_ADDRWIDTH=32 -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/moxa/src/moxart_appinit.c b/configs/moxa/src/moxart_appinit.c index f33045ccf56..1b7c8114d63 100644 --- a/configs/moxa/src/moxart_appinit.c +++ b/configs/moxa/src/moxart_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/moxart/src/moxart_appinit.c * - * Copyright (C) 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2015-2016 Gregory Nutt. All rights reserved. * Author: Anton D. Kachalov * * Redistribution and use in source and binary forms, with or without @@ -70,9 +70,24 @@ * CONFIG_LIB_BOARDCTL=n : * Called from board_initialize(). * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #ifndef CONFIG_BOARD_INITIALIZE #ifdef CONFIG_NET_FTMAC100 diff --git a/configs/mx1ads/ostest/defconfig b/configs/mx1ads/ostest/defconfig index 73b264ce0cf..0740d2a158b 100644 --- a/configs/mx1ads/ostest/defconfig +++ b/configs/mx1ads/ostest/defconfig @@ -320,27 +320,27 @@ CONFIG_SPI=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -CONFIG_ARCH_HAVE_UART1=y -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +CONFIG_UART1_SERIALDRIVER=y +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/ne64badge/src/m9s12_appinit.c b/configs/ne64badge/src/m9s12_appinit.c index ba61f1eaf3c..1550f5d519e 100644 --- a/configs/ne64badge/src/m9s12_appinit.c +++ b/configs/ne64badge/src/m9s12_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/ne64badge/src/m9s12_appinit.c * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. + * Copyright (C) 2011, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -61,9 +61,24 @@ * Description: * Perform architecture specific initialization * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { /* Configure SPI-based devices */ diff --git a/configs/ntosd-dm320/nettest/defconfig b/configs/ntosd-dm320/nettest/defconfig index 2cc06a37a6d..9b287554506 100644 --- a/configs/ntosd-dm320/nettest/defconfig +++ b/configs/ntosd-dm320/nettest/defconfig @@ -370,28 +370,28 @@ CONFIG_DM9X_MODE_AUTO=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -CONFIG_ARCH_HAVE_UART1=y -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +CONFIG_UART1_SERIALDRIVER=y +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/ntosd-dm320/nsh/defconfig b/configs/ntosd-dm320/nsh/defconfig index c295c303a2c..5a4b54b2e7f 100644 --- a/configs/ntosd-dm320/nsh/defconfig +++ b/configs/ntosd-dm320/nsh/defconfig @@ -389,28 +389,28 @@ CONFIG_DM9X_MODE_AUTO=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -CONFIG_ARCH_HAVE_UART1=y -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +CONFIG_UART1_SERIALDRIVER=y +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/ntosd-dm320/poll/defconfig b/configs/ntosd-dm320/poll/defconfig index cd4a2b6caf4..82d918604f1 100644 --- a/configs/ntosd-dm320/poll/defconfig +++ b/configs/ntosd-dm320/poll/defconfig @@ -368,28 +368,28 @@ CONFIG_DM9X_MODE_AUTO=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -CONFIG_ARCH_HAVE_UART1=y -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +CONFIG_UART1_SERIALDRIVER=y +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/ntosd-dm320/thttpd/defconfig b/configs/ntosd-dm320/thttpd/defconfig index beca63893fd..55c20c37906 100644 --- a/configs/ntosd-dm320/thttpd/defconfig +++ b/configs/ntosd-dm320/thttpd/defconfig @@ -361,28 +361,28 @@ CONFIG_DM9X_MODE_AUTO=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -CONFIG_ARCH_HAVE_UART1=y -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +CONFIG_UART1_SERIALDRIVER=y +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/ntosd-dm320/udp/defconfig b/configs/ntosd-dm320/udp/defconfig index aaf9d91370c..906bc57eabd 100644 --- a/configs/ntosd-dm320/udp/defconfig +++ b/configs/ntosd-dm320/udp/defconfig @@ -341,27 +341,27 @@ CONFIG_DM9X_MODE_AUTO=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -CONFIG_ARCH_HAVE_UART1=y -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +CONFIG_UART1_SERIALDRIVER=y +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/ntosd-dm320/webserver/defconfig b/configs/ntosd-dm320/webserver/defconfig index 1ddee5d5599..7173e675610 100644 --- a/configs/ntosd-dm320/webserver/defconfig +++ b/configs/ntosd-dm320/webserver/defconfig @@ -375,28 +375,28 @@ CONFIG_DM9X_MODE_AUTO=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -CONFIG_ARCH_HAVE_UART1=y -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +CONFIG_UART1_SERIALDRIVER=y +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/nucleo-144/README.txt b/configs/nucleo-144/README.txt index b826f78680e..e99cd427de3 100644 --- a/configs/nucleo-144/README.txt +++ b/configs/nucleo-144/README.txt @@ -1,24 +1,77 @@ README ====== -This README discusses issues unique to NuttX configurations for the ST -Nucleo F746ZG board from ST Micro. See +This README discusses issues unique to NuttX configurations for the STMicro +Nucleo-144 board. See -http://www.st.com/web/catalog/tools/FM116/CL1620/SC959/SS1532/LN1847/PF261636 +http://www.st.com/content/ccc/resource/technical/document/data_brief/group0/7b/df/1d/e9/64/55/43/8d/DM00247910/files/DM00247910.pdf/jcr:content/translations/en.DM00247910.pdf -The Nucleo F746ZG order part number is NUCLEO-F746ZG. It is clumped together -under the STM32 Nucleo-144 board family. This does provide uniformity in the -documentation from ST and should allow us to quickly change configurations -but just cloning this configuration and changing the CPU choice and board -init. Unfortunately for the developer, the CPU specific information must be -extracted from the common information in the documentation. +Contents +======== + + - Nucleo-144 Boards + - Nucleo F746ZG + - Development Environment + - IDEs + - Basic configuaration & build steps + - Hardware + - Button + - LED + - U[S]ARTs and Serial Consoles + - Configurations + +Nucleo-144 Boards: +================= + +The Nucleo-144 is a standard board for use with several STM32 parts in the +LQFP144 package. Variants include + + STM32 Part Board Variant Name + ------------- ------------------ + STM32F207ZGT6 NUCLEO-F207ZG + STM32F303ZET6 NUCLEO-F303ZE + STM32F429ZIT6 NUCLEO-F429ZI + STM32F446ZET6 NUCLEO-F446ZE + STM32F746ZGT6 NUCLEO-F746ZG + STM32F767ZIT6 NUCLEO-F767ZI + ------------- ------------------ + +This directory is intended to support all Nucleo-144 variants since the +boards are identical, differing only in the installed part. This common +board design provides uniformity in the documentation from ST and should +allow us to quickly change configurations by just cloning a configuration +and changing the CPU choice and board initialization. Unfortunately for +the developer, the CPU specific information must be extracted from the +common information in the documentation. Please read the User Manaul UM1727: Getting started with STM32 Nucleo board software development tools and take note of the Powering options for the board (6.3 Power supply and power selection) and the Solder bridges based hardware configuration changes that are configurable (6.11 Solder bridges). -NUCLEO-F746ZG: +Common Board Features: +--------------------- + + Peripherals: 8 leds, 2 push button (3 LEDs, 1 button) under software + control + Debug: STLINK/V2-1 debugger/programmer Uses a STM32F103CB to + provide a ST-Link for programming, debug similar to the + OpenOcd FTDI function - USB to JTAG front-end. + + Expansion I/F: ST Zio and Extended Ardino and Morpho Headers + +Nucleo F746ZG +============= + +At present only the ST Nucleo F746ZG board from ST Micro is supported. See + +http://www.st.com/content/st_com/en/products/evaluation-tools/product-evaluation-tools/mcu-eval-tools/stm32-mcu-eval-tools/stm32-mcu-nucleo/nucleo-f746zg.html + +The Nucleo F746ZG order part number is NUCLEO-F746ZG. It is one member of +the STM32 Nucleo-144 board family. + +NUCLEO-F746ZG Features: +---------------------- Microprocessor: STM32F746ZGT6 Core: ARM 32-bit Cortex®-M7 CPU with FPU, L1-cache: 4KB data cache and 4KB instruction cache, up to @@ -40,41 +93,20 @@ NUCLEO-F746ZG: clock QSPI: Dual mode Quad-SPI SAIs: 2 Serial Audio Interfaces - CAN: 2 X CAN interface + CAN: 2 X CAN interface SDMMC interface SPDIFRX interface USB: USB 2.0 full-speed device/host/OTG controller with on-chip PHY 10/100 Ethernet: MAC with dedicated DMA: supports IEEE 1588v2 hardware, - MII/RMII + MII/RMII Camera Interface: 8/14 Bit CRC calculation unit TRG: True random number generator RTC -Board features: - - Peripherals: 8 leds, 2 push button (3 LEDs, 1 button) under software - control - Debug: STLINK/V2-1 debugger/programmer Uses a STM32F103CB to - provide a ST-Link for programming, debug similar to the - OpenOcd FTDI function - USB to JTAG front-end. - - Expansion I/F ST Zio an Extended Ardino and Morpho Headers - -See https://developer.mbed.org/platforms/ST-Nucleo-F746ZG form additional information about this board. - -Contents -======== - - - Development Environment - - IDEs - - Basic configuaration & build steps - - Hardware - - Button - - LED - - U[S]ARTs and Serial Consoles - - Configurations +See https://developer.mbed.org/platforms/ST-Nucleo-F746ZG form additional +information about this board. Development Environment ======================= @@ -89,7 +121,6 @@ Development Environment If you change the default toolchain, then you may also have to modify the PATH in the setenv.h file if your make cannot find the tools. - IDEs ==== @@ -104,7 +135,6 @@ IDEs makefile project in order to work with Windows (Google for "Eclipse Cygwin" - there is a lot of help on the internet). - Basic configuration & build steps ================================== @@ -112,9 +142,9 @@ Basic configuration & build steps be modified to point to the correct path to the Cortex-M7 GCC toolchain (if different from the default in your PATH variable). - - Configures nuttx creating .config file in the nuttx directory + - Configures nuttx creating .config file in the nuttx directory. $ cd tools && ./configure.sh nucleo-f746zg/nsh && cd .. - - Refreshes the .config file with the latest features addes sice this writting + - Refreshes the .config file with the latest available configurations. $ make oldconfig - Select the features you want in the build. $ make menuconfig @@ -125,7 +155,7 @@ Hardware ======== GPIO - there are 144 I/O lines on the STM32F746ZGT6 with various pins pined out - on the Nucleo F746ZG + on the Nucleo F746ZG. See https://developer.mbed.org/platforms/ST-Nucleo-F746ZG/ for slick graphic pinouts. @@ -146,7 +176,6 @@ Hardware In that Case, You will need to edit the include/board.h to select different U[S]ART and / or pin selections. - Serial ------ @@ -231,7 +260,7 @@ Serial Consoles Use make menuconfig to configure USART8 as the console: CONFIG_STM32F7_UART8=y - CONFIG_USART8_ISUART=y + CONFIG_USART8_SERIALDRIVER=y CONFIG_USART8_SERIAL_CONSOLE=y CONFIG_UART8_RXBUFSIZE=256 CONFIG_UART8_TXBUFSIZE=256 @@ -261,46 +290,83 @@ Serial Consoles As shipped, SB4 and SB7 are open and SB5 and SB6 closed, so the virtual COM port is enabled. - Configurations ============== - nsh: - --------- - Configures the NuttShell (nsh) located at apps/examples/nsh for the - Nucleo-144 boards. The Configuration enables the serial interfaces - on UART8. Support for builtin applications is enabled, but in the base - configuration no builtin applications are selected (see NOTES below). +nsh: +---- + Configures the NuttShell (nsh) located at apps/examples/nsh for the + Nucleo-144 boards. The Configuration enables the serial interfaces + on UART6. Support for builtin applications is enabled, but in the base + configuration no builtin applications are selected (see NOTES below). - NOTES: + NOTES: - 1. This configuration uses the mconf-based configuration tool. To - change this configuration using that tool, you should: + 1. This configuration uses the mconf-based configuration tool. To + change this configuration using that tool, you should: - a. Build and install the kconfig-mconf tool. See nuttx/README.txt - see additional README.txt files in the NuttX tools repository. + a. Build and install the kconfig-mconf tool. See nuttx/README.txt + see additional README.txt files in the NuttX tools repository. - b. If this is the intall configuration then Execute - 'cd tools && ./configure.sh stm32f746g-disco/nsh && cd ..' - in nuttx/ in order to start configuration process. - Caution: Doing this step more than once will overwrite .config with - the contents of the stm32f746g-disco/nsh/defconfig file. + b. If this is the intall configuration then Execute + 'cd tools && ./configure.sh nucleo-144/nsh && cd ..' + in nuttx/ in order to start configuration process. + Caution: Doing this step more than once will overwrite .config with + the contents of the nucleo-144/nsh/defconfig file. - c. Execute 'make oldconfig' in nuttx/ in order to refresh the - configuration. + c. Execute 'make oldconfig' in nuttx/ in order to refresh the + configuration. - d. Execute 'make menuconfig' in nuttx/ in order to start the - reconfiguration process. + d. Execute 'make menuconfig' in nuttx/ in order to start the + reconfiguration process. - e. Save the .config file to reuse it in the future starting at step d. + e. Save the .config file to reuse it in the future starting at step d. - 2. By default, this configuration uses the ARM GNU toolchain - for Linux. That can easily be reconfigured, of course. + 2. By default, this configuration uses the ARM GNU toolchain + for Linux. That can easily be reconfigured, of course. - CONFIG_HOST_LINUX=y : Builds under Linux - CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL=y : ARM GNU for Linux + CONFIG_HOST_LINUX=y : Builds under Linux + CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL=y : ARM GNU for Linux - 3. Although the default console is USART3 (which would correspond to - the Virtual COM port) I have done all testing with the console - device configured for UART8 (see instruction above under "Serial - Consoles). + 3. Although the default console is USART3 (which would correspond to + the Virtual COM port) I have done all testing with the console + device configured for UART8 (see instruction above under "Serial + Consoles). + +evalos: +------- + This configuration is designed to test the features of the board. + - Configures the NuttShell (nsh) located at apps/examples/nsh for the + Nucleo-144 boards. The console is available on serial interface USART3, + which is accessible over the USB ST-Link interface. + - Configures nsh with advanced features such as autocompletion. + - Configures the on-board LEDs to work with the 'leds' example app. + - Configures the 'helloxx' example app. + + NOTES: + + 1. This configuration uses the mconf-based configuration tool. To + change this configuration using that tool, you should: + + a. Build and install the kconfig-mconf tool. See nuttx/README.txt + see additional README.txt files in the NuttX tools repository. + + b. If this is the intall configuration then Execute + 'cd tools && ./configure.sh nucleo-144/evalos && cd ..' + in nuttx/ in order to start configuration process. + Caution: Doing this step more than once will overwrite .config with + the contents of the nucleo-144/evalos/defconfig file. + + c. Execute 'make oldconfig' in nuttx/ in order to refresh the + configuration. + + d. Execute 'make menuconfig' in nuttx/ in order to start the + reconfiguration process. + + e. Save the .config file to reuse it in the future starting at step d. + + 2. By default, this configuration uses the ARM GNU toolchain + for Linux. That can easily be reconfigured, of course. + + CONFIG_HOST_LINUX=y : Builds under Linux + CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL=y : ARM GNU for Linux diff --git a/configs/nucleo-144/evalos/Make.defs b/configs/nucleo-144/evalos/Make.defs new file mode 100644 index 00000000000..210c5ff0743 --- /dev/null +++ b/configs/nucleo-144/evalos/Make.defs @@ -0,0 +1,113 @@ +############################################################################ +# configs/nucleo-144/evalos/Make.defs +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# Author: Mark Olsson +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +include ${TOPDIR}/.config +include ${TOPDIR}/tools/Config.mk +include ${TOPDIR}/arch/arm/src/armv7-m/Toolchain.defs + +LDSCRIPT = flash.ld + +ifeq ($(WINTOOL),y) + # Windows-native toolchains + DIRLINK = $(TOPDIR)/tools/copydir.sh + DIRUNLINK = $(TOPDIR)/tools/unlink.sh + MKDEP = $(TOPDIR)/tools/mkwindeps.sh + ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" + ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)}" +else + # Linux/Cygwin-native toolchain + MKDEP = $(TOPDIR)/tools/mkdeps$(HOSTEXEEXT) + ARCHINCLUDES = -I. -isystem $(TOPDIR)/include + ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT) +endif + +CC = $(CROSSDEV)gcc +CXX = $(CROSSDEV)g++ +CPP = $(CROSSDEV)gcc -E +LD = $(CROSSDEV)ld +AR = $(ARCROSSDEV)ar rcs +NM = $(ARCROSSDEV)nm +OBJCOPY = $(CROSSDEV)objcopy +OBJDUMP = $(CROSSDEV)objdump + +ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q'} +ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1} + +ifeq ($(CONFIG_DEBUG_SYMBOLS),y) + ARCHOPTIMIZATION = -g +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer +endif + +ARCHCFLAGS = -fno-builtin +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef +ARCHWARNINGSXX = -Wall -Wshadow -Wundef +ARCHDEFINES = +ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 + +CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe +CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS) +CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe +CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS) +CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) +AFLAGS = $(CFLAGS) -D__ASSEMBLY__ + +NXFLATLDFLAGS1 = -r -d -warn-common +NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-pcrel.ld -no-check-sections +LDNXFLATFLAGS = -e main -s 2048 + +ASMEXT = .S +OBJEXT = .o +LIBEXT = .a +EXEEXT = + +ifneq ($(CROSSDEV),arm-nuttx-elf-) + LDFLAGS += -nostartfiles -nodefaultlibs +endif +ifeq ($(CONFIG_DEBUG_SYMBOLS),y) + LDFLAGS += -g +endif + + +HOSTCC = gcc +HOSTINCLUDES = -I. +HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -g -pipe +HOSTLDFLAGS = diff --git a/configs/nucleo-144/evalos/defconfig b/configs/nucleo-144/evalos/defconfig new file mode 100644 index 00000000000..9944952cac6 --- /dev/null +++ b/configs/nucleo-144/evalos/defconfig @@ -0,0 +1,933 @@ +# +# Automatically generated file; DO NOT EDIT. +# Nuttx/ Configuration +# + +# +# Build Setup +# +# CONFIG_EXPERIMENTAL is not set +# CONFIG_DEFAULT_SMALL is not set +CONFIG_HOST_LINUX=y +# CONFIG_HOST_OSX is not set +# CONFIG_HOST_WINDOWS is not set +# CONFIG_HOST_OTHER is not set + +# +# Build Configuration +# +CONFIG_APPS_DIR="../apps" +CONFIG_BUILD_FLAT=y +# CONFIG_BUILD_2PASS is not set + +# +# Binary Output Formats +# +# CONFIG_RRLOAD_BINARY is not set +CONFIG_INTELHEX_BINARY=y +# CONFIG_MOTOROLA_SREC is not set +CONFIG_RAW_BINARY=y +# CONFIG_UBOOT_UIMAGE is not set + +# +# Customize Header Files +# +# CONFIG_ARCH_STDINT_H is not set +# CONFIG_ARCH_STDBOOL_H is not set +# CONFIG_ARCH_MATH_H is not set +# CONFIG_ARCH_FLOAT_H is not set +# CONFIG_ARCH_STDARG_H is not set +# CONFIG_ARCH_DEBUG_H is not set + +# +# Debug Options +# +# CONFIG_DEBUG is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_ARCH_HAVE_STACKCHECK=y +# CONFIG_STACK_COLORATION is not set +CONFIG_DEBUG_SYMBOLS=y +CONFIG_ARCH_HAVE_CUSTOMOPT=y +CONFIG_DEBUG_NOOPT=y +# CONFIG_DEBUG_CUSTOMOPT is not set +# CONFIG_DEBUG_FULLOPT is not set + +# +# System Type +# +CONFIG_ARCH_ARM=y +# CONFIG_ARCH_AVR is not set +# CONFIG_ARCH_HC is not set +# CONFIG_ARCH_MIPS is not set +# CONFIG_ARCH_RGMP is not set +# CONFIG_ARCH_SH is not set +# CONFIG_ARCH_SIM is not set +# CONFIG_ARCH_X86 is not set +# CONFIG_ARCH_Z16 is not set +# CONFIG_ARCH_Z80 is not set +CONFIG_ARCH="arm" + +# +# ARM Options +# +# CONFIG_ARCH_CHIP_A1X is not set +# CONFIG_ARCH_CHIP_C5471 is not set +# CONFIG_ARCH_CHIP_CALYPSO is not set +# CONFIG_ARCH_CHIP_DM320 is not set +# CONFIG_ARCH_CHIP_EFM32 is not set +# CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set +# CONFIG_ARCH_CHIP_KINETIS is not set +# CONFIG_ARCH_CHIP_KL is not set +# CONFIG_ARCH_CHIP_LM is not set +# CONFIG_ARCH_CHIP_TIVA is not set +# CONFIG_ARCH_CHIP_LPC11XX is not set +# CONFIG_ARCH_CHIP_LPC17XX is not set +# CONFIG_ARCH_CHIP_LPC214X is not set +# CONFIG_ARCH_CHIP_LPC2378 is not set +# CONFIG_ARCH_CHIP_LPC31XX is not set +# CONFIG_ARCH_CHIP_LPC43XX is not set +# CONFIG_ARCH_CHIP_NUC1XX is not set +# CONFIG_ARCH_CHIP_SAMA5 is not set +# CONFIG_ARCH_CHIP_SAMD is not set +# CONFIG_ARCH_CHIP_SAML is not set +# CONFIG_ARCH_CHIP_SAM34 is not set +# CONFIG_ARCH_CHIP_SAMV7 is not set +# CONFIG_ARCH_CHIP_STM32 is not set +CONFIG_ARCH_CHIP_STM32F7=y +# CONFIG_ARCH_CHIP_STM32L4 is not set +# CONFIG_ARCH_CHIP_STR71X is not set +# CONFIG_ARCH_CHIP_TMS570 is not set +# CONFIG_ARCH_CHIP_MOXART is not set +# CONFIG_ARCH_ARM7TDMI is not set +# CONFIG_ARCH_ARM926EJS is not set +# CONFIG_ARCH_ARM920T is not set +# CONFIG_ARCH_CORTEXM0 is not set +# CONFIG_ARCH_CORTEXM3 is not set +# CONFIG_ARCH_CORTEXM4 is not set +CONFIG_ARCH_CORTEXM7=y +# CONFIG_ARCH_CORTEXA5 is not set +# CONFIG_ARCH_CORTEXA8 is not set +# CONFIG_ARCH_CORTEXA9 is not set +# CONFIG_ARCH_CORTEXR4 is not set +# CONFIG_ARCH_CORTEXR4F is not set +# CONFIG_ARCH_CORTEXR5 is not set +# CONFIG_ARCH_CORTEX5F is not set +# CONFIG_ARCH_CORTEXR7 is not set +# CONFIG_ARCH_CORTEXR7F is not set +CONFIG_ARCH_FAMILY="armv7-m" +CONFIG_ARCH_CHIP="stm32f7" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +CONFIG_ARM_TOOLCHAIN_GNU=y +# CONFIG_ARMV7M_USEBASEPRI is not set +CONFIG_ARCH_HAVE_CMNVECTOR=y +CONFIG_ARMV7M_CMNVECTOR=y +# CONFIG_ARMV7M_LAZYFPU is not set +CONFIG_ARCH_HAVE_FPU=y +CONFIG_ARCH_HAVE_DPFPU=y +# CONFIG_ARCH_FPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set +CONFIG_ARM_HAVE_MPU_UNIFIED=y +# CONFIG_ARM_MPU is not set + +# +# ARMV7M Configuration Options +# +CONFIG_ARMV7M_HAVE_ICACHE=y +CONFIG_ARMV7M_HAVE_DCACHE=y +CONFIG_ARMV7M_ICACHE=y +CONFIG_ARMV7M_DCACHE=y +CONFIG_ARMV7M_DCACHE_WRITETHROUGH=y +CONFIG_ARMV7M_HAVE_ITCM=y +CONFIG_ARMV7M_HAVE_DTCM=y +# CONFIG_ARMV7M_ITCM is not set +CONFIG_ARMV7M_DTCM=y +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set +# CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set +# CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set +# CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set +CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL=y +CONFIG_ARMV7M_HAVE_STACKCHECK=y +# CONFIG_ARMV7M_STACKCHECK is not set +# CONFIG_ARMV7M_ITMSYSLOG is not set +# CONFIG_SERIAL_TERMIOS is not set +# CONFIG_USART3_RS485 is not set +# CONFIG_SERIAL_DISABLE_REORDERING is not set + +# +# STM32 F7 Configuration Options +# +# CONFIG_ARCH_CHIP_STM32F745 is not set +CONFIG_ARCH_CHIP_STM32F746=y +# CONFIG_ARCH_CHIP_STM32F756 is not set +CONFIG_STM32F7_STM32F74XX=y +# CONFIG_STM32F7_STM32F75XX is not set +# CONFIG_STM32F7_FLASH_512KB is not set +CONFIG_STM32F7_FLASH_1024KB=y + +# +# STM32 Peripheral Support +# +CONFIG_STM32F7_HAVE_LTDC=y +# CONFIG_STM32F7_ADC is not set +# CONFIG_STM32F7_CAN is not set +# CONFIG_STM32F7_DAC is not set +# CONFIG_STM32F7_DMA is not set +# CONFIG_STM32F7_I2C is not set +# CONFIG_STM32F7_SAI is not set +# CONFIG_STM32F7_SPI is not set +CONFIG_STM32F7_USART=y +# CONFIG_STM32F7_ADC1 is not set +# CONFIG_STM32F7_ADC2 is not set +# CONFIG_STM32F7_ADC3 is not set +# CONFIG_STM32F7_BKPSRAM is not set +# CONFIG_STM32F7_CAN1 is not set +# CONFIG_STM32F7_CAN2 is not set +# CONFIG_STM32F7_CEC is not set +# CONFIG_STM32F7_CRC is not set +# CONFIG_STM32F7_CRYP is not set +# CONFIG_STM32F7_DMA1 is not set +# CONFIG_STM32F7_DMA2 is not set +# CONFIG_STM32F7_DAC1 is not set +# CONFIG_STM32F7_DAC2 is not set +# CONFIG_STM32F7_DCMI is not set +# CONFIG_STM32F7_ETHMAC is not set +# CONFIG_STM32F7_FSMC is not set +# CONFIG_STM32F7_I2C1 is not set +# CONFIG_STM32F7_I2C2 is not set +# CONFIG_STM32F7_I2C3 is not set +# CONFIG_STM32F7_LPTIM1 is not set +# CONFIG_STM32F7_LTDC is not set +# CONFIG_STM32F7_DMA2D is not set +# CONFIG_STM32F7_OTGFS is not set +# CONFIG_STM32F7_OTGHS is not set +# CONFIG_STM32F7_QUADSPI is not set +# CONFIG_STM32F7_SAI1 is not set +# CONFIG_STM32F7_RNG is not set +# CONFIG_STM32F7_SAI2 is not set +# CONFIG_STM32F7_SDMMC1 is not set +# CONFIG_STM32F7_SPDIFRX is not set +# CONFIG_STM32F7_SPI1 is not set +# CONFIG_STM32F7_SPI2 is not set +# CONFIG_STM32F7_SPI3 is not set +# CONFIG_STM32F7_SPI4 is not set +# CONFIG_STM32F7_SPI5 is not set +# CONFIG_STM32F7_SPI6 is not set +# CONFIG_STM32F7_TIM1 is not set +# CONFIG_STM32F7_TIM2 is not set +# CONFIG_STM32F7_TIM3 is not set +# CONFIG_STM32F7_TIM4 is not set +# CONFIG_STM32F7_TIM5 is not set +# CONFIG_STM32F7_TIM6 is not set +# CONFIG_STM32F7_TIM7 is not set +# CONFIG_STM32F7_TIM8 is not set +# CONFIG_STM32F7_TIM9 is not set +# CONFIG_STM32F7_TIM10 is not set +# CONFIG_STM32F7_TIM11 is not set +# CONFIG_STM32F7_TIM12 is not set +# CONFIG_STM32F7_TIM13 is not set +# CONFIG_STM32F7_TIM14 is not set +# CONFIG_STM32F7_TIM15 is not set +# CONFIG_STM32F7_USART1 is not set +# CONFIG_STM32F7_USART2 is not set +CONFIG_STM32F7_USART3=y +# CONFIG_STM32F7_UART4 is not set +# CONFIG_STM32F7_UART5 is not set +# CONFIG_STM32F7_USART6 is not set +# CONFIG_STM32F7_UART7 is not set +# CONFIG_STM32F7_UART8 is not set +# CONFIG_STM32F7_IWDG is not set +# CONFIG_STM32F7_WWDG is not set + +# +# U[S]ART Configuration +# +# CONFIG_STM32F7_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32F7_USART_BREAKS is not set +# CONFIG_STM32F7_CUSTOM_CLOCKCONFIG is not set + +# +# Architecture Options +# +# CONFIG_ARCH_NOINTC is not set +# CONFIG_ARCH_VECNOTIRQ is not set +# CONFIG_ARCH_DMA is not set +CONFIG_ARCH_HAVE_IRQPRIO=y +# CONFIG_ARCH_L2CACHE is not set +# CONFIG_ARCH_HAVE_COHERENT_DCACHE is not set +# CONFIG_ARCH_HAVE_ADDRENV is not set +# CONFIG_ARCH_NEED_ADDRENV_MAPPING is not set +# CONFIG_ARCH_HAVE_MULTICPU is not set +CONFIG_ARCH_HAVE_VFORK=y +# CONFIG_ARCH_HAVE_MMU is not set +CONFIG_ARCH_HAVE_MPU=y +# CONFIG_ARCH_NAND_HWECC is not set +# CONFIG_ARCH_HAVE_EXTCLK is not set +# CONFIG_ARCH_HAVE_POWEROFF is not set +# CONFIG_ARCH_HAVE_RESET is not set +# CONFIG_ARCH_USE_MPU is not set +# CONFIG_ARCH_IRQPRIO is not set +CONFIG_ARCH_STACKDUMP=y +# CONFIG_ENDIAN_BIG is not set +# CONFIG_ARCH_IDLE_CUSTOM is not set +# CONFIG_ARCH_HAVE_RAMFUNCS is not set +CONFIG_ARCH_HAVE_RAMVECTORS=y +# CONFIG_ARCH_RAMVECTORS is not set + +# +# Board Settings +# +CONFIG_BOARD_LOOPSPERMSEC=43103 +# CONFIG_ARCH_CALIBRATION is not set + +# +# Interrupt options +# +CONFIG_ARCH_HAVE_INTERRUPTSTACK=y +CONFIG_ARCH_INTERRUPTSTACK=0 +CONFIG_ARCH_HAVE_HIPRI_INTERRUPT=y +# CONFIG_ARCH_HIPRI_INTERRUPT is not set + +# +# Boot options +# +# CONFIG_BOOT_RUNFROMEXTSRAM is not set +CONFIG_BOOT_RUNFROMFLASH=y +# CONFIG_BOOT_RUNFROMISRAM is not set +# CONFIG_BOOT_RUNFROMSDRAM is not set +# CONFIG_BOOT_COPYTORAM is not set + +# +# Boot Memory Configuration +# +CONFIG_RAM_START=0x20010000 +CONFIG_RAM_SIZE=245760 +# CONFIG_ARCH_HAVE_SDRAM is not set + +# +# Board Selection +# +CONFIG_ARCH_BOARD_NUCLEO_144=y +# CONFIG_ARCH_BOARD_STM32F746G_DISCO is not set +# CONFIG_ARCH_BOARD_CUSTOM is not set +CONFIG_ARCH_BOARD="nucleo-144" + +# +# Common Board Options +# +CONFIG_ARCH_HAVE_LEDS=y +# CONFIG_ARCH_LEDS is not set +CONFIG_ARCH_HAVE_BUTTONS=y +CONFIG_ARCH_BUTTONS=y +CONFIG_ARCH_HAVE_IRQBUTTONS=y +# CONFIG_ARCH_IRQBUTTONS is not set +CONFIG_NSH_MMCSDMINOR=0 + +# +# Board-Specific Options +# +CONFIG_LIB_BOARDCTL=y +# CONFIG_BOARDCTL_UNIQUEID is not set +# CONFIG_BOARDCTL_TSCTEST is not set +# CONFIG_BOARDCTL_ADCTEST is not set +# CONFIG_BOARDCTL_PWMTEST is not set +# CONFIG_BOARDCTL_GRAPHICS is not set +# CONFIG_BOARDCTL_IOCTL is not set + +# +# RTOS Features +# +CONFIG_DISABLE_OS_API=y +# CONFIG_DISABLE_POSIX_TIMERS is not set +# CONFIG_DISABLE_PTHREAD is not set +# CONFIG_DISABLE_SIGNALS is not set +# CONFIG_DISABLE_MQUEUE is not set +# CONFIG_DISABLE_ENVIRON is not set + +# +# Clocks and Timers +# +CONFIG_USEC_PER_TICK=10000 +# CONFIG_SYSTEM_TIME64 is not set +# CONFIG_CLOCK_MONOTONIC is not set +# CONFIG_JULIAN_TIME is not set +CONFIG_START_YEAR=2011 +CONFIG_START_MONTH=12 +CONFIG_START_DAY=6 +CONFIG_MAX_WDOGPARMS=2 +CONFIG_PREALLOC_WDOGS=4 +CONFIG_WDOG_INTRESERVE=0 +CONFIG_PREALLOC_TIMERS=4 + +# +# Tasks and Scheduling +# +# CONFIG_INIT_NONE is not set +CONFIG_INIT_ENTRYPOINT=y +# CONFIG_INIT_FILEPATH is not set +CONFIG_USER_ENTRYPOINT="nsh_main" +CONFIG_RR_INTERVAL=200 +# CONFIG_SCHED_SPORADIC is not set +CONFIG_TASK_NAME_SIZE=0 +CONFIG_MAX_TASKS=16 +# CONFIG_SCHED_HAVE_PARENT is not set +CONFIG_SCHED_WAITPID=y + +# +# Pthread Options +# +# CONFIG_MUTEX_TYPES is not set +CONFIG_NPTHREAD_KEYS=4 + +# +# Performance Monitoring +# +# CONFIG_SCHED_CPULOAD is not set +# CONFIG_SCHED_INSTRUMENTATION is not set + +# +# Files and I/O +# +CONFIG_DEV_CONSOLE=y +# CONFIG_FDCLONE_DISABLE is not set +# CONFIG_FDCLONE_STDIO is not set +CONFIG_SDCLONE_DISABLE=y +CONFIG_NFILE_DESCRIPTORS=8 +CONFIG_NFILE_STREAMS=8 +CONFIG_NAME_MAX=32 +# CONFIG_PRIORITY_INHERITANCE is not set + +# +# RTOS hooks +# +# CONFIG_BOARD_INITIALIZE is not set +# CONFIG_SCHED_STARTHOOK is not set +# CONFIG_SCHED_ATEXIT is not set +# CONFIG_SCHED_ONEXIT is not set + +# +# Signal Numbers +# +CONFIG_SIG_SIGUSR1=1 +CONFIG_SIG_SIGUSR2=2 +CONFIG_SIG_SIGALARM=3 +CONFIG_SIG_SIGCONDTIMEDOUT=16 + +# +# POSIX Message Queue Options +# +CONFIG_PREALLOC_MQ_MSGS=4 +CONFIG_MQ_MAXMSGSIZE=32 +# CONFIG_MODULE is not set + +# +# Work queue support +# +# CONFIG_SCHED_WORKQUEUE is not set +# CONFIG_SCHED_HPWORK is not set +# CONFIG_SCHED_LPWORK is not set + +# +# Stack and heap information +# +CONFIG_IDLETHREAD_STACKSIZE=1024 +CONFIG_USERMAIN_STACKSIZE=2048 +CONFIG_PTHREAD_STACK_MIN=256 +CONFIG_PTHREAD_STACK_DEFAULT=2048 +# CONFIG_LIB_SYSCALL is not set + +# +# Device Drivers +# +CONFIG_DISABLE_POLL=y +CONFIG_DEV_NULL=y +# CONFIG_DEV_ZERO is not set +# CONFIG_DEV_LOOP is not set + +# +# Buffering +# +# CONFIG_DRVR_WRITEBUFFER is not set +# CONFIG_DRVR_READAHEAD is not set +# CONFIG_RAMDISK is not set +# CONFIG_CAN is not set +# CONFIG_ARCH_HAVE_PWM_PULSECOUNT is not set +# CONFIG_ARCH_HAVE_PWM_MULTICHAN is not set +# CONFIG_PWM is not set +CONFIG_ARCH_HAVE_I2CRESET=y +# CONFIG_I2C is not set +CONFIG_SPI=y +# CONFIG_SPI_SLAVE is not set +CONFIG_SPI_EXCHANGE=y +# CONFIG_SPI_CMDDATA is not set +# CONFIG_SPI_CALLBACK is not set +# CONFIG_SPI_BITBANG is not set +# CONFIG_SPI_HWFEATURES is not set +# CONFIG_SPI_CRCGENERATION is not set +# CONFIG_I2S is not set + +# +# Timer Driver Support +# +# CONFIG_TIMER is not set +# CONFIG_RTC is not set +# CONFIG_WATCHDOG is not set +# CONFIG_ANALOG is not set +# CONFIG_AUDIO_DEVICES is not set +# CONFIG_VIDEO_DEVICES is not set +# CONFIG_BCH is not set +# CONFIG_INPUT is not set +# CONFIG_IOEXPANDER is not set +# CONFIG_LCD is not set + +# +# LED Support +# +CONFIG_USERLED=y +CONFIG_USERLED_LOWER=y +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_MMCSD is not set +# CONFIG_MODEM is not set +# CONFIG_MTD is not set +# CONFIG_EEPROM is not set +# CONFIG_PIPES is not set +# CONFIG_PM is not set +# CONFIG_POWER is not set +# CONFIG_SENSORS is not set +# CONFIG_SERCOMM_CONSOLE is not set +CONFIG_SERIAL=y +# CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_16550_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +CONFIG_USART3_SERIALDRIVER=y +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set + +# +# USART Configuration +# +CONFIG_MCU_SERIAL=y +CONFIG_STANDARD_SERIAL=y +# CONFIG_SERIAL_IFLOWCONTROL is not set +# CONFIG_SERIAL_OFLOWCONTROL is not set +# CONFIG_SERIAL_DMA is not set +CONFIG_ARCH_HAVE_SERIAL_TERMIOS=y +CONFIG_USART3_SERIAL_CONSOLE=y +# CONFIG_OTHER_SERIAL_CONSOLE is not set +# CONFIG_NO_SERIAL_CONSOLE is not set + +# +# USART3 Configuration +# +CONFIG_USART3_RXBUFSIZE=256 +CONFIG_USART3_TXBUFSIZE=256 +CONFIG_USART3_BAUD=115200 +CONFIG_USART3_BITS=8 +CONFIG_USART3_PARITY=0 +CONFIG_USART3_2STOP=0 +# CONFIG_USART3_IFLOWCONTROL is not set +# CONFIG_USART3_OFLOWCONTROL is not set +# CONFIG_USART3_DMA is not set +# CONFIG_USBDEV is not set +# CONFIG_USBHOST is not set +# CONFIG_DRIVERS_WIRELESS is not set + +# +# System Logging Device Options +# + +# +# System Logging +# +# CONFIG_RAMLOG is not set +# CONFIG_SYSLOG_CONSOLE is not set + +# +# Networking Support +# +# CONFIG_ARCH_HAVE_NET is not set +# CONFIG_ARCH_HAVE_PHY is not set +# CONFIG_NET is not set + +# +# Crypto API +# +# CONFIG_CRYPTO is not set + +# +# File Systems +# + +# +# File system configuration +# +# CONFIG_DISABLE_MOUNTPOINT is not set +# CONFIG_FS_AUTOMOUNTER is not set +# CONFIG_DISABLE_PSEUDOFS_OPERATIONS is not set +# CONFIG_FS_READABLE is not set +# CONFIG_FS_WRITABLE is not set +# CONFIG_FS_NAMED_SEMAPHORES is not set +CONFIG_FS_MQUEUE_MPATH="/var/mqueue" +# CONFIG_FS_RAMMAP is not set +# CONFIG_FS_FAT is not set +# CONFIG_FS_NXFFS is not set +# CONFIG_FS_ROMFS is not set +# CONFIG_FS_TMPFS is not set +# CONFIG_FS_SMARTFS is not set +# CONFIG_FS_BINFS is not set +# CONFIG_FS_PROCFS is not set +# CONFIG_FS_UNIONFS is not set + +# +# System Logging +# +# CONFIG_SYSLOG is not set +# CONFIG_SYSLOG_TIMESTAMP is not set + +# +# Graphics Support +# +# CONFIG_NX is not set + +# +# Memory Management +# +# CONFIG_MM_SMALL is not set +CONFIG_MM_REGIONS=2 +# CONFIG_ARCH_HAVE_HEAP2 is not set +# CONFIG_GRAN is not set + +# +# Audio Support +# +# CONFIG_AUDIO is not set + +# +# Wireless Support +# + +# +# Binary Loader +# +# CONFIG_BINFMT_DISABLE is not set +# CONFIG_BINFMT_EXEPATH is not set +# CONFIG_NXFLAT is not set +# CONFIG_ELF is not set +CONFIG_BUILTIN=y +# CONFIG_PIC is not set +# CONFIG_SYMTAB_ORDEREDBYNAME is not set + +# +# Library Routines +# + +# +# Standard C Library Options +# +CONFIG_STDIO_BUFFER_SIZE=64 +CONFIG_STDIO_LINEBUFFER=y +CONFIG_NUNGET_CHARS=2 +CONFIG_LIB_HOMEDIR="/" +# CONFIG_LIBM is not set +# CONFIG_NOPRINTF_FIELDWIDTH is not set +# CONFIG_LIBC_FLOATINGPOINT is not set +CONFIG_LIBC_LONG_LONG=y +# CONFIG_LIBC_IOCTL_VARIADIC is not set +CONFIG_LIB_RAND_ORDER=1 +# CONFIG_EOL_IS_CR is not set +# CONFIG_EOL_IS_LF is not set +# CONFIG_EOL_IS_BOTH_CRLF is not set +CONFIG_EOL_IS_EITHER_CRLF=y +# CONFIG_LIBC_EXECFUNCS is not set +CONFIG_POSIX_SPAWN_PROXY_STACKSIZE=1024 +CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=2048 +# CONFIG_LIBC_STRERROR is not set +# CONFIG_LIBC_PERROR_STDOUT is not set +CONFIG_ARCH_LOWPUTC=y +# CONFIG_LIBC_LOCALTIME is not set +# CONFIG_TIME_EXTENDED is not set +CONFIG_LIB_SENDFILE_BUFSIZE=512 +# CONFIG_ARCH_ROMGETC is not set +# CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set +# CONFIG_LIBC_NETDB is not set + +# +# Non-standard Library Support +# +# CONFIG_LIB_KBDCODEC is not set +# CONFIG_LIB_SLCDCODEC is not set + +# +# Basic CXX Support +# +# CONFIG_C99_BOOL8 is not set +CONFIG_HAVE_CXX=y +CONFIG_HAVE_CXXINITIALIZE=y +# CONFIG_CXX_NEWLONG is not set + +# +# uClibc++ Standard C++ Library +# +# CONFIG_UCLIBCXX is not set + +# +# Application Configuration +# + +# +# NxWidgets/NxWM +# + +# +# Built-In Applications +# +CONFIG_BUILTIN_PROXY_STACKSIZE=1024 + +# +# CAN Utilities +# + +# +# Examples +# +# CONFIG_EXAMPLES_BUTTONS is not set +# CONFIG_EXAMPLES_CHAT is not set +# CONFIG_EXAMPLES_CONFIGDATA is not set +# CONFIG_EXAMPLES_CPUHOG is not set +# CONFIG_EXAMPLES_CXXTEST is not set +# CONFIG_EXAMPLES_DHCPD is not set +# CONFIG_EXAMPLES_ELF is not set +# CONFIG_EXAMPLES_FTPC is not set +# CONFIG_EXAMPLES_FTPD is not set +# CONFIG_EXAMPLES_HELLO is not set +CONFIG_EXAMPLES_HELLOXX=y +CONFIG_EXAMPLES_HELLOXX_CXXINITIALIZE=y +# CONFIG_EXAMPLES_JSON is not set +# CONFIG_EXAMPLES_HIDKBD is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set +# CONFIG_EXAMPLES_IGMP is not set +CONFIG_EXAMPLES_LEDS=y +CONFIG_EXAMPLES_LEDS_PRIORITY=100 +CONFIG_EXAMPLES_LEDS_STACKSIZE=2048 +CONFIG_EXAMPLES_LEDS_DEVPATH="/dev/userleds" +CONFIG_EXAMPLES_LEDS_LEDSET=0x0f +# CONFIG_EXAMPLES_MEDIA is not set +# CONFIG_EXAMPLES_MM is not set +# CONFIG_EXAMPLES_MODBUS is not set +# CONFIG_EXAMPLES_MOUNT is not set +# CONFIG_EXAMPLES_NRF24L01TERM is not set +CONFIG_EXAMPLES_NSH=y +CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y +# CONFIG_EXAMPLES_NULL is not set +# CONFIG_EXAMPLES_NX is not set +# CONFIG_EXAMPLES_NXTERM is not set +# CONFIG_EXAMPLES_NXFFS is not set +# CONFIG_EXAMPLES_NXHELLO is not set +# CONFIG_EXAMPLES_NXIMAGE is not set +# CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTEXT is not set +# CONFIG_EXAMPLES_OSTEST is not set +# CONFIG_EXAMPLES_PCA9635 is not set +# CONFIG_EXAMPLES_PIPE is not set +# CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_POSIXSPAWN is not set +# CONFIG_EXAMPLES_RGBLED is not set +# CONFIG_EXAMPLES_RGMP is not set +# CONFIG_EXAMPLES_SENDMAIL is not set +# CONFIG_EXAMPLES_SERIALBLASTER is not set +# CONFIG_EXAMPLES_SERIALRX is not set +# CONFIG_EXAMPLES_SERLOOP is not set +# CONFIG_EXAMPLES_SLCD is not set +# CONFIG_EXAMPLES_SMART_TEST is not set +# CONFIG_EXAMPLES_SMART is not set +# CONFIG_EXAMPLES_SMP is not set +# CONFIG_EXAMPLES_TCPECHO is not set +# CONFIG_EXAMPLES_TELNETD is not set +# CONFIG_EXAMPLES_TIFF is not set +# CONFIG_EXAMPLES_TOUCHSCREEN is not set +# CONFIG_EXAMPLES_WEBSERVER is not set +# CONFIG_EXAMPLES_USBSERIAL is not set +# CONFIG_EXAMPLES_USBTERM is not set +# CONFIG_EXAMPLES_WATCHDOG is not set + +# +# File System Utilities +# +# CONFIG_FSUTILS_INIFILE is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set + +# +# Graphics Support +# +# CONFIG_TIFF is not set +# CONFIG_GRAPHICS_TRAVELER is not set + +# +# Interpreters +# +# CONFIG_INTERPRETERS_FICL is not set +# CONFIG_INTERPRETERS_PCODE is not set +# CONFIG_INTERPRETERS_MICROPYTHON is not set + +# +# FreeModBus +# +# CONFIG_MODBUS is not set + +# +# Network Utilities +# +# CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_FTPC is not set +# CONFIG_NETUTILS_JSON is not set +# CONFIG_NETUTILS_SMTP is not set + +# +# NSH Library +# +CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set + +# +# Command Line Configuration +# +CONFIG_NSH_READLINE=y +# CONFIG_NSH_CLE is not set +CONFIG_NSH_LINELEN=64 +# CONFIG_NSH_DISABLE_SEMICOLON is not set +CONFIG_NSH_CMDPARMS=y +CONFIG_NSH_MAXARGUMENTS=6 +CONFIG_NSH_ARGCAT=y +CONFIG_NSH_NESTDEPTH=3 +# CONFIG_NSH_DISABLEBG is not set +CONFIG_NSH_BUILTIN_APPS=y + +# +# Disable Individual commands +# +# CONFIG_NSH_DISABLE_ADDROUTE is not set +# CONFIG_NSH_DISABLE_BASENAME is not set +# CONFIG_NSH_DISABLE_CAT is not set +# CONFIG_NSH_DISABLE_CD is not set +# CONFIG_NSH_DISABLE_CP is not set +# CONFIG_NSH_DISABLE_CMP is not set +# CONFIG_NSH_DISABLE_DATE is not set +# CONFIG_NSH_DISABLE_DD is not set +# CONFIG_NSH_DISABLE_DF is not set +# CONFIG_NSH_DISABLE_DELROUTE is not set +# CONFIG_NSH_DISABLE_DIRNAME is not set +# CONFIG_NSH_DISABLE_ECHO is not set +# CONFIG_NSH_DISABLE_EXEC is not set +# CONFIG_NSH_DISABLE_EXIT is not set +# CONFIG_NSH_DISABLE_FREE is not set +# CONFIG_NSH_DISABLE_GET is not set +# CONFIG_NSH_DISABLE_HELP is not set +# CONFIG_NSH_DISABLE_HEXDUMP is not set +# CONFIG_NSH_DISABLE_IFCONFIG is not set +CONFIG_NSH_DISABLE_IFUPDOWN=y +# CONFIG_NSH_DISABLE_KILL is not set +# CONFIG_NSH_DISABLE_LOSETUP is not set +CONFIG_NSH_DISABLE_LOSMART=y +# CONFIG_NSH_DISABLE_LS is not set +# CONFIG_NSH_DISABLE_MB is not set +# CONFIG_NSH_DISABLE_MKDIR is not set +# CONFIG_NSH_DISABLE_MKFIFO is not set +# CONFIG_NSH_DISABLE_MKRD is not set +# CONFIG_NSH_DISABLE_MH is not set +# CONFIG_NSH_DISABLE_MOUNT is not set +# CONFIG_NSH_DISABLE_MV is not set +# CONFIG_NSH_DISABLE_MW is not set +# CONFIG_NSH_DISABLE_PS is not set +# CONFIG_NSH_DISABLE_PUT is not set +# CONFIG_NSH_DISABLE_PWD is not set +# CONFIG_NSH_DISABLE_RM is not set +# CONFIG_NSH_DISABLE_RMDIR is not set +# CONFIG_NSH_DISABLE_SET is not set +# CONFIG_NSH_DISABLE_SH is not set +# CONFIG_NSH_DISABLE_SLEEP is not set +# CONFIG_NSH_DISABLE_TIME is not set +# CONFIG_NSH_DISABLE_TEST is not set +# CONFIG_NSH_DISABLE_UMOUNT is not set +# CONFIG_NSH_DISABLE_UNAME is not set +# CONFIG_NSH_DISABLE_UNSET is not set +# CONFIG_NSH_DISABLE_USLEEP is not set +# CONFIG_NSH_DISABLE_WGET is not set +# CONFIG_NSH_DISABLE_XD is not set + +# +# Configure Command Options +# +CONFIG_NSH_CMDOPT_DF_H=y +CONFIG_NSH_CODECS_BUFSIZE=128 +CONFIG_NSH_CMDOPT_HEXDUMP=y +CONFIG_NSH_FILEIOSIZE=512 + +# +# Scripting Support +# +# CONFIG_NSH_DISABLESCRIPT is not set +# CONFIG_NSH_DISABLE_ITEF is not set +# CONFIG_NSH_DISABLE_LOOPS is not set + +# +# Console Configuration +# +CONFIG_NSH_CONSOLE=y +# CONFIG_NSH_ALTCONDEV is not set +CONFIG_NSH_ARCHINIT=y +# CONFIG_NSH_LOGIN is not set +# CONFIG_NSH_CONSOLE_LOGIN is not set + +# +# Platform-specific Support +# +# CONFIG_PLATFORM_CONFIGDATA is not set + +# +# System Libraries and NSH Add-Ons +# +# CONFIG_SYSTEM_FREE is not set +# CONFIG_SYSTEM_CLE is not set +# CONFIG_SYSTEM_CUTERM is not set +# CONFIG_SYSTEM_INSTALL is not set +# CONFIG_SYSTEM_HEX2BIN is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_RAMTEST is not set +CONFIG_READLINE_HAVE_EXTMATCH=y +CONFIG_SYSTEM_READLINE=y +CONFIG_READLINE_ECHO=y +CONFIG_READLINE_TABCOMPLETION=y +CONFIG_READLINE_MAX_BUILTINS=64 +CONFIG_READLINE_MAX_EXTCMDS=64 +CONFIG_READLINE_CMD_HISTORY=y +CONFIG_READLINE_CMD_HISTORY_LINELEN=80 +CONFIG_READLINE_CMD_HISTORY_LEN=16 +# CONFIG_SYSTEM_SUDOKU is not set +# CONFIG_SYSTEM_VI is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set +# CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/nucleo-144/evalos/setenv.sh b/configs/nucleo-144/evalos/setenv.sh new file mode 100644 index 00000000000..0f767948bf4 --- /dev/null +++ b/configs/nucleo-144/evalos/setenv.sh @@ -0,0 +1,78 @@ +#!/bin/bash +# configs/nucleo-144/evalos/setenv.sh +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# Author: Mark Olsson +# +# 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 [ "$_" = "$0" ] ; then + echo "You must source this script, not run it!" 1>&2 + exit 1 +fi + +WD=`pwd` +if [ ! -x "setenv.sh" ]; then + echo "This script must be executed from the top-level NuttX build directory" + exit 1 +fi + +if [ -z "${PATH_ORIG}" ]; then + export PATH_ORIG="${PATH}" +fi + +# This is the Cygwin path to the location where I installed the Atmel GCC +# toolchain under Windows. You will also have to edit this if you install +# this toolchain in any other location +#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/Atmel/Atmel Toolchain/ARM GCC/Native/4.7.3.99/arm-gnu-toolchain/bin" + +# This is the Cygwin path to the location where I installed the CodeSourcery +# toolchain under windows. You will also have to edit this if you install +# the CodeSourcery toolchain in any other location +#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin" +#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin" +# export TOOLCHAIN_BIN="/cygdrive/c/Users/MyName/MentorGraphics/Sourcery_CodeBench_Lite_for_ARM_EABI/bin" + +# This is the location where I installed the ARM "GNU Tools for ARM Embedded Processors" +# You can this free toolchain here https://launchpad.net/gcc-arm-embedded +export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/GNU Tools ARM Embedded/4.9 2015q2/bin" + +# This is the path to the location where I installed the devkitARM toolchain +# You can get this free toolchain from http://devkitpro.org/ or http://sourceforge.net/projects/devkitpro/ +#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/devkitARM/bin" + +# This is the Cygwin path to the location where I build the buildroot +# toolchain. +# export TOOLCHAIN_BIN="${WD}/../buildroot/build_arm_nofpu/staging_dir/bin" + +# Add the path to the toolchain to the PATH varialble +export PATH="${TOOLCHAIN_BIN}:/sbin:/usr/sbin:${PATH_ORIG}" + +echo "PATH : ${PATH}" diff --git a/configs/nucleo-144/include/board.h b/configs/nucleo-144/include/board.h index 0e9020c0de8..63eb5df084e 100644 --- a/configs/nucleo-144/include/board.h +++ b/configs/nucleo-144/include/board.h @@ -3,6 +3,7 @@ * * Copyright (C) 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt + * Author: Mark Olsson * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -46,10 +47,12 @@ # include #endif +#ifdef __KERNEL__ #include "stm32_rcc.h" #ifdef CONFIG_STM32F7_SDMMC1 # include "stm32_sdmmc.h" #endif +#endif /************************************************************************************ * Pre-processor Definitions @@ -226,13 +229,19 @@ /* LED index values for use with board_userled() */ #define BOARD_LED1 0 -#define BOARD_NLEDS 1 +#define BOARD_LED2 1 +#define BOARD_LED3 2 +#define BOARD_NLEDS 3 #define BOARD_LD1 BOARD_LED1 +#define BOARD_LD2 BOARD_LED2 +#define BOARD_LD3 BOARD_LED3 /* LED bits for use with board_userled_all() */ #define BOARD_LED1_BIT (1 << BOARD_LED1) +#define BOARD_LED2_BIT (1 << BOARD_LED2) +#define BOARD_LED3_BIT (1 << BOARD_LED3) /* If CONFIG_ARCH_LEDS is defined, the usage by the board port is defined in * include/board.h and src/stm32_leds.c. The LEDs are used to encode OS-related @@ -288,8 +297,11 @@ * -- ----- --------- ----- */ -#define GPIO_USART6_RX GPIO_USART6_RX_1 -#define GPIO_USART6_TX GPIO_USART6_TX_1 + #define GPIO_USART6_RX GPIO_USART6_RX_1 + #define GPIO_USART6_TX GPIO_USART6_TX_1 + + #define GPIO_USART3_RX GPIO_USART3_RX_3 + #define GPIO_USART3_TX GPIO_USART3_TX_3 /* The STM32 F7 connects to a SMSC LAN8742A PHY using these pins: * diff --git a/configs/nucleo-144/nsh/defconfig b/configs/nucleo-144/nsh/defconfig index f7fe7e2ebb7..cb59abca25c 100644 --- a/configs/nucleo-144/nsh/defconfig +++ b/configs/nucleo-144/nsh/defconfig @@ -484,33 +484,32 @@ CONFIG_SPI_EXCHANGE=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -CONFIG_ARCH_HAVE_USART6=y -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +CONFIG_USART6_SERIALDRIVER=y +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration # -CONFIG_USART6_ISUART=y CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set diff --git a/configs/nucleo-144/src/nucleo-144.h b/configs/nucleo-144/src/nucleo-144.h index 7628bd120be..a5766c4497c 100644 --- a/configs/nucleo-144/src/nucleo-144.h +++ b/configs/nucleo-144/src/nucleo-144.h @@ -2,7 +2,8 @@ * configs/nucleo-144/src/nucleo-144.h * * Copyright (C) 2016 Gregory Nutt. All rights reserved. - * Authors: Gregory Nutt + * Author: Gregory Nutt + * Author: Mark Olsson * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -67,13 +68,19 @@ */ #define GPIO_LD1 (GPIO_OUTPUT | GPIO_PUSHPULL | GPIO_SPEED_50MHz | GPIO_OUTPUT_CLEAR | \ - GPIO_PORTI | GPIO_PIN1) + GPIO_PORTB | GPIO_PIN0) +#define GPIO_LD2 (GPIO_OUTPUT | GPIO_PUSHPULL | GPIO_SPEED_50MHz | GPIO_OUTPUT_CLEAR | \ + GPIO_PORTB | GPIO_PIN7) +#define GPIO_LD3 (GPIO_OUTPUT | GPIO_PUSHPULL | GPIO_SPEED_50MHz | GPIO_OUTPUT_CLEAR | \ + GPIO_PORTB | GPIO_PIN14) -/* Pushbutton B1, labelled "User", is connected to GPIO PI11. A high value will be sensed when the +#define LED_DRIVER_PATH "/dev/userleds" + +/* Pushbutton B1, labelled "User", is connected to GPIO PC13. A high value will be sensed when the * button is depressed. Note that the EXTI interrupt is configured. */ -#define GPIO_BTN_USER (GPIO_INPUT | GPIO_FLOAT | GPIO_EXTI | GPIO_PORTI | GPIO_PIN11) +#define GPIO_BTN_USER (GPIO_INPUT | GPIO_FLOAT | GPIO_EXTI | GPIO_PORTC | GPIO_PIN13) /**************************************************************************************************** * Public data @@ -97,4 +104,3 @@ void weak_function stm32_spidev_initialize(void); #endif /* __ASSEMBLY__ */ #endif /* __CONFIGS_NUCLEO_144_SRC_NUCLEO_144_H */ - diff --git a/configs/nucleo-144/src/stm32_appinitialize.c b/configs/nucleo-144/src/stm32_appinitialize.c index 6c80705c3a3..e1b318684c8 100644 --- a/configs/nucleo-144/src/stm32_appinitialize.c +++ b/configs/nucleo-144/src/stm32_appinitialize.c @@ -3,6 +3,7 @@ * * Copyright (C) 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt + * Author: Mark Olsson * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -38,13 +39,10 @@ ****************************************************************************/ #include +#include -#include "stm32_ccm.h" #include "nucleo-144.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ +#include /**************************************************************************** * Public Functions @@ -58,28 +56,34 @@ * called directly from application code, but only indirectly via the * (non-standard) boardctl() interface using the command BOARDIOC_INIT. * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { -#ifdef CONFIG_FS_PROCFS +#if !defined(CONFIG_ARCH_LEDS) && defined(CONFIG_USERLED_LOWER) int ret; -#ifdef CONFIG_STM32_CCM_PROCFS - /* Register the CCM procfs entry. This must be done before the procfs is - * mounted. - */ + /* Register the LED driver */ - (void)ccm_procfs_register(); -#endif - - /* Mount the procfs file system */ - - ret = mount(NULL, SAMV71_PROCFS_MOUNTPOINT, "procfs", 0, NULL); + ret = userled_lower_initialize(LED_DRIVER_PATH); if (ret < 0) { - SYSLOG("ERROR: Failed to mount procfs at %s: %d\n", - SAMV71_PROCFS_MOUNTPOINT, ret); + syslog(LOG_ERR, "ERROR: userled_lower_initialize() failed: %d\n", ret); } #endif diff --git a/configs/nucleo-144/src/stm32_autoleds.c b/configs/nucleo-144/src/stm32_autoleds.c index 0e7a19d6ad0..e9114391aff 100644 --- a/configs/nucleo-144/src/stm32_autoleds.c +++ b/configs/nucleo-144/src/stm32_autoleds.c @@ -90,20 +90,20 @@ void board_autoled_on(int led) switch (led) { - case 0: /* LED_STARTED: NuttX has been started STATUS LED=OFF */ - /* LED_HEAPALLOCATE: Heap has been allocated STATUS LED=OFF */ - /* LED_IRQSENABLED: Interrupts enabled STATUS LED=OFF */ - break; /* Leave ledstate == true to turn OFF */ + case 0: /* LED_STARTED: NuttX has been started STATUS LED=OFF */ + /* LED_HEAPALLOCATE: Heap has been allocated STATUS LED=OFF */ + /* LED_IRQSENABLED: Interrupts enabled STATUS LED=OFF */ + break; /* Leave ledstate == true to turn OFF */ default: - case 2: /* LED_INIRQ: In an interrupt STATUS LED=N/C */ - /* LED_SIGNAL: In a signal handler STATUS LED=N/C */ - /* LED_ASSERTION: An assertion failed STATUS LED=N/C */ - return; /* Return to leave STATUS LED unchanged */ + case 2: /* LED_INIRQ: In an interrupt STATUS LED=N/C */ + /* LED_SIGNAL: In a signal handler STATUS LED=N/C */ + /* LED_ASSERTION: An assertion failed STATUS LED=N/C */ + return; /* Return to leave STATUS LED unchanged */ - case 3: /* LED_PANIC: The system has crashed STATUS LED=FLASH */ - case 1: /* LED_STACKCREATED: Idle stack created STATUS LED=ON */ - ledstate = true; /* Set ledstate == false to turn ON */ + case 3: /* LED_PANIC: The system has crashed STATUS LED=FLASH */ + case 1: /* LED_STACKCREATED: Idle stack created STATUS LED=ON */ + ledstate = true; /* Set ledstate == false to turn ON */ break; } @@ -121,21 +121,21 @@ void board_autoled_off(int led) /* These should not happen and are ignored */ default: - case 0: /* LED_STARTED: NuttX has been started STATUS LED=OFF */ - /* LED_HEAPALLOCATE: Heap has been allocated STATUS LED=OFF */ - /* LED_IRQSENABLED: Interrupts enabled STATUS LED=OFF */ - case 1: /* LED_STACKCREATED: Idle stack created STATUS LED=ON */ + case 0: /* LED_STARTED: NuttX has been started STATUS LED=OFF */ + /* LED_HEAPALLOCATE: Heap has been allocated STATUS LED=OFF */ + /* LED_IRQSENABLED: Interrupts enabled STATUS LED=OFF */ + case 1: /* LED_STACKCREATED: Idle stack created STATUS LED=ON */ /* These result in no-change */ - case 2: /* LED_INIRQ: In an interrupt STATUS LED=N/C */ - /* LED_SIGNAL: In a signal handler STATUS LED=N/C */ - /* LED_ASSERTION: An assertion failed STATUS LED=N/C */ - return; /* Return to leave STATUS LED unchanged */ + case 2: /* LED_INIRQ: In an interrupt STATUS LED=N/C */ + /* LED_SIGNAL: In a signal handler STATUS LED=N/C */ + /* LED_ASSERTION: An assertion failed STATUS LED=N/C */ + return; /* Return to leave STATUS LED unchanged */ /* Turn STATUS LED off set driving the output high */ - case 3: /* LED_PANIC: The system has crashed STATUS LED=FLASH */ + case 3: /* LED_PANIC: The system has crashed STATUS LED=FLASH */ stm32_gpiowrite(GPIO_LD1, false); break; } diff --git a/configs/nucleo-144/src/stm32_boot.c b/configs/nucleo-144/src/stm32_boot.c index 6024e76b226..210c0982a3d 100644 --- a/configs/nucleo-144/src/stm32_boot.c +++ b/configs/nucleo-144/src/stm32_boot.c @@ -47,14 +47,6 @@ #include "up_arch.h" #include "nucleo-144.h" -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -113,7 +105,7 @@ void board_initialize(void) * but the initialization function must run in kernel space. */ - (void)board_app_initialize(); + (void)board_app_initialize(0); #endif } #endif diff --git a/configs/nucleo-144/src/stm32_buttons.c b/configs/nucleo-144/src/stm32_buttons.c index 0421caeec7e..54a7dafbfba 100644 --- a/configs/nucleo-144/src/stm32_buttons.c +++ b/configs/nucleo-144/src/stm32_buttons.c @@ -47,10 +47,6 @@ #ifdef CONFIG_ARCH_BUTTONS -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/configs/nucleo-144/src/stm32_spi.c b/configs/nucleo-144/src/stm32_spi.c index d3b5e9160e5..e31a63a11de 100644 --- a/configs/nucleo-144/src/stm32_spi.c +++ b/configs/nucleo-144/src/stm32_spi.c @@ -74,14 +74,6 @@ # define spivdbg(x...) #endif -/************************************************************************************ - * Private Data - ************************************************************************************/ - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ diff --git a/configs/nucleo-144/src/stm32_userleds.c b/configs/nucleo-144/src/stm32_userleds.c index 19146d241de..4ec9f209479 100644 --- a/configs/nucleo-144/src/stm32_userleds.c +++ b/configs/nucleo-144/src/stm32_userleds.c @@ -3,6 +3,7 @@ * * Copyright (C) 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt + * Author: Mark Olsson * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -42,6 +43,8 @@ #include #include +#include + #include "stm32_gpio.h" #include "nucleo-144.h" @@ -63,6 +66,17 @@ # define ledvdbg(x...) #endif +/**************************************************************************** + * Private Data + ****************************************************************************/ + +/* This array maps an LED number to GPIO pin configuration */ + +static const uint32_t g_ledcfg[3] = +{ + GPIO_LD1, GPIO_LD2, GPIO_LD3 +}; + /**************************************************************************** * Public Functions ****************************************************************************/ @@ -80,7 +94,14 @@ void board_userled_initialize(void) { - stm32_configgpio(GPIO_LD1); + int i; + + /* Configure LED1-3 GPIOs for output */ + + for (i = 0; i < 3; i++) + { + stm32_configgpio(g_ledcfg[i]); + } } /**************************************************************************** @@ -95,10 +116,10 @@ void board_userled_initialize(void) void board_userled(int led, bool ledon) { - if (led == BOARD_STATUS_LED) - { - stm32_gpiowrite(GPIO_LD1, !ledon); - } + if ((unsigned)led < 3) + { + stm32_gpiowrite(g_ledcfg[led], ledon); + } } /**************************************************************************** @@ -114,7 +135,14 @@ void board_userled(int led, bool ledon) void board_userled_all(uint8_t ledset) { - stm32_gpiowrite(GPIO_LD1, (ledset & BOARD_STATUS_LED_BIT) != 0); + int i; + + /* Configure LED1-3 GPIOs for output */ + + for (i = 0; i < 3; i++) + { + stm32_gpiowrite(g_ledcfg[i], (ledset & (1 << i)) != 0); + } } #endif /* !CONFIG_ARCH_LEDS */ diff --git a/configs/nucleo-f303re/adc/defconfig b/configs/nucleo-f303re/adc/defconfig index 5932a9fe6fb..4a26a328f99 100644 --- a/configs/nucleo-f303re/adc/defconfig +++ b/configs/nucleo-f303re/adc/defconfig @@ -76,6 +76,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -94,6 +95,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -115,6 +117,7 @@ CONFIG_ARCH_CORTEXM4=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -123,6 +126,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y CONFIG_ARCH_HAVE_FPU=y # CONFIG_ARCH_HAVE_DPFPU is not set # CONFIG_ARCH_FPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -133,6 +137,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set # CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set @@ -238,6 +243,7 @@ CONFIG_ARCH_CHIP_STM32F303RE=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -805,6 +811,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # @@ -918,6 +926,7 @@ CONFIG_EXAMPLES_ADC_SWTRIG=y # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/nucleo-f303re/can/defconfig b/configs/nucleo-f303re/can/defconfig index df3f7c0a933..3fe7a7e6ffd 100644 --- a/configs/nucleo-f303re/can/defconfig +++ b/configs/nucleo-f303re/can/defconfig @@ -76,6 +76,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -94,6 +95,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -115,6 +117,7 @@ CONFIG_ARCH_CORTEXM4=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -123,6 +126,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y CONFIG_ARCH_HAVE_FPU=y # CONFIG_ARCH_HAVE_DPFPU is not set # CONFIG_ARCH_FPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -133,6 +137,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set # CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set @@ -243,6 +248,7 @@ CONFIG_ARCH_CHIP_STM32F303RE=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -807,6 +813,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # @@ -920,6 +928,7 @@ CONFIG_EXAMPLES_CAN_READWRITE=y # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/nucleo-f303re/nxlines/defconfig b/configs/nucleo-f303re/nxlines/defconfig index ddcbc7c5d3c..6ea676faa0e 100644 --- a/configs/nucleo-f303re/nxlines/defconfig +++ b/configs/nucleo-f303re/nxlines/defconfig @@ -76,6 +76,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -94,6 +95,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -115,6 +117,7 @@ CONFIG_ARCH_CORTEXM4=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -123,6 +126,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y CONFIG_ARCH_HAVE_FPU=y # CONFIG_ARCH_HAVE_DPFPU is not set # CONFIG_ARCH_FPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -133,6 +137,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set # CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set @@ -240,6 +245,7 @@ CONFIG_ARCH_CHIP_STM32F303RE=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -821,6 +827,7 @@ CONFIG_NX_LCDDRIVER=y CONFIG_NX_NPLANES=1 CONFIG_NX_BGCOLOR=0x0 # CONFIG_NX_WRITEONLY is not set +# CONFIG_NX_UPDATE is not set # # Supported Pixel Depths @@ -963,6 +970,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # @@ -989,6 +998,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # Examples # # CONFIG_EXAMPLES_BUTTONS is not set +# CONFIG_EXAMPLES_CAN is not set # CONFIG_EXAMPLES_CHAT is not set # CONFIG_EXAMPLES_CONFIGDATA is not set # CONFIG_EXAMPLES_CPUHOG is not set @@ -1079,6 +1089,7 @@ CONFIG_EXAMPLES_NXLINES_EXTERNINIT=y # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/nucleo-f303re/pwm/defconfig b/configs/nucleo-f303re/pwm/defconfig index af0ecd9cbc9..08973aff2a7 100644 --- a/configs/nucleo-f303re/pwm/defconfig +++ b/configs/nucleo-f303re/pwm/defconfig @@ -76,6 +76,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -94,6 +95,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -115,6 +117,7 @@ CONFIG_ARCH_CORTEXM4=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -123,6 +126,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y CONFIG_ARCH_HAVE_FPU=y # CONFIG_ARCH_HAVE_DPFPU is not set # CONFIG_ARCH_FPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -133,6 +137,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set # CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set @@ -238,6 +243,7 @@ CONFIG_ARCH_CHIP_STM32F303RE=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -812,6 +818,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # @@ -933,6 +941,7 @@ CONFIG_EXAMPLES_PWM_CHANNEL2=2 # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/nucleo-f303re/serialrx/defconfig b/configs/nucleo-f303re/serialrx/defconfig index 4748e044c44..2203ccbe87e 100644 --- a/configs/nucleo-f303re/serialrx/defconfig +++ b/configs/nucleo-f303re/serialrx/defconfig @@ -76,6 +76,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -94,6 +95,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -115,6 +117,7 @@ CONFIG_ARCH_CORTEXM4=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -123,6 +126,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y CONFIG_ARCH_HAVE_FPU=y # CONFIG_ARCH_HAVE_DPFPU is not set # CONFIG_ARCH_FPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -133,6 +137,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set # CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set @@ -239,6 +244,7 @@ CONFIG_ARCH_CHIP_STM32F303RE=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -413,13 +419,17 @@ CONFIG_STM32_JTAG_SW_ENABLE=y # CONFIG_STM32_TIM4_CAP is not set # CONFIG_STM32_TIM8_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_UART4_SERIALDRIVER=y +# CONFIG_STM32_UART4_1WIREDRIVER is not set # CONFIG_UART4_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # CONFIG_STM32_HAVE_RTC_COUNTER is not set # CONFIG_STM32_HAVE_RTC_SUBSECONDS is not set @@ -690,32 +700,28 @@ CONFIG_ADC_FIFOSIZE=8 # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -CONFIG_ARCH_HAVE_UART4=y -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +CONFIG_UART4_SERIALDRIVER=y +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -857,6 +863,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # @@ -974,6 +982,7 @@ CONFIG_EXAMPLES_SERIALRX_PRINTSTR=y # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/nucleo-f303re/src/stm32_appinitialize.c b/configs/nucleo-f303re/src/stm32_appinitialize.c index dce4fd50909..d79c7d50412 100644 --- a/configs/nucleo-f303re/src/stm32_appinitialize.c +++ b/configs/nucleo-f303re/src/stm32_appinitialize.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/nucleo-f303re/src/stm32_appinitialize.c * - * Copyright (C) 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2015-2016 Gregory Nutt. All rights reserved. * Copyright (C) 2015 Omni Hoverboards Inc. All rights reserved. * Authors: Gregory Nutt * Paul Alexander Patience @@ -61,9 +61,24 @@ * called directly from application code, but only indirectly via the * (non-standard) boardctl() interface using the command BOARDIOC_INIT. * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { return OK; } diff --git a/configs/nucleo-f303re/src/stm32_boot.c b/configs/nucleo-f303re/src/stm32_boot.c index 783a231f7c3..6410d202d00 100644 --- a/configs/nucleo-f303re/src/stm32_boot.c +++ b/configs/nucleo-f303re/src/stm32_boot.c @@ -86,7 +86,7 @@ void stm32_boardinitialize(void) } #endif -#ifdef CONFIG_CANUTILS_UAVCAN +#ifdef CONFIG_CANUTILS_LIBUAVCAN (void)stm32_configgpio(GPIO_CAN1_RX); (void)stm32_configgpio(GPIO_CAN1_TX); #endif diff --git a/configs/nucleo-f303re/uavcan/defconfig b/configs/nucleo-f303re/uavcan/defconfig index 6fe165d4615..c68b048740a 100644 --- a/configs/nucleo-f303re/uavcan/defconfig +++ b/configs/nucleo-f303re/uavcan/defconfig @@ -76,6 +76,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -94,6 +95,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -115,6 +117,7 @@ CONFIG_ARCH_CORTEXM4=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -123,6 +126,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y CONFIG_ARCH_HAVE_FPU=y # CONFIG_ARCH_HAVE_DPFPU is not set # CONFIG_ARCH_FPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -133,6 +137,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set # CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set @@ -238,6 +243,7 @@ CONFIG_ARCH_CHIP_STM32F303RE=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -784,6 +790,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # @@ -812,36 +820,36 @@ CONFIG_HAVE_CXXINITIALIZE=y # # CAN Utilities # -CONFIG_CANUTILS_UAVCAN=y -CONFIG_UAVCAN_LIBUAVCAN_URL="https://github.com/UAVCAN/libuavcan/archive" -CONFIG_UAVCAN_LIBUAVCAN_VERSION="b04396ace50155573e545ed9bf2fb09964ee2367" -CONFIG_UAVCAN_DSDL_URL="https://github.com/UAVCAN/dsdl/archive" -CONFIG_UAVCAN_DSDL_VERSION="9804a3e6972825586be252ce08dd899f44994b14" -CONFIG_UAVCAN_PYUAVCAN_URL="https://github.com/UAVCAN/pyuavcan/archive" -CONFIG_UAVCAN_PYUAVCAN_VERSION="c58477a644d20ccf95a20c151f3a0402f271c3b8" -CONFIG_UAVCAN_STM32_NUM_IFACES=1 -CONFIG_UAVCAN_STM32_TIM2=y -# CONFIG_UAVCAN_STM32_TIM3 is not set -# CONFIG_UAVCAN_STM32_TIM4 is not set -# CONFIG_UAVCAN_STM32_TIM6 is not set -# CONFIG_UAVCAN_STM32_TIM7 is not set -CONFIG_UAVCAN_CPP03=y -# CONFIG_UAVCAN_CPP11 is not set -# CONFIG_UAVCAN_DEBUG is not set -# CONFIG_UAVCAN_EXCEPTIONS is not set -# CONFIG_UAVCAN_TINY is not set -# CONFIG_UAVCAN_NO_GLOBAL_DATA_TYPE_REGISTRY is not set -# CONFIG_UAVCAN_IMPLEMENT_PLACEMENT_NEW is not set -# CONFIG_UAVCAN_USE_EXTERNAL_SNPRINTF is not set -# CONFIG_UAVCAN_USE_EXTERNAL_FLOAT16_CONVERSION is not set -# CONFIG_UAVCAN_NO_ASSERTIONS is not set -CONFIG_UAVCAN_MEM_POOL_BLOCK_SIZE=0 -CONFIG_UAVCAN_FLOAT_COMPARISON_EPSILON_MULT=0 -CONFIG_UAVCAN_MAX_CAN_ACCEPTANCE_FILTERS=0 -CONFIG_UAVCAN_MAX_NETWORK_SIZE_HINT=0 -CONFIG_UAVCAN_RX_QUEUE_CAPACITY=0 -CONFIG_UAVCAN_BIT_RATE=0 -CONFIG_UAVCAN_INIT_RETRIES=0 +CONFIG_CANUTILS_LIBUAVCAN=y +CONFIG_LIBUAVCAN_URL="https://github.com/UAVCAN/libuavcan/archive" +CONFIG_LIBUAVCAN_VERSION="b04396ace50155573e545ed9bf2fb09964ee2367" +CONFIG_LIBUAVCAN_DSDL_URL="https://github.com/UAVCAN/dsdl/archive" +CONFIG_LIBUAVCAN_DSDL_VERSION="9804a3e6972825586be252ce08dd899f44994b14" +CONFIG_LIBUAVCAN_PYUAVCAN_URL="https://github.com/UAVCAN/pyuavcan/archive" +CONFIG_LIBUAVCAN_PYUAVCAN_VERSION="c58477a644d20ccf95a20c151f3a0402f271c3b8" +CONFIG_LIBUAVCAN_STM32_NUM_IFACES=1 +CONFIG_LIBUAVCAN_STM32_TIM2=y +# CONFIG_LIBUAVCAN_STM32_TIM3 is not set +# CONFIG_LIBUAVCAN_STM32_TIM4 is not set +# CONFIG_LIBUAVCAN_STM32_TIM6 is not set +# CONFIG_LIBUAVCAN_STM32_TIM7 is not set +CONFIG_LIBUAVCAN_CPP03=y +# CONFIG_LIBUAVCAN_CPP11 is not set +# CONFIG_LIBUAVCAN_DEBUG is not set +# CONFIG_LIBUAVCAN_EXCEPTIONS is not set +# CONFIG_LIBUAVCAN_TINY is not set +# CONFIG_LIBUAVCAN_NO_GLOBAL_DATA_TYPE_REGISTRY is not set +# CONFIG_LIBUAVCAN_IMPLEMENT_PLACEMENT_NEW is not set +# CONFIG_LIBUAVCAN_USE_EXTERNAL_SNPRINTF is not set +# CONFIG_LIBUAVCAN_USE_EXTERNAL_FLOAT16_CONVERSION is not set +# CONFIG_LIBUAVCAN_NO_ASSERTIONS is not set +CONFIG_LIBUAVCAN_MEM_POOL_BLOCK_SIZE=0 +CONFIG_LIBUAVCAN_FLOAT_COMPARISON_EPSILON_MULT=0 +CONFIG_LIBUAVCAN_MAX_CAN_ACCEPTANCE_FILTERS=0 +CONFIG_LIBUAVCAN_MAX_NETWORK_SIZE_HINT=0 +CONFIG_LIBUAVCAN_RX_QUEUE_CAPACITY=0 +CONFIG_LIBUAVCAN_BIT_RATE=0 +CONFIG_LIBUAVCAN_INIT_RETRIES=0 # # Examples @@ -899,7 +907,6 @@ CONFIG_EXAMPLES_UAVCAN_NODE_MEM_POOL_SIZE=4096 CONFIG_EXAMPLES_UAVCAN_NODE_ID=1 CONFIG_EXAMPLES_UAVCAN_NODE_NAME="org.nuttx.apps.examples.uavcan" # CONFIG_EXAMPLES_WEBSERVER is not set -# CONFIG_EXAMPLES_USBSERIAL is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set @@ -936,6 +943,7 @@ CONFIG_EXAMPLES_UAVCAN_NODE_NAME="org.nuttx.apps.examples.uavcan" # # CONFIG_NETUTILS_CHAT is not set # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/nucleo-f4x1re/README.txt b/configs/nucleo-f4x1re/README.txt index 066474d69e1..4a84121a400 100644 --- a/configs/nucleo-f4x1re/README.txt +++ b/configs/nucleo-f4x1re/README.txt @@ -395,7 +395,7 @@ Serial Consoles To configure USART1 as the console: CONFIG_STM32_USART1=y - CONFIG_USART1_ISUART=y + CONFIG_USART1_SERIALDRIVER=y CONFIG_USART1_SERIAL_CONSOLE=y CONFIG_USART1_RXBUFSIZE=256 CONFIG_USART1_TXBUFSIZE=256 @@ -434,7 +434,7 @@ Serial Consoles To configure USART2 as the console: CONFIG_STM32_USART2=y - CONFIG_USART2_ISUART=y + CONFIG_USART2_SERIALDRIVER=y CONFIG_USART2_SERIAL_CONSOLE=y CONFIG_USART2_RXBUFSIZE=256 CONFIG_USART2_TXBUFSIZE=256 @@ -455,7 +455,7 @@ Serial Consoles To configure USART6 as the console: CONFIG_STM32_USART6=y - CONFIG_USART6_ISUART=y + CONFIG_USART6_SERIALDRIVER=y CONFIG_USART6_SERIAL_CONSOLE=y CONFIG_USART6_RXBUFSIZE=256 CONFIG_USART6_TXBUFSIZE=256 diff --git a/configs/nucleo-f4x1re/f401-nsh/defconfig b/configs/nucleo-f4x1re/f401-nsh/defconfig index 6ac2b9ea553..bdacfd5723e 100644 --- a/configs/nucleo-f4x1re/f401-nsh/defconfig +++ b/configs/nucleo-f4x1re/f401-nsh/defconfig @@ -76,6 +76,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -94,6 +95,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -115,6 +117,7 @@ CONFIG_ARCH_CORTEXM4=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -123,6 +126,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y CONFIG_ARCH_HAVE_FPU=y # CONFIG_ARCH_HAVE_DPFPU is not set # CONFIG_ARCH_FPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -133,6 +137,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL=y @@ -239,6 +244,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F373VC is not set CONFIG_ARCH_CHIP_STM32F401RE=y # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -410,13 +416,17 @@ CONFIG_STM32_JTAG_SW_ENABLE=y # CONFIG_STM32_TIM10_CAP is not set # CONFIG_STM32_TIM11_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART2_SERIALDRIVER=y +# CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # CONFIG_STM32_HAVE_RTC_COUNTER is not set # CONFIG_STM32_HAVE_RTC_SUBSECONDS is not set @@ -682,33 +692,28 @@ CONFIG_SPI_EXCHANGE=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -CONFIG_ARCH_HAVE_USART2=y -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART2_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +CONFIG_USART2_SERIALDRIVER=y +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -852,6 +857,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # @@ -939,7 +946,6 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # CONFIG_EXAMPLES_TIFF is not set # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_WEBSERVER is not set -# CONFIG_EXAMPLES_USBSERIAL is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set @@ -975,6 +981,7 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/nucleo-f4x1re/f411-nsh/defconfig b/configs/nucleo-f4x1re/f411-nsh/defconfig index df0a12a77ee..1192acfa94b 100644 --- a/configs/nucleo-f4x1re/f411-nsh/defconfig +++ b/configs/nucleo-f4x1re/f411-nsh/defconfig @@ -76,6 +76,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -94,6 +95,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -115,6 +117,7 @@ CONFIG_ARCH_CORTEXM4=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -123,6 +126,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y CONFIG_ARCH_HAVE_FPU=y # CONFIG_ARCH_HAVE_DPFPU is not set # CONFIG_ARCH_FPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -133,6 +137,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL=y @@ -239,6 +244,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set CONFIG_ARCH_CHIP_STM32F411RE=y +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -412,13 +418,17 @@ CONFIG_STM32_JTAG_SW_ENABLE=y # CONFIG_STM32_TIM10_CAP is not set # CONFIG_STM32_TIM11_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART2_SERIALDRIVER=y +# CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # CONFIG_STM32_HAVE_RTC_COUNTER is not set # CONFIG_STM32_HAVE_RTC_SUBSECONDS is not set @@ -684,33 +694,28 @@ CONFIG_SPI_EXCHANGE=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -CONFIG_ARCH_HAVE_USART2=y -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART2_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +CONFIG_USART2_SERIALDRIVER=y +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -854,6 +859,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # @@ -941,7 +948,6 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # CONFIG_EXAMPLES_TIFF is not set # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_WEBSERVER is not set -# CONFIG_EXAMPLES_USBSERIAL is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set @@ -977,6 +983,7 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/nucleo-f4x1re/src/stm32_ajoystick.c b/configs/nucleo-f4x1re/src/stm32_ajoystick.c index 9d79e99cc7f..61eaccf244f 100644 --- a/configs/nucleo-f4x1re/src/stm32_ajoystick.c +++ b/configs/nucleo-f4x1re/src/stm32_ajoystick.c @@ -46,6 +46,7 @@ #include #include +#include #include #include "stm32_gpio.h" @@ -108,10 +109,6 @@ AJOY_BUTTON_7_BIT ) #endif -/**************************************************************************** - * Private Types - ****************************************************************************/ - /**************************************************************************** * Private Function Prototypes ****************************************************************************/ @@ -158,9 +155,9 @@ static const struct ajoy_lowerhalf_s g_ajoylower = }; #ifndef NO_JOYSTICK_ADC -/* Descriptor for the open ADC driver */ +/* Thread-independent file structure for the open ADC driver */ -static int g_adcfd = -1; +static struct file g_adcfile; #endif /* Current interrupt handler and argument */ @@ -209,7 +206,7 @@ static int ajoy_sample(FAR const struct ajoy_lowerhalf_s *lower, * channels are enabled). */ - nread = read(g_adcfd, adcmsg, MAX_ADC_CHANNELS * sizeof(struct adc_msg_s)); + nread = file_read(&g_adcfile, adcmsg, MAX_ADC_CHANNELS * sizeof(struct adc_msg_s)); if (nread < 0) { int errcode = get_errno(); @@ -454,6 +451,8 @@ int board_ajoy_initialize(void) int i; #ifndef NO_JOYSTICK_ADC + int fd; + ivdbg("Initialize ADC driver: /dev/adc0\n"); /* Initialize ADC. We will need this to read the ADC inputs */ @@ -465,15 +464,27 @@ int board_ajoy_initialize(void) return ret; } - /* Open the ADC driver for reading */ + /* Open the ADC driver for reading. */ - g_adcfd = open("/dev/adc0", O_RDONLY); - if (g_adcfd < 0) + fd = open("/dev/adc0", O_RDONLY); + if (fd < 0) { int errcode = get_errno(); idbg("ERROR: Failed to open /dev/adc0: %d\n", errcode); return -errcode; } + + /* Detach the file structure from the file descriptor so that it can be + * used on any thread. + */ + + ret = file_detach(fd, &g_adcfile); + if (ret < 0) + { + idbg("ERROR: Failed to detach from file descriptor: %d\n", ret); + (void)close(fd); + return ret; + } #endif /* Configure the GPIO pins as interrupting inputs. NOTE: This is @@ -497,8 +508,7 @@ int board_ajoy_initialize(void) { idbg("ERROR: ajoy_register failed: %d\n", ret); #ifndef NO_JOYSTICK_ADC - close(g_adcfd); - g_adcfd = -1; + file_close_detached(&g_adcfile); #endif } diff --git a/configs/nucleo-f4x1re/src/stm32_appinit.c b/configs/nucleo-f4x1re/src/stm32_appinit.c index 7f0d889d475..97cbc4ffc48 100644 --- a/configs/nucleo-f4x1re/src/stm32_appinit.c +++ b/configs/nucleo-f4x1re/src/stm32_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/nucleo-f4x1re/src/stm32_appinit.c * - * Copyright (C) 2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2014, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -89,11 +89,28 @@ void up_netinitialize(void) * Name: board_app_initialize * * Description: - * Perform architecture specific initialization + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface using the command BOARDIOC_INIT. + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #if defined(HAVE_MMCSD) || defined(CONFIG_AJOYSTICK) int ret; diff --git a/configs/nucleo-f4x1re/src/stm32_boot.c b/configs/nucleo-f4x1re/src/stm32_boot.c index 580b2d08c46..2b6f69e65ec 100644 --- a/configs/nucleo-f4x1re/src/stm32_boot.c +++ b/configs/nucleo-f4x1re/src/stm32_boot.c @@ -121,7 +121,7 @@ void board_initialize(void) */ #if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_LIB_BOARDCTL) - board_app_initialize(); + board_app_initialize(0); #endif /* CC3000 wireless initialization */ diff --git a/configs/nucleo-l476rg/README.txt b/configs/nucleo-l476rg/README.txt index ab8ff50b27a..d576d83d880 100644 --- a/configs/nucleo-l476rg/README.txt +++ b/configs/nucleo-l476rg/README.txt @@ -377,7 +377,7 @@ Serial Consoles To configure USART1 as the console: CONFIG_STM32_USART1=y - CONFIG_USART1_ISUART=y + CONFIG_USART1_SERIALDRIVER=y CONFIG_USART1_SERIAL_CONSOLE=y CONFIG_USART1_RXBUFSIZE=256 CONFIG_USART1_TXBUFSIZE=256 @@ -416,7 +416,7 @@ Serial Consoles To configure USART2 as the console: CONFIG_STM32_USART2=y - CONFIG_USART2_ISUART=y + CONFIG_USART2_SERIALDRIVER=y CONFIG_USART2_SERIAL_CONSOLE=y CONFIG_USART2_RXBUFSIZE=256 CONFIG_USART2_TXBUFSIZE=256 @@ -437,7 +437,7 @@ Serial Consoles To configure USART6 as the console: CONFIG_STM32_USART6=y - CONFIG_USART6_ISUART=y + CONFIG_USART6_SERIALDRIVER=y CONFIG_USART6_SERIAL_CONSOLE=y CONFIG_USART6_RXBUFSIZE=256 CONFIG_USART6_TXBUFSIZE=256 diff --git a/configs/nucleo-l476rg/include/board.h b/configs/nucleo-l476rg/include/board.h index cc132e838b0..32462f24775 100644 --- a/configs/nucleo-l476rg/include/board.h +++ b/configs/nucleo-l476rg/include/board.h @@ -1,7 +1,7 @@ /************************************************************************************ * configs/nucleo-l476rg/include/board.h * - * Copyright (C) 2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -64,7 +64,7 @@ /* Values defined in arch/arm/src/stm32l4/chip/stm32l4x6xx_dma.h */ -#define DMACHAN_SDMMC DMACHAN_SDMMC_1 /* 2 choices */ +#define DMACHAN_SDMMC DMACHAN_SDMMC_1 /* 2 choices */ #define DMACHAN_SPI1_RX DMACHAN_SPI1_RX_1 /* 2 choices */ #define DMACHAN_SPI1_TX DMACHAN_SPI1_TX_1 /* 2 choices */ @@ -109,22 +109,29 @@ * but are normally-high GPIOs. */ -#define GPIO_I2C1_SCL GPIO_I2C1_SCL_2 -#define GPIO_I2C1_SDA GPIO_I2C1_SDA_2 +#define GPIO_I2C1_SCL \ + (GPIO_I2C1_SCL_2 | GPIO_OPENDRAIN | GPIO_SPEED_50MHz | GPIO_OUTPUT_SET) +#define GPIO_I2C1_SDA \ + (GPIO_I2C1_SDA_2 | GPIO_OPENDRAIN | GPIO_SPEED_50MHz | GPIO_OUTPUT_SET) #define GPIO_I2C1_SCL_GPIO \ - (GPIO_OUTPUT|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN8) + (GPIO_OUTPUT | GPIO_OPENDRAIN | GPIO_SPEED_50MHz | GPIO_OUTPUT_SET | \ + GPIO_PORTB | GPIO_PIN8) #define GPIO_I2C1_SDA_GPIO \ - (GPIO_OUTPUT|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN9) + (GPIO_OUTPUT | GPIO_OPENDRAIN | GPIO_SPEED_50MHz | GPIO_OUTPUT_SET | \ + GPIO_PORTB | GPIO_PIN9) -#define GPIO_I2C2_SCL GPIO_I2C2_SCL_1 -#define GPIO_I2C2_SDA GPIO_I2C2_SDA_1 +#define GPIO_I2C2_SCL \ + (GPIO_I2C2_SCL_1 | GPIO_OPENDRAIN | GPIO_SPEED_50MHz | GPIO_OUTPUT_SET) +#define GPIO_I2C2_SDA \ + (GPIO_I2C2_SDA_1 | GPIO_OPENDRAIN | GPIO_SPEED_50MHz | GPIO_OUTPUT_SET) #define GPIO_I2C2_SCL_GPIO \ - (GPIO_OUTPUT|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN10) + (GPIO_OUTPUT | GPIO_OPENDRAIN | GPIO_SPEED_50MHz | GPIO_OUTPUT_SET | \ + GPIO_PORTB | GPIO_PIN10) #define GPIO_I2C2_SDA_GPIO \ - (GPIO_OUTPUT|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN11) + (GPIO_OUTPUT | GPIO_OPENDRAIN | GPIO_SPEED_50MHz | GPIO_OUTPUT_SET | \ + GPIO_PORTB | GPIO_PIN11) -/* SPI - */ +/* SPI */ #define GPIO_SPI1_MISO GPIO_SPI1_MISO_1 #define GPIO_SPI1_MOSI GPIO_SPI1_MOSI_1 diff --git a/configs/nucleo-l476rg/nsh/defconfig b/configs/nucleo-l476rg/nsh/defconfig index a4c68715642..4f2c7c8da4e 100644 --- a/configs/nucleo-l476rg/nsh/defconfig +++ b/configs/nucleo-l476rg/nsh/defconfig @@ -559,33 +559,32 @@ CONFIG_RTC_IOCTL=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -CONFIG_ARCH_HAVE_USART2=y -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +CONFIG_USART2_SERIALDRIVER=y +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration # -CONFIG_USART2_ISUART=y CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set diff --git a/configs/nucleo-l476rg/src/nucleo-l476rg.h b/configs/nucleo-l476rg/src/nucleo-l476rg.h index 7f1ef0feef7..d35d247349a 100644 --- a/configs/nucleo-l476rg/src/nucleo-l476rg.h +++ b/configs/nucleo-l476rg/src/nucleo-l476rg.h @@ -52,9 +52,19 @@ ************************************************************************************/ /* Configuration ********************************************************************/ +#define HAVE_PROC 1 #define HAVE_RTC_DRIVER 1 #define HAVE_MMCSD 1 +#if !defined(CONFIG_FS_PROCFS) +# undef HAVE_PROC +#endif + +#if defined(HAVE_PROC) && defined(CONFIG_DISABLE_MOUNTPOINT) +# warning Mountpoints disabled. No procfs support +# undef HAVE_PROC +#endif + /* Check if we can support the RTC driver */ #if !defined(CONFIG_RTC) || !defined(CONFIG_RTC_DRIVER) diff --git a/configs/nucleo-l476rg/src/stm32_ajoystick.c b/configs/nucleo-l476rg/src/stm32_ajoystick.c index 53d58a77d9b..bd57040a78f 100644 --- a/configs/nucleo-l476rg/src/stm32_ajoystick.c +++ b/configs/nucleo-l476rg/src/stm32_ajoystick.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/nucleo-f3x1re/src/stm32_ajoystick.c * - * Copyright (C) 2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2014, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -45,6 +45,7 @@ #include #include +#include #include #include "stm32l4_gpio.h" @@ -107,10 +108,6 @@ AJOY_BUTTON_7_BIT ) #endif -/**************************************************************************** - * Private Types - ****************************************************************************/ - /**************************************************************************** * Private Function Prototypes ****************************************************************************/ @@ -157,9 +154,9 @@ static const struct ajoy_lowerhalf_s g_ajoylower = }; #ifndef NO_JOYSTICK_ADC -/* Descriptor for the open ADC driver */ +/* Thread-independent file structure for the open ADC driver */ -static int g_adcfd = -1; +static struct file g_adcfile; #endif /* Current interrupt handler and argument */ @@ -208,7 +205,7 @@ static int ajoy_sample(FAR const struct ajoy_lowerhalf_s *lower, * channels are enabled). */ - nread = read(g_adcfd, adcmsg, MAX_ADC_CHANNELS * sizeof(struct adc_msg_s)); + nread = file_read(&g_adcfile, adcmsg, MAX_ADC_CHANNELS * sizeof(struct adc_msg_s)); if (nread < 0) { int errcode = get_errno(); @@ -453,6 +450,8 @@ int board_ajoy_initialize(void) int i; #ifndef NO_JOYSTICK_ADC + int fd; + ivdbg("Initialize ADC driver: /dev/adc0\n"); /* Initialize ADC. We will need this to read the ADC inputs */ @@ -464,15 +463,27 @@ int board_ajoy_initialize(void) return ret; } - /* Open the ADC driver for reading */ + /* Open the ADC driver for reading. */ - g_adcfd = open("/dev/adc0", O_RDONLY); - if (g_adcfd < 0) + fd = open("/dev/adc0", O_RDONLY); + if (fd < 0) { int errcode = get_errno(); idbg("ERROR: Failed to open /dev/adc0: %d\n", errcode); return -errcode; } + + /* Detach the file structure from the file descriptor so that it can be + * used on any thread. + */ + + ret = file_detach(fd, &g_adcfile); + if (ret < 0) + { + idbg("ERROR: Failed to detach from file descriptor: %d\n", ret); + (void)close(fd); + return ret; + } #endif /* Configure the GPIO pins as interrupting inputs. NOTE: This is @@ -496,8 +507,7 @@ int board_ajoy_initialize(void) { idbg("ERROR: ajoy_register failed: %d\n", ret); #ifndef NO_JOYSTICK_ADC - close(g_adcfd); - g_adcfd = -1; + file_close_detached(&g_adcfile); #endif } diff --git a/configs/nucleo-l476rg/src/stm32_appinit.c b/configs/nucleo-l476rg/src/stm32_appinit.c index 5a8b78513ab..96190c07c54 100644 --- a/configs/nucleo-l476rg/src/stm32_appinit.c +++ b/configs/nucleo-l476rg/src/stm32_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/nucleo-l476rg/src/stm32_appinit.c * - * Copyright (C) 2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -39,7 +39,11 @@ #include +#include +#include #include +#include +#include #include #include @@ -82,11 +86,28 @@ void up_netinitialize(void) * Name: board_app_initialize * * Description: - * Perform architecture specific initialization + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface using the command BOARDIOC_INIT. + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #ifdef HAVE_RTC_DRIVER FAR struct rtc_lowerhalf_s *rtclower; @@ -101,6 +122,21 @@ int board_app_initialize(void) cpuload_initialize_once(); #endif +#ifdef HAVE_PROC + /* Mount the proc filesystem */ + + syslog(LOG_INFO, "Mounting procfs to /proc\n"); + + ret = mount(NULL, CONFIG_NSH_PROC_MOUNTPOINT, "procfs", 0, NULL); + if (ret < 0) + { + syslog(LOG_ERR, + "ERROR: Failed to mount the PROC filesystem: %d (%d)\n", + ret, errno); + return ret; + } +#endif + #ifdef HAVE_RTC_DRIVER /* Instantiate the STM32L4 lower-half RTC driver */ diff --git a/configs/nucleo-l476rg/src/stm32_boot.c b/configs/nucleo-l476rg/src/stm32_boot.c index 52d1a28f08f..0389d18cf11 100644 --- a/configs/nucleo-l476rg/src/stm32_boot.c +++ b/configs/nucleo-l476rg/src/stm32_boot.c @@ -121,7 +121,7 @@ void board_initialize(void) */ #if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_NSH_ARCHINIT) - board_app_initialize(); + board_app_initialize(0); #endif /* CC3000 wireless initialization */ diff --git a/configs/nutiny-nuc120/nsh/defconfig b/configs/nutiny-nuc120/nsh/defconfig index 9858f39fee4..9c73cbc043c 100644 --- a/configs/nutiny-nuc120/nsh/defconfig +++ b/configs/nutiny-nuc120/nsh/defconfig @@ -316,7 +316,7 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -CONFIG_ARCH_HAVE_UART1=y +CONFIG_UART1_SERIALDRIVER=y CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y CONFIG_UART1_SERIAL_CONSOLE=y diff --git a/configs/olimex-efm32g880f128-stk/nsh/defconfig b/configs/olimex-efm32g880f128-stk/nsh/defconfig index 8783912c3e0..99b47aac95b 100644 --- a/configs/olimex-efm32g880f128-stk/nsh/defconfig +++ b/configs/olimex-efm32g880f128-stk/nsh/defconfig @@ -374,28 +374,28 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -CONFIG_ARCH_HAVE_OTHER_UART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +CONFIG_OTHER_UART_SERIALDRIVER=y # # USART Configuration diff --git a/configs/olimex-lpc-h3131/nsh/defconfig b/configs/olimex-lpc-h3131/nsh/defconfig index 2e88b0d0884..f3463176647 100644 --- a/configs/olimex-lpc-h3131/nsh/defconfig +++ b/configs/olimex-lpc-h3131/nsh/defconfig @@ -382,28 +382,28 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -CONFIG_ARCH_HAVE_UART=y -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +CONFIG_UART_SERIALDRIVER=y +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/olimex-lpc-h3131/src/lpc31_appinit.c b/configs/olimex-lpc-h3131/src/lpc31_appinit.c index d24c412ffd6..551a2d9bb6c 100644 --- a/configs/olimex-lpc-h3131/src/lpc31_appinit.c +++ b/configs/olimex-lpc-h3131/src/lpc31_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/olimex-lpc-h3131/src/lpc31_appinit.c * - * Copyright (C) 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2013, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -79,11 +79,28 @@ * Name: board_app_initialize * * Description: - * Perform architecture specific initialization + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface using the command BOARDIOC_INIT. + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #if defined(HAVE_MMCSD) || defined(HAVE_USBHOST) int ret; diff --git a/configs/olimex-lpc1766stk/ftpc/defconfig b/configs/olimex-lpc1766stk/ftpc/defconfig index bcad3a75a0f..6239b8e2700 100644 --- a/configs/olimex-lpc1766stk/ftpc/defconfig +++ b/configs/olimex-lpc1766stk/ftpc/defconfig @@ -492,28 +492,28 @@ CONFIG_ETH0_PHY_KS8721=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/olimex-lpc1766stk/hidkbd/defconfig b/configs/olimex-lpc1766stk/hidkbd/defconfig index 57ff6174b35..995016cfd6e 100644 --- a/configs/olimex-lpc1766stk/hidkbd/defconfig +++ b/configs/olimex-lpc1766stk/hidkbd/defconfig @@ -459,28 +459,28 @@ CONFIG_MMCSD_NSLOTS=1 CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/olimex-lpc1766stk/hidmouse/defconfig b/configs/olimex-lpc1766stk/hidmouse/defconfig index 9128e7a1bae..152d049b7d0 100644 --- a/configs/olimex-lpc1766stk/hidmouse/defconfig +++ b/configs/olimex-lpc1766stk/hidmouse/defconfig @@ -478,28 +478,28 @@ CONFIG_NETDEV_TELNET=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/olimex-lpc1766stk/nettest/defconfig b/configs/olimex-lpc1766stk/nettest/defconfig index 9913ba909f7..d9b56621523 100644 --- a/configs/olimex-lpc1766stk/nettest/defconfig +++ b/configs/olimex-lpc1766stk/nettest/defconfig @@ -469,28 +469,28 @@ CONFIG_ETH0_PHY_KS8721=y CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/olimex-lpc1766stk/nsh/defconfig b/configs/olimex-lpc1766stk/nsh/defconfig index 402f5851469..5f83abd29a1 100644 --- a/configs/olimex-lpc1766stk/nsh/defconfig +++ b/configs/olimex-lpc1766stk/nsh/defconfig @@ -534,28 +534,28 @@ CONFIG_ETH0_PHY_KS8721=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/olimex-lpc1766stk/nx/defconfig b/configs/olimex-lpc1766stk/nx/defconfig index cefbb19eb23..34b2d4c3f07 100644 --- a/configs/olimex-lpc1766stk/nx/defconfig +++ b/configs/olimex-lpc1766stk/nx/defconfig @@ -481,28 +481,28 @@ CONFIG_LCD_LANDSCAPE=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/olimex-lpc1766stk/slip-httpd/defconfig b/configs/olimex-lpc1766stk/slip-httpd/defconfig index 9b7dacd49d6..bf9a212683f 100644 --- a/configs/olimex-lpc1766stk/slip-httpd/defconfig +++ b/configs/olimex-lpc1766stk/slip-httpd/defconfig @@ -414,28 +414,28 @@ CONFIG_NET_SLIP=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -CONFIG_ARCH_HAVE_UART1=y -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +CONFIG_UART1_SERIALDRIVER=y +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/olimex-lpc1766stk/src/lpc17_appinit.c b/configs/olimex-lpc1766stk/src/lpc17_appinit.c index 89fd701173c..a8176afa25e 100644 --- a/configs/olimex-lpc1766stk/src/lpc17_appinit.c +++ b/configs/olimex-lpc1766stk/src/lpc17_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/olimex-lpc1766stk/src/lpc17_appinit.c * - * Copyright (C) 2010, 2013-2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2010, 2013-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -320,11 +320,28 @@ static int nsh_usbhostinitialize(void) * Name: board_app_initialize * * Description: - * Perform architecture specific initialization + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface using the command BOARDIOC_INIT. + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { int ret; diff --git a/configs/olimex-lpc1766stk/thttpd-binfs/defconfig b/configs/olimex-lpc1766stk/thttpd-binfs/defconfig index af5952f5440..da3dca2d7e3 100644 --- a/configs/olimex-lpc1766stk/thttpd-binfs/defconfig +++ b/configs/olimex-lpc1766stk/thttpd-binfs/defconfig @@ -466,28 +466,28 @@ CONFIG_ETH0_PHY_KS8721=y CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/olimex-lpc1766stk/thttpd-nxflat/defconfig b/configs/olimex-lpc1766stk/thttpd-nxflat/defconfig index e6bb9d820b3..ae4b8bfd3e2 100644 --- a/configs/olimex-lpc1766stk/thttpd-nxflat/defconfig +++ b/configs/olimex-lpc1766stk/thttpd-nxflat/defconfig @@ -458,28 +458,28 @@ CONFIG_ETH0_PHY_KS8721=y CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/olimex-lpc1766stk/usbmsc/defconfig b/configs/olimex-lpc1766stk/usbmsc/defconfig index c534bd45561..f499036204d 100644 --- a/configs/olimex-lpc1766stk/usbmsc/defconfig +++ b/configs/olimex-lpc1766stk/usbmsc/defconfig @@ -449,28 +449,28 @@ CONFIG_MMCSD_SPIMODE=0 CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/olimex-lpc1766stk/usbserial/defconfig b/configs/olimex-lpc1766stk/usbserial/defconfig index 90b9bfad375..28806b7c2b2 100644 --- a/configs/olimex-lpc1766stk/usbserial/defconfig +++ b/configs/olimex-lpc1766stk/usbserial/defconfig @@ -473,28 +473,28 @@ CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set CONFIG_SERIAL_REMOVABLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/olimex-lpc1766stk/zmodem/defconfig b/configs/olimex-lpc1766stk/zmodem/defconfig index 9a1e0933a8f..f0880d4d32b 100644 --- a/configs/olimex-lpc1766stk/zmodem/defconfig +++ b/configs/olimex-lpc1766stk/zmodem/defconfig @@ -512,28 +512,28 @@ CONFIG_ETH0_PHY_KS8721=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -CONFIG_ARCH_HAVE_UART1=y -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +CONFIG_UART1_SERIALDRIVER=y +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/olimex-lpc2378/nsh/defconfig b/configs/olimex-lpc2378/nsh/defconfig index 63e4b7cb562..207ae574d59 100644 --- a/configs/olimex-lpc2378/nsh/defconfig +++ b/configs/olimex-lpc2378/nsh/defconfig @@ -379,28 +379,28 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -CONFIG_ARCH_HAVE_UART2=y -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +CONFIG_UART2_SERIALDRIVER=y +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/olimex-lpc2378/src/lpc2378_appinit.c b/configs/olimex-lpc2378/src/lpc2378_appinit.c index 6f7e8b194f6..ed9ee4910ab 100644 --- a/configs/olimex-lpc2378/src/lpc2378_appinit.c +++ b/configs/olimex-lpc2378/src/lpc2378_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/olimex-lpc2378/src/lpc2378_appinit.c * - * Copyright (C) 2010 Rommel Marcelo. All rights reserved. + * Copyright (C) 2010, 2016 Rommel Marcelo. All rights reserved. * Author: Rommel Marcelo * * This is part of the NuttX RTOS and based on the LPC2148 port: @@ -88,11 +88,28 @@ * Name: board_app_initialize * * Description: - * Perform architecture specific initialization + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface using the command BOARDIOC_INIT. + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { return OK; } diff --git a/configs/olimex-stm32-h405/src/stm32_appinit.c b/configs/olimex-stm32-h405/src/stm32_appinit.c index 623d9e34289..776b5ffa5c3 100644 --- a/configs/olimex-stm32-h405/src/stm32_appinit.c +++ b/configs/olimex-stm32-h405/src/stm32_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/olimex-stm32-h405/src/stm32_appinit.c * - * Copyright (C) 2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2014, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -73,7 +73,9 @@ * Name: board_app_initialize * * Description: - * Perform architecture specific initialization + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface using the command BOARDIOC_INIT. * * CONFIG_LIB_BOARDCTL=y : * Called from the NSH library @@ -82,9 +84,24 @@ * CONFIG_LIB_BOARDCTL=n : * Called from board_initialize(). * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #if defined(CONFIG_CAN) || defined(CONFIG_ADC) int ret; diff --git a/configs/olimex-stm32-h405/src/stm32_boot.c b/configs/olimex-stm32-h405/src/stm32_boot.c index f057314fb49..7332b8a4ef1 100644 --- a/configs/olimex-stm32-h405/src/stm32_boot.c +++ b/configs/olimex-stm32-h405/src/stm32_boot.c @@ -118,7 +118,7 @@ void board_initialize(void) */ #if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_LIB_BOARDCTL) - board_app_initialize(); + board_app_initialize(0); #endif } #endif diff --git a/configs/olimex-stm32-h405/usbnsh/defconfig b/configs/olimex-stm32-h405/usbnsh/defconfig index 4b3b04b27bd..5ba6d946fc5 100644 --- a/configs/olimex-stm32-h405/usbnsh/defconfig +++ b/configs/olimex-stm32-h405/usbnsh/defconfig @@ -76,6 +76,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -94,6 +95,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -115,6 +117,7 @@ CONFIG_ARCH_CORTEXM4=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -123,6 +126,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y CONFIG_ARCH_HAVE_FPU=y # CONFIG_ARCH_HAVE_DPFPU is not set # CONFIG_ARCH_FPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -133,6 +137,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT=y # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set # CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set @@ -245,6 +250,7 @@ CONFIG_CAN_TSEG2=8 # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set CONFIG_ARCH_CHIP_STM32F405RG=y # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -450,13 +456,17 @@ CONFIG_STM32_ADC1_TIMTRIG=0 # ADC Configuration # CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART3_SERIALDRIVER=y +# CONFIG_STM32_USART3_1WIREDRIVER is not set # CONFIG_USART3_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # CONFIG_STM32_HAVE_RTC_COUNTER is not set # CONFIG_STM32_HAVE_RTC_SUBSECONDS is not set @@ -746,33 +756,28 @@ CONFIG_ADC_FIFOSIZE=8 CONFIG_SERIAL=y CONFIG_SERIAL_REMOVABLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -CONFIG_ARCH_HAVE_USART3=y -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART3_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +CONFIG_USART3_SERIALDRIVER=y +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -826,8 +831,8 @@ CONFIG_CDCACM_EPBULKOUT_HSSIZE=512 CONFIG_CDCACM_EPBULKIN=2 CONFIG_CDCACM_EPBULKIN_FSSIZE=64 CONFIG_CDCACM_EPBULKIN_HSSIZE=512 -CONFIG_CDCACM_NWRREQS=4 CONFIG_CDCACM_NRDREQS=4 +CONFIG_CDCACM_NWRREQS=4 CONFIG_CDCACM_BULKIN_REQLEN=96 CONFIG_CDCACM_RXBUFSIZE=256 CONFIG_CDCACM_TXBUFSIZE=256 @@ -955,6 +960,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # @@ -1100,6 +1107,7 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/olimex-stm32-h407/nsh/defconfig b/configs/olimex-stm32-h407/nsh/defconfig index edcd8070ec2..808193295bd 100644 --- a/configs/olimex-stm32-h407/nsh/defconfig +++ b/configs/olimex-stm32-h407/nsh/defconfig @@ -76,6 +76,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -94,6 +95,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -115,6 +117,7 @@ CONFIG_ARCH_CORTEXM4=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -123,6 +126,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y CONFIG_ARCH_HAVE_FPU=y # CONFIG_ARCH_HAVE_DPFPU is not set # CONFIG_ARCH_FPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -133,6 +137,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set # CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set @@ -239,6 +244,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -434,13 +440,17 @@ CONFIG_STM32_JTAG_SW_ENABLE=y # CONFIG_STM32_TIM13_CAP is not set # CONFIG_STM32_TIM14_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART2_SERIALDRIVER=y +# CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # CONFIG_STM32_HAVE_RTC_COUNTER is not set # CONFIG_STM32_HAVE_RTC_SUBSECONDS is not set @@ -706,33 +716,28 @@ CONFIG_SPI=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -CONFIG_ARCH_HAVE_USART2=y -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART2_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +CONFIG_USART2_SERIALDRIVER=y +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -884,6 +889,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # CONFIG_NETDB_HOSTFILE is not set @@ -972,7 +979,6 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # CONFIG_EXAMPLES_TIFF is not set # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_WEBSERVER is not set -# CONFIG_EXAMPLES_USBSERIAL is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set @@ -1010,6 +1016,7 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/olimex-stm32-h407/src/stm32_appinit.c b/configs/olimex-stm32-h407/src/stm32_appinit.c index e67ab3138bb..6f0cd2dd64a 100644 --- a/configs/olimex-stm32-h407/src/stm32_appinit.c +++ b/configs/olimex-stm32-h407/src/stm32_appinit.c @@ -71,16 +71,33 @@ * Name: board_app_initialize * * Description: - * Perform architecture specific initialization + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface using the command BOARDIOC_INIT. * * CONFIG_LIB_BOARDCTL=y: * If CONFIG_NSH_ARCHINITIALIZE=y: * Called from the NSH library (or other application) * Otherse, assumed to be called from some other application. * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { return stm32_bringup(); } diff --git a/configs/olimex-stm32-p107/nsh/defconfig b/configs/olimex-stm32-p107/nsh/defconfig index b867a39067d..6f02ee2d93d 100644 --- a/configs/olimex-stm32-p107/nsh/defconfig +++ b/configs/olimex-stm32-p107/nsh/defconfig @@ -76,6 +76,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -94,6 +95,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -115,6 +117,7 @@ CONFIG_ARCH_CORTEXM3=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -122,6 +125,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y # CONFIG_ARMV7M_LAZYFPU is not set # CONFIG_ARCH_HAVE_FPU is not set # CONFIG_ARCH_HAVE_DPFPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -132,6 +136,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL=y @@ -240,6 +245,7 @@ CONFIG_ARCH_CHIP_STM32F107VC=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -409,13 +415,17 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_STM32_TIM5_CAP is not set # CONFIG_STM32_TIM8_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART2_SERIALDRIVER=y +# CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set CONFIG_STM32_HAVE_RTC_COUNTER=y # CONFIG_STM32_HAVE_RTC_SUBSECONDS is not set @@ -718,10 +728,12 @@ CONFIG_MTD=y # CONFIG_MTD_AT45DB is not set # CONFIG_MTD_M25P is not set # CONFIG_MTD_S25FL1 is not set +# CONFIG_MTD_N25QXXX is not set # CONFIG_MTD_SMART is not set # CONFIG_MTD_RAMTRON is not set # CONFIG_MTD_SST25 is not set # CONFIG_MTD_SST25XX is not set +# CONFIG_MTD_SST26 is not set # CONFIG_MTD_SST39FV is not set # CONFIG_MTD_W25 is not set # CONFIG_EEPROM is not set @@ -773,33 +785,28 @@ CONFIG_ETH0_PHY_KS8721=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -CONFIG_ARCH_HAVE_USART2=y -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART2_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +CONFIG_USART2_SERIALDRIVER=y +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y CONFIG_SERIAL_NPOLLWAITERS=2 @@ -1053,6 +1060,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set CONFIG_LIBC_NETDB=y CONFIG_NETDB_DNSCLIENT=y CONFIG_NETDB_DNSCLIENT_ENTRIES=8 @@ -1141,7 +1150,6 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_UDPBLASTER is not set # CONFIG_EXAMPLES_DISCOVER is not set # CONFIG_EXAMPLES_WEBSERVER is not set -# CONFIG_EXAMPLES_USBSERIAL is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set # CONFIG_EXAMPLES_XMLRPC is not set @@ -1180,6 +1188,7 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_NETUTILS_CHAT is not set # CONFIG_NETUTILS_CODECS is not set # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_FTPD is not set # CONFIG_NETUTILS_JSON is not set diff --git a/configs/olimex-stm32-p207/nsh/defconfig b/configs/olimex-stm32-p207/nsh/defconfig index 8e72e8d52a5..cd9c9a3aebc 100644 --- a/configs/olimex-stm32-p207/nsh/defconfig +++ b/configs/olimex-stm32-p207/nsh/defconfig @@ -76,6 +76,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -94,6 +95,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -115,6 +117,7 @@ CONFIG_ARCH_CORTEXM3=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -122,6 +125,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y # CONFIG_ARMV7M_LAZYFPU is not set # CONFIG_ARCH_HAVE_FPU is not set # CONFIG_ARCH_HAVE_DPFPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -132,6 +136,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT=y # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set # CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set @@ -247,6 +252,7 @@ CONFIG_ARCH_CHIP_STM32F207ZE=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -451,13 +457,17 @@ CONFIG_STM32_ADC1_TIMTRIG=0 # ADC Configuration # CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART3_SERIALDRIVER=y +# CONFIG_STM32_USART3_1WIREDRIVER is not set # CONFIG_USART3_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # CONFIG_STM32_HAVE_RTC_COUNTER is not set # CONFIG_STM32_HAVE_RTC_SUBSECONDS is not set @@ -813,33 +823,28 @@ CONFIG_ETH0_PHY_KS8721=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -CONFIG_ARCH_HAVE_USART3=y -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART3_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +CONFIG_USART3_SERIALDRIVER=y +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -1102,6 +1107,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set CONFIG_LIBC_NETDB=y CONFIG_NETDB_DNSCLIENT=y CONFIG_NETDB_DNSCLIENT_ENTRIES=8 @@ -1164,6 +1171,7 @@ CONFIG_EXAMPLES_BUTTONS_NAME4="Button 4" CONFIG_EXAMPLES_BUTTONS_NAME5="Button 5" CONFIG_EXAMPLES_BUTTONS_NAME6="Button 6" CONFIG_EXAMPLES_BUTTONS_NAME7="Button 7" +# CONFIG_EXAMPLES_CAN is not set # CONFIG_EXAMPLES_CHAT is not set # CONFIG_EXAMPLES_CONFIGDATA is not set # CONFIG_EXAMPLES_CPUHOG is not set @@ -1254,6 +1262,7 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # # CONFIG_NETUTILS_CODECS is not set # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/olimex-stm32-p207/src/stm32_appinit.c b/configs/olimex-stm32-p207/src/stm32_appinit.c index 01f6362c344..695cc0607b4 100644 --- a/configs/olimex-stm32-p207/src/stm32_appinit.c +++ b/configs/olimex-stm32-p207/src/stm32_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/olimex-stm32-p207/src/stm32_appinit.c * - * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2012, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -102,7 +102,9 @@ * Name: board_app_initialize * * Description: - * Perform architecture specific initialization + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface using the command BOARDIOC_INIT. * * CONFIG_LIB_BOARDCTL=y : * Called from the NSH library @@ -111,9 +113,24 @@ * CONFIG_LIB_BOARDCTL=n : * Called from board_initialize(). * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #if defined(HAVE_USBHOST) || defined(HAVE_USBMONITOR) || defined(CONFIG_ADC) int ret; diff --git a/configs/olimex-stm32-p207/src/stm32_boot.c b/configs/olimex-stm32-p207/src/stm32_boot.c index 7234449534e..1d81c621094 100644 --- a/configs/olimex-stm32-p207/src/stm32_boot.c +++ b/configs/olimex-stm32-p207/src/stm32_boot.c @@ -47,14 +47,6 @@ #include "olimex-stm32-p207.h" -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -119,7 +111,7 @@ void board_initialize(void) */ #if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_LIB_BOARDCTL) - board_app_initialize(); + board_app_initialize(0); #endif } #endif diff --git a/configs/olimex-strp711/nettest/defconfig b/configs/olimex-strp711/nettest/defconfig index f8c48131aa7..2f698cc8bdc 100644 --- a/configs/olimex-strp711/nettest/defconfig +++ b/configs/olimex-strp711/nettest/defconfig @@ -413,28 +413,28 @@ CONFIG_ENC28J60_STATS=y CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -CONFIG_ARCH_HAVE_UART1=y -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +CONFIG_UART1_SERIALDRIVER=y +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/olimex-strp711/nsh/defconfig b/configs/olimex-strp711/nsh/defconfig index d45d72b3ced..790273c4220 100644 --- a/configs/olimex-strp711/nsh/defconfig +++ b/configs/olimex-strp711/nsh/defconfig @@ -324,8 +324,8 @@ CONFIG_MMCSD_SPIMODE=0 CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -CONFIG_ARCH_HAVE_UART0=y -CONFIG_ARCH_HAVE_UART1=y +CONFIG_UART0_SERIALDRIVER=y +CONFIG_UART1_SERIALDRIVER=y # # USART Configuration diff --git a/configs/olimex-strp711/src/str71_appinit.c b/configs/olimex-strp711/src/str71_appinit.c index 44cca74773f..e064cd59883 100644 --- a/configs/olimex-strp711/src/str71_appinit.c +++ b/configs/olimex-strp711/src/str71_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/olimex-strp711/src/str71_appinit.c * - * Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. + * Copyright (C) 2009-2010, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -105,11 +105,28 @@ * Name: board_app_initialize * * Description: - * Perform architecture specific initialization + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface using the command BOARDIOC_INIT. + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #ifdef NSH_HAVEMMCSD FAR struct spi_dev_s *spi; diff --git a/configs/olimexino-stm32/can/defconfig b/configs/olimexino-stm32/can/defconfig index b8c9da6ec56..866967575ef 100644 --- a/configs/olimexino-stm32/can/defconfig +++ b/configs/olimexino-stm32/can/defconfig @@ -76,6 +76,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -94,6 +95,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -115,6 +117,7 @@ CONFIG_ARCH_CORTEXM3=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y CONFIG_ARMV7M_USEBASEPRI=y CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -122,6 +125,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y # CONFIG_ARMV7M_LAZYFPU is not set # CONFIG_ARCH_HAVE_FPU is not set # CONFIG_ARCH_HAVE_DPFPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -132,6 +136,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL=y @@ -243,6 +248,7 @@ CONFIG_ARCH_CHIP_STM32F103RB=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -431,13 +437,17 @@ CONFIG_STM32_FORCEPOWER=y # ADC Configuration # CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART1_SERIALDRIVER=y +# CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set CONFIG_SERIAL_DISABLE_REORDERING=y CONFIG_STM32_FLOWCONTROL_BROKEN=y +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # @@ -743,33 +753,28 @@ CONFIG_ANALOG=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -CONFIG_ARCH_HAVE_USART1=y -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART1_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y CONFIG_SERIAL_NPOLLWAITERS=2 @@ -924,6 +929,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=0 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # CONFIG_NETDB_HOSTFILE is not set @@ -958,6 +965,7 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=768 # # CAN Utilities # +# CONFIG_CANUTILS_LIBCANARD is not set # # Examples @@ -1059,6 +1067,7 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_NETUTILS_CHAT is not set # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/olimexino-stm32/composite/defconfig b/configs/olimexino-stm32/composite/defconfig index 3dfff329ac8..bb7055ac686 100644 --- a/configs/olimexino-stm32/composite/defconfig +++ b/configs/olimexino-stm32/composite/defconfig @@ -76,6 +76,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -94,6 +95,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -115,6 +117,7 @@ CONFIG_ARCH_CORTEXM3=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y CONFIG_ARMV7M_USEBASEPRI=y CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -122,6 +125,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y # CONFIG_ARMV7M_LAZYFPU is not set # CONFIG_ARCH_HAVE_FPU is not set # CONFIG_ARCH_HAVE_DPFPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -132,6 +136,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL=y @@ -238,6 +243,7 @@ CONFIG_ARCH_CHIP_STM32F103RB=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -426,16 +432,22 @@ CONFIG_STM32_DMACAPABLE=y # # CONFIG_STM32_ADC1_DMA is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART1_SERIALDRIVER=y +# CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set # CONFIG_USART1_RXDMA is not set +CONFIG_STM32_USART2_SERIALDRIVER=y +# CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set # CONFIG_USART2_RXDMA is not set CONFIG_SERIAL_DISABLE_REORDERING=y CONFIG_STM32_FLOWCONTROL_BROKEN=y +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # @@ -745,34 +757,28 @@ CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set CONFIG_SERIAL_REMOVABLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -CONFIG_ARCH_HAVE_USART1=y -CONFIG_ARCH_HAVE_USART2=y -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART1_ISUART=y -CONFIG_USART2_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +CONFIG_USART2_SERIALDRIVER=y +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y CONFIG_SERIAL_NPOLLWAITERS=2 @@ -853,8 +859,8 @@ CONFIG_CDCACM_EPBULKOUT_HSSIZE=64 CONFIG_CDCACM_EPBULKIN=2 CONFIG_CDCACM_EPBULKIN_FSSIZE=64 CONFIG_CDCACM_EPBULKIN_HSSIZE=64 -CONFIG_CDCACM_NWRREQS=2 CONFIG_CDCACM_NRDREQS=2 +CONFIG_CDCACM_NWRREQS=2 CONFIG_CDCACM_BULKIN_REQLEN=96 CONFIG_CDCACM_RXBUFSIZE=96 CONFIG_CDCACM_TXBUFSIZE=96 @@ -1011,6 +1017,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=0 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # CONFIG_NETDB_HOSTFILE is not set @@ -1045,7 +1053,7 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=768 # # CAN Utilities # -# CONFIG_CANUTILS_UAVCAN is not set +# CONFIG_CANUTILS_LIBUAVCAN is not set # # Examples @@ -1153,6 +1161,7 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_NETUTILS_CHAT is not set # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/olimexino-stm32/nsh/defconfig b/configs/olimexino-stm32/nsh/defconfig index 63b15cb7fcb..bff7b461199 100644 --- a/configs/olimexino-stm32/nsh/defconfig +++ b/configs/olimexino-stm32/nsh/defconfig @@ -76,6 +76,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -94,6 +95,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -115,6 +117,7 @@ CONFIG_ARCH_CORTEXM3=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y CONFIG_ARMV7M_USEBASEPRI=y CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -122,6 +125,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y # CONFIG_ARMV7M_LAZYFPU is not set # CONFIG_ARCH_HAVE_FPU is not set # CONFIG_ARCH_HAVE_DPFPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -132,6 +136,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL=y @@ -238,6 +243,7 @@ CONFIG_ARCH_CHIP_STM32F103RB=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -426,16 +432,22 @@ CONFIG_STM32_DMACAPABLE=y # # CONFIG_STM32_ADC1_DMA is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART1_SERIALDRIVER=y +# CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set # CONFIG_USART1_RXDMA is not set +CONFIG_STM32_USART2_SERIALDRIVER=y +# CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set # CONFIG_USART2_RXDMA is not set CONFIG_SERIAL_DISABLE_REORDERING=y CONFIG_STM32_FLOWCONTROL_BROKEN=y +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # @@ -743,34 +755,28 @@ CONFIG_MMCSD_SPIMODE=0 CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -CONFIG_ARCH_HAVE_USART1=y -CONFIG_ARCH_HAVE_USART2=y -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART1_ISUART=y -CONFIG_USART2_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +CONFIG_USART2_SERIALDRIVER=y +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y CONFIG_SERIAL_NPOLLWAITERS=2 @@ -939,6 +945,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=0 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # CONFIG_NETDB_HOSTFILE is not set @@ -973,7 +981,7 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=768 # # CAN Utilities # -# CONFIG_CANUTILS_UAVCAN is not set +# CONFIG_CANUTILS_LIBUAVCAN is not set # # Examples @@ -1081,6 +1089,7 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_NETUTILS_CHAT is not set # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/olimexino-stm32/smallnsh/defconfig b/configs/olimexino-stm32/smallnsh/defconfig index fbaa9d791eb..1429b4c2b49 100644 --- a/configs/olimexino-stm32/smallnsh/defconfig +++ b/configs/olimexino-stm32/smallnsh/defconfig @@ -76,6 +76,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -94,6 +95,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -115,6 +117,7 @@ CONFIG_ARCH_CORTEXM3=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y CONFIG_ARMV7M_USEBASEPRI=y CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -122,6 +125,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y # CONFIG_ARMV7M_LAZYFPU is not set # CONFIG_ARCH_HAVE_FPU is not set # CONFIG_ARCH_HAVE_DPFPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -132,6 +136,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL=y @@ -243,6 +248,7 @@ CONFIG_ARCH_CHIP_STM32F103RB=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -423,13 +429,17 @@ CONFIG_STM32_FORCEPOWER=y # CONFIG_STM32_TIM5_CAP is not set # CONFIG_STM32_TIM8_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART1_SERIALDRIVER=y +# CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set CONFIG_SERIAL_DISABLE_REORDERING=y # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # @@ -721,33 +731,28 @@ CONFIG_SPI_EXCHANGE=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -CONFIG_ARCH_HAVE_USART1=y -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART1_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y CONFIG_SERIAL_NPOLLWAITERS=2 @@ -892,6 +897,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=0 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # @@ -925,6 +932,7 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=768 # # CAN Utilities # +# CONFIG_CANUTILS_LIBCANARD is not set # # Examples @@ -1021,6 +1029,7 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_NETUTILS_CHAT is not set # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/olimexino-stm32/src/stm32_appinit.c b/configs/olimexino-stm32/src/stm32_appinit.c index c7de1858b3a..e9cd7fe0b4d 100644 --- a/configs/olimexino-stm32/src/stm32_appinit.c +++ b/configs/olimexino-stm32/src/stm32_appinit.c @@ -68,11 +68,28 @@ * Name: board_app_initialize * * Description: - * Perform architecture specific initialization + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface using the command BOARDIOC_INIT. + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { int ret = OK; diff --git a/configs/olimexino-stm32/src/stm32_boot.c b/configs/olimexino-stm32/src/stm32_boot.c index e7f0b807e8a..1d8d40bb3fb 100644 --- a/configs/olimexino-stm32/src/stm32_boot.c +++ b/configs/olimexino-stm32/src/stm32_boot.c @@ -136,7 +136,7 @@ void board_initialize(void) * space but the initialization function must run in kernel space. */ - board_app_initialize(); + board_app_initialize(0); #endif #if defined(CONFIG_USBDEV) diff --git a/configs/olimexino-stm32/tiny/defconfig b/configs/olimexino-stm32/tiny/defconfig index d4c89d090a7..4fe4bb5a901 100644 --- a/configs/olimexino-stm32/tiny/defconfig +++ b/configs/olimexino-stm32/tiny/defconfig @@ -76,6 +76,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -94,6 +95,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -115,6 +117,7 @@ CONFIG_ARCH_CORTEXM3=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y CONFIG_ARMV7M_USEBASEPRI=y CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -122,6 +125,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y # CONFIG_ARMV7M_LAZYFPU is not set # CONFIG_ARCH_HAVE_FPU is not set # CONFIG_ARCH_HAVE_DPFPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -132,6 +136,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL=y @@ -243,6 +248,7 @@ CONFIG_ARCH_CHIP_STM32F103RB=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -423,13 +429,17 @@ CONFIG_STM32_FORCEPOWER=y # CONFIG_STM32_TIM5_CAP is not set # CONFIG_STM32_TIM8_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART1_SERIALDRIVER=y +# CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set CONFIG_SERIAL_DISABLE_REORDERING=y CONFIG_STM32_FLOWCONTROL_BROKEN=y +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # @@ -725,33 +735,28 @@ CONFIG_SPI_EXCHANGE=y CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -CONFIG_ARCH_HAVE_USART1=y -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART1_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set # CONFIG_SERIAL_OFLOWCONTROL is not set @@ -889,6 +894,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=0 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # @@ -922,6 +929,7 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=768 # # CAN Utilities # +# CONFIG_CANUTILS_LIBCANARD is not set # # Examples @@ -1017,6 +1025,7 @@ CONFIG_EXAMPLES_CAN_READWRITE=y # # CONFIG_NETUTILS_CHAT is not set # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/open1788/knsh/defconfig b/configs/open1788/knsh/defconfig index 9081e8dba9e..566df000ae0 100644 --- a/configs/open1788/knsh/defconfig +++ b/configs/open1788/knsh/defconfig @@ -426,27 +426,27 @@ CONFIG_PIPES=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/open1788/nsh/defconfig b/configs/open1788/nsh/defconfig index 13381a0bb9f..82a8f975de5 100644 --- a/configs/open1788/nsh/defconfig +++ b/configs/open1788/nsh/defconfig @@ -463,28 +463,28 @@ CONFIG_PIPES=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/open1788/nxlines/defconfig b/configs/open1788/nxlines/defconfig index 93dd9d965f7..486cc41cb0f 100644 --- a/configs/open1788/nxlines/defconfig +++ b/configs/open1788/nxlines/defconfig @@ -367,7 +367,7 @@ CONFIG_PIPES=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -CONFIG_ARCH_HAVE_UART0=y +CONFIG_UART0_SERIALDRIVER=y CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y CONFIG_CONFIG_SERIAL_NPOLLWAITERS=2 diff --git a/configs/open1788/src/lpc17_appinit.c b/configs/open1788/src/lpc17_appinit.c index 53dd70aeb9d..d1ccc94df21 100644 --- a/configs/open1788/src/lpc17_appinit.c +++ b/configs/open1788/src/lpc17_appinit.c @@ -1,8 +1,7 @@ /**************************************************************************** * config/open1788/src/lpc17_appinit.c - * arch/arm/src/board/lpc17_appinit.c * - * Copyright (C) 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2013, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -362,7 +361,9 @@ static int nsh_usbhostinitialize(void) * Name: board_app_initialize * * Description: - * Perform architecture specific initialization for NSH. + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface using the command BOARDIOC_INIT. * * CONFIG_LIB_BOARDCTL=y : * Called from the NSH library @@ -371,9 +372,24 @@ static int nsh_usbhostinitialize(void) * CONFIG_LIB_BOARDCTL=n: * Called from board_initialize(). * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { int ret; diff --git a/configs/open1788/src/lpc17_boardinitialize.c b/configs/open1788/src/lpc17_boardinitialize.c index 201e6ff210e..0a4a3d11a0e 100644 --- a/configs/open1788/src/lpc17_boardinitialize.c +++ b/configs/open1788/src/lpc17_boardinitialize.c @@ -136,7 +136,7 @@ void board_initialize(void) */ #if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_LIB_BOARDCTL) - (void)board_app_initialize(); + (void)board_app_initialize(0); #endif } #endif diff --git a/configs/pcblogic-pic32mx/nsh/defconfig b/configs/pcblogic-pic32mx/nsh/defconfig index 35dc7761453..7a3de04abac 100644 --- a/configs/pcblogic-pic32mx/nsh/defconfig +++ b/configs/pcblogic-pic32mx/nsh/defconfig @@ -472,28 +472,28 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -CONFIG_ARCH_HAVE_UART1=y -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +CONFIG_UART1_SERIALDRIVER=y +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/pcblogic-pic32mx/src/pic32mx_appinit.c b/configs/pcblogic-pic32mx/src/pic32mx_appinit.c index 97baa0009ea..414d4b395b2 100644 --- a/configs/pcblogic-pic32mx/src/pic32mx_appinit.c +++ b/configs/pcblogic-pic32mx/src/pic32mx_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/pcblocic-pic32mx/src/pic32mx_appinit.c * - * Copyright (C) 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2013, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -65,11 +65,28 @@ * Name: board_app_initialize * * Description: - * Perform architecture specific initialization + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface using the command BOARDIOC_INIT. + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { int ret = OK; diff --git a/configs/pcduino-a10/nsh/defconfig b/configs/pcduino-a10/nsh/defconfig index a2bf40bf07f..95833160ff6 100644 --- a/configs/pcduino-a10/nsh/defconfig +++ b/configs/pcduino-a10/nsh/defconfig @@ -416,27 +416,27 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/pcduino-a10/src/a1x_boot.c b/configs/pcduino-a10/src/a1x_boot.c index 951e8a87750..265d7287319 100644 --- a/configs/pcduino-a10/src/a1x_boot.c +++ b/configs/pcduino-a10/src/a1x_boot.c @@ -96,7 +96,7 @@ void board_initialize(void) */ #if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_LIB_BOARDCTL) - (void)board_app_initialize(); + (void)board_app_initialize(0); #endif } #endif /* CONFIG_BOARD_INITIALIZE */ diff --git a/configs/pic32mx-starterkit/nsh/defconfig b/configs/pic32mx-starterkit/nsh/defconfig index 2ed828d4892..34d57a29fdb 100644 --- a/configs/pic32mx-starterkit/nsh/defconfig +++ b/configs/pic32mx-starterkit/nsh/defconfig @@ -511,28 +511,28 @@ CONFIG_MTD=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -CONFIG_ARCH_HAVE_UART1=y -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +CONFIG_UART1_SERIALDRIVER=y +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/pic32mx-starterkit/nsh2/defconfig b/configs/pic32mx-starterkit/nsh2/defconfig index d6d57e13e88..60935ce1ac5 100644 --- a/configs/pic32mx-starterkit/nsh2/defconfig +++ b/configs/pic32mx-starterkit/nsh2/defconfig @@ -570,28 +570,28 @@ CONFIG_ETH0_PHY_DP83848C=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/pic32mx-starterkit/src/pic32mx_appinit.c b/configs/pic32mx-starterkit/src/pic32mx_appinit.c index 64236307337..64bba54fc73 100644 --- a/configs/pic32mx-starterkit/src/pic32mx_appinit.c +++ b/configs/pic32mx-starterkit/src/pic32mx_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/pic32mx-starterkit/src/pic32mx_appinit.c * - * Copyright (C) 2011, 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2011, 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -351,11 +351,28 @@ static int nsh_usbdevinitialize(void) * Name: board_app_initialize * * Description: - * Perform architecture specific initialization + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface using the command BOARDIOC_INIT. + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { int ret; diff --git a/configs/pic32mx7mmb/nsh/defconfig b/configs/pic32mx7mmb/nsh/defconfig index 64bd042c81a..492a3f054ed 100644 --- a/configs/pic32mx7mmb/nsh/defconfig +++ b/configs/pic32mx7mmb/nsh/defconfig @@ -588,28 +588,28 @@ CONFIG_ETH0_PHY_LAN8720=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -CONFIG_ARCH_HAVE_UART1=y -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +CONFIG_UART1_SERIALDRIVER=y +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/pic32mx7mmb/src/pic32_appinit.c b/configs/pic32mx7mmb/src/pic32_appinit.c index 0970e277817..8c62c9a766f 100644 --- a/configs/pic32mx7mmb/src/pic32_appinit.c +++ b/configs/pic32mx7mmb/src/pic32_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/pic32mx7mmb/src/pic32_appinit.c * - * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2012, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -361,11 +361,28 @@ static int nsh_usbdevinitialize(void) * Name: board_app_initialize * * Description: - * Perform architecture specific initialization + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface using the command BOARDIOC_INIT. + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { int ret; diff --git a/configs/pic32mz-starterkit/nsh/defconfig b/configs/pic32mz-starterkit/nsh/defconfig index 983aa750862..a6299b98a93 100644 --- a/configs/pic32mz-starterkit/nsh/defconfig +++ b/configs/pic32mz-starterkit/nsh/defconfig @@ -438,28 +438,28 @@ CONFIG_MTD=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -CONFIG_ARCH_HAVE_UART1=y -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +CONFIG_UART1_SERIALDRIVER=y +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/pic32mz-starterkit/src/pic32mz_appinit.c b/configs/pic32mz-starterkit/src/pic32mz_appinit.c index a312b0e3272..0b3a3dc8238 100644 --- a/configs/pic32mz-starterkit/src/pic32mz_appinit.c +++ b/configs/pic32mz-starterkit/src/pic32mz_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/pic32mz-starterkit/src/pic32mz_appinit.c * - * Copyright (C) 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -53,11 +53,28 @@ * Name: board_app_initialize * * Description: - * Perform architecture specific initialization + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface using the command BOARDIOC_INIT. + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { /* If CONFIG_BOARD_INITIALIZE is selected then board initialization was * already performed in board_initialize. diff --git a/configs/pirelli_dpl10/nsh_highram/defconfig b/configs/pirelli_dpl10/nsh_highram/defconfig index c24e5a51ec7..d8eac38010b 100644 --- a/configs/pirelli_dpl10/nsh_highram/defconfig +++ b/configs/pirelli_dpl10/nsh_highram/defconfig @@ -369,28 +369,28 @@ CONFIG_SPI_EXCHANGE=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -CONFIG_ARCH_HAVE_OTHER_UART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +CONFIG_OTHER_UART_SERIALDRIVER=y # # USART Configuration diff --git a/configs/pirelli_dpl10/src/boot.c b/configs/pirelli_dpl10/src/boot.c index 4cd07fb0a69..38d1fe8ac2b 100644 --- a/configs/pirelli_dpl10/src/boot.c +++ b/configs/pirelli_dpl10/src/boot.c @@ -44,10 +44,33 @@ * Public Functions ****************************************************************************/ -/* Application initialization stub for boardctl() */ +/**************************************************************************** + * Name: board_app_initialize + * + * Description: + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface using the command BOARDIOC_INIT. + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. + * + ****************************************************************************/ #ifdef CONFIG_LIB_BOARDCTL -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { return 0; } diff --git a/configs/qemu-i486/nsh/defconfig b/configs/qemu-i486/nsh/defconfig index 68cf8bcff9b..c07faea1dac 100644 --- a/configs/qemu-i486/nsh/defconfig +++ b/configs/qemu-i486/nsh/defconfig @@ -264,27 +264,27 @@ CONFIG_16550_SUPRESS_CONFIG=y CONFIG_16550_REGINCR=1 CONFIG_16550_REGWIDTH=8 CONFIG_16550_ADDRWIDTH=16 -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/qemu-i486/ostest/defconfig b/configs/qemu-i486/ostest/defconfig index 75ebb89269f..9306bec0db8 100644 --- a/configs/qemu-i486/ostest/defconfig +++ b/configs/qemu-i486/ostest/defconfig @@ -242,27 +242,27 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/rgmp/arm/default/defconfig b/configs/rgmp/arm/default/defconfig index 5089009ade1..4b1bf3a25ca 100644 --- a/configs/rgmp/arm/default/defconfig +++ b/configs/rgmp/arm/default/defconfig @@ -243,27 +243,27 @@ CONFIG_VNET_NINTERFACES=1 CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/rgmp/arm/nsh/defconfig b/configs/rgmp/arm/nsh/defconfig index e6422b47095..1d9e1737409 100644 --- a/configs/rgmp/arm/nsh/defconfig +++ b/configs/rgmp/arm/nsh/defconfig @@ -265,27 +265,27 @@ CONFIG_VNET_NINTERFACES=1 CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/rgmp/x86/cxxtest/defconfig b/configs/rgmp/x86/cxxtest/defconfig index 80f6559d66e..40ff45293e5 100644 --- a/configs/rgmp/x86/cxxtest/defconfig +++ b/configs/rgmp/x86/cxxtest/defconfig @@ -272,27 +272,27 @@ CONFIG_VNET_NINTERFACES=1 CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/rgmp/x86/default/defconfig b/configs/rgmp/x86/default/defconfig index 58c51f727bc..6f10a9ed0e4 100644 --- a/configs/rgmp/x86/default/defconfig +++ b/configs/rgmp/x86/default/defconfig @@ -251,27 +251,27 @@ CONFIG_VNET_NINTERFACES=1 CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/rgmp/x86/helloxx/defconfig b/configs/rgmp/x86/helloxx/defconfig index d7f663d4cb6..039dd3aa9c7 100644 --- a/configs/rgmp/x86/helloxx/defconfig +++ b/configs/rgmp/x86/helloxx/defconfig @@ -272,27 +272,27 @@ CONFIG_VNET_NINTERFACES=1 CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/rgmp/x86/nsh/defconfig b/configs/rgmp/x86/nsh/defconfig index 74022b3e8d6..8723d56a26d 100644 --- a/configs/rgmp/x86/nsh/defconfig +++ b/configs/rgmp/x86/nsh/defconfig @@ -273,27 +273,27 @@ CONFIG_VNET_NINTERFACES=1 CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/sabre-6quad/README.txt b/configs/sabre-6quad/README.txt index bf8fe28c2b4..122f28e8d46 100644 --- a/configs/sabre-6quad/README.txt +++ b/configs/sabre-6quad/README.txt @@ -13,36 +13,116 @@ Contents - LEDs and Buttons - Using U-Boot to Run NuttX - Debugging with the Segger J-Link + - SMP - Configurations Status ====== 2016-02-28: The i.MX6Q port is just beginning. A few files have been -populated with the port is a long way from being complete or even ready to -begin any kind of testing. + populated with the port is a long way from being complete or even ready to + begin any kind of testing. 2016-03-12: The i.MX6Q port is code complete including initial -implementation of logic needed for CONFIG_SMP=y . There is no clock -configuration logic. This is probably not an issue if we are loaded into -SDRAM by a bootloader (because we cannot change the clocking anyway in -that case). + implementation of logic needed for CONFIG_SMP=y . There is no clock + configuration logic. This is probably not an issue if we are loaded into + SDRAM by a bootloader (because we cannot change the clocking anyway in + that case). -There is a lot of testing that could be done but, unfortunately, I still -have no i.MX6 hardware to test on. + There is a lot of testing that could be done but, unfortunately, I still + have no i.MX6 hardware to test on. -In additional to the unexpected issues, I do expect to run into some -cache coherency issues when I get to testing an SMP configuration. + In additional to the unexpected issues, I do expect to run into some + cache coherency issues when I get to testing an SMP configuration. 2016-03-28: I now have a used MCIMX6Q-SDB which is similar to the target -configuration described below except that it does not have the 10.1" LVDS -display. Next step: Figure out how to run a copy of NuttX using U-Boot. + configuration described below except that it does not have the 10.1" LVDS + display. Next step: Figure out how to run a copy of NuttX using U-Boot. 2016-03-31: Most all of the boot of the NSH configuration seems to be -working. It gets to NSH and NSH appears to run normally. Non-interrupt -driver serial output to the VCOM console is working (llsyslog). However, -there does not appear to be any interrupt activity: No timer interrupts, -no interrupt driver serial console output (syslog, printf). + working. It gets to NSH and NSH appears to run normally. Non-interrupt + driver serial output to the VCOM console is working (llsyslog). However, + there does not appear to be any interrupt activity: No timer interrupts, + no interrupt driver serial console output (syslog, printf). + +2016-05-16: I now get serial interrupts (but not timer interrupts). This + involves a few changes to GIC bit settings that I do not fully understand. + With this change, the NSH serial console works: + + MX6Q SABRESD U-Boot > ABEFGHILMN + + NuttShell (NSH) + nsh> + + But there are still no timer interrupts. LEDs do not appear to be working. + +2016-05-17: Timer interrupts now work. This turned out to be just a minor + bit setting error in the timer configuration. LEDs were not working simply + because board_autoled_initialize() was not being called in the board startup + logic. + + At this point, I would say that the basic NSH port is complete. + +2016-05-18: Started looking at the SMP configuration. Initially, I verfied + that the NSH configuration works with CONFIG_SMP_NCPUS=1. Not a very + interesting case, but this does exercise a lot of the basic SMP logic. + + When more than one CPU is configured, then there are certain failures that + appear to be stack corruption problem. See the open issues below under + SMP. + +2016-05-22: In a simple NSH case, SMP does not seem to be working. But there + are known SMP open issues so I assume if the tasking were stressed more there + would be additional failures. See the open issues below under SMP. + + An smp configuration was added. This is not quite the same as the + configuration that I used for testing. I enabled DEBUG output, ran with + only 2 CPUS, and disabled the RAMLOG: + + +CONFIG_DEBUG=y + +CONFIG_DEBUG_VERBOSE=y + +CONFIG_DEBUG_SCHED=y + +CONFIG_DEBUG_SYMBOLS=y + + -CONFIG_DEBUG_FULLOPT=y + +CONFIG_DEBUG_NOOPT=y + + -CONFIG_SMP_NCPUS=4 + +CONFIG_SMP_NCPUS=2 + + -CONFIG_RAMLOG=y + -CONFIG_RAMLOG_SYSLOG=y + -CONFIG_RAMLOG_BUFSIZE=16384 + -CONFIG_RAMLOG_NONBLOCKING=y + -CONFIG_RAMLOG_NPOLLWAITERS=4 + -CONFIG_SYSLOG=y + + I would also disable debug output from CPU0 so that I could better see the + debug output from CPU1: + + $ diff -u libc/syslog/lib_lowsyslog.c libc/syslog/lib_lowsyslog.c.SAVE + --- libc/syslog/lib_lowsyslog.c 2016-05-22 14:56:35.130096500 -0600 + +++ libc/syslog/lib_lowsyslog.c.SAVE 2016-05-20 13:36:22.588330100 -0600 + @@ -126,7 +126,0 @@ + { + va_list ap; + int ret; + +if (up_cpu_index() == 0) return 17; // REMOVE ME + + /* Let lowvsyslog do the work */ + + va_start(ap, fmt); + + $ diff -u libc/syslog/lib_syslog.c libc/syslog/lib_syslog.c.SAVE + --- libc/syslog/lib_syslog.c 2016-05-22 14:56:35.156098100 -0600 + +++ libc/syslog/lib_syslog.c.SAVE 2016-05-20 13:36:15.331284000 -0600 + @@ -192,6 +192,7 @@ + { + va_list ap; + int ret; + +if (up_cpu_index() == 0) return 17; // REMOVE ME + + /* Let vsyslog do the work */ Platform Features ================= @@ -111,7 +191,7 @@ LEDs ---- A single LED is available driven GPIO1_IO02. On the schematic this is USR_DEF_RED_LED signal to pin T1 (GPIO_2). This signal is shared with -KEY_ROW6 (ALT2). A low value illuminates the LED. +KEY_ROW6 (ALT2). A high value illuminates the LED. This LED is not used by the board port unless CONFIG_ARCH_LEDS is defined. In that case, the usage by the board port is defined in @@ -418,6 +498,74 @@ A: Yes with the following modifications to the prodecure above. gdb> mon set pc 0x10800040 gdb> s +SMP +=== + +The i.MX6 6Quad has 4 CPUs. Support is included for testing an SMP +configuration. That configuration is still not yet ready for usage but can +be enabled with the following configuration settings: + + Build Setup: + CONFIG_EXPERIMENTAL=y + + RTOS Features -> Tasks and Scheduling + CONFIG_SPINLOCK=y + CONFIG_SMP=y + CONFIG_SMP_NCPUS=4 + CONFIG_SMP_IDLETHREAD_STACKSIZE=2048 + +Open Issues: + +1. Currently all device interrupts are handled on CPU0 only. Critical sections will + attempt to disable interrupts but will now disable interrupts only on the current + CPU (which may not be CPU0). Perhaps that should be a spinlock to prohibit + execution of interrupts on CPU0 when other CPUs are in a critical section? + +2. Cache Concurency. This is a complex problem. There is logic in place now to + clean CPU0 D-cache before starting a new CPU and for invalidating the D-Cache + when the new CPU is started. REVISIT: Seems that this should not be necessary. + If the Shareable bit set in the MMU mappings and my understanding is that this + should keep cache coherency at least within a cluster. I need to study more + how the inner and outer shareable attribute works to control cacheing + + But there may are many, many more such cache coherency issues if I cannot find + a systematic way to manage cache coherency. + + http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dht0008a/CJABEHDA.html + http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.den0024a/CEGDBEJE.html + + Try: + + --- mmu.h.orig 2016-05-20 13:09:34.773462000 -0600 + +++ mmu.h 2016-05-20 13:03:13.261978100 -0600 + @@ -572,8 +572,14 @@ + + #define MMU_ROMFLAGS (PMD_TYPE_SECT | PMD_SECT_AP_R1 | PMD_CACHEABLE | \ + PMD_SECT_DOM(0)) + -#define MMU_MEMFLAGS (PMD_TYPE_SECT | PMD_SECT_AP_RW1 | PMD_CACHEABLE | \ + +#ifdef CONFIG_SMP + + + +# define MMU_MEMFLAGS (PMD_TYPE_SECT | PMD_SECT_AP_RW1 | PMD_CACHEABLE | \ + + PMD_SECT_S | PMD_SECT_DOM(0)) + +#else + +# define MMU_MEMFLAGS (PMD_TYPE_SECT | PMD_SECT_AP_RW1 | PMD_CACHEABLE | \ + PMD_SECT_DOM(0)) + +#endif + #define MMU_IOFLAGS (PMD_TYPE_SECT | PMD_SECT_AP_RW1 | PMD_DEVICE | \ + PMD_SECT_DOM(0) | PMD_SECT_XN) + #define MMU_STRONGLY_ORDERED (PMD_TYPE_SECT | PMD_SECT_AP_RW1 | \ + +3. Assertions. On a fatal assertions, other CPUs need to be stopped. The SCR, + however, only supports disabling CPUs 1 through 3. Perhaps if the assertion + occurs on CPUn, n > 0, then it should use and SGI to perform the assertion + on CPU0 always. From CPU0, CPU1-3 can be disabled. + +4. Caching probabaly interferes with spinlocks as they are currently implemented. + Waiting on a cached copy of the spinlock may result in a hang or a failure to + wait. + +5. Do spinlocks need to go into a special "strongly ordered" memory region? + Configurations ============== @@ -484,3 +632,40 @@ Configuration sub-directories at apps/nshlib with the start logic at apps/examples/nsh. NOTES: + + 1. This configuration assumes that we are loaded into SDRAM and + started via U-Boot. + + 2. The serial console is configured by default for use UART1, the + USB VCOM port (UART1), same as the serial port used by U-Boot. + You will need to reconfigure if you want to use a different UART. + + 3. NSH built-in applications are supported, but no built-in + applications are enabled. + + Binary Formats: + CONFIG_BUILTIN=y : Enable support for built-in programs + + Application Configuration: + CONFIG_NSH_BUILTIN_APPS=y : Enable starting apps from NSH command line + + 4. The RAMLOG is enabled. All SYSLOG (DEBUG) output will go to the + RAMLOG and will not be visible unless you use the nsh 'dmesg' + command. To disable this RAMLOG feature, disable the following: + + File Systems: CONFIG_SYSLOG + Device Drivers: CONFIG_RAMLOG + + + smp + --- + This is a configuration of testing the SMP configuration. It is + essentially equivalent to the SMP configuration except has SMP enabled. + + NOTES: + + 1. See the notest for the nsh configuration. Since this configuration + is essentially the same all of those comments apply. + + 2. SMP is not fully functional. See the STATUS and SMP sections above + for detailed SMP-related issues. diff --git a/configs/sabre-6quad/include/board.h b/configs/sabre-6quad/include/board.h index f9d7d8e95b0..e6d4dd4ade8 100644 --- a/configs/sabre-6quad/include/board.h +++ b/configs/sabre-6quad/include/board.h @@ -88,7 +88,7 @@ * * A single LED is available driven GPIO1_IO02. On the schematic this is * USR_DEF_RED_LED signal to pin T1 (GPIO_2). This signal is shared with KEY_ROW6 - * (ALT2). A low value illuminates the LED. + * (ALT2). A high value illuminates the LED. */ /* LED index values for use with board_userled() */ diff --git a/configs/sabre-6quad/nsh/defconfig b/configs/sabre-6quad/nsh/defconfig index 1c9f8ba3380..25b14c99ff4 100644 --- a/configs/sabre-6quad/nsh/defconfig +++ b/configs/sabre-6quad/nsh/defconfig @@ -121,6 +121,8 @@ CONFIG_ARCH_CORTEXA9=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-a" CONFIG_ARCH_CHIP="imx6" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +# CONFIG_ARM_TOOLCHAIN_GNU is not set CONFIG_ARCH_HAVE_FPU=y # CONFIG_ARCH_HAVE_DPFPU is not set CONFIG_ARCH_FPU=y @@ -208,7 +210,7 @@ CONFIG_ARCH_STACKDUMP=y # # Board Settings # -CONFIG_BOARD_LOOPSPERMSEC=65775 +CONFIG_BOARD_LOOPSPERMSEC=99369 # CONFIG_ARCH_CALIBRATION is not set # @@ -426,28 +428,28 @@ CONFIG_DEV_ZERO=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -CONFIG_ARCH_HAVE_UART1=y -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +CONFIG_UART1_SERIALDRIVER=y +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration @@ -517,7 +519,7 @@ CONFIG_RAMLOG_NPOLLWAITERS=4 # CONFIG_DISABLE_MOUNTPOINT is not set # CONFIG_FS_AUTOMOUNTER is not set # CONFIG_DISABLE_PSEUDOFS_OPERATIONS is not set -# CONFIG_FS_READABLE is not set +CONFIG_FS_READABLE=y # CONFIG_FS_WRITABLE is not set # CONFIG_FS_NAMED_SEMAPHORES is not set CONFIG_FS_MQUEUE_MPATH="/var/mqueue" @@ -528,7 +530,15 @@ CONFIG_FS_MQUEUE_MPATH="/var/mqueue" # CONFIG_FS_TMPFS is not set # CONFIG_FS_SMARTFS is not set # CONFIG_FS_BINFS is not set -# CONFIG_FS_PROCFS is not set +CONFIG_FS_PROCFS=y +# CONFIG_FS_PROCFS_REGISTER is not set + +# +# Exclude individual procfs entries +# +# CONFIG_FS_PROCFS_EXCLUDE_PROCESS is not set +# CONFIG_FS_PROCFS_EXCLUDE_UPTIME is not set +# CONFIG_FS_PROCFS_EXCLUDE_MOUNTS is not set # CONFIG_FS_UNIONFS is not set # @@ -607,6 +617,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 CONFIG_ARCH_HAVE_TLS=y # CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set +# CONFIG_NETDB_HOSTFILE is not set # # Non-standard Library Support @@ -701,6 +712,7 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # File System Utilities # # CONFIG_FSUTILS_INIFILE is not set +# CONFIG_FSUTILS_PASSWD is not set # # GPS Utilities @@ -716,6 +728,7 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # # Interpreters # +# CONFIG_INTERPRETERS_BAS is not set # CONFIG_INTERPRETERS_FICL is not set # CONFIG_INTERPRETERS_PCODE is not set # CONFIG_INTERPRETERS_MICROPYTHON is not set @@ -730,6 +743,7 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # # CONFIG_NETUTILS_CHAT is not set # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set @@ -812,6 +826,7 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_CMDOPT_DF_H is not set CONFIG_NSH_CODECS_BUFSIZE=128 # CONFIG_NSH_CMDOPT_HEXDUMP is not set +CONFIG_NSH_PROC_MOUNTPOINT="/proc" CONFIG_NSH_FILEIOSIZE=512 # diff --git a/configs/sabre-6quad/nsh/setenv.sh b/configs/sabre-6quad/nsh/setenv.sh index cbdfc139bca..e6eae017974 100755 --- a/configs/sabre-6quad/nsh/setenv.sh +++ b/configs/sabre-6quad/nsh/setenv.sh @@ -1,5 +1,5 @@ #!/bin/bash -# configs/sabre-6quad/nsh/Make.defs +# configs/sabre-6quad/nsh/setenv.sh # # Copyright (C) 2016 Gregory Nutt. All rights reserved. # Author: Gregory Nutt diff --git a/configs/sabre-6quad/smp/Make.defs b/configs/sabre-6quad/smp/Make.defs new file mode 100644 index 00000000000..b5ba0e4111d --- /dev/null +++ b/configs/sabre-6quad/smp/Make.defs @@ -0,0 +1,134 @@ +############################################################################ +# configs/sabre-6quad/smp/Make.defs +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +include ${TOPDIR}/.config +include ${TOPDIR}/tools/Config.mk +include ${TOPDIR}$(DELIM)arch$(DELIM)arm$(DELIM)src$(DELIM)armv7-a$(DELIM)Toolchain.defs + +LDSCRIPT = dramboot.ld + +ifeq ($(WINTOOL),y) + # Windows-native toolchains + ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)$(DELIM)include}" + ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)$(DELIM)include}" -isystem "${shell cygpath -w $(TOPDIR)$(DELIM)include$(DELIM)cxx}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)$(DELIM)configs$(DELIM)$(CONFIG_ARCH_BOARD)$(DELIM)scripts$(DELIM)$(LDSCRIPT)}" +else + # Linux/Cygwin-native toolchain + ARCHINCLUDES = -I. -isystem $(TOPDIR)$(DELIM)include + ARCHXXINCLUDES = -I. -isystem $(TOPDIR)$(DELIM)include -isystem $(TOPDIR)$(DELIM)include$(DELIM)cxx + ARCHSCRIPT = -T$(TOPDIR)$(DELIM)configs$(DELIM)$(CONFIG_ARCH_BOARD)$(DELIM)scripts$(DELIM)$(LDSCRIPT) +endif + +CC = $(CROSSDEV)gcc +CXX = $(CROSSDEV)g++ +CPP = $(CROSSDEV)gcc -E +LD = $(CROSSDEV)ld +AR = $(ARCROSSDEV)ar rcs +NM = $(ARCROSSDEV)nm +OBJCOPY = $(CROSSDEV)objcopy +OBJDUMP = $(CROSSDEV)objdump + +ifeq ($(CONFIG_DEBUG_SYMBOLS),y) + ARCHOPTIMIZATION = -g +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer +endif + +ARCHCPUFLAGS = -mcpu=cortex-a9 -mfpu=vfpv4-d16 +ARCHCFLAGS = -fno-builtin +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef +ARCHWARNINGSXX = -Wall -Wshadow -Wundef +ARCHDEFINES = +ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 + +CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe +CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS) +CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe +CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS) +CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) +AFLAGS = $(CFLAGS) -D__ASSEMBLY__ + +# NXFLAT module definitions + +NXFLATLDFLAGS1 = -r -d -warn-common +NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)$(DELIM)binfmt$(DELIM)libnxflat$(DELIM)gnu-nxflat-pcrel.ld -no-check-sections +LDNXFLATFLAGS = -e main -s 2048 + +# ELF module definitions + +CELFFLAGS = $(CFLAGS) -mlong-calls # --target1-abs +CXXELFFLAGS = $(CXXFLAGS) -mlong-calls # --target1-abs + +LDELFFLAGS = -r -e main +ifeq ($(WINTOOL),y) + LDELFFLAGS += -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/gnu-elf.ld}" +else + LDELFFLAGS += -T $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/gnu-elf.ld +endif + +ASMEXT = .S +OBJEXT = .o +LIBEXT = .a +EXEEXT = + +ifneq ($(CROSSDEV),arm-nuttx-elf-) + LDFLAGS += -nostartfiles -nodefaultlibs +endif +ifeq ($(CONFIG_DEBUG_SYMBOLS),y) + LDFLAGS += -g +endif + +HOSTCC = gcc +HOSTINCLUDES = -I. +HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -g -pipe +HOSTLDFLAGS = +ifeq ($(CONFIG_HOST_WINDOWS),y) + HOSTEXEEXT = .exe +else + HOSTEXEEXT = +endif + +ifeq ($(WINTOOL),y) + # Windows-native host tools + DIRLINK = $(TOPDIR)$(DELIM)tools$(DELIM)copydir.sh + DIRUNLINK = $(TOPDIR)$(DELIM)tools$(DELIM)unlink.sh + MKDEP = $(TOPDIR)$(DELIM)tools$(DELIM)mkwindeps.sh +else + # Linux/Cygwin-native host tools + MKDEP = $(TOPDIR)$(DELIM)tools$(DELIM)mkdeps$(HOSTEXEEXT) +endif diff --git a/configs/sabre-6quad/smp/defconfig b/configs/sabre-6quad/smp/defconfig new file mode 100644 index 00000000000..2cd36db1274 --- /dev/null +++ b/configs/sabre-6quad/smp/defconfig @@ -0,0 +1,883 @@ +# +# Automatically generated file; DO NOT EDIT. +# Nuttx/ Configuration +# + +# +# Build Setup +# +CONFIG_EXPERIMENTAL=y +# CONFIG_DEFAULT_SMALL is not set +# CONFIG_HOST_LINUX is not set +# CONFIG_HOST_OSX is not set +CONFIG_HOST_WINDOWS=y +# CONFIG_HOST_OTHER is not set +# CONFIG_WINDOWS_NATIVE is not set +CONFIG_WINDOWS_CYGWIN=y +# CONFIG_WINDOWS_MSYS is not set +# CONFIG_WINDOWS_OTHER is not set + +# +# Build Configuration +# +# CONFIG_APPS_DIR="../apps" +CONFIG_BUILD_FLAT=y +# CONFIG_BUILD_2PASS is not set + +# +# Binary Output Formats +# +# CONFIG_RRLOAD_BINARY is not set +CONFIG_INTELHEX_BINARY=y +# CONFIG_MOTOROLA_SREC is not set +CONFIG_RAW_BINARY=y +# CONFIG_UBOOT_UIMAGE is not set + +# +# Customize Header Files +# +# CONFIG_ARCH_STDINT_H is not set +# CONFIG_ARCH_STDBOOL_H is not set +# CONFIG_ARCH_MATH_H is not set +# CONFIG_ARCH_FLOAT_H is not set +# CONFIG_ARCH_STDARG_H is not set +# CONFIG_ARCH_DEBUG_H is not set + +# +# Debug Options +# +# CONFIG_DEBUG is not set +# CONFIG_ARCH_HAVE_HEAPCHECK is not set +CONFIG_ARCH_HAVE_STACKCHECK=y +# CONFIG_STACK_COLORATION is not set +# CONFIG_DEBUG_SYMBOLS is not set +CONFIG_ARCH_HAVE_CUSTOMOPT=y +# CONFIG_DEBUG_NOOPT is not set +# CONFIG_DEBUG_CUSTOMOPT is not set +CONFIG_DEBUG_FULLOPT=y + +# +# System Type +# +CONFIG_ARCH_ARM=y +# CONFIG_ARCH_AVR is not set +# CONFIG_ARCH_HC is not set +# CONFIG_ARCH_MIPS is not set +# CONFIG_ARCH_RGMP is not set +# CONFIG_ARCH_SH is not set +# CONFIG_ARCH_SIM is not set +# CONFIG_ARCH_X86 is not set +# CONFIG_ARCH_Z16 is not set +# CONFIG_ARCH_Z80 is not set +CONFIG_ARCH="arm" + +# +# ARM Options +# +# CONFIG_ARCH_CHIP_A1X is not set +# CONFIG_ARCH_CHIP_C5471 is not set +# CONFIG_ARCH_CHIP_CALYPSO is not set +# CONFIG_ARCH_CHIP_DM320 is not set +# CONFIG_ARCH_CHIP_EFM32 is not set +# CONFIG_ARCH_CHIP_IMX1 is not set +CONFIG_ARCH_CHIP_IMX6=y +# CONFIG_ARCH_CHIP_KINETIS is not set +# CONFIG_ARCH_CHIP_KL is not set +# CONFIG_ARCH_CHIP_LM is not set +# CONFIG_ARCH_CHIP_TIVA is not set +# CONFIG_ARCH_CHIP_LPC11XX is not set +# CONFIG_ARCH_CHIP_LPC17XX is not set +# CONFIG_ARCH_CHIP_LPC214X is not set +# CONFIG_ARCH_CHIP_LPC2378 is not set +# CONFIG_ARCH_CHIP_LPC31XX is not set +# CONFIG_ARCH_CHIP_LPC43XX is not set +# CONFIG_ARCH_CHIP_NUC1XX is not set +# CONFIG_ARCH_CHIP_SAMA5 is not set +# CONFIG_ARCH_CHIP_SAMD is not set +# CONFIG_ARCH_CHIP_SAML is not set +# CONFIG_ARCH_CHIP_SAM34 is not set +# CONFIG_ARCH_CHIP_SAMV7 is not set +# CONFIG_ARCH_CHIP_STM32 is not set +# CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set +# CONFIG_ARCH_CHIP_STR71X is not set +# CONFIG_ARCH_CHIP_TMS570 is not set +# CONFIG_ARCH_CHIP_MOXART is not set +# CONFIG_ARCH_ARM7TDMI is not set +# CONFIG_ARCH_ARM926EJS is not set +# CONFIG_ARCH_ARM920T is not set +# CONFIG_ARCH_CORTEXM0 is not set +# CONFIG_ARCH_CORTEXM3 is not set +# CONFIG_ARCH_CORTEXM4 is not set +# CONFIG_ARCH_CORTEXM7 is not set +# CONFIG_ARCH_CORTEXA5 is not set +# CONFIG_ARCH_CORTEXA8 is not set +CONFIG_ARCH_CORTEXA9=y +# CONFIG_ARCH_CORTEXR4 is not set +# CONFIG_ARCH_CORTEXR4F is not set +# CONFIG_ARCH_CORTEXR5 is not set +# CONFIG_ARCH_CORTEX5F is not set +# CONFIG_ARCH_CORTEXR7 is not set +# CONFIG_ARCH_CORTEXR7F is not set +CONFIG_ARCH_FAMILY="armv7-a" +CONFIG_ARCH_CHIP="imx6" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +# CONFIG_ARM_TOOLCHAIN_GNU is not set +CONFIG_ARCH_HAVE_FPU=y +# CONFIG_ARCH_HAVE_DPFPU is not set +CONFIG_ARCH_FPU=y +CONFIG_ARCH_HAVE_TRUSTZONE=y +CONFIG_ARCH_TRUSTZONE_SECURE=y +# CONFIG_ARCH_TRUSTZONE_NONSECURE is not set +# CONFIG_ARCH_TRUSTZONE_BOTH is not set +# CONFIG_ARM_HAVE_MPU_UNIFIED is not set +CONFIG_ARCH_HAVE_LOWVECTORS=y +CONFIG_ARCH_LOWVECTORS=y +# CONFIG_ARCH_ROMPGTABLE is not set + +# +# ARMv7-A Configuration Options +# +CONFIG_ARMV7A_HAVE_GICv2=y +CONFIG_ARMV7A_HAVE_GTM=y +CONFIG_ARMV7A_HAVE_PTM=y +CONFIG_ARMV7A_HAVE_L2CC=y +CONFIG_ARMV7A_HAVE_L2CC_PL310=y + +# +# L2 Cache Configuration +# +# CONFIG_ARMV7A_L2CC_PL310 is not set +# CONFIG_ARMV7A_TOOLCHAIN_BUILDROOT is not set +# CONFIG_ARMV7A_TOOLCHAIN_CODESOURCERYW is not set +# CONFIG_ARMV7A_TOOLCHAIN_DEVKITARM is not set +# CONFIG_ARMV7A_TOOLCHAIN_GNU_EABIL is not set +CONFIG_ARMV7A_TOOLCHAIN_GNU_EABIW=y +# CONFIG_ARMV7A_TOOLCHAIN_GNU_OABI is not set +# CONFIG_ARMV7A_DECODEFIQ is not set + +# +# iMX.6 Chip Selection +# +# CONFIG_ARCH_CHIP_IMX6_6SOLOLITE is not set +# CONFIG_ARCH_CHIP_IMX6_6SOLO is not set +# CONFIG_ARCH_CHIP_IMX6_6DUALLITE is not set +# CONFIG_ARCH_CHIP_IMX6_6DUAL is not set +CONFIG_ARCH_CHIP_IMX6_6QUAD=y +# CONFIG_IMX6_HAVE_HDCP is not set + +# +# iMX.6 Peripheral Selection +# +CONFIG_IMX6_UART1=y +# CONFIG_IMX6_UART2 is not set +# CONFIG_IMX6_UART3 is not set +# CONFIG_IMX6_UART4 is not set +# CONFIG_IMX6_UART5 is not set +# CONFIG_IMX6_SPI1 is not set +# CONFIG_IMX6_SPI2 is not set +CONFIG_IMX_DDR_SIZE=1073741824 +# CONFIG_IMX6_BOOT_OCRAM is not set +CONFIG_IMX6_BOOT_SDRAM=y +# CONFIG_IMX6_BOOT_NOR is not set +# CONFIG_IMX6_BOOT_SRAM is not set + +# +# Architecture Options +# +# CONFIG_ARCH_NOINTC is not set +# CONFIG_ARCH_VECNOTIRQ is not set +# CONFIG_ARCH_DMA is not set +# CONFIG_ARCH_HAVE_IRQPRIO is not set +# CONFIG_ARCH_L2CACHE is not set +# CONFIG_ARCH_HAVE_COHERENT_DCACHE is not set +CONFIG_ARCH_HAVE_ADDRENV=y +CONFIG_ARCH_NEED_ADDRENV_MAPPING=y +CONFIG_ARCH_HAVE_MULTICPU=y +CONFIG_ARCH_HAVE_VFORK=y +CONFIG_ARCH_HAVE_MMU=y +# CONFIG_ARCH_HAVE_MPU is not set +# CONFIG_ARCH_NAND_HWECC is not set +# CONFIG_ARCH_HAVE_EXTCLK is not set +# CONFIG_ARCH_HAVE_POWEROFF is not set +# CONFIG_ARCH_HAVE_RESET is not set +CONFIG_ARCH_USE_MMU=y +# CONFIG_ARCH_ADDRENV is not set +# CONFIG_PAGING is not set +CONFIG_ARCH_STACKDUMP=y +# CONFIG_ENDIAN_BIG is not set +# CONFIG_ARCH_IDLE_CUSTOM is not set +# CONFIG_ARCH_HAVE_RAMFUNCS is not set +# CONFIG_ARCH_HAVE_RAMVECTORS is not set + +# +# Board Settings +# +CONFIG_BOARD_LOOPSPERMSEC=99369 +# CONFIG_ARCH_CALIBRATION is not set + +# +# Interrupt options +# +CONFIG_ARCH_HAVE_INTERRUPTSTACK=y +CONFIG_ARCH_INTERRUPTSTACK=2048 +# CONFIG_ARCH_HAVE_HIPRI_INTERRUPT is not set + +# +# Boot options +# +# CONFIG_BOOT_RUNFROMEXTSRAM is not set +# CONFIG_BOOT_RUNFROMFLASH is not set +# CONFIG_BOOT_RUNFROMISRAM is not set +CONFIG_BOOT_RUNFROMSDRAM=y +# CONFIG_BOOT_COPYTORAM is not set + +# +# Boot Memory Configuration +# +CONFIG_RAM_START=0x10000000 +CONFIG_RAM_VSTART=0x10000000 +CONFIG_RAM_SIZE=1073741824 +CONFIG_ARCH_HAVE_SDRAM=y + +# +# Board Selection +# +CONFIG_ARCH_BOARD_SABRE_6QUAD=y +# CONFIG_ARCH_BOARD_CUSTOM is not set +CONFIG_ARCH_BOARD="sabre-6quad" + +# +# Common Board Options +# +CONFIG_ARCH_HAVE_LEDS=y +CONFIG_ARCH_LEDS=y +CONFIG_ARCH_HAVE_BUTTONS=y +CONFIG_ARCH_BUTTONS=y +CONFIG_ARCH_HAVE_IRQBUTTONS=y +CONFIG_ARCH_IRQBUTTONS=y +CONFIG_NSH_MMCSDMINOR=0 + +# +# Board-Specific Options +# +CONFIG_LIB_BOARDCTL=y +# CONFIG_BOARDCTL_UNIQUEID is not set +# CONFIG_BOARDCTL_TSCTEST is not set +# CONFIG_BOARDCTL_ADCTEST is not set +# CONFIG_BOARDCTL_PWMTEST is not set +# CONFIG_BOARDCTL_GRAPHICS is not set +# CONFIG_BOARDCTL_IOCTL is not set + +# +# RTOS Features +# +CONFIG_DISABLE_OS_API=y +# CONFIG_DISABLE_POSIX_TIMERS is not set +# CONFIG_DISABLE_PTHREAD is not set +# CONFIG_DISABLE_SIGNALS is not set +# CONFIG_DISABLE_MQUEUE is not set +# CONFIG_DISABLE_ENVIRON is not set + +# +# Clocks and Timers +# +CONFIG_USEC_PER_TICK=10000 +# CONFIG_SYSTEM_TIME64 is not set +# CONFIG_CLOCK_MONOTONIC is not set +# CONFIG_JULIAN_TIME is not set +CONFIG_START_YEAR=2016 +CONFIG_START_MONTH=3 +CONFIG_START_DAY=1 +CONFIG_MAX_WDOGPARMS=2 +CONFIG_PREALLOC_WDOGS=32 +CONFIG_WDOG_INTRESERVE=4 +CONFIG_PREALLOC_TIMERS=4 + +# +# Tasks and Scheduling +# +CONFIG_SPINLOCK=y +CONFIG_SMP=y +CONFIG_SMP_NCPUS=4 +CONFIG_SMP_IDLETHREAD_STACKSIZE=2048 +# CONFIG_INIT_NONE is not set +CONFIG_INIT_ENTRYPOINT=y +# CONFIG_INIT_FILEPATH is not set +CONFIG_USER_ENTRYPOINT="nsh_main" +CONFIG_RR_INTERVAL=200 +# CONFIG_SCHED_SPORADIC is not set +CONFIG_TASK_NAME_SIZE=31 +CONFIG_MAX_TASKS=16 +# CONFIG_SCHED_HAVE_PARENT is not set +CONFIG_SCHED_WAITPID=y + +# +# Pthread Options +# +# CONFIG_MUTEX_TYPES is not set +CONFIG_NPTHREAD_KEYS=4 + +# +# Performance Monitoring +# +# CONFIG_SCHED_CPULOAD is not set +# CONFIG_SCHED_INSTRUMENTATION is not set + +# +# Files and I/O +# +CONFIG_DEV_CONSOLE=y +# CONFIG_FDCLONE_DISABLE is not set +# CONFIG_FDCLONE_STDIO is not set +# CONFIG_SDCLONE_DISABLE is not set +CONFIG_NFILE_DESCRIPTORS=8 +CONFIG_NFILE_STREAMS=8 +CONFIG_NAME_MAX=32 +# CONFIG_PRIORITY_INHERITANCE is not set + +# +# RTOS hooks +# +# CONFIG_BOARD_INITIALIZE is not set +# CONFIG_SCHED_STARTHOOK is not set +# CONFIG_SCHED_ATEXIT is not set +# CONFIG_SCHED_ONEXIT is not set +# CONFIG_SIG_EVTHREAD is not set + +# +# Signal Numbers +# +CONFIG_SIG_SIGUSR1=1 +CONFIG_SIG_SIGUSR2=2 +CONFIG_SIG_SIGALARM=3 +CONFIG_SIG_SIGCONDTIMEDOUT=16 +CONFIG_SIG_SIGWORK=17 + +# +# POSIX Message Queue Options +# +CONFIG_PREALLOC_MQ_MSGS=4 +CONFIG_MQ_MAXMSGSIZE=32 +# CONFIG_MODULE is not set + +# +# Work queue support +# +CONFIG_SCHED_WORKQUEUE=y +CONFIG_SCHED_HPWORK=y +CONFIG_SCHED_HPWORKPRIORITY=192 +CONFIG_SCHED_HPWORKPERIOD=50000 +CONFIG_SCHED_HPWORKSTACKSIZE=2048 +# CONFIG_SCHED_LPWORK is not set + +# +# Stack and heap information +# +CONFIG_IDLETHREAD_STACKSIZE=1024 +CONFIG_USERMAIN_STACKSIZE=2048 +CONFIG_PTHREAD_STACK_MIN=256 +CONFIG_PTHREAD_STACK_DEFAULT=2048 +# CONFIG_LIB_SYSCALL is not set + +# +# Device Drivers +# +# CONFIG_DISABLE_POLL is not set +CONFIG_DEV_NULL=y +CONFIG_DEV_ZERO=y +# CONFIG_DEV_LOOP is not set + +# +# Buffering +# +# CONFIG_DRVR_WRITEBUFFER is not set +# CONFIG_DRVR_READAHEAD is not set +# CONFIG_RAMDISK is not set +# CONFIG_CAN is not set +# CONFIG_ARCH_HAVE_PWM_PULSECOUNT is not set +# CONFIG_ARCH_HAVE_PWM_MULTICHAN is not set +# CONFIG_PWM is not set +# CONFIG_ARCH_HAVE_I2CRESET is not set +# CONFIG_I2C is not set +# CONFIG_SPI is not set +# CONFIG_I2S is not set + +# +# Timer Driver Support +# +# CONFIG_TIMER is not set +# CONFIG_RTC is not set +# CONFIG_WATCHDOG is not set +# CONFIG_ANALOG is not set +# CONFIG_AUDIO_DEVICES is not set +# CONFIG_VIDEO_DEVICES is not set +# CONFIG_BCH is not set +# CONFIG_INPUT is not set +# CONFIG_IOEXPANDER is not set +# CONFIG_LCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_MMCSD is not set +# CONFIG_MODEM is not set +# CONFIG_MTD is not set +# CONFIG_EEPROM is not set +# CONFIG_PIPES is not set +# CONFIG_PM is not set +# CONFIG_POWER is not set +# CONFIG_SENSORS is not set +# CONFIG_SERCOMM_CONSOLE is not set +CONFIG_SERIAL=y +# CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_16550_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +CONFIG_UART1_SERIALDRIVER=y +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set + +# +# USART Configuration +# +CONFIG_MCU_SERIAL=y +CONFIG_STANDARD_SERIAL=y +CONFIG_SERIAL_NPOLLWAITERS=2 +# CONFIG_SERIAL_IFLOWCONTROL is not set +# CONFIG_SERIAL_OFLOWCONTROL is not set +# CONFIG_SERIAL_DMA is not set +# CONFIG_ARCH_HAVE_SERIAL_TERMIOS is not set +CONFIG_UART1_SERIAL_CONSOLE=y +# CONFIG_OTHER_SERIAL_CONSOLE is not set +# CONFIG_NO_SERIAL_CONSOLE is not set + +# +# UART1 Configuration +# +CONFIG_UART1_RXBUFSIZE=256 +CONFIG_UART1_TXBUFSIZE=256 +CONFIG_UART1_BAUD=115200 +CONFIG_UART1_BITS=8 +CONFIG_UART1_PARITY=0 +CONFIG_UART1_2STOP=0 +# CONFIG_UART1_IFLOWCONTROL is not set +# CONFIG_UART1_OFLOWCONTROL is not set +# CONFIG_UART1_DMA is not set +# CONFIG_USBDEV is not set +# CONFIG_USBHOST is not set +# CONFIG_DRIVERS_WIRELESS is not set + +# +# System Logging Device Options +# + +# +# System Logging +# +CONFIG_RAMLOG=y +CONFIG_RAMLOG_SYSLOG=y +# CONFIG_RAMLOG_CONSOLE is not set +CONFIG_RAMLOG_BUFSIZE=16384 +# CONFIG_RAMLOG_CRLF is not set +CONFIG_RAMLOG_NONBLOCKING=y +CONFIG_RAMLOG_NPOLLWAITERS=4 +# CONFIG_SYSLOG_CONSOLE is not set + +# +# Networking Support +# +# CONFIG_ARCH_HAVE_NET is not set +# CONFIG_ARCH_HAVE_PHY is not set +# CONFIG_NET is not set + +# +# Crypto API +# +# CONFIG_CRYPTO is not set + +# +# File Systems +# + +# +# File system configuration +# +# CONFIG_DISABLE_MOUNTPOINT is not set +# CONFIG_FS_AUTOMOUNTER is not set +# CONFIG_DISABLE_PSEUDOFS_OPERATIONS is not set +CONFIG_FS_READABLE=y +# CONFIG_FS_WRITABLE is not set +# CONFIG_FS_NAMED_SEMAPHORES is not set +CONFIG_FS_MQUEUE_MPATH="/var/mqueue" +# CONFIG_FS_RAMMAP is not set +# CONFIG_FS_FAT is not set +# CONFIG_FS_NXFFS is not set +# CONFIG_FS_ROMFS is not set +# CONFIG_FS_TMPFS is not set +# CONFIG_FS_SMARTFS is not set +# CONFIG_FS_BINFS is not set +CONFIG_FS_PROCFS=y +# CONFIG_FS_PROCFS_REGISTER is not set + +# +# Exclude individual procfs entries +# +# CONFIG_FS_PROCFS_EXCLUDE_PROCESS is not set +# CONFIG_FS_PROCFS_EXCLUDE_UPTIME is not set +# CONFIG_FS_PROCFS_EXCLUDE_MOUNTS is not set +# CONFIG_FS_UNIONFS is not set + +# +# System Logging +# +CONFIG_SYSLOG=y +# CONFIG_SYSLOG_TIMESTAMP is not set +# CONFIG_SYSLOG_CHAR is not set + +# +# Graphics Support +# +# CONFIG_NX is not set + +# +# Memory Management +# +# CONFIG_MM_SMALL is not set +CONFIG_MM_REGIONS=1 +# CONFIG_ARCH_HAVE_HEAP2 is not set +# CONFIG_GRAN is not set +# CONFIG_MM_PGALLOC is not set + +# +# Audio Support +# +# CONFIG_AUDIO is not set + +# +# Wireless Support +# +# CONFIG_WIRELESS is not set + +# +# Binary Loader +# +# CONFIG_BINFMT_DISABLE is not set +# CONFIG_BINFMT_EXEPATH is not set +# CONFIG_NXFLAT is not set +# CONFIG_ELF is not set +CONFIG_BUILTIN=y +# CONFIG_PIC is not set +CONFIG_SYMTAB_ORDEREDBYNAME=y + +# +# Library Routines +# + +# +# Standard C Library Options +# +CONFIG_STDIO_BUFFER_SIZE=64 +CONFIG_STDIO_LINEBUFFER=y +CONFIG_NUNGET_CHARS=2 +CONFIG_LIB_HOMEDIR="/" +# CONFIG_LIBM is not set +# CONFIG_NOPRINTF_FIELDWIDTH is not set +# CONFIG_LIBC_FLOATINGPOINT is not set +CONFIG_LIBC_LONG_LONG=y +# CONFIG_LIBC_IOCTL_VARIADIC is not set +CONFIG_LIB_RAND_ORDER=1 +# CONFIG_EOL_IS_CR is not set +# CONFIG_EOL_IS_LF is not set +# CONFIG_EOL_IS_BOTH_CRLF is not set +CONFIG_EOL_IS_EITHER_CRLF=y +# CONFIG_LIBC_EXECFUNCS is not set +CONFIG_POSIX_SPAWN_PROXY_STACKSIZE=1024 +CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=2048 +# CONFIG_LIBC_STRERROR is not set +# CONFIG_LIBC_PERROR_STDOUT is not set +CONFIG_ARCH_LOWPUTC=y +# CONFIG_LIBC_LOCALTIME is not set +# CONFIG_TIME_EXTENDED is not set +CONFIG_LIB_SENDFILE_BUFSIZE=512 +# CONFIG_ARCH_ROMGETC is not set +# CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set +# CONFIG_LIBC_NETDB is not set +# CONFIG_NETDB_HOSTFILE is not set + +# +# Non-standard Library Support +# +# CONFIG_LIB_KBDCODEC is not set +# CONFIG_LIB_SLCDCODEC is not set + +# +# Basic CXX Support +# +# CONFIG_C99_BOOL8 is not set +CONFIG_HAVE_CXX=y +CONFIG_HAVE_CXXINITIALIZE=y +# CONFIG_CXX_NEWLONG is not set + +# +# uClibc++ Standard C++ Library +# +# CONFIG_UCLIBCXX is not set + +# +# Application Configuration +# + +# +# Built-In Applications +# +CONFIG_BUILTIN_PROXY_STACKSIZE=1024 + +# +# CAN Utilities +# + +# +# Examples +# +# CONFIG_EXAMPLES_BUTTONS is not set +# CONFIG_EXAMPLES_CHAT is not set +# CONFIG_EXAMPLES_CONFIGDATA is not set +# CONFIG_EXAMPLES_CPUHOG is not set +# CONFIG_EXAMPLES_CXXTEST is not set +# CONFIG_EXAMPLES_DHCPD is not set +# CONFIG_EXAMPLES_ELF is not set +# CONFIG_EXAMPLES_FTPC is not set +# CONFIG_EXAMPLES_FTPD is not set +# CONFIG_EXAMPLES_HELLO is not set +# CONFIG_EXAMPLES_HELLOXX is not set +# CONFIG_EXAMPLES_JSON is not set +# CONFIG_EXAMPLES_HIDKBD is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set +# CONFIG_EXAMPLES_IGMP is not set +# CONFIG_EXAMPLES_MEDIA is not set +# CONFIG_EXAMPLES_MM is not set +# CONFIG_EXAMPLES_MODBUS is not set +# CONFIG_EXAMPLES_MOUNT is not set +# CONFIG_EXAMPLES_NRF24L01TERM is not set +CONFIG_EXAMPLES_NSH=y +CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y +# CONFIG_EXAMPLES_NULL is not set +# CONFIG_EXAMPLES_NX is not set +# CONFIG_EXAMPLES_NXTERM is not set +# CONFIG_EXAMPLES_NXFFS is not set +# CONFIG_EXAMPLES_NXHELLO is not set +# CONFIG_EXAMPLES_NXIMAGE is not set +# CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTEXT is not set +# CONFIG_EXAMPLES_OSTEST is not set +# CONFIG_EXAMPLES_PCA9635 is not set +# CONFIG_EXAMPLES_PIPE is not set +# CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_POSIXSPAWN is not set +# CONFIG_EXAMPLES_RGBLED is not set +# CONFIG_EXAMPLES_RGMP is not set +# CONFIG_EXAMPLES_SENDMAIL is not set +# CONFIG_EXAMPLES_SERIALBLASTER is not set +# CONFIG_EXAMPLES_SERIALRX is not set +# CONFIG_EXAMPLES_SERLOOP is not set +# CONFIG_EXAMPLES_SLCD is not set +# CONFIG_EXAMPLES_SMART_TEST is not set +# CONFIG_EXAMPLES_SMART is not set +# CONFIG_EXAMPLES_SMP is not set +# CONFIG_EXAMPLES_TCPECHO is not set +# CONFIG_EXAMPLES_TELNETD is not set +# CONFIG_EXAMPLES_TIFF is not set +# CONFIG_EXAMPLES_TOUCHSCREEN is not set +# CONFIG_EXAMPLES_WEBSERVER is not set +# CONFIG_EXAMPLES_USBSERIAL is not set +# CONFIG_EXAMPLES_USBTERM is not set +# CONFIG_EXAMPLES_WATCHDOG is not set + +# +# File System Utilities +# +# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_FSUTILS_PASSWD is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set + +# +# Graphics Support +# +# CONFIG_TIFF is not set +# CONFIG_GRAPHICS_TRAVELER is not set + +# +# Interpreters +# +# CONFIG_INTERPRETERS_BAS is not set +# CONFIG_INTERPRETERS_FICL is not set +# CONFIG_INTERPRETERS_PCODE is not set +# CONFIG_INTERPRETERS_MICROPYTHON is not set + +# +# FreeModBus +# +# CONFIG_MODBUS is not set + +# +# Network Utilities +# +# CONFIG_NETUTILS_CHAT is not set +# CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set +# CONFIG_NETUTILS_FTPC is not set +# CONFIG_NETUTILS_JSON is not set +# CONFIG_NETUTILS_SMTP is not set + +# +# NSH Library +# +CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set + +# +# Command Line Configuration +# +CONFIG_NSH_READLINE=y +# CONFIG_NSH_CLE is not set +CONFIG_NSH_LINELEN=80 +# CONFIG_NSH_DISABLE_SEMICOLON is not set +CONFIG_NSH_CMDPARMS=y +CONFIG_NSH_MAXARGUMENTS=6 +CONFIG_NSH_ARGCAT=y +CONFIG_NSH_NESTDEPTH=3 +# CONFIG_NSH_DISABLEBG is not set +CONFIG_NSH_BUILTIN_APPS=y + +# +# Disable Individual commands +# +# CONFIG_NSH_DISABLE_ADDROUTE is not set +# CONFIG_NSH_DISABLE_BASENAME is not set +# CONFIG_NSH_DISABLE_CAT is not set +# CONFIG_NSH_DISABLE_CD is not set +# CONFIG_NSH_DISABLE_CP is not set +# CONFIG_NSH_DISABLE_CMP is not set +# CONFIG_NSH_DISABLE_DATE is not set +# CONFIG_NSH_DISABLE_DD is not set +# CONFIG_NSH_DISABLE_DF is not set +# CONFIG_NSH_DISABLE_DELROUTE is not set +# CONFIG_NSH_DISABLE_DIRNAME is not set +# CONFIG_NSH_DISABLE_ECHO is not set +# CONFIG_NSH_DISABLE_EXEC is not set +# CONFIG_NSH_DISABLE_EXIT is not set +# CONFIG_NSH_DISABLE_FREE is not set +# CONFIG_NSH_DISABLE_GET is not set +# CONFIG_NSH_DISABLE_HELP is not set +# CONFIG_NSH_DISABLE_HEXDUMP is not set +# CONFIG_NSH_DISABLE_IFCONFIG is not set +# CONFIG_NSH_DISABLE_IFUPDOWN is not set +# CONFIG_NSH_DISABLE_KILL is not set +# CONFIG_NSH_DISABLE_LOSETUP is not set +CONFIG_NSH_DISABLE_LOSMART=y +# CONFIG_NSH_DISABLE_LS is not set +# CONFIG_NSH_DISABLE_MB is not set +# CONFIG_NSH_DISABLE_MKDIR is not set +# CONFIG_NSH_DISABLE_MKFIFO is not set +# CONFIG_NSH_DISABLE_MKRD is not set +# CONFIG_NSH_DISABLE_MH is not set +# CONFIG_NSH_DISABLE_MOUNT is not set +# CONFIG_NSH_DISABLE_MV is not set +# CONFIG_NSH_DISABLE_MW is not set +# CONFIG_NSH_DISABLE_PS is not set +# CONFIG_NSH_DISABLE_PUT is not set +# CONFIG_NSH_DISABLE_PWD is not set +# CONFIG_NSH_DISABLE_RM is not set +# CONFIG_NSH_DISABLE_RMDIR is not set +# CONFIG_NSH_DISABLE_SET is not set +# CONFIG_NSH_DISABLE_SH is not set +# CONFIG_NSH_DISABLE_SLEEP is not set +# CONFIG_NSH_DISABLE_TIME is not set +# CONFIG_NSH_DISABLE_TEST is not set +# CONFIG_NSH_DISABLE_UMOUNT is not set +# CONFIG_NSH_DISABLE_UNAME is not set +# CONFIG_NSH_DISABLE_UNSET is not set +# CONFIG_NSH_DISABLE_USLEEP is not set +# CONFIG_NSH_DISABLE_WGET is not set +# CONFIG_NSH_DISABLE_XD is not set + +# +# Configure Command Options +# +# CONFIG_NSH_CMDOPT_DF_H is not set +CONFIG_NSH_CODECS_BUFSIZE=128 +# CONFIG_NSH_CMDOPT_HEXDUMP is not set +CONFIG_NSH_PROC_MOUNTPOINT="/proc" +CONFIG_NSH_FILEIOSIZE=512 + +# +# Scripting Support +# +# CONFIG_NSH_DISABLESCRIPT is not set +# CONFIG_NSH_DISABLE_ITEF is not set +# CONFIG_NSH_DISABLE_LOOPS is not set + +# +# Console Configuration +# +CONFIG_NSH_CONSOLE=y +# CONFIG_NSH_ALTCONDEV is not set +CONFIG_NSH_ARCHINIT=y +# CONFIG_NSH_LOGIN is not set +# CONFIG_NSH_CONSOLE_LOGIN is not set + +# +# NxWidgets/NxWM +# + +# +# Platform-specific Support +# +# CONFIG_PLATFORM_CONFIGDATA is not set + +# +# System Libraries and NSH Add-Ons +# +# CONFIG_SYSTEM_FREE is not set +# CONFIG_SYSTEM_CLE is not set +# CONFIG_SYSTEM_CUTERM is not set +# CONFIG_SYSTEM_INSTALL is not set +# CONFIG_SYSTEM_HEX2BIN is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_RAMTEST is not set +CONFIG_READLINE_HAVE_EXTMATCH=y +CONFIG_SYSTEM_READLINE=y +CONFIG_READLINE_ECHO=y +# CONFIG_READLINE_TABCOMPLETION is not set +# CONFIG_READLINE_CMD_HISTORY is not set +# CONFIG_SYSTEM_SUDOKU is not set +# CONFIG_SYSTEM_VI is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set +# CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/sabre-6quad/smp/setenv.sh b/configs/sabre-6quad/smp/setenv.sh new file mode 100644 index 00000000000..1d0eacadd57 --- /dev/null +++ b/configs/sabre-6quad/smp/setenv.sh @@ -0,0 +1,77 @@ +#!/bin/bash +# configs/sabre-6quad/smp/setenv.sh +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# 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 [ "$_" = "$0" ] ; then + echo "You must source this script, not run it!" 1>&2 + exit 1 +fi + +WD=`pwd` +if [ ! -x "setenv.sh" ]; then + echo "This script must be executed from the top-level NuttX build directory" + exit 1 +fi + +if [ -z "${PATH_ORIG}" ]; then + export PATH_ORIG="${PATH}" +fi + +# This is the Cygwin path to the location where I installed the Atmel GCC +# toolchain under Windows. You will also have to edit this if you install +# this toolchain in any other location +#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/Atmel/Atmel Toolchain/ARM GCC/Native/4.7.3.99/arm-gnu-toolchain/bin" + +# This is the Cygwin path to the location where I installed the CodeSourcery +# toolchain under windows. You will also have to edit this if you install +# the CodeSourcery toolchain in any other location +#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin" +#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin" +# export TOOLCHAIN_BIN="/cygdrive/c/Users/MyName/MentorGraphics/Sourcery_CodeBench_Lite_for_ARM_EABI/bin" + +# This is the location where I installed the ARM "GNU Tools for ARM Embedded Processors" +# You can this free toolchain here https://launchpad.net/gcc-arm-embedded +export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/GNU Tools ARM Embedded/4.9 2015q2/bin" + +# This is the path to the location where I installed the devkitARM toolchain +# You can get this free toolchain from http://devkitpro.org/ or http://sourceforge.net/projects/devkitpro/ +#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/devkitARM/bin" + +# This is the Cygwin path to the location where I build the buildroot +# toolchain. +# export TOOLCHAIN_BIN="${WD}/../buildroot/build_arm_nofpu/staging_dir/bin" + +# Add the path to the toolchain to the PATH varialble +export PATH="${TOOLCHAIN_BIN}:/sbin:/usr/sbin:${PATH_ORIG}" + +echo "PATH : ${PATH}" diff --git a/configs/sabre-6quad/src/imx_appinit.c b/configs/sabre-6quad/src/imx_appinit.c index a1022c6cf13..7b7f66ead61 100644 --- a/configs/sabre-6quad/src/imx_appinit.c +++ b/configs/sabre-6quad/src/imx_appinit.c @@ -55,11 +55,28 @@ * Name: board_app_initialize * * Description: - * Perform architecture specific initialization + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface using the command BOARDIOC_INIT. + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #ifndef CONFIG_BOARD_INITIALIZE /* Perform board initialization */ diff --git a/configs/sabre-6quad/src/imx_autoleds.c b/configs/sabre-6quad/src/imx_autoleds.c index ce31d0a93ec..10a3a556d96 100644 --- a/configs/sabre-6quad/src/imx_autoleds.c +++ b/configs/sabre-6quad/src/imx_autoleds.c @@ -117,7 +117,7 @@ void board_autoled_on(int led) { if (led == 1 || led == 3) { - imx_gpio_write(GPIO_LED, false); /* Low illuminates */ + imx_gpio_write(GPIO_LED, true); /* High illuminates */ } } @@ -129,7 +129,7 @@ void board_autoled_off(int led) { if (led == 3) { - imx_gpio_write(GPIO_LED, true); /* High extinguishes */ + imx_gpio_write(GPIO_LED, false); /* Low extinguishes */ } } diff --git a/configs/sabre-6quad/src/imx_boardinit.c b/configs/sabre-6quad/src/imx_boardinit.c index e287ed2c867..f67592caf87 100644 --- a/configs/sabre-6quad/src/imx_boardinit.c +++ b/configs/sabre-6quad/src/imx_boardinit.c @@ -41,6 +41,7 @@ #include +#include #include #include "chip.h" @@ -80,6 +81,11 @@ void imx_board_initialize(void) { +#ifdef CONFIG_ARCH_LEDS + /* Configure on-board LEDs if LED support has been selected. */ + + board_autoled_initialize(); +#endif } /**************************************************************************** diff --git a/configs/sabre-6quad/src/sabre-6quad.h b/configs/sabre-6quad/src/sabre-6quad.h index 5ae480d637e..b70589dbe33 100644 --- a/configs/sabre-6quad/src/sabre-6quad.h +++ b/configs/sabre-6quad/src/sabre-6quad.h @@ -57,12 +57,12 @@ * * A single LED is available driven GPIO1_IO02. On the schematic this is * USR_DEF_RED_LED signal to pin T1 (GPIO_2). This signal is shared with KEY_ROW6 - * (ALT2). A low value illuminates the LED. + * (ALT2). A high value illuminates the LED. */ #define IOMUX_LED (IOMUX_PULL_NONE | IOMUX_CMOS_OUTPUT | IOMUX_DRIVE_40OHM | \ IOMUX_SPEED_MEDIUM | IOMUX_SLEW_SLOW) -#define GPIO_LED (GPIO_OUTPUT | GPIO_OUTPUT_ONE | GPIO_PORT1 | GPIO_PIN2 | \ +#define GPIO_LED (GPIO_OUTPUT | GPIO_OUTPUT_ZERO | GPIO_PORT1 | GPIO_PIN2 | \ IOMUX_LED) /************************************************************************************ diff --git a/configs/sam3u-ek/README.txt b/configs/sam3u-ek/README.txt index d2e92fb08be..2a03890a2ca 100644 --- a/configs/sam3u-ek/README.txt +++ b/configs/sam3u-ek/README.txt @@ -379,10 +379,10 @@ SAM3U-EK-specific Configuration Options CONFIG_SAM34_GPIOA_IRQ CONFIG_SAM34_GPIOB_IRQ CONFIG_SAM34_GPIOC_IRQ - CONFIG_USART0_ISUART - CONFIG_USART1_ISUART - CONFIG_USART2_ISUART - CONFIG_USART3_ISUART + CONFIG_USART0_SERIALDRIVER + CONFIG_USART1_SERIALDRIVER + CONFIG_USART2_SERIALDRIVER + CONFIG_USART3_SERIALDRIVER CONFIG_SAM34_NAND - NAND memory SAM3U specific device driver settings diff --git a/configs/sam3u-ek/knsh/defconfig b/configs/sam3u-ek/knsh/defconfig index d6568a852c5..e7e5b4d898b 100644 --- a/configs/sam3u-ek/knsh/defconfig +++ b/configs/sam3u-ek/knsh/defconfig @@ -504,28 +504,28 @@ CONFIG_MMCSD_NSLOTS=1 CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/sam3u-ek/nsh/defconfig b/configs/sam3u-ek/nsh/defconfig index 57859252931..028d86b604a 100644 --- a/configs/sam3u-ek/nsh/defconfig +++ b/configs/sam3u-ek/nsh/defconfig @@ -491,28 +491,28 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/sam3u-ek/nx/defconfig b/configs/sam3u-ek/nx/defconfig index a67abe25d4e..5a1d8b24660 100644 --- a/configs/sam3u-ek/nx/defconfig +++ b/configs/sam3u-ek/nx/defconfig @@ -518,28 +518,28 @@ CONFIG_LCD_PORTRAIT=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/sam3u-ek/nxwm/defconfig b/configs/sam3u-ek/nxwm/defconfig index c8c85da0048..fb8be1e62ed 100644 --- a/configs/sam3u-ek/nxwm/defconfig +++ b/configs/sam3u-ek/nxwm/defconfig @@ -564,28 +564,28 @@ CONFIG_LCD_LANDSCAPE=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/sam3u-ek/src/sam_appinit.c b/configs/sam3u-ek/src/sam_appinit.c index 481cc8ffbc1..632d630394e 100644 --- a/configs/sam3u-ek/src/sam_appinit.c +++ b/configs/sam3u-ek/src/sam_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/sam3u-ek/src/sam_appinit.c * - * Copyright (C) 2010, 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2010, 2013, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -105,11 +105,28 @@ * Name: board_app_initialize * * Description: - * Perform architecture specific initialization + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface using the command BOARDIOC_INIT. + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #ifdef NSH_HAVE_MMCSD FAR struct sdio_dev_s *sdio; diff --git a/configs/sam4e-ek/README.txt b/configs/sam4e-ek/README.txt index 22f9ab157b6..90b979059ee 100644 --- a/configs/sam4e-ek/README.txt +++ b/configs/sam4e-ek/README.txt @@ -1189,10 +1189,10 @@ SAM4E-EK-specific Configuration Options CONFIG_SAM34_GPIOP_IRQ CONFIG_SAM34_GPIOQ_IRQ - CONFIG_USART0_ISUART - CONFIG_USART1_ISUART - CONFIG_USART2_ISUART - CONFIG_USART3_ISUART + CONFIG_USART0_SERIALDRIVER + CONFIG_USART1_SERIALDRIVER + CONFIG_USART2_SERIALDRIVER + CONFIG_USART3_SERIALDRIVER SAM3U specific device driver settings diff --git a/configs/sam4e-ek/nsh/defconfig b/configs/sam4e-ek/nsh/defconfig index 1a2c5869105..869702660df 100644 --- a/configs/sam4e-ek/nsh/defconfig +++ b/configs/sam4e-ek/nsh/defconfig @@ -618,33 +618,32 @@ CONFIG_ETH0_PHY_KSZ8051=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -CONFIG_ARCH_HAVE_USART1=y -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration # -CONFIG_USART1_ISUART=y CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set diff --git a/configs/sam4e-ek/nxwm/defconfig b/configs/sam4e-ek/nxwm/defconfig index 67b3f0cdc11..5e2ebc17c0e 100644 --- a/configs/sam4e-ek/nxwm/defconfig +++ b/configs/sam4e-ek/nxwm/defconfig @@ -681,33 +681,32 @@ CONFIG_ETH0_PHY_KSZ8051=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -CONFIG_ARCH_HAVE_USART1=y -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration # -CONFIG_USART1_ISUART=y CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set diff --git a/configs/sam4e-ek/src/sam_appinit.c b/configs/sam4e-ek/src/sam_appinit.c index 0a577dc9250..6eef6121874 100644 --- a/configs/sam4e-ek/src/sam_appinit.c +++ b/configs/sam4e-ek/src/sam_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/sam4e-ek/src/sam_appinit.c * - * Copyright (C) 2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2014, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -66,11 +66,28 @@ * Name: board_app_initialize * * Description: - * Perform architecture specific initialization + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface using the command BOARDIOC_INIT. + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #if defined(HAVE_AT25) || defined(HAVE_HSMCI) || defined(HAVE_USBMONITOR) int ret; diff --git a/configs/sam4e-ek/src/sam_boot.c b/configs/sam4e-ek/src/sam_boot.c index d75f6bebc34..ba95e746544 100644 --- a/configs/sam4e-ek/src/sam_boot.c +++ b/configs/sam4e-ek/src/sam_boot.c @@ -47,10 +47,6 @@ #include "up_arch.h" #include "sam4e-ek.h" -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ - /************************************************************************************ * Private Functions ************************************************************************************/ @@ -70,10 +66,10 @@ #ifdef CONFIG_SAM34_USART1 static inline void board_config_usart1(void) { -#if defined(CONFIG_USART1_ISUART) - (void)sam_configgpio(GPIO_RS232_ENABLE); -#else /* if defined(CONFIG_USART1_RS485) */ +#if defined(CONFIG_USART1_RS485) (void)sam_configgpio(GPIO_RS485_ENABLE); +#else /* if defined(CONFIG_USART1_SERIALDRIVER) */ + (void)sam_configgpio(GPIO_RS232_ENABLE); #endif } #else @@ -152,7 +148,7 @@ void board_initialize(void) */ #if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_LIB_BOARDCTL) - (void)board_app_initialize(); + (void)board_app_initialize(0); #endif } #endif /* CONFIG_BOARD_INITIALIZE */ diff --git a/configs/sam4e-ek/usbnsh/defconfig b/configs/sam4e-ek/usbnsh/defconfig index dce360c2850..58b643af0cb 100644 --- a/configs/sam4e-ek/usbnsh/defconfig +++ b/configs/sam4e-ek/usbnsh/defconfig @@ -619,33 +619,32 @@ CONFIG_ETH0_PHY_KSZ8051=y CONFIG_SERIAL=y CONFIG_SERIAL_REMOVABLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -CONFIG_ARCH_HAVE_USART1=y -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration # -CONFIG_USART1_ISUART=y CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set diff --git a/configs/sam4l-xplained/README.txt b/configs/sam4l-xplained/README.txt index de3ef5a81c9..a52b8ae8c44 100644 --- a/configs/sam4l-xplained/README.txt +++ b/configs/sam4l-xplained/README.txt @@ -566,10 +566,10 @@ SAM4L Xplained Pro-specific Configuration Options CONFIG_SAM34_GPIOA_IRQ CONFIG_SAM34_GPIOB_IRQ CONFIG_SAM34_GPIOC_IRQ - CONFIG_USART0_ISUART - CONFIG_USART1_ISUART - CONFIG_USART2_ISUART - CONFIG_USART3_ISUART + CONFIG_USART0_SERIALDRIVER + CONFIG_USART1_SERIALDRIVER + CONFIG_USART2_SERIALDRIVER + CONFIG_USART3_SERIALDRIVER ST91SAM4L specific device driver settings diff --git a/configs/sam4l-xplained/nsh/defconfig b/configs/sam4l-xplained/nsh/defconfig index 2668c210120..223ce701c65 100644 --- a/configs/sam4l-xplained/nsh/defconfig +++ b/configs/sam4l-xplained/nsh/defconfig @@ -507,33 +507,32 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -CONFIG_ARCH_HAVE_USART0=y -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +CONFIG_USART0_SERIALDRIVER=y +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration # -CONFIG_USART0_ISUART=y CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set diff --git a/configs/sam4l-xplained/src/sam_appinit.c b/configs/sam4l-xplained/src/sam_appinit.c index 48c072c98af..15330a80a24 100644 --- a/configs/sam4l-xplained/src/sam_appinit.c +++ b/configs/sam4l-xplained/src/sam_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/sam4l-xplained/src/sam_appinit.c * - * Copyright (C) 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2013, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -79,11 +79,28 @@ * Name: board_app_initialize * * Description: - * Perform architecture specific initialization + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface using the command BOARDIOC_INIT. + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #if defined(CONFIG_SAM34_LCDCA) && defined(CONFIG_SAM4L_XPLAINED_SLCD1MODULE) /* Initialize the SLCD and register the SLCD device as /dev/slcd */ diff --git a/configs/sam4s-xplained-pro/README.txt b/configs/sam4s-xplained-pro/README.txt index b0b76de1cd5..83f19be9296 100644 --- a/configs/sam4s-xplained-pro/README.txt +++ b/configs/sam4s-xplained-pro/README.txt @@ -464,10 +464,10 @@ SAM4S Xplained-specific Configuration Options CONFIG_GPIOA_IRQ CONFIG_GPIOB_IRQ CONFIG_GPIOC_IRQ - CONFIG_USART0_ISUART - CONFIG_USART1_ISUART - CONFIG_USART2_ISUART - CONFIG_USART3_ISUART + CONFIG_USART0_SERIALDRIVER + CONFIG_USART1_SERIALDRIVER + CONFIG_USART2_SERIALDRIVER + CONFIG_USART3_SERIALDRIVER ST91SAM4S specific device driver settings diff --git a/configs/sam4s-xplained-pro/nsh/defconfig b/configs/sam4s-xplained-pro/nsh/defconfig index 251b028c779..d5008bd41a2 100644 --- a/configs/sam4s-xplained-pro/nsh/defconfig +++ b/configs/sam4s-xplained-pro/nsh/defconfig @@ -559,33 +559,32 @@ CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set CONFIG_SERIAL_REMOVABLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -CONFIG_ARCH_HAVE_UART1=y -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -CONFIG_ARCH_HAVE_USART1=y -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +CONFIG_UART1_SERIALDRIVER=y +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration # -CONFIG_USART1_ISUART=y CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set diff --git a/configs/sam4s-xplained-pro/src/sam4s-xplained-pro.h b/configs/sam4s-xplained-pro/src/sam4s-xplained-pro.h index 9cd4a9ab681..791be9c596b 100644 --- a/configs/sam4s-xplained-pro/src/sam4s-xplained-pro.h +++ b/configs/sam4s-xplained-pro/src/sam4s-xplained-pro.h @@ -1,7 +1,7 @@ /************************************************************************************ * configs/sam4s-xplained-pro/src/sam4s-xplained-pro.h * - * Copyright (C) 2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2014, 2016 Gregory Nutt. All rights reserved. * Authors: Gregory Nutt * Bob Doiron * @@ -229,5 +229,21 @@ int sam_timerinitialize(void); # define sam_timerinitialize() (0) #endif +/**************************************************************************** + * Name: sam_watchdog_initialize() + * + * Description: + * Perform architecture-specific initialization of the Watchdog hardware. + * + * Input parameters: + * None + * + * Returned Value: + * Zero on success; a negated errno value on failure. + * + ****************************************************************************/ + +int sam_watchdog_initialize(void); + #endif /* __ASSEMBLY__ */ #endif /* __CONFIGS_SAM4S_XPLAINED_SRC_SAM4S_XPLAINED_H */ diff --git a/configs/sam4s-xplained-pro/src/sam_appinit.c b/configs/sam4s-xplained-pro/src/sam_appinit.c index e85b97ae934..7e0d3c3d086 100644 --- a/configs/sam4s-xplained-pro/src/sam_appinit.c +++ b/configs/sam4s-xplained-pro/src/sam_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/sam4s-xplained-pro/src/sam_appinit.c * - * Copyright (C) 2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2014, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * Bob Doiron * @@ -81,11 +81,28 @@ * Name: board_app_initialize * * Description: - * Perform architecture specific initialization + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface using the command BOARDIOC_INIT. + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #if defined (HAVE_USBDEV) || defined(HAVE_HSMCI) || defined (HAVE_PROC) || \ defined(HAVE_USBMONITOR) diff --git a/configs/sam4s-xplained-pro/src/sam_boot.c b/configs/sam4s-xplained-pro/src/sam_boot.c index f8caef92c07..ce7ae2fad3a 100644 --- a/configs/sam4s-xplained-pro/src/sam_boot.c +++ b/configs/sam4s-xplained-pro/src/sam_boot.c @@ -1,7 +1,7 @@ /************************************************************************************ * configs/sam4s-xplained-pro/src/sam_boot.c * - * Copyright (C) 2014-2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2014-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -97,7 +97,7 @@ void board_initialize(void) #if (defined(CONFIG_SAM34_WDT) && !defined(CONFIG_WDT_DISABLE_ON_RESET)) /* Configure watchdog timer and enable kicker kernel thread. */ - DEBUGASSERT(up_wdginitialize() >= 0); + DEBUGASSERT(sam_watchdog_initialize() >= 0); #endif #ifndef CONFIG_ARCH_LEDS diff --git a/configs/sam4s-xplained-pro/src/sam_wdt.c b/configs/sam4s-xplained-pro/src/sam_wdt.c index 5ce6cc25dfc..4696db19eef 100644 --- a/configs/sam4s-xplained-pro/src/sam_wdt.c +++ b/configs/sam4s-xplained-pro/src/sam_wdt.c @@ -1,7 +1,7 @@ /************************************************************************************ * configs/sam4s-xplained-pro/src/up_watchdog.c * - * Copyright (C) 2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2014, 2016 Gregory Nutt. All rights reserved. * Authors: Gregory Nutt * Bob Doiron * @@ -164,7 +164,7 @@ errout: #endif /**************************************************************************** - * Name: up_wdginitialize() + * Name: sam_watchdog_initialize() * * Description: * Perform architecture-specific initialization of the Watchdog hardware. @@ -173,7 +173,7 @@ errout: * ****************************************************************************/ -int up_wdginitialize(void) +int sam_watchdog_initialize(void) { #if (defined(CONFIG_SAM34_WDT) && !defined(CONFIG_WDT_DISABLE_ON_RESET)) int fd; diff --git a/configs/sam4s-xplained/README.txt b/configs/sam4s-xplained/README.txt index 4d49a0a5bf1..d5af219e241 100644 --- a/configs/sam4s-xplained/README.txt +++ b/configs/sam4s-xplained/README.txt @@ -456,10 +456,10 @@ SAM4S Xplained-specific Configuration Options CONFIG_SAM34_GPIOA_IRQ CONFIG_SAM34_GPIOB_IRQ CONFIG_SAM34_GPIOC_IRQ - CONFIG_USART0_ISUART - CONFIG_USART1_ISUART - CONFIG_USART2_ISUART - CONFIG_USART3_ISUART + CONFIG_USART0_SERIALDRIVER + CONFIG_USART1_SERIALDRIVER + CONFIG_USART2_SERIALDRIVER + CONFIG_USART3_SERIALDRIVER ST91SAM4S specific device driver settings diff --git a/configs/sam4s-xplained/nsh/defconfig b/configs/sam4s-xplained/nsh/defconfig index a4292f7b453..583fa8d9269 100644 --- a/configs/sam4s-xplained/nsh/defconfig +++ b/configs/sam4s-xplained/nsh/defconfig @@ -487,28 +487,28 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -CONFIG_ARCH_HAVE_UART1=y -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +CONFIG_UART1_SERIALDRIVER=y +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/sama5d2-xult/README.txt b/configs/sama5d2-xult/README.txt index 8adbabe7fdf..9af903ada86 100644 --- a/configs/sama5d2-xult/README.txt +++ b/configs/sama5d2-xult/README.txt @@ -849,11 +849,11 @@ REVISIT: Unverified, cloned text from the SAMA5D4-EK README.txt CONFIG_SAMA5_PIOC_IRQ - Support PIOD interrupts CONFIG_SAMA5_PIOD_IRQ - Support PIOD interrupts - CONFIG_USART0_ISUART - Flexcom0 is configured as a UART - CONFIG_USART1_ISUART - Flexcom1 is configured as a UART - CONFIG_USART2_ISUART - Flexcom2 is configured as a UART - CONFIG_USART3_ISUART - Flexcom3 is configured as a UART - CONFIG_USART4_ISUART - Flexcom4 is configured as a UART + CONFIG_USART0_SERIALDRIVER - Flexcom0 is configured as a UART + CONFIG_USART1_SERIALDRIVER - Flexcom1 is configured as a UART + CONFIG_USART2_SERIALDRIVER - Flexcom2 is configured as a UART + CONFIG_USART3_SERIALDRIVER - Flexcom3 is configured as a UART + CONFIG_USART4_SERIALDRIVER - Flexcom4 is configured as a UART AT91SAMA5 specific device driver settings diff --git a/configs/sama5d2-xult/nsh/defconfig b/configs/sama5d2-xult/nsh/defconfig index 064eb50ef50..537cb8d4ea1 100644 --- a/configs/sama5d2-xult/nsh/defconfig +++ b/configs/sama5d2-xult/nsh/defconfig @@ -571,33 +571,32 @@ CONFIG_RTC_DATETIME=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -CONFIG_ARCH_HAVE_USART4=y -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +CONFIG_USART4_SERIALDRIVER=y +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration # -CONFIG_USART4_ISUART=y CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y CONFIG_SERIAL_NPOLLWAITERS=2 diff --git a/configs/sama5d2-xult/src/sam_appinit.c b/configs/sama5d2-xult/src/sam_appinit.c index 8472bc995cd..518dc376968 100644 --- a/configs/sama5d2-xult/src/sam_appinit.c +++ b/configs/sama5d2-xult/src/sam_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/sama5d2-xult/src/sam_appinit.c * - * Copyright (C) 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -57,11 +57,28 @@ * Name: board_app_initialize * * Description: - * Perform architecture specific initialization + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface using the command BOARDIOC_INIT. + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #ifndef CONFIG_BOARD_INITIALIZE /* Perform board initialization */ diff --git a/configs/sama5d3-xplained/README.txt b/configs/sama5d3-xplained/README.txt index 5421b218f93..93cfb9a6c2e 100644 --- a/configs/sama5d3-xplained/README.txt +++ b/configs/sama5d3-xplained/README.txt @@ -2915,10 +2915,10 @@ SAMA5D3-Xplained Configuration Options CONFIG_SAMA5_PIOD_IRQ - Support PIOD interrupts CONFIG_SAMA5_PIOE_IRQ - Support PIOE interrupts - CONFIG_USART0_ISUART - USART0 is configured as a UART - CONFIG_USART1_ISUART - USART1 is configured as a UART - CONFIG_USART2_ISUART - USART2 is configured as a UART - CONFIG_USART3_ISUART - USART3 is configured as a UART + CONFIG_USART0_SERIALDRIVER - USART0 is configured as a UART + CONFIG_USART1_SERIALDRIVER - USART1 is configured as a UART + CONFIG_USART2_SERIALDRIVER - USART2 is configured as a UART + CONFIG_USART3_SERIALDRIVER - USART3 is configured as a UART AT91SAMA5 specific device driver settings diff --git a/configs/sama5d3-xplained/bridge/defconfig b/configs/sama5d3-xplained/bridge/defconfig index 72f4e683255..59d6feb7a20 100644 --- a/configs/sama5d3-xplained/bridge/defconfig +++ b/configs/sama5d3-xplained/bridge/defconfig @@ -606,28 +606,28 @@ CONFIG_ETH1_PHY_KSZ8081=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -CONFIG_ARCH_HAVE_OTHER_UART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +CONFIG_OTHER_UART_SERIALDRIVER=y # # USART Configuration diff --git a/configs/sama5d3-xplained/nsh/defconfig b/configs/sama5d3-xplained/nsh/defconfig index d24d9a19fab..9e517d9edb5 100644 --- a/configs/sama5d3-xplained/nsh/defconfig +++ b/configs/sama5d3-xplained/nsh/defconfig @@ -525,28 +525,28 @@ CONFIG_ARCH_HAVE_I2CRESET=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -CONFIG_ARCH_HAVE_OTHER_UART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +CONFIG_OTHER_UART_SERIALDRIVER=y # # USART Configuration diff --git a/configs/sama5d3-xplained/src/sam_ajoystick.c b/configs/sama5d3-xplained/src/sam_ajoystick.c index 20c24c424ef..d05f46eeaf3 100644 --- a/configs/sama5d3-xplained/src/sam_ajoystick.c +++ b/configs/sama5d3-xplained/src/sam_ajoystick.c @@ -46,6 +46,7 @@ #include #include +#include #include #include "sam_pio.h" @@ -93,10 +94,6 @@ AJOY_BUTTON_5_BIT | AJOY_BUTTON_6_BIT | \ AJOY_BUTTON_7_BIT ) -/**************************************************************************** - * Private Types - ****************************************************************************/ - /**************************************************************************** * Private Function Prototypes ****************************************************************************/ @@ -141,9 +138,9 @@ static const struct ajoy_lowerhalf_s g_ajoylower = .al_enable = ajoy_enable, }; -/* Descriptor for the open ADC driver */ +/* Thread-independent file structure for the open ADC driver */ -static int g_adcfd = -1; +static struct file g_adcfile; /* Current interrupt handler and argument */ @@ -190,7 +187,7 @@ static int ajoy_sample(FAR const struct ajoy_lowerhalf_s *lower, * channels are enabled). */ - nread = read(g_adcfd, adcmsg, SAM_ADC_NCHANNELS * sizeof(struct adc_msg_s)); + nread = file_read(&g_adcfile, adcmsg, MAX_ADC_CHANNELS * sizeof(struct adc_msg_s)); if (nread < 0) { int errcode = get_errno(); @@ -405,6 +402,7 @@ static int ajoy_interrupt(int irq, FAR void *context) int sam_ajoy_initialization(void) { int ret; + int fd; int i; /* Initialize ADC. We will need this to read the ADC inputs */ @@ -416,16 +414,28 @@ int sam_ajoy_initialization(void) return ret; } - /* Open the ADC driver for reading */ + /* Open the ADC driver for reading. */ - g_adcfd = open("/dev/adc0", O_RDONLY); - if (g_adcfd < 0) + fd = open("/dev/adc0", O_RDONLY); + if (fd < 0) { int errcode = get_errno(); idbg("ERROR: Failed to open /dev/adc0: %d\n", errcode); return -errcode; } + /* Detach the file structure from the file descriptor so that it can be + * used on any thread. + */ + + ret = file_detach(fd, &g_adcfile); + if (ret < 0) + { + idbg("ERROR: Failed to detach from file descriptor: %d\n", ret); + (void)close(fd); + return ret; + } + /* Configure the GPIO pins as interrupting inputs. */ for (i = 0; i < AJOY_NGPIOS; i++) @@ -449,8 +459,7 @@ int sam_ajoy_initialization(void) if (ret < 0) { idbg("ERROR: ajoy_register failed: %d\n", ret); - close(g_adcfd); - g_adcfd = -1; + file_close_detached(&g_adcfile); } return ret; diff --git a/configs/sama5d3-xplained/src/sam_appinit.c b/configs/sama5d3-xplained/src/sam_appinit.c index 1215fea5950..cfee95be1f8 100644 --- a/configs/sama5d3-xplained/src/sam_appinit.c +++ b/configs/sama5d3-xplained/src/sam_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/sama5d3-xplained/src/sam_appinit.c * - * Copyright (C) 2014-2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2014-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -54,10 +54,6 @@ #include "sama5d3-xplained.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -66,11 +62,28 @@ * Name: board_app_initialize * * Description: - * Perform architecture specific initialization + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface using the command BOARDIOC_INIT. + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #if defined(HAVE_NAND) || defined(HAVE_AT25) || defined(HAVE_HSMCI) || \ defined(HAVE_USBHOST) || defined(HAVE_USBMONITOR) || \\ diff --git a/configs/sama5d3-xplained/src/sam_boot.c b/configs/sama5d3-xplained/src/sam_boot.c index 9a3c34c8256..901c30e2430 100644 --- a/configs/sama5d3-xplained/src/sam_boot.c +++ b/configs/sama5d3-xplained/src/sam_boot.c @@ -153,7 +153,7 @@ void board_initialize(void) */ #if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_LIB_BOARDCTL) - (void)board_app_initialize(); + (void)board_app_initialize(0); #endif } #endif /* CONFIG_BOARD_INITIALIZE */ diff --git a/configs/sama5d3x-ek/README.txt b/configs/sama5d3x-ek/README.txt index 3a7ebc57294..82a5c2fd4cc 100644 --- a/configs/sama5d3x-ek/README.txt +++ b/configs/sama5d3x-ek/README.txt @@ -3240,10 +3240,10 @@ SAMA5D3x-EK Configuration Options CONFIG_SAMA5_PIOD_IRQ - Support PIOD interrupts CONFIG_SAMA5_PIOE_IRQ - Support PIOE interrupts - CONFIG_USART0_ISUART - USART0 is configured as a UART - CONFIG_USART1_ISUART - USART1 is configured as a UART - CONFIG_USART2_ISUART - USART2 is configured as a UART - CONFIG_USART3_ISUART - USART3 is configured as a UART + CONFIG_USART0_SERIALDRIVER - USART0 is configured as a UART + CONFIG_USART1_SERIALDRIVER - USART1 is configured as a UART + CONFIG_USART2_SERIALDRIVER - USART2 is configured as a UART + CONFIG_USART3_SERIALDRIVER - USART3 is configured as a UART AT91SAMA5 specific device driver settings diff --git a/configs/sama5d3x-ek/demo/defconfig b/configs/sama5d3x-ek/demo/defconfig index 71ae2304638..fc3d188f897 100644 --- a/configs/sama5d3x-ek/demo/defconfig +++ b/configs/sama5d3x-ek/demo/defconfig @@ -648,33 +648,32 @@ CONFIG_AT25_SPIFREQUENCY=10000000 CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -CONFIG_ARCH_HAVE_USART1=y -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration # -CONFIG_USART1_ISUART=y CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set diff --git a/configs/sama5d3x-ek/hello/defconfig b/configs/sama5d3x-ek/hello/defconfig index d6b76a8c74a..0be49453e11 100644 --- a/configs/sama5d3x-ek/hello/defconfig +++ b/configs/sama5d3x-ek/hello/defconfig @@ -506,33 +506,32 @@ CONFIG_ARCH_HAVE_I2CRESET=y CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -CONFIG_ARCH_HAVE_USART1=y -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration # -CONFIG_USART1_ISUART=y CONFIG_MCU_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set # CONFIG_SERIAL_OFLOWCONTROL is not set diff --git a/configs/sama5d3x-ek/norboot/defconfig b/configs/sama5d3x-ek/norboot/defconfig index b0481632b11..56b211c95f5 100644 --- a/configs/sama5d3x-ek/norboot/defconfig +++ b/configs/sama5d3x-ek/norboot/defconfig @@ -520,33 +520,32 @@ CONFIG_ARCH_HAVE_I2CRESET=y CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -CONFIG_ARCH_HAVE_USART1=y -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration # -CONFIG_USART1_ISUART=y CONFIG_MCU_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set # CONFIG_SERIAL_OFLOWCONTROL is not set diff --git a/configs/sama5d3x-ek/nsh/defconfig b/configs/sama5d3x-ek/nsh/defconfig index e0e8a622b11..78c20734934 100644 --- a/configs/sama5d3x-ek/nsh/defconfig +++ b/configs/sama5d3x-ek/nsh/defconfig @@ -524,33 +524,32 @@ CONFIG_ARCH_HAVE_I2CRESET=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -CONFIG_ARCH_HAVE_USART1=y -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration # -CONFIG_USART1_ISUART=y CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set diff --git a/configs/sama5d3x-ek/nx/defconfig b/configs/sama5d3x-ek/nx/defconfig index 7faf908eecc..7a4734bead8 100644 --- a/configs/sama5d3x-ek/nx/defconfig +++ b/configs/sama5d3x-ek/nx/defconfig @@ -565,33 +565,32 @@ CONFIG_ARCH_HAVE_I2CRESET=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -CONFIG_ARCH_HAVE_USART1=y -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration # -CONFIG_USART1_ISUART=y CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set diff --git a/configs/sama5d3x-ek/nxplayer/defconfig b/configs/sama5d3x-ek/nxplayer/defconfig index b7495de3e84..7a1878be00b 100644 --- a/configs/sama5d3x-ek/nxplayer/defconfig +++ b/configs/sama5d3x-ek/nxplayer/defconfig @@ -623,33 +623,32 @@ CONFIG_SDIO_BLOCKSETUP=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -CONFIG_ARCH_HAVE_USART1=y -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration # -CONFIG_USART1_ISUART=y CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set diff --git a/configs/sama5d3x-ek/nxwm/defconfig b/configs/sama5d3x-ek/nxwm/defconfig index 1fbbd687983..5e533abf0da 100644 --- a/configs/sama5d3x-ek/nxwm/defconfig +++ b/configs/sama5d3x-ek/nxwm/defconfig @@ -623,33 +623,32 @@ CONFIG_INPUT=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -CONFIG_ARCH_HAVE_USART1=y -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration # -CONFIG_USART1_ISUART=y CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set diff --git a/configs/sama5d3x-ek/ov2640/defconfig b/configs/sama5d3x-ek/ov2640/defconfig index e6d4510e1a0..c058dd759b8 100644 --- a/configs/sama5d3x-ek/ov2640/defconfig +++ b/configs/sama5d3x-ek/ov2640/defconfig @@ -591,33 +591,32 @@ CONFIG_OV2640_SVGA_RESOLUTION=y CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -CONFIG_ARCH_HAVE_USART1=y -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration # -CONFIG_USART1_ISUART=y CONFIG_MCU_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set # CONFIG_SERIAL_OFLOWCONTROL is not set diff --git a/configs/sama5d3x-ek/src/sam_appinit.c b/configs/sama5d3x-ek/src/sam_appinit.c index 56589915ce7..9f4fff0f73d 100644 --- a/configs/sama5d3x-ek/src/sam_appinit.c +++ b/configs/sama5d3x-ek/src/sam_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/sama5d3x-ek/src/sam_appinit.c * - * Copyright (C) 2013-2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2013-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -66,11 +66,28 @@ * Name: board_app_initialize * * Description: - * Perform architecture specific initialization + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface using the command BOARDIOC_INIT. + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #if defined(HAVE_NAND) || defined(HAVE_AT25) || defined(HAVE_AT24) || \ defined(HAVE_HSMCI) || defined(HAVE_USBHOST) || defined(HAVE_USBMONITOR) ||\ diff --git a/configs/sama5d3x-ek/src/sam_boot.c b/configs/sama5d3x-ek/src/sam_boot.c index ce065150c4c..d12ec87c751 100644 --- a/configs/sama5d3x-ek/src/sam_boot.c +++ b/configs/sama5d3x-ek/src/sam_boot.c @@ -153,7 +153,7 @@ void board_initialize(void) */ #if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_LIB_BOARDCTL) - (void)board_app_initialize(); + (void)board_app_initialize(0); #endif } #endif /* CONFIG_BOARD_INITIALIZE */ diff --git a/configs/sama5d4-ek/README.txt b/configs/sama5d4-ek/README.txt index 5f2e569a087..7e3f33bd3bb 100644 --- a/configs/sama5d4-ek/README.txt +++ b/configs/sama5d4-ek/README.txt @@ -3526,10 +3526,10 @@ SAMA4D4-EK Configuration Options CONFIG_SAMA5_PIOD_IRQ - Support PIOD interrupts CONFIG_SAMA5_PIOE_IRQ - Support PIOE interrupts - CONFIG_USART0_ISUART - USART0 is configured as a UART - CONFIG_USART1_ISUART - USART1 is configured as a UART - CONFIG_USART2_ISUART - USART2 is configured as a UART - CONFIG_USART3_ISUART - USART3 is configured as a UART + CONFIG_USART0_SERIALDRIVER - USART0 is configured as a UART + CONFIG_USART1_SERIALDRIVER - USART1 is configured as a UART + CONFIG_USART2_SERIALDRIVER - USART2 is configured as a UART + CONFIG_USART3_SERIALDRIVER - USART3 is configured as a UART AT91SAMA5 specific device driver settings diff --git a/configs/sama5d4-ek/at25boot/defconfig b/configs/sama5d4-ek/at25boot/defconfig index cec1129ef6e..64151008f58 100644 --- a/configs/sama5d4-ek/at25boot/defconfig +++ b/configs/sama5d4-ek/at25boot/defconfig @@ -584,33 +584,32 @@ CONFIG_AT25_SPIFREQUENCY=20000000 CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -CONFIG_ARCH_HAVE_USART3=y -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +CONFIG_USART3_SERIALDRIVER=y +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration # -CONFIG_USART3_ISUART=y CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set diff --git a/configs/sama5d4-ek/bridge/defconfig b/configs/sama5d4-ek/bridge/defconfig index 39d09056da1..e777febe93b 100644 --- a/configs/sama5d4-ek/bridge/defconfig +++ b/configs/sama5d4-ek/bridge/defconfig @@ -624,33 +624,32 @@ CONFIG_ETH1_PHY_KSZ8081=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -CONFIG_ARCH_HAVE_USART3=y -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +CONFIG_USART3_SERIALDRIVER=y +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration # -CONFIG_USART3_ISUART=y CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y CONFIG_SERIAL_NPOLLWAITERS=2 diff --git a/configs/sama5d4-ek/dramboot/defconfig b/configs/sama5d4-ek/dramboot/defconfig index 05daad298ed..f12701c0c51 100644 --- a/configs/sama5d4-ek/dramboot/defconfig +++ b/configs/sama5d4-ek/dramboot/defconfig @@ -541,33 +541,32 @@ CONFIG_ARCH_HAVE_I2CRESET=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -CONFIG_ARCH_HAVE_USART3=y -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +CONFIG_USART3_SERIALDRIVER=y +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration # -CONFIG_USART3_ISUART=y CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set diff --git a/configs/sama5d4-ek/elf/defconfig b/configs/sama5d4-ek/elf/defconfig index 3ac09f52df6..b598b3f7cc9 100644 --- a/configs/sama5d4-ek/elf/defconfig +++ b/configs/sama5d4-ek/elf/defconfig @@ -567,34 +567,32 @@ CONFIG_AUDIO_DEVICES=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -CONFIG_ARCH_HAVE_USART3=y -CONFIG_ARCH_HAVE_USART4=y -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +CONFIG_USART3_SERIALDRIVER=y +CONFIG_USART4_SERIALDRIVER=y +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration # -CONFIG_USART3_ISUART=y -CONFIG_USART4_ISUART=y CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y CONFIG_SERIAL_NPOLLWAITERS=2 diff --git a/configs/sama5d4-ek/ipv6/defconfig b/configs/sama5d4-ek/ipv6/defconfig index e327a02d9ac..347761f235e 100644 --- a/configs/sama5d4-ek/ipv6/defconfig +++ b/configs/sama5d4-ek/ipv6/defconfig @@ -768,34 +768,32 @@ CONFIG_ETH0_PHY_KSZ8081=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -CONFIG_ARCH_HAVE_USART3=y -CONFIG_ARCH_HAVE_USART4=y -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +CONFIG_USART3_SERIALDRIVER=y +CONFIG_USART4_SERIALDRIVER=y +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration # -CONFIG_USART3_ISUART=y -CONFIG_USART4_ISUART=y CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y CONFIG_SERIAL_NPOLLWAITERS=2 diff --git a/configs/sama5d4-ek/knsh/defconfig b/configs/sama5d4-ek/knsh/defconfig index ce61a0458e2..1992f4004bc 100644 --- a/configs/sama5d4-ek/knsh/defconfig +++ b/configs/sama5d4-ek/knsh/defconfig @@ -596,34 +596,32 @@ CONFIG_SDIO_BLOCKSETUP=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -CONFIG_ARCH_HAVE_USART3=y -CONFIG_ARCH_HAVE_USART4=y -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +CONFIG_USART3_SERIALDRIVER=y +CONFIG_USART4_SERIALDRIVER=y +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration # -CONFIG_USART3_ISUART=y -CONFIG_USART4_ISUART=y CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y CONFIG_SERIAL_NPOLLWAITERS=2 diff --git a/configs/sama5d4-ek/knsh/defconfig.ROMFS b/configs/sama5d4-ek/knsh/defconfig.ROMFS index 769bfdb4035..a069c2d2a7d 100644 --- a/configs/sama5d4-ek/knsh/defconfig.ROMFS +++ b/configs/sama5d4-ek/knsh/defconfig.ROMFS @@ -487,33 +487,33 @@ CONFIG_RTC_DATETIME=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -CONFIG_ARCH_HAVE_USART3=y -CONFIG_ARCH_HAVE_USART4=y -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +CONFIG_USART3_SERIALDRIVER=y +CONFIG_USART4_SERIALDRIVER=y +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set # # USART Configuration # -CONFIG_USART3_ISUART=y -CONFIG_USART4_ISUART=y +CONFIG_USART3_SERIALDRIVER=y +CONFIG_USART4_SERIALDRIVER=y CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y CONFIG_SERIAL_NPOLLWAITERS=2 diff --git a/configs/sama5d4-ek/nsh/defconfig b/configs/sama5d4-ek/nsh/defconfig index 479649266ef..eeab2f01314 100644 --- a/configs/sama5d4-ek/nsh/defconfig +++ b/configs/sama5d4-ek/nsh/defconfig @@ -770,34 +770,32 @@ CONFIG_ETH0_PHY_KSZ8081=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -CONFIG_ARCH_HAVE_USART3=y -CONFIG_ARCH_HAVE_USART4=y -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +CONFIG_USART3_SERIALDRIVER=y +CONFIG_USART4_SERIALDRIVER=y +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration # -CONFIG_USART3_ISUART=y -CONFIG_USART4_ISUART=y CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y CONFIG_SERIAL_NPOLLWAITERS=2 diff --git a/configs/sama5d4-ek/nxwm/defconfig b/configs/sama5d4-ek/nxwm/defconfig index b3bdbe87167..33173d299dc 100644 --- a/configs/sama5d4-ek/nxwm/defconfig +++ b/configs/sama5d4-ek/nxwm/defconfig @@ -739,34 +739,32 @@ CONFIG_ETH0_PHY_KSZ8081=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -CONFIG_ARCH_HAVE_USART3=y -CONFIG_ARCH_HAVE_USART4=y -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +CONFIG_USART3_SERIALDRIVER=y +CONFIG_USART4_SERIALDRIVER=y +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration # -CONFIG_USART3_ISUART=y -CONFIG_USART4_ISUART=y CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y CONFIG_SERIAL_NPOLLWAITERS=2 diff --git a/configs/sama5d4-ek/ramtest/defconfig b/configs/sama5d4-ek/ramtest/defconfig index f9981f1e3e8..4490b66233c 100644 --- a/configs/sama5d4-ek/ramtest/defconfig +++ b/configs/sama5d4-ek/ramtest/defconfig @@ -541,33 +541,32 @@ CONFIG_ARCH_HAVE_I2CRESET=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -CONFIG_ARCH_HAVE_USART3=y -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +CONFIG_USART3_SERIALDRIVER=y +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration # -CONFIG_USART3_ISUART=y CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set diff --git a/configs/sama5d4-ek/src/sam_appinit.c b/configs/sama5d4-ek/src/sam_appinit.c index 9632e33353f..066bbf00c3a 100644 --- a/configs/sama5d4-ek/src/sam_appinit.c +++ b/configs/sama5d4-ek/src/sam_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/sama5d4-ek/src/sam_appinit.c * - * Copyright (C) 2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2014, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -57,11 +57,28 @@ * Name: board_app_initialize * * Description: - * Perform architecture specific initialization + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface using the command BOARDIOC_INIT. + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #ifndef CONFIG_BOARD_INITIALIZE /* Perform board initialization */ diff --git a/configs/samd20-xplained/nsh/defconfig b/configs/samd20-xplained/nsh/defconfig index e868b72f611..5df5b16c4d0 100644 --- a/configs/samd20-xplained/nsh/defconfig +++ b/configs/samd20-xplained/nsh/defconfig @@ -470,34 +470,32 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -CONFIG_ARCH_HAVE_USART3=y -CONFIG_ARCH_HAVE_USART4=y -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +CONFIG_USART3_SERIALDRIVER=y +CONFIG_USART4_SERIALDRIVER=y +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration # -CONFIG_USART3_ISUART=y -CONFIG_USART4_ISUART=y CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set diff --git a/configs/samd20-xplained/src/sam_appinit.c b/configs/samd20-xplained/src/sam_appinit.c index dd0ca0c9f30..8bc9a35b4f8 100644 --- a/configs/samd20-xplained/src/sam_appinit.c +++ b/configs/samd20-xplained/src/sam_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/samd20-xplained/src/sam_appinit.c * - * Copyright (C) 2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2014, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -97,11 +97,28 @@ * Name: board_app_initialize * * Description: - * Perform architecture specific initialization + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface using the command BOARDIOC_INIT. + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #if defined(SAMDL_HAVE_SPI0) && defined(CONFIG_SAMD20_XPLAINED_IOMODULE) /* Initialize the SPI-based MMC/SD slot */ diff --git a/configs/samd21-xplained/nsh/defconfig b/configs/samd21-xplained/nsh/defconfig index 70fb4c59cf8..1610bf7397e 100644 --- a/configs/samd21-xplained/nsh/defconfig +++ b/configs/samd21-xplained/nsh/defconfig @@ -468,34 +468,32 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -CONFIG_ARCH_HAVE_USART3=y -CONFIG_ARCH_HAVE_USART4=y -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +CONFIG_USART3_SERIALDRIVER=y +CONFIG_USART4_SERIALDRIVER=y +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration # -CONFIG_USART3_ISUART=y -CONFIG_USART4_ISUART=y CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set diff --git a/configs/samd21-xplained/src/sam_appinit.c b/configs/samd21-xplained/src/sam_appinit.c index e0bca030107..56afb0ff24f 100644 --- a/configs/samd21-xplained/src/sam_appinit.c +++ b/configs/samd21-xplained/src/sam_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/samd21-xplained/src/sam_appinit.c * - * Copyright (C) 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -97,11 +97,28 @@ * Name: board_app_initialize * * Description: - * Perform architecture specific initialization + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface using the command BOARDIOC_INIT. + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #if defined(SAMDL_HAVE_SPI0) && defined(CONFIG_SAMD21_XPLAINED_IOMODULE) /* Initialize the SPI-based MMC/SD slot */ diff --git a/configs/same70-xplained/README.txt b/configs/same70-xplained/README.txt index 9a0ed6fa835..548e496e0a3 100644 --- a/configs/same70-xplained/README.txt +++ b/configs/same70-xplained/README.txt @@ -1139,7 +1139,7 @@ NOTES: USART1. UART3 might be a good option (the Arduino RXD/TXD): -CONFIG_SAMV7_USART1=y - -CONFIG_USART1_ISUART=y + -CONFIG_USART1_SERIALDRIVER=y -CONFIG_USART1_SERIAL_CONSOLE=y -CONFIG_USART1_RXBUFSIZE=256 -CONFIG_USART1_TXBUFSIZE=256 diff --git a/configs/same70-xplained/netnsh/defconfig b/configs/same70-xplained/netnsh/defconfig index 88af9ee4ad4..17951d79a84 100644 --- a/configs/same70-xplained/netnsh/defconfig +++ b/configs/same70-xplained/netnsh/defconfig @@ -655,33 +655,32 @@ CONFIG_ETH0_PHY_KSZ8081=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -CONFIG_ARCH_HAVE_USART1=y -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration # -CONFIG_USART1_ISUART=y CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set diff --git a/configs/same70-xplained/nsh/defconfig b/configs/same70-xplained/nsh/defconfig index 4f668b0230e..7a425dcb802 100644 --- a/configs/same70-xplained/nsh/defconfig +++ b/configs/same70-xplained/nsh/defconfig @@ -597,33 +597,32 @@ CONFIG_AT25_SPIFREQUENCY=20000000 CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -CONFIG_ARCH_HAVE_USART1=y -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration # -CONFIG_USART1_ISUART=y CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set diff --git a/configs/same70-xplained/src/sam_appinit.c b/configs/same70-xplained/src/sam_appinit.c index d3d14471228..5e8a871522a 100644 --- a/configs/same70-xplained/src/sam_appinit.c +++ b/configs/same70-xplained/src/sam_appinit.c @@ -55,11 +55,28 @@ * Name: board_app_initialize * * Description: - * Perform architecture specific initialization + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface using the command BOARDIOC_INIT. + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #ifndef CONFIG_BOARD_INITIALIZE /* Perform board initialization */ diff --git a/configs/saml21-xplained/nsh/defconfig b/configs/saml21-xplained/nsh/defconfig index 2baa5782c38..c44ddac15aa 100644 --- a/configs/saml21-xplained/nsh/defconfig +++ b/configs/saml21-xplained/nsh/defconfig @@ -456,34 +456,32 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -CONFIG_ARCH_HAVE_USART3=y -CONFIG_ARCH_HAVE_USART4=y -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +CONFIG_USART3_SERIALDRIVER=y +CONFIG_USART4_SERIALDRIVER=y +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration # -CONFIG_USART3_ISUART=y -CONFIG_USART4_ISUART=y CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set diff --git a/configs/saml21-xplained/src/sam_appinit.c b/configs/saml21-xplained/src/sam_appinit.c index 98d66e9213f..9f299c1f716 100644 --- a/configs/saml21-xplained/src/sam_appinit.c +++ b/configs/saml21-xplained/src/sam_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/saml21-xplained/src/sam_appinit.c * - * Copyright (C) 2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2014, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -97,11 +97,28 @@ * Name: board_app_initialize * * Description: - * Perform architecture specific initialization + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface using the command BOARDIOC_INIT. + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #if defined(SAMDL_HAVE_SPI0) && defined(CONFIG_SAML21_XPLAINED_IOMODULE) /* Initialize the SPI-based MMC/SD slot */ diff --git a/configs/samv71-xult/knsh/defconfig b/configs/samv71-xult/knsh/defconfig index 2716784db29..de6d5d57f67 100644 --- a/configs/samv71-xult/knsh/defconfig +++ b/configs/samv71-xult/knsh/defconfig @@ -612,28 +612,28 @@ CONFIG_AT25_SPIFREQUENCY=20000000 CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -CONFIG_ARCH_HAVE_UART3=y -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +CONFIG_UART3_SERIALDRIVER=y +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/samv71-xult/module/defconfig b/configs/samv71-xult/module/defconfig index 8300fa0f3a8..b55a4699a4c 100644 --- a/configs/samv71-xult/module/defconfig +++ b/configs/samv71-xult/module/defconfig @@ -528,28 +528,28 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -CONFIG_ARCH_HAVE_UART3=y -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +CONFIG_UART3_SERIALDRIVER=y +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/samv71-xult/mxtxplnd/defconfig b/configs/samv71-xult/mxtxplnd/defconfig index 32751004cc5..93136214dec 100644 --- a/configs/samv71-xult/mxtxplnd/defconfig +++ b/configs/samv71-xult/mxtxplnd/defconfig @@ -645,33 +645,32 @@ CONFIG_AT25_SPIFREQUENCY=20000000 CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -CONFIG_ARCH_HAVE_USART0=y -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +CONFIG_USART0_SERIALDRIVER=y +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration # -CONFIG_USART0_ISUART=y CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set diff --git a/configs/samv71-xult/netnsh/defconfig b/configs/samv71-xult/netnsh/defconfig index c40145daf3f..ccc9adb0d80 100644 --- a/configs/samv71-xult/netnsh/defconfig +++ b/configs/samv71-xult/netnsh/defconfig @@ -664,28 +664,28 @@ CONFIG_ETH0_PHY_KSZ8061=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -CONFIG_ARCH_HAVE_UART3=y -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +CONFIG_UART3_SERIALDRIVER=y +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/samv71-xult/nsh/defconfig b/configs/samv71-xult/nsh/defconfig index c3c64d50fa0..8734da85815 100644 --- a/configs/samv71-xult/nsh/defconfig +++ b/configs/samv71-xult/nsh/defconfig @@ -605,28 +605,28 @@ CONFIG_AT25_SPIFREQUENCY=20000000 CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -CONFIG_ARCH_HAVE_UART3=y -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +CONFIG_UART3_SERIALDRIVER=y +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/samv71-xult/nxwm/defconfig b/configs/samv71-xult/nxwm/defconfig index e12363decd6..7bba67ff6e2 100644 --- a/configs/samv71-xult/nxwm/defconfig +++ b/configs/samv71-xult/nxwm/defconfig @@ -654,33 +654,32 @@ CONFIG_AT25_SPIFREQUENCY=20000000 CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -CONFIG_ARCH_HAVE_USART0=y -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +CONFIG_USART0_SERIALDRIVER=y +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration # -CONFIG_USART0_ISUART=y CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set diff --git a/configs/samv71-xult/src/sam_appinit.c b/configs/samv71-xult/src/sam_appinit.c index 451c97600d9..f7215ff4650 100644 --- a/configs/samv71-xult/src/sam_appinit.c +++ b/configs/samv71-xult/src/sam_appinit.c @@ -55,11 +55,28 @@ * Name: board_app_initialize * * Description: - * Perform architecture specific initialization + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface using the command BOARDIOC_INIT. + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #ifndef CONFIG_BOARD_INITIALIZE /* Perform board initialization */ diff --git a/configs/samv71-xult/vnc/defconfig b/configs/samv71-xult/vnc/defconfig index 087f0b0f1d1..8aad6db72b8 100644 --- a/configs/samv71-xult/vnc/defconfig +++ b/configs/samv71-xult/vnc/defconfig @@ -666,28 +666,28 @@ CONFIG_ETH0_PHY_KSZ8061=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -CONFIG_ARCH_HAVE_UART3=y -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +CONFIG_UART3_SERIALDRIVER=y +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/samv71-xult/vnxwm/defconfig b/configs/samv71-xult/vnxwm/defconfig index 3e074f27096..6e9f662f49e 100644 --- a/configs/samv71-xult/vnxwm/defconfig +++ b/configs/samv71-xult/vnxwm/defconfig @@ -669,28 +669,28 @@ CONFIG_ETH0_PHY_KSZ8061=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -CONFIG_ARCH_HAVE_UART3=y -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +CONFIG_UART3_SERIALDRIVER=y +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/shenzhou/nsh/defconfig b/configs/shenzhou/nsh/defconfig index d0b0b741d7a..3ae18ae27e5 100644 --- a/configs/shenzhou/nsh/defconfig +++ b/configs/shenzhou/nsh/defconfig @@ -76,6 +76,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -94,6 +95,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -115,6 +117,7 @@ CONFIG_ARCH_CORTEXM3=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -122,6 +125,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y # CONFIG_ARMV7M_LAZYFPU is not set # CONFIG_ARCH_HAVE_FPU is not set # CONFIG_ARCH_HAVE_DPFPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -132,6 +136,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set # CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set @@ -238,6 +243,7 @@ CONFIG_ARCH_CHIP_STM32F107VC=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -409,13 +415,17 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_STM32_TIM5_CAP is not set # CONFIG_STM32_TIM8_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART2_SERIALDRIVER=y +# CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # @@ -774,33 +784,28 @@ CONFIG_ETH0_PHY_DM9161=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -CONFIG_ARCH_HAVE_USART2=y -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART2_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +CONFIG_USART2_SERIALDRIVER=y +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -1062,6 +1067,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set CONFIG_LIBC_NETDB=y # CONFIG_NETDB_HOSTFILE is not set CONFIG_NETDB_DNSCLIENT=y @@ -1200,6 +1207,7 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_NETUTILS_CODECS is not set # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/shenzhou/nxwm/defconfig b/configs/shenzhou/nxwm/defconfig index 46709722a30..a59049abedd 100644 --- a/configs/shenzhou/nxwm/defconfig +++ b/configs/shenzhou/nxwm/defconfig @@ -80,6 +80,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -98,6 +99,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -119,6 +121,7 @@ CONFIG_ARCH_CORTEXM3=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -126,6 +129,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y # CONFIG_ARMV7M_LAZYFPU is not set # CONFIG_ARCH_HAVE_FPU is not set # CONFIG_ARCH_HAVE_DPFPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -136,6 +140,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARW is not set # CONFIG_ARMV7M_TOOLCHAIN_ATOLLIC is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDW is not set @@ -246,6 +251,7 @@ CONFIG_ARCH_CHIP_STM32F107VC=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -417,13 +423,17 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_STM32_TIM5_CAP is not set # CONFIG_STM32_TIM8_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART2_SERIALDRIVER=y +# CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # @@ -843,33 +853,28 @@ CONFIG_ETH0_PHY_DM9161=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -CONFIG_ARCH_HAVE_USART2=y -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART2_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +CONFIG_USART2_SERIALDRIVER=y +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -1064,6 +1069,7 @@ CONFIG_NX_LCDDRIVER=y CONFIG_NX_NPLANES=1 CONFIG_NX_BGCOLOR=0x0 CONFIG_NX_WRITEONLY=y +# CONFIG_NX_UPDATE is not set # # Supported Pixel Depths @@ -1230,6 +1236,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set CONFIG_LIBC_NETDB=y CONFIG_NETDB_DNSCLIENT=y CONFIG_NETDB_DNSCLIENT_ENTRIES=4 @@ -1360,6 +1368,7 @@ CONFIG_HAVE_CXXINITIALIZE=y # # CONFIG_NETUTILS_CODECS is not set # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set @@ -1528,6 +1537,7 @@ CONFIG_NXWIDGETS_LISTENERSTACK=1596 # NXWidget Configuration # CONFIG_NXWIDGETS_BPP=16 +# CONFIG_NXWIDGETS_GREYSCALE is not set CONFIG_NXWIDGETS_SIZEOFCHAR=1 # diff --git a/configs/shenzhou/src/Makefile b/configs/shenzhou/src/Makefile index 15458ca938d..beecc845826 100644 --- a/configs/shenzhou/src/Makefile +++ b/configs/shenzhou/src/Makefile @@ -80,10 +80,6 @@ ifeq ($(CONFIG_ADC),y) CSRCS += stm32_adc.c endif -ifeq ($(CONFIG_WATCHDOG),y) -CSRCS += stm32_watchdog.c -endif - # NOTE: SSD1289 is not supported on the board ifeq ($(CONFIG_LCD_SSD1289),y) diff --git a/configs/shenzhou/src/stm32_appinit.c b/configs/shenzhou/src/stm32_appinit.c index 4ef9ad82db2..9b18c80d5d3 100644 --- a/configs/shenzhou/src/stm32_appinit.c +++ b/configs/shenzhou/src/stm32_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/shenzhou/src/stm32_appinit.c * - * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2012, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -142,11 +142,28 @@ * Name: board_app_initialize * * Description: - * Perform architecture specific initialization + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface using the command BOARDIOC_INIT. + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #if defined(HAVE_MMCSD) || defined(HAVE_USBHOST) || defined(HAVE_W25) int ret; diff --git a/configs/shenzhou/thttpd/defconfig b/configs/shenzhou/thttpd/defconfig index 6eab31a470f..89c37359317 100644 --- a/configs/shenzhou/thttpd/defconfig +++ b/configs/shenzhou/thttpd/defconfig @@ -103,6 +103,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -121,6 +122,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -142,6 +144,7 @@ CONFIG_ARCH_CORTEXM3=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -149,6 +152,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y # CONFIG_ARMV7M_LAZYFPU is not set # CONFIG_ARCH_HAVE_FPU is not set # CONFIG_ARCH_HAVE_DPFPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set # CONFIG_DEBUG_HARDFAULT is not set @@ -160,6 +164,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT=y # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set # CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set @@ -267,6 +272,7 @@ CONFIG_ARCH_CHIP_STM32F107VC=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -438,13 +444,17 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_STM32_TIM5_CAP is not set # CONFIG_STM32_TIM8_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART2_SERIALDRIVER=y +# CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # @@ -762,10 +772,12 @@ CONFIG_MTD=y # CONFIG_MTD_AT45DB is not set # CONFIG_MTD_M25P is not set # CONFIG_MTD_S25FL1 is not set +# CONFIG_MTD_N25QXXX is not set # CONFIG_MTD_SMART is not set # CONFIG_MTD_RAMTRON is not set # CONFIG_MTD_SST25 is not set # CONFIG_MTD_SST25XX is not set +# CONFIG_MTD_SST26 is not set # CONFIG_MTD_SST39FV is not set CONFIG_MTD_W25=y CONFIG_W25_SPIMODE=0 @@ -826,33 +838,28 @@ CONFIG_ETH0_PHY_DM9161=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -CONFIG_ARCH_HAVE_USART2=y -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART2_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +CONFIG_USART2_SERIALDRIVER=y +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y CONFIG_SERIAL_NPOLLWAITERS=2 @@ -1117,6 +1124,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set CONFIG_LIBC_NETDB=y # CONFIG_NETDB_HOSTFILE is not set CONFIG_NETDB_DNSCLIENT=y @@ -1265,6 +1274,7 @@ CONFIG_EXAMPLES_THTTPD_NETMASK=0xffffff00 # CONFIG_NETUTILS_CODECS is not set # CONFIG_NETUTILS_DHCPC is not set # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_FTPD is not set # CONFIG_NETUTILS_JSON is not set diff --git a/configs/sim/NETWORK-LINUX.txt b/configs/sim/NETWORK-LINUX.txt new file mode 100644 index 00000000000..9e2d3c69267 --- /dev/null +++ b/configs/sim/NETWORK-LINUX.txt @@ -0,0 +1,136 @@ +NETWORK SUPPORT ON LINUX +^^^^^^^^^^^^^^^^^^^^^^^^ + +The simulation uses the TUN/TAP driver under Linux to provide network support. +It can operate in one of two modes: host routed, or bridged. In the host +routed case no special configuration is necessary, but by default the +simulation will only be accessible to the host on which it runs. + +Bridge mode is recommended where possible. It requires slightly more effort +to set up, but is much more flexible, and is likely to be easier to maintain +in the end. + + +HOST ROUTE MODE +^^^^^^^^^^^^^^^ + +If CONFIG_SIM_NET_HOST_ROUTE is enabled, the simulation will create and +maintain a host route from the assigned IP address to the instance's tap +device. This route will be updated if the application changes the +simulation's IP address. Note that you will not see the simulation's IP +address on the TAP device if you run ifconfig on the host. + +No special setup is required. Simply assign your simulation a free IP address +on the same network as your host, and everything will Just Work. Note that if +you assign an IP that is already in use on your network, your host won't be +able to see it until the simulation is stopped. The host route will force all +traffic destined for that IP to be sent to the tap interface. + +NOTE: If you configure an IP address that is not on the same subnet as your + host, additional manual setup will be required. This is not + recommended; you should use bridge mode instead. + + +BRIDGE MODE +^^^^^^^^^^^ + +BASIC USAGE +----------- +If CONFIG_SIM_NET_BRIDGE is enabled, the simulation's tap interface will +automatically be added to the Linux bridge device specified by the +CONFIG_SIM_NET_BRIDGE_DEVICE configuration option. Note that this MUST be a +pre-existing bridge device, or the initialization will fail. The simulation +will NOT create the bridge for you. + +To create the bridge, first install the bridge utilities package for your +platform (the bridge-utils RPM in RedHat, for example). Then execute a +command like the following: + + # brctl addbr nuttx0 + +This will create the nuttx0 bridge. Once created, the bridge may be used by +one or more simulations. You only need one bridge per host; if you start +multiple simulations, they will all be added to the same bridge and can talk +amongst themselves. + + +OPTION 1: ROUTING LOCAL TRAFFIC TO THE BRIDGE +---------------------------------------------- +If you want the host to be able to talk to your simluations, you will +also need to assign the bridge an IP address (this will be the default +gateway you assign to your simluations) and add a network route. Note +that the subnet chosen should not already be in use. For example, if +you want to use the 172.26.23.0/24 subnet for your simluations, you +would do something like the following: + + # brctl addbr nuttx0 + # ifconfig nuttx0 172.26.23.1/24 + +The standard Linux ifconfig utility will automatically add the appropriate +network route, so no further effort is needed. + + +OPTION 2: LIVE NETWORK ACCESS +------------------------------ +There are two main methods of giving your simulations access to your network +at large. One is to set up your Linux host as a router and configure your +network so that it knows where to find the appropriate subnet. This is far +too complex for most use cases, so you can safely ignore it unless you have +specific needs. + +The recommended method is to add a real interface to the bridge you're using +with NuttX. For example, if you have a secondary eth1 interface on your host, +you can simply connect it to the network you want your simulations to access, +and run the following command: + + # brctl addif nuttx0 eth1 + +From that point on, your simulations will be directly connected to the same +network as your eth1 interface. Note that your bridge will generally not need +an IP address in this case. + +If you only have a single interface, you can configure your system so that eth0 +(or other primary interface) is on the bridge. To do this, you would execute +commands like the following from the system console: + + # brctl addbr nuttx0 + # brctl addif nuttx0 eth0 + # ifconfig nuttx0 + # route add -net default gw ... + +The rest of your network configuration would remain the same; your host's IP +address has simply moved from being assigned directly to the ethernet interface, +to being assigned to the bridge that contains that interface. The connection +will operate as normal. NuttX simulations will join the bridge as with the +previous example. + +In either of the live access scenarios presented here, the default gateway you +configure in your simluation should be the normal one for the network you're +accessing, whether or not the bridge has an IP address. The bridge is acting +as an ethernet hub; your simluation has direct access to the normal gateway as +if the simluation were a device physically connected to the network. + + +CONFIGURING AT STARTUP +---------------------- +Most Linux distributions have a mechanism for configuring a bridge at startup. +See your distribution's documentation for more information. + + +NOTES +^^^^^ + + o Users of VMware ESXi should be aware that the bridge will place the contained + ethernet interface into promiscuous mode (don't ask me why). ESXi will + reject this by default, and nothing will work. To fix this, edit the + properties of the relevant vSwitch or VLAN, select the Security tab, and + set "Promiscuous Mode" to "Accept". + + If anyone knows a better way to deal with this, or if I'm misunderstanding + what's happening there, please do tell. + + I don't know if VMware's consumer products have similar issues or not. + + +-- Steve + http://floating.io diff --git a/configs/sim/bas/defconfig b/configs/sim/bas/defconfig index 940018a8ad4..a20524034a8 100644 --- a/configs/sim/bas/defconfig +++ b/configs/sim/bas/defconfig @@ -305,28 +305,28 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/sim/configdata/defconfig b/configs/sim/configdata/defconfig index d03050535df..3da0ca88e8f 100644 --- a/configs/sim/configdata/defconfig +++ b/configs/sim/configdata/defconfig @@ -326,28 +326,28 @@ CONFIG_RAMMTD_FLASHSIM=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/sim/cxxtest/defconfig b/configs/sim/cxxtest/defconfig index 67bad24948c..bd146760dc6 100644 --- a/configs/sim/cxxtest/defconfig +++ b/configs/sim/cxxtest/defconfig @@ -317,28 +317,28 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/sim/mount/defconfig b/configs/sim/mount/defconfig index 3465d1daed5..e95d92e04a5 100644 --- a/configs/sim/mount/defconfig +++ b/configs/sim/mount/defconfig @@ -316,28 +316,28 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/sim/mtdpart/defconfig b/configs/sim/mtdpart/defconfig index d8c84e8a95c..ac90d3010b6 100644 --- a/configs/sim/mtdpart/defconfig +++ b/configs/sim/mtdpart/defconfig @@ -324,28 +324,28 @@ CONFIG_RAMMTD_FLASHSIM=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/sim/mtdrwb/defconfig b/configs/sim/mtdrwb/defconfig index f4b00409293..18f38462f07 100644 --- a/configs/sim/mtdrwb/defconfig +++ b/configs/sim/mtdrwb/defconfig @@ -355,28 +355,28 @@ CONFIG_RAMMTD_FLASHSIM=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/sim/nettest/defconfig b/configs/sim/nettest/defconfig index 80ce9f678f7..d5a3b826519 100644 --- a/configs/sim/nettest/defconfig +++ b/configs/sim/nettest/defconfig @@ -37,6 +37,7 @@ CONFIG_BUILD_FLAT=y # CONFIG_ARCH_MATH_H is not set # CONFIG_ARCH_FLOAT_H is not set # CONFIG_ARCH_STDARG_H is not set +# CONFIG_ARCH_DEBUG_H is not set # # Debug Options @@ -73,6 +74,8 @@ CONFIG_HOST_X86_64=y CONFIG_SIM_X8664_SYSTEMV=y # CONFIG_SIM_X8664_MICROSOFT is not set # CONFIG_SIM_WALLTIME is not set +CONFIG_SIM_NET_HOST_ROUTE=y +# CONFIG_SIM_NET_BRIDGE is not set # CONFIG_SIM_FRAMEBUFFER is not set # CONFIG_SIM_SPIFLASH is not set @@ -87,6 +90,7 @@ CONFIG_SIM_X8664_SYSTEMV=y # CONFIG_ARCH_HAVE_COHERENT_DCACHE is not set # CONFIG_ARCH_HAVE_ADDRENV is not set # CONFIG_ARCH_NEED_ADDRENV_MAPPING is not set +CONFIG_ARCH_HAVE_MULTICPU=y # CONFIG_ARCH_HAVE_VFORK is not set # CONFIG_ARCH_HAVE_MMU is not set # CONFIG_ARCH_HAVE_MPU is not set @@ -230,9 +234,10 @@ CONFIG_SIG_SIGCONDTIMEDOUT=16 # CONFIG_PREALLOC_MQ_MSGS=32 CONFIG_MQ_MAXMSGSIZE=32 +# CONFIG_MODULE is not set # -# Work Queue Support +# Work queue support # # CONFIG_SCHED_WORKQUEUE is not set # CONFIG_SCHED_HPWORK is not set @@ -281,8 +286,16 @@ CONFIG_DEV_NULL=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set +# CONFIG_IOEXPANDER is not set # CONFIG_LCD is not set + +# +# LED Support +# +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set # CONFIG_MMCSD is not set +# CONFIG_MODEM is not set # CONFIG_MTD is not set # CONFIG_EEPROM is not set # CONFIG_NETDEVICES is not set @@ -295,28 +308,28 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration @@ -475,7 +488,9 @@ CONFIG_FS_FAT=y # CONFIG_FAT_LCNAMES is not set # CONFIG_FAT_LFN is not set # CONFIG_FS_FATTIME is not set +# CONFIG_FAT_FORCE_INDIRECT is not set # CONFIG_FAT_DMAMEMORY is not set +# CONFIG_FAT_DIRECT_RETRY is not set # CONFIG_FS_NXFFS is not set # CONFIG_FS_ROMFS is not set # CONFIG_FS_TMPFS is not set @@ -508,6 +523,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -553,6 +572,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # CONFIG_NETDB_HOSTFILE is not set @@ -579,6 +600,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # Examples # +# CONFIG_EXAMPLES_CHAT is not set # CONFIG_EXAMPLES_CONFIGDATA is not set # CONFIG_EXAMPLES_CPUHOG is not set # CONFIG_EXAMPLES_DHCPD is not set @@ -620,11 +642,12 @@ CONFIG_EXAMPLES_NETTEST_CLIENTIP=0xc0a8006a # CONFIG_EXAMPLES_NXLINES is not set # CONFIG_EXAMPLES_NXTEXT is not set # CONFIG_EXAMPLES_OSTEST is not set +# CONFIG_EXAMPLES_PCA9635 is not set # CONFIG_EXAMPLES_PIPE is not set # CONFIG_EXAMPLES_POLL is not set # CONFIG_EXAMPLES_PPPD is not set # CONFIG_EXAMPLES_POSIXSPAWN is not set -# CONFIG_EXAMPLES_QENCODER is not set +# CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_SENDMAIL is not set # CONFIG_EXAMPLES_SERIALBLASTER is not set @@ -632,12 +655,12 @@ CONFIG_EXAMPLES_NETTEST_CLIENTIP=0xc0a8006a # CONFIG_EXAMPLES_SERLOOP is not set # CONFIG_EXAMPLES_SLCD is not set # CONFIG_EXAMPLES_SMART is not set +# CONFIG_EXAMPLES_SMP is not set # CONFIG_EXAMPLES_TCPECHO is not set # CONFIG_EXAMPLES_TELNETD is not set # CONFIG_EXAMPLES_TIFF is not set # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_WEBSERVER is not set -# CONFIG_EXAMPLES_USBSERIAL is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set # CONFIG_EXAMPLES_WGET is not set @@ -645,6 +668,13 @@ CONFIG_EXAMPLES_NETTEST_CLIENTIP=0xc0a8006a # # File System Utilities # +# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_FSUTILS_PASSWD is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set # # Graphics Support @@ -700,11 +730,11 @@ CONFIG_NETUTILS_NETLIB=y # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set # CONFIG_SYSTEM_HEXED is not set # CONFIG_SYSTEM_RAMTEST is not set # CONFIG_READLINE_HAVE_EXTMATCH is not set # CONFIG_SYSTEM_READLINE is not set # CONFIG_SYSTEM_SUDOKU is not set # CONFIG_SYSTEM_VI is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/sim/nsh/defconfig b/configs/sim/nsh/defconfig index 5d8fe8b2179..d486dc1b471 100644 --- a/configs/sim/nsh/defconfig +++ b/configs/sim/nsh/defconfig @@ -314,28 +314,28 @@ CONFIG_DEV_LOOP=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/sim/nsh2/defconfig b/configs/sim/nsh2/defconfig index f30165ec1d3..4ff288e4844 100644 --- a/configs/sim/nsh2/defconfig +++ b/configs/sim/nsh2/defconfig @@ -314,28 +314,28 @@ CONFIG_INPUT=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/sim/nx/defconfig b/configs/sim/nx/defconfig index a59b295ec7f..14c4f151056 100644 --- a/configs/sim/nx/defconfig +++ b/configs/sim/nx/defconfig @@ -320,28 +320,28 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/sim/nx11/defconfig b/configs/sim/nx11/defconfig index 31cbedd1085..5db318657fb 100644 --- a/configs/sim/nx11/defconfig +++ b/configs/sim/nx11/defconfig @@ -321,28 +321,28 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/sim/nxffs/defconfig b/configs/sim/nxffs/defconfig index 878f5a9b760..167222da6c9 100644 --- a/configs/sim/nxffs/defconfig +++ b/configs/sim/nxffs/defconfig @@ -301,28 +301,28 @@ CONFIG_RAMMTD_FLASHSIM=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/sim/nxlines/defconfig b/configs/sim/nxlines/defconfig index 9b878efec1b..b31cb37fa47 100644 --- a/configs/sim/nxlines/defconfig +++ b/configs/sim/nxlines/defconfig @@ -312,28 +312,28 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/sim/nxwm/defconfig b/configs/sim/nxwm/defconfig index 5629cecde1d..1c872a87925 100644 --- a/configs/sim/nxwm/defconfig +++ b/configs/sim/nxwm/defconfig @@ -311,28 +311,28 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/sim/ostest/defconfig b/configs/sim/ostest/defconfig index 142326ee31f..b5065b098b5 100644 --- a/configs/sim/ostest/defconfig +++ b/configs/sim/ostest/defconfig @@ -328,28 +328,28 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/sim/pashello/defconfig b/configs/sim/pashello/defconfig index 70e3e55df05..2fed08f743c 100644 --- a/configs/sim/pashello/defconfig +++ b/configs/sim/pashello/defconfig @@ -293,28 +293,28 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/sim/src/sim_appinit.c b/configs/sim/src/sim_appinit.c index eecf0415cf6..4100ec736bd 100644 --- a/configs/sim/src/sim_appinit.c +++ b/configs/sim/src/sim_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * configs/sim/src/sim_appinit.c * - * Copyright (C) 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -54,10 +54,25 @@ * called directly from application code, but only indirectly via the * (non-standard) boardctl() interface using the command BOARDIOC_INIT. * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. + * ****************************************************************************/ #ifdef CONFIG_LIB_BOARDCTL -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #ifndef CONFIG_BOARD_INITIALIZE sim_bringup(); diff --git a/configs/sim/touchscreen/defconfig b/configs/sim/touchscreen/defconfig index 7baca3000ab..5887fafd2a9 100644 --- a/configs/sim/touchscreen/defconfig +++ b/configs/sim/touchscreen/defconfig @@ -343,28 +343,28 @@ CONFIG_INPUT=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/sim/traveler/defconfig b/configs/sim/traveler/defconfig index f001ac56491..86e5d9cc773 100644 --- a/configs/sim/traveler/defconfig +++ b/configs/sim/traveler/defconfig @@ -335,28 +335,28 @@ CONFIG_AJOYSTICK=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/sim/udgram/defconfig b/configs/sim/udgram/defconfig index bf678170a08..e4b3854ac5f 100644 --- a/configs/sim/udgram/defconfig +++ b/configs/sim/udgram/defconfig @@ -37,6 +37,7 @@ CONFIG_BUILD_FLAT=y # CONFIG_ARCH_MATH_H is not set # CONFIG_ARCH_FLOAT_H is not set # CONFIG_ARCH_STDARG_H is not set +# CONFIG_ARCH_DEBUG_H is not set # # Debug Options @@ -73,6 +74,8 @@ CONFIG_HOST_X86_64=y CONFIG_SIM_X8664_SYSTEMV=y # CONFIG_SIM_X8664_MICROSOFT is not set CONFIG_SIM_WALLTIME=y +CONFIG_SIM_NET_HOST_ROUTE=y +# CONFIG_SIM_NET_BRIDGE is not set # CONFIG_SIM_FRAMEBUFFER is not set # CONFIG_SIM_SPIFLASH is not set @@ -87,6 +90,7 @@ CONFIG_SIM_WALLTIME=y # CONFIG_ARCH_HAVE_COHERENT_DCACHE is not set # CONFIG_ARCH_HAVE_ADDRENV is not set # CONFIG_ARCH_NEED_ADDRENV_MAPPING is not set +CONFIG_ARCH_HAVE_MULTICPU=y # CONFIG_ARCH_HAVE_VFORK is not set # CONFIG_ARCH_HAVE_MMU is not set # CONFIG_ARCH_HAVE_MPU is not set @@ -242,9 +246,10 @@ CONFIG_SIG_SIGCONDTIMEDOUT=16 # CONFIG_PREALLOC_MQ_MSGS=32 CONFIG_MQ_MAXMSGSIZE=32 +# CONFIG_MODULE is not set # -# Work Queue Support +# Work queue support # # CONFIG_SCHED_WORKQUEUE is not set # CONFIG_SCHED_HPWORK is not set @@ -293,8 +298,16 @@ CONFIG_DEV_NULL=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set +# CONFIG_IOEXPANDER is not set # CONFIG_LCD is not set + +# +# LED Support +# +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set # CONFIG_MMCSD is not set +# CONFIG_MODEM is not set # CONFIG_MTD is not set # CONFIG_EEPROM is not set # CONFIG_NETDEVICES is not set @@ -307,28 +320,28 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration @@ -464,13 +477,16 @@ CONFIG_FAT_LCNAMES=y CONFIG_FAT_LFN=y CONFIG_FAT_MAXFNAME=32 # CONFIG_FS_FATTIME is not set +# CONFIG_FAT_FORCE_INDIRECT is not set # CONFIG_FAT_DMAMEMORY is not set +# CONFIG_FAT_DIRECT_RETRY is not set # CONFIG_FS_NXFFS is not set CONFIG_FS_ROMFS=y # CONFIG_FS_TMPFS is not set # CONFIG_FS_SMARTFS is not set CONFIG_FS_BINFS=y CONFIG_FS_PROCFS=y +# CONFIG_FS_PROCFS_REGISTER is not set # # Exclude individual procfs entries @@ -506,6 +522,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -555,6 +575,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set CONFIG_LIBC_NETDB=y # CONFIG_NETDB_HOSTFILE is not set @@ -586,6 +608,7 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # Examples # +# CONFIG_EXAMPLES_CHAT is not set # CONFIG_EXAMPLES_CONFIGDATA is not set # CONFIG_EXAMPLES_CPUHOG is not set # CONFIG_EXAMPLES_DHCPD is not set @@ -594,6 +617,8 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # CONFIG_EXAMPLES_FTPC is not set # CONFIG_EXAMPLES_FTPD is not set CONFIG_EXAMPLES_HELLO=y +CONFIG_EXAMPLES_HELLO_PRIORITY=100 +CONFIG_EXAMPLES_HELLO_STACKSIZE=2048 # CONFIG_EXAMPLES_JSON is not set # CONFIG_EXAMPLES_HIDKBD is not set # CONFIG_EXAMPLES_KEYPADTEST is not set @@ -613,10 +638,11 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_NXLINES is not set # CONFIG_EXAMPLES_NXTEXT is not set # CONFIG_EXAMPLES_OSTEST is not set +# CONFIG_EXAMPLES_PCA9635 is not set # CONFIG_EXAMPLES_PIPE is not set # CONFIG_EXAMPLES_PPPD is not set # CONFIG_EXAMPLES_POSIXSPAWN is not set -# CONFIG_EXAMPLES_QENCODER is not set +# CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_ROMFS is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -626,6 +652,7 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_SLCD is not set # CONFIG_EXAMPLES_SMART_TEST is not set # CONFIG_EXAMPLES_SMART is not set +# CONFIG_EXAMPLES_SMP is not set # CONFIG_EXAMPLES_TCPECHO is not set # CONFIG_EXAMPLES_TELNETD is not set # CONFIG_EXAMPLES_THTTPD is not set @@ -649,6 +676,13 @@ CONFIG_EXAMPLES_UDGRAM_CLIENT_PRIORITY=100 # # File System Utilities # +# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_FSUTILS_PASSWD is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set # # Graphics Support @@ -682,6 +716,7 @@ CONFIG_NETUTILS_NETLIB=y # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -742,6 +777,7 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_SET is not set # CONFIG_NSH_DISABLE_SH is not set # CONFIG_NSH_DISABLE_SLEEP is not set +# CONFIG_NSH_DISABLE_TIME is not set # CONFIG_NSH_DISABLE_TEST is not set # CONFIG_NSH_DISABLE_UMOUNT is not set # CONFIG_NSH_DISABLE_UNAME is not set @@ -796,6 +832,8 @@ CONFIG_NSH_ARCHINIT=y # # CONFIG_NSH_NOMAC is not set CONFIG_NSH_MAX_ROUNDTRIP=20 +# CONFIG_NSH_LOGIN is not set +# CONFIG_NSH_CONSOLE_LOGIN is not set # # NxWidgets/NxWM @@ -814,7 +852,6 @@ CONFIG_NSH_MAX_ROUNDTRIP=20 # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set # CONFIG_SYSTEM_HEXED is not set # CONFIG_SYSTEM_NETDB is not set # CONFIG_SYSTEM_RAMTEST is not set @@ -826,4 +863,5 @@ CONFIG_READLINE_ECHO=y # CONFIG_SYSTEM_SUDOKU is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_SYMTAB is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/sim/unionfs/defconfig b/configs/sim/unionfs/defconfig index ca5af52a631..5646c7bccde 100644 --- a/configs/sim/unionfs/defconfig +++ b/configs/sim/unionfs/defconfig @@ -305,28 +305,28 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/sim/ustream/defconfig b/configs/sim/ustream/defconfig index 31a861a5ace..14d9bde8797 100644 --- a/configs/sim/ustream/defconfig +++ b/configs/sim/ustream/defconfig @@ -37,6 +37,7 @@ CONFIG_BUILD_FLAT=y # CONFIG_ARCH_MATH_H is not set # CONFIG_ARCH_FLOAT_H is not set # CONFIG_ARCH_STDARG_H is not set +# CONFIG_ARCH_DEBUG_H is not set # # Debug Options @@ -73,6 +74,8 @@ CONFIG_HOST_X86_64=y CONFIG_SIM_X8664_SYSTEMV=y # CONFIG_SIM_X8664_MICROSOFT is not set CONFIG_SIM_WALLTIME=y +CONFIG_SIM_NET_HOST_ROUTE=y +# CONFIG_SIM_NET_BRIDGE is not set # CONFIG_SIM_FRAMEBUFFER is not set # CONFIG_SIM_SPIFLASH is not set @@ -87,6 +90,7 @@ CONFIG_SIM_WALLTIME=y # CONFIG_ARCH_HAVE_COHERENT_DCACHE is not set # CONFIG_ARCH_HAVE_ADDRENV is not set # CONFIG_ARCH_NEED_ADDRENV_MAPPING is not set +CONFIG_ARCH_HAVE_MULTICPU=y # CONFIG_ARCH_HAVE_VFORK is not set # CONFIG_ARCH_HAVE_MMU is not set # CONFIG_ARCH_HAVE_MPU is not set @@ -242,9 +246,10 @@ CONFIG_SIG_SIGCONDTIMEDOUT=16 # CONFIG_PREALLOC_MQ_MSGS=32 CONFIG_MQ_MAXMSGSIZE=32 +# CONFIG_MODULE is not set # -# Work Queue Support +# Work queue support # # CONFIG_SCHED_WORKQUEUE is not set # CONFIG_SCHED_HPWORK is not set @@ -293,8 +298,16 @@ CONFIG_DEV_NULL=y # CONFIG_VIDEO_DEVICES is not set # CONFIG_BCH is not set # CONFIG_INPUT is not set +# CONFIG_IOEXPANDER is not set # CONFIG_LCD is not set + +# +# LED Support +# +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set # CONFIG_MMCSD is not set +# CONFIG_MODEM is not set # CONFIG_MTD is not set # CONFIG_EEPROM is not set # CONFIG_NETDEVICES is not set @@ -307,28 +320,28 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration @@ -464,13 +477,16 @@ CONFIG_FAT_LCNAMES=y CONFIG_FAT_LFN=y CONFIG_FAT_MAXFNAME=32 # CONFIG_FS_FATTIME is not set +# CONFIG_FAT_FORCE_INDIRECT is not set # CONFIG_FAT_DMAMEMORY is not set +# CONFIG_FAT_DIRECT_RETRY is not set # CONFIG_FS_NXFFS is not set CONFIG_FS_ROMFS=y # CONFIG_FS_TMPFS is not set # CONFIG_FS_SMARTFS is not set CONFIG_FS_BINFS=y CONFIG_FS_PROCFS=y +# CONFIG_FS_PROCFS_REGISTER is not set # # Exclude individual procfs entries @@ -506,6 +522,10 @@ CONFIG_MM_REGIONS=1 # # CONFIG_AUDIO is not set +# +# Wireless Support +# + # # Binary Loader # @@ -555,6 +575,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set CONFIG_LIBC_NETDB=y # CONFIG_NETDB_HOSTFILE is not set @@ -586,6 +608,7 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # # Examples # +# CONFIG_EXAMPLES_CHAT is not set # CONFIG_EXAMPLES_CONFIGDATA is not set # CONFIG_EXAMPLES_CPUHOG is not set # CONFIG_EXAMPLES_DHCPD is not set @@ -594,6 +617,8 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024 # CONFIG_EXAMPLES_FTPC is not set # CONFIG_EXAMPLES_FTPD is not set CONFIG_EXAMPLES_HELLO=y +CONFIG_EXAMPLES_HELLO_PRIORITY=100 +CONFIG_EXAMPLES_HELLO_STACKSIZE=2048 # CONFIG_EXAMPLES_JSON is not set # CONFIG_EXAMPLES_HIDKBD is not set # CONFIG_EXAMPLES_KEYPADTEST is not set @@ -613,10 +638,11 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_NXLINES is not set # CONFIG_EXAMPLES_NXTEXT is not set # CONFIG_EXAMPLES_OSTEST is not set +# CONFIG_EXAMPLES_PCA9635 is not set # CONFIG_EXAMPLES_PIPE is not set # CONFIG_EXAMPLES_PPPD is not set # CONFIG_EXAMPLES_POSIXSPAWN is not set -# CONFIG_EXAMPLES_QENCODER is not set +# CONFIG_EXAMPLES_RGBLED is not set # CONFIG_EXAMPLES_RGMP is not set # CONFIG_EXAMPLES_ROMFS is not set # CONFIG_EXAMPLES_SENDMAIL is not set @@ -626,6 +652,7 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_SLCD is not set # CONFIG_EXAMPLES_SMART_TEST is not set # CONFIG_EXAMPLES_SMART is not set +# CONFIG_EXAMPLES_SMP is not set # CONFIG_EXAMPLES_TCPECHO is not set # CONFIG_EXAMPLES_TELNETD is not set # CONFIG_EXAMPLES_THTTPD is not set @@ -644,6 +671,13 @@ CONFIG_EXAMPLES_USTREAM_ADDR="/dev/fifo" # # File System Utilities # +# CONFIG_FSUTILS_INIFILE is not set +# CONFIG_FSUTILS_PASSWD is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set # # Graphics Support @@ -677,6 +711,7 @@ CONFIG_NETUTILS_NETLIB=y # NSH Library # CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set # # Command Line Configuration @@ -737,6 +772,7 @@ CONFIG_NSH_DISABLE_LOSMART=y # CONFIG_NSH_DISABLE_SET is not set # CONFIG_NSH_DISABLE_SH is not set # CONFIG_NSH_DISABLE_SLEEP is not set +# CONFIG_NSH_DISABLE_TIME is not set # CONFIG_NSH_DISABLE_TEST is not set # CONFIG_NSH_DISABLE_UMOUNT is not set # CONFIG_NSH_DISABLE_UNAME is not set @@ -791,6 +827,8 @@ CONFIG_NSH_ARCHINIT=y # # CONFIG_NSH_NOMAC is not set CONFIG_NSH_MAX_ROUNDTRIP=20 +# CONFIG_NSH_LOGIN is not set +# CONFIG_NSH_CONSOLE_LOGIN is not set # # NxWidgets/NxWM @@ -809,7 +847,6 @@ CONFIG_NSH_MAX_ROUNDTRIP=20 # CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_INSTALL is not set # CONFIG_SYSTEM_HEX2BIN is not set -# CONFIG_FSUTILS_INIFILE is not set # CONFIG_SYSTEM_HEXED is not set # CONFIG_SYSTEM_NETDB is not set # CONFIG_SYSTEM_RAMTEST is not set @@ -821,4 +858,5 @@ CONFIG_READLINE_ECHO=y # CONFIG_SYSTEM_SUDOKU is not set # CONFIG_SYSTEM_VI is not set # CONFIG_SYSTEM_SYMTAB is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set # CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/spark/composite/defconfig b/configs/spark/composite/defconfig index eb394d18573..0db4b8554e6 100644 --- a/configs/spark/composite/defconfig +++ b/configs/spark/composite/defconfig @@ -76,6 +76,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -94,6 +95,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -115,6 +117,7 @@ CONFIG_ARCH_CORTEXM3=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -122,6 +125,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y # CONFIG_ARMV7M_LAZYFPU is not set # CONFIG_ARCH_HAVE_FPU is not set # CONFIG_ARCH_HAVE_DPFPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -132,6 +136,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL=y @@ -238,6 +243,7 @@ CONFIG_ARCH_CHIP_STM32F103CB=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -407,14 +413,18 @@ CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y # CONFIG_STM32_TIM5_CAP is not set # CONFIG_STM32_TIM8_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART2_SERIALDRIVER=y +# CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set # CONFIG_USART2_RXDMA is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # @@ -710,6 +720,7 @@ CONFIG_MTD_BYTE_WRITE=y # CONFIG_MTD_AT45DB is not set # CONFIG_MTD_M25P is not set # CONFIG_MTD_S25FL1 is not set +# CONFIG_MTD_N25QXXX is not set # CONFIG_MTD_SMART is not set # CONFIG_MTD_RAMTRON is not set CONFIG_MTD_SST25=y @@ -720,6 +731,7 @@ CONFIG_SST25_SECTOR512=y # CONFIG_SST25_SLOWWRITE is not set # CONFIG_SST25_SLOWREAD is not set # CONFIG_MTD_SST25XX is not set +# CONFIG_MTD_SST26 is not set # CONFIG_MTD_SST39FV is not set # CONFIG_MTD_W25 is not set # CONFIG_EEPROM is not set @@ -732,33 +744,28 @@ CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set CONFIG_SERIAL_REMOVABLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -CONFIG_ARCH_HAVE_USART2=y -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART2_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +CONFIG_USART2_SERIALDRIVER=y +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -795,7 +802,6 @@ CONFIG_USBDEV_MAXPOWER=100 # CONFIG_ARCH_USBDEV_STALLQUEUE is not set CONFIG_USBDEV_TRACE=y CONFIG_USBDEV_TRACE_NRECORDS=32 -CONFIG_USBDEV_TRACE_STRINGS=y # CONFIG_USBDEV_TRACE_INITIALIDSET is not set # @@ -827,8 +833,8 @@ CONFIG_CDCACM_EPBULKOUT_HSSIZE=64 CONFIG_CDCACM_EPBULKIN=2 CONFIG_CDCACM_EPBULKIN_FSSIZE=64 CONFIG_CDCACM_EPBULKIN_HSSIZE=64 -CONFIG_CDCACM_NWRREQS=2 CONFIG_CDCACM_NRDREQS=2 +CONFIG_CDCACM_NWRREQS=2 CONFIG_CDCACM_BULKIN_REQLEN=96 CONFIG_CDCACM_RXBUFSIZE=96 CONFIG_CDCACM_TXBUFSIZE=96 @@ -1002,6 +1008,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=0 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # CONFIG_NETDB_HOSTFILE is not set @@ -1123,6 +1131,7 @@ CONFIG_EXAMPLES_NSH=y # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/spark/nsh/defconfig b/configs/spark/nsh/defconfig index a0a949c9b75..a5f8963ab45 100644 --- a/configs/spark/nsh/defconfig +++ b/configs/spark/nsh/defconfig @@ -76,6 +76,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -94,6 +95,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -115,6 +117,7 @@ CONFIG_ARCH_CORTEXM3=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -122,6 +125,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y # CONFIG_ARMV7M_LAZYFPU is not set # CONFIG_ARCH_HAVE_FPU is not set # CONFIG_ARCH_HAVE_DPFPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -132,6 +136,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL=y @@ -238,6 +243,7 @@ CONFIG_ARCH_CHIP_STM32F103CB=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -407,14 +413,18 @@ CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y # CONFIG_STM32_TIM5_CAP is not set # CONFIG_STM32_TIM8_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART2_SERIALDRIVER=y +# CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set # CONFIG_USART2_RXDMA is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # @@ -529,6 +539,7 @@ CONFIG_SPARK_FLASH_MINOR=0 CONFIG_LIB_BOARDCTL=y # CONFIG_BOARDCTL_RESET is not set # CONFIG_BOARDCTL_UNIQUEID is not set +# CONFIG_BOARDCTL_USBDEVCTRL is not set # CONFIG_BOARDCTL_TSCTEST is not set # CONFIG_BOARDCTL_ADCTEST is not set # CONFIG_BOARDCTL_PWMTEST is not set @@ -709,6 +720,7 @@ CONFIG_MTD_BYTE_WRITE=y # CONFIG_MTD_AT45DB is not set # CONFIG_MTD_M25P is not set # CONFIG_MTD_S25FL1 is not set +# CONFIG_MTD_N25QXXX is not set # CONFIG_MTD_SMART is not set # CONFIG_MTD_RAMTRON is not set CONFIG_MTD_SST25=y @@ -719,6 +731,7 @@ CONFIG_SST25_SECTOR512=y # CONFIG_SST25_SLOWWRITE is not set # CONFIG_SST25_SLOWREAD is not set # CONFIG_MTD_SST25XX is not set +# CONFIG_MTD_SST26 is not set # CONFIG_MTD_SST39FV is not set # CONFIG_MTD_W25 is not set # CONFIG_EEPROM is not set @@ -731,33 +744,28 @@ CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set CONFIG_SERIAL_REMOVABLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -CONFIG_ARCH_HAVE_USART2=y -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART2_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +CONFIG_USART2_SERIALDRIVER=y +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -794,7 +802,6 @@ CONFIG_USBDEV_MAXPOWER=100 # CONFIG_ARCH_USBDEV_STALLQUEUE is not set CONFIG_USBDEV_TRACE=y CONFIG_USBDEV_TRACE_NRECORDS=32 -# CONFIG_USBDEV_TRACE_STRINGS is not set # CONFIG_USBDEV_TRACE_INITIALIDSET is not set # @@ -826,8 +833,8 @@ CONFIG_CDCACM_EPBULKOUT_HSSIZE=512 CONFIG_CDCACM_EPBULKIN=2 CONFIG_CDCACM_EPBULKIN_FSSIZE=64 CONFIG_CDCACM_EPBULKIN_HSSIZE=512 -CONFIG_CDCACM_NWRREQS=4 CONFIG_CDCACM_NRDREQS=4 +CONFIG_CDCACM_NWRREQS=4 CONFIG_CDCACM_BULKIN_REQLEN=100 CONFIG_CDCACM_RXBUFSIZE=100 CONFIG_CDCACM_TXBUFSIZE=80 @@ -1001,6 +1008,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=0 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # CONFIG_NETDB_HOSTFILE is not set @@ -1122,6 +1131,7 @@ CONFIG_EXAMPLES_NSH=y # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/spark/src/Makefile b/configs/spark/src/Makefile index 5a375120db3..51ee3a02805 100644 --- a/configs/spark/src/Makefile +++ b/configs/spark/src/Makefile @@ -69,10 +69,6 @@ ifeq ($(CONFIG_WL_CC3000),y) CSRCS += stm32_wireless.c endif -ifeq ($(CONFIG_WATCHDOG),y) -CSRCS += stm32_watchdog.c -endif - ifeq ($(CONFIG_CC3000_PROBES),) CSRCS += stm32_io.c endif diff --git a/configs/spark/src/stm32_appinit.c b/configs/spark/src/stm32_appinit.c index 9b2d965a31c..c91969cd590 100644 --- a/configs/spark/src/stm32_appinit.c +++ b/configs/spark/src/stm32_appinit.c @@ -130,11 +130,28 @@ static bool g_app_initialzed; * Name: board_app_initialize * * Description: - * Perform architecture specific initialization + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface using the command BOARDIOC_INIT. + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { /* Check if already initialized */ diff --git a/configs/spark/src/stm32_boot.c b/configs/spark/src/stm32_boot.c index 763538bebdf..6d278fb5029 100644 --- a/configs/spark/src/stm32_boot.c +++ b/configs/spark/src/stm32_boot.c @@ -123,7 +123,7 @@ void board_initialize(void) */ #if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_LIB_BOARDCTL) - board_app_initialize(); + board_app_initialize(0); #endif /* CC3000 wireless initialization diff --git a/configs/spark/src/stm32_usbmsc.c b/configs/spark/src/stm32_usbmsc.c index 23c4cc9533e..57e9e30d82c 100644 --- a/configs/spark/src/stm32_usbmsc.c +++ b/configs/spark/src/stm32_usbmsc.c @@ -62,7 +62,7 @@ int board_usbmsc_initialize(int port) { - return board_app_initialize(); + return board_app_initialize(0); } #endif /* CONFIG_USBMSC && CONFIG_BOARDCTL_USBDEVCTRL */ diff --git a/configs/spark/usbmsc/defconfig b/configs/spark/usbmsc/defconfig index eba276536d4..ae97bcd86c8 100644 --- a/configs/spark/usbmsc/defconfig +++ b/configs/spark/usbmsc/defconfig @@ -76,6 +76,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -94,6 +95,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -115,6 +117,7 @@ CONFIG_ARCH_CORTEXM3=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -122,6 +125,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y # CONFIG_ARMV7M_LAZYFPU is not set # CONFIG_ARCH_HAVE_FPU is not set # CONFIG_ARCH_HAVE_DPFPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -132,6 +136,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL=y @@ -238,6 +243,7 @@ CONFIG_ARCH_CHIP_STM32F103CB=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -407,14 +413,18 @@ CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y # CONFIG_STM32_TIM5_CAP is not set # CONFIG_STM32_TIM8_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART2_SERIALDRIVER=y +# CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set # CONFIG_USART2_RXDMA is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # @@ -710,6 +720,7 @@ CONFIG_MTD_BYTE_WRITE=y # CONFIG_MTD_AT45DB is not set # CONFIG_MTD_M25P is not set # CONFIG_MTD_S25FL1 is not set +# CONFIG_MTD_N25QXXX is not set # CONFIG_MTD_SMART is not set # CONFIG_MTD_RAMTRON is not set CONFIG_MTD_SST25=y @@ -720,6 +731,7 @@ CONFIG_SST25_SECTOR512=y # CONFIG_SST25_SLOWWRITE is not set # CONFIG_SST25_SLOWREAD is not set # CONFIG_MTD_SST25XX is not set +# CONFIG_MTD_SST26 is not set # CONFIG_MTD_SST39FV is not set # CONFIG_MTD_W25 is not set # CONFIG_EEPROM is not set @@ -731,33 +743,28 @@ CONFIG_SST25_SECTOR512=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -CONFIG_ARCH_HAVE_USART2=y -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART2_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +CONFIG_USART2_SERIALDRIVER=y +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -794,7 +801,6 @@ CONFIG_USBDEV_MAXPOWER=100 # CONFIG_ARCH_USBDEV_STALLQUEUE is not set CONFIG_USBDEV_TRACE=y CONFIG_USBDEV_TRACE_NRECORDS=32 -CONFIG_USBDEV_TRACE_STRINGS=y # CONFIG_USBDEV_TRACE_INITIALIDSET is not set # @@ -966,6 +972,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=0 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # CONFIG_NETDB_HOSTFILE is not set @@ -1087,6 +1095,7 @@ CONFIG_EXAMPLES_NSH=y # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/spark/usbnsh/defconfig b/configs/spark/usbnsh/defconfig index 30e873009d5..5c7f49052dc 100644 --- a/configs/spark/usbnsh/defconfig +++ b/configs/spark/usbnsh/defconfig @@ -76,6 +76,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -94,6 +95,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -115,6 +117,7 @@ CONFIG_ARCH_CORTEXM3=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -122,6 +125,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y # CONFIG_ARMV7M_LAZYFPU is not set # CONFIG_ARCH_HAVE_FPU is not set # CONFIG_ARCH_HAVE_DPFPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -132,6 +136,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL=y @@ -238,6 +243,7 @@ CONFIG_ARCH_CHIP_STM32F103CB=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -407,14 +413,18 @@ CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y # CONFIG_STM32_TIM5_CAP is not set # CONFIG_STM32_TIM8_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART2_SERIALDRIVER=y +# CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set # CONFIG_USART2_RXDMA is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # @@ -526,7 +536,14 @@ CONFIG_SPARK_FLASH_SPI=2 CONFIG_SPARK_FLASH_MINOR=0 # CONFIG_SPARK_FLASH_PART is not set CONFIG_LIB_BOARDCTL=y +# CONFIG_BOARDCTL_RESET is not set +# CONFIG_BOARDCTL_UNIQUEID is not set CONFIG_BOARDCTL_USBDEVCTRL=y +# CONFIG_BOARDCTL_TSCTEST is not set +# CONFIG_BOARDCTL_ADCTEST is not set +# CONFIG_BOARDCTL_PWMTEST is not set +# CONFIG_BOARDCTL_GRAPHICS is not set +# CONFIG_BOARDCTL_IOCTL is not set # # RTOS Features @@ -704,6 +721,7 @@ CONFIG_MTD_BYTE_WRITE=y # CONFIG_MTD_AT45DB is not set # CONFIG_MTD_M25P is not set # CONFIG_MTD_S25FL1 is not set +# CONFIG_MTD_N25QXXX is not set # CONFIG_MTD_SMART is not set # CONFIG_MTD_RAMTRON is not set CONFIG_MTD_SST25=y @@ -714,6 +732,7 @@ CONFIG_SST25_SPIFREQUENCY=20000000 # CONFIG_SST25_SLOWWRITE is not set # CONFIG_SST25_SLOWREAD is not set # CONFIG_MTD_SST25XX is not set +# CONFIG_MTD_SST26 is not set # CONFIG_MTD_SST39FV is not set # CONFIG_MTD_W25 is not set # CONFIG_EEPROM is not set @@ -725,33 +744,28 @@ CONFIG_SST25_SPIFREQUENCY=20000000 CONFIG_SERIAL=y CONFIG_SERIAL_REMOVABLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -CONFIG_ARCH_HAVE_USART2=y -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART2_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +CONFIG_USART2_SERIALDRIVER=y +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -788,7 +802,6 @@ CONFIG_USBDEV_MAXPOWER=100 # CONFIG_ARCH_USBDEV_STALLQUEUE is not set CONFIG_USBDEV_TRACE=y CONFIG_USBDEV_TRACE_NRECORDS=32 -# CONFIG_USBDEV_TRACE_STRINGS is not set # CONFIG_USBDEV_TRACE_INITIALIDSET is not set # @@ -808,8 +821,8 @@ CONFIG_CDCACM_EPBULKOUT_HSSIZE=512 CONFIG_CDCACM_EPBULKIN=2 CONFIG_CDCACM_EPBULKIN_FSSIZE=64 CONFIG_CDCACM_EPBULKIN_HSSIZE=512 -CONFIG_CDCACM_NWRREQS=4 CONFIG_CDCACM_NRDREQS=4 +CONFIG_CDCACM_NWRREQS=4 CONFIG_CDCACM_BULKIN_REQLEN=96 CONFIG_CDCACM_RXBUFSIZE=256 CONFIG_CDCACM_TXBUFSIZE=256 @@ -945,6 +958,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # CONFIG_NETDB_HOSTFILE is not set @@ -1061,6 +1076,7 @@ CONFIG_EXAMPLES_NSH=y # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/spark/usbserial/defconfig b/configs/spark/usbserial/defconfig index cfa672320f6..aba09edc985 100644 --- a/configs/spark/usbserial/defconfig +++ b/configs/spark/usbserial/defconfig @@ -76,6 +76,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -94,6 +95,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -115,6 +117,7 @@ CONFIG_ARCH_CORTEXM3=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -122,6 +125,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y # CONFIG_ARMV7M_LAZYFPU is not set # CONFIG_ARCH_HAVE_FPU is not set # CONFIG_ARCH_HAVE_DPFPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -132,6 +136,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL=y @@ -238,6 +243,7 @@ CONFIG_ARCH_CHIP_STM32F103CB=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -407,14 +413,18 @@ CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y # CONFIG_STM32_TIM5_CAP is not set # CONFIG_STM32_TIM8_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART2_SERIALDRIVER=y +# CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set # CONFIG_USART2_RXDMA is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # @@ -526,7 +536,14 @@ CONFIG_SPARK_FLASH_SPI=2 CONFIG_SPARK_FLASH_MINOR=0 # CONFIG_SPARK_FLASH_PART is not set CONFIG_LIB_BOARDCTL=y +# CONFIG_BOARDCTL_RESET is not set +# CONFIG_BOARDCTL_UNIQUEID is not set CONFIG_BOARDCTL_USBDEVCTRL=y +# CONFIG_BOARDCTL_TSCTEST is not set +# CONFIG_BOARDCTL_ADCTEST is not set +# CONFIG_BOARDCTL_PWMTEST is not set +# CONFIG_BOARDCTL_GRAPHICS is not set +# CONFIG_BOARDCTL_IOCTL is not set # # RTOS Features @@ -707,6 +724,7 @@ CONFIG_MTD_BYTE_WRITE=y # CONFIG_MTD_AT45DB is not set # CONFIG_MTD_M25P is not set # CONFIG_MTD_S25FL1 is not set +# CONFIG_MTD_N25QXXX is not set # CONFIG_MTD_SMART is not set # CONFIG_MTD_RAMTRON is not set CONFIG_MTD_SST25=y @@ -717,6 +735,7 @@ CONFIG_SST25_SECTOR512=y # CONFIG_SST25_SLOWWRITE is not set # CONFIG_SST25_SLOWREAD is not set # CONFIG_MTD_SST25XX is not set +# CONFIG_MTD_SST26 is not set # CONFIG_MTD_SST39FV is not set # CONFIG_MTD_W25 is not set # CONFIG_EEPROM is not set @@ -729,33 +748,28 @@ CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set CONFIG_SERIAL_REMOVABLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -CONFIG_ARCH_HAVE_USART2=y -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART2_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +CONFIG_USART2_SERIALDRIVER=y +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -792,7 +806,6 @@ CONFIG_USBDEV_MAXPOWER=100 # CONFIG_ARCH_USBDEV_STALLQUEUE is not set CONFIG_USBDEV_TRACE=y CONFIG_USBDEV_TRACE_NRECORDS=32 -CONFIG_USBDEV_TRACE_STRINGS=y # CONFIG_USBDEV_TRACE_INITIALIDSET is not set # @@ -812,8 +825,8 @@ CONFIG_CDCACM_EPBULKOUT_HSSIZE=64 CONFIG_CDCACM_EPBULKIN=2 CONFIG_CDCACM_EPBULKIN_FSSIZE=64 CONFIG_CDCACM_EPBULKIN_HSSIZE=64 -CONFIG_CDCACM_NWRREQS=4 CONFIG_CDCACM_NRDREQS=4 +CONFIG_CDCACM_NWRREQS=4 CONFIG_CDCACM_BULKIN_REQLEN=96 CONFIG_CDCACM_RXBUFSIZE=40 CONFIG_CDCACM_TXBUFSIZE=40 @@ -969,6 +982,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=0 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # CONFIG_NETDB_HOSTFILE is not set @@ -1096,6 +1111,7 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=y # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/stm3210e-eval/buttons/defconfig b/configs/stm3210e-eval/buttons/defconfig index 77af75773e5..11783f56529 100644 --- a/configs/stm3210e-eval/buttons/defconfig +++ b/configs/stm3210e-eval/buttons/defconfig @@ -121,6 +121,7 @@ CONFIG_ARCH_CORTEXM3=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -139,6 +140,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARW is not set # CONFIG_ARMV7M_TOOLCHAIN_ATOLLIC is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDW is not set @@ -249,6 +251,7 @@ CONFIG_ARCH_CHIP_STM32F103ZE=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -421,14 +424,20 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_STM32_TIM5_CAP is not set # CONFIG_STM32_TIM8_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART1_SERIALDRIVER=y +# CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set +CONFIG_STM32_USART2_SERIALDRIVER=y +# CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set CONFIG_STM32_HAVE_RTC_COUNTER=y # CONFIG_STM32_HAVE_RTC_SUBSECONDS is not set @@ -678,34 +687,28 @@ CONFIG_ARCH_HAVE_I2CRESET=y CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -CONFIG_ARCH_HAVE_USART1=y -CONFIG_ARCH_HAVE_USART2=y -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART1_ISUART=y -CONFIG_USART2_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +CONFIG_USART2_SERIALDRIVER=y +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set # CONFIG_SERIAL_OFLOWCONTROL is not set @@ -972,6 +975,7 @@ CONFIG_EXAMPLES_BUTTONS_NAME7="UP" # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/stm3210e-eval/composite/defconfig b/configs/stm3210e-eval/composite/defconfig index fcd3a3edff5..d4664da4222 100644 --- a/configs/stm3210e-eval/composite/defconfig +++ b/configs/stm3210e-eval/composite/defconfig @@ -121,6 +121,7 @@ CONFIG_ARCH_CORTEXM3=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -139,6 +140,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARW is not set # CONFIG_ARMV7M_TOOLCHAIN_ATOLLIC is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDW is not set @@ -251,6 +253,7 @@ CONFIG_ARCH_CHIP_STM32F103ZE=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -424,14 +427,20 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_STM32_TIM5_CAP is not set # CONFIG_STM32_TIM8_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART1_SERIALDRIVER=y +# CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set +CONFIG_STM32_USART2_SERIALDRIVER=y +# CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # @@ -735,10 +744,12 @@ CONFIG_MTD=y # CONFIG_MTD_AT45DB is not set # CONFIG_MTD_M25P is not set # CONFIG_MTD_S25FL1 is not set +# CONFIG_MTD_N25QXXX is not set # CONFIG_MTD_SMART is not set # CONFIG_MTD_RAMTRON is not set # CONFIG_MTD_SST25 is not set # CONFIG_MTD_SST25XX is not set +# CONFIG_MTD_SST26 is not set # CONFIG_MTD_SST39FV is not set # CONFIG_MTD_W25 is not set # CONFIG_EEPROM is not set @@ -751,34 +762,28 @@ CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set CONFIG_SERIAL_REMOVABLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -CONFIG_ARCH_HAVE_USART1=y -CONFIG_ARCH_HAVE_USART2=y -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART1_ISUART=y -CONFIG_USART2_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +CONFIG_USART2_SERIALDRIVER=y +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -1120,6 +1125,7 @@ CONFIG_ARCH_HAVE_TLS=y # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/stm3210e-eval/nsh/defconfig b/configs/stm3210e-eval/nsh/defconfig index c97a503b7a5..bc1df0013a4 100644 --- a/configs/stm3210e-eval/nsh/defconfig +++ b/configs/stm3210e-eval/nsh/defconfig @@ -121,6 +121,7 @@ CONFIG_ARCH_CORTEXM3=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -139,6 +140,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARW is not set # CONFIG_ARMV7M_TOOLCHAIN_ATOLLIC is not set CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT=y # CONFIG_ARMV7M_TOOLCHAIN_CODEREDW is not set @@ -252,6 +254,7 @@ CONFIG_ARCH_CHIP_STM32F103ZE=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -425,14 +428,20 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_STM32_TIM5_CAP is not set # CONFIG_STM32_TIM8_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART1_SERIALDRIVER=y +# CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set +CONFIG_STM32_USART2_SERIALDRIVER=y +# CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # @@ -738,10 +747,12 @@ CONFIG_MTD=y # CONFIG_MTD_AT45DB is not set # CONFIG_MTD_M25P is not set # CONFIG_MTD_S25FL1 is not set +# CONFIG_MTD_N25QXXX is not set # CONFIG_MTD_SMART is not set # CONFIG_MTD_RAMTRON is not set # CONFIG_MTD_SST25 is not set # CONFIG_MTD_SST25XX is not set +# CONFIG_MTD_SST26 is not set # CONFIG_MTD_SST39FV is not set # CONFIG_MTD_W25 is not set # CONFIG_EEPROM is not set @@ -753,34 +764,28 @@ CONFIG_MTD=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -CONFIG_ARCH_HAVE_USART1=y -CONFIG_ARCH_HAVE_USART2=y -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART1_ISUART=y -CONFIG_USART2_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +CONFIG_USART2_SERIALDRIVER=y +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -1078,6 +1083,7 @@ CONFIG_EXAMPLES_NSH=y # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/stm3210e-eval/nsh2/defconfig b/configs/stm3210e-eval/nsh2/defconfig index 41120894428..c2225875619 100644 --- a/configs/stm3210e-eval/nsh2/defconfig +++ b/configs/stm3210e-eval/nsh2/defconfig @@ -121,6 +121,7 @@ CONFIG_ARCH_CORTEXM3=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -139,6 +140,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARW is not set # CONFIG_ARMV7M_TOOLCHAIN_ATOLLIC is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDW is not set @@ -251,6 +253,7 @@ CONFIG_ARCH_CHIP_STM32F103ZE=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -426,14 +429,20 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_STM32_TIM5_CAP is not set # CONFIG_STM32_TIM8_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART1_SERIALDRIVER=y +# CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set +CONFIG_STM32_USART2_SERIALDRIVER=y +# CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # @@ -752,6 +761,7 @@ CONFIG_LCD_RPORTRAIT=y # Alphanumeric/Segment LCD Devices # # CONFIG_LCD_LCD1602 is not set +# CONFIG_LCD_BACKPACK is not set # # LED Support @@ -795,10 +805,12 @@ CONFIG_MTD=y # CONFIG_MTD_AT45DB is not set # CONFIG_MTD_M25P is not set # CONFIG_MTD_S25FL1 is not set +# CONFIG_MTD_N25QXXX is not set # CONFIG_MTD_SMART is not set # CONFIG_MTD_RAMTRON is not set # CONFIG_MTD_SST25 is not set # CONFIG_MTD_SST25XX is not set +# CONFIG_MTD_SST26 is not set # CONFIG_MTD_SST39FV is not set # CONFIG_MTD_W25 is not set # CONFIG_EEPROM is not set @@ -810,34 +822,28 @@ CONFIG_MTD=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -CONFIG_ARCH_HAVE_USART1=y -CONFIG_ARCH_HAVE_USART2=y -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART1_ISUART=y -CONFIG_USART2_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +CONFIG_USART2_SERIALDRIVER=y +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -980,6 +986,7 @@ CONFIG_NX_LCDDRIVER=y CONFIG_NX_NPLANES=1 CONFIG_NX_BGCOLOR=0x0 # CONFIG_NX_WRITEONLY is not set +# CONFIG_NX_UPDATE is not set # # Supported Pixel Depths @@ -1277,6 +1284,7 @@ CONFIG_EXAMPLES_NXHELLO_FONTID=6 # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/stm3210e-eval/nx/defconfig b/configs/stm3210e-eval/nx/defconfig index 4adf156d805..2554b724aac 100644 --- a/configs/stm3210e-eval/nx/defconfig +++ b/configs/stm3210e-eval/nx/defconfig @@ -121,6 +121,7 @@ CONFIG_ARCH_CORTEXM3=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -139,6 +140,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARW is not set # CONFIG_ARMV7M_TOOLCHAIN_ATOLLIC is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDW is not set @@ -249,6 +251,7 @@ CONFIG_ARCH_CHIP_STM32F103ZE=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -424,14 +427,20 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_STM32_TIM5_CAP is not set # CONFIG_STM32_TIM8_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART1_SERIALDRIVER=y +# CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set +CONFIG_STM32_USART2_SERIALDRIVER=y +# CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # @@ -748,34 +757,28 @@ CONFIG_LCD_RPORTRAIT=y CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -CONFIG_ARCH_HAVE_USART1=y -CONFIG_ARCH_HAVE_USART2=y -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART1_ISUART=y -CONFIG_USART2_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +CONFIG_USART2_SERIALDRIVER=y +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set # CONFIG_SERIAL_OFLOWCONTROL is not set @@ -888,6 +891,7 @@ CONFIG_NX_LCDDRIVER=y CONFIG_NX_NPLANES=1 CONFIG_NX_BGCOLOR=0x0 # CONFIG_NX_WRITEONLY is not set +# CONFIG_NX_UPDATE is not set # # Supported Pixel Depths @@ -1152,6 +1156,7 @@ CONFIG_EXAMPLES_NX_TOOLBAR_HEIGHT=16 # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/stm3210e-eval/nxterm/defconfig b/configs/stm3210e-eval/nxterm/defconfig index 3bb2e0e1758..4a19b0a255c 100644 --- a/configs/stm3210e-eval/nxterm/defconfig +++ b/configs/stm3210e-eval/nxterm/defconfig @@ -121,6 +121,7 @@ CONFIG_ARCH_CORTEXM3=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -139,6 +140,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARW is not set # CONFIG_ARMV7M_TOOLCHAIN_ATOLLIC is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDW is not set @@ -249,6 +251,7 @@ CONFIG_ARCH_CHIP_STM32F103ZE=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -422,14 +425,20 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_STM32_TIM5_CAP is not set # CONFIG_STM32_TIM8_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART1_SERIALDRIVER=y +# CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set +CONFIG_STM32_USART2_SERIALDRIVER=y +# CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set CONFIG_STM32_HAVE_RTC_COUNTER=y # CONFIG_STM32_HAVE_RTC_SUBSECONDS is not set @@ -744,34 +753,28 @@ CONFIG_LCD_LANDSCAPE=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -CONFIG_ARCH_HAVE_USART1=y -CONFIG_ARCH_HAVE_USART2=y -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART1_ISUART=y -CONFIG_USART2_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +CONFIG_USART2_SERIALDRIVER=y +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -872,6 +875,7 @@ CONFIG_NX_LCDDRIVER=y CONFIG_NX_NPLANES=1 CONFIG_NX_BGCOLOR=0x0 # CONFIG_NX_WRITEONLY is not set +# CONFIG_NX_UPDATE is not set # # Supported Pixel Depths @@ -1153,6 +1157,7 @@ CONFIG_EXAMPLES_NXTERM=y # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/stm3210e-eval/pm/defconfig b/configs/stm3210e-eval/pm/defconfig index af1908d6354..4acbe0d3a7e 100644 --- a/configs/stm3210e-eval/pm/defconfig +++ b/configs/stm3210e-eval/pm/defconfig @@ -121,6 +121,7 @@ CONFIG_ARCH_CORTEXM3=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -139,6 +140,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARW is not set # CONFIG_ARMV7M_TOOLCHAIN_ATOLLIC is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDW is not set @@ -249,6 +251,7 @@ CONFIG_ARCH_CHIP_STM32F103ZE=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -425,14 +428,20 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_STM32_TIM5_CAP is not set # CONFIG_STM32_TIM8_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART1_SERIALDRIVER=y +# CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set +CONFIG_STM32_USART2_SERIALDRIVER=y +# CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set CONFIG_STM32_HAVE_RTC_COUNTER=y # CONFIG_STM32_HAVE_RTC_SUBSECONDS is not set @@ -703,6 +712,7 @@ CONFIG_RTC=y CONFIG_RTC_HIRES=y CONFIG_RTC_FREQUENCY=16384 CONFIG_RTC_ALARM=y +CONFIG_RTC_NALARMS=1 # CONFIG_RTC_DRIVER is not set # CONFIG_RTC_EXTERNAL is not set # CONFIG_WATCHDOG is not set @@ -785,34 +795,28 @@ CONFIG_PM_SLEEPENTER_COUNT=70 CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -CONFIG_ARCH_HAVE_USART1=y -CONFIG_ARCH_HAVE_USART2=y -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART1_ISUART=y -CONFIG_USART2_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +CONFIG_USART2_SERIALDRIVER=y +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -913,6 +917,7 @@ CONFIG_NX_LCDDRIVER=y CONFIG_NX_NPLANES=1 CONFIG_NX_BGCOLOR=0x0 # CONFIG_NX_WRITEONLY is not set +# CONFIG_NX_UPDATE is not set # # Supported Pixel Depths @@ -1205,6 +1210,7 @@ CONFIG_EXAMPLES_NXHELLO_FONTID=6 # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/stm3210e-eval/src/Makefile b/configs/stm3210e-eval/src/Makefile index 301f0eed9d0..dc282c48b6e 100644 --- a/configs/stm3210e-eval/src/Makefile +++ b/configs/stm3210e-eval/src/Makefile @@ -68,10 +68,6 @@ ifeq ($(CONFIG_CAN),y) CSRCS += stm32_can.c endif -ifeq ($(CONFIG_WATCHDOG),y) -CSRCS += stm32_watchdog.c -endif - ifeq ($(CONFIG_ARCH_CUSTOM_PMINIT),y) CSRCS += stm32_pm.c endif diff --git a/configs/stm3210e-eval/src/stm32_appinit.c b/configs/stm3210e-eval/src/stm32_appinit.c index abc4e5881d0..4a5d55c9ebe 100644 --- a/configs/stm3210e-eval/src/stm32_appinit.c +++ b/configs/stm3210e-eval/src/stm32_appinit.c @@ -176,11 +176,28 @@ static void stm32_i2ctool(void) * Name: board_app_initialize * * Description: - * Perform architecture specific initialization + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface using the command BOARDIOC_INIT. + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #ifdef CONFIG_STM32_SPI1 FAR struct spi_dev_s *spi; diff --git a/configs/stm3210e-eval/src/stm32_watchdog.c b/configs/stm3210e-eval/src/stm32_watchdog.c deleted file mode 100644 index 61b65e59c8c..00000000000 --- a/configs/stm3210e-eval/src/stm32_watchdog.c +++ /dev/null @@ -1,135 +0,0 @@ -/************************************************************************************ - * configs/stm3210e-eval/src/stm32_watchdog.c - * - * Copyright (C) 2012 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * 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. - * - ************************************************************************************/ - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include -#include - -#include -#include - -#include "stm32_wdg.h" - -#ifdef CONFIG_WATCHDOG - -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ -/* Configuration *******************************************************************/ -/* Wathdog hardware should be enabled */ - -#if !defined(CONFIG_STM32_WWDG) && !defined(CONFIG_STM32_IWDG) -# warning "One of CONFIG_STM32_WWDG or CONFIG_STM32_IWDG must be defined" -#endif - -/* Select the path to the registered watchdog timer device */ - -#ifndef CONFIG_STM32_WDG_DEVPATH -# ifdef CONFIG_EXAMPLES_WATCHDOG_DEVPATH -# define CONFIG_STM32_WDG_DEVPATH CONFIG_EXAMPLES_WATCHDOG_DEVPATH -# else -# define CONFIG_STM32_WDG_DEVPATH "/dev/watchdog0" -# endif -#endif - -/* Use the un-calibrated LSI frequency if we have nothing better */ - -#if defined(CONFIG_STM32_IWDG) && !defined(CONFIG_STM32_LSIFREQ) -# define CONFIG_STM32_LSIFREQ STM32_LSI_FREQUENCY -#endif - -/* Debug ***************************************************************************/ -/* Non-standard debug that may be enabled just for testing the watchdog timer */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_WATCHDOG -#endif - -#ifdef CONFIG_DEBUG_WATCHDOG -# define wdgdbg dbg -# define wdglldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define wdgvdbg vdbg -# define wdgllvdbg llvdbg -# else -# define wdgvdbg(x...) -# define wdgllvdbg(x...) -# endif -#else -# define wdgdbg(x...) -# define wdglldbg(x...) -# define wdgvdbg(x...) -# define wdgllvdbg(x...) -#endif - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -/**************************************************************************** - * Name: up_wdginitialize() - * - * Description: - * Perform architecuture-specific initialization of the Watchdog hardware. - * This interface must be provided by all configurations using - * apps/examples/watchdog - * - ****************************************************************************/ - -int up_wdginitialize(void) -{ - /* Initialize tha register the watchdog timer device */ - -#if defined(CONFIG_STM32_WWDG) - stm32_wwdginitialize(CONFIG_STM32_WDG_DEVPATH); - return OK; -#elif defined(CONFIG_STM32_IWDG) - stm32_iwdginitialize(CONFIG_STM32_WDG_DEVPATH, CONFIG_STM32_LSIFREQ); - return OK; -#else - return -ENODEV; -#endif -} - -#endif /* CONFIG_WATCHDOG */ diff --git a/configs/stm3210e-eval/usbmsc/defconfig b/configs/stm3210e-eval/usbmsc/defconfig index 78ad7a1b5f2..001c83e4f56 100644 --- a/configs/stm3210e-eval/usbmsc/defconfig +++ b/configs/stm3210e-eval/usbmsc/defconfig @@ -117,6 +117,7 @@ CONFIG_ARCH_CORTEXM3=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -135,6 +136,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT=y # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set # CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set @@ -244,6 +246,7 @@ CONFIG_ARCH_CHIP_STM32F103ZE=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -417,14 +420,20 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_STM32_TIM5_CAP is not set # CONFIG_STM32_TIM8_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART1_SERIALDRIVER=y +# CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set +CONFIG_STM32_USART2_SERIALDRIVER=y +# CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # @@ -716,34 +725,28 @@ CONFIG_SDIO_PREFLIGHT=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -CONFIG_ARCH_HAVE_USART1=y -CONFIG_ARCH_HAVE_USART2=y -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART1_ISUART=y -CONFIG_USART2_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +CONFIG_USART2_SERIALDRIVER=y +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -1050,6 +1053,7 @@ CONFIG_ARCH_HAVE_TLS=y # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/stm3210e-eval/usbserial/defconfig b/configs/stm3210e-eval/usbserial/defconfig index b20ad0966ca..4e6b606f275 100644 --- a/configs/stm3210e-eval/usbserial/defconfig +++ b/configs/stm3210e-eval/usbserial/defconfig @@ -117,6 +117,7 @@ CONFIG_ARCH_CORTEXM3=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -135,6 +136,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT=y # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set # CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set @@ -242,6 +244,7 @@ CONFIG_ARCH_CHIP_STM32F103ZE=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -414,14 +417,20 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_STM32_TIM5_CAP is not set # CONFIG_STM32_TIM8_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART1_SERIALDRIVER=y +# CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set +CONFIG_STM32_USART2_SERIALDRIVER=y +# CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set CONFIG_STM32_HAVE_RTC_COUNTER=y # CONFIG_STM32_HAVE_RTC_SUBSECONDS is not set @@ -692,34 +701,28 @@ CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set CONFIG_SERIAL_REMOVABLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -CONFIG_ARCH_HAVE_USART1=y -CONFIG_ARCH_HAVE_USART2=y -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART1_ISUART=y -CONFIG_USART2_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +CONFIG_USART2_SERIALDRIVER=y +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -1014,6 +1017,7 @@ CONFIG_EXAMPLES_USBSERIAL_BUFSIZE=512 # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/stm3220g-eval/dhcpd/defconfig b/configs/stm3220g-eval/dhcpd/defconfig index 2817808c5e9..1a09df8349a 100644 --- a/configs/stm3220g-eval/dhcpd/defconfig +++ b/configs/stm3220g-eval/dhcpd/defconfig @@ -80,6 +80,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -98,6 +99,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -119,6 +121,7 @@ CONFIG_ARCH_CORTEXM3=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -126,6 +129,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y # CONFIG_ARMV7M_LAZYFPU is not set # CONFIG_ARCH_HAVE_FPU is not set # CONFIG_ARCH_HAVE_DPFPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -136,6 +140,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARW is not set # CONFIG_ARMV7M_TOOLCHAIN_ATOLLIC is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDW is not set @@ -246,6 +251,7 @@ CONFIG_ARCH_CHIP_STM32F207IG=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -438,13 +444,17 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_STM32_TIM13_CAP is not set # CONFIG_STM32_TIM14_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART3_SERIALDRIVER=y +# CONFIG_STM32_USART3_1WIREDRIVER is not set # CONFIG_USART3_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # CONFIG_STM32_HAVE_RTC_COUNTER is not set # CONFIG_STM32_HAVE_RTC_SUBSECONDS is not set @@ -745,33 +755,28 @@ CONFIG_ETH0_PHY_DP83848C=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -CONFIG_ARCH_HAVE_USART3=y -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART3_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +CONFIG_USART3_SERIALDRIVER=y +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -1002,6 +1007,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # CONFIG_NETDB_DNSCLIENT is not set @@ -1090,7 +1097,6 @@ CONFIG_EXAMPLES_DHCPD_NETMASK=0xffffff00 # CONFIG_EXAMPLES_UDPBLASTER is not set # CONFIG_EXAMPLES_DISCOVER is not set # CONFIG_EXAMPLES_WEBSERVER is not set -# CONFIG_EXAMPLES_USBSERIAL is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set @@ -1140,6 +1146,7 @@ CONFIG_NETUTILS_DHCPD_NETMASK=0xffffff00 CONFIG_NETUTILS_DHCPD_DNSIP=0x08080808 CONFIG_NETUTILS_DHCPD_OFFERTIME=3600 CONFIG_NETUTILS_DHCPD_DECLINETIME=3600 +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/stm3220g-eval/ide/nsh/iar/wfi.mac b/configs/stm3220g-eval/ide/nsh/iar/wfi.mac new file mode 100644 index 00000000000..f063baac724 --- /dev/null +++ b/configs/stm3220g-eval/ide/nsh/iar/wfi.mac @@ -0,0 +1,24 @@ +/* + * Debug support for low-power modes + * To enter low-power mode, the instruction WFI or WFE must be executed. + * The MCU implements several low-power modes which can either deactivate the CPU clock + * or reduce the power of the CPU. + * The core does not allow FCLK or HCLK to be turned off during a debug session. As these + * are required for the debugger connection, during a debug, they must remain active. The + * MCU integrates special means to allow the user to debug software in low-power modes. + * For this, the debugger host must first set some debug configuration registers to change the + * low-power mode behavior: + * In Sleep mode, DBG_SLEEP bit of DBGMCU_CR register must be previously set by + * the debugger. This will feed HCLK with the same clock that is provided to FCLK + * (system clock previously configured by the software). + * In Stop mode, the bit DBG_STOP must be previously set by the debugger. This will + * enable the internal RC oscillator clock to feed FCLK and HCLK in STOP mode. + */ + +execUserExecutionStarted() +{ + if (!__driverType("sim")) + { + __writeMemory32(__readMemory32(0xE0042004, "Memory") | 0x3, 0xE0042004, "Memory"); // Set DBG_SLEEP and DBG_STOP in DBGMCU_CR + } +} \ No newline at end of file diff --git a/configs/stm3220g-eval/nettest/defconfig b/configs/stm3220g-eval/nettest/defconfig index 0e4dc1d9843..59d9ac24fad 100644 --- a/configs/stm3220g-eval/nettest/defconfig +++ b/configs/stm3220g-eval/nettest/defconfig @@ -80,6 +80,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -98,6 +99,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -119,6 +121,7 @@ CONFIG_ARCH_CORTEXM3=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -126,6 +129,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y # CONFIG_ARMV7M_LAZYFPU is not set # CONFIG_ARCH_HAVE_FPU is not set # CONFIG_ARCH_HAVE_DPFPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -136,6 +140,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARW is not set # CONFIG_ARMV7M_TOOLCHAIN_ATOLLIC is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDW is not set @@ -246,6 +251,7 @@ CONFIG_ARCH_CHIP_STM32F207IG=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -438,13 +444,17 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_STM32_TIM13_CAP is not set # CONFIG_STM32_TIM14_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART3_SERIALDRIVER=y +# CONFIG_STM32_USART3_1WIREDRIVER is not set # CONFIG_USART3_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # CONFIG_STM32_HAVE_RTC_COUNTER is not set # CONFIG_STM32_HAVE_RTC_SUBSECONDS is not set @@ -746,33 +756,28 @@ CONFIG_ETH0_PHY_DP83848C=y CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -CONFIG_ARCH_HAVE_USART3=y -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART3_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +CONFIG_USART3_SERIALDRIVER=y +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set # CONFIG_SERIAL_OFLOWCONTROL is not set @@ -1007,6 +1012,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # @@ -1101,7 +1108,6 @@ CONFIG_EXAMPLES_NETTEST_CLIENTIP=0x0a000001 # CONFIG_EXAMPLES_TIFF is not set # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_WEBSERVER is not set -# CONFIG_EXAMPLES_USBSERIAL is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set # CONFIG_EXAMPLES_WGET is not set @@ -1138,6 +1144,7 @@ CONFIG_EXAMPLES_NETTEST_CLIENTIP=0x0a000001 # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/stm3220g-eval/nsh/defconfig b/configs/stm3220g-eval/nsh/defconfig index 8dcfe1f1b7b..aca94bb076c 100644 --- a/configs/stm3220g-eval/nsh/defconfig +++ b/configs/stm3220g-eval/nsh/defconfig @@ -76,6 +76,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -94,6 +95,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -115,6 +117,7 @@ CONFIG_ARCH_CORTEXM3=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -122,6 +125,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y # CONFIG_ARMV7M_LAZYFPU is not set # CONFIG_ARCH_HAVE_FPU is not set # CONFIG_ARCH_HAVE_DPFPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -132,6 +136,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set # CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set @@ -238,6 +243,7 @@ CONFIG_ARCH_CHIP_STM32F207IG=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -431,13 +437,17 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_STM32_TIM13_CAP is not set # CONFIG_STM32_TIM14_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART3_SERIALDRIVER=y +# CONFIG_STM32_USART3_1WIREDRIVER is not set # CONFIG_USART3_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # @@ -755,10 +765,12 @@ CONFIG_MTD=y # CONFIG_MTD_AT45DB is not set # CONFIG_MTD_M25P is not set # CONFIG_MTD_S25FL1 is not set +# CONFIG_MTD_N25QXXX is not set # CONFIG_MTD_SMART is not set # CONFIG_MTD_RAMTRON is not set # CONFIG_MTD_SST25 is not set # CONFIG_MTD_SST25XX is not set +# CONFIG_MTD_SST26 is not set # CONFIG_MTD_SST39FV is not set # CONFIG_MTD_W25 is not set # CONFIG_EEPROM is not set @@ -810,33 +822,28 @@ CONFIG_ETH0_PHY_DP83848C=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -CONFIG_ARCH_HAVE_USART3=y -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART3_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +CONFIG_USART3_SERIALDRIVER=y +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -1098,6 +1105,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set CONFIG_LIBC_NETDB=y # CONFIG_NETDB_HOSTFILE is not set CONFIG_NETDB_DNSCLIENT=y @@ -1199,7 +1208,6 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # CONFIG_EXAMPLES_UDPBLASTER is not set # CONFIG_EXAMPLES_DISCOVER is not set # CONFIG_EXAMPLES_WEBSERVER is not set -# CONFIG_EXAMPLES_USBSERIAL is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set @@ -1239,6 +1247,7 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # CONFIG_NETUTILS_CODECS is not set # CONFIG_NETUTILS_DHCPC is not set # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/stm3220g-eval/nsh2/defconfig b/configs/stm3220g-eval/nsh2/defconfig index f3c606bc6c1..b689019b016 100644 --- a/configs/stm3220g-eval/nsh2/defconfig +++ b/configs/stm3220g-eval/nsh2/defconfig @@ -80,6 +80,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -98,6 +99,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -119,6 +121,7 @@ CONFIG_ARCH_CORTEXM3=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -126,6 +129,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y # CONFIG_ARMV7M_LAZYFPU is not set # CONFIG_ARCH_HAVE_FPU is not set # CONFIG_ARCH_HAVE_DPFPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -136,6 +140,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARW is not set # CONFIG_ARMV7M_TOOLCHAIN_ATOLLIC is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDW is not set @@ -247,6 +252,7 @@ CONFIG_ARCH_CHIP_STM32F207IG=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -778,10 +784,12 @@ CONFIG_MTD=y # CONFIG_MTD_AT45DB is not set # CONFIG_MTD_M25P is not set # CONFIG_MTD_S25FL1 is not set +# CONFIG_MTD_N25QXXX is not set # CONFIG_MTD_SMART is not set # CONFIG_MTD_RAMTRON is not set # CONFIG_MTD_SST25 is not set # CONFIG_MTD_SST25XX is not set +# CONFIG_MTD_SST26 is not set # CONFIG_MTD_SST39FV is not set # CONFIG_MTD_W25 is not set # CONFIG_EEPROM is not set @@ -834,32 +842,28 @@ CONFIG_ETH0_PHY_DP83848C=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # CONFIG_MCU_SERIAL is not set # CONFIG_STANDARD_SERIAL is not set # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -1110,6 +1114,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set CONFIG_LIBC_NETDB=y # CONFIG_NETDB_HOSTFILE is not set CONFIG_NETDB_DNSCLIENT=y @@ -1252,6 +1258,7 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # CONFIG_NETUTILS_CODECS is not set # CONFIG_NETUTILS_DHCPC is not set # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_FTPD is not set # CONFIG_NETUTILS_JSON is not set diff --git a/configs/stm3220g-eval/nxwm/defconfig b/configs/stm3220g-eval/nxwm/defconfig index 90a124b33c9..fadce2d0abc 100644 --- a/configs/stm3220g-eval/nxwm/defconfig +++ b/configs/stm3220g-eval/nxwm/defconfig @@ -80,6 +80,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -98,6 +99,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -119,6 +121,7 @@ CONFIG_ARCH_CORTEXM3=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -126,6 +129,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y # CONFIG_ARMV7M_LAZYFPU is not set # CONFIG_ARCH_HAVE_FPU is not set # CONFIG_ARCH_HAVE_DPFPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -136,6 +140,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARW is not set # CONFIG_ARMV7M_TOOLCHAIN_ATOLLIC is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDW is not set @@ -246,6 +251,7 @@ CONFIG_ARCH_CHIP_STM32F207IG=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -440,13 +446,17 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_STM32_TIM13_CAP is not set # CONFIG_STM32_TIM14_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART3_SERIALDRIVER=y +# CONFIG_STM32_USART3_1WIREDRIVER is not set # CONFIG_USART3_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # @@ -792,6 +802,7 @@ CONFIG_LCD_LANDSCAPE=y # Alphanumeric/Segment LCD Devices # # CONFIG_LCD_LCD1602 is not set +# CONFIG_LCD_BACKPACK is not set # # LED Support @@ -860,33 +871,28 @@ CONFIG_ETH0_PHY_DP83848C=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -CONFIG_ARCH_HAVE_USART3=y -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART3_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +CONFIG_USART3_SERIALDRIVER=y +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -1088,6 +1094,7 @@ CONFIG_NX_LCDDRIVER=y CONFIG_NX_NPLANES=1 CONFIG_NX_BGCOLOR=0x0 CONFIG_NX_WRITEONLY=y +# CONFIG_NX_UPDATE is not set # # Supported Pixel Depths @@ -1256,6 +1263,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set CONFIG_LIBC_NETDB=y # CONFIG_NETDB_HOSTFILE is not set # CONFIG_NETDB_DNSCLIENT is not set @@ -1344,7 +1353,6 @@ CONFIG_HAVE_CXXINITIALIZE=y # CONFIG_EXAMPLES_UDPBLASTER is not set # CONFIG_EXAMPLES_DISCOVER is not set # CONFIG_EXAMPLES_WEBSERVER is not set -# CONFIG_EXAMPLES_USBSERIAL is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set # CONFIG_EXAMPLES_WGET is not set @@ -1384,6 +1392,7 @@ CONFIG_HAVE_CXXINITIALIZE=y # # CONFIG_NETUTILS_CODECS is not set # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set @@ -1550,6 +1559,7 @@ CONFIG_NXWIDGETS_LISTENERSTACK=2048 # NXWidget Configuration # CONFIG_NXWIDGETS_BPP=16 +# CONFIG_NXWIDGETS_GREYSCALE is not set CONFIG_NXWIDGETS_SIZEOFCHAR=1 # diff --git a/configs/stm3220g-eval/src/Makefile b/configs/stm3220g-eval/src/Makefile index fe48b22317f..a823e9388eb 100644 --- a/configs/stm3220g-eval/src/Makefile +++ b/configs/stm3220g-eval/src/Makefile @@ -72,10 +72,6 @@ ifeq ($(CONFIG_LIB_BOARDCTL),y) CSRCS += stm32_appinit.c endif -ifeq ($(CONFIG_WATCHDOG),y) -CSRCS += stm32_watchdog.c -endif - ifeq ($(CONFIG_INPUT_STMPE811),y) CSRCS += stm32_stmpe811.c endif diff --git a/configs/stm3220g-eval/src/stm32_appinit.c b/configs/stm3220g-eval/src/stm32_appinit.c index 54311e8fe82..89795b54d50 100644 --- a/configs/stm3220g-eval/src/stm32_appinit.c +++ b/configs/stm3220g-eval/src/stm32_appinit.c @@ -189,11 +189,28 @@ static void stm32_i2ctool(void) * Name: board_app_initialize * * Description: - * Perform architecture specific initialization + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface using the command BOARDIOC_INIT. + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #ifdef CONFIG_STM32_SPI1 FAR struct spi_dev_s *spi; diff --git a/configs/stm3220g-eval/src/stm32_watchdog.c b/configs/stm3220g-eval/src/stm32_watchdog.c deleted file mode 100644 index a00a4b91a54..00000000000 --- a/configs/stm3220g-eval/src/stm32_watchdog.c +++ /dev/null @@ -1,135 +0,0 @@ -/************************************************************************************ - * configs/stm3220g-eval/src/stm32_watchdog.c - * - * Copyright (C) 2012 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * 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. - * - ************************************************************************************/ - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include -#include - -#include -#include - -#include "stm32_wdg.h" - -#ifdef CONFIG_WATCHDOG - -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ -/* Configuration *******************************************************************/ -/* Wathdog hardware should be enabled */ - -#if !defined(CONFIG_STM32_WWDG) && !defined(CONFIG_STM32_IWDG) -# warning "One of CONFIG_STM32_WWDG or CONFIG_STM32_IWDG must be defined" -#endif - -/* Select the path to the registered watchdog timer device */ - -#ifndef CONFIG_STM32_WDG_DEVPATH -# ifdef CONFIG_EXAMPLES_WATCHDOG_DEVPATH -# define CONFIG_STM32_WDG_DEVPATH CONFIG_EXAMPLES_WATCHDOG_DEVPATH -# else -# define CONFIG_STM32_WDG_DEVPATH "/dev/watchdog0" -# endif -#endif - -/* Use the un-calibrated LSI frequency if we have nothing better */ - -#if defined(CONFIG_STM32_IWDG) && !defined(CONFIG_STM32_LSIFREQ) -# define CONFIG_STM32_LSIFREQ STM32_LSI_FREQUENCY -#endif - -/* Debug ***************************************************************************/ -/* Non-standard debug that may be enabled just for testing the watchdog timer */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_WATCHDOG -#endif - -#ifdef CONFIG_DEBUG_WATCHDOG -# define wdgdbg dbg -# define wdglldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define wdgvdbg vdbg -# define wdgllvdbg llvdbg -# else -# define wdgvdbg(x...) -# define wdgllvdbg(x...) -# endif -#else -# define wdgdbg(x...) -# define wdglldbg(x...) -# define wdgvdbg(x...) -# define wdgllvdbg(x...) -#endif - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -/**************************************************************************** - * Name: up_wdginitialize() - * - * Description: - * Perform architecuture-specific initialization of the Watchdog hardware. - * This interface must be provided by all configurations using - * apps/examples/watchdog - * - ****************************************************************************/ - -int up_wdginitialize(void) -{ - /* Initialize tha register the watchdog timer device */ - -#if defined(CONFIG_STM32_WWDG) - stm32_wwdginitialize(CONFIG_STM32_WDG_DEVPATH); - return OK; -#elif defined(CONFIG_STM32_IWDG) - stm32_iwdginitialize(CONFIG_STM32_WDG_DEVPATH, CONFIG_STM32_LSIFREQ); - return OK; -#else - return -ENODEV; -#endif -} - -#endif /* CONFIG_WATCHDOG */ diff --git a/configs/stm3220g-eval/telnetd/defconfig b/configs/stm3220g-eval/telnetd/defconfig index 813c57655da..2e65dced627 100644 --- a/configs/stm3220g-eval/telnetd/defconfig +++ b/configs/stm3220g-eval/telnetd/defconfig @@ -80,6 +80,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -98,6 +99,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -119,6 +121,7 @@ CONFIG_ARCH_CORTEXM3=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -126,6 +129,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y # CONFIG_ARMV7M_LAZYFPU is not set # CONFIG_ARCH_HAVE_FPU is not set # CONFIG_ARCH_HAVE_DPFPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -136,6 +140,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARW is not set # CONFIG_ARMV7M_TOOLCHAIN_ATOLLIC is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDW is not set @@ -246,6 +251,7 @@ CONFIG_ARCH_CHIP_STM32F207IG=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -438,13 +444,17 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_STM32_TIM13_CAP is not set # CONFIG_STM32_TIM14_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART3_SERIALDRIVER=y +# CONFIG_STM32_USART3_1WIREDRIVER is not set # CONFIG_USART3_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # CONFIG_STM32_HAVE_RTC_COUNTER is not set # CONFIG_STM32_HAVE_RTC_SUBSECONDS is not set @@ -748,33 +758,28 @@ CONFIG_ETH0_PHY_DP83848C=y CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -CONFIG_ARCH_HAVE_USART3=y -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART3_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +CONFIG_USART3_SERIALDRIVER=y +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set # CONFIG_SERIAL_OFLOWCONTROL is not set @@ -1009,6 +1014,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # @@ -1098,7 +1105,6 @@ CONFIG_EXAMPLES_TELNETD_CLIENTSTACKSIZE=2048 # CONFIG_EXAMPLES_TIFF is not set # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_WEBSERVER is not set -# CONFIG_EXAMPLES_USBSERIAL is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set # CONFIG_EXAMPLES_WGET is not set @@ -1135,6 +1141,7 @@ CONFIG_EXAMPLES_TELNETD_CLIENTSTACKSIZE=2048 # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/stm3240g-eval/dhcpd/defconfig b/configs/stm3240g-eval/dhcpd/defconfig index dc62ffb0f30..e78e7312170 100644 --- a/configs/stm3240g-eval/dhcpd/defconfig +++ b/configs/stm3240g-eval/dhcpd/defconfig @@ -252,6 +252,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -447,13 +448,17 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_STM32_TIM13_CAP is not set # CONFIG_STM32_TIM14_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART3_SERIALDRIVER=y +# CONFIG_STM32_USART3_1WIREDRIVER is not set # CONFIG_USART3_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # CONFIG_STM32_HAVE_RTC_COUNTER is not set # CONFIG_STM32_HAVE_RTC_SUBSECONDS is not set @@ -754,33 +759,28 @@ CONFIG_ETH0_PHY_DP83848C=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -CONFIG_ARCH_HAVE_USART3=y -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART3_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +CONFIG_USART3_SERIALDRIVER=y +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -1150,6 +1150,7 @@ CONFIG_NETUTILS_DHCPD_NETMASK=0xffffff00 CONFIG_NETUTILS_DHCPD_DNSIP=0x08080808 CONFIG_NETUTILS_DHCPD_OFFERTIME=3600 CONFIG_NETUTILS_DHCPD_DECLINETIME=3600 +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/stm3240g-eval/discover/defconfig b/configs/stm3240g-eval/discover/defconfig index c6758e8b190..6e6116857e0 100644 --- a/configs/stm3240g-eval/discover/defconfig +++ b/configs/stm3240g-eval/discover/defconfig @@ -244,6 +244,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -440,13 +441,17 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_STM32_TIM13_CAP is not set # CONFIG_STM32_TIM14_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART3_SERIALDRIVER=y +# CONFIG_STM32_USART3_1WIREDRIVER is not set # CONFIG_USART3_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # @@ -777,33 +782,28 @@ CONFIG_ETH0_PHY_DP83848C=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -CONFIG_ARCH_HAVE_USART3=y -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART3_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +CONFIG_USART3_SERIALDRIVER=y +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -1205,6 +1205,7 @@ CONFIG_EXAMPLES_DISCOVER_NETMASK=0xffffff00 # CONFIG_NETUTILS_CODECS is not set CONFIG_NETUTILS_DHCPC=y # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/stm3240g-eval/knxwm/defconfig b/configs/stm3240g-eval/knxwm/defconfig index 35a346cf75c..fe098b72e1a 100644 --- a/configs/stm3240g-eval/knxwm/defconfig +++ b/configs/stm3240g-eval/knxwm/defconfig @@ -259,6 +259,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -456,13 +457,17 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_STM32_TIM13_CAP is not set # CONFIG_STM32_TIM14_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART3_SERIALDRIVER=y +# CONFIG_STM32_USART3_1WIREDRIVER is not set # CONFIG_USART3_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # @@ -725,7 +730,6 @@ CONFIG_I2C_POLLED=y CONFIG_RTC=y CONFIG_RTC_DATETIME=y # CONFIG_RTC_ALARM is not set -CONFIG_RTC_NALARMS=2 # CONFIG_RTC_DRIVER is not set # CONFIG_RTC_EXTERNAL is not set # CONFIG_WATCHDOG is not set @@ -793,6 +797,7 @@ CONFIG_LCD_LANDSCAPE=y # Alphanumeric/Segment LCD Devices # # CONFIG_LCD_LCD1602 is not set +# CONFIG_LCD_BACKPACK is not set # # LED Support @@ -812,33 +817,28 @@ CONFIG_LCD_LANDSCAPE=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -CONFIG_ARCH_HAVE_USART3=y -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART3_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +CONFIG_USART3_SERIALDRIVER=y +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -931,6 +931,7 @@ CONFIG_NX_LCDDRIVER=y CONFIG_NX_NPLANES=1 CONFIG_NX_BGCOLOR=0x0 # CONFIG_NX_WRITEONLY is not set +# CONFIG_NX_UPDATE is not set # # Supported Pixel Depths @@ -1212,6 +1213,7 @@ CONFIG_CXX_NEWLONG=y # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set @@ -1240,6 +1242,7 @@ CONFIG_NXWIDGETS_LISTENERSTACK=2048 # NXWidget Configuration # CONFIG_NXWIDGETS_BPP=16 +# CONFIG_NXWIDGETS_GREYSCALE is not set CONFIG_NXWIDGETS_SIZEOFCHAR=1 # diff --git a/configs/stm3240g-eval/nettest/defconfig b/configs/stm3240g-eval/nettest/defconfig index a0a47bc9ea0..d8f93001ea3 100644 --- a/configs/stm3240g-eval/nettest/defconfig +++ b/configs/stm3240g-eval/nettest/defconfig @@ -252,6 +252,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -447,13 +448,17 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_STM32_TIM13_CAP is not set # CONFIG_STM32_TIM14_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART3_SERIALDRIVER=y +# CONFIG_STM32_USART3_1WIREDRIVER is not set # CONFIG_USART3_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # CONFIG_STM32_HAVE_RTC_COUNTER is not set # CONFIG_STM32_HAVE_RTC_SUBSECONDS is not set @@ -755,33 +760,28 @@ CONFIG_ETH0_PHY_DP83848C=y CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -CONFIG_ARCH_HAVE_USART3=y -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART3_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +CONFIG_USART3_SERIALDRIVER=y +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set # CONFIG_SERIAL_OFLOWCONTROL is not set @@ -1148,6 +1148,7 @@ CONFIG_EXAMPLES_NETTEST_CLIENTIP=0x0a000001 # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/stm3240g-eval/nsh/defconfig b/configs/stm3240g-eval/nsh/defconfig index 0abef4de7e9..7456227bc70 100644 --- a/configs/stm3240g-eval/nsh/defconfig +++ b/configs/stm3240g-eval/nsh/defconfig @@ -252,6 +252,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -448,13 +449,17 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_STM32_TIM13_CAP is not set # CONFIG_STM32_TIM14_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART3_SERIALDRIVER=y +# CONFIG_STM32_USART3_1WIREDRIVER is not set # CONFIG_USART3_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # @@ -724,7 +729,6 @@ CONFIG_I2C_DRIVER=y CONFIG_RTC=y CONFIG_RTC_DATETIME=y # CONFIG_RTC_ALARM is not set -CONFIG_RTC_NALARMS=2 # CONFIG_RTC_DRIVER is not set # CONFIG_RTC_EXTERNAL is not set # CONFIG_WATCHDOG is not set @@ -797,33 +801,28 @@ CONFIG_ETH0_PHY_DP83848C=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -CONFIG_ARCH_HAVE_USART3=y -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART3_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +CONFIG_USART3_SERIALDRIVER=y +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -1227,6 +1226,7 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # CONFIG_NETUTILS_CODECS is not set # CONFIG_NETUTILS_DHCPC is not set # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/stm3240g-eval/nsh2/defconfig b/configs/stm3240g-eval/nsh2/defconfig index b38f5dd43b2..1752213148f 100644 --- a/configs/stm3240g-eval/nsh2/defconfig +++ b/configs/stm3240g-eval/nsh2/defconfig @@ -253,6 +253,7 @@ CONFIG_SDIO_DMA=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -733,7 +734,6 @@ CONFIG_I2C_DRIVER=y CONFIG_RTC=y CONFIG_RTC_DATETIME=y # CONFIG_RTC_ALARM is not set -CONFIG_RTC_NALARMS=2 # CONFIG_RTC_DRIVER is not set # CONFIG_RTC_EXTERNAL is not set # CONFIG_WATCHDOG is not set @@ -788,10 +788,12 @@ CONFIG_MTD=y # CONFIG_MTD_AT45DB is not set # CONFIG_MTD_M25P is not set # CONFIG_MTD_S25FL1 is not set +# CONFIG_MTD_N25QXXX is not set # CONFIG_MTD_SMART is not set # CONFIG_MTD_RAMTRON is not set # CONFIG_MTD_SST25 is not set # CONFIG_MTD_SST25XX is not set +# CONFIG_MTD_SST26 is not set # CONFIG_MTD_SST39FV is not set # CONFIG_MTD_W25 is not set # CONFIG_EEPROM is not set @@ -844,32 +846,28 @@ CONFIG_ETH0_PHY_DP83848C=y # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # CONFIG_MCU_SERIAL is not set # CONFIG_STANDARD_SERIAL is not set # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -1264,6 +1262,7 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # CONFIG_NETUTILS_CODECS is not set # CONFIG_NETUTILS_DHCPC is not set # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_FTPD is not set # CONFIG_NETUTILS_JSON is not set diff --git a/configs/stm3240g-eval/nxterm/defconfig b/configs/stm3240g-eval/nxterm/defconfig index b7f8ec8a405..8a947a2bb27 100644 --- a/configs/stm3240g-eval/nxterm/defconfig +++ b/configs/stm3240g-eval/nxterm/defconfig @@ -252,6 +252,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -449,13 +450,17 @@ CONFIG_STM32_FSMC_SRAM=y # CONFIG_STM32_TIM13_CAP is not set # CONFIG_STM32_TIM14_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART3_SERIALDRIVER=y +# CONFIG_STM32_USART3_1WIREDRIVER is not set # CONFIG_USART3_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # @@ -727,7 +732,6 @@ CONFIG_I2C_DRIVER=y CONFIG_RTC=y CONFIG_RTC_DATETIME=y # CONFIG_RTC_ALARM is not set -CONFIG_RTC_NALARMS=2 # CONFIG_RTC_DRIVER is not set # CONFIG_RTC_EXTERNAL is not set # CONFIG_WATCHDOG is not set @@ -774,6 +778,7 @@ CONFIG_LCD_LANDSCAPE=y # Alphanumeric/Segment LCD Devices # # CONFIG_LCD_LCD1602 is not set +# CONFIG_LCD_BACKPACK is not set # # LED Support @@ -835,33 +840,28 @@ CONFIG_ETH0_PHY_DP83848C=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -CONFIG_ARCH_HAVE_USART3=y -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART3_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +CONFIG_USART3_SERIALDRIVER=y +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -1057,6 +1057,7 @@ CONFIG_NX_LCDDRIVER=y CONFIG_NX_NPLANES=1 CONFIG_NX_BGCOLOR=0x0 # CONFIG_NX_WRITEONLY is not set +# CONFIG_NX_UPDATE is not set # # Supported Pixel Depths @@ -1361,6 +1362,7 @@ CONFIG_EXAMPLES_NXTERM=y # CONFIG_NETUTILS_CODECS is not set # CONFIG_NETUTILS_DHCPC is not set # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/stm3240g-eval/nxwm/defconfig b/configs/stm3240g-eval/nxwm/defconfig index b29baa006b5..e3e15ad43ed 100644 --- a/configs/stm3240g-eval/nxwm/defconfig +++ b/configs/stm3240g-eval/nxwm/defconfig @@ -252,6 +252,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -449,13 +450,17 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_STM32_TIM13_CAP is not set # CONFIG_STM32_TIM14_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART3_SERIALDRIVER=y +# CONFIG_STM32_USART3_1WIREDRIVER is not set # CONFIG_USART3_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # @@ -733,7 +738,6 @@ CONFIG_I2C_POLLED=y CONFIG_RTC=y CONFIG_RTC_DATETIME=y # CONFIG_RTC_ALARM is not set -CONFIG_RTC_NALARMS=2 # CONFIG_RTC_DRIVER is not set # CONFIG_RTC_EXTERNAL is not set # CONFIG_WATCHDOG is not set @@ -801,6 +805,7 @@ CONFIG_LCD_LANDSCAPE=y # Alphanumeric/Segment LCD Devices # # CONFIG_LCD_LCD1602 is not set +# CONFIG_LCD_BACKPACK is not set # # LED Support @@ -862,33 +867,28 @@ CONFIG_ETH0_PHY_NONE=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -CONFIG_ARCH_HAVE_USART3=y -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART3_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +CONFIG_USART3_SERIALDRIVER=y +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -1090,6 +1090,7 @@ CONFIG_NX_LCDDRIVER=y CONFIG_NX_NPLANES=1 CONFIG_NX_BGCOLOR=0x0 # CONFIG_NX_WRITEONLY is not set +# CONFIG_NX_UPDATE is not set # # Supported Pixel Depths @@ -1394,6 +1395,7 @@ CONFIG_HAVE_CXXINITIALIZE=y # # CONFIG_NETUTILS_CODECS is not set # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set @@ -1562,6 +1564,7 @@ CONFIG_NXWIDGETS_LISTENERSTACK=2048 # NXWidget Configuration # CONFIG_NXWIDGETS_BPP=16 +# CONFIG_NXWIDGETS_GREYSCALE is not set CONFIG_NXWIDGETS_SIZEOFCHAR=1 # diff --git a/configs/stm3240g-eval/src/Makefile b/configs/stm3240g-eval/src/Makefile index 8035987fb36..28b1b4f702f 100644 --- a/configs/stm3240g-eval/src/Makefile +++ b/configs/stm3240g-eval/src/Makefile @@ -77,10 +77,6 @@ ifeq ($(CONFIG_ARCH_FPU),y) CSRCS += stm32_ostest.c endif -ifeq ($(CONFIG_WATCHDOG),y) -CSRCS += stm32_watchdog.c -endif - ifeq ($(CONFIG_INPUT_STMPE811),y) CSRCS += stm32_stmpe811.c endif diff --git a/configs/stm3240g-eval/src/stm32_appinit.c b/configs/stm3240g-eval/src/stm32_appinit.c index fd161511273..469180c390c 100644 --- a/configs/stm3240g-eval/src/stm32_appinit.c +++ b/configs/stm3240g-eval/src/stm32_appinit.c @@ -207,11 +207,28 @@ static void stm32_i2ctool(void) * Name: board_app_initialize * * Description: - * Perform architecture specific initialization + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface using the command BOARDIOC_INIT. + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #ifdef HAVE_RTC_DRIVER FAR struct rtc_lowerhalf_s *lower; diff --git a/configs/stm3240g-eval/src/stm32_boot.c b/configs/stm3240g-eval/src/stm32_boot.c index 47322b69cd5..09b3b82eed4 100644 --- a/configs/stm3240g-eval/src/stm32_boot.c +++ b/configs/stm3240g-eval/src/stm32_boot.c @@ -161,7 +161,7 @@ static int board_initthread(int argc, char *argv[]) * but the initialization function must run in kernel space. */ - ret = board_app_initialize(); + ret = board_app_initialize(0); if (ret < 0) { gdbg("ERROR: board_app_initialize failed: %d\n", ret); diff --git a/configs/stm3240g-eval/src/stm32_watchdog.c b/configs/stm3240g-eval/src/stm32_watchdog.c deleted file mode 100644 index d778f195d8c..00000000000 --- a/configs/stm3240g-eval/src/stm32_watchdog.c +++ /dev/null @@ -1,135 +0,0 @@ -/************************************************************************************ - * configs/stm3240g-eval/src/stm32_watchdog.c - * - * Copyright (C) 2012 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * 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. - * - ************************************************************************************/ - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include -#include - -#include -#include - -#include "stm32_wdg.h" - -#ifdef CONFIG_WATCHDOG - -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ -/* Configuration *******************************************************************/ -/* Wathdog hardware should be enabled */ - -#if !defined(CONFIG_STM32_WWDG) && !defined(CONFIG_STM32_IWDG) -# warning "One of CONFIG_STM32_WWDG or CONFIG_STM32_IWDG must be defined" -#endif - -/* Select the path to the registered watchdog timer device */ - -#ifndef CONFIG_STM32_WDG_DEVPATH -# ifdef CONFIG_EXAMPLES_WATCHDOG_DEVPATH -# define CONFIG_STM32_WDG_DEVPATH CONFIG_EXAMPLES_WATCHDOG_DEVPATH -# else -# define CONFIG_STM32_WDG_DEVPATH "/dev/watchdog0" -# endif -#endif - -/* Use the un-calibrated LSI frequency if we have nothing better */ - -#if defined(CONFIG_STM32_IWDG) && !defined(CONFIG_STM32_LSIFREQ) -# define CONFIG_STM32_LSIFREQ STM32_LSI_FREQUENCY -#endif - -/* Debug ***************************************************************************/ -/* Non-standard debug that may be enabled just for testing the watchdog timer */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_WATCHDOG -#endif - -#ifdef CONFIG_DEBUG_WATCHDOG -# define wdgdbg dbg -# define wdglldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define wdgvdbg vdbg -# define wdgllvdbg llvdbg -# else -# define wdgvdbg(x...) -# define wdgllvdbg(x...) -# endif -#else -# define wdgdbg(x...) -# define wdglldbg(x...) -# define wdgvdbg(x...) -# define wdgllvdbg(x...) -#endif - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -/**************************************************************************** - * Name: up_wdginitialize() - * - * Description: - * Perform architecuture-specific initialization of the Watchdog hardware. - * This interface must be provided by all configurations using - * apps/examples/watchdog - * - ****************************************************************************/ - -int up_wdginitialize(void) -{ - /* Initialize tha register the watchdog timer device */ - -#if defined(CONFIG_STM32_WWDG) - stm32_wwdginitialize(CONFIG_STM32_WDG_DEVPATH); - return OK; -#elif defined(CONFIG_STM32_IWDG) - stm32_iwdginitialize(CONFIG_STM32_WDG_DEVPATH, CONFIG_STM32_LSIFREQ); - return OK; -#else - return -ENODEV; -#endif -} - -#endif /* CONFIG_WATCHDOG */ diff --git a/configs/stm3240g-eval/telnetd/defconfig b/configs/stm3240g-eval/telnetd/defconfig index 56cd01cf5db..b2cc945bdd4 100644 --- a/configs/stm3240g-eval/telnetd/defconfig +++ b/configs/stm3240g-eval/telnetd/defconfig @@ -252,6 +252,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -447,13 +448,17 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_STM32_TIM13_CAP is not set # CONFIG_STM32_TIM14_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART3_SERIALDRIVER=y +# CONFIG_STM32_USART3_1WIREDRIVER is not set # CONFIG_USART3_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # CONFIG_STM32_HAVE_RTC_COUNTER is not set # CONFIG_STM32_HAVE_RTC_SUBSECONDS is not set @@ -757,33 +762,28 @@ CONFIG_ETH0_PHY_DP83848C=y CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -CONFIG_ARCH_HAVE_USART3=y -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART3_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +CONFIG_USART3_SERIALDRIVER=y +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set # CONFIG_SERIAL_OFLOWCONTROL is not set @@ -1145,6 +1145,7 @@ CONFIG_EXAMPLES_TELNETD_CLIENTSTACKSIZE=2048 # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/stm3240g-eval/webserver/defconfig b/configs/stm3240g-eval/webserver/defconfig index 2e3767b6f1f..d6107112897 100644 --- a/configs/stm3240g-eval/webserver/defconfig +++ b/configs/stm3240g-eval/webserver/defconfig @@ -244,6 +244,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -440,13 +441,17 @@ CONFIG_STM32_CCMEXCLUDE=y # CONFIG_STM32_TIM13_CAP is not set # CONFIG_STM32_TIM14_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART3_SERIALDRIVER=y +# CONFIG_STM32_USART3_1WIREDRIVER is not set # CONFIG_USART3_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # @@ -714,7 +719,6 @@ CONFIG_I2C_POLLED=y CONFIG_RTC=y CONFIG_RTC_DATETIME=y # CONFIG_RTC_ALARM is not set -CONFIG_RTC_NALARMS=2 # CONFIG_RTC_DRIVER is not set # CONFIG_RTC_EXTERNAL is not set # CONFIG_WATCHDOG is not set @@ -757,10 +761,12 @@ CONFIG_MTD=y # CONFIG_MTD_AT45DB is not set # CONFIG_MTD_M25P is not set # CONFIG_MTD_S25FL1 is not set +# CONFIG_MTD_N25QXXX is not set # CONFIG_MTD_SMART is not set # CONFIG_MTD_RAMTRON is not set # CONFIG_MTD_SST25 is not set # CONFIG_MTD_SST25XX is not set +# CONFIG_MTD_SST26 is not set # CONFIG_MTD_SST39FV is not set # CONFIG_MTD_W25 is not set # CONFIG_EEPROM is not set @@ -814,33 +820,28 @@ CONFIG_ETH0_PHY_NONE=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -CONFIG_ARCH_HAVE_USART3=y -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART3_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +CONFIG_USART3_SERIALDRIVER=y +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -1246,6 +1247,7 @@ CONFIG_EXAMPLES_WEBSERVER_NOMAC=y # # CONFIG_NETUTILS_CODECS is not set # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/stm3240g-eval/xmlrpc/defconfig b/configs/stm3240g-eval/xmlrpc/defconfig index f5cbd7e159a..010bb5d881c 100644 --- a/configs/stm3240g-eval/xmlrpc/defconfig +++ b/configs/stm3240g-eval/xmlrpc/defconfig @@ -244,6 +244,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -440,13 +441,17 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_STM32_TIM13_CAP is not set # CONFIG_STM32_TIM14_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART3_SERIALDRIVER=y +# CONFIG_STM32_USART3_1WIREDRIVER is not set # CONFIG_USART3_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # @@ -772,33 +777,28 @@ CONFIG_ETH0_PHY_DP83848C=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -CONFIG_ARCH_HAVE_USART3=y -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART3_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +CONFIG_USART3_SERIALDRIVER=y +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y CONFIG_SERIAL_NPOLLWAITERS=2 @@ -1204,6 +1204,7 @@ CONFIG_EXAMPLES_XMLRPC_NETMASK=0xffffff00 # CONFIG_NETUTILS_CODECS is not set CONFIG_NETUTILS_DHCPC=y # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_FTPD is not set # CONFIG_NETUTILS_JSON is not set diff --git a/configs/stm32_tiny/nsh/defconfig b/configs/stm32_tiny/nsh/defconfig index d5e94e12524..488ebd637b0 100644 --- a/configs/stm32_tiny/nsh/defconfig +++ b/configs/stm32_tiny/nsh/defconfig @@ -76,6 +76,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -94,6 +95,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -115,6 +117,7 @@ CONFIG_ARCH_CORTEXM3=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -122,6 +125,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y # CONFIG_ARMV7M_LAZYFPU is not set # CONFIG_ARCH_HAVE_FPU is not set # CONFIG_ARCH_HAVE_DPFPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -132,6 +136,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT=y # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set # CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set @@ -239,6 +244,7 @@ CONFIG_ARCH_CHIP_STM32F103C8=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -407,13 +413,17 @@ CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y # CONFIG_STM32_TIM5_CAP is not set # CONFIG_STM32_TIM8_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART1_SERIALDRIVER=y +# CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # @@ -502,6 +512,7 @@ CONFIG_RAM_SIZE=20480 # Board Selection # CONFIG_ARCH_BOARD_STM32_TINY=y +# CONFIG_ARCH_BOARD_STM32F103_MINIMUM is not set # CONFIG_ARCH_BOARD_CUSTOM is not set CONFIG_ARCH_BOARD="stm32_tiny" @@ -688,33 +699,28 @@ CONFIG_SPI_EXCHANGE=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -CONFIG_ARCH_HAVE_USART1=y -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART1_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y CONFIG_SERIAL_NPOLLWAITERS=2 @@ -867,6 +873,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # @@ -980,6 +988,7 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_NETUTILS_CHAT is not set # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/stm32_tiny/src/Makefile b/configs/stm32_tiny/src/Makefile index a29dd097b2d..14ee306846f 100644 --- a/configs/stm32_tiny/src/Makefile +++ b/configs/stm32_tiny/src/Makefile @@ -51,8 +51,4 @@ ifeq ($(CONFIG_LIB_BOARDCTL),y) CSRCS += stm32_appinit.c endif -ifeq ($(CONFIG_WATCHDOG),y) -CSRCS += stm32_watchdog.c -endif - include $(TOPDIR)/configs/Board.mk diff --git a/configs/stm32_tiny/src/stm32_appinit.c b/configs/stm32_tiny/src/stm32_appinit.c index 2f117d2c2e7..4b590de5d53 100644 --- a/configs/stm32_tiny/src/stm32_appinit.c +++ b/configs/stm32_tiny/src/stm32_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/stm32_tiny/src/stm32_appinit.c * - * Copyright (C) 2009, 2011, 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2009, 2011, 2013, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -49,10 +49,6 @@ #include "stm32.h" #include "stm32_tiny.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -61,11 +57,28 @@ * Name: board_app_initialize * * Description: - * Perform architecture specific initialization + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface using the command BOARDIOC_INIT. + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #if defined(CONFIG_WL_NRF24L01) syslog(LOG_INFO, "Register the nRF24L01 module"); diff --git a/configs/stm32_tiny/src/stm32_watchdog.c b/configs/stm32_tiny/src/stm32_watchdog.c deleted file mode 100644 index a2ae5963f3b..00000000000 --- a/configs/stm32_tiny/src/stm32_watchdog.c +++ /dev/null @@ -1,135 +0,0 @@ -/************************************************************************************ - * configs/stm_tiny/src/stm32_watchdog.c - * - * Copyright (C) 2012-2013 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * 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. - * - ************************************************************************************/ - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include -#include - -#include -#include - -#include "stm32_wdg.h" - -#ifdef CONFIG_WATCHDOG - -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ -/* Configuration *******************************************************************/ -/* Wathdog hardware should be enabled */ - -#if !defined(CONFIG_STM32_WWDG) && !defined(CONFIG_STM32_IWDG) -# warning "One of CONFIG_STM32_WWDG or CONFIG_STM32_IWDG must be defined" -#endif - -/* Select the path to the registered watchdog timer device */ - -#ifndef CONFIG_STM32_WDG_DEVPATH -# ifdef CONFIG_EXAMPLES_WATCHDOG_DEVPATH -# define CONFIG_STM32_WDG_DEVPATH CONFIG_EXAMPLES_WATCHDOG_DEVPATH -# else -# define CONFIG_STM32_WDG_DEVPATH "/dev/watchdog0" -# endif -#endif - -/* Use the un-calibrated LSI frequency if we have nothing better */ - -#if defined(CONFIG_STM32_IWDG) && !defined(CONFIG_STM32_LSIFREQ) -# define CONFIG_STM32_LSIFREQ STM32_LSI_FREQUENCY -#endif - -/* Debug ***************************************************************************/ -/* Non-standard debug that may be enabled just for testing the watchdog timer */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_WATCHDOG -#endif - -#ifdef CONFIG_DEBUG_WATCHDOG -# define wdgdbg dbg -# define wdglldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define wdgvdbg vdbg -# define wdgllvdbg llvdbg -# else -# define wdgvdbg(x...) -# define wdgllvdbg(x...) -# endif -#else -# define wdgdbg(x...) -# define wdglldbg(x...) -# define wdgvdbg(x...) -# define wdgllvdbg(x...) -#endif - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -/**************************************************************************** - * Name: up_wdginitialize() - * - * Description: - * Perform architecuture-specific initialization of the Watchdog hardware. - * This interface must be provided by all configurations using - * apps/examples/watchdog - * - ****************************************************************************/ - -int up_wdginitialize(void) -{ - /* Initialize tha register the watchdog timer device */ - -#if defined(CONFIG_STM32_WWDG) - stm32_wwdginitialize(CONFIG_STM32_WDG_DEVPATH); - return OK; -#elif defined(CONFIG_STM32_IWDG) - stm32_iwdginitialize(CONFIG_STM32_WDG_DEVPATH, CONFIG_STM32_LSIFREQ); - return OK; -#else - return -ENODEV; -#endif -} - -#endif /* CONFIG_WATCHDOG */ diff --git a/configs/stm32_tiny/usbnsh/defconfig b/configs/stm32_tiny/usbnsh/defconfig index f839062025a..18a9cdab677 100644 --- a/configs/stm32_tiny/usbnsh/defconfig +++ b/configs/stm32_tiny/usbnsh/defconfig @@ -76,6 +76,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -94,6 +95,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -115,6 +117,7 @@ CONFIG_ARCH_CORTEXM3=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -122,6 +125,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y # CONFIG_ARMV7M_LAZYFPU is not set # CONFIG_ARCH_HAVE_FPU is not set # CONFIG_ARCH_HAVE_DPFPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -132,6 +136,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set # CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set @@ -238,6 +243,7 @@ CONFIG_ARCH_CHIP_STM32F103C8=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -405,13 +411,17 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_STM32_TIM5_CAP is not set # CONFIG_STM32_TIM8_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART1_SERIALDRIVER=y +# CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set CONFIG_STM32_HAVE_RTC_COUNTER=y # CONFIG_STM32_HAVE_RTC_SUBSECONDS is not set @@ -495,6 +505,7 @@ CONFIG_RAM_SIZE=20480 # Board Selection # CONFIG_ARCH_BOARD_STM32_TINY=y +# CONFIG_ARCH_BOARD_STM32F103_MINIMUM is not set # CONFIG_ARCH_BOARD_CUSTOM is not set CONFIG_ARCH_BOARD="stm32_tiny" @@ -509,7 +520,14 @@ CONFIG_NSH_MMCSDMINOR=0 # Board-Specific Options # CONFIG_LIB_BOARDCTL=y +# CONFIG_BOARDCTL_RESET is not set +# CONFIG_BOARDCTL_UNIQUEID is not set CONFIG_BOARDCTL_USBDEVCTRL=y +# CONFIG_BOARDCTL_TSCTEST is not set +# CONFIG_BOARDCTL_ADCTEST is not set +# CONFIG_BOARDCTL_PWMTEST is not set +# CONFIG_BOARDCTL_GRAPHICS is not set +# CONFIG_BOARDCTL_IOCTL is not set # # RTOS Features @@ -663,33 +681,28 @@ CONFIG_ARCH_HAVE_I2CRESET=y CONFIG_SERIAL=y CONFIG_SERIAL_REMOVABLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -CONFIG_ARCH_HAVE_USART1=y -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART1_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -726,7 +739,6 @@ CONFIG_USBDEV_MAXPOWER=100 # CONFIG_ARCH_USBDEV_STALLQUEUE is not set CONFIG_USBDEV_TRACE=y CONFIG_USBDEV_TRACE_NRECORDS=32 -# CONFIG_USBDEV_TRACE_STRINGS is not set # CONFIG_USBDEV_TRACE_INITIALIDSET is not set # @@ -746,8 +758,8 @@ CONFIG_CDCACM_EPBULKOUT_HSSIZE=512 CONFIG_CDCACM_EPBULKIN=2 CONFIG_CDCACM_EPBULKIN_FSSIZE=64 CONFIG_CDCACM_EPBULKIN_HSSIZE=512 -CONFIG_CDCACM_NWRREQS=4 CONFIG_CDCACM_NRDREQS=4 +CONFIG_CDCACM_NWRREQS=4 CONFIG_CDCACM_BULKIN_REQLEN=96 CONFIG_CDCACM_RXBUFSIZE=256 CONFIG_CDCACM_TXBUFSIZE=256 @@ -875,6 +887,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # @@ -987,6 +1001,7 @@ CONFIG_EXAMPLES_NSH=y # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/stm32f103-minimum/Kconfig b/configs/stm32f103-minimum/Kconfig new file mode 100644 index 00000000000..15ead9d2c21 --- /dev/null +++ b/configs/stm32f103-minimum/Kconfig @@ -0,0 +1,7 @@ +# +# For a description of the syntax of this configuration file, +# see the file kconfig-language.txt in the NuttX tools repository. +# + +if ARCH_BOARD_STM32F103_MINIMUM +endif diff --git a/configs/stm32f103-minimum/README.txt b/configs/stm32f103-minimum/README.txt new file mode 100644 index 00000000000..59bef3ef6a8 --- /dev/null +++ b/configs/stm32f103-minimum/README.txt @@ -0,0 +1,499 @@ +README +====== + +This README discusses issues unique to NuttX configurations for the +STM32F103C8T6 Minimum System Development Board for ARM Microcontroller. + +This board is available from several vendors on the net, and may +be sold under different names or no name at all. It is based on a +STM32F103C8T6 and has a DIP-40 form-factor. + +There are two versions of very similar boards: One is red and one is +blue. See http://www.stm32duino.com/viewtopic.php?f=28&t=117 + +The Red Board: + + Good things about the red board: + + - 1.5k pull up resistor on the PA12 pin (USB D+) which you can + programatically drag down for automated USB reset. + - large power capacitors and LDO power. + + Problems with the red board: + + - Silk screen is barely readable, the text is chopped off on some of + the pins + - USB connector only has two anchor points and it is directly soldered + on the surface + - Small reset button with hardly any resistance + +The Blue Board: + + Good things about the blue board: + + - Four soldered anchor point on the USB connector. What you can't tell + from this picture is that there is a notch in the pcb board and the USB + connector sits down inside it some. This provides some lateral stability + that takes some of the stress off the solder points. + - It has nice clear readable silkscreen printing. + - It also a larger reset button. + + Problems with the blue board: + + - Probably won't work as a USB device if it has a 10k pull-up on PA12. You + have to check the pull up on PA12 (USB D+). If it has a 10k pull-up + resistor, you will need to replace it with a 1.5k one to use the native + USB. + - Puny voltage regulator probably 100mA. + + A schematic for the blue board is available here: + http://www.stm32duino.com/download/file.php?id=276 + +Both Boards: + + Nice features common to both: + + - SWD pins broken out and easily connected (VCC, GND, SWDIO, SWCLK) + - USB 5V is broken out with easy access. + - User LED on PC13 + - Power LED + - You can probably use more flash (128k) than officially documented for + the chip (stm32f103c8t6 64k), I was able to load 115k of flash on mine + and it seemed to work. + + Problems with both boards: + + - No preloaded bootloader * to me this isn't really a problem as the + entire 64k of flash is available for use + - No user button + +This is the board pinout based on its form-factor for the Blue board: + + USB + ___ + -----/ _ \----- + |B12 GND| + |B13 GND| + |B14 3.3V| + |B15 RST| + |A8 B11| + |A9 B10| + |A10 B1| + |A11 B0| + |A12 A7| + |A15 A6| + |B3 A5| + |B4 A4| + |B5 A3| + |B6 A2| + |B7 A1| + |B8 A0| + |B9 C15| + |5V C14| + |GND C13| + |3.3V VB| + |_____________| + +Contents +======== + + - LEDs + - UARTs + - Timer Inputs/Outputs + - Using 128KiB of Flash instead of 64KiB + - STM32F103 Minimum - specific Configuration Options + - Configurations + +LEDs +==== + +The STM32F103 Minimum board has only one software controllable LED. +This LED can be used by the board port when CONFIG_ARCH_LEDS option is +enabled. + +If enabled the LED is simply turned on when the board boots +succesfully, and is blinking on panic / assertion failed. + +UARTs +===== + + UART/USART PINS + --------------- + + USART1 + RX PA10 + TX PA9 + USART2 + CK PA4 + CTS PA0 + RTS PA1 + RX PA3 + TX PA2 + USART3 + CK PB12 + CTS PB13 + RTS PB14 + RX PB11 + TX PB10 + +Default USART/UART Configuration +-------------------------------- + +USART1 (RX & TX only) is available through pins PA9 (TX) and PA10 (RX). + +Timer Inputs/Outputs +==================== + + TIM1 + CH1 PA8 + CH2 PA9* + CH3 PA10* + CH4 PA11* + TIM2 + CH1 PA0*, PA15, PA5 + CH2 PA1, PB3 + CH3 PA2, PB10* + CH4 PA3, PB11 + TIM3 + CH1 PA6, PB4 + CH2 PA7, PB5* + CH3 PB0 + CH4 PB1* + TIM4 + CH1 PB6* + CH2 PB7 + CH3 PB8 + CH4 PB9* + + * Indicates pins that have other on-board functions and should be used only + with care (See board datasheet). + +Using 128KiB of Flash instead of 64KiB +====================================== + +Some people figured out that the STM32F103C8T6 has 128KiB of internal memory +instead of 64KiB as documented in the datasheet and reported by its internal +register. + +In order to enable 128KiB you need modify the linker script to reflect this +new size. Open the configs/stm32f103-minimum/scripts/ld.script and replace: + + flash (rx) : ORIGIN = 0x08000000, LENGTH = 64K + +with + + flash (rx) : ORIGIN = 0x08000000, LENGTH = 128K + +Enable many NuttX features (ie. many filesystems and applications) to get a +large binary image with more than 64K. + +We will use OpenOCD to write the firmware in the STM32F103C8T6 Flash. Use a +up to dated OpenOCD version (ie. openocd-0.9). + +You will need to create a copy of original openocd/scripts/target/stm32f1x.cfg +to openocd/scripts/target/stm32f103c8t6.cfg and edit the later file replacing: + + flash bank $_FLASHNAME stm32f1x 0x08000000 0 0 0 $_TARGETNAME + +with + + flash bank $_FLASHNAME stm32f1x 0x08000000 0x20000 0 0 $_TARGETNAME + +We will use OpenOCD with STLink-V2 programmer, but it will work with other +programmers (JLink, Versaloon, or some based on FTDI FT232, etc). + +Open a terminal and execute: + + $ sudo openocd -f interface/stlink-v2.cfg -f target/stm32f103c8t6.cfg + +Now in other terminal execute: + + $ telnet localhost 4444 + + Trying 127.0.0.1... + Connected to localhost. + Escape character is '^]'. + Open On-Chip Debugger + + > reset halt + stm32f1x.cpu: target state: halted + target halted due to debug-request, current mode: Thread + xPSR: 0x01000000 pc: 0x080003ac msp: 0x20000d78 + + > flash write_image erase nuttx.bin 0x08000000 + auto erase enabled + device id = 0x20036410 + ignoring flash probed value, using configured bank size + flash size = 128kbytes + stm32f1x.cpu: target state: halted + target halted due to breakpoint, current mode: Thread + xPSR: 0x61000000 pc: 0x2000003a msp: 0x20000d78 + wrote 92160 bytes from file nuttx.bin in 4.942194s (18.211 KiB/s) + + > reset run + > exit + +Now NuttX should start normally. + +STM32F103 Minimum - specific Configuration Options +================================================== + + CONFIG_ARCH - Identifies the arch/ subdirectory. This should + be set to: + + CONFIG_ARCH=arm + + CONFIG_ARCH_family - For use in C code: + + CONFIG_ARCH_ARM=y + + CONFIG_ARCH_architecture - For use in C code: + + CONFIG_ARCH_CORTEXM3=y + + CONFIG_ARCH_CHIP - Identifies the arch/*/chip subdirectory + + CONFIG_ARCH_CHIP=stm32 + + CONFIG_ARCH_CHIP_name - For use in C code to identify the exact + chip: + + CONFIG_ARCH_CHIP_STM32F103C8=y + + CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG - Enables special STM32 clock + configuration features. + + CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG=n + + CONFIG_ARCH_BOARD - Identifies the configs subdirectory and + hence, the board that supports the particular chip or SoC. + + CONFIG_ARCH_BOARD=stm32f103-minium + + CONFIG_ARCH_BOARD_name - For use in C code + + CONFIG_ARCH_BOARD_STM32_MINIMUM=y + + CONFIG_ARCH_LOOPSPERMSEC - Must be calibrated for correct operation + of delay loops + + CONFIG_ENDIAN_BIG - define if big endian (default is little + endian) + + CONFIG_RAM_SIZE - Describes the installed DRAM (SRAM in this case): + + CONFIG_RAM_SIZE=20480 (20Kb) + + CONFIG_RAM_START - The start address of installed DRAM + + CONFIG_RAM_START=0x20000000 + + CONFIG_ARCH_LEDS - Use LEDs to show state. Unique to boards that + have LEDs + + 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_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 calibratre + CONFIG_ARCH_LOOPSPERMSEC. You simply use a stop watch to measure + the 100 second delay then adjust CONFIG_ARCH_LOOPSPERMSEC until + the delay actually is 100 seconds. + + Individual subsystems can be enabled: + + AHB + --- + CONFIG_STM32_CRC + CONFIG_STM32_BKPSRAM + + APB1 + ---- + CONFIG_STM32_TIM2 + CONFIG_STM32_TIM3 + CONFIG_STM32_TIM4 + CONFIG_STM32_WWDG + CONFIG_STM32_IWDG + CONFIG_STM32_SPI2 + CONFIG_STM32_USART2 + CONFIG_STM32_USART3 + CONFIG_STM32_I2C1 + CONFIG_STM32_I2C2 + CONFIG_STM32_CAN1 + CONFIG_STM32_PWR -- Required for RTC + + APB2 + ---- + CONFIG_STM32_TIM1 + CONFIG_STM32_USART1 + CONFIG_STM32_ADC1 + CONFIG_STM32_ADC2 + CONFIG_STM32_SPI1 + + Timer devices may be used for different purposes. One special purpose is + to generate modulated outputs for such things as motor control. If CONFIG_STM32_TIMn + is defined (as above) then the following may also be defined to indicate that + the timer is intended to be used for pulsed output modulation or ADC conversion. + Note that ADC require two definitions: Not only do you have + to assign the timer (n) for used by the ADC, but then you also have to + configure which ADC (m) it is assigned to. + + CONFIG_STM32_TIMn_PWM Reserve timer n for use by PWM, n=1,..,14 + CONFIG_STM32_TIMn_ADC Reserve timer n for use by ADC, n=1,..,14 + CONFIG_STM32_TIMn_ADCm Reserve timer n to trigger ADCm, n=1,..,14, m=1,..,3 + + For each timer that is enabled for PWM usage, we need the following additional + configuration settings: + + CONFIG_STM32_TIMx_CHANNEL - Specifies the timer output channel {1,..,4} + + NOTE: The STM32 timers are each capable of generating different signals on + each of the four channels with different duty cycles. That capability is + not supported by this driver: Only one output channel per timer. + + JTAG Enable settings (by default only SW-DP is enabled): + + 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 + + STM32F103 Minimum specific device driver settings + + CONFIG_U[S]ARTn_SERIAL_CONSOLE - selects the USARTn (n=1,2,3) + for the console and ttys0 (default is the USART1). + CONFIG_U[S]ARTn_RXBUFSIZE - Characters are buffered as received. + This specific the size of the receive buffer + CONFIG_U[S]ARTn_TXBUFSIZE - Characters are buffered before + being sent. This specific the size of the transmit buffer + CONFIG_U[S]ARTn_BAUD - The configure BAUD of the UART. Must be + CONFIG_U[S]ARTn_BITS - The number of bits. Must be either 7 or 8. + CONFIG_U[S]ARTn_PARTIY - 0=no parity, 1=odd parity, 2=even parity + CONFIG_U[S]ARTn_2STOP - Two stop bits + + STM32F103 Minimum CAN Configuration + + CONFIG_CAN - Enables CAN support (one or both of CONFIG_STM32_CAN1 or + CONFIG_STM32_CAN2 must also be defined) + CONFIG_CAN_EXTID - Enables support for the 29-bit extended ID. Default + Standard 11-bit IDs. + CONFIG_CAN_FIFOSIZE - The size of the circular buffer of CAN messages. + Default: 8 + CONFIG_CAN_NPENDINGRTR - The size of the list of pending RTR requests. + Default: 4 + CONFIG_CAN_LOOPBACK - A CAN driver may or may not support a loopback + mode for testing. The STM32 CAN driver does support loopback mode. + CONFIG_CAN1_BAUD - CAN1 BAUD rate. Required if CONFIG_STM32_CAN1 is defined. + CONFIG_CAN2_BAUD - CAN1 BAUD rate. Required if CONFIG_STM32_CAN2 is defined. + CONFIG_CAN_TSEG1 - The number of CAN time quanta in segment 1. Default: 6 + CONFIG_CAN_TSEG2 - the number of CAN time quanta in segment 2. Default: 7 + CONFIG_CAN_REGDEBUG - If CONFIG_DEBUG is set, this will generate an + dump of all CAN registers. + + STM32F103 Minimum SPI Configuration + + CONFIG_STM32_SPI_INTERRUPTS - Select to enable interrupt driven SPI + support. Non-interrupt-driven, poll-waiting is recommended if the + interrupt rate would be to high in the interrupt driven case. + CONFIG_STM32_SPI_DMA - Use DMA to improve SPI transfer performance. + Cannot be used with CONFIG_STM32_SPI_INTERRUPT. + +Configurations +============== + +Each STM32F103 Minimum configuration is maintained in a sub-directory and +can be selected as follow: + + cd tools + ./configure.sh STM32F103 Minimum/ + cd - + . ./setenv.sh + +If this is a Windows native build, then configure.bat should be used +instead of configure.sh: + + configure.bat STM32F103-Minimum\ + +Where is one of the following: + + nsh: + --- + Configures the NuttShell (nsh) located at apps/examples/nsh. This + configuration enables a console on UART1. Support for + builtin applications is enabled, but in the base configuration no + builtin applications are selected. + + usbnsh: + ------- + + This is another NSH example. If differs from other 'nsh' configurations + in that this configurations uses a USB serial device for console I/O. + + NOTES: + + 1. This configuration uses the mconf-based configuration tool. To + change this configuration using that tool, you should: + + a. Build and install the kconfig-mconf tool. See nuttx/README.txt + see additional README.txt files in the NuttX tools repository. + + b. Execute 'make menuconfig' in nuttx/ in order to start the + reconfiguration process. + + 2. By default, this configuration uses the CodeSourcery toolchain + for Windows and builds under Cygwin (or probably MSYS). That + can easily be reconfigured, of course. + + CONFIG_HOST_WINDOWS=y : Builds under Windows + CONFIG_WINDOWS_CYGWIN=y : Using Cygwin + CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYW=y : CodeSourcery for Windows + + 3. This configuration does have UART2 output enabled and set up as + the system logging device: + + CONFIG_SYSLOG=y : Enable output to syslog, not console + CONFIG_SYSLOG_CHAR=y : Use a character device for system logging + CONFIG_SYSLOG_DEVPATH="/dev/ttyS0" : UART2 will be /dev/ttyS0 + + However, there is nothing to generate SYLOG output in the default + configuration so nothing should appear on UART2 unless you enable + some debug output or enable the USB monitor. + + 4. Enabling USB monitor SYSLOG output. If tracing is enabled, the USB + device will save encoded trace output in in-memory buffer; if the + USB monitor is enabled, that trace buffer will be periodically + emptied and dumped to the system loggin device (UART2 in this + configuraion): + + CONFIG_USBDEV_TRACE=y : Enable USB trace feature + CONFIG_USBDEV_TRACE_NRECORDS=128 : Buffer 128 records in memory + CONFIG_NSH_USBDEV_TRACE=n : No builtin tracing from NSH + CONFIG_NSH_ARCHINIT=y : Automatically start the USB monitor + CONFIG_SYSTEM_USBMONITOR=y : Enable the USB monitor daemon + CONFIG_SYSTEM_USBMONITOR_STACKSIZE=2048 : USB monitor daemon stack size + CONFIG_SYSTEM_USBMONITOR_PRIORITY=50 : USB monitor daemon priority + CONFIG_SYSTEM_USBMONITOR_INTERVAL=2 : Dump trace data every 2 seconds + + CONFIG_SYSTEM_USBMONITOR_TRACEINIT=y : Enable TRACE output + CONFIG_SYSTEM_USBMONITOR_TRACECLASS=y + CONFIG_SYSTEM_USBMONITOR_TRACETRANSFERS=y + CONFIG_SYSTEM_USBMONITOR_TRACECONTROLLER=y + CONFIG_SYSTEM_USBMONITOR_TRACEINTERRUPTS=y + + 5. By default, this project assumes that you are *NOT* using the DFU + bootloader. + + Using the Prolifics PL2303 Emulation + ------------------------------------ + You could also use the non-standard PL2303 serial device instead of + the standard CDC/ACM serial device by changing: + + CONFIG_CDCACM=y : Disable the CDC/ACM serial device class + CONFIG_CDCACM_CONSOLE=y : The CDC/ACM serial device is NOT the console + CONFIG_PL2303=y : The Prolifics PL2303 emulation is enabled + CONFIG_PL2303_CONSOLE=y : The PL2303 serial device is the console diff --git a/configs/stm32f103-minimum/include/board.h b/configs/stm32f103-minimum/include/board.h new file mode 100644 index 00000000000..8c5385e45b4 --- /dev/null +++ b/configs/stm32f103-minimum/include/board.h @@ -0,0 +1,196 @@ +/************************************************************************************ + * configs/stm32f103-minimum/include/board.h + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Authors: Gregory Nutt + * Laurent Latil + * + * 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. + * + ************************************************************************************/ + +#ifndef __CONFIGS_STM32F103_MINIMUM_BOARD_H +#define __CONFIGS_STM32F103_MINIMUM_BOARD_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include +#ifndef __ASSEMBLY__ +# include +#endif +#include "stm32_rcc.h" +#include "stm32_sdio.h" +#include "stm32.h" + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ + +/* Clocking *************************************************************************/ + +/* On-board crystal frequency is 8MHz (HSE) */ + +#define STM32_BOARD_XTAL 8000000ul + +/* PLL source is HSE/1, PLL multipler is 9: PLL frequency is 8MHz (XTAL) x 9 = 72MHz */ + +#define STM32_CFGR_PLLSRC RCC_CFGR_PLLSRC +#define STM32_CFGR_PLLXTPRE 0 +#define STM32_CFGR_PLLMUL RCC_CFGR_PLLMUL_CLKx9 +#define STM32_PLL_FREQUENCY (9*STM32_BOARD_XTAL) + +/* Use the PLL and set the SYSCLK source to be the PLL */ + +#define STM32_SYSCLK_SW RCC_CFGR_SW_PLL +#define STM32_SYSCLK_SWS RCC_CFGR_SWS_PLL +#define STM32_SYSCLK_FREQUENCY STM32_PLL_FREQUENCY + +/* AHB clock (HCLK) is SYSCLK (72MHz) */ + +#define STM32_RCC_CFGR_HPRE RCC_CFGR_HPRE_SYSCLK +#define STM32_HCLK_FREQUENCY STM32_PLL_FREQUENCY +#define STM32_BOARD_HCLK STM32_HCLK_FREQUENCY /* same as above, to satisfy compiler */ + +/* APB2 clock (PCLK2) is HCLK (72MHz) */ + +#define STM32_RCC_CFGR_PPRE2 RCC_CFGR_PPRE2_HCLK +#define STM32_PCLK2_FREQUENCY STM32_HCLK_FREQUENCY + +/* APB2 timers 1 and 8 will receive PCLK2. */ + +#define STM32_APB2_TIM1_CLKIN (STM32_PCLK2_FREQUENCY) +#define STM32_APB2_TIM8_CLKIN (STM32_PCLK2_FREQUENCY) + +/* APB1 clock (PCLK1) is HCLK/2 (36MHz) */ + +#define STM32_RCC_CFGR_PPRE1 RCC_CFGR_PPRE1_HCLKd2 +#define STM32_PCLK1_FREQUENCY (STM32_HCLK_FREQUENCY/2) + +/* APB1 timers 2-4 will be twice PCLK1 (I presume the remaining will receive PCLK1) */ + +#define STM32_APB1_TIM2_CLKIN (2*STM32_PCLK1_FREQUENCY) +#define STM32_APB1_TIM3_CLKIN (2*STM32_PCLK1_FREQUENCY) +#define STM32_APB1_TIM4_CLKIN (2*STM32_PCLK1_FREQUENCY) +#define STM32_APB1_TIM5_CLKIN (STM32_PCLK1_FREQUENCY) +#define STM32_APB1_TIM6_CLKIN (STM32_PCLK1_FREQUENCY) +#define STM32_APB1_TIM7_CLKIN (STM32_PCLK1_FREQUENCY) + +/* USB divider -- Divide PLL clock by 1.5 */ + +#define STM32_CFGR_USBPRE 0 + +/* Timer Frequencies, if APBx is set to 1, frequency is same to APBx + * otherwise frequency is 2xAPBx. + * Note: TIM1,8 are on APB2, others on APB1 */ + +#define STM32_TIM18_FREQUENCY STM32_HCLK_FREQUENCY +#define STM32_TIM27_FREQUENCY STM32_HCLK_FREQUENCY + +/* SDIO dividers. Note that slower clocking is required when DMA is disabled + * in order to avoid RX overrun/TX underrun errors due to delayed responses + * to service FIFOs in interrupt driven mode. These values have not been + * tuned!!! + * + * HCLK=72MHz, SDIOCLK=72MHz, SDIO_CK=HCLK/(178+2)=400 KHz + */ + +#define SDIO_INIT_CLKDIV (178 << SDIO_CLKCR_CLKDIV_SHIFT) + +/* DMA ON: HCLK=72 MHz, SDIOCLK=72MHz, SDIO_CK=HCLK/(2+2)=18 MHz + * DMA OFF: HCLK=72 MHz, SDIOCLK=72MHz, SDIO_CK=HCLK/(3+2)=14.4 MHz + */ + +#ifdef CONFIG_SDIO_DMA +# define SDIO_MMCXFR_CLKDIV (2 << SDIO_CLKCR_CLKDIV_SHIFT) +#else +# define SDIO_MMCXFR_CLKDIV (3 << SDIO_CLKCR_CLKDIV_SHIFT) +#endif + +/* DMA ON: HCLK=72 MHz, SDIOCLK=72MHz, SDIO_CK=HCLK/(1+2)=24 MHz + * DMA OFF: HCLK=72 MHz, SDIOCLK=72MHz, SDIO_CK=HCLK/(3+2)=14.4 MHz + */ + +#ifdef CONFIG_SDIO_DMA +# define SDIO_SDXFR_CLKDIV (1 << SDIO_CLKCR_CLKDIV_SHIFT) +#else +# define SDIO_SDXFR_CLKDIV (3 << SDIO_CLKCR_CLKDIV_SHIFT) +#endif + +/* LED definitions ******************************************************************/ + +/* The board has only one controllable LED */ + +#define LED_STARTED 0 /* No LEDs */ +#define LED_HEAPALLOCATE 1 /* LED1 on */ +#define LED_IRQSENABLED 2 /* LED2 on */ +#define LED_STACKCREATED 3 /* LED1 on */ +#define LED_INIRQ 4 /* LED1 off */ +#define LED_SIGNAL 5 /* LED2 on */ +#define LED_ASSERTION 6 /* LED1 + LED2 */ +#define LED_PANIC 7 /* LED1 / LED2 blinking */ + +/************************************************************************************ + * Public Data + ************************************************************************************/ + +#ifndef __ASSEMBLY__ + +#undef EXTERN +#if defined(__cplusplus) +#define EXTERN extern "C" +extern "C" +{ +#else +#define EXTERN extern +#endif + +/************************************************************************************ + * Public Function Prototypes + ************************************************************************************/ + +/************************************************************************************ + * Name: stm32_boardinitialize + * + * Description: + * All STM32 architectures must provide the following entry point. This entry point + * is called early in the initialization -- after all memory has been configured + * and mapped but before any devices have been initialized. + * + ************************************************************************************/ + +void stm32_boardinitialize(void); + +#undef EXTERN +#if defined(__cplusplus) +} +#endif + +#endif /* __ASSEMBLY__ */ +#endif /* __CONFIGS_STM32F103_MINIMUM_BOARD_H */ diff --git a/configs/stm32f103-minimum/nsh/Make.defs b/configs/stm32f103-minimum/nsh/Make.defs new file mode 100644 index 00000000000..b77741df255 --- /dev/null +++ b/configs/stm32f103-minimum/nsh/Make.defs @@ -0,0 +1,113 @@ +############################################################################ +# configs/stm32f103-minimum/nsh/Make.defs +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +include ${TOPDIR}/.config +include ${TOPDIR}/tools/Config.mk +include ${TOPDIR}/arch/arm/src/armv7-m/Toolchain.defs + +LDSCRIPT = ld.script + +ifeq ($(WINTOOL),y) + # Windows-native toolchains + DIRLINK = $(TOPDIR)/tools/copydir.sh + DIRUNLINK = $(TOPDIR)/tools/unlink.sh + MKDEP = $(TOPDIR)/tools/mkwindeps.sh + ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" + ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)}" +else + # Linux/Cygwin-native toolchain + MKDEP = $(TOPDIR)/tools/mkdeps$(HOSTEXEEXT) + ARCHINCLUDES = -I. -isystem $(TOPDIR)/include + ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT) +endif + +CC = $(CROSSDEV)gcc +CXX = $(CROSSDEV)g++ +CPP = $(CROSSDEV)gcc -E +LD = $(CROSSDEV)ld +AR = $(CROSSDEV)ar rcs +NM = $(CROSSDEV)nm +OBJCOPY = $(CROSSDEV)objcopy +OBJDUMP = $(CROSSDEV)objdump + +ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q'} +ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1} + +ifeq ($(CONFIG_DEBUG_SYMBOLS),y) + ARCHOPTIMIZATION = -g +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer +endif + +ARCHCFLAGS = -fno-builtin +ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef +ARCHWARNINGSXX = -Wall -Wshadow -Wundef +ARCHDEFINES = +ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 + +CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe +CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS) +CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe +CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS) +CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) +AFLAGS = $(CFLAGS) -D__ASSEMBLY__ + +NXFLATLDFLAGS1 = -r -d -warn-common +NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-pcrel.ld -no-check-sections +LDNXFLATFLAGS = -e main -s 2048 + +ASMEXT = .S +OBJEXT = .o +LIBEXT = .a +EXEEXT = + +ifneq ($(CROSSDEV),arm-nuttx-elf-) + LDFLAGS += -nostartfiles -nodefaultlibs +endif +ifeq ($(CONFIG_DEBUG_SYMBOLS),y) + LDFLAGS += -g +endif + + +HOSTCC = gcc +HOSTINCLUDES = -I. +HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -g -pipe +HOSTLDFLAGS = + diff --git a/configs/stm32f103-minimum/nsh/defconfig b/configs/stm32f103-minimum/nsh/defconfig new file mode 100644 index 00000000000..c489f2182c9 --- /dev/null +++ b/configs/stm32f103-minimum/nsh/defconfig @@ -0,0 +1,1095 @@ +# +# Automatically generated file; DO NOT EDIT. +# Nuttx/ Configuration +# + +# +# Build Setup +# +# CONFIG_EXPERIMENTAL is not set +CONFIG_DEFAULT_SMALL=y +CONFIG_HOST_LINUX=y +# CONFIG_HOST_OSX is not set +# CONFIG_HOST_WINDOWS is not set +# CONFIG_HOST_OTHER is not set + +# +# Build Configuration +# +# CONFIG_APPS_DIR="../apps" +CONFIG_BUILD_FLAT=y +# CONFIG_BUILD_2PASS is not set + +# +# Binary Output Formats +# +# CONFIG_RRLOAD_BINARY is not set +# CONFIG_INTELHEX_BINARY is not set +# CONFIG_MOTOROLA_SREC is not set +CONFIG_RAW_BINARY=y +# CONFIG_UBOOT_UIMAGE is not set + +# +# Customize Header Files +# +# CONFIG_ARCH_STDINT_H is not set +# CONFIG_ARCH_STDBOOL_H is not set +# CONFIG_ARCH_MATH_H is not set +# CONFIG_ARCH_FLOAT_H is not set +# CONFIG_ARCH_STDARG_H is not set +# CONFIG_ARCH_DEBUG_H is not set + +# +# Debug Options +# +# CONFIG_DEBUG is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_ARCH_HAVE_STACKCHECK=y +# CONFIG_STACK_COLORATION is not set +# CONFIG_DEBUG_SYMBOLS is not set +CONFIG_ARCH_HAVE_CUSTOMOPT=y +# CONFIG_DEBUG_NOOPT is not set +# CONFIG_DEBUG_CUSTOMOPT is not set +CONFIG_DEBUG_FULLOPT=y + +# +# System Type +# +CONFIG_ARCH_ARM=y +# CONFIG_ARCH_AVR is not set +# CONFIG_ARCH_HC is not set +# CONFIG_ARCH_MIPS is not set +# CONFIG_ARCH_RGMP is not set +# CONFIG_ARCH_SH is not set +# CONFIG_ARCH_SIM is not set +# CONFIG_ARCH_X86 is not set +# CONFIG_ARCH_Z16 is not set +# CONFIG_ARCH_Z80 is not set +CONFIG_ARCH="arm" + +# +# ARM Options +# +# CONFIG_ARCH_CHIP_A1X is not set +# CONFIG_ARCH_CHIP_C5471 is not set +# CONFIG_ARCH_CHIP_CALYPSO is not set +# CONFIG_ARCH_CHIP_DM320 is not set +# CONFIG_ARCH_CHIP_EFM32 is not set +# CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set +# CONFIG_ARCH_CHIP_KINETIS is not set +# CONFIG_ARCH_CHIP_KL is not set +# CONFIG_ARCH_CHIP_LM is not set +# CONFIG_ARCH_CHIP_TIVA is not set +# CONFIG_ARCH_CHIP_LPC11XX is not set +# CONFIG_ARCH_CHIP_LPC17XX is not set +# CONFIG_ARCH_CHIP_LPC214X is not set +# CONFIG_ARCH_CHIP_LPC2378 is not set +# CONFIG_ARCH_CHIP_LPC31XX is not set +# CONFIG_ARCH_CHIP_LPC43XX is not set +# CONFIG_ARCH_CHIP_NUC1XX is not set +# CONFIG_ARCH_CHIP_SAMA5 is not set +# CONFIG_ARCH_CHIP_SAMD is not set +# CONFIG_ARCH_CHIP_SAML is not set +# CONFIG_ARCH_CHIP_SAM34 is not set +# CONFIG_ARCH_CHIP_SAMV7 is not set +CONFIG_ARCH_CHIP_STM32=y +# CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set +# CONFIG_ARCH_CHIP_STR71X is not set +# CONFIG_ARCH_CHIP_TMS570 is not set +# CONFIG_ARCH_CHIP_MOXART is not set +# CONFIG_ARCH_ARM7TDMI is not set +# CONFIG_ARCH_ARM926EJS is not set +# CONFIG_ARCH_ARM920T is not set +# CONFIG_ARCH_CORTEXM0 is not set +CONFIG_ARCH_CORTEXM3=y +# CONFIG_ARCH_CORTEXM4 is not set +# CONFIG_ARCH_CORTEXM7 is not set +# CONFIG_ARCH_CORTEXA5 is not set +# CONFIG_ARCH_CORTEXA8 is not set +# CONFIG_ARCH_CORTEXA9 is not set +# CONFIG_ARCH_CORTEXR4 is not set +# CONFIG_ARCH_CORTEXR4F is not set +# CONFIG_ARCH_CORTEXR5 is not set +# CONFIG_ARCH_CORTEX5F is not set +# CONFIG_ARCH_CORTEXR7 is not set +# CONFIG_ARCH_CORTEXR7F is not set +CONFIG_ARCH_FAMILY="armv7-m" +CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +CONFIG_ARM_TOOLCHAIN_GNU=y +# CONFIG_ARMV7M_USEBASEPRI is not set +CONFIG_ARCH_HAVE_CMNVECTOR=y +# CONFIG_ARMV7M_CMNVECTOR is not set +# CONFIG_ARMV7M_LAZYFPU is not set +# CONFIG_ARCH_HAVE_FPU is not set +# CONFIG_ARCH_HAVE_DPFPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set +CONFIG_ARM_HAVE_MPU_UNIFIED=y +# CONFIG_ARM_MPU is not set + +# +# ARMV7M Configuration Options +# +# CONFIG_ARMV7M_HAVE_ICACHE is not set +# CONFIG_ARMV7M_HAVE_DCACHE is not set +# CONFIG_ARMV7M_HAVE_ITCM is not set +# CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set +# CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set +# CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set +# CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set +CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL=y +CONFIG_ARMV7M_HAVE_STACKCHECK=y +# CONFIG_ARMV7M_STACKCHECK is not set +# CONFIG_ARMV7M_ITMSYSLOG is not set +CONFIG_SERIAL_TERMIOS=y + +# +# STM32 Configuration Options +# +# CONFIG_ARCH_CHIP_STM32L151C6 is not set +# CONFIG_ARCH_CHIP_STM32L151C8 is not set +# CONFIG_ARCH_CHIP_STM32L151CB is not set +# CONFIG_ARCH_CHIP_STM32L151R6 is not set +# CONFIG_ARCH_CHIP_STM32L151R8 is not set +# CONFIG_ARCH_CHIP_STM32L151RB is not set +# CONFIG_ARCH_CHIP_STM32L151V6 is not set +# CONFIG_ARCH_CHIP_STM32L151V8 is not set +# CONFIG_ARCH_CHIP_STM32L151VB is not set +# CONFIG_ARCH_CHIP_STM32L152C6 is not set +# CONFIG_ARCH_CHIP_STM32L152C8 is not set +# CONFIG_ARCH_CHIP_STM32L152CB is not set +# CONFIG_ARCH_CHIP_STM32L152R6 is not set +# CONFIG_ARCH_CHIP_STM32L152R8 is not set +# CONFIG_ARCH_CHIP_STM32L152RB is not set +# CONFIG_ARCH_CHIP_STM32L152V6 is not set +# CONFIG_ARCH_CHIP_STM32L152V8 is not set +# CONFIG_ARCH_CHIP_STM32L152VB is not set +# CONFIG_ARCH_CHIP_STM32L162ZD is not set +# CONFIG_ARCH_CHIP_STM32L162VE is not set +# CONFIG_ARCH_CHIP_STM32F100C8 is not set +# CONFIG_ARCH_CHIP_STM32F100CB is not set +# CONFIG_ARCH_CHIP_STM32F100R8 is not set +# CONFIG_ARCH_CHIP_STM32F100RB is not set +# CONFIG_ARCH_CHIP_STM32F100RC is not set +# CONFIG_ARCH_CHIP_STM32F100RD is not set +# CONFIG_ARCH_CHIP_STM32F100RE is not set +# CONFIG_ARCH_CHIP_STM32F100V8 is not set +# CONFIG_ARCH_CHIP_STM32F100VB is not set +# CONFIG_ARCH_CHIP_STM32F100VC is not set +# CONFIG_ARCH_CHIP_STM32F100VD is not set +# CONFIG_ARCH_CHIP_STM32F100VE is not set +# CONFIG_ARCH_CHIP_STM32F102CB is not set +# CONFIG_ARCH_CHIP_STM32F103T8 is not set +# CONFIG_ARCH_CHIP_STM32F103TB is not set +# CONFIG_ARCH_CHIP_STM32F103C4 is not set +CONFIG_ARCH_CHIP_STM32F103C8=y +# CONFIG_ARCH_CHIP_STM32F103CB is not set +# CONFIG_ARCH_CHIP_STM32F103R8 is not set +# CONFIG_ARCH_CHIP_STM32F103RB is not set +# CONFIG_ARCH_CHIP_STM32F103RC is not set +# CONFIG_ARCH_CHIP_STM32F103RD is not set +# CONFIG_ARCH_CHIP_STM32F103RE is not set +# CONFIG_ARCH_CHIP_STM32F103RG is not set +# CONFIG_ARCH_CHIP_STM32F103V8 is not set +# CONFIG_ARCH_CHIP_STM32F103VB is not set +# CONFIG_ARCH_CHIP_STM32F103VC is not set +# CONFIG_ARCH_CHIP_STM32F103VE is not set +# CONFIG_ARCH_CHIP_STM32F103ZE is not set +# CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F107VC is not set +# CONFIG_ARCH_CHIP_STM32F205RG is not set +# CONFIG_ARCH_CHIP_STM32F207IG is not set +# CONFIG_ARCH_CHIP_STM32F207ZE is not set +# CONFIG_ARCH_CHIP_STM32F302K6 is not set +# CONFIG_ARCH_CHIP_STM32F302K8 is not set +# CONFIG_ARCH_CHIP_STM32F302CB is not set +# CONFIG_ARCH_CHIP_STM32F302CC is not set +# CONFIG_ARCH_CHIP_STM32F302RB is not set +# CONFIG_ARCH_CHIP_STM32F302RC is not set +# CONFIG_ARCH_CHIP_STM32F302VB is not set +# CONFIG_ARCH_CHIP_STM32F302VC is not set +# CONFIG_ARCH_CHIP_STM32F303K6 is not set +# CONFIG_ARCH_CHIP_STM32F303K8 is not set +# CONFIG_ARCH_CHIP_STM32F303C6 is not set +# CONFIG_ARCH_CHIP_STM32F303C8 is not set +# CONFIG_ARCH_CHIP_STM32F303CB is not set +# CONFIG_ARCH_CHIP_STM32F303CC is not set +# CONFIG_ARCH_CHIP_STM32F303RB is not set +# CONFIG_ARCH_CHIP_STM32F303RC is not set +# CONFIG_ARCH_CHIP_STM32F303RD is not set +# CONFIG_ARCH_CHIP_STM32F303RE is not set +# CONFIG_ARCH_CHIP_STM32F303VB is not set +# CONFIG_ARCH_CHIP_STM32F303VC is not set +# CONFIG_ARCH_CHIP_STM32F372C8 is not set +# CONFIG_ARCH_CHIP_STM32F372R8 is not set +# CONFIG_ARCH_CHIP_STM32F372V8 is not set +# CONFIG_ARCH_CHIP_STM32F372CB is not set +# CONFIG_ARCH_CHIP_STM32F372RB is not set +# CONFIG_ARCH_CHIP_STM32F372VB is not set +# CONFIG_ARCH_CHIP_STM32F372CC is not set +# CONFIG_ARCH_CHIP_STM32F372RC is not set +# CONFIG_ARCH_CHIP_STM32F372VC is not set +# CONFIG_ARCH_CHIP_STM32F373C8 is not set +# CONFIG_ARCH_CHIP_STM32F373R8 is not set +# CONFIG_ARCH_CHIP_STM32F373V8 is not set +# CONFIG_ARCH_CHIP_STM32F373CB is not set +# CONFIG_ARCH_CHIP_STM32F373RB is not set +# CONFIG_ARCH_CHIP_STM32F373VB is not set +# CONFIG_ARCH_CHIP_STM32F373CC is not set +# CONFIG_ARCH_CHIP_STM32F373RC is not set +# CONFIG_ARCH_CHIP_STM32F373VC is not set +# CONFIG_ARCH_CHIP_STM32F401RE is not set +# CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set +# CONFIG_ARCH_CHIP_STM32F405RG is not set +# CONFIG_ARCH_CHIP_STM32F405VG is not set +# CONFIG_ARCH_CHIP_STM32F405ZG is not set +# CONFIG_ARCH_CHIP_STM32F407VE is not set +# CONFIG_ARCH_CHIP_STM32F407VG is not set +# CONFIG_ARCH_CHIP_STM32F407ZE is not set +# CONFIG_ARCH_CHIP_STM32F407ZG is not set +# CONFIG_ARCH_CHIP_STM32F407IE is not set +# CONFIG_ARCH_CHIP_STM32F407IG is not set +# CONFIG_ARCH_CHIP_STM32F427V is not set +# CONFIG_ARCH_CHIP_STM32F427Z is not set +# CONFIG_ARCH_CHIP_STM32F427I is not set +# CONFIG_ARCH_CHIP_STM32F429V is not set +# CONFIG_ARCH_CHIP_STM32F429Z is not set +# CONFIG_ARCH_CHIP_STM32F429I is not set +# CONFIG_ARCH_CHIP_STM32F429B is not set +# CONFIG_ARCH_CHIP_STM32F429N is not set +# CONFIG_ARCH_CHIP_STM32F446M is not set +# CONFIG_ARCH_CHIP_STM32F446R is not set +# CONFIG_ARCH_CHIP_STM32F446V is not set +# CONFIG_ARCH_CHIP_STM32F446Z is not set +# CONFIG_ARCH_CHIP_STM32F469A is not set +# CONFIG_ARCH_CHIP_STM32F469I is not set +# CONFIG_ARCH_CHIP_STM32F469B is not set +# CONFIG_ARCH_CHIP_STM32F469N is not set +CONFIG_STM32_FLASH_CONFIG_DEFAULT=y +# CONFIG_STM32_FLASH_CONFIG_4 is not set +# CONFIG_STM32_FLASH_CONFIG_6 is not set +# CONFIG_STM32_FLASH_CONFIG_8 is not set +# CONFIG_STM32_FLASH_CONFIG_B is not set +# CONFIG_STM32_FLASH_CONFIG_C is not set +# CONFIG_STM32_FLASH_CONFIG_D is not set +# CONFIG_STM32_FLASH_CONFIG_E is not set +# CONFIG_STM32_FLASH_CONFIG_F is not set +# CONFIG_STM32_FLASH_CONFIG_G is not set +# CONFIG_STM32_FLASH_CONFIG_I is not set +# CONFIG_STM32_STM32L15XX is not set +# CONFIG_STM32_ENERGYLITE is not set +CONFIG_STM32_STM32F10XX=y +# CONFIG_STM32_VALUELINE is not set +# CONFIG_STM32_CONNECTIVITYLINE is not set +CONFIG_STM32_PERFORMANCELINE=y +# CONFIG_STM32_USBACCESSLINE is not set +# CONFIG_STM32_HIGHDENSITY is not set +CONFIG_STM32_MEDIUMDENSITY=y +# CONFIG_STM32_LOWDENSITY is not set +# CONFIG_STM32_STM32F20XX is not set +# CONFIG_STM32_STM32F205 is not set +# CONFIG_STM32_STM32F207 is not set +# CONFIG_STM32_STM32F30XX is not set +# CONFIG_STM32_STM32F302 is not set +# CONFIG_STM32_STM32F303 is not set +# CONFIG_STM32_STM32F37XX is not set +# CONFIG_STM32_STM32F40XX is not set +# CONFIG_STM32_STM32F401 is not set +# CONFIG_STM32_STM32F411 is not set +# CONFIG_STM32_STM32F405 is not set +# CONFIG_STM32_STM32F407 is not set +# CONFIG_STM32_STM32F427 is not set +# CONFIG_STM32_STM32F429 is not set +# CONFIG_STM32_STM32F446 is not set +# CONFIG_STM32_STM32F469 is not set +# CONFIG_STM32_DFU is not set + +# +# STM32 Peripheral Support +# +# CONFIG_STM32_HAVE_CCM is not set +CONFIG_STM32_HAVE_USBDEV=y +# CONFIG_STM32_HAVE_OTGFS is not set +# CONFIG_STM32_HAVE_FSMC is not set +# CONFIG_STM32_HAVE_LTDC is not set +CONFIG_STM32_HAVE_USART3=y +CONFIG_STM32_HAVE_UART4=y +CONFIG_STM32_HAVE_UART5=y +# CONFIG_STM32_HAVE_USART6 is not set +# CONFIG_STM32_HAVE_UART7 is not set +# CONFIG_STM32_HAVE_UART8 is not set +CONFIG_STM32_HAVE_TIM1=y +# CONFIG_STM32_HAVE_TIM2 is not set +CONFIG_STM32_HAVE_TIM3=y +CONFIG_STM32_HAVE_TIM4=y +CONFIG_STM32_HAVE_TIM5=y +CONFIG_STM32_HAVE_TIM6=y +CONFIG_STM32_HAVE_TIM7=y +CONFIG_STM32_HAVE_TIM8=y +# CONFIG_STM32_HAVE_TIM9 is not set +# CONFIG_STM32_HAVE_TIM10 is not set +# CONFIG_STM32_HAVE_TIM11 is not set +# CONFIG_STM32_HAVE_TIM12 is not set +# CONFIG_STM32_HAVE_TIM13 is not set +# CONFIG_STM32_HAVE_TIM14 is not set +# CONFIG_STM32_HAVE_TIM15 is not set +# CONFIG_STM32_HAVE_TIM16 is not set +# CONFIG_STM32_HAVE_TIM17 is not set +CONFIG_STM32_HAVE_ADC2=y +CONFIG_STM32_HAVE_ADC3=y +# CONFIG_STM32_HAVE_ADC4 is not set +# CONFIG_STM32_HAVE_ADC1_DMA is not set +# CONFIG_STM32_HAVE_ADC2_DMA is not set +# CONFIG_STM32_HAVE_ADC3_DMA is not set +# CONFIG_STM32_HAVE_ADC4_DMA is not set +CONFIG_STM32_HAVE_CAN1=y +# CONFIG_STM32_HAVE_CAN2 is not set +# CONFIG_STM32_HAVE_DAC1 is not set +# CONFIG_STM32_HAVE_DAC2 is not set +# CONFIG_STM32_HAVE_RNG is not set +# CONFIG_STM32_HAVE_ETHMAC is not set +CONFIG_STM32_HAVE_I2C2=y +# CONFIG_STM32_HAVE_I2C3 is not set +CONFIG_STM32_HAVE_SPI2=y +CONFIG_STM32_HAVE_SPI3=y +# CONFIG_STM32_HAVE_SPI4 is not set +# CONFIG_STM32_HAVE_SPI5 is not set +# CONFIG_STM32_HAVE_SPI6 is not set +# CONFIG_STM32_HAVE_SAIPLL is not set +# CONFIG_STM32_HAVE_I2SPLL is not set +# CONFIG_STM32_ADC1 is not set +# CONFIG_STM32_ADC2 is not set +# CONFIG_STM32_ADC3 is not set +# CONFIG_STM32_BKP is not set +# CONFIG_STM32_CAN1 is not set +# CONFIG_STM32_CRC is not set +# CONFIG_STM32_DMA1 is not set +# CONFIG_STM32_DMA2 is not set +# CONFIG_STM32_I2C1 is not set +# CONFIG_STM32_I2C2 is not set +# CONFIG_STM32_PWR is not set +# CONFIG_STM32_SDIO is not set +# CONFIG_STM32_SPI1 is not set +# CONFIG_STM32_SPI2 is not set +# CONFIG_STM32_SPI3 is not set +# CONFIG_STM32_TIM1 is not set +# CONFIG_STM32_TIM2 is not set +# CONFIG_STM32_TIM3 is not set +# CONFIG_STM32_TIM4 is not set +# CONFIG_STM32_TIM5 is not set +# CONFIG_STM32_TIM6 is not set +# CONFIG_STM32_TIM7 is not set +# CONFIG_STM32_TIM8 is not set +CONFIG_STM32_USART1=y +# CONFIG_STM32_USART2 is not set +# CONFIG_STM32_USART3 is not set +# CONFIG_STM32_UART4 is not set +# CONFIG_STM32_UART5 is not set +# CONFIG_STM32_USB is not set +# CONFIG_STM32_IWDG is not set +# CONFIG_STM32_WWDG is not set +# CONFIG_STM32_NOEXT_VECTORS is not set + +# +# Alternate Pin Mapping +# +# CONFIG_STM32_USART1_REMAP is not set +# CONFIG_STM32_JTAG_DISABLE is not set +CONFIG_STM32_JTAG_FULL_ENABLE=y +# CONFIG_STM32_JTAG_NOJNTRST_ENABLE is not set +# CONFIG_STM32_JTAG_SW_ENABLE is not set +CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG=y +# CONFIG_STM32_FORCEPOWER is not set +# CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set +# CONFIG_STM32_TIM1_CAP is not set +# CONFIG_STM32_TIM3_CAP is not set +# CONFIG_STM32_TIM4_CAP is not set +# CONFIG_STM32_TIM5_CAP is not set +# CONFIG_STM32_TIM8_CAP is not set +CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y + +# +# U[S]ART Configuration +# +CONFIG_STM32_USART1_SERIALDRIVER=y +# CONFIG_STM32_USART1_1WIREDRIVER is not set +# CONFIG_USART1_RS485 is not set +# CONFIG_SERIAL_DISABLE_REORDERING is not set +# CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set +# CONFIG_STM32_USART_SINGLEWIRE is not set +CONFIG_STM32_HAVE_RTC_COUNTER=y +# CONFIG_STM32_HAVE_RTC_SUBSECONDS is not set + +# +# USB FS Host Configuration +# + +# +# USB HS Host Configuration +# + +# +# USB Host Debug Configuration +# + +# +# USB Device Configuration +# + +# +# Architecture Options +# +# CONFIG_ARCH_NOINTC is not set +# CONFIG_ARCH_VECNOTIRQ is not set +# CONFIG_ARCH_DMA is not set +CONFIG_ARCH_HAVE_IRQPRIO=y +# CONFIG_ARCH_L2CACHE is not set +# CONFIG_ARCH_HAVE_COHERENT_DCACHE is not set +# CONFIG_ARCH_HAVE_ADDRENV is not set +# CONFIG_ARCH_NEED_ADDRENV_MAPPING is not set +# CONFIG_ARCH_HAVE_MULTICPU is not set +CONFIG_ARCH_HAVE_VFORK=y +# CONFIG_ARCH_HAVE_MMU is not set +CONFIG_ARCH_HAVE_MPU=y +# CONFIG_ARCH_NAND_HWECC is not set +# CONFIG_ARCH_HAVE_EXTCLK is not set +# CONFIG_ARCH_HAVE_POWEROFF is not set +CONFIG_ARCH_HAVE_RESET=y +# CONFIG_ARCH_USE_MPU is not set +# CONFIG_ARCH_IRQPRIO is not set +CONFIG_ARCH_STACKDUMP=y +# CONFIG_ENDIAN_BIG is not set +# CONFIG_ARCH_IDLE_CUSTOM is not set +# CONFIG_ARCH_HAVE_RAMFUNCS is not set +CONFIG_ARCH_HAVE_RAMVECTORS=y +# CONFIG_ARCH_RAMVECTORS is not set + +# +# Board Settings +# +CONFIG_BOARD_LOOPSPERMSEC=5483 +# CONFIG_ARCH_CALIBRATION is not set + +# +# Interrupt options +# +CONFIG_ARCH_HAVE_INTERRUPTSTACK=y +CONFIG_ARCH_INTERRUPTSTACK=0 +CONFIG_ARCH_HAVE_HIPRI_INTERRUPT=y +# CONFIG_ARCH_HIPRI_INTERRUPT is not set + +# +# Boot options +# +# CONFIG_BOOT_RUNFROMEXTSRAM is not set +CONFIG_BOOT_RUNFROMFLASH=y +# CONFIG_BOOT_RUNFROMISRAM is not set +# CONFIG_BOOT_RUNFROMSDRAM is not set +# CONFIG_BOOT_COPYTORAM is not set + +# +# Boot Memory Configuration +# +CONFIG_RAM_START=0x20000000 +CONFIG_RAM_SIZE=20480 +# CONFIG_ARCH_HAVE_SDRAM is not set + +# +# Board Selection +# +# CONFIG_ARCH_BOARD_STM32_TINY is not set +CONFIG_ARCH_BOARD_STM32F103_MINIMUM=y +# CONFIG_ARCH_BOARD_CUSTOM is not set +CONFIG_ARCH_BOARD="stm32f103-minimum" + +# +# Common Board Options +# +CONFIG_ARCH_HAVE_LEDS=y +CONFIG_ARCH_LEDS=y +CONFIG_NSH_MMCSDMINOR=0 + +# +# Board-Specific Options +# +CONFIG_LIB_BOARDCTL=y +# CONFIG_BOARDCTL_RESET is not set +# CONFIG_BOARDCTL_UNIQUEID is not set +# CONFIG_BOARDCTL_TSCTEST is not set +# CONFIG_BOARDCTL_ADCTEST is not set +# CONFIG_BOARDCTL_PWMTEST is not set +# CONFIG_BOARDCTL_GRAPHICS is not set +# CONFIG_BOARDCTL_IOCTL is not set + +# +# RTOS Features +# +# CONFIG_DISABLE_OS_API is not set + +# +# Clocks and Timers +# +CONFIG_USEC_PER_TICK=10000 +# CONFIG_SYSTEM_TIME64 is not set +# CONFIG_CLOCK_MONOTONIC is not set +# CONFIG_JULIAN_TIME is not set +CONFIG_START_YEAR=2011 +CONFIG_START_MONTH=7 +CONFIG_START_DAY=5 +CONFIG_MAX_WDOGPARMS=2 +CONFIG_PREALLOC_WDOGS=4 +CONFIG_WDOG_INTRESERVE=0 +CONFIG_PREALLOC_TIMERS=4 + +# +# Tasks and Scheduling +# +# CONFIG_INIT_NONE is not set +CONFIG_INIT_ENTRYPOINT=y +# CONFIG_INIT_FILEPATH is not set +CONFIG_USER_ENTRYPOINT="nsh_main" +CONFIG_RR_INTERVAL=200 +# CONFIG_SCHED_SPORADIC is not set +CONFIG_TASK_NAME_SIZE=0 +CONFIG_MAX_TASKS=16 +# CONFIG_SCHED_HAVE_PARENT is not set +CONFIG_SCHED_WAITPID=y + +# +# Pthread Options +# +# CONFIG_MUTEX_TYPES is not set +CONFIG_NPTHREAD_KEYS=4 + +# +# Performance Monitoring +# +# CONFIG_SCHED_CPULOAD is not set +# CONFIG_SCHED_INSTRUMENTATION is not set + +# +# Files and I/O +# +CONFIG_DEV_CONSOLE=y +# CONFIG_FDCLONE_DISABLE is not set +# CONFIG_FDCLONE_STDIO is not set +CONFIG_SDCLONE_DISABLE=y +CONFIG_NFILE_DESCRIPTORS=8 +CONFIG_NFILE_STREAMS=8 +CONFIG_NAME_MAX=32 +# CONFIG_PRIORITY_INHERITANCE is not set + +# +# RTOS hooks +# +# CONFIG_BOARD_INITIALIZE is not set +# CONFIG_SCHED_STARTHOOK is not set +# CONFIG_SCHED_ATEXIT is not set +# CONFIG_SCHED_ONEXIT is not set +# CONFIG_SIG_EVTHREAD is not set + +# +# Signal Numbers +# +CONFIG_SIG_SIGUSR1=1 +CONFIG_SIG_SIGUSR2=2 +CONFIG_SIG_SIGALARM=3 +CONFIG_SIG_SIGCONDTIMEDOUT=16 +CONFIG_SIG_SIGWORK=17 + +# +# POSIX Message Queue Options +# +CONFIG_PREALLOC_MQ_MSGS=4 +CONFIG_MQ_MAXMSGSIZE=32 +# CONFIG_MODULE is not set + +# +# Work queue support +# +CONFIG_SCHED_WORKQUEUE=y +CONFIG_SCHED_HPWORK=y +CONFIG_SCHED_HPWORKPRIORITY=192 +CONFIG_SCHED_HPWORKPERIOD=50000 +CONFIG_SCHED_HPWORKSTACKSIZE=2048 +# CONFIG_SCHED_LPWORK is not set + +# +# Stack and heap information +# +CONFIG_IDLETHREAD_STACKSIZE=1024 +CONFIG_USERMAIN_STACKSIZE=2048 +CONFIG_PTHREAD_STACK_MIN=256 +CONFIG_PTHREAD_STACK_DEFAULT=2048 +# CONFIG_LIB_SYSCALL is not set + +# +# Device Drivers +# +# CONFIG_DISABLE_POLL is not set +CONFIG_DEV_NULL=y +# CONFIG_DEV_ZERO is not set +# CONFIG_DEV_LOOP is not set + +# +# Buffering +# +# CONFIG_DRVR_WRITEBUFFER is not set +# CONFIG_DRVR_READAHEAD is not set +# CONFIG_RAMDISK is not set +# CONFIG_CAN is not set +# CONFIG_ARCH_HAVE_PWM_PULSECOUNT is not set +# CONFIG_ARCH_HAVE_PWM_MULTICHAN is not set +# CONFIG_PWM is not set +CONFIG_ARCH_HAVE_I2CRESET=y +# CONFIG_I2C is not set +# CONFIG_SPI is not set +# CONFIG_I2S is not set + +# +# Timer Driver Support +# +# CONFIG_TIMER is not set +# CONFIG_RTC is not set +# CONFIG_WATCHDOG is not set +# CONFIG_ANALOG is not set +# CONFIG_AUDIO_DEVICES is not set +# CONFIG_VIDEO_DEVICES is not set +# CONFIG_BCH is not set +# CONFIG_INPUT is not set +# CONFIG_IOEXPANDER is not set +# CONFIG_LCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_MMCSD is not set +# CONFIG_MODEM is not set +# CONFIG_MTD is not set +# CONFIG_EEPROM is not set +# CONFIG_PIPES is not set +# CONFIG_PM is not set +# CONFIG_POWER is not set +# CONFIG_SENSORS is not set +# CONFIG_SERCOMM_CONSOLE is not set +CONFIG_SERIAL=y +# CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_16550_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set +CONFIG_MCU_SERIAL=y +CONFIG_STANDARD_SERIAL=y +CONFIG_SERIAL_NPOLLWAITERS=2 +# CONFIG_SERIAL_IFLOWCONTROL is not set +# CONFIG_SERIAL_OFLOWCONTROL is not set +# CONFIG_SERIAL_DMA is not set +CONFIG_ARCH_HAVE_SERIAL_TERMIOS=y +CONFIG_USART1_SERIAL_CONSOLE=y +# CONFIG_OTHER_SERIAL_CONSOLE is not set +# CONFIG_NO_SERIAL_CONSOLE is not set + +# +# USART1 Configuration +# +CONFIG_USART1_RXBUFSIZE=256 +CONFIG_USART1_TXBUFSIZE=256 +CONFIG_USART1_BAUD=115200 +CONFIG_USART1_BITS=8 +CONFIG_USART1_PARITY=0 +CONFIG_USART1_2STOP=0 +# CONFIG_USART1_IFLOWCONTROL is not set +# CONFIG_USART1_OFLOWCONTROL is not set +# CONFIG_USART1_DMA is not set +# CONFIG_USBDEV is not set +# CONFIG_USBHOST is not set +# CONFIG_DRIVERS_WIRELESS is not set + +# +# System Logging Device Options +# + +# +# System Logging +# +# CONFIG_RAMLOG is not set +# CONFIG_SYSLOG_CONSOLE is not set + +# +# Networking Support +# +# CONFIG_ARCH_HAVE_NET is not set +# CONFIG_ARCH_HAVE_PHY is not set +# CONFIG_NET is not set + +# +# Crypto API +# +# CONFIG_CRYPTO is not set + +# +# File Systems +# + +# +# File system configuration +# +# CONFIG_DISABLE_MOUNTPOINT is not set +# CONFIG_FS_AUTOMOUNTER is not set +CONFIG_DISABLE_PSEUDOFS_OPERATIONS=y +# CONFIG_FS_READABLE is not set +# CONFIG_FS_WRITABLE is not set +# CONFIG_FS_NAMED_SEMAPHORES is not set +CONFIG_FS_MQUEUE_MPATH="/var/mqueue" +# CONFIG_FS_RAMMAP is not set +# CONFIG_FS_FAT is not set +# CONFIG_FS_NXFFS is not set +# CONFIG_FS_ROMFS is not set +# CONFIG_FS_TMPFS is not set +# CONFIG_FS_SMARTFS is not set +# CONFIG_FS_BINFS is not set +# CONFIG_FS_PROCFS is not set +# CONFIG_FS_UNIONFS is not set + +# +# System Logging +# +# CONFIG_SYSLOG is not set +# CONFIG_SYSLOG_TIMESTAMP is not set + +# +# Graphics Support +# +# CONFIG_NX is not set + +# +# Memory Management +# +# CONFIG_MM_SMALL is not set +CONFIG_MM_REGIONS=1 +# CONFIG_ARCH_HAVE_HEAP2 is not set +# CONFIG_GRAN is not set + +# +# Audio Support +# +# CONFIG_AUDIO is not set + +# +# Wireless Support +# + +# +# Binary Loader +# +# CONFIG_BINFMT_DISABLE is not set +# CONFIG_BINFMT_EXEPATH is not set +# CONFIG_NXFLAT is not set +# CONFIG_ELF is not set +CONFIG_BUILTIN=y +# CONFIG_PIC is not set +CONFIG_SYMTAB_ORDEREDBYNAME=y + +# +# Library Routines +# + +# +# Standard C Library Options +# +CONFIG_STDIO_BUFFER_SIZE=64 +CONFIG_STDIO_LINEBUFFER=y +CONFIG_NUNGET_CHARS=2 +CONFIG_LIB_HOMEDIR="/" +# CONFIG_LIBM is not set +# CONFIG_NOPRINTF_FIELDWIDTH is not set +# CONFIG_LIBC_FLOATINGPOINT is not set +# CONFIG_LIBC_LONG_LONG is not set +# CONFIG_LIBC_IOCTL_VARIADIC is not set +CONFIG_LIB_RAND_ORDER=1 +# CONFIG_EOL_IS_CR is not set +# CONFIG_EOL_IS_LF is not set +# CONFIG_EOL_IS_BOTH_CRLF is not set +CONFIG_EOL_IS_EITHER_CRLF=y +# CONFIG_LIBC_EXECFUNCS is not set +CONFIG_POSIX_SPAWN_PROXY_STACKSIZE=1024 +CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=2048 +# CONFIG_LIBC_STRERROR is not set +# CONFIG_LIBC_PERROR_STDOUT is not set +CONFIG_ARCH_LOWPUTC=y +# CONFIG_LIBC_LOCALTIME is not set +# CONFIG_TIME_EXTENDED is not set +CONFIG_LIB_SENDFILE_BUFSIZE=512 +# CONFIG_ARCH_ROMGETC is not set +# CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set +# CONFIG_LIBC_NETDB is not set + +# +# Non-standard Library Support +# +# CONFIG_LIB_KBDCODEC is not set +# CONFIG_LIB_SLCDCODEC is not set + +# +# Basic CXX Support +# +# CONFIG_C99_BOOL8 is not set +# CONFIG_HAVE_CXX is not set + +# +# Application Configuration +# + +# +# Built-In Applications +# +CONFIG_BUILTIN_PROXY_STACKSIZE=1024 + +# +# CAN Utilities +# + +# +# Examples +# +# CONFIG_EXAMPLES_CHAT is not set +# CONFIG_EXAMPLES_CONFIGDATA is not set +# CONFIG_EXAMPLES_CPUHOG is not set +# CONFIG_EXAMPLES_DHCPD is not set +# CONFIG_EXAMPLES_ELF is not set +# CONFIG_EXAMPLES_FTPC is not set +# CONFIG_EXAMPLES_FTPD is not set +# CONFIG_EXAMPLES_HELLO is not set +# CONFIG_EXAMPLES_JSON is not set +# CONFIG_EXAMPLES_HIDKBD is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set +# CONFIG_EXAMPLES_IGMP is not set +# CONFIG_EXAMPLES_MEDIA is not set +# CONFIG_EXAMPLES_MM is not set +# CONFIG_EXAMPLES_MODBUS is not set +# CONFIG_EXAMPLES_MOUNT is not set +# CONFIG_EXAMPLES_NRF24L01TERM is not set +CONFIG_EXAMPLES_NSH=y +# CONFIG_EXAMPLES_NULL is not set +# CONFIG_EXAMPLES_NX is not set +# CONFIG_EXAMPLES_NXTERM is not set +# CONFIG_EXAMPLES_NXFFS is not set +# CONFIG_EXAMPLES_NXHELLO is not set +# CONFIG_EXAMPLES_NXIMAGE is not set +# CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTEXT is not set +# CONFIG_EXAMPLES_OSTEST is not set +# CONFIG_EXAMPLES_PCA9635 is not set +# CONFIG_EXAMPLES_PIPE is not set +# CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_POSIXSPAWN is not set +# CONFIG_EXAMPLES_RGBLED is not set +# CONFIG_EXAMPLES_RGMP is not set +# CONFIG_EXAMPLES_SENDMAIL is not set +# CONFIG_EXAMPLES_SERIALBLASTER is not set +# CONFIG_EXAMPLES_SERIALRX is not set +# CONFIG_EXAMPLES_SERLOOP is not set +# CONFIG_EXAMPLES_SLCD is not set +# CONFIG_EXAMPLES_SMART_TEST is not set +# CONFIG_EXAMPLES_SMART is not set +# CONFIG_EXAMPLES_SMP is not set +# CONFIG_EXAMPLES_TCPECHO is not set +# CONFIG_EXAMPLES_TELNETD is not set +# CONFIG_EXAMPLES_TIFF is not set +# CONFIG_EXAMPLES_TOUCHSCREEN is not set +# CONFIG_EXAMPLES_WEBSERVER is not set +# CONFIG_EXAMPLES_USBSERIAL is not set +# CONFIG_EXAMPLES_USBTERM is not set +# CONFIG_EXAMPLES_WATCHDOG is not set + +# +# File System Utilities +# +# CONFIG_FSUTILS_INIFILE is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set + +# +# Graphics Support +# +# CONFIG_TIFF is not set +# CONFIG_GRAPHICS_TRAVELER is not set + +# +# Interpreters +# +# CONFIG_INTERPRETERS_FICL is not set +# CONFIG_INTERPRETERS_PCODE is not set +# CONFIG_INTERPRETERS_MICROPYTHON is not set + +# +# FreeModBus +# +# CONFIG_MODBUS is not set + +# +# Network Utilities +# +# CONFIG_NETUTILS_CHAT is not set +# CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set +# CONFIG_NETUTILS_FTPC is not set +# CONFIG_NETUTILS_JSON is not set +# CONFIG_NETUTILS_SMTP is not set + +# +# NSH Library +# +CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set + +# +# Command Line Configuration +# +CONFIG_NSH_READLINE=y +# CONFIG_NSH_CLE is not set +CONFIG_NSH_LINELEN=80 +CONFIG_NSH_DISABLE_SEMICOLON=y +# CONFIG_NSH_CMDPARMS is not set +CONFIG_NSH_MAXARGUMENTS=6 +# CONFIG_NSH_ARGCAT is not set +CONFIG_NSH_NESTDEPTH=3 +CONFIG_NSH_DISABLEBG=y +CONFIG_NSH_BUILTIN_APPS=y + +# +# Disable Individual commands +# +CONFIG_NSH_DISABLE_ADDROUTE=y +CONFIG_NSH_DISABLE_BASENAME=y +# CONFIG_NSH_DISABLE_CAT is not set +# CONFIG_NSH_DISABLE_CD is not set +# CONFIG_NSH_DISABLE_CP is not set +CONFIG_NSH_DISABLE_CMP=y +CONFIG_NSH_DISABLE_DATE=y +# CONFIG_NSH_DISABLE_DD is not set +CONFIG_NSH_DISABLE_DF=y +CONFIG_NSH_DISABLE_DELROUTE=y +CONFIG_NSH_DISABLE_DIRNAME=y +# CONFIG_NSH_DISABLE_ECHO is not set +# CONFIG_NSH_DISABLE_EXEC is not set +# CONFIG_NSH_DISABLE_EXIT is not set +# CONFIG_NSH_DISABLE_FREE is not set +# CONFIG_NSH_DISABLE_GET is not set +# CONFIG_NSH_DISABLE_HELP is not set +# CONFIG_NSH_DISABLE_HEXDUMP is not set +CONFIG_NSH_DISABLE_IFCONFIG=y +CONFIG_NSH_DISABLE_IFUPDOWN=y +# CONFIG_NSH_DISABLE_KILL is not set +CONFIG_NSH_DISABLE_LOSETUP=y +CONFIG_NSH_DISABLE_LOSMART=y +# CONFIG_NSH_DISABLE_LS is not set +# CONFIG_NSH_DISABLE_MB is not set +# CONFIG_NSH_DISABLE_MKDIR is not set +# CONFIG_NSH_DISABLE_MKFIFO is not set +# CONFIG_NSH_DISABLE_MKRD is not set +# CONFIG_NSH_DISABLE_MH is not set +# CONFIG_NSH_DISABLE_MOUNT is not set +# CONFIG_NSH_DISABLE_MV is not set +# CONFIG_NSH_DISABLE_MW is not set +# CONFIG_NSH_DISABLE_PS is not set +# CONFIG_NSH_DISABLE_PUT is not set +# CONFIG_NSH_DISABLE_PWD is not set +# CONFIG_NSH_DISABLE_RM is not set +# CONFIG_NSH_DISABLE_RMDIR is not set +# CONFIG_NSH_DISABLE_SET is not set +# CONFIG_NSH_DISABLE_SH is not set +# CONFIG_NSH_DISABLE_SLEEP is not set +CONFIG_NSH_DISABLE_TIME=y +# CONFIG_NSH_DISABLE_TEST is not set +# CONFIG_NSH_DISABLE_UMOUNT is not set +CONFIG_NSH_DISABLE_UNAME=y +# CONFIG_NSH_DISABLE_UNSET is not set +# CONFIG_NSH_DISABLE_USLEEP is not set +# CONFIG_NSH_DISABLE_WGET is not set +# CONFIG_NSH_DISABLE_XD is not set + +# +# Configure Command Options +# +CONFIG_NSH_CODECS_BUFSIZE=128 +# CONFIG_NSH_CMDOPT_HEXDUMP is not set +CONFIG_NSH_FILEIOSIZE=1024 + +# +# Scripting Support +# +# CONFIG_NSH_DISABLESCRIPT is not set +CONFIG_NSH_DISABLE_ITEF=y +CONFIG_NSH_DISABLE_LOOPS=y + +# +# Console Configuration +# +CONFIG_NSH_CONSOLE=y +# CONFIG_NSH_ALTCONDEV is not set +CONFIG_NSH_ARCHINIT=y +# CONFIG_NSH_LOGIN is not set +# CONFIG_NSH_CONSOLE_LOGIN is not set + +# +# NxWidgets/NxWM +# + +# +# Platform-specific Support +# +# CONFIG_PLATFORM_CONFIGDATA is not set + +# +# System Libraries and NSH Add-Ons +# +# CONFIG_SYSTEM_FREE is not set +# CONFIG_SYSTEM_CLE is not set +# CONFIG_SYSTEM_CUTERM is not set +# CONFIG_SYSTEM_INSTALL is not set +# CONFIG_SYSTEM_HEX2BIN is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_RAMTEST is not set +CONFIG_READLINE_HAVE_EXTMATCH=y +CONFIG_SYSTEM_READLINE=y +CONFIG_READLINE_ECHO=y +# CONFIG_READLINE_TABCOMPLETION is not set +# CONFIG_READLINE_CMD_HISTORY is not set +# CONFIG_SYSTEM_SUDOKU is not set +# CONFIG_SYSTEM_VI is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set +# CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm32f103-minimum/nsh/setenv.sh b/configs/stm32f103-minimum/nsh/setenv.sh new file mode 100644 index 00000000000..73dfab5a4d0 --- /dev/null +++ b/configs/stm32f103-minimum/nsh/setenv.sh @@ -0,0 +1,100 @@ +#!/bin/bash +# configs//stm32f103-minimum/nsh/setenv.sh +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# 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. +# + +# 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 [ "$_" = "$0" ] ; then + echo "You must source this script, not run it!" 1>&2 + exit 1 +fi + +WD=`pwd` +if [ ! -x "setenv.sh" ]; then + echo "This script must be executed from the top-level NuttX build directory" + exit 1 +fi + +if [ -z "${PATH_ORIG}" ]; then + export PATH_ORIG="${PATH}" +fi + +# This is the Cygwin path to the location where I installed the CodeSourcery +# toolchain under windows. You will also have to edit this if you install +# the CodeSourcery toolchain in any other location +#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin" +#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin" +# export TOOLCHAIN_BIN="/cygdrive/c/Users/MyName/MentorGraphics/Sourcery_CodeBench_Lite_for_ARM_EABI/bin" + +# This is the location where I installed the ARM "GNU Tools for ARM Embedded Processors" +# You can this free toolchain here https://launchpad.net/gcc-arm-embedded +export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/GNU Tools ARM Embedded/4.9 2015q2/bin" + +# This is the path to the location where I installed the devkitARM toolchain +# You can get this free toolchain from http://devkitpro.org/ or http://sourceforge.net/projects/devkitpro/ +#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/devkitARM/bin" + +# This is the Cygwin path to the location where I build the buildroot +# toolchain. +# export TOOLCHAIN_BIN="${WD}/../buildroot/build_arm_nofpu/staging_dir/bin" + +# Add the path to the toolchain to the PATH varialble +export PATH="${TOOLCHAIN_BIN}:/sbin:/usr/sbin:${PATH_ORIG}" + +echo "PATH : ${PATH}" diff --git a/configs/stm32f103-minimum/scripts/ld.script b/configs/stm32f103-minimum/scripts/ld.script new file mode 100644 index 00000000000..e674b60d21c --- /dev/null +++ b/configs/stm32f103-minimum/scripts/ld.script @@ -0,0 +1,119 @@ +/**************************************************************************** + * configs/stm32f103-minimum/scripts/ld.script + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * Laurent Latil + * + * 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. + * + ****************************************************************************/ + +/* The STM32F103C8T6 has 64Kb of FLASH beginning at address 0x0800:0000 and + * 20Kb of SRAM beginning at address 0x2000:0000. When booting from FLASH, + * FLASH memory is aliased to address 0x0000:0000 where the code expects to + * begin execution by jumping to the entry point in the 0x0800:0000 address + * range. + */ + +MEMORY +{ + flash (rx) : ORIGIN = 0x08000000, LENGTH = 64K + sram (rwx) : ORIGIN = 0x20000000, LENGTH = 20K +} + +OUTPUT_ARCH(arm) +ENTRY(_stext) +SECTIONS +{ + .text : { + _stext = ABSOLUTE(.); + *(.vectors) + *(.text .text.*) + *(.fixup) + *(.gnu.warning) + *(.rodata .rodata.*) + *(.gnu.linkonce.t.*) + *(.glue_7) + *(.glue_7t) + *(.got) + *(.gcc_except_table) + *(.gnu.linkonce.r.*) + _etext = ABSOLUTE(.); + } > flash + + .init_section : { + _sinit = ABSOLUTE(.); + *(.init_array .init_array.*) + _einit = ABSOLUTE(.); + } > flash + + .ARM.extab : { + *(.ARM.extab*) + } > flash + + __exidx_start = ABSOLUTE(.); + .ARM.exidx : { + *(.ARM.exidx*) + } > flash + __exidx_end = ABSOLUTE(.); + + _eronly = ABSOLUTE(.); + + /* The STM32F103C8T6 has 20Kb of SRAM beginning at the following address */ + + .data : { + _sdata = ABSOLUTE(.); + *(.data .data.*) + *(.gnu.linkonce.d.*) + CONSTRUCTORS + _edata = ABSOLUTE(.); + } > sram AT > flash + + .bss : { + _sbss = ABSOLUTE(.); + *(.bss .bss.*) + *(.gnu.linkonce.b.*) + *(COMMON) + _ebss = ABSOLUTE(.); + } > sram + + /* Stabs debugging sections. */ + .stab 0 : { *(.stab) } + .stabstr 0 : { *(.stabstr) } + .stab.excl 0 : { *(.stab.excl) } + .stab.exclstr 0 : { *(.stab.exclstr) } + .stab.index 0 : { *(.stab.index) } + .stab.indexstr 0 : { *(.stab.indexstr) } + .comment 0 : { *(.comment) } + .debug_abbrev 0 : { *(.debug_abbrev) } + .debug_info 0 : { *(.debug_info) } + .debug_line 0 : { *(.debug_line) } + .debug_pubnames 0 : { *(.debug_pubnames) } + .debug_aranges 0 : { *(.debug_aranges) } +} diff --git a/configs/stm32f103-minimum/src/.gitignore b/configs/stm32f103-minimum/src/.gitignore new file mode 100644 index 00000000000..726d936e1e3 --- /dev/null +++ b/configs/stm32f103-minimum/src/.gitignore @@ -0,0 +1,2 @@ +/.depend +/Make.dep diff --git a/configs/stm32f103-minimum/src/Makefile b/configs/stm32f103-minimum/src/Makefile new file mode 100644 index 00000000000..b29ce809083 --- /dev/null +++ b/configs/stm32f103-minimum/src/Makefile @@ -0,0 +1,46 @@ +############################################################################ +# configs/stm32f103-minimum/src/Makefile +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# Laurent Latil +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +-include $(TOPDIR)/Make.defs + +ASRCS = +CSRCS = stm32_boot.c stm32_autoleds.c stm32_spi.c stm32_usbdev.c + +ifeq ($(CONFIG_LIB_BOARDCTL),y) +CSRCS += stm32_appinit.c +endif + +include $(TOPDIR)/configs/Board.mk diff --git a/configs/stm32f103-minimum/src/stm32_appinit.c b/configs/stm32f103-minimum/src/stm32_appinit.c new file mode 100644 index 00000000000..d9291f9a160 --- /dev/null +++ b/configs/stm32f103-minimum/src/stm32_appinit.c @@ -0,0 +1,84 @@ +/**************************************************************************** + * config/stm32f103-minimum/src/stm32_appinit.c + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * 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. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include +#include +#include + +#include + +#include "stm32.h" +#include "stm32f103_minimum.h" + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: board_app_initialize + * + * Description: + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface using the command BOARDIOC_INIT. + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. + * + ****************************************************************************/ + +int board_app_initialize(uintptr_t arg) +{ + return OK; +} diff --git a/configs/stm32f103-minimum/src/stm32_autoleds.c b/configs/stm32f103-minimum/src/stm32_autoleds.c new file mode 100644 index 00000000000..71d2bfdb05b --- /dev/null +++ b/configs/stm32f103-minimum/src/stm32_autoleds.c @@ -0,0 +1,140 @@ +/**************************************************************************** + * configs/stm32f103-minimum/src/stm32_autoleds.c + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Author: Laurent Latil + * + * 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. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include +#include + +#include +#include + +#include "chip.h" +#include "up_arch.h" +#include "up_internal.h" +#include "stm32.h" +#include "stm32f103_minimum.h" + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/* CONFIG_DEBUG_LEDS enables debug output from this file (needs CONFIG_DEBUG + * with CONFIG_DEBUG_VERBOSE too) + */ + +#ifdef CONFIG_DEBUG_LEDS +# define leddbg lldbg +# define ledvdbg llvdbg +#else +# define leddbg(x...) +# define ledvdbg(x...) +#endif + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +static inline void set_led(bool v) +{ + ledvdbg("Turn LED %s\n", v? "on":"off"); + stm32_gpiowrite(GPIO_LED, !v); +} + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: board_autoled_initialize + ****************************************************************************/ + +#ifdef CONFIG_ARCH_LEDS +void board_autoled_initialize(void) +{ + /* Configure LED GPIO for output */ + + stm32_configgpio(GPIO_LED); +} + +/**************************************************************************** + * Name: board_autoled_on + ****************************************************************************/ + +void board_autoled_on(int led) +{ + ledvdbg("board_autoled_on(%d)\n",led); + + switch (led) + { + case LED_STARTED: + case LED_HEAPALLOCATE: + /* As the board provides only one soft controllable LED, we simply + * turn it on when the board boots. + */ + + set_led(true); + break; + + case LED_PANIC: + /* For panic state, the LED is blinking */ + + set_led(true); + break; + } +} + +/**************************************************************************** + * Name: board_autoled_off + ****************************************************************************/ + +void board_autoled_off(int led) +{ + switch (led) + { + case LED_PANIC: + /* For panic state, the LED is blinking */ + + set_led(false); + break; + } +} + +#endif /* CONFIG_ARCH_LEDS */ diff --git a/configs/stm32f103-minimum/src/stm32_boot.c b/configs/stm32f103-minimum/src/stm32_boot.c new file mode 100644 index 00000000000..c7b9b4df997 --- /dev/null +++ b/configs/stm32f103-minimum/src/stm32_boot.c @@ -0,0 +1,89 @@ +/************************************************************************************ + * configs/stm32f103-minimum/src/stm32_boot.c + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * Laurent Latil + * + * 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. + * + ************************************************************************************/ + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include +#include +#include + +#include +#include + +#include "up_arch.h" +#include "stm32f103_minimum.h" + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +/************************************************************************************ + * Name: stm32_boardinitialize + * + * Description: + * All STM32 architectures must provide the following entry point. This entry point + * is called early in the initialization -- after all memory has been configured + * and mapped but before any devices have been initialized. + * + ************************************************************************************/ + +void stm32_boardinitialize(void) +{ + /* Configure on-board LEDs if LED support has been selected. */ + +#ifdef CONFIG_ARCH_LEDS + board_autoled_initialize(); +#endif + + /* Configure SPI chip selects if 1) SPI is not disabled, and 2) the weak function + * stm32_spidev_initialize() has been brought into the link. + */ + +#if defined(CONFIG_STM32_SPI1) || defined(CONFIG_STM32_SPI2) + stm32_spidev_initialize(); +#endif + + /* Initialize USB is 1) USBDEV is selected, 2) the USB controller is not + * disabled, and 3) the weak function stm32_usbinitialize() has been brought + * into the build. + */ + +#if defined(CONFIG_USBDEV) && defined(CONFIG_STM32_USB) + stm32_usbinitialize(); +#endif +} diff --git a/configs/cloudctrl/src/stm32_watchdog.c b/configs/stm32f103-minimum/src/stm32_spi.c similarity index 51% rename from configs/cloudctrl/src/stm32_watchdog.c rename to configs/stm32f103-minimum/src/stm32_spi.c index 0497c9aa026..791bf94cc15 100644 --- a/configs/cloudctrl/src/stm32_watchdog.c +++ b/configs/stm32f103-minimum/src/stm32_spi.c @@ -1,9 +1,9 @@ /************************************************************************************ - * configs/cloudctrl/src/stm32_watchdog.c + * configs/stm32f103-minimum/src/stm32_spi.c * - * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt - * Darcy Gong + * Laurent Latil * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -40,97 +40,109 @@ #include -#include +#include +#include #include -#include +#include #include -#include "stm32_wdg.h" +#include "up_arch.h" +#include "chip.h" +#include "stm32.h" +#include "stm32f103_minimum.h" -#ifdef CONFIG_WATCHDOG +#if defined(CONFIG_STM32_SPI1) || defined(CONFIG_STM32_SPI2) /************************************************************************************ * Pre-processor Definitions ************************************************************************************/ -/* Configuration *******************************************************************/ -/* Wathdog hardware should be enabled */ -#if !defined(CONFIG_STM32_WWDG) && !defined(CONFIG_STM32_IWDG) -# warning "One of CONFIG_STM32_WWDG or CONFIG_STM32_IWDG must be defined" -#endif - -/* Select the path to the registered watchdog timer device */ - -#ifndef CONFIG_STM32_WDG_DEVPATH -# ifdef CONFIG_EXAMPLES_WATCHDOG_DEVPATH -# define CONFIG_STM32_WDG_DEVPATH CONFIG_EXAMPLES_WATCHDOG_DEVPATH -# else -# define CONFIG_STM32_WDG_DEVPATH "/dev/watchdog0" -# endif -#endif - -/* Use the un-calibrated LSI frequency if we have nothing better */ - -#if defined(CONFIG_STM32_IWDG) && !defined(CONFIG_STM32_LSIFREQ) -# define CONFIG_STM32_LSIFREQ STM32_LSI_FREQUENCY -#endif - -/* Debug ***************************************************************************/ -/* Non-standard debug that may be enabled just for testing the watchdog timer */ +/* Enables debug output from this file (needs CONFIG_DEBUG too) */ #ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_WATCHDOG +# undef CONFIG_DEBUG_VERBOSE +# undef CONFIG_DEBUG_SPI #endif -#ifdef CONFIG_DEBUG_WATCHDOG -# define wdgdbg dbg -# define wdglldbg lldbg +#ifdef CONFIG_DEBUG_SPI +# define spidbg lldbg # ifdef CONFIG_DEBUG_VERBOSE -# define wdgvdbg vdbg -# define wdgllvdbg llvdbg +# define spivdbg lldbg # else -# define wdgvdbg(x...) -# define wdgllvdbg(x...) +# define spivdbg(x...) # endif #else -# define wdgdbg(x...) -# define wdglldbg(x...) -# define wdgvdbg(x...) -# define wdgllvdbg(x...) +# define spidbg(x...) +# define spivdbg(x...) #endif -/************************************************************************************ - * Private Functions - ************************************************************************************/ - /************************************************************************************ * Public Functions ************************************************************************************/ -/**************************************************************************** - * Name: up_wdginitialize() +/************************************************************************************ + * Name: stm32_spidev_initialize * * Description: - * Perform architecuture-specific initialization of the Watchdog hardware. - * This interface must be provided by all configurations using - * apps/examples/watchdog + * Called to configure SPI chip select GPIO pins for the HY-MiniSTM32 board. + * + ************************************************************************************/ + +void stm32_spidev_initialize(void) +{ + /* NOTE: Clocking for SPI1 and/or SPI2 was already provided in stm32_rcc.c. + * Configurations of SPI pins is performed in stm32_spi.c. + * Here, we only initialize chip select pins unique to the board + * architecture. + */ +} + +/**************************************************************************** + * Name: stm32_spi1/2select and stm32_spi1/2status + * + * Description: + * The external functions, stm32_spi1/2/3select and stm32_spi1/2/3status must be + * provided by board-specific logic. They are implementations of the select + * and status methods of the SPI interface defined by struct spi_ops_s (see + * include/nuttx/spi/spi.h). All other methods (including stm32_spibus_initialize()) + * are provided by common STM32 logic. To use this common SPI logic on your + * board: + * + * 1. Provide logic in stm32_boardinitialize() to configure SPI chip select + * pins. + * 2. Provide stm32_spi1/2/3select() and stm32_spi1/2/3status() functions in your + * board-specific logic. These functions will perform chip selection and + * status operations using GPIOs in the way your board is configured. + * 3. Add a calls to stm32_spibus_initialize() in your low level application + * initialization logic + * 4. The handle returned by stm32_spibus_initialize() may then be used to bind the + * SPI driver to higher level logic (e.g., calling + * mmcsd_spislotinitialize(), for example, will bind the SPI driver to + * the SPI MMC/SD driver). * ****************************************************************************/ -int up_wdginitialize(void) +#ifdef CONFIG_STM32_SPI1 +void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) { - /* Initialize tha register the watchdog timer device */ - -#if defined(CONFIG_STM32_WWDG) - stm32_wwdginitialize(CONFIG_STM32_WDG_DEVPATH); - return OK; -#elif defined(CONFIG_STM32_IWDG) - stm32_iwdginitialize(CONFIG_STM32_WDG_DEVPATH, CONFIG_STM32_LSIFREQ); - return OK; -#else - return -ENODEV; -#endif } -#endif /* CONFIG_WATCHDOG */ +uint8_t stm32_spi1status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +{ + return 0; +} +#endif + +#ifdef CONFIG_STM32_SPI2 +void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) +{ +} + +uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) +{ + return 0; +} +#endif + +#endif /* CONFIG_STM32_SPI1 || CONFIG_STM32_SPI2 */ diff --git a/configs/shenzhou/src/stm32_watchdog.c b/configs/stm32f103-minimum/src/stm32_usbdev.c similarity index 54% rename from configs/shenzhou/src/stm32_watchdog.c rename to configs/stm32f103-minimum/src/stm32_usbdev.c index ba14425cf4a..cc1d00df73b 100644 --- a/configs/shenzhou/src/stm32_watchdog.c +++ b/configs/stm32f103-minimum/src/stm32_usbdev.c @@ -1,8 +1,9 @@ /************************************************************************************ - * configs/shenzhou/src/stm32_watchdog.c + * configs/stm32f103-minimum/src/stm32_usbdev.c * - * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt + * Laurent Latil * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -39,97 +40,68 @@ #include -#include +#include +#include +#include #include -#include -#include +#include +#include -#include "stm32_wdg.h" - -#ifdef CONFIG_WATCHDOG - -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ -/* Configuration *******************************************************************/ -/* Wathdog hardware should be enabled */ - -#if !defined(CONFIG_STM32_WWDG) && !defined(CONFIG_STM32_IWDG) -# warning "One of CONFIG_STM32_WWDG or CONFIG_STM32_IWDG must be defined" -#endif - -/* Select the path to the registered watchdog timer device */ - -#ifndef CONFIG_STM32_WDG_DEVPATH -# ifdef CONFIG_EXAMPLES_WATCHDOG_DEVPATH -# define CONFIG_STM32_WDG_DEVPATH CONFIG_EXAMPLES_WATCHDOG_DEVPATH -# else -# define CONFIG_STM32_WDG_DEVPATH "/dev/watchdog0" -# endif -#endif - -/* Use the un-calibrated LSI frequency if we have nothing better */ - -#if defined(CONFIG_STM32_IWDG) && !defined(CONFIG_STM32_LSIFREQ) -# define CONFIG_STM32_LSIFREQ STM32_LSI_FREQUENCY -#endif - -/* Debug ***************************************************************************/ -/* Non-standard debug that may be enabled just for testing the watchdog timer */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_WATCHDOG -#endif - -#ifdef CONFIG_DEBUG_WATCHDOG -# define wdgdbg dbg -# define wdglldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define wdgvdbg vdbg -# define wdgllvdbg llvdbg -# else -# define wdgvdbg(x...) -# define wdgllvdbg(x...) -# endif -#else -# define wdgdbg(x...) -# define wdglldbg(x...) -# define wdgvdbg(x...) -# define wdgllvdbg(x...) -#endif - -/************************************************************************************ - * Private Functions - ************************************************************************************/ +#include "up_arch.h" +#include "stm32.h" +#include "stm32f103_minimum.h" /************************************************************************************ * Public Functions ************************************************************************************/ -/**************************************************************************** - * Name: up_wdginitialize() +/************************************************************************************ + * Name: stm32_usbinitialize * * Description: - * Perform architecuture-specific initialization of the Watchdog hardware. - * This interface must be provided by all configurations using - * apps/examples/watchdog + * Called to setup USB-related GPIO pins for the Hy-Mini STM32v board. * - ****************************************************************************/ + ************************************************************************************/ -int up_wdginitialize(void) +void stm32_usbinitialize(void) { - /* Initialize tha register the watchdog timer device */ + /* USB Soft Connect Pullup */ -#if defined(CONFIG_STM32_WWDG) - stm32_wwdginitialize(CONFIG_STM32_WDG_DEVPATH); - return OK; -#elif defined(CONFIG_STM32_IWDG) - stm32_iwdginitialize(CONFIG_STM32_WDG_DEVPATH, CONFIG_STM32_LSIFREQ); - return OK; -#else - return -ENODEV; -#endif + stm32_configgpio(GPIO_USB_PULLUP); } -#endif /* CONFIG_WATCHDOG */ +/************************************************************************************ + * Name: stm32_usbpullup + * + * Description: + * If USB is supported and the board supports a pullup via GPIO (for USB software + * connect and disconnect), then the board software must provide stm32_pullup. + * See include/nuttx/usb/usbdev.h for additional description of this method. + * Alternatively, if no pull-up GPIO the following EXTERN can be redefined to be + * NULL. + * + ************************************************************************************/ + +int stm32_usbpullup(FAR struct usbdev_s *dev, bool enable) +{ + usbtrace(TRACE_DEVPULLUP, (uint16_t)enable); + stm32_gpiowrite(GPIO_USB_PULLUP, !enable); + return OK; +} + +/************************************************************************************ + * Name: stm32_usbsuspend + * + * Description: + * Board logic must provide the stm32_usbsuspend logic if the USBDEV driver is + * used. This function is called whenever the USB enters or leaves suspend mode. + * This is an opportunity for the board logic to shutdown clocks, power, etc. + * while the USB is suspended. + * + ************************************************************************************/ + +void stm32_usbsuspend(FAR struct usbdev_s *dev, bool resume) +{ + ulldbg("resume: %d\n", resume); +} diff --git a/configs/maple/src/stm32_watchdog.c b/configs/stm32f103-minimum/src/stm32f103_minimum.h similarity index 55% rename from configs/maple/src/stm32_watchdog.c rename to configs/stm32f103-minimum/src/stm32f103_minimum.h index 24d5579da4d..47691a195c6 100644 --- a/configs/maple/src/stm32_watchdog.c +++ b/configs/stm32f103-minimum/src/stm32f103_minimum.h @@ -1,8 +1,8 @@ /************************************************************************************ - * configs/maple/src/stm32_watchdog.c + * configs/stm32f103-minimum/src/stm32f103_minimum.h * * Copyright (C) 2013 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Author: Laurent Latil * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -33,105 +33,70 @@ * ************************************************************************************/ +#ifndef __CONFIGS_STM32F103_MINIMUM_SRC_STM32F103_MINIMUM_H +#define __CONFIGS_STM32F103_MINIMUM_SRC_STM32F103_MINIMUM_H + /************************************************************************************ * Included Files ************************************************************************************/ #include - -#include -#include - -#include -#include - -#include "stm32_wdg.h" - -#ifdef CONFIG_WATCHDOG +#include +#include /************************************************************************************ * Pre-processor Definitions ************************************************************************************/ -/* Configuration *******************************************************************/ -/* Wathdog hardware should be enabled */ -#if !defined(CONFIG_STM32_WWDG) && !defined(CONFIG_STM32_IWDG) -# warning "One of CONFIG_STM32_WWDG or CONFIG_STM32_IWDG must be defined" +/* How many SPI modules does this chip support? The LM3S6918 supports 2 SPI + * modules (others may support more -- in such case, the following must be + * expanded). + */ + +#if STM32_NSPI < 1 +# undef CONFIG_STM32_SPI1 +# undef CONFIG_STM32_SPI2 +#elif STM32_NSPI < 2 +# undef CONFIG_STM32_SPI2 #endif -/* Select the path to the registered watchdog timer device */ +/* GPIOs **************************************************************/ +/* LEDs */ -#ifndef CONFIG_STM32_WDG_DEVPATH -# ifdef CONFIG_EXAMPLES_WATCHDOG_DEVPATH -# define CONFIG_STM32_WDG_DEVPATH CONFIG_EXAMPLES_WATCHDOG_DEVPATH -# else -# define CONFIG_STM32_WDG_DEVPATH "/dev/watchdog0" -# endif -#endif +#define GPIO_LED (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\ + GPIO_OUTPUT_CLEAR|GPIO_PORTC|GPIO_PIN13) -/* Use the un-calibrated LSI frequency if we have nothing better */ +/* USB Soft Connect Pullup: PC.13 */ -#if defined(CONFIG_STM32_IWDG) && !defined(CONFIG_STM32_LSIFREQ) -# define CONFIG_STM32_LSIFREQ STM32_LSI_FREQUENCY -#endif - -/* Debug ***************************************************************************/ -/* Non-standard debug that may be enabled just for testing the watchdog timer */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_WATCHDOG -#endif - -#ifdef CONFIG_DEBUG_WATCHDOG -# define wdgdbg dbg -# define wdglldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define wdgvdbg vdbg -# define wdgllvdbg llvdbg -# else -# define wdgvdbg(x...) -# define wdgllvdbg(x...) -# endif -#else -# define wdgdbg(x...) -# define wdglldbg(x...) -# define wdgvdbg(x...) -# define wdgllvdbg(x...) -#endif - -/************************************************************************************ - * Private Functions - ************************************************************************************/ +#define GPIO_USB_PULLUP (GPIO_OUTPUT|GPIO_CNF_OUTPP|GPIO_MODE_50MHz|\ + GPIO_OUTPUT_SET|GPIO_PORTC|GPIO_PIN13) /************************************************************************************ * Public Functions ************************************************************************************/ -/**************************************************************************** - * Name: up_wdginitialize() +#ifndef __ASSEMBLY__ + +/************************************************************************************ + * Name: stm32_spidev_initialize * * Description: - * Perform architecuture-specific initialization of the Watchdog hardware. - * This interface must be provided by all configurations using - * apps/examples/watchdog + * Called to configure SPI chip select GPIO pins for the Hy-Mini STM32v board. * - ****************************************************************************/ + ************************************************************************************/ -int up_wdginitialize(void) -{ - /* Initialize tha register the watchdog timer device */ +void stm32_spidev_initialize(void); -#if defined(CONFIG_STM32_WWDG) - stm32_wwdginitialize(CONFIG_STM32_WDG_DEVPATH); - return OK; +/************************************************************************************ + * Name: stm32_usbinitialize + * + * Description: + * Called to setup USB-related GPIO pins for the Hy-Mini STM32v board. + * + ************************************************************************************/ -#elif defined(CONFIG_STM32_IWDG) - stm32_iwdginitialize(CONFIG_STM32_WDG_DEVPATH, CONFIG_STM32_LSIFREQ); - return OK; +void stm32_usbinitialize(void); -#else - return -ENODEV; -#endif -} +#endif /* __ASSEMBLY__ */ +#endif /* __CONFIGS_STM32F103_MINIMUM_SRC_STM32F103_MINIMUM_H */ -#endif /* CONFIG_WATCHDOG */ diff --git a/configs/stm32f103-minimum/usbnsh/Make.defs b/configs/stm32f103-minimum/usbnsh/Make.defs new file mode 100644 index 00000000000..9f134fbf132 --- /dev/null +++ b/configs/stm32f103-minimum/usbnsh/Make.defs @@ -0,0 +1,113 @@ +############################################################################ +# configs/stm32f103-minimum/usbnsh/Make.defs +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +include ${TOPDIR}/.config +include ${TOPDIR}/tools/Config.mk +include ${TOPDIR}/arch/arm/src/armv7-m/Toolchain.defs + +LDSCRIPT = ld.script + +ifeq ($(WINTOOL),y) + # Windows-native toolchains + DIRLINK = $(TOPDIR)/tools/copydir.sh + DIRUNLINK = $(TOPDIR)/tools/unlink.sh + MKDEP = $(TOPDIR)/tools/mkwindeps.sh + ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" + ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)}" +else + # Linux/Cygwin-native toolchain + MKDEP = $(TOPDIR)/tools/mkdeps$(HOSTEXEEXT) + ARCHINCLUDES = -I. -isystem $(TOPDIR)/include + ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT) +endif + +CC = $(CROSSDEV)gcc +CXX = $(CROSSDEV)g++ +CPP = $(CROSSDEV)gcc -E +LD = $(CROSSDEV)ld +AR = $(CROSSDEV)ar rcs +NM = $(CROSSDEV)nm +OBJCOPY = $(CROSSDEV)objcopy +OBJDUMP = $(CROSSDEV)objdump + +ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q'} +ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1} + +ifeq ($(CONFIG_DEBUG_SYMBOLS),y) + ARCHOPTIMIZATION = -g +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer +endif + +ARCHCFLAGS = -fno-builtin +ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef +ARCHWARNINGSXX = -Wall -Wshadow -Wundef +ARCHDEFINES = +ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 + +CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe +CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS) +CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe +CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS) +CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) +AFLAGS = $(CFLAGS) -D__ASSEMBLY__ + +NXFLATLDFLAGS1 = -r -d -warn-common +NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-pcrel.ld -no-check-sections +LDNXFLATFLAGS = -e main -s 2048 + +ASMEXT = .S +OBJEXT = .o +LIBEXT = .a +EXEEXT = + +ifneq ($(CROSSDEV),arm-nuttx-elf-) + LDFLAGS += -nostartfiles -nodefaultlibs +endif +ifeq ($(CONFIG_DEBUG_SYMBOLS),y) + LDFLAGS += -g +endif + + +HOSTCC = gcc +HOSTINCLUDES = -I. +HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -g -pipe +HOSTLDFLAGS = + diff --git a/configs/stm32f103-minimum/usbnsh/defconfig b/configs/stm32f103-minimum/usbnsh/defconfig new file mode 100644 index 00000000000..84579e2f49f --- /dev/null +++ b/configs/stm32f103-minimum/usbnsh/defconfig @@ -0,0 +1,1139 @@ +# +# Automatically generated file; DO NOT EDIT. +# Nuttx/ Configuration +# + +# +# Build Setup +# +# CONFIG_EXPERIMENTAL is not set +CONFIG_DEFAULT_SMALL=y +CONFIG_HOST_LINUX=y +# CONFIG_HOST_OSX is not set +# CONFIG_HOST_WINDOWS is not set +# CONFIG_HOST_OTHER is not set + +# +# Build Configuration +# +# CONFIG_APPS_DIR="../apps" +CONFIG_BUILD_FLAT=y +# CONFIG_BUILD_2PASS is not set + +# +# Binary Output Formats +# +# CONFIG_RRLOAD_BINARY is not set +# CONFIG_INTELHEX_BINARY is not set +# CONFIG_MOTOROLA_SREC is not set +CONFIG_RAW_BINARY=y +# CONFIG_UBOOT_UIMAGE is not set + +# +# Customize Header Files +# +# CONFIG_ARCH_STDINT_H is not set +# CONFIG_ARCH_STDBOOL_H is not set +# CONFIG_ARCH_MATH_H is not set +# CONFIG_ARCH_FLOAT_H is not set +# CONFIG_ARCH_STDARG_H is not set +# CONFIG_ARCH_DEBUG_H is not set + +# +# Debug Options +# +# CONFIG_DEBUG is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_ARCH_HAVE_STACKCHECK=y +# CONFIG_STACK_COLORATION is not set +# CONFIG_DEBUG_SYMBOLS is not set +CONFIG_ARCH_HAVE_CUSTOMOPT=y +# CONFIG_DEBUG_NOOPT is not set +# CONFIG_DEBUG_CUSTOMOPT is not set +CONFIG_DEBUG_FULLOPT=y + +# +# System Type +# +CONFIG_ARCH_ARM=y +# CONFIG_ARCH_AVR is not set +# CONFIG_ARCH_HC is not set +# CONFIG_ARCH_MIPS is not set +# CONFIG_ARCH_RGMP is not set +# CONFIG_ARCH_SH is not set +# CONFIG_ARCH_SIM is not set +# CONFIG_ARCH_X86 is not set +# CONFIG_ARCH_Z16 is not set +# CONFIG_ARCH_Z80 is not set +CONFIG_ARCH="arm" + +# +# ARM Options +# +# CONFIG_ARCH_CHIP_A1X is not set +# CONFIG_ARCH_CHIP_C5471 is not set +# CONFIG_ARCH_CHIP_CALYPSO is not set +# CONFIG_ARCH_CHIP_DM320 is not set +# CONFIG_ARCH_CHIP_EFM32 is not set +# CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set +# CONFIG_ARCH_CHIP_KINETIS is not set +# CONFIG_ARCH_CHIP_KL is not set +# CONFIG_ARCH_CHIP_LM is not set +# CONFIG_ARCH_CHIP_TIVA is not set +# CONFIG_ARCH_CHIP_LPC11XX is not set +# CONFIG_ARCH_CHIP_LPC17XX is not set +# CONFIG_ARCH_CHIP_LPC214X is not set +# CONFIG_ARCH_CHIP_LPC2378 is not set +# CONFIG_ARCH_CHIP_LPC31XX is not set +# CONFIG_ARCH_CHIP_LPC43XX is not set +# CONFIG_ARCH_CHIP_NUC1XX is not set +# CONFIG_ARCH_CHIP_SAMA5 is not set +# CONFIG_ARCH_CHIP_SAMD is not set +# CONFIG_ARCH_CHIP_SAML is not set +# CONFIG_ARCH_CHIP_SAM34 is not set +# CONFIG_ARCH_CHIP_SAMV7 is not set +CONFIG_ARCH_CHIP_STM32=y +# CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set +# CONFIG_ARCH_CHIP_STR71X is not set +# CONFIG_ARCH_CHIP_TMS570 is not set +# CONFIG_ARCH_CHIP_MOXART is not set +# CONFIG_ARCH_ARM7TDMI is not set +# CONFIG_ARCH_ARM926EJS is not set +# CONFIG_ARCH_ARM920T is not set +# CONFIG_ARCH_CORTEXM0 is not set +CONFIG_ARCH_CORTEXM3=y +# CONFIG_ARCH_CORTEXM4 is not set +# CONFIG_ARCH_CORTEXM7 is not set +# CONFIG_ARCH_CORTEXA5 is not set +# CONFIG_ARCH_CORTEXA8 is not set +# CONFIG_ARCH_CORTEXA9 is not set +# CONFIG_ARCH_CORTEXR4 is not set +# CONFIG_ARCH_CORTEXR4F is not set +# CONFIG_ARCH_CORTEXR5 is not set +# CONFIG_ARCH_CORTEX5F is not set +# CONFIG_ARCH_CORTEXR7 is not set +# CONFIG_ARCH_CORTEXR7F is not set +CONFIG_ARCH_FAMILY="armv7-m" +CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +CONFIG_ARM_TOOLCHAIN_GNU=y +# CONFIG_ARMV7M_USEBASEPRI is not set +CONFIG_ARCH_HAVE_CMNVECTOR=y +# CONFIG_ARMV7M_CMNVECTOR is not set +# CONFIG_ARMV7M_LAZYFPU is not set +# CONFIG_ARCH_HAVE_FPU is not set +# CONFIG_ARCH_HAVE_DPFPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set +CONFIG_ARM_HAVE_MPU_UNIFIED=y +# CONFIG_ARM_MPU is not set + +# +# ARMV7M Configuration Options +# +# CONFIG_ARMV7M_HAVE_ICACHE is not set +# CONFIG_ARMV7M_HAVE_DCACHE is not set +# CONFIG_ARMV7M_HAVE_ITCM is not set +# CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set +# CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set +# CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set +# CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set +CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL=y +CONFIG_ARMV7M_HAVE_STACKCHECK=y +# CONFIG_ARMV7M_STACKCHECK is not set +# CONFIG_ARMV7M_ITMSYSLOG is not set +# CONFIG_SERIAL_TERMIOS is not set + +# +# STM32 Configuration Options +# +# CONFIG_ARCH_CHIP_STM32L151C6 is not set +# CONFIG_ARCH_CHIP_STM32L151C8 is not set +# CONFIG_ARCH_CHIP_STM32L151CB is not set +# CONFIG_ARCH_CHIP_STM32L151R6 is not set +# CONFIG_ARCH_CHIP_STM32L151R8 is not set +# CONFIG_ARCH_CHIP_STM32L151RB is not set +# CONFIG_ARCH_CHIP_STM32L151V6 is not set +# CONFIG_ARCH_CHIP_STM32L151V8 is not set +# CONFIG_ARCH_CHIP_STM32L151VB is not set +# CONFIG_ARCH_CHIP_STM32L152C6 is not set +# CONFIG_ARCH_CHIP_STM32L152C8 is not set +# CONFIG_ARCH_CHIP_STM32L152CB is not set +# CONFIG_ARCH_CHIP_STM32L152R6 is not set +# CONFIG_ARCH_CHIP_STM32L152R8 is not set +# CONFIG_ARCH_CHIP_STM32L152RB is not set +# CONFIG_ARCH_CHIP_STM32L152V6 is not set +# CONFIG_ARCH_CHIP_STM32L152V8 is not set +# CONFIG_ARCH_CHIP_STM32L152VB is not set +# CONFIG_ARCH_CHIP_STM32L162ZD is not set +# CONFIG_ARCH_CHIP_STM32L162VE is not set +# CONFIG_ARCH_CHIP_STM32F100C8 is not set +# CONFIG_ARCH_CHIP_STM32F100CB is not set +# CONFIG_ARCH_CHIP_STM32F100R8 is not set +# CONFIG_ARCH_CHIP_STM32F100RB is not set +# CONFIG_ARCH_CHIP_STM32F100RC is not set +# CONFIG_ARCH_CHIP_STM32F100RD is not set +# CONFIG_ARCH_CHIP_STM32F100RE is not set +# CONFIG_ARCH_CHIP_STM32F100V8 is not set +# CONFIG_ARCH_CHIP_STM32F100VB is not set +# CONFIG_ARCH_CHIP_STM32F100VC is not set +# CONFIG_ARCH_CHIP_STM32F100VD is not set +# CONFIG_ARCH_CHIP_STM32F100VE is not set +# CONFIG_ARCH_CHIP_STM32F102CB is not set +# CONFIG_ARCH_CHIP_STM32F103T8 is not set +# CONFIG_ARCH_CHIP_STM32F103TB is not set +# CONFIG_ARCH_CHIP_STM32F103C4 is not set +CONFIG_ARCH_CHIP_STM32F103C8=y +# CONFIG_ARCH_CHIP_STM32F103CB is not set +# CONFIG_ARCH_CHIP_STM32F103R8 is not set +# CONFIG_ARCH_CHIP_STM32F103RB is not set +# CONFIG_ARCH_CHIP_STM32F103RC is not set +# CONFIG_ARCH_CHIP_STM32F103RD is not set +# CONFIG_ARCH_CHIP_STM32F103RE is not set +# CONFIG_ARCH_CHIP_STM32F103RG is not set +# CONFIG_ARCH_CHIP_STM32F103V8 is not set +# CONFIG_ARCH_CHIP_STM32F103VB is not set +# CONFIG_ARCH_CHIP_STM32F103VC is not set +# CONFIG_ARCH_CHIP_STM32F103VE is not set +# CONFIG_ARCH_CHIP_STM32F103ZE is not set +# CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F107VC is not set +# CONFIG_ARCH_CHIP_STM32F205RG is not set +# CONFIG_ARCH_CHIP_STM32F207IG is not set +# CONFIG_ARCH_CHIP_STM32F207ZE is not set +# CONFIG_ARCH_CHIP_STM32F302K6 is not set +# CONFIG_ARCH_CHIP_STM32F302K8 is not set +# CONFIG_ARCH_CHIP_STM32F302CB is not set +# CONFIG_ARCH_CHIP_STM32F302CC is not set +# CONFIG_ARCH_CHIP_STM32F302RB is not set +# CONFIG_ARCH_CHIP_STM32F302RC is not set +# CONFIG_ARCH_CHIP_STM32F302VB is not set +# CONFIG_ARCH_CHIP_STM32F302VC is not set +# CONFIG_ARCH_CHIP_STM32F303K6 is not set +# CONFIG_ARCH_CHIP_STM32F303K8 is not set +# CONFIG_ARCH_CHIP_STM32F303C6 is not set +# CONFIG_ARCH_CHIP_STM32F303C8 is not set +# CONFIG_ARCH_CHIP_STM32F303CB is not set +# CONFIG_ARCH_CHIP_STM32F303CC is not set +# CONFIG_ARCH_CHIP_STM32F303RB is not set +# CONFIG_ARCH_CHIP_STM32F303RC is not set +# CONFIG_ARCH_CHIP_STM32F303RD is not set +# CONFIG_ARCH_CHIP_STM32F303RE is not set +# CONFIG_ARCH_CHIP_STM32F303VB is not set +# CONFIG_ARCH_CHIP_STM32F303VC is not set +# CONFIG_ARCH_CHIP_STM32F372C8 is not set +# CONFIG_ARCH_CHIP_STM32F372R8 is not set +# CONFIG_ARCH_CHIP_STM32F372V8 is not set +# CONFIG_ARCH_CHIP_STM32F372CB is not set +# CONFIG_ARCH_CHIP_STM32F372RB is not set +# CONFIG_ARCH_CHIP_STM32F372VB is not set +# CONFIG_ARCH_CHIP_STM32F372CC is not set +# CONFIG_ARCH_CHIP_STM32F372RC is not set +# CONFIG_ARCH_CHIP_STM32F372VC is not set +# CONFIG_ARCH_CHIP_STM32F373C8 is not set +# CONFIG_ARCH_CHIP_STM32F373R8 is not set +# CONFIG_ARCH_CHIP_STM32F373V8 is not set +# CONFIG_ARCH_CHIP_STM32F373CB is not set +# CONFIG_ARCH_CHIP_STM32F373RB is not set +# CONFIG_ARCH_CHIP_STM32F373VB is not set +# CONFIG_ARCH_CHIP_STM32F373CC is not set +# CONFIG_ARCH_CHIP_STM32F373RC is not set +# CONFIG_ARCH_CHIP_STM32F373VC is not set +# CONFIG_ARCH_CHIP_STM32F401RE is not set +# CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set +# CONFIG_ARCH_CHIP_STM32F405RG is not set +# CONFIG_ARCH_CHIP_STM32F405VG is not set +# CONFIG_ARCH_CHIP_STM32F405ZG is not set +# CONFIG_ARCH_CHIP_STM32F407VE is not set +# CONFIG_ARCH_CHIP_STM32F407VG is not set +# CONFIG_ARCH_CHIP_STM32F407ZE is not set +# CONFIG_ARCH_CHIP_STM32F407ZG is not set +# CONFIG_ARCH_CHIP_STM32F407IE is not set +# CONFIG_ARCH_CHIP_STM32F407IG is not set +# CONFIG_ARCH_CHIP_STM32F427V is not set +# CONFIG_ARCH_CHIP_STM32F427Z is not set +# CONFIG_ARCH_CHIP_STM32F427I is not set +# CONFIG_ARCH_CHIP_STM32F429V is not set +# CONFIG_ARCH_CHIP_STM32F429Z is not set +# CONFIG_ARCH_CHIP_STM32F429I is not set +# CONFIG_ARCH_CHIP_STM32F429B is not set +# CONFIG_ARCH_CHIP_STM32F429N is not set +# CONFIG_ARCH_CHIP_STM32F446M is not set +# CONFIG_ARCH_CHIP_STM32F446R is not set +# CONFIG_ARCH_CHIP_STM32F446V is not set +# CONFIG_ARCH_CHIP_STM32F446Z is not set +# CONFIG_ARCH_CHIP_STM32F469A is not set +# CONFIG_ARCH_CHIP_STM32F469I is not set +# CONFIG_ARCH_CHIP_STM32F469B is not set +# CONFIG_ARCH_CHIP_STM32F469N is not set +CONFIG_STM32_FLASH_CONFIG_DEFAULT=y +# CONFIG_STM32_FLASH_CONFIG_4 is not set +# CONFIG_STM32_FLASH_CONFIG_6 is not set +# CONFIG_STM32_FLASH_CONFIG_8 is not set +# CONFIG_STM32_FLASH_CONFIG_B is not set +# CONFIG_STM32_FLASH_CONFIG_C is not set +# CONFIG_STM32_FLASH_CONFIG_D is not set +# CONFIG_STM32_FLASH_CONFIG_E is not set +# CONFIG_STM32_FLASH_CONFIG_F is not set +# CONFIG_STM32_FLASH_CONFIG_G is not set +# CONFIG_STM32_FLASH_CONFIG_I is not set +# CONFIG_STM32_STM32L15XX is not set +# CONFIG_STM32_ENERGYLITE is not set +CONFIG_STM32_STM32F10XX=y +# CONFIG_STM32_VALUELINE is not set +# CONFIG_STM32_CONNECTIVITYLINE is not set +CONFIG_STM32_PERFORMANCELINE=y +# CONFIG_STM32_USBACCESSLINE is not set +# CONFIG_STM32_HIGHDENSITY is not set +CONFIG_STM32_MEDIUMDENSITY=y +# CONFIG_STM32_LOWDENSITY is not set +# CONFIG_STM32_STM32F20XX is not set +# CONFIG_STM32_STM32F205 is not set +# CONFIG_STM32_STM32F207 is not set +# CONFIG_STM32_STM32F30XX is not set +# CONFIG_STM32_STM32F302 is not set +# CONFIG_STM32_STM32F303 is not set +# CONFIG_STM32_STM32F37XX is not set +# CONFIG_STM32_STM32F40XX is not set +# CONFIG_STM32_STM32F401 is not set +# CONFIG_STM32_STM32F411 is not set +# CONFIG_STM32_STM32F405 is not set +# CONFIG_STM32_STM32F407 is not set +# CONFIG_STM32_STM32F427 is not set +# CONFIG_STM32_STM32F429 is not set +# CONFIG_STM32_STM32F446 is not set +# CONFIG_STM32_STM32F469 is not set +# CONFIG_STM32_DFU is not set + +# +# STM32 Peripheral Support +# +# CONFIG_STM32_HAVE_CCM is not set +CONFIG_STM32_HAVE_USBDEV=y +# CONFIG_STM32_HAVE_OTGFS is not set +# CONFIG_STM32_HAVE_FSMC is not set +# CONFIG_STM32_HAVE_LTDC is not set +CONFIG_STM32_HAVE_USART3=y +CONFIG_STM32_HAVE_UART4=y +CONFIG_STM32_HAVE_UART5=y +# CONFIG_STM32_HAVE_USART6 is not set +# CONFIG_STM32_HAVE_UART7 is not set +# CONFIG_STM32_HAVE_UART8 is not set +CONFIG_STM32_HAVE_TIM1=y +# CONFIG_STM32_HAVE_TIM2 is not set +CONFIG_STM32_HAVE_TIM3=y +CONFIG_STM32_HAVE_TIM4=y +CONFIG_STM32_HAVE_TIM5=y +CONFIG_STM32_HAVE_TIM6=y +CONFIG_STM32_HAVE_TIM7=y +CONFIG_STM32_HAVE_TIM8=y +# CONFIG_STM32_HAVE_TIM9 is not set +# CONFIG_STM32_HAVE_TIM10 is not set +# CONFIG_STM32_HAVE_TIM11 is not set +# CONFIG_STM32_HAVE_TIM12 is not set +# CONFIG_STM32_HAVE_TIM13 is not set +# CONFIG_STM32_HAVE_TIM14 is not set +# CONFIG_STM32_HAVE_TIM15 is not set +# CONFIG_STM32_HAVE_TIM16 is not set +# CONFIG_STM32_HAVE_TIM17 is not set +CONFIG_STM32_HAVE_ADC2=y +CONFIG_STM32_HAVE_ADC3=y +# CONFIG_STM32_HAVE_ADC4 is not set +# CONFIG_STM32_HAVE_ADC1_DMA is not set +# CONFIG_STM32_HAVE_ADC2_DMA is not set +# CONFIG_STM32_HAVE_ADC3_DMA is not set +# CONFIG_STM32_HAVE_ADC4_DMA is not set +CONFIG_STM32_HAVE_CAN1=y +# CONFIG_STM32_HAVE_CAN2 is not set +# CONFIG_STM32_HAVE_DAC1 is not set +# CONFIG_STM32_HAVE_DAC2 is not set +# CONFIG_STM32_HAVE_RNG is not set +# CONFIG_STM32_HAVE_ETHMAC is not set +CONFIG_STM32_HAVE_I2C2=y +# CONFIG_STM32_HAVE_I2C3 is not set +CONFIG_STM32_HAVE_SPI2=y +CONFIG_STM32_HAVE_SPI3=y +# CONFIG_STM32_HAVE_SPI4 is not set +# CONFIG_STM32_HAVE_SPI5 is not set +# CONFIG_STM32_HAVE_SPI6 is not set +# CONFIG_STM32_HAVE_SAIPLL is not set +# CONFIG_STM32_HAVE_I2SPLL is not set +# CONFIG_STM32_ADC1 is not set +# CONFIG_STM32_ADC2 is not set +# CONFIG_STM32_ADC3 is not set +# CONFIG_STM32_BKP is not set +# CONFIG_STM32_CAN1 is not set +# CONFIG_STM32_CRC is not set +# CONFIG_STM32_DMA1 is not set +# CONFIG_STM32_DMA2 is not set +# CONFIG_STM32_I2C1 is not set +# CONFIG_STM32_I2C2 is not set +# CONFIG_STM32_PWR is not set +# CONFIG_STM32_SDIO is not set +# CONFIG_STM32_SPI1 is not set +# CONFIG_STM32_SPI2 is not set +# CONFIG_STM32_SPI3 is not set +# CONFIG_STM32_TIM1 is not set +# CONFIG_STM32_TIM2 is not set +# CONFIG_STM32_TIM3 is not set +# CONFIG_STM32_TIM4 is not set +# CONFIG_STM32_TIM5 is not set +# CONFIG_STM32_TIM6 is not set +# CONFIG_STM32_TIM7 is not set +# CONFIG_STM32_TIM8 is not set +CONFIG_STM32_USART1=y +# CONFIG_STM32_USART2 is not set +# CONFIG_STM32_USART3 is not set +# CONFIG_STM32_UART4 is not set +# CONFIG_STM32_UART5 is not set +CONFIG_STM32_USB=y +# CONFIG_STM32_IWDG is not set +# CONFIG_STM32_WWDG is not set +# CONFIG_STM32_NOEXT_VECTORS is not set + +# +# Alternate Pin Mapping +# +# CONFIG_STM32_USART1_REMAP is not set +# CONFIG_STM32_JTAG_DISABLE is not set +CONFIG_STM32_JTAG_FULL_ENABLE=y +# CONFIG_STM32_JTAG_NOJNTRST_ENABLE is not set +# CONFIG_STM32_JTAG_SW_ENABLE is not set +# CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG is not set +# CONFIG_STM32_FORCEPOWER is not set +# CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set +# CONFIG_STM32_TIM1_CAP is not set +# CONFIG_STM32_TIM3_CAP is not set +# CONFIG_STM32_TIM4_CAP is not set +# CONFIG_STM32_TIM5_CAP is not set +# CONFIG_STM32_TIM8_CAP is not set +CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y + +# +# U[S]ART Configuration +# +CONFIG_STM32_USART1_SERIALDRIVER=y +# CONFIG_STM32_USART1_1WIREDRIVER is not set +# CONFIG_USART1_RS485 is not set +# CONFIG_SERIAL_DISABLE_REORDERING is not set +# CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set +# CONFIG_STM32_USART_SINGLEWIRE is not set +CONFIG_STM32_HAVE_RTC_COUNTER=y +# CONFIG_STM32_HAVE_RTC_SUBSECONDS is not set + +# +# USB FS Host Configuration +# + +# +# USB HS Host Configuration +# + +# +# USB Host Debug Configuration +# + +# +# USB Device Configuration +# + +# +# Architecture Options +# +# CONFIG_ARCH_NOINTC is not set +# CONFIG_ARCH_VECNOTIRQ is not set +# CONFIG_ARCH_DMA is not set +CONFIG_ARCH_HAVE_IRQPRIO=y +# CONFIG_ARCH_L2CACHE is not set +# CONFIG_ARCH_HAVE_COHERENT_DCACHE is not set +# CONFIG_ARCH_HAVE_ADDRENV is not set +# CONFIG_ARCH_NEED_ADDRENV_MAPPING is not set +# CONFIG_ARCH_HAVE_MULTICPU is not set +CONFIG_ARCH_HAVE_VFORK=y +# CONFIG_ARCH_HAVE_MMU is not set +CONFIG_ARCH_HAVE_MPU=y +# CONFIG_ARCH_NAND_HWECC is not set +# CONFIG_ARCH_HAVE_EXTCLK is not set +# CONFIG_ARCH_HAVE_POWEROFF is not set +CONFIG_ARCH_HAVE_RESET=y +# CONFIG_ARCH_USE_MPU is not set +# CONFIG_ARCH_IRQPRIO is not set +CONFIG_ARCH_STACKDUMP=y +# CONFIG_ARCH_USBDUMP is not set +# CONFIG_ENDIAN_BIG is not set +# CONFIG_ARCH_IDLE_CUSTOM is not set +# CONFIG_ARCH_HAVE_RAMFUNCS is not set +CONFIG_ARCH_HAVE_RAMVECTORS=y +# CONFIG_ARCH_RAMVECTORS is not set + +# +# Board Settings +# +CONFIG_BOARD_LOOPSPERMSEC=5483 +# CONFIG_ARCH_CALIBRATION is not set + +# +# Interrupt options +# +CONFIG_ARCH_HAVE_INTERRUPTSTACK=y +CONFIG_ARCH_INTERRUPTSTACK=0 +CONFIG_ARCH_HAVE_HIPRI_INTERRUPT=y +# CONFIG_ARCH_HIPRI_INTERRUPT is not set + +# +# Boot options +# +# CONFIG_BOOT_RUNFROMEXTSRAM is not set +CONFIG_BOOT_RUNFROMFLASH=y +# CONFIG_BOOT_RUNFROMISRAM is not set +# CONFIG_BOOT_RUNFROMSDRAM is not set +# CONFIG_BOOT_COPYTORAM is not set + +# +# Boot Memory Configuration +# +CONFIG_RAM_START=0x20000000 +CONFIG_RAM_SIZE=20480 +# CONFIG_ARCH_HAVE_SDRAM is not set + +# +# Board Selection +# +# CONFIG_ARCH_BOARD_STM32_TINY is not set +CONFIG_ARCH_BOARD_STM32F103_MINIMUM=y +# CONFIG_ARCH_BOARD_CUSTOM is not set +CONFIG_ARCH_BOARD="stm32f103-minimum" + +# +# Common Board Options +# +CONFIG_ARCH_HAVE_LEDS=y +CONFIG_ARCH_LEDS=y +CONFIG_NSH_MMCSDMINOR=0 + +# +# Board-Specific Options +# +CONFIG_LIB_BOARDCTL=y +# CONFIG_BOARDCTL_RESET is not set +# CONFIG_BOARDCTL_UNIQUEID is not set +CONFIG_BOARDCTL_USBDEVCTRL=y +# CONFIG_BOARDCTL_TSCTEST is not set +# CONFIG_BOARDCTL_ADCTEST is not set +# CONFIG_BOARDCTL_PWMTEST is not set +# CONFIG_BOARDCTL_GRAPHICS is not set +# CONFIG_BOARDCTL_IOCTL is not set + +# +# RTOS Features +# +# CONFIG_DISABLE_OS_API is not set + +# +# Clocks and Timers +# +CONFIG_USEC_PER_TICK=10000 +# CONFIG_SYSTEM_TIME64 is not set +# CONFIG_CLOCK_MONOTONIC is not set +# CONFIG_JULIAN_TIME is not set +CONFIG_START_YEAR=2011 +CONFIG_START_MONTH=7 +CONFIG_START_DAY=5 +CONFIG_MAX_WDOGPARMS=2 +CONFIG_PREALLOC_WDOGS=6 +CONFIG_WDOG_INTRESERVE=0 +CONFIG_PREALLOC_TIMERS=4 + +# +# Tasks and Scheduling +# +# CONFIG_INIT_NONE is not set +CONFIG_INIT_ENTRYPOINT=y +# CONFIG_INIT_FILEPATH is not set +CONFIG_USER_ENTRYPOINT="nsh_main" +CONFIG_RR_INTERVAL=200 +# CONFIG_SCHED_SPORADIC is not set +CONFIG_TASK_NAME_SIZE=0 +CONFIG_MAX_TASKS=16 +# CONFIG_SCHED_HAVE_PARENT is not set +CONFIG_SCHED_WAITPID=y + +# +# Pthread Options +# +# CONFIG_MUTEX_TYPES is not set +CONFIG_NPTHREAD_KEYS=4 + +# +# Performance Monitoring +# +# CONFIG_SCHED_CPULOAD is not set +# CONFIG_SCHED_INSTRUMENTATION is not set + +# +# Files and I/O +# +# CONFIG_DEV_CONSOLE is not set +# CONFIG_FDCLONE_DISABLE is not set +# CONFIG_FDCLONE_STDIO is not set +CONFIG_SDCLONE_DISABLE=y +CONFIG_NFILE_DESCRIPTORS=8 +CONFIG_NFILE_STREAMS=8 +CONFIG_NAME_MAX=32 +# CONFIG_PRIORITY_INHERITANCE is not set + +# +# RTOS hooks +# +# CONFIG_BOARD_INITIALIZE is not set +# CONFIG_SCHED_STARTHOOK is not set +# CONFIG_SCHED_ATEXIT is not set +# CONFIG_SCHED_ONEXIT is not set + +# +# Signal Numbers +# +CONFIG_SIG_SIGUSR1=1 +CONFIG_SIG_SIGUSR2=2 +CONFIG_SIG_SIGALARM=3 +CONFIG_SIG_SIGCONDTIMEDOUT=16 + +# +# POSIX Message Queue Options +# +CONFIG_PREALLOC_MQ_MSGS=4 +CONFIG_MQ_MAXMSGSIZE=32 +# CONFIG_MODULE is not set + +# +# Work queue support +# +# CONFIG_SCHED_WORKQUEUE is not set +# CONFIG_SCHED_HPWORK is not set +# CONFIG_SCHED_LPWORK is not set + +# +# Stack and heap information +# +CONFIG_IDLETHREAD_STACKSIZE=1024 +CONFIG_USERMAIN_STACKSIZE=2048 +CONFIG_PTHREAD_STACK_MIN=256 +CONFIG_PTHREAD_STACK_DEFAULT=2048 +# CONFIG_LIB_SYSCALL is not set + +# +# Device Drivers +# +CONFIG_DISABLE_POLL=y +CONFIG_DEV_NULL=y +# CONFIG_DEV_ZERO is not set +# CONFIG_DEV_LOOP is not set + +# +# Buffering +# +# CONFIG_DRVR_WRITEBUFFER is not set +# CONFIG_DRVR_READAHEAD is not set +# CONFIG_RAMDISK is not set +# CONFIG_CAN is not set +# CONFIG_ARCH_HAVE_PWM_PULSECOUNT is not set +# CONFIG_ARCH_HAVE_PWM_MULTICHAN is not set +# CONFIG_PWM is not set +CONFIG_ARCH_HAVE_I2CRESET=y +# CONFIG_I2C is not set +# CONFIG_SPI is not set +# CONFIG_I2S is not set + +# +# Timer Driver Support +# +# CONFIG_TIMER is not set +# CONFIG_RTC is not set +# CONFIG_WATCHDOG is not set +# CONFIG_ANALOG is not set +# CONFIG_AUDIO_DEVICES is not set +# CONFIG_VIDEO_DEVICES is not set +# CONFIG_BCH is not set +# CONFIG_INPUT is not set +# CONFIG_IOEXPANDER is not set +# CONFIG_LCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_MMCSD is not set +# CONFIG_MODEM is not set +# CONFIG_MTD is not set +# CONFIG_EEPROM is not set +# CONFIG_PIPES is not set +# CONFIG_PM is not set +# CONFIG_POWER is not set +# CONFIG_SENSORS is not set +# CONFIG_SERCOMM_CONSOLE is not set +CONFIG_SERIAL=y +CONFIG_SERIAL_REMOVABLE=y +# CONFIG_16550_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set +CONFIG_MCU_SERIAL=y +CONFIG_STANDARD_SERIAL=y +# CONFIG_SERIAL_IFLOWCONTROL is not set +# CONFIG_SERIAL_OFLOWCONTROL is not set +# CONFIG_SERIAL_DMA is not set +CONFIG_ARCH_HAVE_SERIAL_TERMIOS=y +CONFIG_USART1_SERIAL_CONSOLE=y +# CONFIG_OTHER_SERIAL_CONSOLE is not set +# CONFIG_NO_SERIAL_CONSOLE is not set + +# +# USART1 Configuration +# +CONFIG_USART1_RXBUFSIZE=256 +CONFIG_USART1_TXBUFSIZE=256 +CONFIG_USART1_BAUD=115200 +CONFIG_USART1_BITS=8 +CONFIG_USART1_PARITY=0 +CONFIG_USART1_2STOP=0 +# CONFIG_USART1_IFLOWCONTROL is not set +# CONFIG_USART1_OFLOWCONTROL is not set +# CONFIG_USART1_DMA is not set +CONFIG_USBDEV=y + +# +# USB Device Controller Driver Options +# +# CONFIG_USBDEV_ISOCHRONOUS is not set +# CONFIG_USBDEV_DUALSPEED is not set +CONFIG_USBDEV_SELFPOWERED=y +# CONFIG_USBDEV_BUSPOWERED is not set +CONFIG_USBDEV_MAXPOWER=100 +# CONFIG_USBDEV_DMA is not set +# CONFIG_ARCH_USBDEV_STALLQUEUE is not set +CONFIG_USBDEV_TRACE=y +CONFIG_USBDEV_TRACE_NRECORDS=32 +# CONFIG_USBDEV_TRACE_INITIALIDSET is not set + +# +# USB Device Class Driver Options +# +# CONFIG_USBDEV_COMPOSITE is not set +# CONFIG_PL2303 is not set +CONFIG_CDCACM=y +CONFIG_CDCACM_CONSOLE=y +CONFIG_CDCACM_EP0MAXPACKET=64 +CONFIG_CDCACM_EPINTIN=1 +CONFIG_CDCACM_EPINTIN_FSSIZE=64 +CONFIG_CDCACM_EPINTIN_HSSIZE=64 +CONFIG_CDCACM_EPBULKOUT=3 +CONFIG_CDCACM_EPBULKOUT_FSSIZE=64 +CONFIG_CDCACM_EPBULKOUT_HSSIZE=512 +CONFIG_CDCACM_EPBULKIN=2 +CONFIG_CDCACM_EPBULKIN_FSSIZE=64 +CONFIG_CDCACM_EPBULKIN_HSSIZE=512 +CONFIG_CDCACM_NRDREQS=4 +CONFIG_CDCACM_NWRREQS=4 +CONFIG_CDCACM_BULKIN_REQLEN=96 +CONFIG_CDCACM_RXBUFSIZE=256 +CONFIG_CDCACM_TXBUFSIZE=256 +CONFIG_CDCACM_VENDORID=0x0525 +CONFIG_CDCACM_PRODUCTID=0xa4a7 +CONFIG_CDCACM_VENDORSTR="NuttX" +CONFIG_CDCACM_PRODUCTSTR="CDC/ACM Serial" +# CONFIG_USBMSC is not set +# CONFIG_USBHOST is not set +# CONFIG_DRIVERS_WIRELESS is not set + +# +# System Logging Device Options +# + +# +# System Logging +# +# CONFIG_RAMLOG is not set + +# +# Networking Support +# +# CONFIG_ARCH_HAVE_NET is not set +# CONFIG_ARCH_HAVE_PHY is not set +# CONFIG_NET is not set + +# +# Crypto API +# +# CONFIG_CRYPTO is not set + +# +# File Systems +# + +# +# File system configuration +# +# CONFIG_DISABLE_MOUNTPOINT is not set +# CONFIG_FS_AUTOMOUNTER is not set +CONFIG_DISABLE_PSEUDOFS_OPERATIONS=y +# CONFIG_FS_READABLE is not set +# CONFIG_FS_WRITABLE is not set +# CONFIG_FS_NAMED_SEMAPHORES is not set +CONFIG_FS_MQUEUE_MPATH="/var/mqueue" +# CONFIG_FS_RAMMAP is not set +# CONFIG_FS_FAT is not set +# CONFIG_FS_NXFFS is not set +# CONFIG_FS_ROMFS is not set +# CONFIG_FS_TMPFS is not set +# CONFIG_FS_SMARTFS is not set +# CONFIG_FS_BINFS is not set +# CONFIG_FS_PROCFS is not set +# CONFIG_FS_UNIONFS is not set + +# +# System Logging +# +# CONFIG_SYSLOG is not set +# CONFIG_SYSLOG_TIMESTAMP is not set + +# +# Graphics Support +# +# CONFIG_NX is not set + +# +# Memory Management +# +# CONFIG_MM_SMALL is not set +CONFIG_MM_REGIONS=1 +# CONFIG_ARCH_HAVE_HEAP2 is not set +# CONFIG_GRAN is not set + +# +# Audio Support +# +# CONFIG_AUDIO is not set + +# +# Wireless Support +# + +# +# Binary Loader +# +# CONFIG_BINFMT_DISABLE is not set +# CONFIG_BINFMT_EXEPATH is not set +# CONFIG_NXFLAT is not set +# CONFIG_ELF is not set +CONFIG_BUILTIN=y +# CONFIG_PIC is not set +CONFIG_SYMTAB_ORDEREDBYNAME=y + +# +# Library Routines +# + +# +# Standard C Library Options +# +CONFIG_STDIO_BUFFER_SIZE=64 +CONFIG_STDIO_LINEBUFFER=y +CONFIG_NUNGET_CHARS=2 +CONFIG_LIB_HOMEDIR="/" +# CONFIG_LIBM is not set +# CONFIG_NOPRINTF_FIELDWIDTH is not set +# CONFIG_LIBC_FLOATINGPOINT is not set +# CONFIG_LIBC_LONG_LONG is not set +# CONFIG_LIBC_IOCTL_VARIADIC is not set +CONFIG_LIB_RAND_ORDER=1 +# CONFIG_EOL_IS_CR is not set +# CONFIG_EOL_IS_LF is not set +# CONFIG_EOL_IS_BOTH_CRLF is not set +CONFIG_EOL_IS_EITHER_CRLF=y +# CONFIG_LIBC_EXECFUNCS is not set +CONFIG_POSIX_SPAWN_PROXY_STACKSIZE=1024 +CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=2048 +# CONFIG_LIBC_STRERROR is not set +# CONFIG_LIBC_PERROR_STDOUT is not set +CONFIG_ARCH_LOWPUTC=y +# CONFIG_LIBC_LOCALTIME is not set +# CONFIG_TIME_EXTENDED is not set +CONFIG_LIB_SENDFILE_BUFSIZE=512 +# CONFIG_ARCH_ROMGETC is not set +# CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set +# CONFIG_LIBC_NETDB is not set + +# +# Non-standard Library Support +# +# CONFIG_LIB_KBDCODEC is not set +# CONFIG_LIB_SLCDCODEC is not set + +# +# Basic CXX Support +# +# CONFIG_C99_BOOL8 is not set +# CONFIG_HAVE_CXX is not set + +# +# Application Configuration +# + +# +# Built-In Applications +# +CONFIG_BUILTIN_PROXY_STACKSIZE=1024 + +# +# CAN Utilities +# + +# +# Examples +# +# CONFIG_EXAMPLES_CHAT is not set +# CONFIG_EXAMPLES_CONFIGDATA is not set +# CONFIG_EXAMPLES_CPUHOG is not set +# CONFIG_EXAMPLES_DHCPD is not set +# CONFIG_EXAMPLES_ELF is not set +# CONFIG_EXAMPLES_FTPC is not set +# CONFIG_EXAMPLES_FTPD is not set +# CONFIG_EXAMPLES_HELLO is not set +# CONFIG_EXAMPLES_JSON is not set +# CONFIG_EXAMPLES_HIDKBD is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set +# CONFIG_EXAMPLES_IGMP is not set +# CONFIG_EXAMPLES_MEDIA is not set +# CONFIG_EXAMPLES_MM is not set +# CONFIG_EXAMPLES_MODBUS is not set +# CONFIG_EXAMPLES_MOUNT is not set +# CONFIG_EXAMPLES_NRF24L01TERM is not set +CONFIG_EXAMPLES_NSH=y +# CONFIG_EXAMPLES_NULL is not set +# CONFIG_EXAMPLES_NX is not set +# CONFIG_EXAMPLES_NXTERM is not set +# CONFIG_EXAMPLES_NXFFS is not set +# CONFIG_EXAMPLES_NXHELLO is not set +# CONFIG_EXAMPLES_NXIMAGE is not set +# CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTEXT is not set +# CONFIG_EXAMPLES_OSTEST is not set +# CONFIG_EXAMPLES_PCA9635 is not set +# CONFIG_EXAMPLES_PIPE is not set +# CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_POSIXSPAWN is not set +# CONFIG_EXAMPLES_RGBLED is not set +# CONFIG_EXAMPLES_RGMP is not set +# CONFIG_EXAMPLES_SENDMAIL is not set +# CONFIG_EXAMPLES_SERIALBLASTER is not set +# CONFIG_EXAMPLES_SERIALRX is not set +# CONFIG_EXAMPLES_SERLOOP is not set +# CONFIG_EXAMPLES_SLCD is not set +# CONFIG_EXAMPLES_SMART_TEST is not set +# CONFIG_EXAMPLES_SMART is not set +# CONFIG_EXAMPLES_SMP is not set +# CONFIG_EXAMPLES_TCPECHO is not set +# CONFIG_EXAMPLES_TELNETD is not set +# CONFIG_EXAMPLES_TIFF is not set +# CONFIG_EXAMPLES_TOUCHSCREEN is not set +# CONFIG_EXAMPLES_WEBSERVER is not set +# CONFIG_EXAMPLES_USBSERIAL is not set +# CONFIG_EXAMPLES_USBTERM is not set +# CONFIG_EXAMPLES_WATCHDOG is not set + +# +# File System Utilities +# +# CONFIG_FSUTILS_INIFILE is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set + +# +# Graphics Support +# +# CONFIG_TIFF is not set +# CONFIG_GRAPHICS_TRAVELER is not set + +# +# Interpreters +# +# CONFIG_INTERPRETERS_FICL is not set +# CONFIG_INTERPRETERS_PCODE is not set +# CONFIG_INTERPRETERS_MICROPYTHON is not set + +# +# FreeModBus +# +# CONFIG_MODBUS is not set + +# +# Network Utilities +# +# CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set +# CONFIG_NETUTILS_FTPC is not set +# CONFIG_NETUTILS_JSON is not set +# CONFIG_NETUTILS_SMTP is not set + +# +# NSH Library +# +CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set + +# +# Command Line Configuration +# +CONFIG_NSH_READLINE=y +# CONFIG_NSH_CLE is not set +CONFIG_NSH_LINELEN=80 +CONFIG_NSH_DISABLE_SEMICOLON=y +# CONFIG_NSH_CMDPARMS is not set +CONFIG_NSH_MAXARGUMENTS=6 +# CONFIG_NSH_ARGCAT is not set +CONFIG_NSH_NESTDEPTH=3 +# CONFIG_NSH_DISABLEBG is not set +CONFIG_NSH_BUILTIN_APPS=y + +# +# Disable Individual commands +# +CONFIG_NSH_DISABLE_ADDROUTE=y +CONFIG_NSH_DISABLE_BASENAME=y +# CONFIG_NSH_DISABLE_CAT is not set +# CONFIG_NSH_DISABLE_CD is not set +# CONFIG_NSH_DISABLE_CP is not set +CONFIG_NSH_DISABLE_CMP=y +CONFIG_NSH_DISABLE_DATE=y +# CONFIG_NSH_DISABLE_DD is not set +CONFIG_NSH_DISABLE_DF=y +CONFIG_NSH_DISABLE_DELROUTE=y +CONFIG_NSH_DISABLE_DIRNAME=y +# CONFIG_NSH_DISABLE_ECHO is not set +# CONFIG_NSH_DISABLE_EXEC is not set +# CONFIG_NSH_DISABLE_EXIT is not set +# CONFIG_NSH_DISABLE_FREE is not set +# CONFIG_NSH_DISABLE_GET is not set +# CONFIG_NSH_DISABLE_HELP is not set +# CONFIG_NSH_DISABLE_HEXDUMP is not set +CONFIG_NSH_DISABLE_IFCONFIG=y +CONFIG_NSH_DISABLE_IFUPDOWN=y +# CONFIG_NSH_DISABLE_KILL is not set +CONFIG_NSH_DISABLE_LOSETUP=y +CONFIG_NSH_DISABLE_LOSMART=y +# CONFIG_NSH_DISABLE_LS is not set +# CONFIG_NSH_DISABLE_MB is not set +# CONFIG_NSH_DISABLE_MKDIR is not set +# CONFIG_NSH_DISABLE_MKFIFO is not set +# CONFIG_NSH_DISABLE_MKRD is not set +# CONFIG_NSH_DISABLE_MH is not set +# CONFIG_NSH_DISABLE_MOUNT is not set +# CONFIG_NSH_DISABLE_MV is not set +# CONFIG_NSH_DISABLE_MW is not set +# CONFIG_NSH_DISABLE_PS is not set +# CONFIG_NSH_DISABLE_PUT is not set +# CONFIG_NSH_DISABLE_PWD is not set +# CONFIG_NSH_DISABLE_RM is not set +# CONFIG_NSH_DISABLE_RMDIR is not set +# CONFIG_NSH_DISABLE_SET is not set +# CONFIG_NSH_DISABLE_SH is not set +# CONFIG_NSH_DISABLE_SLEEP is not set +CONFIG_NSH_DISABLE_TIME=y +# CONFIG_NSH_DISABLE_TEST is not set +# CONFIG_NSH_DISABLE_UMOUNT is not set +CONFIG_NSH_DISABLE_UNAME=y +# CONFIG_NSH_DISABLE_UNSET is not set +# CONFIG_NSH_DISABLE_USLEEP is not set +# CONFIG_NSH_DISABLE_WGET is not set +# CONFIG_NSH_DISABLE_XD is not set + +# +# Configure Command Options +# +CONFIG_NSH_CODECS_BUFSIZE=128 +# CONFIG_NSH_CMDOPT_HEXDUMP is not set +CONFIG_NSH_FILEIOSIZE=1024 + +# +# Scripting Support +# +# CONFIG_NSH_DISABLESCRIPT is not set +CONFIG_NSH_DISABLE_ITEF=y +CONFIG_NSH_DISABLE_LOOPS=y + +# +# Console Configuration +# +CONFIG_NSH_CONSOLE=y +# CONFIG_NSH_USBCONSOLE is not set +# CONFIG_NSH_ALTCONDEV is not set + +# +# USB Device Trace Support +# +# CONFIG_NSH_USBDEV_TRACE is not set +# CONFIG_NSH_ARCHINIT is not set +# CONFIG_NSH_LOGIN is not set +# CONFIG_NSH_CONSOLE_LOGIN is not set + +# +# NxWidgets/NxWM +# + +# +# Platform-specific Support +# +# CONFIG_PLATFORM_CONFIGDATA is not set + +# +# System Libraries and NSH Add-Ons +# +# CONFIG_SYSTEM_FREE is not set +# CONFIG_SYSTEM_CLE is not set +# CONFIG_SYSTEM_CUTERM is not set +# CONFIG_SYSTEM_INSTALL is not set +# CONFIG_SYSTEM_HEX2BIN is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_RAMTEST is not set +CONFIG_READLINE_HAVE_EXTMATCH=y +CONFIG_SYSTEM_READLINE=y +CONFIG_READLINE_ECHO=y +# CONFIG_READLINE_TABCOMPLETION is not set +# CONFIG_READLINE_CMD_HISTORY is not set +# CONFIG_SYSTEM_SUDOKU is not set +# CONFIG_SYSTEM_VI is not set +# CONFIG_SYSTEM_CDCACM is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set +# CONFIG_SYSTEM_USBMONITOR is not set +# CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm32f103-minimum/usbnsh/setenv.sh b/configs/stm32f103-minimum/usbnsh/setenv.sh new file mode 100644 index 00000000000..aaf02b991b0 --- /dev/null +++ b/configs/stm32f103-minimum/usbnsh/setenv.sh @@ -0,0 +1,72 @@ +#!/bin/bash +# configs/stm32f103-minimum/usbnsh/setenv.sh +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# 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 [ "$_" = "$0" ] ; then + echo "You must source this script, not run it!" 1>&2 + exit 1 +fi + +WD=`pwd` +if [ ! -x "setenv.sh" ]; then + echo "This script must be executed from the top-level NuttX build directory" + exit 1 +fi + +if [ -z "${PATH_ORIG}" ]; then + export PATH_ORIG="${PATH}" +fi + +# This is the Cygwin path to the location where I installed the CodeSourcery +# toolchain under windows. You will also have to edit this if you install +# the CodeSourcery toolchain in any other location +#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin" +#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin" +# export TOOLCHAIN_BIN="/cygdrive/c/Users/MyName/MentorGraphics/Sourcery_CodeBench_Lite_for_ARM_EABI/bin" + +# This is the location where I installed the ARM "GNU Tools for ARM Embedded Processors" +# You can this free toolchain here https://launchpad.net/gcc-arm-embedded +export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/GNU Tools ARM Embedded/4.9 2015q2/bin" + +# This is the path to the location where I installed the devkitARM toolchain +# You can get this free toolchain from http://devkitpro.org/ or http://sourceforge.net/projects/devkitpro/ +#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/devkitARM/bin" + +# This is the Cygwin path to the location where I build the buildroot +# toolchain. +# export TOOLCHAIN_BIN="${WD}/../buildroot/build_arm_nofpu/staging_dir/bin" + +# Add the path to the toolchain to the PATH varialble +export PATH="${TOOLCHAIN_BIN}:/sbin:/usr/sbin:${PATH_ORIG}" + +echo "PATH : ${PATH}" diff --git a/configs/stm32f3discovery/nsh/defconfig b/configs/stm32f3discovery/nsh/defconfig index cb828eb2346..9c48a2059a9 100644 --- a/configs/stm32f3discovery/nsh/defconfig +++ b/configs/stm32f3discovery/nsh/defconfig @@ -80,6 +80,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -98,6 +99,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -119,6 +121,7 @@ CONFIG_ARCH_CORTEXM4=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -127,6 +130,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y CONFIG_ARCH_HAVE_FPU=y # CONFIG_ARCH_HAVE_DPFPU is not set # CONFIG_ARCH_FPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -137,6 +141,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARW is not set # CONFIG_ARMV7M_TOOLCHAIN_ATOLLIC is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDW is not set @@ -247,6 +252,7 @@ CONFIG_ARCH_CHIP_STM32F303VC=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -418,13 +424,17 @@ CONFIG_STM32_JTAG_SW_ENABLE=y # CONFIG_STM32_TIM4_CAP is not set # CONFIG_STM32_TIM8_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART2_SERIALDRIVER=y +# CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # CONFIG_STM32_HAVE_RTC_COUNTER is not set # CONFIG_STM32_HAVE_RTC_SUBSECONDS is not set @@ -526,7 +536,14 @@ CONFIG_NSH_MMCSDMINOR=0 # Board-Specific Options # CONFIG_LIB_BOARDCTL=y +# CONFIG_BOARDCTL_RESET is not set +# CONFIG_BOARDCTL_UNIQUEID is not set CONFIG_BOARDCTL_USBDEVCTRL=y +# CONFIG_BOARDCTL_TSCTEST is not set +# CONFIG_BOARDCTL_ADCTEST is not set +# CONFIG_BOARDCTL_PWMTEST is not set +# CONFIG_BOARDCTL_GRAPHICS is not set +# CONFIG_BOARDCTL_IOCTL is not set # # RTOS Features @@ -686,33 +703,28 @@ CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set CONFIG_SERIAL_REMOVABLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -CONFIG_ARCH_HAVE_USART2=y -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART2_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +CONFIG_USART2_SERIALDRIVER=y +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -766,8 +778,8 @@ CONFIG_CDCACM_EPBULKOUT_HSSIZE=512 CONFIG_CDCACM_EPBULKIN=2 CONFIG_CDCACM_EPBULKIN_FSSIZE=64 CONFIG_CDCACM_EPBULKIN_HSSIZE=512 -CONFIG_CDCACM_NWRREQS=4 CONFIG_CDCACM_NRDREQS=4 +CONFIG_CDCACM_NWRREQS=4 CONFIG_CDCACM_BULKIN_REQLEN=96 CONFIG_CDCACM_RXBUFSIZE=256 CONFIG_CDCACM_TXBUFSIZE=256 @@ -896,6 +908,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # @@ -1019,6 +1033,7 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/stm32f3discovery/src/Makefile b/configs/stm32f3discovery/src/Makefile index cac567aa4cd..119bca3f598 100644 --- a/configs/stm32f3discovery/src/Makefile +++ b/configs/stm32f3discovery/src/Makefile @@ -60,10 +60,6 @@ ifeq ($(CONFIG_QENCODER),y) CSRCS += stm32_qencoder.c endif -ifeq ($(CONFIG_WATCHDOG),y) -CSRCS += stm32_watchdog.c -endif - ifeq ($(CONFIG_LIB_BOARDCTL),y) CSRCS += stm32_appinit.c endif diff --git a/configs/stm32f3discovery/src/stm32_appinit.c b/configs/stm32f3discovery/src/stm32_appinit.c index 445dfbc2c4d..3d23db62969 100644 --- a/configs/stm32f3discovery/src/stm32_appinit.c +++ b/configs/stm32f3discovery/src/stm32_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/stm32f3discovery/src/stm32_appinit.c * - * Copyright (C) 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2013, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -92,11 +92,28 @@ * Name: board_app_initialize * * Description: - * Perform architecture specific initialization + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface using the command BOARDIOC_INIT. + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #ifdef HAVE_USBMONITOR int ret; diff --git a/configs/stm32f3discovery/src/stm32_watchdog.c b/configs/stm32f3discovery/src/stm32_watchdog.c deleted file mode 100644 index 42d6ed33436..00000000000 --- a/configs/stm32f3discovery/src/stm32_watchdog.c +++ /dev/null @@ -1,135 +0,0 @@ -/************************************************************************************ - * configs/stm32f3discovery/src/stm32_watchdog.c - * - * Copyright (C) 2013 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * 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. - * - ************************************************************************************/ - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include -#include - -#include -#include - -#include "stm32_wdg.h" - -#ifdef CONFIG_WATCHDOG - -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ -/* Configuration *******************************************************************/ -/* Wathdog hardware should be enabled */ - -#if !defined(CONFIG_STM32_WWDG) && !defined(CONFIG_STM32_IWDG) -# warning "One of CONFIG_STM32_WWDG or CONFIG_STM32_IWDG must be defined" -#endif - -/* Select the path to the registered watchdog timer device */ - -#ifndef CONFIG_STM32_WDG_DEVPATH -# ifdef CONFIG_EXAMPLES_WATCHDOG_DEVPATH -# define CONFIG_STM32_WDG_DEVPATH CONFIG_EXAMPLES_WATCHDOG_DEVPATH -# else -# define CONFIG_STM32_WDG_DEVPATH "/dev/watchdog0" -# endif -#endif - -/* Use the un-calibrated LSI frequency if we have nothing better */ - -#if defined(CONFIG_STM32_IWDG) && !defined(CONFIG_STM32_LSIFREQ) -# define CONFIG_STM32_LSIFREQ STM32_LSI_FREQUENCY -#endif - -/* Debug ***************************************************************************/ -/* Non-standard debug that may be enabled just for testing the watchdog timer */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_WATCHDOG -#endif - -#ifdef CONFIG_DEBUG_WATCHDOG -# define wdgdbg dbg -# define wdglldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define wdgvdbg vdbg -# define wdgllvdbg llvdbg -# else -# define wdgvdbg(x...) -# define wdgllvdbg(x...) -# endif -#else -# define wdgdbg(x...) -# define wdglldbg(x...) -# define wdgvdbg(x...) -# define wdgllvdbg(x...) -#endif - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -/**************************************************************************** - * Name: up_wdginitialize() - * - * Description: - * Perform architecuture-specific initialization of the Watchdog hardware. - * This interface must be provided by all configurations using - * apps/examples/watchdog - * - ****************************************************************************/ - -int up_wdginitialize(void) -{ - /* Initialize tha register the watchdog timer device */ - -#if defined(CONFIG_STM32_WWDG) - stm32_wwdginitialize(CONFIG_STM32_WDG_DEVPATH); - return OK; -#elif defined(CONFIG_STM32_IWDG) - stm32_iwdginitialize(CONFIG_STM32_WDG_DEVPATH, CONFIG_STM32_LSIFREQ); - return OK; -#else - return -ENODEV; -#endif -} - -#endif /* CONFIG_WATCHDOG */ diff --git a/configs/stm32f3discovery/usbnsh/defconfig b/configs/stm32f3discovery/usbnsh/defconfig index c1c75193436..ed5e23a9d98 100644 --- a/configs/stm32f3discovery/usbnsh/defconfig +++ b/configs/stm32f3discovery/usbnsh/defconfig @@ -121,6 +121,7 @@ CONFIG_ARCH_CORTEXM4=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -140,6 +141,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARW is not set # CONFIG_ARMV7M_TOOLCHAIN_ATOLLIC is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDW is not set @@ -250,6 +252,7 @@ CONFIG_ARCH_CHIP_STM32F303VC=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -422,13 +425,17 @@ CONFIG_STM32_JTAG_SW_ENABLE=y # CONFIG_STM32_TIM4_CAP is not set # CONFIG_STM32_TIM8_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART2_SERIALDRIVER=y +# CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # @@ -709,33 +716,28 @@ CONFIG_SPI_EXCHANGE=y CONFIG_SERIAL=y CONFIG_SERIAL_REMOVABLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -CONFIG_ARCH_HAVE_USART2=y -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART2_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +CONFIG_USART2_SERIALDRIVER=y +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -1045,6 +1047,7 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/stm32f411e-disco/Kconfig b/configs/stm32f411e-disco/Kconfig new file mode 100644 index 00000000000..c8983191836 --- /dev/null +++ b/configs/stm32f411e-disco/Kconfig @@ -0,0 +1,8 @@ +# +# For a description of the syntax of this configuration file, +# see the file kconfig-language.txt in the NuttX tools repository. +# + +if ARCH_BOARD_STM32F411E_DISCO + +endif diff --git a/configs/stm32f411e-disco/README.txt b/configs/stm32f411e-disco/README.txt new file mode 100644 index 00000000000..9bc93021508 --- /dev/null +++ b/configs/stm32f411e-disco/README.txt @@ -0,0 +1,8 @@ +README +====== + +This README discusses issues unique to NuttX configurations for the STMicro +STM32F411E-Discovery board. See + +http://www.st.com/content/ccc/resource/technical/document/user_manual/e9/d2/00/5e/15/46/44/0e/DM00148985.pdf/files/DM00148985.pdf/jcr:content/translations/en.DM00148985.pdf + diff --git a/configs/stm32f411e-disco/include/board.h b/configs/stm32f411e-disco/include/board.h new file mode 100644 index 00000000000..46d2df971e0 --- /dev/null +++ b/configs/stm32f411e-disco/include/board.h @@ -0,0 +1,360 @@ +/************************************************************************************ + * configs/stm32f411e-disco/include/board.h + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Author: Konstantin Berezenko + * + * based on configs/nucleo-f4x1re/include/board.h + * + * 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. + * + ************************************************************************************/ + +#ifndef __CONFIGS_STM32F411E_DISCO_INCLUDE_BOARD_H +#define __CONFIGS_STM32F411E_DISCO_INCLUDE_BOARD_H + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include +#ifndef __ASSEMBLY__ +# include +#endif + +#include + +/************************************************************************************ + * Pre-processor Definitions + ************************************************************************************/ + +/* Clocking *************************************************************************/ +/* + * System Clock source : PLLCLK (HSE) + * SYSCLK(Hz) : 96000000 Determined by PLL configuration + * HCLK(Hz) : 96000000 (STM32_RCC_CFGR_HPRE) + * AHB Prescaler : 1 (STM32_RCC_CFGR_HPRE) + * APB1 Prescaler : 4 (STM32_RCC_CFGR_PPRE1) + * APB2 Prescaler : 2 (STM32_RCC_CFGR_PPRE2) + * HSI Frequency(Hz) : 16000000 (nominal) + * PLLM : 4 (STM32_PLLCFG_PLLM) + * PLLN : 192 (STM32_PLLCFG_PLLN) + * PLLP : 4 (STM32_PLLCFG_PLLP) + * PLLQ : 8 (STM32_PLLCFG_PPQ) + * Flash Latency(WS) : 3 + * Prefetch Buffer : OFF + * Instruction cache : ON + * Data cache : ON + * Require 48MHz for USB OTG FS, : Enabled + * SDIO and RNG clock + */ + +/* HSI - 16 MHz RC factory-trimmed + * LSI - 32 KHz RC + * HSE - 8 MHz Crystal + * LSE - not installed + */ + +#define STM32_BOARD_XTAL 8000000ul + +#define STM32_HSI_FREQUENCY 16000000ul +#define STM32_LSI_FREQUENCY 32000 +#define STM32_HSE_FREQUENCY STM32_BOARD_XTAL + +/* Main PLL Configuration. + * + * Formulae: + * + * VCO input frequency = PLL input clock frequency / PLLM, 2 <= PLLM <= 63 + * VCO output frequency = VCO input frequency × PLLN, 192 <= PLLN <= 432 + * PLL output clock frequency = VCO frequency / PLLP, PLLP = 2, 4, 6, or 8 + * USB OTG FS clock frequency = VCO frequency / PLLQ, 2 <= PLLQ <= 15 + * + * There is no config for 100 MHz and 48 MHz for usb, + * so we would like to have SYSYCLK=96MHz and we must have the USB clock= 48MHz. + * + * PLLQ = 8 PLLP = 4 PLLN=192 PLLM=4 + * + * We will configure like this + * + * PLL source is HSE + * PLL_VCO = (STM32_HSE_FREQUENCY / PLLM) * PLLN + * = (8,000,000 / 4) * 192 + * = 384,000,000 + * SYSCLK = PLL_VCO / PLLP + * = 384,000,000 / 4 = 96,000,000 + * USB OTG FS and SDIO Clock + * = PLL_VCO / PLLQ + * = 384,000,000 / 8 = 48,000,000 + */ + +#define STM32_PLLCFG_PLLM RCC_PLLCFG_PLLM(4) +#define STM32_PLLCFG_PLLN RCC_PLLCFG_PLLN(192) +#define STM32_PLLCFG_PLLP RCC_PLLCFG_PLLP_4 +#define STM32_PLLCFG_PLLQ RCC_PLLCFG_PLLQ(8) + +#define STM32_SYSCLK_FREQUENCY 96000000ul + +/* AHB clock (HCLK) is SYSCLK (96MHz) */ + +#define STM32_RCC_CFGR_HPRE RCC_CFGR_HPRE_SYSCLK /* HCLK = SYSCLK / 1 */ +#define STM32_HCLK_FREQUENCY STM32_SYSCLK_FREQUENCY +#define STM32_BOARD_HCLK STM32_HCLK_FREQUENCY /* Same as above, to satisfy compiler */ + +/* APB1 clock (PCLK1) is HCLK/4 (24MHz) */ + +#define STM32_RCC_CFGR_PPRE1 RCC_CFGR_PPRE1_HCLKd4 /* PCLK1 = HCLK / 4 */ +#define STM32_PCLK1_FREQUENCY (STM32_HCLK_FREQUENCY/4) + +/* Timers driven from APB1 will be twice PCLK1 */ +/* REVISIT */ + +#define STM32_APB1_TIM2_CLKIN (2*STM32_PCLK1_FREQUENCY) +#define STM32_APB1_TIM3_CLKIN (2*STM32_PCLK1_FREQUENCY) +#define STM32_APB1_TIM4_CLKIN (2*STM32_PCLK1_FREQUENCY) +#define STM32_APB1_TIM5_CLKIN (2*STM32_PCLK1_FREQUENCY) +#define STM32_APB1_TIM6_CLKIN (2*STM32_PCLK1_FREQUENCY) +#define STM32_APB1_TIM7_CLKIN (2*STM32_PCLK1_FREQUENCY) +#define STM32_APB1_TIM12_CLKIN (2*STM32_PCLK1_FREQUENCY) +#define STM32_APB1_TIM13_CLKIN (2*STM32_PCLK1_FREQUENCY) +#define STM32_APB1_TIM14_CLKIN (2*STM32_PCLK1_FREQUENCY) + +/* APB2 clock (PCLK2) is HCLK (48MHz) */ + +#define STM32_RCC_CFGR_PPRE2 RCC_CFGR_PPRE2_HCLKd2 /* PCLK2 = HCLK / 2 */ +#define STM32_PCLK2_FREQUENCY (STM32_HCLK_FREQUENCY/2) + +/* Timers driven from APB2 will be twice PCLK2 */ + +#define STM32_APB2_TIM1_CLKIN (2*STM32_PCLK2_FREQUENCY) +#define STM32_APB2_TIM8_CLKIN (2*STM32_PCLK2_FREQUENCY) +#define STM32_APB2_TIM9_CLKIN (2*STM32_PCLK1_FREQUENCY) +#define STM32_APB2_TIM10_CLKIN (2*STM32_PCLK1_FREQUENCY) +#define STM32_APB2_TIM11_CLKIN (2*STM32_PCLK1_FREQUENCY) + +/* Timer Frequencies, if APBx is set to 1, frequency is same to APBx + * otherwise frequency is 2xAPBx. + * Note: TIM1,8 are on APB2, others on APB1 + */ +/* REVISIT */ + +#define STM32_TIM18_FREQUENCY (2*STM32_PCLK2_FREQUENCY) +#define STM32_TIM27_FREQUENCY (2*STM32_PCLK1_FREQUENCY) + +/* SDIO dividers. Note that slower clocking is required when DMA is disabled + * in order to avoid RX overrun/TX underrun errors due to delayed responses + * to service FIFOs in interrupt driven mode. These values have not been + * tuned!!! + * + * HCLK=72MHz, SDIOCLK=72MHz, SDIO_CK=HCLK/(178+2)=400 KHz + */ +/* REVISIT */ + +#define SDIO_INIT_CLKDIV (178 << SDIO_CLKCR_CLKDIV_SHIFT) + +/* DMA ON: HCLK=72 MHz, SDIOCLK=72MHz, SDIO_CK=HCLK/(2+2)=18 MHz + * DMA OFF: HCLK=72 MHz, SDIOCLK=72MHz, SDIO_CK=HCLK/(3+2)=14.4 MHz + */ +/* REVISIT */ + +#ifdef CONFIG_SDIO_DMA +# define SDIO_MMCXFR_CLKDIV (2 << SDIO_CLKCR_CLKDIV_SHIFT) +#else +# define SDIO_MMCXFR_CLKDIV (3 << SDIO_CLKCR_CLKDIV_SHIFT) +#endif + +/* DMA ON: HCLK=72 MHz, SDIOCLK=72MHz, SDIO_CK=HCLK/(1+2)=24 MHz + * DMA OFF: HCLK=72 MHz, SDIOCLK=72MHz, SDIO_CK=HCLK/(3+2)=14.4 MHz + */ +/* REVISIT */ + +#ifdef CONFIG_SDIO_DMA +# define SDIO_SDXFR_CLKDIV (1 << SDIO_CLKCR_CLKDIV_SHIFT) +#else +# define SDIO_SDXFR_CLKDIV (3 << SDIO_CLKCR_CLKDIV_SHIFT) +#endif + +/* DMA Channel/Stream Selections ****************************************************/ +/* Stream selections are arbitrary for now but might become important in the future + * is we set aside more DMA channels/streams. + * + * SDIO DMA + *   DMAMAP_SDIO_1 = Channel 4, Stream 3 <- may later be used by SPI DMA + *   DMAMAP_SDIO_2 = Channel 4, Stream 6 + */ + +#define DMAMAP_SDIO DMAMAP_SDIO_1 + +/* Need to VERIFY fwb */ + +#define DMACHAN_SPI1_RX DMAMAP_SPI1_RX_1 +#define DMACHAN_SPI1_TX DMAMAP_SPI1_TX_1 +#define DMACHAN_SPI2_RX DMAMAP_SPI2_RX +#define DMACHAN_SPI2_TX DMAMAP_SPI2_TX + +/* Alternate function pin selections ************************************************/ + +/* USART1: + * RXD: PA10 CN9 pin 3, CN10 pin 33 + * PB7 CN7 pin 21 + * TXD: PA9 CN5 pin 1, CN10 pin 21 + * PB6 CN5 pin 3, CN10 pin 17 + */ + +#if 1 +# define GPIO_USART1_RX GPIO_USART1_RX_1 /* PA10 */ +# define GPIO_USART1_TX GPIO_USART1_TX_1 /* PA9 */ +#else +# define GPIO_USART1_RX GPIO_USART1_RX_2 /* PB7 */ +# define GPIO_USART1_TX GPIO_USART1_TX_2 /* PB6 */ +#endif + +/* USART2: + * RXD: PA3 CN9 pin 1 (See SB13, 14, 62, 63). CN10 pin 37 + * PD6 + * TXD: PA2 CN9 pin 2(See SB13, 14, 62, 63). CN10 pin 35 + * PD5 + */ + +#define GPIO_USART2_RX GPIO_USART2_RX_1 /* PA3 */ +#define GPIO_USART2_TX GPIO_USART2_TX_1 /* PA2 */ +#define GPIO_USART2_RTS GPIO_USART2_RTS_2 +#define GPIO_USART2_CTS GPIO_USART2_CTS_2 + +/* USART6: + * RXD: PC7 CN5 pin2, CN10 pin 19 + * PA12 CN10, pin 12 + * TXD: PC6 CN10, pin 4 + * PA11 CN10, pin 14 + */ + +#define GPIO_USART6_RX GPIO_USART6_RX_1 /* PC7 */ +#define GPIO_USART6_TX GPIO_USART6_TX_1 /* PC6 */ + +/* UART RX DMA configurations */ + +#define DMAMAP_USART1_RX DMAMAP_USART1_RX_2 +#define DMAMAP_USART6_RX DMAMAP_USART6_RX_2 + +/* I2C + * + * The optional _GPIO configurations allow the I2C driver to manually + * reset the bus to clear stuck slaves. They match the pin configuration, + * but are normally-high GPIOs. + */ + +#define GPIO_I2C1_SCL GPIO_I2C1_SCL_2 +#define GPIO_I2C1_SDA GPIO_I2C1_SDA_2 +#define GPIO_I2C1_SCL_GPIO \ + (GPIO_OUTPUT|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN8) +#define GPIO_I2C1_SDA_GPIO \ + (GPIO_OUTPUT|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN9) + +#define GPIO_I2C2_SCL GPIO_I2C2_SCL_1 +#define GPIO_I2C2_SDA GPIO_I2C2_SDA_1 +#define GPIO_I2C2_SCL_GPIO \ + (GPIO_OUTPUT|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN10) +#define GPIO_I2C2_SDA_GPIO \ + (GPIO_OUTPUT|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN11) + +/* SPI + * + * There are sensors on SPI1, and SPI2 is connected to the FRAM. + */ + +#define GPIO_SPI1_MISO GPIO_SPI1_MISO_1 +#define GPIO_SPI1_MOSI GPIO_SPI1_MOSI_1 +#define GPIO_SPI1_SCK GPIO_SPI1_SCK_1 + +#define GPIO_SPI2_MISO GPIO_SPI2_MISO_1 +#define GPIO_SPI2_MOSI GPIO_SPI2_MOSI_1 +#define GPIO_SPI2_SCK GPIO_SPI2_SCK_2 + +/* LEDs + * + * The STM32F411E Discovery board has four user leds but only one is configured so far. + * LD2 connected to PD12. + */ + +/* LED index values for use with board_userled() */ + +#define BOARD_LD2 0 +#define BOARD_NLEDS 1 + +/* LED bits for use with board_userled_all() */ + +#define BOARD_LD2_BIT (1 << BOARD_LD2) + +/* Buttons + * + * B1 USER: the user button is connected to the I/O PA0 of the STM32 + * microcontroller. + */ + +#define BUTTON_USER 0 +#define NUM_BUTTONS 1 + +#define BUTTON_USER_BIT (1 << BUTTON_USER) + +/************************************************************************************ + * Public Data + ************************************************************************************/ + +#ifndef __ASSEMBLY__ + +#undef EXTERN +#if defined(__cplusplus) +#define EXTERN extern "C" +extern "C" +{ +#else +#define EXTERN extern +#endif + +/************************************************************************************ + * Public Function Prototypes + ************************************************************************************/ +/************************************************************************************ + * Name: stm32_boardinitialize + * + * Description: + * All STM32 architectures must provide the following entry point. This entry point + * is called early in the initialization -- after all memory has been configured + * and mapped but before any devices have been initialized. + * + ************************************************************************************/ + +void stm32_boardinitialize(void); + +#undef EXTERN +#if defined(__cplusplus) +} +#endif + +#endif /* __ASSEMBLY__ */ +#endif /* __CONFIGS_STM32F411E_DISCO_INCLUDE_BOARD_H */ diff --git a/configs/stm32f411e-disco/nsh/Make.defs b/configs/stm32f411e-disco/nsh/Make.defs new file mode 100644 index 00000000000..b0f06ba60b3 --- /dev/null +++ b/configs/stm32f411e-disco/nsh/Make.defs @@ -0,0 +1,111 @@ +############################################################################ +# configs/stm32f411e-disco/nsh/Make.defs +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +include ${TOPDIR}/.config +include ${TOPDIR}/tools/Config.mk +include ${TOPDIR}/arch/arm/src/armv7-m/Toolchain.defs + +LDSCRIPT = f411ve.ld + +ifeq ($(WINTOOL),y) + # Windows-native toolchains + DIRLINK = $(TOPDIR)/tools/copydir.sh + DIRUNLINK = $(TOPDIR)/tools/unlink.sh + MKDEP = $(TOPDIR)/tools/mkwindeps.sh + ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" + ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT)}" +else + # Linux/Cygwin-native toolchain + MKDEP = $(TOPDIR)/tools/mkdeps$(HOSTEXEEXT) + ARCHINCLUDES = -I. -isystem $(TOPDIR)/include + ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT) +endif + +CC = $(CROSSDEV)gcc +CXX = $(CROSSDEV)g++ +CPP = $(CROSSDEV)gcc -E +LD = $(CROSSDEV)ld +AR = $(ARCROSSDEV)ar rcs +NM = $(ARCROSSDEV)nm +OBJCOPY = $(CROSSDEV)objcopy +OBJDUMP = $(CROSSDEV)objdump + +ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q'} +ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1} + +ifeq ($(CONFIG_DEBUG_SYMBOLS),y) + ARCHOPTIMIZATION = -g +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer +endif + +ARCHCFLAGS = -fno-builtin +ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fno-rtti +ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef +ARCHWARNINGSXX = -Wall -Wshadow -Wundef +ARCHDEFINES = +ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 + +CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe +CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS) +CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe +CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS) +CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) +AFLAGS = $(CFLAGS) -D__ASSEMBLY__ + +NXFLATLDFLAGS1 = -r -d -warn-common +NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-pcrel.ld -no-check-sections +LDNXFLATFLAGS = -e main -s 2048 + +ASMEXT = .S +OBJEXT = .o +LIBEXT = .a +EXEEXT = + +ifneq ($(CROSSDEV),arm-nuttx-elf-) + LDFLAGS += -nostartfiles -nodefaultlibs +endif +ifeq ($(CONFIG_DEBUG_SYMBOLS),y) + LDFLAGS += -g +endif + +HOSTCC = gcc +HOSTINCLUDES = -I. +HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -g -pipe +HOSTLDFLAGS = diff --git a/configs/stm32f411e-disco/nsh/defconfig b/configs/stm32f411e-disco/nsh/defconfig new file mode 100644 index 00000000000..e9719959a96 --- /dev/null +++ b/configs/stm32f411e-disco/nsh/defconfig @@ -0,0 +1,1100 @@ +# +# Automatically generated file; DO NOT EDIT. +# Nuttx/ Configuration +# + +# +# Build Setup +# +# CONFIG_EXPERIMENTAL is not set +# CONFIG_DEFAULT_SMALL is not set +CONFIG_HOST_LINUX=y +# CONFIG_HOST_OSX is not set +# CONFIG_HOST_WINDOWS is not set +# CONFIG_HOST_OTHER is not set + +# +# Build Configuration +# +# CONFIG_APPS_DIR="../apps" +CONFIG_BUILD_FLAT=y +# CONFIG_BUILD_2PASS is not set + +# +# Binary Output Formats +# +# CONFIG_RRLOAD_BINARY is not set +CONFIG_INTELHEX_BINARY=y +# CONFIG_MOTOROLA_SREC is not set +CONFIG_RAW_BINARY=y +# CONFIG_UBOOT_UIMAGE is not set + +# +# Customize Header Files +# +# CONFIG_ARCH_STDINT_H is not set +# CONFIG_ARCH_STDBOOL_H is not set +# CONFIG_ARCH_MATH_H is not set +# CONFIG_ARCH_FLOAT_H is not set +# CONFIG_ARCH_STDARG_H is not set +# CONFIG_ARCH_DEBUG_H is not set + +# +# Debug Options +# +# CONFIG_DEBUG is not set +CONFIG_ARCH_HAVE_HEAPCHECK=y +CONFIG_ARCH_HAVE_STACKCHECK=y +# CONFIG_STACK_COLORATION is not set +# CONFIG_DEBUG_SYMBOLS is not set +CONFIG_ARCH_HAVE_CUSTOMOPT=y +# CONFIG_DEBUG_NOOPT is not set +# CONFIG_DEBUG_CUSTOMOPT is not set +CONFIG_DEBUG_FULLOPT=y + +# +# System Type +# +CONFIG_ARCH_ARM=y +# CONFIG_ARCH_AVR is not set +# CONFIG_ARCH_HC is not set +# CONFIG_ARCH_MIPS is not set +# CONFIG_ARCH_RGMP is not set +# CONFIG_ARCH_SH is not set +# CONFIG_ARCH_SIM is not set +# CONFIG_ARCH_X86 is not set +# CONFIG_ARCH_Z16 is not set +# CONFIG_ARCH_Z80 is not set +CONFIG_ARCH="arm" + +# +# ARM Options +# +# CONFIG_ARCH_CHIP_A1X is not set +# CONFIG_ARCH_CHIP_C5471 is not set +# CONFIG_ARCH_CHIP_CALYPSO is not set +# CONFIG_ARCH_CHIP_DM320 is not set +# CONFIG_ARCH_CHIP_EFM32 is not set +# CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set +# CONFIG_ARCH_CHIP_KINETIS is not set +# CONFIG_ARCH_CHIP_KL is not set +# CONFIG_ARCH_CHIP_LM is not set +# CONFIG_ARCH_CHIP_TIVA is not set +# CONFIG_ARCH_CHIP_LPC11XX is not set +# CONFIG_ARCH_CHIP_LPC17XX is not set +# CONFIG_ARCH_CHIP_LPC214X is not set +# CONFIG_ARCH_CHIP_LPC2378 is not set +# CONFIG_ARCH_CHIP_LPC31XX is not set +# CONFIG_ARCH_CHIP_LPC43XX is not set +# CONFIG_ARCH_CHIP_NUC1XX is not set +# CONFIG_ARCH_CHIP_SAMA5 is not set +# CONFIG_ARCH_CHIP_SAMD is not set +# CONFIG_ARCH_CHIP_SAML is not set +# CONFIG_ARCH_CHIP_SAM34 is not set +# CONFIG_ARCH_CHIP_SAMV7 is not set +CONFIG_ARCH_CHIP_STM32=y +# CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set +# CONFIG_ARCH_CHIP_STR71X is not set +# CONFIG_ARCH_CHIP_TMS570 is not set +# CONFIG_ARCH_CHIP_MOXART is not set +# CONFIG_ARCH_ARM7TDMI is not set +# CONFIG_ARCH_ARM926EJS is not set +# CONFIG_ARCH_ARM920T is not set +# CONFIG_ARCH_CORTEXM0 is not set +# CONFIG_ARCH_CORTEXM3 is not set +CONFIG_ARCH_CORTEXM4=y +# CONFIG_ARCH_CORTEXM7 is not set +# CONFIG_ARCH_CORTEXA5 is not set +# CONFIG_ARCH_CORTEXA8 is not set +# CONFIG_ARCH_CORTEXA9 is not set +# CONFIG_ARCH_CORTEXR4 is not set +# CONFIG_ARCH_CORTEXR4F is not set +# CONFIG_ARCH_CORTEXR5 is not set +# CONFIG_ARCH_CORTEX5F is not set +# CONFIG_ARCH_CORTEXR7 is not set +# CONFIG_ARCH_CORTEXR7F is not set +CONFIG_ARCH_FAMILY="armv7-m" +CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set +CONFIG_ARM_TOOLCHAIN_GNU=y +# CONFIG_ARMV7M_USEBASEPRI is not set +CONFIG_ARCH_HAVE_CMNVECTOR=y +# CONFIG_ARMV7M_CMNVECTOR is not set +# CONFIG_ARMV7M_LAZYFPU is not set +CONFIG_ARCH_HAVE_FPU=y +# CONFIG_ARCH_HAVE_DPFPU is not set +# CONFIG_ARCH_FPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set +CONFIG_ARM_HAVE_MPU_UNIFIED=y +# CONFIG_ARM_MPU is not set + +# +# ARMV7M Configuration Options +# +# CONFIG_ARMV7M_HAVE_ICACHE is not set +# CONFIG_ARMV7M_HAVE_DCACHE is not set +# CONFIG_ARMV7M_HAVE_ITCM is not set +# CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set +# CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set +# CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set +# CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set +CONFIG_ARMV7M_TOOLCHAIN_GNU_EABIL=y +CONFIG_ARMV7M_HAVE_STACKCHECK=y +# CONFIG_ARMV7M_STACKCHECK is not set +# CONFIG_ARMV7M_ITMSYSLOG is not set +# CONFIG_SERIAL_TERMIOS is not set + +# +# STM32 Configuration Options +# +# CONFIG_ARCH_CHIP_STM32L151C6 is not set +# CONFIG_ARCH_CHIP_STM32L151C8 is not set +# CONFIG_ARCH_CHIP_STM32L151CB is not set +# CONFIG_ARCH_CHIP_STM32L151R6 is not set +# CONFIG_ARCH_CHIP_STM32L151R8 is not set +# CONFIG_ARCH_CHIP_STM32L151RB is not set +# CONFIG_ARCH_CHIP_STM32L151V6 is not set +# CONFIG_ARCH_CHIP_STM32L151V8 is not set +# CONFIG_ARCH_CHIP_STM32L151VB is not set +# CONFIG_ARCH_CHIP_STM32L152C6 is not set +# CONFIG_ARCH_CHIP_STM32L152C8 is not set +# CONFIG_ARCH_CHIP_STM32L152CB is not set +# CONFIG_ARCH_CHIP_STM32L152R6 is not set +# CONFIG_ARCH_CHIP_STM32L152R8 is not set +# CONFIG_ARCH_CHIP_STM32L152RB is not set +# CONFIG_ARCH_CHIP_STM32L152V6 is not set +# CONFIG_ARCH_CHIP_STM32L152V8 is not set +# CONFIG_ARCH_CHIP_STM32L152VB is not set +# CONFIG_ARCH_CHIP_STM32L162ZD is not set +# CONFIG_ARCH_CHIP_STM32L162VE is not set +# CONFIG_ARCH_CHIP_STM32F100C8 is not set +# CONFIG_ARCH_CHIP_STM32F100CB is not set +# CONFIG_ARCH_CHIP_STM32F100R8 is not set +# CONFIG_ARCH_CHIP_STM32F100RB is not set +# CONFIG_ARCH_CHIP_STM32F100RC is not set +# CONFIG_ARCH_CHIP_STM32F100RD is not set +# CONFIG_ARCH_CHIP_STM32F100RE is not set +# CONFIG_ARCH_CHIP_STM32F100V8 is not set +# CONFIG_ARCH_CHIP_STM32F100VB is not set +# CONFIG_ARCH_CHIP_STM32F100VC is not set +# CONFIG_ARCH_CHIP_STM32F100VD is not set +# CONFIG_ARCH_CHIP_STM32F100VE is not set +# CONFIG_ARCH_CHIP_STM32F102CB is not set +# CONFIG_ARCH_CHIP_STM32F103T8 is not set +# CONFIG_ARCH_CHIP_STM32F103TB is not set +# CONFIG_ARCH_CHIP_STM32F103C4 is not set +# CONFIG_ARCH_CHIP_STM32F103C8 is not set +# CONFIG_ARCH_CHIP_STM32F103CB is not set +# CONFIG_ARCH_CHIP_STM32F103R8 is not set +# CONFIG_ARCH_CHIP_STM32F103RB is not set +# CONFIG_ARCH_CHIP_STM32F103RC is not set +# CONFIG_ARCH_CHIP_STM32F103RD is not set +# CONFIG_ARCH_CHIP_STM32F103RE is not set +# CONFIG_ARCH_CHIP_STM32F103RG is not set +# CONFIG_ARCH_CHIP_STM32F103V8 is not set +# CONFIG_ARCH_CHIP_STM32F103VB is not set +# CONFIG_ARCH_CHIP_STM32F103VC is not set +# CONFIG_ARCH_CHIP_STM32F103VE is not set +# CONFIG_ARCH_CHIP_STM32F103ZE is not set +# CONFIG_ARCH_CHIP_STM32F105VB is not set +# CONFIG_ARCH_CHIP_STM32F107VC is not set +# CONFIG_ARCH_CHIP_STM32F205RG is not set +# CONFIG_ARCH_CHIP_STM32F207IG is not set +# CONFIG_ARCH_CHIP_STM32F207ZE is not set +# CONFIG_ARCH_CHIP_STM32F302K6 is not set +# CONFIG_ARCH_CHIP_STM32F302K8 is not set +# CONFIG_ARCH_CHIP_STM32F302CB is not set +# CONFIG_ARCH_CHIP_STM32F302CC is not set +# CONFIG_ARCH_CHIP_STM32F302RB is not set +# CONFIG_ARCH_CHIP_STM32F302RC is not set +# CONFIG_ARCH_CHIP_STM32F302VB is not set +# CONFIG_ARCH_CHIP_STM32F302VC is not set +# CONFIG_ARCH_CHIP_STM32F303K6 is not set +# CONFIG_ARCH_CHIP_STM32F303K8 is not set +# CONFIG_ARCH_CHIP_STM32F303C6 is not set +# CONFIG_ARCH_CHIP_STM32F303C8 is not set +# CONFIG_ARCH_CHIP_STM32F303CB is not set +# CONFIG_ARCH_CHIP_STM32F303CC is not set +# CONFIG_ARCH_CHIP_STM32F303RB is not set +# CONFIG_ARCH_CHIP_STM32F303RC is not set +# CONFIG_ARCH_CHIP_STM32F303RD is not set +# CONFIG_ARCH_CHIP_STM32F303RE is not set +# CONFIG_ARCH_CHIP_STM32F303VB is not set +# CONFIG_ARCH_CHIP_STM32F303VC is not set +# CONFIG_ARCH_CHIP_STM32F372C8 is not set +# CONFIG_ARCH_CHIP_STM32F372R8 is not set +# CONFIG_ARCH_CHIP_STM32F372V8 is not set +# CONFIG_ARCH_CHIP_STM32F372CB is not set +# CONFIG_ARCH_CHIP_STM32F372RB is not set +# CONFIG_ARCH_CHIP_STM32F372VB is not set +# CONFIG_ARCH_CHIP_STM32F372CC is not set +# CONFIG_ARCH_CHIP_STM32F372RC is not set +# CONFIG_ARCH_CHIP_STM32F372VC is not set +# CONFIG_ARCH_CHIP_STM32F373C8 is not set +# CONFIG_ARCH_CHIP_STM32F373R8 is not set +# CONFIG_ARCH_CHIP_STM32F373V8 is not set +# CONFIG_ARCH_CHIP_STM32F373CB is not set +# CONFIG_ARCH_CHIP_STM32F373RB is not set +# CONFIG_ARCH_CHIP_STM32F373VB is not set +# CONFIG_ARCH_CHIP_STM32F373CC is not set +# CONFIG_ARCH_CHIP_STM32F373RC is not set +# CONFIG_ARCH_CHIP_STM32F373VC is not set +# CONFIG_ARCH_CHIP_STM32F401RE is not set +# CONFIG_ARCH_CHIP_STM32F411RE is not set +CONFIG_ARCH_CHIP_STM32F411VE=y +# CONFIG_ARCH_CHIP_STM32F405RG is not set +# CONFIG_ARCH_CHIP_STM32F405VG is not set +# CONFIG_ARCH_CHIP_STM32F405ZG is not set +# CONFIG_ARCH_CHIP_STM32F407VE is not set +# CONFIG_ARCH_CHIP_STM32F407VG is not set +# CONFIG_ARCH_CHIP_STM32F407ZE is not set +# CONFIG_ARCH_CHIP_STM32F407ZG is not set +# CONFIG_ARCH_CHIP_STM32F407IE is not set +# CONFIG_ARCH_CHIP_STM32F407IG is not set +# CONFIG_ARCH_CHIP_STM32F427V is not set +# CONFIG_ARCH_CHIP_STM32F427Z is not set +# CONFIG_ARCH_CHIP_STM32F427I is not set +# CONFIG_ARCH_CHIP_STM32F429V is not set +# CONFIG_ARCH_CHIP_STM32F429Z is not set +# CONFIG_ARCH_CHIP_STM32F429I is not set +# CONFIG_ARCH_CHIP_STM32F429B is not set +# CONFIG_ARCH_CHIP_STM32F429N is not set +# CONFIG_ARCH_CHIP_STM32F446M is not set +# CONFIG_ARCH_CHIP_STM32F446R is not set +# CONFIG_ARCH_CHIP_STM32F446V is not set +# CONFIG_ARCH_CHIP_STM32F446Z is not set +# CONFIG_ARCH_CHIP_STM32F469A is not set +# CONFIG_ARCH_CHIP_STM32F469I is not set +# CONFIG_ARCH_CHIP_STM32F469B is not set +# CONFIG_ARCH_CHIP_STM32F469N is not set +# CONFIG_STM32_FLASH_CONFIG_DEFAULT is not set +# CONFIG_STM32_FLASH_CONFIG_4 is not set +# CONFIG_STM32_FLASH_CONFIG_6 is not set +# CONFIG_STM32_FLASH_CONFIG_8 is not set +# CONFIG_STM32_FLASH_CONFIG_B is not set +# CONFIG_STM32_FLASH_CONFIG_C is not set +# CONFIG_STM32_FLASH_CONFIG_D is not set +CONFIG_STM32_FLASH_CONFIG_E=y +# CONFIG_STM32_FLASH_CONFIG_F is not set +# CONFIG_STM32_FLASH_CONFIG_G is not set +# CONFIG_STM32_FLASH_CONFIG_I is not set +# CONFIG_STM32_STM32L15XX is not set +# CONFIG_STM32_ENERGYLITE is not set +# CONFIG_STM32_STM32F10XX is not set +# CONFIG_STM32_VALUELINE is not set +# CONFIG_STM32_CONNECTIVITYLINE is not set +# CONFIG_STM32_PERFORMANCELINE is not set +# CONFIG_STM32_USBACCESSLINE is not set +# CONFIG_STM32_HIGHDENSITY is not set +# CONFIG_STM32_MEDIUMDENSITY is not set +# CONFIG_STM32_LOWDENSITY is not set +# CONFIG_STM32_STM32F20XX is not set +# CONFIG_STM32_STM32F205 is not set +# CONFIG_STM32_STM32F207 is not set +# CONFIG_STM32_STM32F30XX is not set +# CONFIG_STM32_STM32F302 is not set +# CONFIG_STM32_STM32F303 is not set +# CONFIG_STM32_STM32F37XX is not set +CONFIG_STM32_STM32F40XX=y +# CONFIG_STM32_STM32F401 is not set +CONFIG_STM32_STM32F411=y +# CONFIG_STM32_STM32F405 is not set +# CONFIG_STM32_STM32F407 is not set +# CONFIG_STM32_STM32F427 is not set +# CONFIG_STM32_STM32F429 is not set +# CONFIG_STM32_STM32F446 is not set +# CONFIG_STM32_STM32F469 is not set +# CONFIG_STM32_DFU is not set + +# +# STM32 Peripheral Support +# +# CONFIG_STM32_HAVE_CCM is not set +# CONFIG_STM32_HAVE_USBDEV is not set +CONFIG_STM32_HAVE_OTGFS=y +# CONFIG_STM32_HAVE_FSMC is not set +# CONFIG_STM32_HAVE_LTDC is not set +# CONFIG_STM32_HAVE_USART3 is not set +# CONFIG_STM32_HAVE_UART4 is not set +# CONFIG_STM32_HAVE_UART5 is not set +CONFIG_STM32_HAVE_USART6=y +# CONFIG_STM32_HAVE_UART7 is not set +# CONFIG_STM32_HAVE_UART8 is not set +CONFIG_STM32_HAVE_TIM1=y +# CONFIG_STM32_HAVE_TIM2 is not set +CONFIG_STM32_HAVE_TIM3=y +CONFIG_STM32_HAVE_TIM4=y +CONFIG_STM32_HAVE_TIM5=y +# CONFIG_STM32_HAVE_TIM6 is not set +# CONFIG_STM32_HAVE_TIM7 is not set +# CONFIG_STM32_HAVE_TIM8 is not set +CONFIG_STM32_HAVE_TIM9=y +CONFIG_STM32_HAVE_TIM10=y +CONFIG_STM32_HAVE_TIM11=y +# CONFIG_STM32_HAVE_TIM12 is not set +# CONFIG_STM32_HAVE_TIM13 is not set +# CONFIG_STM32_HAVE_TIM14 is not set +# CONFIG_STM32_HAVE_TIM15 is not set +# CONFIG_STM32_HAVE_TIM16 is not set +# CONFIG_STM32_HAVE_TIM17 is not set +# CONFIG_STM32_HAVE_ADC2 is not set +# CONFIG_STM32_HAVE_ADC3 is not set +# CONFIG_STM32_HAVE_ADC4 is not set +# CONFIG_STM32_HAVE_ADC1_DMA is not set +# CONFIG_STM32_HAVE_ADC2_DMA is not set +# CONFIG_STM32_HAVE_ADC3_DMA is not set +# CONFIG_STM32_HAVE_ADC4_DMA is not set +# CONFIG_STM32_HAVE_CAN1 is not set +# CONFIG_STM32_HAVE_CAN2 is not set +# CONFIG_STM32_HAVE_DAC1 is not set +# CONFIG_STM32_HAVE_DAC2 is not set +# CONFIG_STM32_HAVE_RNG is not set +# CONFIG_STM32_HAVE_ETHMAC is not set +CONFIG_STM32_HAVE_I2C2=y +CONFIG_STM32_HAVE_I2C3=y +CONFIG_STM32_HAVE_SPI2=y +CONFIG_STM32_HAVE_SPI3=y +CONFIG_STM32_HAVE_SPI4=y +CONFIG_STM32_HAVE_SPI5=y +# CONFIG_STM32_HAVE_SPI6 is not set +# CONFIG_STM32_HAVE_SAIPLL is not set +# CONFIG_STM32_HAVE_I2SPLL is not set +# CONFIG_STM32_ADC1 is not set +# CONFIG_STM32_BKPSRAM is not set +# CONFIG_STM32_CCMDATARAM is not set +# CONFIG_STM32_CRC is not set +# CONFIG_STM32_CRYP is not set +# CONFIG_STM32_DMA1 is not set +# CONFIG_STM32_DMA2 is not set +# CONFIG_STM32_DCMI is not set +# CONFIG_STM32_HASH is not set +# CONFIG_STM32_I2C1 is not set +# CONFIG_STM32_I2C2 is not set +# CONFIG_STM32_I2C3 is not set +# CONFIG_STM32_OTGFS is not set +# CONFIG_STM32_OTGHS is not set +# CONFIG_STM32_PWR is not set +# CONFIG_STM32_SDIO is not set +# CONFIG_STM32_SPI1 is not set +# CONFIG_STM32_SPI2 is not set +# CONFIG_STM32_SPI3 is not set +# CONFIG_STM32_SPI4 is not set +# CONFIG_STM32_SPI5 is not set +# CONFIG_STM32_SYSCFG is not set +# CONFIG_STM32_TIM1 is not set +# CONFIG_STM32_TIM2 is not set +# CONFIG_STM32_TIM3 is not set +# CONFIG_STM32_TIM4 is not set +# CONFIG_STM32_TIM5 is not set +# CONFIG_STM32_TIM9 is not set +# CONFIG_STM32_TIM10 is not set +# CONFIG_STM32_TIM11 is not set +# CONFIG_STM32_USART1 is not set +CONFIG_STM32_USART2=y +# CONFIG_STM32_USART6 is not set +# CONFIG_STM32_IWDG is not set +# CONFIG_STM32_WWDG is not set +# CONFIG_STM32_NOEXT_VECTORS is not set + +# +# Alternate Pin Mapping +# +# CONFIG_STM32_FLASH_PREFETCH is not set +# CONFIG_STM32_JTAG_DISABLE is not set +# CONFIG_STM32_JTAG_FULL_ENABLE is not set +# CONFIG_STM32_JTAG_NOJNTRST_ENABLE is not set +CONFIG_STM32_JTAG_SW_ENABLE=y +# CONFIG_STM32_DISABLE_IDLE_SLEEP_DURING_DEBUG is not set +# CONFIG_STM32_FORCEPOWER is not set +# CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set +# CONFIG_STM32_TIM1_CAP is not set +# CONFIG_STM32_TIM3_CAP is not set +# CONFIG_STM32_TIM4_CAP is not set +# CONFIG_STM32_TIM5_CAP is not set +# CONFIG_STM32_TIM9_CAP is not set +# CONFIG_STM32_TIM10_CAP is not set +# CONFIG_STM32_TIM11_CAP is not set +CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y + +# +# U[S]ART Configuration +# +CONFIG_STM32_USART2_SERIALDRIVER=y +# CONFIG_STM32_USART2_1WIREDRIVER is not set +# CONFIG_USART2_RS485 is not set +# CONFIG_SERIAL_DISABLE_REORDERING is not set +# CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set +# CONFIG_STM32_USART_SINGLEWIRE is not set +# CONFIG_STM32_HAVE_RTC_COUNTER is not set +# CONFIG_STM32_HAVE_RTC_SUBSECONDS is not set + +# +# USB FS Host Configuration +# + +# +# USB HS Host Configuration +# + +# +# USB Host Debug Configuration +# + +# +# USB Device Configuration +# + +# +# Architecture Options +# +# CONFIG_ARCH_NOINTC is not set +# CONFIG_ARCH_VECNOTIRQ is not set +# CONFIG_ARCH_DMA is not set +CONFIG_ARCH_HAVE_IRQPRIO=y +# CONFIG_ARCH_L2CACHE is not set +# CONFIG_ARCH_HAVE_COHERENT_DCACHE is not set +# CONFIG_ARCH_HAVE_ADDRENV is not set +# CONFIG_ARCH_NEED_ADDRENV_MAPPING is not set +# CONFIG_ARCH_HAVE_MULTICPU is not set +CONFIG_ARCH_HAVE_VFORK=y +# CONFIG_ARCH_HAVE_MMU is not set +CONFIG_ARCH_HAVE_MPU=y +# CONFIG_ARCH_NAND_HWECC is not set +# CONFIG_ARCH_HAVE_EXTCLK is not set +# CONFIG_ARCH_HAVE_POWEROFF is not set +CONFIG_ARCH_HAVE_RESET=y +# CONFIG_ARCH_USE_MPU is not set +# CONFIG_ARCH_IRQPRIO is not set +CONFIG_ARCH_STACKDUMP=y +# CONFIG_ENDIAN_BIG is not set +# CONFIG_ARCH_IDLE_CUSTOM is not set +# CONFIG_ARCH_HAVE_RAMFUNCS is not set +CONFIG_ARCH_HAVE_RAMVECTORS=y +# CONFIG_ARCH_RAMVECTORS is not set + +# +# Board Settings +# +CONFIG_BOARD_LOOPSPERMSEC=8499 +# CONFIG_ARCH_CALIBRATION is not set + +# +# Interrupt options +# +CONFIG_ARCH_HAVE_INTERRUPTSTACK=y +CONFIG_ARCH_INTERRUPTSTACK=2048 +CONFIG_ARCH_HAVE_HIPRI_INTERRUPT=y +# CONFIG_ARCH_HIPRI_INTERRUPT is not set + +# +# Boot options +# +# CONFIG_BOOT_RUNFROMEXTSRAM is not set +CONFIG_BOOT_RUNFROMFLASH=y +# CONFIG_BOOT_RUNFROMISRAM is not set +# CONFIG_BOOT_RUNFROMSDRAM is not set +# CONFIG_BOOT_COPYTORAM is not set + +# +# Boot Memory Configuration +# +CONFIG_RAM_START=0x20000000 +CONFIG_RAM_SIZE=131072 +# CONFIG_ARCH_HAVE_SDRAM is not set + +# +# Board Selection +# +CONFIG_ARCH_BOARD_STM32F411E_DISCO=y +# CONFIG_ARCH_BOARD_CUSTOM is not set +CONFIG_ARCH_BOARD="stm32f411e-disco" + +# +# Common Board Options +# +CONFIG_ARCH_HAVE_LEDS=y +# CONFIG_ARCH_LEDS is not set +CONFIG_ARCH_HAVE_BUTTONS=y +# CONFIG_ARCH_BUTTONS is not set +CONFIG_ARCH_HAVE_IRQBUTTONS=y +CONFIG_NSH_MMCSDMINOR=0 + +# +# Board-Specific Options +# +# CONFIG_LIB_BOARDCTL is not set + +# +# RTOS Features +# +# CONFIG_DISABLE_OS_API is not set + +# +# Clocks and Timers +# +CONFIG_USEC_PER_TICK=10000 +# CONFIG_SYSTEM_TIME64 is not set +# CONFIG_CLOCK_MONOTONIC is not set +# CONFIG_JULIAN_TIME is not set +CONFIG_START_YEAR=2014 +CONFIG_START_MONTH=10 +CONFIG_START_DAY=14 +CONFIG_MAX_WDOGPARMS=2 +CONFIG_PREALLOC_WDOGS=8 +CONFIG_WDOG_INTRESERVE=1 +CONFIG_PREALLOC_TIMERS=4 + +# +# Tasks and Scheduling +# +# CONFIG_INIT_NONE is not set +CONFIG_INIT_ENTRYPOINT=y +# CONFIG_INIT_FILEPATH is not set +CONFIG_USER_ENTRYPOINT="nsh_main" +CONFIG_RR_INTERVAL=200 +# CONFIG_SCHED_SPORADIC is not set +CONFIG_TASK_NAME_SIZE=0 +CONFIG_MAX_TASKS=16 +# CONFIG_SCHED_HAVE_PARENT is not set +CONFIG_SCHED_WAITPID=y + +# +# Pthread Options +# +# CONFIG_MUTEX_TYPES is not set +CONFIG_NPTHREAD_KEYS=4 + +# +# Performance Monitoring +# +# CONFIG_SCHED_CPULOAD is not set +# CONFIG_SCHED_INSTRUMENTATION is not set + +# +# Files and I/O +# +CONFIG_DEV_CONSOLE=y +# CONFIG_FDCLONE_DISABLE is not set +# CONFIG_FDCLONE_STDIO is not set +CONFIG_SDCLONE_DISABLE=y +CONFIG_NFILE_DESCRIPTORS=8 +CONFIG_NFILE_STREAMS=8 +CONFIG_NAME_MAX=32 +# CONFIG_PRIORITY_INHERITANCE is not set + +# +# RTOS hooks +# +# CONFIG_BOARD_INITIALIZE is not set +# CONFIG_SCHED_STARTHOOK is not set +# CONFIG_SCHED_ATEXIT is not set +# CONFIG_SCHED_ONEXIT is not set + +# +# Signal Numbers +# +CONFIG_SIG_SIGUSR1=1 +CONFIG_SIG_SIGUSR2=2 +CONFIG_SIG_SIGALARM=3 +CONFIG_SIG_SIGCONDTIMEDOUT=16 + +# +# POSIX Message Queue Options +# +CONFIG_PREALLOC_MQ_MSGS=4 +CONFIG_MQ_MAXMSGSIZE=32 +# CONFIG_MODULE is not set + +# +# Work queue support +# +# CONFIG_SCHED_WORKQUEUE is not set +# CONFIG_SCHED_HPWORK is not set +# CONFIG_SCHED_LPWORK is not set + +# +# Stack and heap information +# +CONFIG_IDLETHREAD_STACKSIZE=1024 +CONFIG_USERMAIN_STACKSIZE=2048 +CONFIG_PTHREAD_STACK_MIN=256 +CONFIG_PTHREAD_STACK_DEFAULT=2048 +# CONFIG_LIB_SYSCALL is not set + +# +# Device Drivers +# +CONFIG_DISABLE_POLL=y +CONFIG_DEV_NULL=y +# CONFIG_DEV_ZERO is not set +# CONFIG_DEV_LOOP is not set + +# +# Buffering +# +# CONFIG_DRVR_WRITEBUFFER is not set +# CONFIG_DRVR_READAHEAD is not set +# CONFIG_RAMDISK is not set +# CONFIG_CAN is not set +# CONFIG_ARCH_HAVE_PWM_PULSECOUNT is not set +# CONFIG_ARCH_HAVE_PWM_MULTICHAN is not set +# CONFIG_PWM is not set +CONFIG_ARCH_HAVE_I2CRESET=y +# CONFIG_I2C is not set +# CONFIG_SPI is not set +# CONFIG_I2S is not set + +# +# Timer Driver Support +# +# CONFIG_TIMER is not set +# CONFIG_RTC is not set +# CONFIG_WATCHDOG is not set +# CONFIG_ANALOG is not set +# CONFIG_AUDIO_DEVICES is not set +# CONFIG_VIDEO_DEVICES is not set +# CONFIG_BCH is not set +# CONFIG_INPUT is not set +# CONFIG_IOEXPANDER is not set +# CONFIG_LCD is not set + +# +# LED Support +# +# CONFIG_USERLED is not set +# CONFIG_RGBLED is not set +# CONFIG_PCA9635PW is not set +# CONFIG_MMCSD is not set +# CONFIG_MODEM is not set +# CONFIG_MTD is not set +# CONFIG_EEPROM is not set +# CONFIG_PIPES is not set +# CONFIG_PM is not set +# CONFIG_POWER is not set +# CONFIG_SENSORS is not set +# CONFIG_SERCOMM_CONSOLE is not set +CONFIG_SERIAL=y +# CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_16550_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +CONFIG_USART2_SERIALDRIVER=y +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set +CONFIG_MCU_SERIAL=y +CONFIG_STANDARD_SERIAL=y +# CONFIG_SERIAL_IFLOWCONTROL is not set +# CONFIG_SERIAL_OFLOWCONTROL is not set +# CONFIG_SERIAL_DMA is not set +CONFIG_ARCH_HAVE_SERIAL_TERMIOS=y +CONFIG_USART2_SERIAL_CONSOLE=y +# CONFIG_OTHER_SERIAL_CONSOLE is not set +# CONFIG_NO_SERIAL_CONSOLE is not set + +# +# USART2 Configuration +# +CONFIG_USART2_RXBUFSIZE=256 +CONFIG_USART2_TXBUFSIZE=256 +CONFIG_USART2_BAUD=115200 +CONFIG_USART2_BITS=8 +CONFIG_USART2_PARITY=0 +CONFIG_USART2_2STOP=0 +# CONFIG_USART2_IFLOWCONTROL is not set +# CONFIG_USART2_OFLOWCONTROL is not set +# CONFIG_USART2_DMA is not set +# CONFIG_USBDEV is not set +# CONFIG_USBHOST is not set +# CONFIG_DRIVERS_WIRELESS is not set + +# +# System Logging Device Options +# + +# +# System Logging +# +# CONFIG_RAMLOG is not set +# CONFIG_SYSLOG_CONSOLE is not set + +# +# Networking Support +# +# CONFIG_ARCH_HAVE_NET is not set +# CONFIG_ARCH_HAVE_PHY is not set +# CONFIG_NET is not set + +# +# Crypto API +# +# CONFIG_CRYPTO is not set + +# +# File Systems +# + +# +# File system configuration +# +# CONFIG_DISABLE_MOUNTPOINT is not set +# CONFIG_FS_AUTOMOUNTER is not set +# CONFIG_DISABLE_PSEUDOFS_OPERATIONS is not set +# CONFIG_FS_READABLE is not set +# CONFIG_FS_WRITABLE is not set +# CONFIG_FS_NAMED_SEMAPHORES is not set +CONFIG_FS_MQUEUE_MPATH="/var/mqueue" +# CONFIG_FS_RAMMAP is not set +# CONFIG_FS_FAT is not set +# CONFIG_FS_NXFFS is not set +# CONFIG_FS_ROMFS is not set +# CONFIG_FS_TMPFS is not set +# CONFIG_FS_SMARTFS is not set +# CONFIG_FS_BINFS is not set +# CONFIG_FS_PROCFS is not set +# CONFIG_FS_UNIONFS is not set + +# +# System Logging +# +# CONFIG_SYSLOG is not set +# CONFIG_SYSLOG_TIMESTAMP is not set + +# +# Graphics Support +# +# CONFIG_NX is not set + +# +# Memory Management +# +# CONFIG_MM_SMALL is not set +CONFIG_MM_REGIONS=1 +# CONFIG_ARCH_HAVE_HEAP2 is not set +# CONFIG_GRAN is not set + +# +# Audio Support +# +# CONFIG_AUDIO is not set + +# +# Wireless Support +# + +# +# Binary Loader +# +# CONFIG_BINFMT_DISABLE is not set +# CONFIG_BINFMT_EXEPATH is not set +# CONFIG_NXFLAT is not set +# CONFIG_ELF is not set +CONFIG_BUILTIN=y +# CONFIG_PIC is not set +# CONFIG_SYMTAB_ORDEREDBYNAME is not set + +# +# Library Routines +# + +# +# Standard C Library Options +# +CONFIG_STDIO_BUFFER_SIZE=64 +CONFIG_STDIO_LINEBUFFER=y +CONFIG_NUNGET_CHARS=2 +CONFIG_LIB_HOMEDIR="/" +# CONFIG_LIBM is not set +# CONFIG_NOPRINTF_FIELDWIDTH is not set +# CONFIG_LIBC_FLOATINGPOINT is not set +CONFIG_LIBC_LONG_LONG=y +# CONFIG_LIBC_IOCTL_VARIADIC is not set +CONFIG_LIB_RAND_ORDER=1 +# CONFIG_EOL_IS_CR is not set +# CONFIG_EOL_IS_LF is not set +# CONFIG_EOL_IS_BOTH_CRLF is not set +CONFIG_EOL_IS_EITHER_CRLF=y +# CONFIG_LIBC_EXECFUNCS is not set +CONFIG_POSIX_SPAWN_PROXY_STACKSIZE=1024 +CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=2048 +# CONFIG_LIBC_STRERROR is not set +# CONFIG_LIBC_PERROR_STDOUT is not set +CONFIG_ARCH_LOWPUTC=y +# CONFIG_LIBC_LOCALTIME is not set +# CONFIG_TIME_EXTENDED is not set +CONFIG_LIB_SENDFILE_BUFSIZE=512 +# CONFIG_ARCH_ROMGETC is not set +# CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set +# CONFIG_LIBC_NETDB is not set + +# +# Non-standard Library Support +# +# CONFIG_LIB_KBDCODEC is not set +# CONFIG_LIB_SLCDCODEC is not set + +# +# Basic CXX Support +# +# CONFIG_C99_BOOL8 is not set +CONFIG_HAVE_CXX=y +# CONFIG_HAVE_CXXINITIALIZE is not set +# CONFIG_CXX_NEWLONG is not set + +# +# uClibc++ Standard C++ Library +# +# CONFIG_UCLIBCXX is not set + +# +# Application Configuration +# + +# +# Built-In Applications +# +CONFIG_BUILTIN_PROXY_STACKSIZE=1024 + +# +# CAN Utilities +# + +# +# Examples +# +# CONFIG_EXAMPLES_CHAT is not set +# CONFIG_EXAMPLES_CONFIGDATA is not set +# CONFIG_EXAMPLES_CPUHOG is not set +# CONFIG_EXAMPLES_CXXTEST is not set +# CONFIG_EXAMPLES_DHCPD is not set +# CONFIG_EXAMPLES_ELF is not set +# CONFIG_EXAMPLES_FTPC is not set +# CONFIG_EXAMPLES_FTPD is not set +# CONFIG_EXAMPLES_HELLO is not set +# CONFIG_EXAMPLES_HELLOXX is not set +# CONFIG_EXAMPLES_JSON is not set +# CONFIG_EXAMPLES_HIDKBD is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set +# CONFIG_EXAMPLES_IGMP is not set +# CONFIG_EXAMPLES_LEDS is not set +# CONFIG_EXAMPLES_MEDIA is not set +# CONFIG_EXAMPLES_MM is not set +# CONFIG_EXAMPLES_MODBUS is not set +# CONFIG_EXAMPLES_MOUNT is not set +# CONFIG_EXAMPLES_NRF24L01TERM is not set +CONFIG_EXAMPLES_NSH=y +# CONFIG_EXAMPLES_NULL is not set +# CONFIG_EXAMPLES_NX is not set +# CONFIG_EXAMPLES_NXTERM is not set +# CONFIG_EXAMPLES_NXFFS is not set +# CONFIG_EXAMPLES_NXHELLO is not set +# CONFIG_EXAMPLES_NXIMAGE is not set +# CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTEXT is not set +# CONFIG_EXAMPLES_OSTEST is not set +# CONFIG_EXAMPLES_PCA9635 is not set +# CONFIG_EXAMPLES_PIPE is not set +# CONFIG_EXAMPLES_PPPD is not set +# CONFIG_EXAMPLES_POSIXSPAWN is not set +# CONFIG_EXAMPLES_RGBLED is not set +# CONFIG_EXAMPLES_RGMP is not set +# CONFIG_EXAMPLES_SENDMAIL is not set +# CONFIG_EXAMPLES_SERIALBLASTER is not set +# CONFIG_EXAMPLES_SERIALRX is not set +# CONFIG_EXAMPLES_SERLOOP is not set +# CONFIG_EXAMPLES_SLCD is not set +# CONFIG_EXAMPLES_SMART_TEST is not set +# CONFIG_EXAMPLES_SMART is not set +# CONFIG_EXAMPLES_SMP is not set +# CONFIG_EXAMPLES_TCPECHO is not set +# CONFIG_EXAMPLES_TELNETD is not set +# CONFIG_EXAMPLES_TIFF is not set +# CONFIG_EXAMPLES_TOUCHSCREEN is not set +# CONFIG_EXAMPLES_WEBSERVER is not set +# CONFIG_EXAMPLES_USBTERM is not set +# CONFIG_EXAMPLES_WATCHDOG is not set + +# +# File System Utilities +# +# CONFIG_FSUTILS_INIFILE is not set + +# +# GPS Utilities +# +# CONFIG_GPSUTILS_MINMEA_LIB is not set + +# +# Graphics Support +# +# CONFIG_TIFF is not set +# CONFIG_GRAPHICS_TRAVELER is not set + +# +# Interpreters +# +# CONFIG_INTERPRETERS_FICL is not set +# CONFIG_INTERPRETERS_PCODE is not set +# CONFIG_INTERPRETERS_MICROPYTHON is not set + +# +# FreeModBus +# +# CONFIG_MODBUS is not set + +# +# Network Utilities +# +# CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set +# CONFIG_NETUTILS_FTPC is not set +# CONFIG_NETUTILS_JSON is not set +# CONFIG_NETUTILS_SMTP is not set + +# +# NSH Library +# +CONFIG_NSH_LIBRARY=y +# CONFIG_NSH_MOTD is not set + +# +# Command Line Configuration +# +CONFIG_NSH_READLINE=y +# CONFIG_NSH_CLE is not set +CONFIG_NSH_LINELEN=64 +# CONFIG_NSH_DISABLE_SEMICOLON is not set +# CONFIG_NSH_CMDPARMS is not set +CONFIG_NSH_MAXARGUMENTS=6 +# CONFIG_NSH_ARGCAT is not set +CONFIG_NSH_NESTDEPTH=3 +# CONFIG_NSH_DISABLEBG is not set +CONFIG_NSH_BUILTIN_APPS=y + +# +# Disable Individual commands +# +# CONFIG_NSH_DISABLE_ADDROUTE is not set +# CONFIG_NSH_DISABLE_BASENAME is not set +# CONFIG_NSH_DISABLE_CAT is not set +# CONFIG_NSH_DISABLE_CD is not set +# CONFIG_NSH_DISABLE_CP is not set +# CONFIG_NSH_DISABLE_CMP is not set +CONFIG_NSH_DISABLE_DATE=y +# CONFIG_NSH_DISABLE_DD is not set +# CONFIG_NSH_DISABLE_DF is not set +# CONFIG_NSH_DISABLE_DELROUTE is not set +# CONFIG_NSH_DISABLE_DIRNAME is not set +# CONFIG_NSH_DISABLE_ECHO is not set +# CONFIG_NSH_DISABLE_EXEC is not set +# CONFIG_NSH_DISABLE_EXIT is not set +# CONFIG_NSH_DISABLE_FREE is not set +# CONFIG_NSH_DISABLE_GET is not set +# CONFIG_NSH_DISABLE_HELP is not set +# CONFIG_NSH_DISABLE_HEXDUMP is not set +# CONFIG_NSH_DISABLE_IFCONFIG is not set +CONFIG_NSH_DISABLE_IFUPDOWN=y +# CONFIG_NSH_DISABLE_KILL is not set +# CONFIG_NSH_DISABLE_LOSETUP is not set +CONFIG_NSH_DISABLE_LOSMART=y +# CONFIG_NSH_DISABLE_LS is not set +# CONFIG_NSH_DISABLE_MB is not set +# CONFIG_NSH_DISABLE_MKDIR is not set +# CONFIG_NSH_DISABLE_MKFIFO is not set +# CONFIG_NSH_DISABLE_MKRD is not set +# CONFIG_NSH_DISABLE_MH is not set +# CONFIG_NSH_DISABLE_MOUNT is not set +# CONFIG_NSH_DISABLE_MV is not set +# CONFIG_NSH_DISABLE_MW is not set +# CONFIG_NSH_DISABLE_PS is not set +# CONFIG_NSH_DISABLE_PUT is not set +# CONFIG_NSH_DISABLE_PWD is not set +# CONFIG_NSH_DISABLE_RM is not set +# CONFIG_NSH_DISABLE_RMDIR is not set +# CONFIG_NSH_DISABLE_SET is not set +# CONFIG_NSH_DISABLE_SH is not set +# CONFIG_NSH_DISABLE_SLEEP is not set +# CONFIG_NSH_DISABLE_TIME is not set +# CONFIG_NSH_DISABLE_TEST is not set +# CONFIG_NSH_DISABLE_UMOUNT is not set +# CONFIG_NSH_DISABLE_UNAME is not set +# CONFIG_NSH_DISABLE_UNSET is not set +# CONFIG_NSH_DISABLE_USLEEP is not set +# CONFIG_NSH_DISABLE_WGET is not set +# CONFIG_NSH_DISABLE_XD is not set + +# +# Configure Command Options +# +# CONFIG_NSH_CMDOPT_DF_H is not set +CONFIG_NSH_CODECS_BUFSIZE=128 +# CONFIG_NSH_CMDOPT_HEXDUMP is not set +CONFIG_NSH_FILEIOSIZE=512 + +# +# Scripting Support +# +# CONFIG_NSH_DISABLESCRIPT is not set +# CONFIG_NSH_DISABLE_ITEF is not set +# CONFIG_NSH_DISABLE_LOOPS is not set + +# +# Console Configuration +# +CONFIG_NSH_CONSOLE=y +# CONFIG_NSH_ALTCONDEV is not set +# CONFIG_NSH_ARCHINIT is not set +# CONFIG_NSH_LOGIN is not set +# CONFIG_NSH_CONSOLE_LOGIN is not set + +# +# NxWidgets/NxWM +# + +# +# Platform-specific Support +# +# CONFIG_PLATFORM_CONFIGDATA is not set + +# +# System Libraries and NSH Add-Ons +# +# CONFIG_SYSTEM_FREE is not set +# CONFIG_SYSTEM_CLE is not set +# CONFIG_SYSTEM_CUTERM is not set +# CONFIG_SYSTEM_INSTALL is not set +# CONFIG_SYSTEM_HEX2BIN is not set +# CONFIG_SYSTEM_HEXED is not set +# CONFIG_SYSTEM_RAMTEST is not set +CONFIG_READLINE_HAVE_EXTMATCH=y +CONFIG_SYSTEM_READLINE=y +CONFIG_READLINE_ECHO=y +# CONFIG_READLINE_TABCOMPLETION is not set +# CONFIG_READLINE_CMD_HISTORY is not set +# CONFIG_SYSTEM_SUDOKU is not set +# CONFIG_SYSTEM_VI is not set +# CONFIG_SYSTEM_UBLOXMODEM is not set +# CONFIG_SYSTEM_ZMODEM is not set diff --git a/configs/stm32f411e-disco/nsh/setenv.sh b/configs/stm32f411e-disco/nsh/setenv.sh new file mode 100755 index 00000000000..add9de147f0 --- /dev/null +++ b/configs/stm32f411e-disco/nsh/setenv.sh @@ -0,0 +1,68 @@ +#!/bin/bash +# configs/stm32f411e-disco/nsh/setenv.sh +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# 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 [ "$_" = "$0" ] ; then + echo "You must source this script, not run it!" 1>&2 + exit 1 +fi + +WD=`pwd` +if [ ! -x "setenv.sh" ]; then + echo "This script must be executed from the top-level NuttX build directory" + exit 1 +fi + +if [ -z "${PATH_ORIG}" ]; then + export PATH_ORIG="${PATH}" +fi + +# This the Cygwin path to the location where I installed the CodeSourcery +# toolchain under windows. You will also have to edit this if you install +# the CodeSourcery toolchain in any other location +#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin" +#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin" +#export TOOLCHAIN_BIN="/cygdrive/c/Users/MyName/MentorGraphics/Sourcery_CodeBench_Lite_for_ARM_EABI/bin" + +# This is the location where I installed the ARM "GNU Tools for ARM Embedded Processors" +# You can this free toolchain here https://launchpad.net/gcc-arm-embedded +export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/GNU Tools ARM Embedded/4.9 2015q2/bin" + +# This the Cygwin path to the location where I build the buildroot +# toolchain. +#export TOOLCHAIN_BIN="${WD}/../buildroot/build_arm_nofpu/staging_dir/bin" + +# Add the path to the toolchain to the PATH varialble +export PATH="${TOOLCHAIN_BIN}:/sbin:/usr/sbin:${PATH_ORIG}" + +echo "PATH : ${PATH}" diff --git a/configs/stm32f411e-disco/scripts/f411ve.ld b/configs/stm32f411e-disco/scripts/f411ve.ld new file mode 100644 index 00000000000..ea38ac3c272 --- /dev/null +++ b/configs/stm32f411e-disco/scripts/f411ve.ld @@ -0,0 +1,120 @@ +/**************************************************************************** + * configs/stm32f411e-disco/scripts/f411ve.ld + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * Librae + * + * 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. + * + ****************************************************************************/ + +/* The STM32F411VE has 512Kb of FLASH beginning at address 0x0800:0000 and + * 128Kb of SRAM beginning at address 0x2000:0000. When booting from FLASH, + * FLASH memory is aliased to address 0x0000:0000 where the code expects to + * begin execution by jumping to the entry point in the 0x0800:0000 address + * range. + */ + +MEMORY +{ + flash (rx) : ORIGIN = 0x08000000, LENGTH = 512K + sram (rwx) : ORIGIN = 0x20000000, LENGTH = 128K +} + +OUTPUT_ARCH(arm) +ENTRY(_stext) +SECTIONS +{ + .text : { + _stext = ABSOLUTE(.); + *(.vectors) + *(.text .text.*) + *(.fixup) + *(.gnu.warning) + *(.rodata .rodata.*) + *(.gnu.linkonce.t.*) + *(.glue_7) + *(.glue_7t) + *(.got) + *(.gcc_except_table) + *(.gnu.linkonce.r.*) + _etext = ABSOLUTE(.); + } > flash + + .init_section : { + _sinit = ABSOLUTE(.); + *(.init_array .init_array.*) + _einit = ABSOLUTE(.); + } > flash + + .ARM.extab : { + *(.ARM.extab*) + } > flash + + __exidx_start = ABSOLUTE(.); + .ARM.exidx : { + *(.ARM.exidx*) + } > flash + __exidx_end = ABSOLUTE(.); + + _eronly = ABSOLUTE(.); + + /* The STM32F103VCT6 has 48Kb of SRAM beginning at the following address */ + + .data : { + _sdata = ABSOLUTE(.); + *(.data .data.*) + *(.gnu.linkonce.d.*) + CONSTRUCTORS + _edata = ABSOLUTE(.); + } > sram AT > flash + + .bss : { + _sbss = ABSOLUTE(.); + *(.bss .bss.*) + *(.gnu.linkonce.b.*) + *(COMMON) + _ebss = ABSOLUTE(.); + } > sram + + /* Stabs debugging sections. */ + + .stab 0 : { *(.stab) } + .stabstr 0 : { *(.stabstr) } + .stab.excl 0 : { *(.stab.excl) } + .stab.exclstr 0 : { *(.stab.exclstr) } + .stab.index 0 : { *(.stab.index) } + .stab.indexstr 0 : { *(.stab.indexstr) } + .comment 0 : { *(.comment) } + .debug_abbrev 0 : { *(.debug_abbrev) } + .debug_info 0 : { *(.debug_info) } + .debug_line 0 : { *(.debug_line) } + .debug_pubnames 0 : { *(.debug_pubnames) } + .debug_aranges 0 : { *(.debug_aranges) } +} diff --git a/configs/stm32f411e-disco/src/Makefile b/configs/stm32f411e-disco/src/Makefile new file mode 100644 index 00000000000..2ee3b640163 --- /dev/null +++ b/configs/stm32f411e-disco/src/Makefile @@ -0,0 +1,45 @@ +############################################################################ +# configs/stm32f411e-disco/src/Makefile +# +# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +-include $(TOPDIR)/Make.defs + +ASRCS = +CSRCS = stm32_boot.c + +ifeq ($(CONFIG_NSH_LIBRARY),y) +CSRCS += stm32_appinit.c +endif + +include $(TOPDIR)/configs/Board.mk diff --git a/configs/stm32f411e-disco/src/stm32_appinit.c b/configs/stm32f411e-disco/src/stm32_appinit.c new file mode 100644 index 00000000000..9228ec0366e --- /dev/null +++ b/configs/stm32f411e-disco/src/stm32_appinit.c @@ -0,0 +1,94 @@ +/**************************************************************************** + * configs/stm32f411e-disco/src/stm32_appinit.c + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * 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. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include +#include + +#include +#include + +#include +#include + +#include + +#include "stm32f411e-disco.h" + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: board_app_initialize + * + * Description: + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface using the command BOARDIOC_INIT. + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. + * + ****************************************************************************/ + +int board_app_initialize(uintptr_t arg) +{ +#ifdef CONFIG_SCHED_INSTRUMENTATION + /* Configure CPU load estimation */ + + cpuload_initialize_once(); +#endif + + return OK; +} diff --git a/configs/fire-stm32v2/src/stm32_watchdog.c b/configs/stm32f411e-disco/src/stm32_boot.c similarity index 52% rename from configs/fire-stm32v2/src/stm32_watchdog.c rename to configs/stm32f411e-disco/src/stm32_boot.c index dd420c342cd..dec40d4b70b 100644 --- a/configs/fire-stm32v2/src/stm32_watchdog.c +++ b/configs/stm32f411e-disco/src/stm32_boot.c @@ -1,8 +1,9 @@ /************************************************************************************ - * configs/fire-stm32v2/src/stm32_watchdog.c + * configs/stm32f411e-disco/src/stm32_boot.c * - * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt + * Librae * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -39,97 +40,80 @@ #include -#include #include -#include +#include +#include + #include -#include "stm32_wdg.h" - -#ifdef CONFIG_WATCHDOG - -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ -/* Configuration *******************************************************************/ -/* Wathdog hardware should be enabled */ - -#if !defined(CONFIG_STM32_WWDG) && !defined(CONFIG_STM32_IWDG) -# warning "One of CONFIG_STM32_WWDG or CONFIG_STM32_IWDG must be defined" -#endif - -/* Select the path to the registered watchdog timer device */ - -#ifndef CONFIG_STM32_WDG_DEVPATH -# ifdef CONFIG_EXAMPLES_WATCHDOG_DEVPATH -# define CONFIG_STM32_WDG_DEVPATH CONFIG_EXAMPLES_WATCHDOG_DEVPATH -# else -# define CONFIG_STM32_WDG_DEVPATH "/dev/watchdog0" -# endif -#endif - -/* Use the un-calibrated LSI frequency if we have nothing better */ - -#if defined(CONFIG_STM32_IWDG) && !defined(CONFIG_STM32_LSIFREQ) -# define CONFIG_STM32_LSIFREQ STM32_LSI_FREQUENCY -#endif - -/* Debug ***************************************************************************/ -/* Non-standard debug that may be enabled just for testing the watchdog timer */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_WATCHDOG -#endif - -#ifdef CONFIG_DEBUG_WATCHDOG -# define wdgdbg dbg -# define wdglldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define wdgvdbg vdbg -# define wdgllvdbg llvdbg -# else -# define wdgvdbg(x...) -# define wdgllvdbg(x...) -# endif -#else -# define wdgdbg(x...) -# define wdglldbg(x...) -# define wdgvdbg(x...) -# define wdgllvdbg(x...) -#endif - -/************************************************************************************ - * Private Functions - ************************************************************************************/ +#include "up_arch.h" +#include "stm32f411e-disco.h" /************************************************************************************ * Public Functions ************************************************************************************/ -/**************************************************************************** - * Name: up_wdginitialize() +/************************************************************************************ + * Name: stm32_boardinitialize * * Description: - * Perform architecuture-specific initialization of the Watchdog hardware. - * This interface must be provided by all configurations using - * apps/examples/watchdog + * All STM32 architectures must provide the following entry point. This entry point + * is called early in the initialization -- after all memory has been configured + * and mapped but before any devices have been initialized. * - ****************************************************************************/ + ************************************************************************************/ -int up_wdginitialize(void) +void stm32_boardinitialize(void) { - /* Initialize tha register the watchdog timer device */ +#ifdef CONFIG_ARCH_LEDS + /* Configure on-board LEDs if LED support has been selected. */ -#if defined(CONFIG_STM32_WWDG) - stm32_wwdginitialize(CONFIG_STM32_WDG_DEVPATH); - return OK; -#elif defined(CONFIG_STM32_IWDG) - stm32_iwdginitialize(CONFIG_STM32_WDG_DEVPATH, CONFIG_STM32_LSIFREQ); - return OK; -#else - return -ENODEV; + board_autoled_initialize(); +#endif + +#if defined(CONFIG_STM32_SPI1) || defined(CONFIG_STM32_SPI2) || defined(CONFIG_STM32_SPI3) + /* Configure SPI chip selects if 1) SP2 is not disabled, and 2) the weak function + * stm32_spidev_initialize() has been brought into the link. + */ + + stm32_spidev_initialize(); +#endif + +#if defined(CONFIG_USBDEV) && defined(CONFIG_STM32_USB) + /* Initialize USB is 1) USBDEV is selected, 2) the USB controller is not + * disabled, and 3) the weak function stm32_usbinitialize() has been brought + * into the build. + */ + + stm32_usbinitialize(); #endif } -#endif /* CONFIG_WATCHDOG */ +/**************************************************************************** + * Name: board_initialize + * + * Description: + * If CONFIG_BOARD_INITIALIZE is selected, then an additional + * initialization call will be performed in the boot-up sequence to a + * function called board_initialize(). board_initialize() will be + * called immediately after up_intiialize() is called and just before the + * initial application is started. This additional initialization phase + * may be used, for example, to initialize board-specific device drivers. + * + ****************************************************************************/ + +#ifdef CONFIG_BOARD_INITIALIZE +void board_initialize(void) +{ +#if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_LIB_BOARDCTL) + /* Perform NSH initialization here instead of from the NSH. This + * alternative NSH initialization is necessary when NSH is ran in user-space + * but the initialization function must run in kernel space. + */ + + board_app_initialize(0); +#endif + +} +#endif diff --git a/configs/spark/src/stm32_watchdog.c b/configs/stm32f411e-disco/src/stm32f411e-disco.h similarity index 55% rename from configs/spark/src/stm32_watchdog.c rename to configs/stm32f411e-disco/src/stm32f411e-disco.h index 1c41b1ddc76..5425f291bd3 100644 --- a/configs/spark/src/stm32_watchdog.c +++ b/configs/stm32f411e-disco/src/stm32f411e-disco.h @@ -1,8 +1,9 @@ /************************************************************************************ - * configs/spark/src/stm32_watchdog.c + * configs/stm32f411e-disco/src/stm32f411e-disco.h * - * Copyright (C) 2013 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Authors: Frank Bennett + * Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -33,105 +34,92 @@ * ************************************************************************************/ +#ifndef __CONFIGS_STM32F411E_DISCO_SRC_STM32F411E_DISCO_H +#define __CONFIGS_STM32F411E_DISCO_SRC_STM32F411E_DISCO_H + /************************************************************************************ * Included Files ************************************************************************************/ #include +#include -#include -#include - -#include -#include - -#include "stm32_wdg.h" - -#ifdef CONFIG_WATCHDOG +#include /************************************************************************************ * Pre-processor Definitions ************************************************************************************/ -/* Configuration *******************************************************************/ -/* Wathdog hardware should be enabled */ +/* Configuration ********************************************************************/ -#if !defined(CONFIG_STM32_WWDG) && !defined(CONFIG_STM32_IWDG) -# warning "One of CONFIG_STM32_WWDG or CONFIG_STM32_IWDG must be defined" -#endif +/* LED. User LD2: the green LED is a user LED connected to Arduino signal D13 + * corresponding to MCU I/O PA5 (pin 21) or PB13 (pin 34) depending on the STM32 + * target. + * + * - When the I/O is HIGH value, the LED is on. + * - When the I/O is LOW, the LED is off. + */ -/* Select the path to the registered watchdog timer device */ +#define GPIO_LD2 \ + (GPIO_PORTD | GPIO_PIN12 | GPIO_OUTPUT_CLEAR | GPIO_OUTPUT | GPIO_PULLUP | \ + GPIO_SPEED_50MHz) -#ifndef CONFIG_STM32_WDG_DEVPATH -# ifdef CONFIG_EXAMPLES_WATCHDOG_DEVPATH -# define CONFIG_STM32_WDG_DEVPATH CONFIG_EXAMPLES_WATCHDOG_DEVPATH -# else -# define CONFIG_STM32_WDG_DEVPATH "/dev/watchdog0" -# endif -#endif +/* Buttons + * + * B1 USER: the user button is connected to the I/O PA0 of the STM32 + * microcontroller. + */ -/* Use the un-calibrated LSI frequency if we have nothing better */ +#define MIN_IRQBUTTON BUTTON_USER +#define MAX_IRQBUTTON BUTTON_USER +#define NUM_IRQBUTTONS 1 -#if defined(CONFIG_STM32_IWDG) && !defined(CONFIG_STM32_LSIFREQ) -# define CONFIG_STM32_LSIFREQ STM32_LSI_FREQUENCY -#endif +#define GPIO_BTN_USER \ + (GPIO_INPUT |GPIO_FLOAT |GPIO_EXTI | GPIO_PORTA | GPIO_PIN0) -/* Debug ***************************************************************************/ -/* Non-standard debug that may be enabled just for testing the watchdog timer */ +/* SPI1 off */ -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_WATCHDOG -#endif - -#ifdef CONFIG_DEBUG_WATCHDOG -# define wdgdbg dbg -# define wdglldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define wdgvdbg vdbg -# define wdgllvdbg llvdbg -# else -# define wdgvdbg(x...) -# define wdgllvdbg(x...) -# endif -#else -# define wdgdbg(x...) -# define wdglldbg(x...) -# define wdgvdbg(x...) -# define wdgllvdbg(x...) -#endif +#define GPIO_SPI1_MOSI_OFF (GPIO_INPUT | GPIO_PULLDOWN | \ + GPIO_PORTA | GPIO_PIN7) +#define GPIO_SPI1_MISO_OFF (GPIO_INPUT | GPIO_PULLDOWN | \ + GPIO_PORTA | GPIO_PIN6) +#define GPIO_SPI1_SCK_OFF (GPIO_INPUT | GPIO_PULLDOWN | \ + GPIO_PORTA | GPIO_PIN5) /************************************************************************************ - * Private Functions + * Public Data ************************************************************************************/ +/* Global driver instances */ + +#ifdef CONFIG_STM32_SPI1 +extern struct spi_dev_s *g_spi1; +#endif +#ifdef CONFIG_STM32_SPI2 +extern struct spi_dev_s *g_spi2; +#endif + /************************************************************************************ * Public Functions ************************************************************************************/ -/**************************************************************************** - * Name: up_wdginitialize() +/************************************************************************************ + * Name: stm32_spidev_initialize * * Description: - * Perform architecuture-specific initialization of the Watchdog hardware. - * This interface must be provided by all configurations using - * apps/examples/watchdog + * Called to configure SPI chip select GPIO pins. * - ****************************************************************************/ + ************************************************************************************/ -int up_wdginitialize(void) -{ - /* Initialize and register the watchdog timer device */ +void stm32_spidev_initialize(void); -#if defined(CONFIG_STM32_WWDG) - stm32_wwdginitialize(CONFIG_STM32_WDG_DEVPATH); - return OK; +/************************************************************************************ + * Name: stm32_usbinitialize + * + * Description: + * Called to setup USB-related GPIO pins. + * + ************************************************************************************/ -#elif defined(CONFIG_STM32_IWDG) - stm32_iwdginitialize(CONFIG_STM32_WDG_DEVPATH, CONFIG_STM32_LSIFREQ); - return OK; +void stm32_usbinitialize(void); -#else - return -ENODEV; -#endif -} - -#endif /* CONFIG_WATCHDOG */ +#endif /* __CONFIGS_STM32F411E_DISCO_SRC_STM32F411E_DISCO_H */ diff --git a/configs/stm32f429i-disco/extflash/defconfig b/configs/stm32f429i-disco/extflash/defconfig index 15e6f97c7ba..f1601ff527a 100644 --- a/configs/stm32f429i-disco/extflash/defconfig +++ b/configs/stm32f429i-disco/extflash/defconfig @@ -76,6 +76,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -94,6 +95,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -115,6 +117,7 @@ CONFIG_ARCH_CORTEXM4=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -123,6 +126,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y CONFIG_ARCH_HAVE_FPU=y # CONFIG_ARCH_HAVE_DPFPU is not set # CONFIG_ARCH_FPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -133,6 +137,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set # CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set @@ -239,6 +244,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -440,13 +446,17 @@ CONFIG_STM32_FSMC_SRAM=y # CONFIG_STM32_TIM13_CAP is not set # CONFIG_STM32_TIM14_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART1_SERIALDRIVER=y +# CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # @@ -757,6 +767,7 @@ CONFIG_RAMMTD_ERASESTATE=0xff # CONFIG_MTD_AT45DB is not set # CONFIG_MTD_M25P is not set # CONFIG_MTD_S25FL1 is not set +# CONFIG_MTD_N25QXXX is not set CONFIG_MTD_SMART=y # CONFIG_SMART_DEV_LOOP is not set CONFIG_MTD_SMART_SECTOR_SIZE=512 @@ -773,6 +784,7 @@ CONFIG_SST25XX_SPIMODE=0 CONFIG_SST25XX_SPIFREQUENCY=20000000 CONFIG_SST25XX_MANUFACTURER=0xBF CONFIG_SST25XX_MEMORY_TYPE=0x25 +# CONFIG_MTD_SST26 is not set # CONFIG_MTD_SST39FV is not set # CONFIG_MTD_W25 is not set # CONFIG_EEPROM is not set @@ -784,33 +796,28 @@ CONFIG_SST25XX_MEMORY_TYPE=0x25 CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -CONFIG_ARCH_HAVE_USART1=y -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART1_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -973,6 +980,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # CONFIG_NETDB_HOSTFILE is not set @@ -1104,6 +1113,7 @@ CONFIG_FSUTILS_MKSMARTFS=y # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/stm32f429i-disco/lcd/defconfig b/configs/stm32f429i-disco/lcd/defconfig index 01f3b48574e..7d399bb3996 100644 --- a/configs/stm32f429i-disco/lcd/defconfig +++ b/configs/stm32f429i-disco/lcd/defconfig @@ -77,6 +77,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -95,6 +96,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -116,6 +118,7 @@ CONFIG_ARCH_CORTEXM4=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -124,6 +127,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y CONFIG_ARCH_HAVE_FPU=y # CONFIG_ARCH_HAVE_DPFPU is not set # CONFIG_ARCH_FPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -134,6 +138,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL=y @@ -240,6 +245,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -440,13 +446,17 @@ CONFIG_STM32_FSMC_SRAM=y # CONFIG_STM32_TIM13_CAP is not set # CONFIG_STM32_TIM14_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART1_SERIALDRIVER=y +# CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # CONFIG_STM32_HAVE_RTC_COUNTER is not set # CONFIG_STM32_HAVE_RTC_SUBSECONDS is not set @@ -756,33 +766,28 @@ CONFIG_LCD_ILI9341_IFACE0_RGB565=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -CONFIG_ARCH_HAVE_USART1=y -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART1_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -869,6 +874,7 @@ CONFIG_NX_LCDDRIVER=y CONFIG_NX_NPLANES=1 CONFIG_NX_BGCOLOR=0x0 # CONFIG_NX_WRITEONLY is not set +# CONFIG_NX_UPDATE is not set # # Supported Pixel Depths @@ -1017,6 +1023,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # @@ -1124,7 +1132,6 @@ CONFIG_EXAMPLES_NX_NOTIFYSIGNO=4 # CONFIG_EXAMPLES_TIFF is not set # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_WEBSERVER is not set -# CONFIG_EXAMPLES_USBSERIAL is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set @@ -1160,6 +1167,7 @@ CONFIG_EXAMPLES_NX_NOTIFYSIGNO=4 # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/stm32f429i-disco/ltdc/defconfig b/configs/stm32f429i-disco/ltdc/defconfig index ca7bc393514..f4eb8234c75 100644 --- a/configs/stm32f429i-disco/ltdc/defconfig +++ b/configs/stm32f429i-disco/ltdc/defconfig @@ -102,6 +102,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -120,6 +121,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -141,6 +143,7 @@ CONFIG_ARCH_CORTEXM4=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -149,6 +152,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y CONFIG_ARCH_HAVE_FPU=y # CONFIG_ARCH_HAVE_DPFPU is not set # CONFIG_ARCH_FPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set # CONFIG_DEBUG_HARDFAULT is not set @@ -160,6 +164,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL=y @@ -266,6 +271,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -468,13 +474,17 @@ CONFIG_STM32_FSMC_SRAM=y # CONFIG_STM32_TIM13_CAP is not set # CONFIG_STM32_TIM14_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART1_SERIALDRIVER=y +# CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # @@ -798,33 +808,28 @@ CONFIG_SPI_CMDDATA=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -CONFIG_ARCH_HAVE_USART1=y -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART1_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -920,6 +925,7 @@ CONFIG_NX_NPLANES=1 CONFIG_NX_BGCOLOR=0x0 # CONFIG_NX_ANTIALIASING is not set # CONFIG_NX_WRITEONLY is not set +# CONFIG_NX_UPDATE is not set # # Supported Pixel Depths @@ -1064,6 +1070,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # CONFIG_NETDB_HOSTFILE is not set @@ -1160,7 +1168,6 @@ CONFIG_EXAMPLES_NX_TOOLBAR_HEIGHT=16 # CONFIG_EXAMPLES_TIFF is not set # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_WEBSERVER is not set -# CONFIG_EXAMPLES_USBSERIAL is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set @@ -1198,6 +1205,7 @@ CONFIG_EXAMPLES_NX_TOOLBAR_HEIGHT=16 # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/stm32f429i-disco/nsh/defconfig b/configs/stm32f429i-disco/nsh/defconfig index db6f5e0e56b..37e776417d6 100644 --- a/configs/stm32f429i-disco/nsh/defconfig +++ b/configs/stm32f429i-disco/nsh/defconfig @@ -76,6 +76,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -94,6 +95,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -115,6 +117,7 @@ CONFIG_ARCH_CORTEXM4=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -123,6 +126,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y CONFIG_ARCH_HAVE_FPU=y # CONFIG_ARCH_HAVE_DPFPU is not set # CONFIG_ARCH_FPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -133,6 +137,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set # CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set @@ -239,6 +244,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -439,13 +445,17 @@ CONFIG_STM32_FSMC_SRAM=y # CONFIG_STM32_TIM13_CAP is not set # CONFIG_STM32_TIM14_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART1_SERIALDRIVER=y +# CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # CONFIG_STM32_HAVE_RTC_COUNTER is not set # CONFIG_STM32_HAVE_RTC_SUBSECONDS is not set @@ -714,33 +724,28 @@ CONFIG_SPI_EXCHANGE=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -CONFIG_ARCH_HAVE_USART1=y -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART1_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -886,6 +891,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # @@ -973,7 +980,6 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # CONFIG_EXAMPLES_TIFF is not set # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_WEBSERVER is not set -# CONFIG_EXAMPLES_USBSERIAL is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set @@ -1009,6 +1015,7 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/stm32f429i-disco/src/stm32_appinit.c b/configs/stm32f429i-disco/src/stm32_appinit.c index 719ebc031ab..29bbb24320d 100644 --- a/configs/stm32f429i-disco/src/stm32_appinit.c +++ b/configs/stm32f429i-disco/src/stm32_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/stm32f429i-disco/src/stm32_appinit.c * - * Copyright (C) 2012, 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2012, 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -121,7 +121,9 @@ * Name: board_app_initialize * * Description: - * Perform architecture specific initialization + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface using the command BOARDIOC_INIT. * * CONFIG_LIB_BOARDCTL=y : * Called from the NSH library @@ -130,9 +132,24 @@ * CONFIG_LIB_BOARDCTL=n : * Called from board_initialize(). * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #if defined(CONFIG_STM32_SPI4) FAR struct spi_dev_s *spi; diff --git a/configs/stm32f429i-disco/src/stm32_boot.c b/configs/stm32f429i-disco/src/stm32_boot.c index 77653432e08..33f855a28ce 100644 --- a/configs/stm32f429i-disco/src/stm32_boot.c +++ b/configs/stm32f429i-disco/src/stm32_boot.c @@ -149,7 +149,7 @@ void board_initialize(void) * but the initialization function must run in kernel space. */ - (void)board_app_initialize(); + (void)board_app_initialize(0); #endif } #endif diff --git a/configs/stm32f429i-disco/usbmsc/defconfig b/configs/stm32f429i-disco/usbmsc/defconfig index a750b9bd063..802ff5915b9 100644 --- a/configs/stm32f429i-disco/usbmsc/defconfig +++ b/configs/stm32f429i-disco/usbmsc/defconfig @@ -76,6 +76,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -94,6 +95,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -115,6 +117,7 @@ CONFIG_ARCH_CORTEXM4=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -123,6 +126,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y CONFIG_ARCH_HAVE_FPU=y # CONFIG_ARCH_HAVE_DPFPU is not set # CONFIG_ARCH_FPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -133,6 +137,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set # CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set @@ -242,6 +247,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -442,13 +448,17 @@ CONFIG_STM32_FSMC_SRAM=y # CONFIG_STM32_TIM13_CAP is not set # CONFIG_STM32_TIM14_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART1_SERIALDRIVER=y +# CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # CONFIG_STM32_HAVE_RTC_COUNTER is not set # CONFIG_STM32_HAVE_RTC_SUBSECONDS is not set @@ -738,33 +748,28 @@ CONFIG_SPI_EXCHANGE=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -CONFIG_ARCH_HAVE_USART1=y -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART1_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -927,6 +932,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # CONFIG_NETDB_HOSTFILE is not set @@ -1054,6 +1061,7 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/stm32f429i-disco/usbnsh/defconfig b/configs/stm32f429i-disco/usbnsh/defconfig index 021da9ecf46..0a9deac0461 100644 --- a/configs/stm32f429i-disco/usbnsh/defconfig +++ b/configs/stm32f429i-disco/usbnsh/defconfig @@ -76,6 +76,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -94,6 +95,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -115,6 +117,7 @@ CONFIG_ARCH_CORTEXM4=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -123,6 +126,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y CONFIG_ARCH_HAVE_FPU=y # CONFIG_ARCH_HAVE_DPFPU is not set # CONFIG_ARCH_FPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -133,6 +137,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set # CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set @@ -239,6 +244,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -439,13 +445,17 @@ CONFIG_STM32_FSMC_SRAM=y # CONFIG_STM32_TIM13_CAP is not set # CONFIG_STM32_TIM14_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART1_SERIALDRIVER=y +# CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # CONFIG_STM32_HAVE_RTC_COUNTER is not set # CONFIG_STM32_HAVE_RTC_SUBSECONDS is not set @@ -722,33 +732,28 @@ CONFIG_SPI_EXCHANGE=y CONFIG_SERIAL=y CONFIG_SERIAL_REMOVABLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -CONFIG_ARCH_HAVE_USART1=y -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART1_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -802,8 +807,8 @@ CONFIG_CDCACM_EPBULKOUT_HSSIZE=512 CONFIG_CDCACM_EPBULKIN=2 CONFIG_CDCACM_EPBULKIN_FSSIZE=64 CONFIG_CDCACM_EPBULKIN_HSSIZE=512 -CONFIG_CDCACM_NWRREQS=4 CONFIG_CDCACM_NRDREQS=4 +CONFIG_CDCACM_NWRREQS=4 CONFIG_CDCACM_BULKIN_REQLEN=96 CONFIG_CDCACM_RXBUFSIZE=256 CONFIG_CDCACM_TXBUFSIZE=256 @@ -942,6 +947,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # CONFIG_NETDB_HOSTFILE is not set @@ -1069,6 +1076,7 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/stm32f4discovery/cxxtest/defconfig b/configs/stm32f4discovery/cxxtest/defconfig index 98e5442adce..7a4a6262adb 100644 --- a/configs/stm32f4discovery/cxxtest/defconfig +++ b/configs/stm32f4discovery/cxxtest/defconfig @@ -80,6 +80,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -98,6 +99,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -119,6 +121,7 @@ CONFIG_ARCH_CORTEXM4=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -127,6 +130,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y CONFIG_ARCH_HAVE_FPU=y # CONFIG_ARCH_HAVE_DPFPU is not set # CONFIG_ARCH_FPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -137,6 +141,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARW is not set # CONFIG_ARMV7M_TOOLCHAIN_ATOLLIC is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDW is not set @@ -247,6 +252,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -442,13 +448,17 @@ CONFIG_STM32_JTAG_SW_ENABLE=y # CONFIG_STM32_TIM13_CAP is not set # CONFIG_STM32_TIM14_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART2_SERIALDRIVER=y +# CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # CONFIG_STM32_HAVE_RTC_COUNTER is not set # CONFIG_STM32_HAVE_RTC_SUBSECONDS is not set @@ -708,33 +718,28 @@ CONFIG_ARCH_HAVE_I2CRESET=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -CONFIG_ARCH_HAVE_USART2=y -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART2_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +CONFIG_USART2_SERIALDRIVER=y +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -868,6 +873,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # @@ -952,7 +959,6 @@ CONFIG_EXAMPLES_CXXTEST_CXXINITIALIZE=y # CONFIG_EXAMPLES_TIFF is not set # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_WEBSERVER is not set -# CONFIG_EXAMPLES_USBSERIAL is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set @@ -988,6 +994,7 @@ CONFIG_EXAMPLES_CXXTEST_CXXINITIALIZE=y # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/stm32f4discovery/elf/defconfig b/configs/stm32f4discovery/elf/defconfig index 673675f373d..d31cbd08ca0 100644 --- a/configs/stm32f4discovery/elf/defconfig +++ b/configs/stm32f4discovery/elf/defconfig @@ -80,6 +80,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -98,6 +99,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -119,6 +121,7 @@ CONFIG_ARCH_CORTEXM4=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y CONFIG_ARMV7M_USEBASEPRI=y CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -127,6 +130,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y CONFIG_ARCH_HAVE_FPU=y # CONFIG_ARCH_HAVE_DPFPU is not set # CONFIG_ARCH_FPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -137,6 +141,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARW is not set # CONFIG_ARMV7M_TOOLCHAIN_ATOLLIC is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDW is not set @@ -248,6 +253,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -443,13 +449,17 @@ CONFIG_STM32_CCMEXCLUDE=y # CONFIG_STM32_TIM13_CAP is not set # CONFIG_STM32_TIM14_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART2_SERIALDRIVER=y +# CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # CONFIG_STM32_HAVE_RTC_COUNTER is not set # CONFIG_STM32_HAVE_RTC_SUBSECONDS is not set @@ -708,33 +718,28 @@ CONFIG_ARCH_HAVE_I2CRESET=y CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -CONFIG_ARCH_HAVE_USART2=y -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART2_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +CONFIG_USART2_SERIALDRIVER=y +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set # CONFIG_SERIAL_OFLOWCONTROL is not set @@ -882,6 +887,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # CONFIG_NETDB_HOSTFILE is not set @@ -969,7 +976,6 @@ CONFIG_EXAMPLES_ELF_DEVPATH="/dev/ram0" # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_WEBSERVER is not set # CONFIG_EXAMPLES_UNIONFS is not set -# CONFIG_EXAMPLES_USBSERIAL is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set @@ -1008,6 +1014,7 @@ CONFIG_EXAMPLES_ELF_DEVPATH="/dev/ram0" # # CONFIG_NETUTILS_CHAT is not set # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/stm32f4discovery/ipv6/defconfig b/configs/stm32f4discovery/ipv6/defconfig index cb9ccd09092..9c276b4e9be 100644 --- a/configs/stm32f4discovery/ipv6/defconfig +++ b/configs/stm32f4discovery/ipv6/defconfig @@ -80,6 +80,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -98,6 +99,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -119,6 +121,7 @@ CONFIG_ARCH_CORTEXM4=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -127,6 +130,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y CONFIG_ARCH_HAVE_FPU=y # CONFIG_ARCH_HAVE_DPFPU is not set # CONFIG_ARCH_FPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -137,6 +141,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARW is not set # CONFIG_ARMV7M_TOOLCHAIN_ATOLLIC is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDW is not set @@ -249,6 +254,7 @@ CONFIG_SDIO_DMA=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -446,14 +452,18 @@ CONFIG_STM32_DMACAPABLE=y # CONFIG_STM32_TIM13_CAP is not set # CONFIG_STM32_TIM14_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART6_SERIALDRIVER=y +# CONFIG_STM32_USART6_1WIREDRIVER is not set # CONFIG_USART6_RS485 is not set # CONFIG_USART6_RXDMA is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # @@ -818,33 +828,28 @@ CONFIG_ETH0_PHY_LAN8720=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -CONFIG_ARCH_HAVE_USART6=y -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART6_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +CONFIG_USART6_SERIALDRIVER=y +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -1116,6 +1121,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set CONFIG_LIBC_NETDB=y # CONFIG_NETDB_HOSTFILE is not set # CONFIG_NETDB_DNSCLIENT is not set @@ -1248,6 +1255,7 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/stm32f4discovery/kostest/defconfig b/configs/stm32f4discovery/kostest/defconfig index b4f0d966edf..c3f18548776 100644 --- a/configs/stm32f4discovery/kostest/defconfig +++ b/configs/stm32f4discovery/kostest/defconfig @@ -85,6 +85,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -103,6 +104,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -124,6 +126,7 @@ CONFIG_ARCH_CORTEXM4=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -132,6 +135,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y CONFIG_ARCH_HAVE_FPU=y # CONFIG_ARCH_HAVE_DPFPU is not set # CONFIG_ARCH_FPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y CONFIG_ARM_MPU=y CONFIG_ARM_MPU_NREGIONS=8 @@ -143,6 +147,7 @@ CONFIG_ARM_MPU_NREGIONS=8 # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARW is not set # CONFIG_ARMV7M_TOOLCHAIN_ATOLLIC is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDW is not set @@ -253,6 +258,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -448,13 +454,17 @@ CONFIG_STM32_JTAG_SW_ENABLE=y # CONFIG_STM32_TIM13_CAP is not set # CONFIG_STM32_TIM14_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART2_SERIALDRIVER=y +# CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # CONFIG_STM32_HAVE_RTC_COUNTER is not set # CONFIG_STM32_HAVE_RTC_SUBSECONDS is not set @@ -716,33 +726,28 @@ CONFIG_ARCH_HAVE_I2CRESET=y CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -CONFIG_ARCH_HAVE_USART2=y -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART2_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +CONFIG_USART2_SERIALDRIVER=y +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set # CONFIG_SERIAL_OFLOWCONTROL is not set @@ -876,6 +881,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # @@ -953,7 +960,6 @@ CONFIG_EXAMPLES_OSTEST_WAITRESULT=y # CONFIG_EXAMPLES_TIFF is not set # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_WEBSERVER is not set -# CONFIG_EXAMPLES_USBSERIAL is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set @@ -989,6 +995,7 @@ CONFIG_EXAMPLES_OSTEST_WAITRESULT=y # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/stm32f4discovery/netnsh/defconfig b/configs/stm32f4discovery/netnsh/defconfig index 13c5d36b556..21fa2ec42ff 100644 --- a/configs/stm32f4discovery/netnsh/defconfig +++ b/configs/stm32f4discovery/netnsh/defconfig @@ -121,6 +121,7 @@ CONFIG_ARCH_CORTEXM4=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -140,6 +141,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARW is not set # CONFIG_ARMV7M_TOOLCHAIN_ATOLLIC is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDW is not set @@ -252,6 +254,7 @@ CONFIG_SDIO_DMA=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -449,14 +452,18 @@ CONFIG_STM32_DMACAPABLE=y # CONFIG_STM32_TIM13_CAP is not set # CONFIG_STM32_TIM14_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART6_SERIALDRIVER=y +# CONFIG_STM32_USART6_1WIREDRIVER is not set # CONFIG_USART6_RS485 is not set # CONFIG_USART6_RXDMA is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # @@ -823,33 +830,28 @@ CONFIG_ETH0_PHY_LAN8720=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -CONFIG_ARCH_HAVE_USART6=y -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART6_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +CONFIG_USART6_SERIALDRIVER=y +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -1266,6 +1268,7 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # CONFIG_NETUTILS_CODECS is not set # CONFIG_NETUTILS_DHCPC is not set # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/stm32f4discovery/nsh/defconfig b/configs/stm32f4discovery/nsh/defconfig index a7a485a6d48..e57c9fd05e3 100644 --- a/configs/stm32f4discovery/nsh/defconfig +++ b/configs/stm32f4discovery/nsh/defconfig @@ -80,6 +80,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -98,6 +99,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -119,6 +121,7 @@ CONFIG_ARCH_CORTEXM4=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -127,6 +130,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y CONFIG_ARCH_HAVE_FPU=y # CONFIG_ARCH_HAVE_DPFPU is not set # CONFIG_ARCH_FPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -137,6 +141,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARW is not set # CONFIG_ARMV7M_TOOLCHAIN_ATOLLIC is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDW is not set @@ -247,6 +252,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -443,13 +449,17 @@ CONFIG_STM32_JTAG_SW_ENABLE=y # CONFIG_STM32_TIM13_CAP is not set # CONFIG_STM32_TIM14_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART2_SERIALDRIVER=y +# CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # @@ -723,33 +733,28 @@ CONFIG_SPI_EXCHANGE=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -CONFIG_ARCH_HAVE_USART2=y -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART2_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +CONFIG_USART2_SERIALDRIVER=y +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -901,6 +906,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # CONFIG_NETDB_HOSTFILE is not set @@ -989,7 +996,6 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # CONFIG_EXAMPLES_TIFF is not set # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_WEBSERVER is not set -# CONFIG_EXAMPLES_USBSERIAL is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set @@ -1027,6 +1033,7 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/stm32f4discovery/nxlines/defconfig b/configs/stm32f4discovery/nxlines/defconfig index 32ee8e04f23..284eef1c4cf 100644 --- a/configs/stm32f4discovery/nxlines/defconfig +++ b/configs/stm32f4discovery/nxlines/defconfig @@ -80,6 +80,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -98,6 +99,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -119,6 +121,7 @@ CONFIG_ARCH_CORTEXM4=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -127,6 +130,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y CONFIG_ARCH_HAVE_FPU=y # CONFIG_ARCH_HAVE_DPFPU is not set # CONFIG_ARCH_FPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -137,6 +141,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARW is not set # CONFIG_ARMV7M_TOOLCHAIN_ATOLLIC is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDW is not set @@ -247,6 +252,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -444,13 +450,17 @@ CONFIG_STM32_JTAG_SW_ENABLE=y # CONFIG_STM32_TIM13_CAP is not set # CONFIG_STM32_TIM14_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART2_SERIALDRIVER=y +# CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # @@ -763,33 +773,28 @@ CONFIG_LCD_LANDSCAPE=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -CONFIG_ARCH_HAVE_USART2=y -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART2_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +CONFIG_USART2_SERIALDRIVER=y +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -883,6 +888,7 @@ CONFIG_NX_LCDDRIVER=y CONFIG_NX_NPLANES=1 CONFIG_NX_BGCOLOR=0x0 # CONFIG_NX_WRITEONLY is not set +# CONFIG_NX_UPDATE is not set # # Supported Pixel Depths @@ -1028,6 +1034,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # CONFIG_NETDB_HOSTFILE is not set @@ -1121,7 +1129,6 @@ CONFIG_EXAMPLES_NXLINES_BPP=16 # CONFIG_EXAMPLES_TIFF is not set # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_WEBSERVER is not set -# CONFIG_EXAMPLES_USBSERIAL is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set @@ -1159,6 +1166,7 @@ CONFIG_EXAMPLES_NXLINES_BPP=16 # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/stm32f4discovery/pm/defconfig b/configs/stm32f4discovery/pm/defconfig index 2d646c89862..f9444cbdbeb 100644 --- a/configs/stm32f4discovery/pm/defconfig +++ b/configs/stm32f4discovery/pm/defconfig @@ -80,6 +80,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -98,6 +99,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -119,6 +121,7 @@ CONFIG_ARCH_CORTEXM4=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -127,6 +130,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y CONFIG_ARCH_HAVE_FPU=y # CONFIG_ARCH_HAVE_DPFPU is not set # CONFIG_ARCH_FPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -137,6 +141,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARW is not set # CONFIG_ARMV7M_TOOLCHAIN_ATOLLIC is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDW is not set @@ -247,6 +252,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -443,13 +449,17 @@ CONFIG_STM32_JTAG_SW_ENABLE=y # CONFIG_STM32_TIM13_CAP is not set # CONFIG_STM32_TIM14_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART2_SERIALDRIVER=y +# CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # CONFIG_STM32_HAVE_RTC_COUNTER is not set # CONFIG_STM32_HAVE_RTC_SUBSECONDS is not set @@ -700,6 +710,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y CONFIG_RTC=y CONFIG_RTC_DATETIME=y CONFIG_RTC_ALARM=y +CONFIG_RTC_NALARMS=1 # CONFIG_RTC_DRIVER is not set # CONFIG_RTC_EXTERNAL is not set # CONFIG_WATCHDOG is not set @@ -723,39 +734,52 @@ CONFIG_RTC_ALARM=y # CONFIG_EEPROM is not set # CONFIG_PIPES is not set CONFIG_PM=y +CONFIG_PM_SLICEMS=100 +CONFIG_PM_NDOMAINS=1 +CONFIG_PM_MEMORY=2 +CONFIG_PM_COEFN=1 +CONFIG_PM_COEF1=1 +CONFIG_PM_COEF2=1 +CONFIG_PM_COEF3=1 +CONFIG_PM_COEF4=1 +CONFIG_PM_COEF5=1 +CONFIG_PM_IDLEENTER_THRESH=1 +CONFIG_PM_IDLEEXIT_THRESH=2 +CONFIG_PM_IDLEENTER_COUNT=30 +CONFIG_PM_STANDBYENTER_THRESH=1 +CONFIG_PM_STANDBYEXIT_THRESH=2 +CONFIG_PM_STANDBYENTER_COUNT=50 +CONFIG_PM_SLEEPENTER_THRESH=1 +CONFIG_PM_SLEEPEXIT_THRESH=2 +CONFIG_PM_SLEEPENTER_COUNT=70 # CONFIG_POWER is not set # CONFIG_SENSORS is not set # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -CONFIG_ARCH_HAVE_USART2=y -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART2_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +CONFIG_USART2_SERIALDRIVER=y +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -907,6 +931,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # CONFIG_NETDB_HOSTFILE is not set @@ -996,7 +1022,6 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # CONFIG_EXAMPLES_TIFF is not set # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_WEBSERVER is not set -# CONFIG_EXAMPLES_USBSERIAL is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set @@ -1034,6 +1059,7 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/stm32f4discovery/posix_spawn/defconfig b/configs/stm32f4discovery/posix_spawn/defconfig index dc2c60aacb7..2eaef404731 100644 --- a/configs/stm32f4discovery/posix_spawn/defconfig +++ b/configs/stm32f4discovery/posix_spawn/defconfig @@ -80,6 +80,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -98,6 +99,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -119,6 +121,7 @@ CONFIG_ARCH_CORTEXM4=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -127,6 +130,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y CONFIG_ARCH_HAVE_FPU=y # CONFIG_ARCH_HAVE_DPFPU is not set # CONFIG_ARCH_FPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -137,6 +141,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARW is not set # CONFIG_ARMV7M_TOOLCHAIN_ATOLLIC is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDW is not set @@ -248,6 +253,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -443,13 +449,17 @@ CONFIG_STM32_CCMEXCLUDE=y # CONFIG_STM32_TIM13_CAP is not set # CONFIG_STM32_TIM14_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART2_SERIALDRIVER=y +# CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # CONFIG_STM32_HAVE_RTC_COUNTER is not set # CONFIG_STM32_HAVE_RTC_SUBSECONDS is not set @@ -708,33 +718,28 @@ CONFIG_ARCH_HAVE_I2CRESET=y CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -CONFIG_ARCH_HAVE_USART2=y -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART2_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +CONFIG_USART2_SERIALDRIVER=y +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set # CONFIG_SERIAL_OFLOWCONTROL is not set @@ -885,6 +890,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # CONFIG_NETDB_HOSTFILE is not set @@ -971,7 +978,6 @@ CONFIG_EXAMPLES_POSIXSPAWN_DEVPATH="/dev/ram0" # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_WEBSERVER is not set # CONFIG_EXAMPLES_UNIONFS is not set -# CONFIG_EXAMPLES_USBSERIAL is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set @@ -1010,6 +1016,7 @@ CONFIG_EXAMPLES_POSIXSPAWN_DEVPATH="/dev/ram0" # # CONFIG_NETUTILS_CHAT is not set # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/stm32f4discovery/rgbled/defconfig b/configs/stm32f4discovery/rgbled/defconfig index 91e1e9dd0f5..27023676715 100644 --- a/configs/stm32f4discovery/rgbled/defconfig +++ b/configs/stm32f4discovery/rgbled/defconfig @@ -102,6 +102,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -120,6 +121,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -141,6 +143,7 @@ CONFIG_ARCH_CORTEXM4=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -149,6 +152,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y CONFIG_ARCH_HAVE_FPU=y # CONFIG_ARCH_HAVE_DPFPU is not set # CONFIG_ARCH_FPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set # CONFIG_DEBUG_HARDFAULT is not set @@ -160,6 +164,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set # CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set @@ -266,6 +271,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -475,13 +481,17 @@ CONFIG_STM32_TIM3_CHMODE=0 # CONFIG_STM32_TIM13_CAP is not set # CONFIG_STM32_TIM14_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART2_SERIALDRIVER=y +# CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # @@ -757,33 +767,28 @@ CONFIG_RGBLED=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -CONFIG_ARCH_HAVE_USART2=y -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART2_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +CONFIG_USART2_SERIALDRIVER=y +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -936,6 +941,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # CONFIG_NETDB_HOSTFILE is not set @@ -1027,7 +1034,6 @@ CONFIG_EXAMPLES_RGBLED_STACKSIZE=2048 # CONFIG_EXAMPLES_TIFF is not set # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_WEBSERVER is not set -# CONFIG_EXAMPLES_USBSERIAL is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set @@ -1065,6 +1071,7 @@ CONFIG_EXAMPLES_RGBLED_STACKSIZE=2048 # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/stm32f4discovery/src/Makefile b/configs/stm32f4discovery/src/Makefile index b607925bce1..58d3e7c4877 100644 --- a/configs/stm32f4discovery/src/Makefile +++ b/configs/stm32f4discovery/src/Makefile @@ -92,10 +92,6 @@ ifeq ($(CONFIG_QENCODER),y) CSRCS += stm32_qencoder.c endif -ifeq ($(CONFIG_WATCHDOG),y) -CSRCS += stm32_watchdog.c -endif - ifeq ($(CONFIG_NSH_LIBRARY),y) CSRCS += stm32_appinit.c endif diff --git a/configs/stm32f4discovery/src/stm32_appinit.c b/configs/stm32f4discovery/src/stm32_appinit.c index 4ce0e55bdb0..75e635988ca 100644 --- a/configs/stm32f4discovery/src/stm32_appinit.c +++ b/configs/stm32f4discovery/src/stm32_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/stm32f4discovery/src/stm32_appinit.c * - * Copyright (C) 2012, 2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2012, 2014, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -59,12 +59,28 @@ * Name: board_app_initialize * * Description: - * Perform architecture-specific initialization (if this was not already - * done by board_initialize(); + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface using the command BOARDIOC_INIT. + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #ifdef CONFIG_BMP180 stm32_bmp180initialize("/dev/press0"); diff --git a/configs/stm32f4discovery/src/stm32_boot.c b/configs/stm32f4discovery/src/stm32_boot.c index 888317b1cee..41eb13dcc72 100644 --- a/configs/stm32f4discovery/src/stm32_boot.c +++ b/configs/stm32f4discovery/src/stm32_boot.c @@ -104,10 +104,10 @@ void stm32_boardinitialize(void) } #endif -#ifdef CONFIG_CANUTILS_UAVCAN +#ifdef CONFIG_CANUTILS_LIBUAVCAN (void)stm32_configgpio(GPIO_CAN1_RX); (void)stm32_configgpio(GPIO_CAN1_TX); -# if CONFIG_UAVCAN_STM32_NUM_IFACES > 1 +# if CONFIG_LIBUAVCAN_STM32_NUM_IFACES > 1 (void)stm32_configgpio(GPIO_CAN2_RX); (void)stm32_configgpio(GPIO_CAN2_TX); # endif diff --git a/configs/stm32f4discovery/src/stm32_watchdog.c b/configs/stm32f4discovery/src/stm32_watchdog.c deleted file mode 100644 index b238bc5d43b..00000000000 --- a/configs/stm32f4discovery/src/stm32_watchdog.c +++ /dev/null @@ -1,135 +0,0 @@ -/************************************************************************************ - * configs/stm32f4discovery/src/stm32_watchdog.c - * - * Copyright (C) 2012 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * 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. - * - ************************************************************************************/ - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include -#include - -#include -#include - -#include "stm32_wdg.h" - -#ifdef CONFIG_WATCHDOG - -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ -/* Configuration *******************************************************************/ -/* Wathdog hardware should be enabled */ - -#if !defined(CONFIG_STM32_WWDG) && !defined(CONFIG_STM32_IWDG) -# warning "One of CONFIG_STM32_WWDG or CONFIG_STM32_IWDG must be defined" -#endif - -/* Select the path to the registered watchdog timer device */ - -#ifndef CONFIG_STM32_WDG_DEVPATH -# ifdef CONFIG_EXAMPLES_WATCHDOG_DEVPATH -# define CONFIG_STM32_WDG_DEVPATH CONFIG_EXAMPLES_WATCHDOG_DEVPATH -# else -# define CONFIG_STM32_WDG_DEVPATH "/dev/watchdog0" -# endif -#endif - -/* Use the un-calibrated LSI frequency if we have nothing better */ - -#if defined(CONFIG_STM32_IWDG) && !defined(CONFIG_STM32_LSIFREQ) -# define CONFIG_STM32_LSIFREQ STM32_LSI_FREQUENCY -#endif - -/* Debug ***************************************************************************/ -/* Non-standard debug that may be enabled just for testing the watchdog timer */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_WATCHDOG -#endif - -#ifdef CONFIG_DEBUG_WATCHDOG -# define wdgdbg dbg -# define wdglldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define wdgvdbg vdbg -# define wdgllvdbg llvdbg -# else -# define wdgvdbg(x...) -# define wdgllvdbg(x...) -# endif -#else -# define wdgdbg(x...) -# define wdglldbg(x...) -# define wdgvdbg(x...) -# define wdgllvdbg(x...) -#endif - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -/**************************************************************************** - * Name: up_wdginitialize() - * - * Description: - * Perform architecuture-specific initialization of the Watchdog hardware. - * This interface must be provided by all configurations using - * apps/examples/watchdog - * - ****************************************************************************/ - -int up_wdginitialize(void) -{ - /* Initialize tha register the watchdog timer device */ - -#if defined(CONFIG_STM32_WWDG) - stm32_wwdginitialize(CONFIG_STM32_WDG_DEVPATH); - return OK; -#elif defined(CONFIG_STM32_IWDG) - stm32_iwdginitialize(CONFIG_STM32_WDG_DEVPATH, CONFIG_STM32_LSIFREQ); - return OK; -#else - return -ENODEV; -#endif -} - -#endif /* CONFIG_WATCHDOG */ diff --git a/configs/stm32f4discovery/uavcan/defconfig b/configs/stm32f4discovery/uavcan/defconfig index 1bc92535c77..97db93590ef 100644 --- a/configs/stm32f4discovery/uavcan/defconfig +++ b/configs/stm32f4discovery/uavcan/defconfig @@ -76,6 +76,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -94,6 +95,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -115,6 +117,7 @@ CONFIG_ARCH_CORTEXM4=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -123,6 +126,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y CONFIG_ARCH_HAVE_FPU=y # CONFIG_ARCH_HAVE_DPFPU is not set # CONFIG_ARCH_FPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -133,6 +137,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARL is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set # CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set @@ -238,6 +243,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -813,6 +819,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # @@ -841,37 +849,37 @@ CONFIG_HAVE_CXXINITIALIZE=y # # CAN Utilities # -CONFIG_CANUTILS_UAVCAN=y -CONFIG_UAVCAN_LIBUAVCAN_URL="https://github.com/UAVCAN/libuavcan/archive" -CONFIG_UAVCAN_LIBUAVCAN_VERSION="b04396ace50155573e545ed9bf2fb09964ee2367" -CONFIG_UAVCAN_DSDL_URL="https://github.com/UAVCAN/dsdl/archive" -CONFIG_UAVCAN_DSDL_VERSION="9804a3e6972825586be252ce08dd899f44994b14" -CONFIG_UAVCAN_PYUAVCAN_URL="https://github.com/UAVCAN/pyuavcan/archive" -CONFIG_UAVCAN_PYUAVCAN_VERSION="c58477a644d20ccf95a20c151f3a0402f271c3b8" -CONFIG_UAVCAN_STM32_NUM_IFACES=1 -# CONFIG_UAVCAN_STM32_TIM2 is not set -# CONFIG_UAVCAN_STM32_TIM3 is not set -# CONFIG_UAVCAN_STM32_TIM4 is not set -# CONFIG_UAVCAN_STM32_TIM5 is not set -CONFIG_UAVCAN_STM32_TIM6=y -# CONFIG_UAVCAN_STM32_TIM7 is not set -CONFIG_UAVCAN_CPP03=y -# CONFIG_UAVCAN_CPP11 is not set -# CONFIG_UAVCAN_DEBUG is not set -# CONFIG_UAVCAN_EXCEPTIONS is not set -# CONFIG_UAVCAN_TINY is not set -# CONFIG_UAVCAN_NO_GLOBAL_DATA_TYPE_REGISTRY is not set -# CONFIG_UAVCAN_IMPLEMENT_PLACEMENT_NEW is not set -# CONFIG_UAVCAN_USE_EXTERNAL_SNPRINTF is not set -# CONFIG_UAVCAN_USE_EXTERNAL_FLOAT16_CONVERSION is not set -# CONFIG_UAVCAN_NO_ASSERTIONS is not set -CONFIG_UAVCAN_MEM_POOL_BLOCK_SIZE=0 -CONFIG_UAVCAN_FLOAT_COMPARISON_EPSILON_MULT=0 -CONFIG_UAVCAN_MAX_CAN_ACCEPTANCE_FILTERS=0 -CONFIG_UAVCAN_MAX_NETWORK_SIZE_HINT=0 -CONFIG_UAVCAN_RX_QUEUE_CAPACITY=0 -CONFIG_UAVCAN_BIT_RATE=0 -CONFIG_UAVCAN_INIT_RETRIES=0 +CONFIG_CANUTILS_LIBUAVCAN=y +CONFIG_LIBUAVCAN_URL="https://github.com/UAVCAN/libuavcan/archive" +CONFIG_LIBUAVCAN_VERSION="b04396ace50155573e545ed9bf2fb09964ee2367" +CONFIG_LIBUAVCAN_DSDL_URL="https://github.com/UAVCAN/dsdl/archive" +CONFIG_LIBUAVCAN_DSDL_VERSION="9804a3e6972825586be252ce08dd899f44994b14" +CONFIG_LIBUAVCAN_PYUAVCAN_URL="https://github.com/UAVCAN/pyuavcan/archive" +CONFIG_LIBUAVCAN_PYUAVCAN_VERSION="c58477a644d20ccf95a20c151f3a0402f271c3b8" +CONFIG_LIBUAVCAN_STM32_NUM_IFACES=1 +CONFIG_LIBUAVCAN_STM32_TIM2=y +# CONFIG_LIBUAVCAN_STM32_TIM3 is not set +# CONFIG_LIBUAVCAN_STM32_TIM4 is not set +# CONFIG_LIBUAVCAN_STM32_TIM5 is not set +# CONFIG_LIBUAVCAN_STM32_TIM6 is not set +# CONFIG_LIBUAVCAN_STM32_TIM7 is not set +CONFIG_LIBUAVCAN_CPP03=y +# CONFIG_LIBUAVCAN_CPP11 is not set +# CONFIG_LIBUAVCAN_DEBUG is not set +# CONFIG_LIBUAVCAN_EXCEPTIONS is not set +# CONFIG_LIBUAVCAN_TINY is not set +# CONFIG_LIBUAVCAN_NO_GLOBAL_DATA_TYPE_REGISTRY is not set +# CONFIG_LIBUAVCAN_IMPLEMENT_PLACEMENT_NEW is not set +# CONFIG_LIBUAVCAN_USE_EXTERNAL_SNPRINTF is not set +# CONFIG_LIBUAVCAN_USE_EXTERNAL_FLOAT16_CONVERSION is not set +# CONFIG_LIBUAVCAN_NO_ASSERTIONS is not set +CONFIG_LIBUAVCAN_MEM_POOL_BLOCK_SIZE=0 +CONFIG_LIBUAVCAN_FLOAT_COMPARISON_EPSILON_MULT=0 +CONFIG_LIBUAVCAN_MAX_CAN_ACCEPTANCE_FILTERS=0 +CONFIG_LIBUAVCAN_MAX_NETWORK_SIZE_HINT=0 +CONFIG_LIBUAVCAN_RX_QUEUE_CAPACITY=0 +CONFIG_LIBUAVCAN_BIT_RATE=0 +CONFIG_LIBUAVCAN_INIT_RETRIES=0 # # Examples @@ -929,7 +937,6 @@ CONFIG_EXAMPLES_UAVCAN_NODE_MEM_POOL_SIZE=4096 CONFIG_EXAMPLES_UAVCAN_NODE_ID=1 CONFIG_EXAMPLES_UAVCAN_NODE_NAME="org.nuttx.apps.examples.uavcan" # CONFIG_EXAMPLES_WEBSERVER is not set -# CONFIG_EXAMPLES_USBSERIAL is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set @@ -966,6 +973,7 @@ CONFIG_EXAMPLES_UAVCAN_NODE_NAME="org.nuttx.apps.examples.uavcan" # # CONFIG_NETUTILS_CHAT is not set # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/stm32f4discovery/usbnsh/defconfig b/configs/stm32f4discovery/usbnsh/defconfig index b5ce28b6894..66134476b76 100644 --- a/configs/stm32f4discovery/usbnsh/defconfig +++ b/configs/stm32f4discovery/usbnsh/defconfig @@ -80,6 +80,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -98,6 +99,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -119,6 +121,7 @@ CONFIG_ARCH_CORTEXM4=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -127,6 +130,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y CONFIG_ARCH_HAVE_FPU=y # CONFIG_ARCH_HAVE_DPFPU is not set # CONFIG_ARCH_FPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -137,6 +141,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARW is not set # CONFIG_ARMV7M_TOOLCHAIN_ATOLLIC is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDW is not set @@ -247,6 +252,7 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -443,13 +449,17 @@ CONFIG_STM32_JTAG_SW_ENABLE=y # CONFIG_STM32_TIM13_CAP is not set # CONFIG_STM32_TIM14_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART2_SERIALDRIVER=y +# CONFIG_STM32_USART2_1WIREDRIVER is not set # CONFIG_USART2_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # @@ -731,33 +741,28 @@ CONFIG_SPI_EXCHANGE=y CONFIG_SERIAL=y CONFIG_SERIAL_REMOVABLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -CONFIG_ARCH_HAVE_USART2=y -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART2_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +CONFIG_USART2_SERIALDRIVER=y +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -811,8 +816,8 @@ CONFIG_CDCACM_EPBULKOUT_HSSIZE=512 CONFIG_CDCACM_EPBULKIN=2 CONFIG_CDCACM_EPBULKIN_FSSIZE=64 CONFIG_CDCACM_EPBULKIN_HSSIZE=512 -CONFIG_CDCACM_NWRREQS=4 CONFIG_CDCACM_NRDREQS=4 +CONFIG_CDCACM_NWRREQS=4 CONFIG_CDCACM_BULKIN_REQLEN=96 CONFIG_CDCACM_RXBUFSIZE=256 CONFIG_CDCACM_TXBUFSIZE=256 @@ -950,6 +955,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # CONFIG_NETDB_HOSTFILE is not set @@ -1076,6 +1083,7 @@ CONFIG_EXAMPLES_NSH_CXXINITIALIZE=y # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/stm32f4discovery/winbuild/defconfig b/configs/stm32f4discovery/winbuild/defconfig index 9fd11d2f18a..079f197c1ff 100644 --- a/configs/stm32f4discovery/winbuild/defconfig +++ b/configs/stm32f4discovery/winbuild/defconfig @@ -658,33 +658,32 @@ CONFIG_ARCH_HAVE_I2CRESET=y CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -CONFIG_ARCH_HAVE_USART2=y -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +CONFIG_USART2_SERIALDRIVER=y +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration # -CONFIG_USART2_ISUART=y CONFIG_MCU_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set # CONFIG_SERIAL_OFLOWCONTROL is not set diff --git a/configs/stm32f746g-disco/knsh/defconfig b/configs/stm32f746g-disco/knsh/defconfig index 94ee604860a..6edc370a236 100644 --- a/configs/stm32f746g-disco/knsh/defconfig +++ b/configs/stm32f746g-disco/knsh/defconfig @@ -494,33 +494,32 @@ CONFIG_SPI_EXCHANGE=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -CONFIG_ARCH_HAVE_USART6=y -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +CONFIG_USART6_SERIALDRIVER=y +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration # -CONFIG_USART6_ISUART=y CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set diff --git a/configs/stm32f746g-disco/netnsh/defconfig b/configs/stm32f746g-disco/netnsh/defconfig index 3d0180bd2ce..efd988abdf9 100644 --- a/configs/stm32f746g-disco/netnsh/defconfig +++ b/configs/stm32f746g-disco/netnsh/defconfig @@ -553,33 +553,32 @@ CONFIG_ETH0_PHY_LAN8742A=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -CONFIG_ARCH_HAVE_USART6=y -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +CONFIG_USART6_SERIALDRIVER=y +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration # -CONFIG_USART6_ISUART=y CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set diff --git a/configs/stm32f746g-disco/nsh/defconfig b/configs/stm32f746g-disco/nsh/defconfig index b73ab07398d..fdac7f8dd68 100644 --- a/configs/stm32f746g-disco/nsh/defconfig +++ b/configs/stm32f746g-disco/nsh/defconfig @@ -486,33 +486,32 @@ CONFIG_SPI_EXCHANGE=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -CONFIG_ARCH_HAVE_USART6=y -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +CONFIG_USART6_SERIALDRIVER=y +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration # -CONFIG_USART6_ISUART=y CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set diff --git a/configs/stm32f746g-disco/src/stm32_appinitialize.c b/configs/stm32f746g-disco/src/stm32_appinitialize.c index aa2818899ab..88d62fc154d 100644 --- a/configs/stm32f746g-disco/src/stm32_appinitialize.c +++ b/configs/stm32f746g-disco/src/stm32_appinitialize.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/stm32f746g-disco/src/stm32_appinitilaize.c * - * Copyright (C) 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -42,10 +42,6 @@ #include "stm32_ccm.h" #include "stm32f746g-disco.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -58,9 +54,24 @@ * called directly from application code, but only indirectly via the * (non-standard) boardctl() interface using the command BOARDIOC_INIT. * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #ifdef CONFIG_FS_PROCFS int ret; diff --git a/configs/stm32f746g-disco/src/stm32_boot.c b/configs/stm32f746g-disco/src/stm32_boot.c index 381925dee1f..c5954af1771 100644 --- a/configs/stm32f746g-disco/src/stm32_boot.c +++ b/configs/stm32f746g-disco/src/stm32_boot.c @@ -121,7 +121,7 @@ void board_initialize(void) * but the initialization function must run in kernel space. */ - (void)board_app_initialize(); + (void)board_app_initialize(0); #endif } #endif diff --git a/configs/stm32l476vg-disco/README.txt b/configs/stm32l476vg-disco/README.txt index f6f0479ad54..e8355e79bc8 100644 --- a/configs/stm32l476vg-disco/README.txt +++ b/configs/stm32l476vg-disco/README.txt @@ -379,7 +379,7 @@ Serial Consoles To configure USART1 as the console: CONFIG_STM32_USART1=y - CONFIG_USART1_ISUART=y + CONFIG_USART1_SERIALDRIVER=y CONFIG_USART1_SERIAL_CONSOLE=y CONFIG_USART1_RXBUFSIZE=256 CONFIG_USART1_TXBUFSIZE=256 @@ -418,7 +418,7 @@ Serial Consoles To configure USART2 as the console: CONFIG_STM32_USART2=y - CONFIG_USART2_ISUART=y + CONFIG_USART2_SERIALDRIVER=y CONFIG_USART2_SERIAL_CONSOLE=y CONFIG_USART2_RXBUFSIZE=256 CONFIG_USART2_TXBUFSIZE=256 @@ -439,7 +439,7 @@ Serial Consoles To configure USART6 as the console: CONFIG_STM32_USART6=y - CONFIG_USART6_ISUART=y + CONFIG_USART6_SERIALDRIVER=y CONFIG_USART6_SERIAL_CONSOLE=y CONFIG_USART6_RXBUFSIZE=256 CONFIG_USART6_TXBUFSIZE=256 diff --git a/configs/stm32l476vg-disco/include/board.h b/configs/stm32l476vg-disco/include/board.h index c3e1efd354c..c05f74a7e5d 100644 --- a/configs/stm32l476vg-disco/include/board.h +++ b/configs/stm32l476vg-disco/include/board.h @@ -115,8 +115,8 @@ * */ -#define GPIO_I2C1_SCL GPIO_I2C1_SCL_1 -#define GPIO_I2C1_SDA GPIO_I2C1_SDA_1 +#define GPIO_I2C1_SCL (GPIO_I2C1_SCL_1|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET) +#define GPIO_I2C1_SDA (GPIO_I2C1_SDA_1|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET) #define GPIO_I2C1_SCL_GPIO \ (GPIO_OUTPUT|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN6) #define GPIO_I2C1_SDA_GPIO \ @@ -126,8 +126,8 @@ #if 0 -#define GPIO_I2C2_SCL GPIO_I2C2_SCL_1 -#define GPIO_I2C2_SDA GPIO_I2C2_SDA_1 +#define GPIO_I2C2_SCL (GPIO_I2C2_SCL_1|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET) +#define GPIO_I2C2_SDA (GPIO_I2C2_SDA_1|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET) #define GPIO_I2C2_SCL_GPIO \ (GPIO_OUTPUT|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN10) #define GPIO_I2C2_SDA_GPIO \ diff --git a/configs/stm32l476vg-disco/nsh/defconfig b/configs/stm32l476vg-disco/nsh/defconfig index 5c5043b7a9e..32b7bb69b07 100644 --- a/configs/stm32l476vg-disco/nsh/defconfig +++ b/configs/stm32l476vg-disco/nsh/defconfig @@ -612,33 +612,32 @@ CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set CONFIG_SERIAL_REMOVABLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -CONFIG_ARCH_HAVE_USART2=y -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +CONFIG_USART2_SERIALDRIVER=y +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration # -CONFIG_USART2_ISUART=y CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set diff --git a/configs/stm32l476vg-disco/src/stm32_appinit.c b/configs/stm32l476vg-disco/src/stm32_appinit.c index 8454e9bd70e..9155faff139 100644 --- a/configs/stm32l476vg-disco/src/stm32_appinit.c +++ b/configs/stm32l476vg-disco/src/stm32_appinit.c @@ -123,12 +123,29 @@ FAR struct mtd_dev_s *g_mtd_fs; * Name: board_app_initialize * * Description: - * Application initialization stub for boardctl() + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface using the command BOARDIOC_INIT. + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. * ****************************************************************************/ #ifdef CONFIG_LIB_BOARDCTL -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #ifdef HAVE_RTC_DRIVER FAR struct rtc_lowerhalf_s *rtclower; diff --git a/configs/stm32l476vg-disco/src/stm32_boot.c b/configs/stm32l476vg-disco/src/stm32_boot.c index 336b578184c..e3711ec9bad 100644 --- a/configs/stm32l476vg-disco/src/stm32_boot.c +++ b/configs/stm32l476vg-disco/src/stm32_boot.c @@ -113,7 +113,7 @@ void board_initialize(void) */ #if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_NSH_ARCHINIT) - board_app_initialize(); + board_app_initialize(0); #endif } #endif diff --git a/configs/stm32ldiscovery/nsh/defconfig b/configs/stm32ldiscovery/nsh/defconfig index 68f9a4cb725..d497e5e5d92 100644 --- a/configs/stm32ldiscovery/nsh/defconfig +++ b/configs/stm32ldiscovery/nsh/defconfig @@ -80,6 +80,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -98,6 +99,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -119,6 +121,7 @@ CONFIG_ARCH_CORTEXM3=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -126,6 +129,7 @@ CONFIG_ARCH_HAVE_CMNVECTOR=y # CONFIG_ARMV7M_LAZYFPU is not set # CONFIG_ARCH_HAVE_FPU is not set # CONFIG_ARCH_HAVE_DPFPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -136,6 +140,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARW is not set # CONFIG_ARMV7M_TOOLCHAIN_ATOLLIC is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDW is not set @@ -246,6 +251,7 @@ CONFIG_ARCH_CHIP_STM32L152RB=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -412,13 +418,17 @@ CONFIG_STM32_JTAG_SW_ENABLE=y # CONFIG_STM32_TIM10_CAP is not set # CONFIG_STM32_TIM11_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART1_SERIALDRIVER=y +# CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set # CONFIG_STM32_HAVE_RTC_COUNTER is not set CONFIG_STM32_HAVE_RTC_SUBSECONDS=y @@ -669,33 +679,28 @@ CONFIG_ARCH_HAVE_I2CRESET=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -CONFIG_ARCH_HAVE_USART1=y -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART1_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -824,6 +829,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # @@ -895,7 +902,6 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_TIFF is not set # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_WEBSERVER is not set -# CONFIG_EXAMPLES_USBSERIAL is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set @@ -931,6 +937,7 @@ CONFIG_EXAMPLES_NSH=y # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/stm32ldiscovery/src/Makefile b/configs/stm32ldiscovery/src/Makefile index 7e17afc3d6b..84f146b7cb2 100644 --- a/configs/stm32ldiscovery/src/Makefile +++ b/configs/stm32ldiscovery/src/Makefile @@ -60,10 +60,6 @@ ifeq ($(CONFIG_QENCODER),y) CSRCS += stm32_qencoder.c endif -ifeq ($(CONFIG_WATCHDOG),y) -CSRCS += stm32_watchdog.c -endif - ifeq ($(CONFIG_LIB_BOARDCTL),y) CSRCS += stm32_appinit.c endif diff --git a/configs/stm32ldiscovery/src/stm32_appinit.c b/configs/stm32ldiscovery/src/stm32_appinit.c index 6141247b0e8..359e271eb95 100644 --- a/configs/stm32ldiscovery/src/stm32_appinit.c +++ b/configs/stm32ldiscovery/src/stm32_appinit.c @@ -2,7 +2,7 @@ * config/stm32ldiscovery/src/stm32_appinit.c * arch/arm/src/board/stm32_appinit.c * - * Copyright (C) 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2013, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -59,11 +59,28 @@ * Name: board_app_initialize * * Description: - * Perform architecture specific initialization + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface using the command BOARDIOC_INIT. + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #ifdef CONFIG_STM32_LCD /* Initialize the SLCD and register the SLCD device as /dev/slcd */ diff --git a/configs/stm32ldiscovery/src/stm32_watchdog.c b/configs/stm32ldiscovery/src/stm32_watchdog.c deleted file mode 100644 index 9f6c8322092..00000000000 --- a/configs/stm32ldiscovery/src/stm32_watchdog.c +++ /dev/null @@ -1,136 +0,0 @@ -/************************************************************************************ - * configs/stm32ldiscovery/src/up_watchdog.c - * arch/arm/src/board/up_watchdog.c - * - * Copyright (C) 2013 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt - * - * 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. - * - ************************************************************************************/ - -/************************************************************************************ - * Included Files - ************************************************************************************/ - -#include - -#include -#include - -#include -#include - -#include "stm32_wdg.h" - -#ifdef CONFIG_WATCHDOG - -/************************************************************************************ - * Pre-processor Definitions - ************************************************************************************/ -/* Configuration *******************************************************************/ -/* Wathdog hardware should be enabled */ - -#if !defined(CONFIG_STM32_WWDG) && !defined(CONFIG_STM32_IWDG) -# warning "One of CONFIG_STM32_WWDG or CONFIG_STM32_IWDG must be defined" -#endif - -/* Select the path to the registered watchdog timer device */ - -#ifndef CONFIG_STM32_WDG_DEVPATH -# ifdef CONFIG_EXAMPLES_WATCHDOG_DEVPATH -# define CONFIG_STM32_WDG_DEVPATH CONFIG_EXAMPLES_WATCHDOG_DEVPATH -# else -# define CONFIG_STM32_WDG_DEVPATH "/dev/watchdog0" -# endif -#endif - -/* Use the un-calibrated LSI frequency if we have nothing better */ - -#if defined(CONFIG_STM32_IWDG) && !defined(CONFIG_STM32_LSIFREQ) -# define CONFIG_STM32_LSIFREQ STM32_LSI_FREQUENCY -#endif - -/* Debug ***************************************************************************/ -/* Non-standard debug that may be enabled just for testing the watchdog timer */ - -#ifndef CONFIG_DEBUG -# undef CONFIG_DEBUG_WATCHDOG -#endif - -#ifdef CONFIG_DEBUG_WATCHDOG -# define wdgdbg dbg -# define wdglldbg lldbg -# ifdef CONFIG_DEBUG_VERBOSE -# define wdgvdbg vdbg -# define wdgllvdbg llvdbg -# else -# define wdgvdbg(x...) -# define wdgllvdbg(x...) -# endif -#else -# define wdgdbg(x...) -# define wdglldbg(x...) -# define wdgvdbg(x...) -# define wdgllvdbg(x...) -#endif - -/************************************************************************************ - * Private Functions - ************************************************************************************/ - -/************************************************************************************ - * Public Functions - ************************************************************************************/ - -/**************************************************************************** - * Name: up_wdginitialize() - * - * Description: - * Perform architecuture-specific initialization of the Watchdog hardware. - * This interface must be provided by all configurations using - * apps/examples/watchdog - * - ****************************************************************************/ - -int up_wdginitialize(void) -{ - /* Initialize tha register the watchdog timer device */ - -#if defined(CONFIG_STM32_WWDG) - stm32_wwdginitialize(CONFIG_STM32_WDG_DEVPATH); - return OK; -#elif defined(CONFIG_STM32_IWDG) - stm32_iwdginitialize(CONFIG_STM32_WDG_DEVPATH, CONFIG_STM32_LSIFREQ); - return OK; -#else - return -ENODEV; -#endif -} - -#endif /* CONFIG_WATCHDOG */ diff --git a/configs/stm32vldiscovery/nsh/defconfig b/configs/stm32vldiscovery/nsh/defconfig index 5e0c83b09fb..d1911fb9616 100644 --- a/configs/stm32vldiscovery/nsh/defconfig +++ b/configs/stm32vldiscovery/nsh/defconfig @@ -80,6 +80,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_DM320 is not set # CONFIG_ARCH_CHIP_EFM32 is not set # CONFIG_ARCH_CHIP_IMX1 is not set +# CONFIG_ARCH_CHIP_IMX6 is not set # CONFIG_ARCH_CHIP_KINETIS is not set # CONFIG_ARCH_CHIP_KL is not set # CONFIG_ARCH_CHIP_LM is not set @@ -98,6 +99,7 @@ CONFIG_ARCH="arm" # CONFIG_ARCH_CHIP_SAMV7 is not set CONFIG_ARCH_CHIP_STM32=y # CONFIG_ARCH_CHIP_STM32F7 is not set +# CONFIG_ARCH_CHIP_STM32L4 is not set # CONFIG_ARCH_CHIP_STR71X is not set # CONFIG_ARCH_CHIP_TMS570 is not set # CONFIG_ARCH_CHIP_MOXART is not set @@ -119,6 +121,7 @@ CONFIG_ARCH_CORTEXM3=y # CONFIG_ARCH_CORTEXR7F is not set CONFIG_ARCH_FAMILY="armv7-m" CONFIG_ARCH_CHIP="stm32" +# CONFIG_ARM_TOOLCHAIN_IAR is not set CONFIG_ARM_TOOLCHAIN_GNU=y # CONFIG_ARMV7M_USEBASEPRI is not set CONFIG_ARCH_HAVE_CMNVECTOR=y @@ -126,6 +129,7 @@ CONFIG_ARMV7M_CMNVECTOR=y # CONFIG_ARMV7M_LAZYFPU is not set # CONFIG_ARCH_HAVE_FPU is not set # CONFIG_ARCH_HAVE_DPFPU is not set +# CONFIG_ARCH_HAVE_TRUSTZONE is not set CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARM_MPU is not set @@ -136,6 +140,7 @@ CONFIG_ARM_HAVE_MPU_UNIFIED=y # CONFIG_ARMV7M_HAVE_DCACHE is not set # CONFIG_ARMV7M_HAVE_ITCM is not set # CONFIG_ARMV7M_HAVE_DTCM is not set +# CONFIG_ARMV7M_TOOLCHAIN_IARW is not set # CONFIG_ARMV7M_TOOLCHAIN_ATOLLIC is not set # CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set # CONFIG_ARMV7M_TOOLCHAIN_CODEREDW is not set @@ -246,6 +251,7 @@ CONFIG_ARCH_CHIP_STM32F100RB=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -415,13 +421,17 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_STM32_TIM13_CAP is not set # CONFIG_STM32_TIM14_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART1_SERIALDRIVER=y +# CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set CONFIG_STM32_HAVE_RTC_COUNTER=y # CONFIG_STM32_HAVE_RTC_SUBSECONDS is not set @@ -688,33 +698,28 @@ CONFIG_RTC=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -CONFIG_ARCH_HAVE_USART1=y -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART1_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set @@ -867,6 +872,8 @@ CONFIG_ARCH_LOWPUTC=y CONFIG_LIB_SENDFILE_BUFSIZE=512 # CONFIG_ARCH_ROMGETC is not set # CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set +CONFIG_ARCH_HAVE_TLS=y +# CONFIG_TLS is not set # CONFIG_LIBC_NETDB is not set # CONFIG_NETDB_HOSTFILE is not set @@ -945,7 +952,6 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_EXAMPLES_TIFF is not set # CONFIG_EXAMPLES_TOUCHSCREEN is not set # CONFIG_EXAMPLES_WEBSERVER is not set -# CONFIG_EXAMPLES_USBSERIAL is not set # CONFIG_EXAMPLES_USBTERM is not set # CONFIG_EXAMPLES_WATCHDOG is not set @@ -983,6 +989,7 @@ CONFIG_EXAMPLES_NSH=y # Network Utilities # # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/sure-pic32mx/nsh/defconfig b/configs/sure-pic32mx/nsh/defconfig index 5db19ac5c00..25e91c17f2e 100644 --- a/configs/sure-pic32mx/nsh/defconfig +++ b/configs/sure-pic32mx/nsh/defconfig @@ -483,28 +483,28 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -CONFIG_ARCH_HAVE_UART2=y -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +CONFIG_UART2_SERIALDRIVER=y +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/sure-pic32mx/src/pic32mx_appinit.c b/configs/sure-pic32mx/src/pic32mx_appinit.c index 6992300bd01..ef09c7641c9 100644 --- a/configs/sure-pic32mx/src/pic32mx_appinit.c +++ b/configs/sure-pic32mx/src/pic32mx_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/sure-pic32mx/src/pic32mx_appinit.c * - * Copyright (C) 2011-2013, 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2011-2013, 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -359,11 +359,28 @@ static int nsh_usbdevinitialize(void) * Name: board_app_initialize * * Description: - * Perform architecture specific initialization + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface using the command BOARDIOC_INIT. + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { int ret; diff --git a/configs/sure-pic32mx/usbnsh/defconfig b/configs/sure-pic32mx/usbnsh/defconfig index 66d0bb5e3b8..572454b95ab 100644 --- a/configs/sure-pic32mx/usbnsh/defconfig +++ b/configs/sure-pic32mx/usbnsh/defconfig @@ -485,28 +485,28 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y CONFIG_SERIAL_REMOVABLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -CONFIG_ARCH_HAVE_UART2=y -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +CONFIG_UART2_SERIALDRIVER=y +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/teensy-2.0/hello/defconfig b/configs/teensy-2.0/hello/defconfig index a1c37c8e317..423049ad667 100644 --- a/configs/teensy-2.0/hello/defconfig +++ b/configs/teensy-2.0/hello/defconfig @@ -305,33 +305,32 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -CONFIG_ARCH_HAVE_USART1=y -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration # -CONFIG_USART1_ISUART=y CONFIG_MCU_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set # CONFIG_SERIAL_OFLOWCONTROL is not set diff --git a/configs/teensy-2.0/nsh/defconfig b/configs/teensy-2.0/nsh/defconfig index 0257552769d..eaf3e24cc9e 100644 --- a/configs/teensy-2.0/nsh/defconfig +++ b/configs/teensy-2.0/nsh/defconfig @@ -316,33 +316,32 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -CONFIG_ARCH_HAVE_USART1=y -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration # -CONFIG_USART1_ISUART=y CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set diff --git a/configs/teensy-2.0/usbmsc/defconfig b/configs/teensy-2.0/usbmsc/defconfig index b4ec32ec9ac..b185f2467c6 100644 --- a/configs/teensy-2.0/usbmsc/defconfig +++ b/configs/teensy-2.0/usbmsc/defconfig @@ -338,33 +338,32 @@ CONFIG_MMCSD_SPIMODE=0 CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -CONFIG_ARCH_HAVE_USART1=y -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration # -CONFIG_USART1_ISUART=y CONFIG_MCU_SERIAL=y # CONFIG_SERIAL_IFLOWCONTROL is not set # CONFIG_SERIAL_OFLOWCONTROL is not set diff --git a/configs/teensy-3.x/nsh/defconfig b/configs/teensy-3.x/nsh/defconfig index c66150a460b..2b5dfa6aecb 100644 --- a/configs/teensy-3.x/nsh/defconfig +++ b/configs/teensy-3.x/nsh/defconfig @@ -438,28 +438,28 @@ CONFIG_SPI_EXCHANGE=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/teensy-3.x/src/k20_appinit.c b/configs/teensy-3.x/src/k20_appinit.c index d5cf13fe619..fd1b2bd5c86 100644 --- a/configs/teensy-3.x/src/k20_appinit.c +++ b/configs/teensy-3.x/src/k20_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/teensy-3.x/src/k20_appinit.c * - * Copyright (C) 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -43,23 +43,6 @@ #include "teensy-3x.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ -/* Configuration ************************************************************/ - -/**************************************************************************** - * Private Types - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -68,11 +51,28 @@ * Name: board_app_initialize * * Description: - * Perform architecture specific initialization + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface using the command BOARDIOC_INIT. + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { return OK; } diff --git a/configs/teensy-lc/nsh/defconfig b/configs/teensy-lc/nsh/defconfig index 07296c553f4..f19be237185 100644 --- a/configs/teensy-lc/nsh/defconfig +++ b/configs/teensy-lc/nsh/defconfig @@ -421,28 +421,28 @@ CONFIG_SPI_EXCHANGE=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/teensy-lc/src/kl_appinit.c b/configs/teensy-lc/src/kl_appinit.c index 8d96c28e763..fdd1e3bd307 100644 --- a/configs/teensy-lc/src/kl_appinit.c +++ b/configs/teensy-lc/src/kl_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/teensy-lc/src/kl_appinit.c * - * Copyright (C) 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -47,10 +47,6 @@ #ifdef CONFIG_LIB_BOARDCTL -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -63,9 +59,24 @@ * called directly from application code, but only indirectly via the * (non-standard) boardctl() interface using the command BOARDIOC_INIT. * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { return OK; } diff --git a/configs/teensy-lc/src/kl_boardinitialize.c b/configs/teensy-lc/src/kl_boardinitialize.c index 119a2d4ca6c..576e941ee27 100644 --- a/configs/teensy-lc/src/kl_boardinitialize.c +++ b/configs/teensy-lc/src/kl_boardinitialize.c @@ -136,7 +136,7 @@ void board_initialize(void) */ #if defined(CONFIG_NSH_LIBRARY) && !defined(CONFIG_LIB_BOARDCTL) - (void)board_app_initialize(); + (void)board_app_initialize(0); #endif } #endif diff --git a/configs/tm4c123g-launchpad/nsh/defconfig b/configs/tm4c123g-launchpad/nsh/defconfig index ec7ec4fb482..454af5b842f 100644 --- a/configs/tm4c123g-launchpad/nsh/defconfig +++ b/configs/tm4c123g-launchpad/nsh/defconfig @@ -453,28 +453,28 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/tm4c123g-launchpad/src/tm4c123g-launchpad.h b/configs/tm4c123g-launchpad/src/tm4c123g-launchpad.h index abb2193f3a0..b9ca7ce4808 100644 --- a/configs/tm4c123g-launchpad/src/tm4c123g-launchpad.h +++ b/configs/tm4c123g-launchpad/src/tm4c123g-launchpad.h @@ -226,7 +226,7 @@ int tm4c_at24_automount(int minor); #endif /**************************************************************************** - * Name: tiva_timer_initialize + * Name: tiva_timer_configure * * Description: * Configure the timer driver @@ -234,7 +234,7 @@ int tm4c_at24_automount(int minor); ****************************************************************************/ #ifdef CONFIG_TIVA_TIMER -int tiva_timer_initialize(void); +int tiva_timer_configure(void); #endif /************************************************************************************ diff --git a/configs/tm4c123g-launchpad/src/tm4c_appinit.c b/configs/tm4c123g-launchpad/src/tm4c_appinit.c index 0763742bf1a..c1ad4dd105f 100644 --- a/configs/tm4c123g-launchpad/src/tm4c_appinit.c +++ b/configs/tm4c123g-launchpad/src/tm4c_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/tm4c123g-launchpad/src/tm4c_appinit.c * - * Copyright (C) 2014 Gregory Nutt. All rights reserved. + * Copyright (C) 2014, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -43,10 +43,6 @@ #include "tm4c123g-launchpad.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -55,11 +51,28 @@ * Name: board_app_initialize * * Description: - * Perform architecture specific initialization + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface using the command BOARDIOC_INIT. + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { /* If CONFIG_BOARD_INITIALIZE is selected then board initialization was * already performed in board_initialize. diff --git a/configs/tm4c123g-launchpad/src/tm4c_bringup.c b/configs/tm4c123g-launchpad/src/tm4c_bringup.c index c277fbb7109..48a8d649fea 100644 --- a/configs/tm4c123g-launchpad/src/tm4c_bringup.c +++ b/configs/tm4c123g-launchpad/src/tm4c_bringup.c @@ -77,10 +77,10 @@ int tm4c_bringup(void) #ifdef CONFIG_TIVA_TIMER /* Initialize the timer driver */ - ret = tiva_timer_initialize(); + ret = tiva_timer_configure(); if (ret < 0) { - syslog(LOG_ERR, "ERROR: tiva_timer_initialize failed: %d\n", ret); + syslog(LOG_ERR, "ERROR: tiva_timer_configure failed: %d\n", ret); return ret; } #endif /* CONFIG_TIVA_TIMER */ diff --git a/configs/tm4c123g-launchpad/src/tm4c_timer.c b/configs/tm4c123g-launchpad/src/tm4c_timer.c index 8bc01c6edac..19e961dd3f9 100644 --- a/configs/tm4c123g-launchpad/src/tm4c_timer.c +++ b/configs/tm4c123g-launchpad/src/tm4c_timer.c @@ -62,14 +62,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: tiva_timer_initialize + * Name: tiva_timer_configure * * Description: * Configure the timer driver for the timer example application. * ****************************************************************************/ -int tiva_timer_initialize(void) +int tiva_timer_configure(void) { static bool initialized = false; int ret = OK; diff --git a/configs/tm4c1294-launchpad/ipv6/defconfig b/configs/tm4c1294-launchpad/ipv6/defconfig index faedcc29fea..d7d7d764129 100644 --- a/configs/tm4c1294-launchpad/ipv6/defconfig +++ b/configs/tm4c1294-launchpad/ipv6/defconfig @@ -483,28 +483,28 @@ CONFIG_ARCH_PHY_INTERRUPT=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/tm4c1294-launchpad/nsh/defconfig b/configs/tm4c1294-launchpad/nsh/defconfig index afd503223fc..6c504d9f42c 100644 --- a/configs/tm4c1294-launchpad/nsh/defconfig +++ b/configs/tm4c1294-launchpad/nsh/defconfig @@ -520,28 +520,28 @@ CONFIG_ARCH_PHY_INTERRUPT=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/tm4c1294-launchpad/src/tm4c1294-launchpad.h b/configs/tm4c1294-launchpad/src/tm4c1294-launchpad.h index f18fa39eb1c..fb392a6c852 100644 --- a/configs/tm4c1294-launchpad/src/tm4c1294-launchpad.h +++ b/configs/tm4c1294-launchpad/src/tm4c1294-launchpad.h @@ -166,7 +166,7 @@ void tm4c_led_initialize(void); int tm4c_bringup(void); /**************************************************************************** - * Name: tiva_timer_initialize + * Name: tiva_timer_configure * * Description: * Configure the timer driver @@ -174,7 +174,7 @@ int tm4c_bringup(void); ****************************************************************************/ #ifdef CONFIG_TM4C1294_LAUNCHPAD_TIMER -int tiva_timer_initialize(void); +int tiva_timer_configure(void); #endif #endif /* __ASSEMBLY__ */ diff --git a/configs/tm4c1294-launchpad/src/tm4c_appinit.c b/configs/tm4c1294-launchpad/src/tm4c_appinit.c index c360d7f00cb..2245ac31e9e 100644 --- a/configs/tm4c1294-launchpad/src/tm4c_appinit.c +++ b/configs/tm4c1294-launchpad/src/tm4c_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/tm4c1294-launchpad/src/tm4c_appinit.c * - * Copyright (C) 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -43,10 +43,6 @@ #include "tm4c1294-launchpad.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -55,11 +51,28 @@ * Name: board_app_initialize * * Description: - * Perform architecture specific initialization + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface using the command BOARDIOC_INIT. + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { /* If CONFIG_BOARD_INITIALIZE is selected then board initialization was * already performed in board_initialize. diff --git a/configs/tm4c1294-launchpad/src/tm4c_bringup.c b/configs/tm4c1294-launchpad/src/tm4c_bringup.c index da1778d0fda..a6608ff431a 100644 --- a/configs/tm4c1294-launchpad/src/tm4c_bringup.c +++ b/configs/tm4c1294-launchpad/src/tm4c_bringup.c @@ -161,7 +161,7 @@ int tm4c_bringup(void) #ifdef HAVE_TIMER /* Initialize the timer driver */ - ret = tiva_timer_initialize(); + ret = tiva_timer_configure(); if (ret < 0) { dbg("ERROR: Failed to initialize timer driver: %d\n", ret); diff --git a/configs/tm4c1294-launchpad/src/tm4c_timer.c b/configs/tm4c1294-launchpad/src/tm4c_timer.c index 94f6ab0bb43..0d661307c39 100644 --- a/configs/tm4c1294-launchpad/src/tm4c_timer.c +++ b/configs/tm4c1294-launchpad/src/tm4c_timer.c @@ -90,14 +90,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: tiva_timer_initialize + * Name: tiva_timer_configure * * Description: * Configure the timer driver * ****************************************************************************/ -int tiva_timer_initialize(void) +int tiva_timer_configure(void) { int ret; diff --git a/configs/twr-k60n512/nsh/defconfig b/configs/twr-k60n512/nsh/defconfig index a4110d0ccfa..ac65d4c0257 100644 --- a/configs/twr-k60n512/nsh/defconfig +++ b/configs/twr-k60n512/nsh/defconfig @@ -422,28 +422,28 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -CONFIG_ARCH_HAVE_UART3=y -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +CONFIG_UART3_SERIALDRIVER=y +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/twr-k60n512/src/k60_appinit.c b/configs/twr-k60n512/src/k60_appinit.c index 6c6795c2ad8..ffcb0b7f9f3 100644 --- a/configs/twr-k60n512/src/k60_appinit.c +++ b/configs/twr-k60n512/src/k60_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/twr-k60n512/src/k60_appinit.c * - * Copyright (C) 2011 Gregory Nutt. All rights reserved. + * Copyright (C) 2011, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -193,11 +193,28 @@ static int kinetis_cdinterrupt(int irq, FAR void *context) * Name: board_app_initialize * * Description: - * Perform architecture specific initialization + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface using the command BOARDIOC_INIT. + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #ifdef NSH_HAVEMMCSD int ret; diff --git a/configs/u-blox-c027/nsh/defconfig b/configs/u-blox-c027/nsh/defconfig index 51b5dc2e962..ca3feaaa15d 100644 --- a/configs/u-blox-c027/nsh/defconfig +++ b/configs/u-blox-c027/nsh/defconfig @@ -562,28 +562,28 @@ CONFIG_ETH1_PHY_NONE=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -CONFIG_ARCH_HAVE_UART1=y -CONFIG_ARCH_HAVE_UART2=y -CONFIG_ARCH_HAVE_UART3=y -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +CONFIG_UART1_SERIALDRIVER=y +CONFIG_UART2_SERIALDRIVER=y +CONFIG_UART3_SERIALDRIVER=y +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/u-blox-c027/src/lpc17_appinit.c b/configs/u-blox-c027/src/lpc17_appinit.c index ce83755f4d3..f315953dfb9 100644 --- a/configs/u-blox-c027/src/lpc17_appinit.c +++ b/configs/u-blox-c027/src/lpc17_appinit.c @@ -126,11 +126,28 @@ * Name: board_app_initialize * * Description: - * Perform architecture specific initialization + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface using the command BOARDIOC_INIT. + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { int ret; diff --git a/configs/ubw32/nsh/defconfig b/configs/ubw32/nsh/defconfig index c97c791aa5c..b6ec91adbca 100644 --- a/configs/ubw32/nsh/defconfig +++ b/configs/ubw32/nsh/defconfig @@ -490,28 +490,28 @@ CONFIG_MMCSD_NSLOTS=1 CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -CONFIG_ARCH_HAVE_UART1=y -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +CONFIG_UART1_SERIALDRIVER=y +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/ubw32/src/pic32_appinit.c b/configs/ubw32/src/pic32_appinit.c index 612e3aa70f9..22cf57b4b00 100644 --- a/configs/ubw32/src/pic32_appinit.c +++ b/configs/ubw32/src/pic32_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/ubw32/src/pic32_appinit.c * - * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2012, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -89,11 +89,28 @@ static int nsh_usbdevinitialize(void) * Name: board_app_initialize * * Description: - * Perform architecture specific initialization + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface using the command BOARDIOC_INIT. + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { int ret; diff --git a/configs/us7032evb1/nsh/defconfig b/configs/us7032evb1/nsh/defconfig index 03a12a8a280..e18cd49cc8c 100644 --- a/configs/us7032evb1/nsh/defconfig +++ b/configs/us7032evb1/nsh/defconfig @@ -243,27 +243,27 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -CONFIG_ARCH_HAVE_SCI1=y -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +CONFIG_SCI1_SERIALDRIVER=y +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/us7032evb1/ostest/defconfig b/configs/us7032evb1/ostest/defconfig index ec108a9870e..7490f982d79 100644 --- a/configs/us7032evb1/ostest/defconfig +++ b/configs/us7032evb1/ostest/defconfig @@ -242,27 +242,27 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -CONFIG_ARCH_HAVE_SCI1=y -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +CONFIG_SCI1_SERIALDRIVER=y +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/viewtool-stm32f107/highpri/defconfig b/configs/viewtool-stm32f107/highpri/defconfig index ce65df1ebc1..0fcfc13a51b 100644 --- a/configs/viewtool-stm32f107/highpri/defconfig +++ b/configs/viewtool-stm32f107/highpri/defconfig @@ -251,6 +251,7 @@ CONFIG_ARCH_CHIP_STM32F103VC=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -421,13 +422,17 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_STM32_TIM5_CAP is not set # CONFIG_STM32_TIM8_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART1_SERIALDRIVER=y +# CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set CONFIG_STM32_HAVE_RTC_COUNTER=y # CONFIG_STM32_HAVE_RTC_SUBSECONDS is not set @@ -692,33 +697,28 @@ CONFIG_ARCH_HAVE_I2CRESET=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -CONFIG_ARCH_HAVE_USART1=y -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART1_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y CONFIG_SERIAL_NPOLLWAITERS=2 @@ -972,6 +972,7 @@ CONFIG_ARCH_HAVE_TLS=y # # CONFIG_NETUTILS_CHAT is not set # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/viewtool-stm32f107/netnsh/defconfig b/configs/viewtool-stm32f107/netnsh/defconfig index b355d5ad913..f6f1b6b4d1d 100644 --- a/configs/viewtool-stm32f107/netnsh/defconfig +++ b/configs/viewtool-stm32f107/netnsh/defconfig @@ -251,6 +251,7 @@ CONFIG_ARCH_CHIP_STM32F107VC=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -420,13 +421,17 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_STM32_TIM5_CAP is not set # CONFIG_STM32_TIM8_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART1_SERIALDRIVER=y +# CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set CONFIG_STM32_HAVE_RTC_COUNTER=y # CONFIG_STM32_HAVE_RTC_SUBSECONDS is not set @@ -751,33 +756,28 @@ CONFIG_ETH0_PHY_DP83848C=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -CONFIG_ARCH_HAVE_USART1=y -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART1_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y CONFIG_SERIAL_NPOLLWAITERS=2 @@ -1162,6 +1162,7 @@ CONFIG_EXAMPLES_NSH=y # CONFIG_NETUTILS_CODECS is not set CONFIG_NETUTILS_DHCPC=y # CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_FTPD is not set # CONFIG_NETUTILS_JSON is not set diff --git a/configs/viewtool-stm32f107/nsh/defconfig b/configs/viewtool-stm32f107/nsh/defconfig index ef29399bbb0..eac5f7d9147 100644 --- a/configs/viewtool-stm32f107/nsh/defconfig +++ b/configs/viewtool-stm32f107/nsh/defconfig @@ -251,6 +251,7 @@ CONFIG_ARCH_CHIP_STM32F107VC=y # CONFIG_ARCH_CHIP_STM32F373VC is not set # CONFIG_ARCH_CHIP_STM32F401RE is not set # CONFIG_ARCH_CHIP_STM32F411RE is not set +# CONFIG_ARCH_CHIP_STM32F411VE is not set # CONFIG_ARCH_CHIP_STM32F405RG is not set # CONFIG_ARCH_CHIP_STM32F405VG is not set # CONFIG_ARCH_CHIP_STM32F405ZG is not set @@ -419,13 +420,17 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y # CONFIG_STM32_TIM5_CAP is not set # CONFIG_STM32_TIM8_CAP is not set CONFIG_STM32_USART=y +CONFIG_STM32_SERIALDRIVER=y # # U[S]ART Configuration # +CONFIG_STM32_USART1_SERIALDRIVER=y +# CONFIG_STM32_USART1_1WIREDRIVER is not set # CONFIG_USART1_RS485 is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_STM32_FLOWCONTROL_BROKEN is not set +# CONFIG_STM32_USART_BREAKS is not set # CONFIG_STM32_USART_SINGLEWIRE is not set CONFIG_STM32_HAVE_RTC_COUNTER=y # CONFIG_STM32_HAVE_RTC_SUBSECONDS is not set @@ -690,33 +695,28 @@ CONFIG_ARCH_HAVE_I2CRESET=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -# CONFIG_ARCH_HAVE_UART0 is not set -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -CONFIG_ARCH_HAVE_USART1=y -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set - -# -# USART Configuration -# -CONFIG_USART1_ISUART=y +# CONFIG_UART_SERIALDRIVER is not set +# CONFIG_UART0_SERIALDRIVER is not set +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +CONFIG_USART1_SERIALDRIVER=y +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y CONFIG_SERIAL_NPOLLWAITERS=2 @@ -976,6 +976,7 @@ CONFIG_EXAMPLES_NSH=y # # CONFIG_NETUTILS_CHAT is not set # CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_ESP8266 is not set # CONFIG_NETUTILS_FTPC is not set # CONFIG_NETUTILS_JSON is not set # CONFIG_NETUTILS_SMTP is not set diff --git a/configs/viewtool-stm32f107/src/stm32_appinit.c b/configs/viewtool-stm32f107/src/stm32_appinit.c index 5884d7d0531..8bc77a200c1 100644 --- a/configs/viewtool-stm32f107/src/stm32_appinit.c +++ b/configs/viewtool-stm32f107/src/stm32_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/viewtool-stm32f107/src/stm32_appinit.c * - * Copyright (C) 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2013, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -123,11 +123,28 @@ static int rtc_driver_initialize(void) * Name: board_app_initialize * * Description: - * Perform architecture specific initialization + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface using the command BOARDIOC_INIT. + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #ifdef HAVE_RTC_DRIVER (void)rtc_driver_initialize(); diff --git a/configs/xtrs/nsh/defconfig b/configs/xtrs/nsh/defconfig index 79355d8226d..fed3d18a034 100644 --- a/configs/xtrs/nsh/defconfig +++ b/configs/xtrs/nsh/defconfig @@ -197,7 +197,7 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -CONFIG_ARCH_HAVE_UART=y +CONFIG_UART_SERIALDRIVER=y CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_UART_SERIAL_CONSOLE is not set diff --git a/configs/xtrs/ostest/defconfig b/configs/xtrs/ostest/defconfig index 5f79aab570c..d0f9abadd0d 100644 --- a/configs/xtrs/ostest/defconfig +++ b/configs/xtrs/ostest/defconfig @@ -196,7 +196,7 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set -CONFIG_ARCH_HAVE_UART=y +CONFIG_UART_SERIALDRIVER=y CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y CONFIG_UART_SERIAL_CONSOLE=y diff --git a/configs/xtrs/pashello/defconfig b/configs/xtrs/pashello/defconfig index 1865c540b75..eeceb9e5829 100644 --- a/configs/xtrs/pashello/defconfig +++ b/configs/xtrs/pashello/defconfig @@ -197,7 +197,7 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set -CONFIG_ARCH_HAVE_UART=y +CONFIG_UART_SERIALDRIVER=y CONFIG_MCU_SERIAL=y CONFIG_UART_SERIAL_CONSOLE=y # CONFIG_NO_SERIAL_CONSOLE is not set diff --git a/configs/z16f2800100zcog/nsh/defconfig b/configs/z16f2800100zcog/nsh/defconfig index 9f8dda80443..fe61c46aa11 100644 --- a/configs/z16f2800100zcog/nsh/defconfig +++ b/configs/z16f2800100zcog/nsh/defconfig @@ -299,27 +299,27 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -CONFIG_ARCH_HAVE_UART1=y -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +CONFIG_UART1_SERIALDRIVER=y +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/z16f2800100zcog/ostest/defconfig b/configs/z16f2800100zcog/ostest/defconfig index 219c0a203d3..6ee164a4eaf 100644 --- a/configs/z16f2800100zcog/ostest/defconfig +++ b/configs/z16f2800100zcog/ostest/defconfig @@ -257,8 +257,8 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set -CONFIG_ARCH_HAVE_UART0=y -CONFIG_ARCH_HAVE_UART1=y +CONFIG_UART0_SERIALDRIVER=y +CONFIG_UART1_SERIALDRIVER=y # # USART Configuration diff --git a/configs/z16f2800100zcog/pashello/defconfig b/configs/z16f2800100zcog/pashello/defconfig index 34e162a24df..3d4744e0908 100644 --- a/configs/z16f2800100zcog/pashello/defconfig +++ b/configs/z16f2800100zcog/pashello/defconfig @@ -220,8 +220,8 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set -CONFIG_ARCH_HAVE_UART0=y -CONFIG_ARCH_HAVE_UART1=y +CONFIG_UART0_SERIALDRIVER=y +CONFIG_UART1_SERIALDRIVER=y CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y CONFIG_UART0_SERIAL_CONSOLE=y diff --git a/configs/z80sim/nsh/defconfig b/configs/z80sim/nsh/defconfig index 347d7f9cd77..ab5c5da665c 100644 --- a/configs/z80sim/nsh/defconfig +++ b/configs/z80sim/nsh/defconfig @@ -197,7 +197,7 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -CONFIG_ARCH_HAVE_UART=y +CONFIG_UART_SERIALDRIVER=y CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y # CONFIG_UART_SERIAL_CONSOLE is not set diff --git a/configs/z80sim/ostest/defconfig b/configs/z80sim/ostest/defconfig index 36ed405f12f..dc0a04bc13f 100644 --- a/configs/z80sim/ostest/defconfig +++ b/configs/z80sim/ostest/defconfig @@ -196,7 +196,7 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set -CONFIG_ARCH_HAVE_UART=y +CONFIG_UART_SERIALDRIVER=y CONFIG_MCU_SERIAL=y CONFIG_STANDARD_SERIAL=y CONFIG_UART_SERIAL_CONSOLE=y diff --git a/configs/z80sim/pashello/defconfig b/configs/z80sim/pashello/defconfig index 9a049337cde..4a702c26389 100644 --- a/configs/z80sim/pashello/defconfig +++ b/configs/z80sim/pashello/defconfig @@ -196,7 +196,7 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set -CONFIG_ARCH_HAVE_UART=y +CONFIG_UART_SERIALDRIVER=y CONFIG_MCU_SERIAL=y CONFIG_UART_SERIAL_CONSOLE=y # CONFIG_NO_SERIAL_CONSOLE is not set diff --git a/configs/z8encore000zco/ostest/defconfig b/configs/z8encore000zco/ostest/defconfig index 5625226e181..aa8fc953588 100644 --- a/configs/z8encore000zco/ostest/defconfig +++ b/configs/z8encore000zco/ostest/defconfig @@ -359,28 +359,28 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -CONFIG_ARCH_HAVE_UART1=y -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +CONFIG_UART1_SERIALDRIVER=y +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/z8f64200100kit/ostest/defconfig b/configs/z8f64200100kit/ostest/defconfig index ed522a5bb1d..df99499d711 100644 --- a/configs/z8f64200100kit/ostest/defconfig +++ b/configs/z8f64200100kit/ostest/defconfig @@ -359,28 +359,28 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -CONFIG_ARCH_HAVE_UART1=y -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +CONFIG_UART1_SERIALDRIVER=y +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/zkit-arm-1769/hello/defconfig b/configs/zkit-arm-1769/hello/defconfig index 17c6a81fc97..4cbbb539541 100644 --- a/configs/zkit-arm-1769/hello/defconfig +++ b/configs/zkit-arm-1769/hello/defconfig @@ -458,28 +458,28 @@ CONFIG_ETH0_PHY_DP83848C=y CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/zkit-arm-1769/nsh/defconfig b/configs/zkit-arm-1769/nsh/defconfig index d3a2937712f..250f73fecf0 100644 --- a/configs/zkit-arm-1769/nsh/defconfig +++ b/configs/zkit-arm-1769/nsh/defconfig @@ -510,28 +510,28 @@ CONFIG_ETH0_PHY_DP83848C=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/zkit-arm-1769/nxhello/defconfig b/configs/zkit-arm-1769/nxhello/defconfig index 9bff2a9046b..fb677a4b2f2 100644 --- a/configs/zkit-arm-1769/nxhello/defconfig +++ b/configs/zkit-arm-1769/nxhello/defconfig @@ -552,28 +552,28 @@ CONFIG_ETH0_PHY_DP83848C=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/zkit-arm-1769/src/lpc17_appinit.c b/configs/zkit-arm-1769/src/lpc17_appinit.c index e9d9c1baa12..9817d76c336 100644 --- a/configs/zkit-arm-1769/src/lpc17_appinit.c +++ b/configs/zkit-arm-1769/src/lpc17_appinit.c @@ -129,14 +129,6 @@ # endif #endif -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -145,11 +137,28 @@ * Name: board_app_initialize * * Description: - * Perform architecture specific initialization + * Perform application specific initialization. This function is never + * called directly from application code, but only indirectly via the + * (non-standard) boardctl() interface using the command BOARDIOC_INIT. + * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { #ifdef CONFIG_NSH_HAVEMMCSD FAR struct spi_dev_s *spi; diff --git a/configs/zkit-arm-1769/thttpd/defconfig b/configs/zkit-arm-1769/thttpd/defconfig index 958ac134e92..5f7f9ab01a8 100644 --- a/configs/zkit-arm-1769/thttpd/defconfig +++ b/configs/zkit-arm-1769/thttpd/defconfig @@ -457,28 +457,28 @@ CONFIG_ETH0_PHY_DP83848C=y CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -# CONFIG_ARCH_HAVE_UART1 is not set -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +# CONFIG_UART1_SERIALDRIVER is not set +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/zp214xpa/nsh/defconfig b/configs/zp214xpa/nsh/defconfig index cec8851c194..1fa5f238cc5 100644 --- a/configs/zp214xpa/nsh/defconfig +++ b/configs/zp214xpa/nsh/defconfig @@ -364,28 +364,28 @@ CONFIG_DEV_NULL=y CONFIG_SERIAL=y # CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -CONFIG_ARCH_HAVE_UART1=y -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +CONFIG_UART1_SERIALDRIVER=y +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/zp214xpa/nxlines/defconfig b/configs/zp214xpa/nxlines/defconfig index 8dab6945300..580c2a8070c 100644 --- a/configs/zp214xpa/nxlines/defconfig +++ b/configs/zp214xpa/nxlines/defconfig @@ -403,28 +403,28 @@ CONFIG_LCD_LANDSCAPE=y CONFIG_SERIAL=y CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set -# CONFIG_ARCH_HAVE_UART is not set -CONFIG_ARCH_HAVE_UART0=y -CONFIG_ARCH_HAVE_UART1=y -# CONFIG_ARCH_HAVE_UART2 is not set -# CONFIG_ARCH_HAVE_UART3 is not set -# CONFIG_ARCH_HAVE_UART4 is not set -# CONFIG_ARCH_HAVE_UART5 is not set -# CONFIG_ARCH_HAVE_UART6 is not set -# CONFIG_ARCH_HAVE_UART7 is not set -# CONFIG_ARCH_HAVE_UART8 is not set -# CONFIG_ARCH_HAVE_SCI0 is not set -# CONFIG_ARCH_HAVE_SCI1 is not set -# CONFIG_ARCH_HAVE_USART0 is not set -# CONFIG_ARCH_HAVE_USART1 is not set -# CONFIG_ARCH_HAVE_USART2 is not set -# CONFIG_ARCH_HAVE_USART3 is not set -# CONFIG_ARCH_HAVE_USART4 is not set -# CONFIG_ARCH_HAVE_USART5 is not set -# CONFIG_ARCH_HAVE_USART6 is not set -# CONFIG_ARCH_HAVE_USART7 is not set -# CONFIG_ARCH_HAVE_USART8 is not set -# CONFIG_ARCH_HAVE_OTHER_UART is not set +# CONFIG_UART_SERIALDRIVER is not set +CONFIG_UART0_SERIALDRIVER=y +CONFIG_UART1_SERIALDRIVER=y +# CONFIG_UART2_SERIALDRIVER is not set +# CONFIG_UART3_SERIALDRIVER is not set +# CONFIG_UART4_SERIALDRIVER is not set +# CONFIG_UART5_SERIALDRIVER is not set +# CONFIG_UART6_SERIALDRIVER is not set +# CONFIG_UART7_SERIALDRIVER is not set +# CONFIG_UART8_SERIALDRIVER is not set +# CONFIG_SCI0_SERIALDRIVER is not set +# CONFIG_SCI1_SERIALDRIVER is not set +# CONFIG_USART0_SERIALDRIVER is not set +# CONFIG_USART1_SERIALDRIVER is not set +# CONFIG_USART2_SERIALDRIVER is not set +# CONFIG_USART3_SERIALDRIVER is not set +# CONFIG_USART4_SERIALDRIVER is not set +# CONFIG_USART5_SERIALDRIVER is not set +# CONFIG_USART6_SERIALDRIVER is not set +# CONFIG_USART7_SERIALDRIVER is not set +# CONFIG_USART8_SERIALDRIVER is not set +# CONFIG_OTHER_UART_SERIALDRIVER is not set # # USART Configuration diff --git a/configs/zp214xpa/src/lpc2148_appinit.c b/configs/zp214xpa/src/lpc2148_appinit.c index ae403949bc1..b5efe183443 100644 --- a/configs/zp214xpa/src/lpc2148_appinit.c +++ b/configs/zp214xpa/src/lpc2148_appinit.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/zp214xpa/src/lpc2148_appinit.c * - * Copyright (C) 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -56,9 +56,24 @@ * called directly from application code, but only indirectly via the * (non-standard) boardctl() interface using the command BOARDIOC_INIT. * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. + * ****************************************************************************/ -int board_app_initialize(void) +int board_app_initialize(uintptr_t arg) { return OK; } diff --git a/drivers/Kconfig b/drivers/Kconfig index 31c5b1e7a82..df45c0d1722 100644 --- a/drivers/Kconfig +++ b/drivers/Kconfig @@ -373,22 +373,7 @@ if IOEXPANDER source drivers/ioexpander/Kconfig endif # IOEXPANDER -menuconfig LCD - bool "LCD Driver Support" - default n - select NX_LCDDRIVER - ---help--- - Drivers for parallel and serial LCD and OLED type devices. These - drivers support interfaces as defined in include/nuttx/lcd/lcd.h - - This selection is necessary to enable support for LCD drivers in - drivers/lcd as well as for board-specific LCD drivers in the configs/ - subdirectories. - -if LCD source drivers/lcd/Kconfig -endif # LCD - source drivers/leds/Kconfig menuconfig MMCSD diff --git a/drivers/analog/Kconfig b/drivers/analog/Kconfig index bc054804224..20d99f8acb4 100644 --- a/drivers/analog/Kconfig +++ b/drivers/analog/Kconfig @@ -11,6 +11,16 @@ config ADC not only Analog-to-Digital Converters (ADC) but also amplifiers and analog multiplexers. + This selection enables: + + - The upper half, device-independent ADC character driver, and + - Selection of common lower half ADC drivers. + + MCU-specific, lower half drivers may be selected independently of + CONFIG_ADC. However, if CONFIG_ADC is selected, then it is assume + that lower half ADC drivers will be used only with the commoun ADC + upper half driver. + if ADC config ADC_FIFOSIZE @@ -46,6 +56,7 @@ config ADC_ADS125X bool "TI ADS1255/ADS1256 support" default n select SPI + select SCHED_HPWORK if ADC_ADS125X diff --git a/drivers/analog/ad5410.c b/drivers/analog/ad5410.c index 33da3c76615..58db6a7ceaf 100644 --- a/drivers/analog/ad5410.c +++ b/drivers/analog/ad5410.c @@ -1,9 +1,10 @@ /************************************************************************************ * arch/drivers/analog/ad5410.c * + * Copyright (C) 2010, 2016 Gregory Nutt. All rights reserved. * Copyright (C) 2011 Li Zhuoyi. All rights reserved. * Author: Li Zhuoyi - * History: 0.1 2011-08-05 initial version + * Gregory Nutt * * This file is a part of NuttX: * @@ -85,6 +86,9 @@ struct up_dev_s * ad_private Function Prototypes ****************************************************************************/ +static void dac_lock(FAR struct spi_dev_s *spi); +static void dac_unlock(FAR struct spi_dev_s *spi); + /* DAC methods */ static void dac_reset(FAR struct dac_dev_s *dev); @@ -121,64 +125,136 @@ static struct dac_dev_s g_dacdev = * ad_private Functions ****************************************************************************/ -/* Reset the DAC device. Called early to initialize the hardware. This - * is called, before ao_setup() and on error conditions. - */ +/**************************************************************************** + * Name: dac_lock + * + * Description: + * Lock and configure the SPI bus. + * + ****************************************************************************/ + +static void dac_lock(FAR struct spi_dev_s *spi) +{ + (void)SPI_LOCK(spi, true); + SPI_SETMODE(spi, SPIDEV_MODE0); + SPI_SETBITS(spi, 8); + (void)SPI_HWFEATURES(spi, 0); + SPI_SETFREQUENCY(spi, 400000); +} + +/**************************************************************************** + * Name: dac_unlock + * + * Description: + * Unlock the SPI bus. + * + ****************************************************************************/ + +static void dac_unlock(FAR struct spi_dev_s *spi) +{ + (void)SPI_LOCK(spi, false); +} + +/**************************************************************************** + * Name: dac_reset + * + * Description: + * Reset the DAC device. Called early to initialize the hardware. This + * is called, before ao_setup() and on error conditions. + * + ****************************************************************************/ static void dac_reset(FAR struct dac_dev_s *dev) { } -/* Configure the DAC. This method is called the first time that the DAC - * device is opened. This will occur when the port is first opened. - * This setup includes configuring and attaching DAC interrupts. Interrupts - * are all disabled upon return. - */ +/**************************************************************************** + * Name: dac_setup + * + * Description: + * Configure the DAC. This method is called the first time that the DAC + * device is opened. This will occur when the port is first opened. + * This setup includes configuring and attaching DAC interrupts. Interrupts + * are all disabled upon return. + * + ****************************************************************************/ static int dac_setup(FAR struct dac_dev_s *dev) { FAR struct up_dev_s *priv = (FAR struct up_dev_s *)dev->ad_priv; FAR struct spi_dev_s *spi = priv->spi; + dac_lock(spi); + SPI_SELECT(spi, priv->devno, true); SPI_SEND(spi, AD5410_REG_CMD); SPI_SEND(spi, (AD5410_CMD_OUTEN | AD5410_CMD_420MA) >> 8); SPI_SEND(spi, AD5410_CMD_OUTEN | AD5410_CMD_420MA); SPI_SELECT(spi, priv->devno, false); + + dac_unlock(spi); return OK; } -/* Disable the DAC. This method is called when the DAC device is closed. - * This method reverses the operation the setup method. - */ +/**************************************************************************** + * Name: dac_shutdown + * + * Description: + * Disable the DAC. This method is called when the DAC device is closed. + * This method reverses the operation the setup method. + * + ****************************************************************************/ static void dac_shutdown(FAR struct dac_dev_s *dev) { } -/* Call to enable or disable TX interrupts */ +/**************************************************************************** + * Name: dac_txint + * + * Description: + * Call to enable or disable TX interrupts + * + ****************************************************************************/ static void dac_txint(FAR struct dac_dev_s *dev, bool enable) { } -static int dac_send(FAR struct dac_dev_s *dev, FAR struct dac_msg_s *msg) +/**************************************************************************** + * Name: dac_send + * + * Description: + * + ****************************************************************************/ + +static int dac_send(FAR struct dac_dev_s *dev, FAR struct dac_msg_s *msg) { FAR struct up_dev_s *priv = (FAR struct up_dev_s *)dev->ad_priv; FAR struct spi_dev_s *spi = priv->spi; + dac_lock(spi); + SPI_SELECT(spi, priv->devno, true); SPI_SEND(spi, AD5410_REG_WR); SPI_SEND(spi, (uint8_t)(msg->am_data >> 24)); SPI_SEND(spi, (uint8_t)(msg->am_data >> 16)); SPI_SELECT(spi, priv->devno, false); + + dac_unlock(spi); dac_txdone(&g_dacdev); return 0; } -/* All ioctl calls will be routed through this method */ +/**************************************************************************** + * Name: dac_ioctl + * + * Description: + * All ioctl calls will be routed through this method + * + ****************************************************************************/ -static int dac_ioctl(FAR struct dac_dev_s *dev, int cmd, unsigned long arg) +static int dac_ioctl(FAR struct dac_dev_s *dev, int cmd, unsigned long arg) { dbg("Fix me:Not Implemented\n"); return 0; diff --git a/drivers/analog/adc.c b/drivers/analog/adc.c index ff6031ee68a..3dc8a4e42c9 100644 --- a/drivers/analog/adc.c +++ b/drivers/analog/adc.c @@ -1,9 +1,10 @@ /**************************************************************************** * drivers/analog/adc.c * + * Copyright (C) 2008-2009, 2016 Gregory Nutt. All rights reserved. * Copyright (C) 2011 Li Zhuoyi. All rights reserved. * Author: Li Zhuoyi - * History: 0.1 2011-08-04 initial version + * Gregory Nutt * * Derived from drivers/can.c * @@ -70,12 +71,14 @@ static int adc_close(FAR struct file *filep); static ssize_t adc_read(FAR struct file *fielp, FAR char *buffer, size_t buflen); static int adc_ioctl(FAR struct file *filep, int cmd, unsigned long arg); +static int adc_receive(FAR struct adc_dev_s *dev, uint8_t ch, + int32_t data); /**************************************************************************** * Private Data ****************************************************************************/ -static const struct file_operations adc_fops = +static const struct file_operations g_adc_fops = { adc_open, /* open */ adc_close, /* close */ @@ -88,6 +91,11 @@ static const struct file_operations adc_fops = #endif }; +static const struct adc_callback_s g_adc_callback = +{ + adc_receive /* au_receive */ +}; + /**************************************************************************** * Private Functions ****************************************************************************/ @@ -361,15 +369,11 @@ static int adc_ioctl(FAR struct file *filep, int cmd, unsigned long arg) return ret; } -/**************************************************************************** - * Public Functions - ****************************************************************************/ - /**************************************************************************** * Name: adc_receive ****************************************************************************/ -int adc_receive(FAR struct adc_dev_s *dev, uint8_t ch, int32_t data) +static int adc_receive(FAR struct adc_dev_s *dev, uint8_t ch, int32_t data) { FAR struct adc_fifo_s *fifo = &dev->ad_recv; int nexttail; @@ -408,12 +412,30 @@ int adc_receive(FAR struct adc_dev_s *dev, uint8_t ch, int32_t data) return err; } +/**************************************************************************** + * Public Functions + ****************************************************************************/ + /**************************************************************************** * Name: adc_register ****************************************************************************/ int adc_register(FAR const char *path, FAR struct adc_dev_s *dev) { + int ret; + + DEBUGASSERT(path != NULL && dev != NULL); + + /* Bind the upper-half callbacks to the lower half ADC driver */ + + DEBUGASSERT(dev->ad_ops != NULL && dev->ad_ops->ao_bind != NULL); + ret = dev->ad_ops->ao_bind(dev, &g_adc_callback); + if (ret < 0) + { + adbg("ERROR: Failed to bind callbacks: %d\n", ret); + return ret; + } + /* Initialize the ADC device structure */ dev->ad_ocount = 0; @@ -421,7 +443,19 @@ int adc_register(FAR const char *path, FAR struct adc_dev_s *dev) sem_init(&dev->ad_recv.af_sem, 0, 0); sem_init(&dev->ad_closesem, 0, 1); + /* Reset the ADC hardware */ + + DEBUGASSERT(dev->ad_ops->ao_reset != NULL); dev->ad_ops->ao_reset(dev); - return register_driver(path, &adc_fops, 0444, dev); + /* Register the ADC character driver */ + + ret = register_driver(path, &g_adc_fops, 0444, dev); + if (ret < 0) + { + sem_destroy(&dev->ad_recv.af_sem); + sem_destroy(&dev->ad_closesem); + } + + return ret; } diff --git a/drivers/analog/ads1242.c b/drivers/analog/ads1242.c index 93b82942c2c..ccd9c0d18d0 100644 --- a/drivers/analog/ads1242.c +++ b/drivers/analog/ads1242.c @@ -2,8 +2,10 @@ * drivers/sensors/ads1242.c * Character driver for the MCP3426 Differential Input 16 Bit Delta/Sigma ADC * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. * Copyright (C) 2015 DS-Automotion GmbH. All rights reserved. * Author: Alexander Entinger + * Gregory Nutt * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -70,6 +72,8 @@ struct ads1242_dev_s /* SPI Helpers */ +static void ads1242_lock(FAR struct spi_dev_s *spi); +static void ads1242_unlock(FAR struct spi_dev_s *spi); static void ads1242_reset(FAR struct ads1242_dev_s *dev); static void ads1242_performSelfGainCalibration( FAR struct ads1242_dev_s *dev); @@ -128,19 +132,50 @@ static const struct file_operations g_ads1242_fops = * Private Functions ****************************************************************************/ +/**************************************************************************** + * Name: ads1242_lock + * + * Description: + * Lock and configure the SPI bus. + * + ****************************************************************************/ + +static void ads1242_lock(FAR struct spi_dev_s *spi) +{ + (void)SPI_LOCK(spi, true); + SPI_SETMODE(spi, ADS1242_SPI_MODE); + SPI_SETBITS(spi, 8); + (void)SPI_HWFEATURES(spi, 0); + SPI_SETFREQUENCY(spi, ADS1242_SPI_FREQUENCY); +} + +/**************************************************************************** + * Name: ads1242_unlock + * + * Description: + * Unlock the SPI bus. + * + ****************************************************************************/ + +static void ads1242_unlock(FAR struct spi_dev_s *spi) +{ + (void)SPI_LOCK(spi, false); +} + /**************************************************************************** * Name: ads1242_reset ****************************************************************************/ static void ads1242_reset(FAR struct ads1242_dev_s *dev) { + ads1242_lock(dev->spi); + SPI_SELECT(dev->spi, 0, true); /* Set nADC_SPI_CS to low which selects the ADS1242 */ - SPI_SEND(dev->spi, ADS1242_CMD_RESET);/* Issue reset command */ - SPI_SELECT(dev->spi, 0, false); /* Set nADC_SPI_CS to high which deselects the ADS1242 */ - up_mdelay(100); /* Wait a little so the device has time to perform a proper reset */ + + ads1242_unlock(dev->spi); } /**************************************************************************** @@ -149,11 +184,13 @@ static void ads1242_reset(FAR struct ads1242_dev_s *dev) static void ads1242_performSelfGainCalibration(FAR struct ads1242_dev_s *dev) { + ads1242_lock(dev->spi); + SPI_SELECT(dev->spi, 0, true); - SPI_SEND(dev->spi, ADS1242_CMD_SELF_GAIN_CALIB); - SPI_SELECT(dev->spi, 0, false); + + ads1242_unlock(dev->spi); } /**************************************************************************** @@ -162,11 +199,13 @@ static void ads1242_performSelfGainCalibration(FAR struct ads1242_dev_s *dev) static void ads1242_performSelfOffsetCalibration(FAR struct ads1242_dev_s *dev) { + ads1242_lock(dev->spi); + SPI_SELECT(dev->spi, 0, true); - SPI_SEND(dev->spi, ADS1242_CMD_SELF_OFFSET_CALIB); - SPI_SELECT(dev->spi, 0, false); + + ads1242_unlock(dev->spi); } /**************************************************************************** @@ -176,11 +215,13 @@ static void ads1242_performSelfOffsetCalibration(FAR struct ads1242_dev_s *dev) static void ads1242_performSystemOffsetCalibration(FAR struct ads1242_dev_s *dev) { + ads1242_lock(dev->spi); + SPI_SELECT(dev->spi, 0, true); - SPI_SEND(dev->spi, ADS1242_CMD_SYSTEM_OFFSET_CALIB); - SPI_SELECT(dev->spi, 0, false); + + ads1242_unlock(dev->spi); } /**************************************************************************** @@ -190,8 +231,9 @@ ads1242_performSystemOffsetCalibration(FAR struct ads1242_dev_s *dev) static void ads1242_read_conversion_result(FAR struct ads1242_dev_s *dev, FAR uint32_t *conversion_result) { - SPI_SELECT(dev->spi, 0, true); + ads1242_lock(dev->spi); + SPI_SELECT(dev->spi, 0, true); SPI_SEND(dev->spi, ADS1242_CMD_READ_DATA); /* Delay between last SCLK edge for DIN and first SCLK edge for DOUT: @@ -212,6 +254,8 @@ static void ads1242_read_conversion_result(FAR struct ads1242_dev_s *dev, *conversion_result |= ((uint32_t)(SPI_SEND(dev->spi, 0xFF))) << 0; SPI_SELECT(dev->spi, 0, false); + + ads1242_unlock(dev->spi); } /**************************************************************************** @@ -227,11 +271,15 @@ static void ads1242_read_conversion_result(FAR struct ads1242_dev_s *dev, static void ads1242_write_reg(FAR struct ads1242_dev_s *dev, uint8_t const reg_addr, uint8_t const reg_value) { + ads1242_lock(dev->spi); + SPI_SELECT(dev->spi, 0, true); SPI_SEND(dev->spi, ADS1242_CMD_WRITE_REGISTER | reg_addr); SPI_SEND(dev->spi, 0x00); /* Write 1 Byte */ SPI_SEND(dev->spi, reg_value); SPI_SELECT(dev->spi, 0, false); + + ads1242_unlock(dev->spi); } /**************************************************************************** @@ -248,6 +296,8 @@ static void ads1242_write_reg(FAR struct ads1242_dev_s *dev, static void ads1242_read_reg(FAR struct ads1242_dev_s *dev, uint8_t const reg_addr, FAR uint8_t *reg_value) { + ads1242_lock(dev->spi); + SPI_SELECT(dev->spi, 0, true); SPI_SEND(dev->spi, ADS1242_CMD_READ_REGISTER | reg_addr); SPI_SEND(dev->spi, 0x00); /* Read 1 Byte */ @@ -261,6 +311,8 @@ static void ads1242_read_reg(FAR struct ads1242_dev_s *dev, *reg_value = SPI_SEND(dev->spi, 0xFF); SPI_SELECT(dev->spi, 0, false); + + ads1242_unlock(dev->spi); } /**************************************************************************** @@ -562,14 +614,6 @@ int ads1242_register(FAR const char *devpath, FAR struct spi_dev_s *spi, kmm_free(priv); } - /* setup SPI frequency */ - - SPI_SETFREQUENCY(spi, ADS1242_SPI_FREQUENCY); - - /* Setup SPI mode */ - - SPI_SETMODE(spi, ADS1242_SPI_MODE); - return ret; } diff --git a/drivers/analog/ads1255.c b/drivers/analog/ads1255.c index 432b7dd7660..adb8933b380 100644 --- a/drivers/analog/ads1255.c +++ b/drivers/analog/ads1255.c @@ -1,10 +1,10 @@ /************************************************************************************ * arch/drivers/analog/ads1255.c * + * Copyright (C) 2010, 2016 Gregory Nutt. All rights reserved. * Copyright (C) 2011 Li Zhuoyi. All rights reserved. * Author: Li Zhuoyi - * History: 0.1 2011-08-05 initial version - * 0.2 2011-08-25 fix bug in g_adcdev (cd_ops -> ad_ops,cd_priv -> ad_priv) + * Gregory Nutt * * This file is a part of NuttX: * @@ -39,6 +39,10 @@ * ************************************************************************************/ +/**************************************************************************** + * Included Files + ****************************************************************************/ + #include #include @@ -47,15 +51,20 @@ #include #include #include +#include #include -#include #include +#include #include #include #if defined(CONFIG_ADC_ADS1255) +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + #define ADS125X_BUFON 0x02 #define ADS125X_BUFOFF 0x00 @@ -102,11 +111,14 @@ #endif /**************************************************************************** - * ad_private Types + * Private Types ****************************************************************************/ -struct up_dev_s +struct ads1255_dev_s { + FAR const struct adc_callback_s *cb; + FAR struct spi_dev_s *spi; /* Cached SPI device reference */ + struct work_s work; uint8_t channel; uint32_t sps; uint8_t pga; @@ -114,36 +126,45 @@ struct up_dev_s const uint8_t *mux; int irq; int devno; - FAR struct spi_dev_s *spi; /* Cached SPI device reference */ }; /**************************************************************************** - * ad_private Function Prototypes + * Private Function Prototypes ****************************************************************************/ +static void adc_lock(FAR struct spi_dev_s *spi); +static void adc_unlock(FAR struct spi_dev_s *spi); + /* ADC methods */ +static int adc_bind(FAR struct adc_dev_s *dev, + FAR const struct adc_callback_s *callback); static void adc_reset(FAR struct adc_dev_s *dev); static int adc_setup(FAR struct adc_dev_s *dev); static void adc_shutdown(FAR struct adc_dev_s *dev); static void adc_rxint(FAR struct adc_dev_s *dev, bool enable); static int adc_ioctl(FAR struct adc_dev_s *dev, int cmd, unsigned long arg); + +/* Interrupt handling */ + +static void adc_worker(FAR void *arg); static int adc_interrupt(int irq, void *context); /**************************************************************************** - * ad_private Data + * Private Data ****************************************************************************/ static const struct adc_ops_s g_adcops = { - .ao_reset = adc_reset, /* ao_reset */ - .ao_setup = adc_setup, /* ao_setup */ + .ao_bind = adc_bind, /* ao_bind */ + .ao_reset = adc_reset, /* ao_reset */ + .ao_setup = adc_setup, /* ao_setup */ .ao_shutdown = adc_shutdown, /* ao_shutdown */ - .ao_rxint = adc_rxint, /* ao_rxint */ - .ao_ioctl = adc_ioctl /* ao_read */ + .ao_rxint = adc_rxint, /* ao_rxint */ + .ao_ioctl = adc_ioctl /* ao_read */ }; -static struct up_dev_s g_adcpriv = +static struct ads1255_dev_s g_adcpriv = { .mux = (const uint8_t []) { @@ -190,43 +211,112 @@ static uint8_t getspsreg(uint16_t sps) } /**************************************************************************** - * ad_private Functions + * Private Functions ****************************************************************************/ -/* Reset the ADC device. Called early to initialize the hardware. This - * is called, before ao_setup() and on error conditions. - */ -static void adc_reset(FAR struct adc_dev_s *dev) +/**************************************************************************** + * Name: adc_lock + * + * Description: + * Lock and configure the SPI bus. + * + ****************************************************************************/ + +static void adc_lock(FAR struct spi_dev_s *spi) { - FAR struct up_dev_s *priv = (FAR struct up_dev_s *)dev->ad_priv; - FAR struct spi_dev_s *spi = priv->spi; - + (void)SPI_LOCK(spi, true); SPI_SETMODE(spi, SPIDEV_MODE1); SPI_SETBITS(spi, 8); (void)SPI_HWFEATURES(spi, 0); SPI_SETFREQUENCY(spi, CONFIG_ADS1255_FREQUENCY); +} + +/**************************************************************************** + * Name: adc_unlock + * + * Description: + * Unlock the SPI bus. + * + ****************************************************************************/ + +static void adc_unlock(FAR struct spi_dev_s *spi) +{ + (void)SPI_LOCK(spi, false); +} + +/**************************************************************************** + * Name: adc_bind + * + * Description: + * Bind the upper-half driver callbacks to the lower-half implementation. This + * must be called early in order to receive ADC event notifications. + * + ****************************************************************************/ + +static int adc_bind(FAR struct adc_dev_s *dev, + FAR const struct adc_callback_s *callback) +{ + FAR struct ads1255_dev_s *priv = (FAR struct ads1255_dev_s *)dev->ad_priv; + + DEBUGASSERT(priv != NULL); + priv->cb = callback; + return OK; +} + +/**************************************************************************** + * Name: adc_reset + * + * Description: + * Reset the ADC device. Called early to initialize the hardware. This + * is called, before ao_setup() and on error conditions. + * + ****************************************************************************/ + +static void adc_reset(FAR struct adc_dev_s *dev) +{ + FAR struct ads1255_dev_s *priv = (FAR struct ads1255_dev_s *)dev->ad_priv; + FAR struct spi_dev_s *spi; + + DEBUGASSERT(priv != NULL && priv->spi != NULL); + spi = priv->spi; + + adc_lock(spi); usleep(1000); + SPI_SELECT(spi, priv->devno, true); SPI_SEND(spi, ADS125X_WREG + 0x03); /* WRITE SPS REG */ SPI_SEND(spi, 0x00); /* count=1 */ SPI_SEND(spi, 0x63); SPI_SELECT(spi, priv->devno, false); + + adc_unlock(spi); } -/* Configure the ADC. This method is called the first time that the ADC - * device is opened. This will occur when the port is first opened. - * This setup includes configuring and attaching ADC interrupts. Interrupts - * are all disabled upon return. - */ +/**************************************************************************** + * Name: adc_setup + * + * Description: + * Configure the ADC. This method is called the first time that the ADC + * device is opened. This will occur when the port is first opened. + * This setup includes configuring and attaching ADC interrupts. Interrupts + * are all disabled upon return. + * + ****************************************************************************/ -static int adc_setup(FAR struct adc_dev_s *dev) +static int adc_setup(FAR struct adc_dev_s *dev) { - FAR struct up_dev_s *priv = (FAR struct up_dev_s *)dev->ad_priv; - FAR struct spi_dev_s *spi = priv->spi; - int ret = irq_attach(priv->irq, adc_interrupt); + FAR struct ads1255_dev_s *priv = (FAR struct ads1255_dev_s *)dev->ad_priv; + FAR struct spi_dev_s *spi; + int ret; + DEBUGASSERT(priv != NULL && priv->spi != NULL); + spi = priv->spi; + + ret = irq_attach(priv->irq, adc_interrupt); if (ret == OK) { + adc_lock(spi); + SPI_SELECT(spi, priv->devno, true); SPI_SEND(spi, ADS125X_WREG); /* WRITE REG from 0 */ SPI_SEND(spi, 0x03); /* count=4+1 */ @@ -245,28 +335,47 @@ static int adc_setup(FAR struct adc_dev_s *dev) usleep(1000); SPI_SEND(spi, ADS125X_SELFCAL); SPI_SELECT(spi, priv->devno, false); + + adc_unlock(spi); up_enable_irq(priv->irq); } return ret; } -/* Disable the ADC. This method is called when the ADC device is closed. - * This method reverses the operation the setup method. - */ +/**************************************************************************** + * Name: adc_shutdown + * + * Description: + * Disable the ADC. This method is called when the ADC device is closed. + * This method reverses the operation the setup method. + * + ****************************************************************************/ static void adc_shutdown(FAR struct adc_dev_s *dev) { - FAR struct up_dev_s *priv = (FAR struct up_dev_s *)dev->ad_priv; + FAR struct ads1255_dev_s *priv = (FAR struct ads1255_dev_s *)dev->ad_priv; + + DEBUGASSERT(priv != NULL); + up_disable_irq(priv->irq); irq_detach(priv->irq); } -/* Call to enable or disable RX interrupts */ +/**************************************************************************** + * Name: adc_rxint + * + * Description: + * Call to enable or disable RX interrupts + * + ****************************************************************************/ static void adc_rxint(FAR struct adc_dev_s *dev, bool enable) { - FAR struct up_dev_s *priv = (FAR struct up_dev_s *)dev->ad_priv; + FAR struct ads1255_dev_s *priv = (FAR struct ads1255_dev_s *)dev->ad_priv; + + DEBUGASSERT(priv != NULL); + if (enable) { up_enable_irq(priv->irq); @@ -277,21 +386,44 @@ static void adc_rxint(FAR struct adc_dev_s *dev, bool enable) } } -/* All ioctl calls will be routed through this method */ +/**************************************************************************** + * Name: adc_ioctl + * + * Description: + * All ioctl calls will be routed through this method + * + ****************************************************************************/ -static int adc_ioctl(FAR struct adc_dev_s *dev, int cmd, unsigned long arg) +static int adc_ioctl(FAR struct adc_dev_s *dev, int cmd, unsigned long arg) { dbg("Fix me:Not Implemented\n"); return 0; } -static int adc_interrupt(int irq, void *context) +/**************************************************************************** + * Name: adc_worker + * + * Description: + * ADC interrupt work + * + ****************************************************************************/ + +static void adc_worker(FAR void *arg) { - FAR struct up_dev_s *priv = (FAR struct up_dev_s *)g_adcdev.ad_priv; - FAR struct spi_dev_s *spi = priv->spi; + FAR struct ads1255_dev_s *priv = (FAR struct ads1255_dev_s *)arg; + FAR struct spi_dev_s *spi; unsigned char buf[4]; unsigned char ch; + DEBUGASSERT(priv != NULL && priv->spi != NULL); + spi = priv->spi; + + /* REVISIT: Cannot perform SPI operations from an interrupt handler! + * Need to use the high priority work queue. + */ + + adc_lock(spi); + SPI_SELECT(spi, priv->devno, true); SPI_SEND(spi, ADS125X_RDATA); up_udelay(10); @@ -316,7 +448,46 @@ static int adc_interrupt(int irq, void *context) SPI_SEND(spi, ADS125X_WAKEUP); SPI_SELECT(spi, priv->devno, false); - adc_receive(&g_adcdev, priv->channel, *(int32_t *)buf); + adc_unlock(spi); + + /* Verify that the upper-half driver has bound its callback functions */ + + if (priv->cb != NULL) + { + /* Perform the data received callback */ + + DEBUGASSERT(priv->cb->au_receive != NULL); + priv->cb->au_receive(&g_adcdev, priv->channel, *(int32_t *)buf); + } + + /* Re-enable ADC interrupts */ + + up_enable_irq(priv->irq); +} + +/**************************************************************************** + * Name: adc_interrupt + * + * Description: + * ADC interrupt handler + * + ****************************************************************************/ + +static int adc_interrupt(int irq, void *context) +{ + FAR struct ads1255_dev_s *priv = (FAR struct ads1255_dev_s *)g_adcdev.ad_priv; + + DEBUGASSERT(priv != NULL); + + /* Disable further ADC interrupts until the worker thread has executed. */ + + up_disable_irq(priv->irq); + + /* Schedule the ADC work for the worker thread. Whent he sample has been + * processed, the ADC interrupt will be re-enabled. + */ + + DEBUGVERIFY(work_queue(HPWORK, &priv->work, adc_worker, priv, 0)); return OK; } @@ -341,10 +512,13 @@ static int adc_interrupt(int irq, void *context) FAR struct adc_dev_s *up_ads1255initialize(FAR struct spi_dev_s *spi, unsigned int devno) { - FAR struct up_dev_s *priv = (FAR struct up_dev_s *)g_adcdev.ad_priv; + FAR struct ads1255_dev_s *priv = (FAR struct ads1255_dev_s *)g_adcdev.ad_priv; + + DEBUGASSERT(spi != NULL); /* Driver state data */ + priv->cb = NULL; priv->spi = spi; priv->devno = devno; return &g_adcdev; diff --git a/drivers/dev_null.c b/drivers/dev_null.c index eca30dd8e10..ff535df3444 100644 --- a/drivers/dev_null.c +++ b/drivers/dev_null.c @@ -65,15 +65,18 @@ static int devnull_poll(FAR struct file *filep, FAR struct pollfd *fds, static const struct file_operations devnull_fops = { - 0, /* open */ - 0, /* close */ + NULL, /* open */ + NULL, /* close */ devnull_read, /* read */ devnull_write, /* write */ - 0, /* seek */ - 0 /* ioctl */ + NULL, /* seek */ + NULL /* ioctl */ #ifndef CONFIG_DISABLE_POLL , devnull_poll /* poll */ #endif +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; /**************************************************************************** diff --git a/drivers/dev_zero.c b/drivers/dev_zero.c index 0bb31688be8..5a0ce669252 100644 --- a/drivers/dev_zero.c +++ b/drivers/dev_zero.c @@ -65,15 +65,18 @@ static int devzero_poll(FAR struct file *filep, FAR struct pollfd *fds, static const struct file_operations devzero_fops = { - 0, /* open */ - 0, /* close */ + NULL, /* open */ + NULL, /* close */ devzero_read, /* read */ devzero_write, /* write */ - 0, /* seek */ - 0 /* ioctl */ + NULL, /* seek */ + NULL /* ioctl */ #ifndef CONFIG_DISABLE_POLL , devzero_poll /* poll */ #endif +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; /**************************************************************************** diff --git a/drivers/lcd/Kconfig b/drivers/lcd/Kconfig index a7be77550c3..441e6fba261 100644 --- a/drivers/lcd/Kconfig +++ b/drivers/lcd/Kconfig @@ -3,7 +3,23 @@ # see the file kconfig-language.txt in the NuttX tools repository. # -comment "Common LCD Settings" +menu "LCD Driver Support" + +menuconfig LCD + bool "Graphic LCD Driver Support" + default n + select NX_LCDDRIVER if NX + ---help--- + Drivers for parallel and serial LCD and OLED type devices. These + drivers support interfaces as defined in include/nuttx/lcd/lcd.h + + This selection is necessary to enable support for LCD drivers in + drivers/lcd as well as for board-specific LCD drivers in the configs/ + subdirectories. + +if LCD + +comment "Common Graphipc LCD Settings" config LCD_CONSOLE bool "LCD console output" @@ -990,8 +1006,21 @@ config LCD_RA8875_EXTENDED driver anyway. endif # LCD_RA8875 +endif # LCD -comment "Alphanumeric/Segment LCD Devices" +menuconfig SLCD + bool "Alphanumeric/Segment LCD Devices" + default n + ---help--- + Drivers for Alphanumeric ans Segment LCDs (SLCDs). These + drivers support interfaces as defined in include/nuttx/lcd/slcd_ioctl.h + amd slcd_codec.h + + This selection is necessary to enable support for SLCD drivers in + drivers/lcd as well as for board-specific LCD drivers in the configs/ + subdirectories. + +if SLCD config LCD_LCD1602 bool "LCD 1602" @@ -1003,3 +1032,21 @@ config LCD_LCD1602 NOTE: There is no common implementation of the LCD1602 driver. Rather, there are board-by-board implementations. See, for example, configs/pcblogic-pic32mx/src/up_lcd1602.c. + +config LCD_BACKPACK + bool "PCF8574 LCD Backpack" + default n + depends on I2C + select LIB_SLCDCODEC + ---help--- + Enable support for PCF8574 LCD Backpack driver. This driver supports + an interface board that is based on the PCF8574 io expander and + supports the HD44780-based (or compatible) LCD modules. There are + a myriad of different vendors of such, but they are principally the + same, save wiring and minor features like jumpers for I2C addresses. + This driver supports known and unknown variants. + + See pcf8574_lcd_backpack_readme.txt + +endif # SLCD +endmenu # LCD Driver Support diff --git a/drivers/lcd/Make.defs b/drivers/lcd/Make.defs index 1becc0fa973..3eb60c791c2 100644 --- a/drivers/lcd/Make.defs +++ b/drivers/lcd/Make.defs @@ -33,11 +33,9 @@ # ############################################################################ -# Don't build anything if there is no NX support for LCD drivers - ifeq ($(CONFIG_NX_LCDDRIVER),y) -# Include LCD drivers +# Include support for Graphics LCD drivers ifeq ($(CONFIG_LCD_P14201),y) CSRCS += p14201.c @@ -102,11 +100,25 @@ endif ifeq ($(CONFIG_LCD_RA8875),y) CSRCS += ra8875.c endif +endif # CONFIG_NX_LCDDRIVER -# Include LCD driver build support +ifeq ($(CONFIG_SLCD),y) -DEPPATH += --dep-path lcd -VPATH += :lcd -CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)lcd} +# Include support for Alphanumeric/Segment LCD drivers + +ifeq ($(CONFIG_LCD_BACKPACK),y) + CSRCS += pcf8574_lcd_backpack.c endif +endif # CONFIG_SLCD +# Include LCD driver build support (the nested if-then-else implements an OR) + +ifeq ($(CONFIG_NX_LCDDRIVER),y) + DEPPATH += --dep-path lcd + VPATH += :lcd + CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)lcd} +else ifeq ($(CONFIG_SLCD),y) + DEPPATH += --dep-path lcd + VPATH += :lcd + CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)lcd} +endif diff --git a/drivers/lcd/README.txt b/drivers/lcd/README.txt index 0a49c64efcb..85d4f52d71b 100644 --- a/drivers/lcd/README.txt +++ b/drivers/lcd/README.txt @@ -149,6 +149,11 @@ Re-usable LCD drivers reside in the drivers/lcd directory: configs/stm32f4discovery configs/sam4l-xplained + Segment LCDS (SLCDs): + --------------------- + + pcf8574_lcd_backpack.c: See pcf8574_lcd_backpack_readme.txt. + Examples: configs/ ================== diff --git a/drivers/lcd/pcf8574_lcd_backpack.c b/drivers/lcd/pcf8574_lcd_backpack.c new file mode 100644 index 00000000000..a8e288c6cc3 --- /dev/null +++ b/drivers/lcd/pcf8574_lcd_backpack.c @@ -0,0 +1,1622 @@ +/**************************************************************************** + * drivers/lcd/pcf8574_lcd_backpack.c + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Author: dev@ziggurat29.com + * + * 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. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include +#include + +#include +#include +#include +#include +#include + +#ifndef CONFIG_LIB_SLCDCODEC +# error please also select Library Routines, Segment LCD CODEC +#endif + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/* The PCF8574 is a 100 KHz device */ + +#define I2C_FREQ 100000 + +/* timing characteristics of the LCD interface */ + +#define DELAY_US_NYBBLE0 20 +#define DELAY_US_NYBBLE1 10 +#define DELAY_US_WRITE 40 +#define DELAY_US_HOMECLEAR 1500 + +/* HD44780 commands */ + +#define CMD_CLEAR 0x01 +#define CMD_HOME 0x02 +#define CMD_CURSOR_ON_SOLID 0x0e +#define CMD_CURSOR_OFF 0x0c +#define CMD_CURSOR_ON_BLINK 0x0f +#define CMD_SET_CGADDR 0x40 +#define CMD_SET_DDADDR 0x80 + +#ifdef CONFIG_DEBUG_LCD +# define lcddbg dbg +# define lcdvdbg vdbg +#else +# define lcddbg(x...) +# define lcdvdbg(x...) +#endif + +#define MAX_OPENCNT (255) /* Limit of uint8_t */ + +/**************************************************************************** + * Private Types + ****************************************************************************/ + +struct pcf8574_lcd_dev_s +{ + FAR struct i2c_master_s *i2c; /* I2C interface */ + struct pcf8574_lcd_backpack_config_s cfg; /* gpio configuration */ + uint8_t bl_bit; /* current backlight bit */ + uint8_t refs; /* Number of references */ + uint8_t unlinked; /* We are unlinked, so teardown on last close */ + sem_t sem_excl; /* mutex */ +}; + +struct lcd_instream_s +{ + struct lib_instream_s stream; + FAR const char *buffer; + ssize_t nbytes; +}; + +/**************************************************************************** + * Private Function Prototypes + ****************************************************************************/ + +/* Character driver methods */ + +static int pcf8574_lcd_open(FAR struct file *filep); +static int pcf8574_lcd_close(FAR struct file *filep); +static ssize_t pcf8574_lcd_read(FAR struct file *filep, FAR char *buffer, + size_t buflen); +static ssize_t pcf8574_lcd_write(FAR struct file *filep, + FAR const char *buffer, size_t buflen); +static off_t pcf8574_lcd_seek(FAR struct file *filep, off_t offset, int whence); +static int pcf8574_lcd_ioctl(FAR struct file *filep, int cmd, + unsigned long arg); +#ifndef CONFIG_DISABLE_POLL +static int pcf8574lcd_poll(FAR struct file *filep, FAR struct pollfd *fds, + bool setup); +#endif +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS +static int pcf8574_lcd_unlink(FAR struct inode *inode); +#endif + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +static const struct file_operations g_pcf8574_lcd_fops = +{ + pcf8574_lcd_open, /* open */ + pcf8574_lcd_close, /* close */ + pcf8574_lcd_read, /* read */ + pcf8574_lcd_write, /* write */ + pcf8574_lcd_seek, /* seek */ + pcf8574_lcd_ioctl, /* ioctl */ +#ifndef CONFIG_DISABLE_POLL + pcf8574lcd_poll, /* poll */ +#endif +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + pcf8574_lcd_unlink /* unlink */ +#endif +}; + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: pca8574_write + * + * Description: + * primitive I2C write operation for the PCA8574, which is the IO expander + * device used on the board. The board essentially byte-bangs the + * parallel interface in nybble mode much as one might with a conventional + * GPIO based interface. The I2C interface simply sets the state of the + * 8 IO lines to control the 4 data, 3 control, and one for backlight, + * signals. + * + ****************************************************************************/ + +static void pca8574_write(FAR struct pcf8574_lcd_dev_s *priv, uint8_t data) +{ + struct i2c_config_s config; + int ret; + + /* Set up the I2C configuration */ + + config.frequency = I2C_FREQ; + config.address = priv->cfg.addr; + config.addrlen = 7; + + /* Write the value */ + + ret = i2c_write(priv->i2c, &config, &data, 1); + if (ret < 0) + { + lcdvdbg("pca8574_write() failed: %d\n", ret); + return; + } + + return; +} + +/**************************************************************************** + * Name: pca8574_read + * + * Description: + * primitive I2C read operation for the PCA8574, which is the IO expander + * device used on the board. The PCF8574 is 'interesting' in that it doesn't + * really have a data direction register, but instead the outputs are current- + * limited when high, so by setting an IO line high, you are also making it + * an input. Consequently, before using this method, you'll need to perform a + * pca8574_write() setting the bits you are interested in reading to 1's, + * then call this method. + * + ****************************************************************************/ + +static int pca8574_read(FAR struct pcf8574_lcd_dev_s *priv, uint8_t* data) +{ + struct i2c_config_s config; + int ret; + + /* Set up the I2C configuration */ + + config.frequency = I2C_FREQ; + config.address = priv->cfg.addr; + config.addrlen = 7; + + /* Read the value */ + + ret = i2c_read(priv->i2c, &config, data, 1); + if (ret < 0) + { + lcdvdbg("pca8574_read() failed: %d\n", ret); + } + + return ret; +} + +/**************************************************************************** + * Name: lcd_backlight + * + * Description: + * turn on, or off, the LCD backlight + * + ****************************************************************************/ + +static void lcd_backlight(FAR struct pcf8574_lcd_dev_s *priv, bool blOn) +{ + uint8_t data; + + data = ((blOn && priv->cfg.bl_active_high) || + (!blOn && !priv->cfg.bl_active_high)) ? (1 << priv->cfg.bl) : 0; + pca8574_write(priv, data); + priv->bl_bit = data; +} + +/**************************************************************************** + * Name: rc2addr + * + * Description: + * This converts a row/column pair to a screen memory address. + * + ****************************************************************************/ + +static inline uint8_t rc2addr(FAR struct pcf8574_lcd_dev_s *priv, + uint8_t row, uint8_t col) +{ + if (row < 2) + { + /* 1 and 2 line displays are simple; line0 @ 0x00, line1 @ 0x40 */ + + return row * 0x40 + col; + } + else + { + /* 4 line displays are intersting; third line really is a continuation + * of first line, and fourth line is a continuation of second. + */ + + return (row - 2) * 0x40 + (col + priv->cfg.cols); + } +} + +/**************************************************************************** + * Name: addr2rc + * + * Description: + * This converts a screen memory address to a row/column pair. + * + ****************************************************************************/ + +static inline void addr2rc(FAR struct pcf8574_lcd_dev_s *priv, + uint8_t addr, uint8_t* row, uint8_t* col) +{ + + *row = addr / 0x40; + *col = addr % 0x40; + + if (*col >= priv->cfg.cols) + { + /* 4 line displays have third and fourth lines really as continuation + * of first and second. + */ + + *row += 2; + *col -= priv->cfg.cols; + } +} + +/**************************************************************************** + * Name: prepare_nybble + * + * Description: + * This is a bit tedious, but scramble the bits of the nybble into position + * as per this board's particular wiring. Most boards are either on the + * top four bits, or bottom four, so a shift would do typically in those + * cases, but this gives us ultimate flexibility. + * + ****************************************************************************/ + +uint8_t prepare_nybble(FAR struct pcf8574_lcd_dev_s *priv, uint8_t nybble) +{ + uint8_t lcddata = 0; + + if (nybble & 0x08) + { + lcddata |= (1 << priv->cfg.d7); + } + + if (nybble & 0x04) + { + lcddata |= (1 << priv->cfg.d6); + } + + if (nybble & 0x02) + { + lcddata |= (1 << priv->cfg.d5); + } + + if (nybble & 0x01) + { + lcddata |= (1 << priv->cfg.d4); + } + + return lcddata; +} + +/**************************************************************************** + * Name: unprepare_nybble + * + * Description: + * This is the opposite of prepare_nybble(), and is used to unscramble bits + * when reading data from the display, as per board wiring. + * + ****************************************************************************/ + +uint8_t unprepare_nybble(FAR struct pcf8574_lcd_dev_s *priv, uint8_t lcddata) +{ + uint8_t data = 0; + + if (lcddata & (1 << priv->cfg.d7)) + { + data |= 0x08; + } + + if (lcddata & (1 << priv->cfg.d6)) + { + data |= 0x04; + } + + if (lcddata & (1 << priv->cfg.d5)) + { + data |= 0x02; + } + + if (lcddata & (1 << priv->cfg.d4)) + { + data |= 0x01; + } + + return data; +} + +/**************************************************************************** + * Name: latch_nybble + * + * Description: + * Latch a nybble on the LCD bus. This is done for each of two halves of a + * write operation in 4-bit mode. The 'rs' param is false for command + * transfers, and true for data transfers. + * + ****************************************************************************/ + +static void latch_nybble(FAR struct pcf8574_lcd_dev_s *priv, uint8_t nybble, + bool rs) +{ + uint8_t lcddata; + uint8_t en_bit; + uint8_t rs_bit; + + en_bit = 1 << priv->cfg.en; + rs_bit = rs ? (1 << priv->cfg.rs) : 0; + + /* Put the nybble, preserving backlight, reset R/~W and maybe RS */ + + lcddata = prepare_nybble(priv, nybble) | priv->bl_bit | rs_bit; + pca8574_write(priv, lcddata); + + /* Now set EN */ + + lcddata |= en_bit; + pca8574_write(priv, lcddata); + up_udelay(DELAY_US_NYBBLE0); /* setup */ + + /* Latch on EN falling edge */ + + lcddata &= ~en_bit; + pca8574_write(priv, lcddata); + up_udelay(DELAY_US_NYBBLE1); /* hold */ +} + +/**************************************************************************** + * Name: load_nybble + * + * Description: + * Load a nybble from the LCD bus. This is done for each of two halves of a + * read operation in 4-bit mode. The 'rs' param is false for command + * transfers (the only one is to read status and the address register), and + * true for data transfers. + * + ****************************************************************************/ + +static uint8_t load_nybble(FAR struct pcf8574_lcd_dev_s *priv, bool rs) +{ + uint8_t lcddata; + uint8_t en_bit; + uint8_t rs_bit; + uint8_t rw_bit; + uint8_t data; + + en_bit = 1 << priv->cfg.en; + rs_bit = rs ? (1 << priv->cfg.rs) : 0; + rw_bit = 1 << priv->cfg.rw; + + /* Put highs on the data lines, preserve, set R/~W and maybe RS */ + + lcddata = prepare_nybble(priv, 0x0f) | priv->bl_bit | rw_bit | rs_bit; + pca8574_write(priv, lcddata); + + /* Now set EN */ + + lcddata |= en_bit; + pca8574_write(priv, lcddata); + up_udelay(DELAY_US_NYBBLE0); /* setup */ + + /* Now read the data */ + + pca8574_read(priv, &data); + data = unprepare_nybble(priv, data); + + /* Transaction completed on EN falling edge */ + + lcddata &= ~en_bit; + pca8574_write(priv, lcddata); + up_udelay(DELAY_US_NYBBLE1); /* hold */ + + return data; +} + +/**************************************************************************** + * Name: lcd_putcmd + * + * Description: + * Write a command to the LCD. Most of the time this is done in nybble + * mode in two phases, but in special cases (like initialization) we do not + * do two phases. + * + ****************************************************************************/ + +static void lcd_putcmd(FAR struct pcf8574_lcd_dev_s *priv, uint8_t data) +{ + latch_nybble(priv, data >> 4, false); + latch_nybble(priv, data, false); + up_udelay(DELAY_US_WRITE); +} + +/**************************************************************************** + * Name: lcd_putdata + * + * Description: + * Write a byte to the LCD. This is used both for screen data and for + * character generator data, depending on a previous command that selected + * which ever is the destination. + * + ****************************************************************************/ + +static inline void lcd_putdata(FAR struct pcf8574_lcd_dev_s *priv, + uint8_t data) +{ + latch_nybble(priv, data >> 4, true); + latch_nybble(priv, data, true); + up_udelay(DELAY_US_WRITE); +} + +/**************************************************************************** + * Name: lcd_getdata + * + * Description: + * Read a data byte from the LCD. + * + ****************************************************************************/ + +static inline uint8_t lcd_getdata(FAR struct pcf8574_lcd_dev_s *priv) +{ + uint8_t data; + data = (load_nybble(priv, true) << 4) | load_nybble(priv, true); + return data; +} + +/**************************************************************************** + * Name: lcd_getcmd + * + * Description: + * Read a command byte from the LCD. There really is only one such read: + * get 'busy' status, and current address value. + * + ****************************************************************************/ + +static inline uint8_t lcd_getcmd(FAR struct pcf8574_lcd_dev_s *priv) +{ + uint8_t data; + data = (load_nybble(priv, false) << 4) | load_nybble(priv, false); + return data; +} + +/**************************************************************************** + * Name: lcd_read_busy_addr + * + * Description: + * Read the busy flag, and, optionally, the current value of the address + * register (data or character generator dependent on a previous command). + * + ****************************************************************************/ + +static bool lcd_read_busy_addr(FAR struct pcf8574_lcd_dev_s *priv, uint8_t* addr) +{ + uint8_t data = lcd_getcmd(priv); + + if (NULL != addr) + { + *addr = data & 0x7f; + } + + return (data & 0x80) ? true : false; +} + +/**************************************************************************** + * Name: lcd_init + * + * Description: + * perform the initialization sequence to get the LCD into a known state. + * + ****************************************************************************/ + +static void lcd_init(FAR struct pcf8574_lcd_dev_s *priv) +{ + /* Wait for more than 15 ms after Vcc for the LCD to stabilize */ + + usleep(50000); + + /* Perform the init sequence. This sequence of commands is constructed so + * that it will get the device into nybble mode irrespective of what state + * the device is currently in (could be 8 bit, 4 bit nyb 0, 4 bit nyb 1). + * By sending the 'set 8-bit mode' three times, we will definitely end up + * in 8 bit mode, and then we can reliably transition to 4 bit mode for + * the remainder of operations. + */ + + /* Send Command 0x30, set 8-bit mode, and wait > 4.1 ms */ + + latch_nybble(priv, 0x30>>4, false); + usleep(5000); + + /* Send Command 0x30, set 8-bit mode, and wait > 100 us */ + + latch_nybble(priv, 0x30>>4, false); + usleep(5000); + + /* Send Command 0x30, set 8-bit mode */ + + latch_nybble(priv, 0x30>>4, false); + usleep(200); + + /* now Function set: Set interface to be 4 bits long (only 1 cycle write for the first time). */ + + latch_nybble(priv, 0x20>>4, false); + usleep(5000); + + /* Function set: DL=0;Interface is 4 bits, N=1 (2 Lines), F=0 (5x8 dots font) */ + + lcd_putcmd(priv, 0x28); + + /* Display Off: D=0 (Display off), C=0 (Cursor Off), B=0 (Blinking Off) */ + + lcd_putcmd(priv, 0x08); + + /* Display Clear */ + + lcd_putcmd(priv, CMD_CLEAR); + up_udelay(DELAY_US_HOMECLEAR); /* clear needs extra time */ + + /* Entry Mode Set: I/D=1 (Increment), S=0 (No shift) */ + + lcd_putcmd(priv, 0x06); + + /* Display On, Cursor Off */ + + lcd_putcmd(priv, 0x0C); +} + +/**************************************************************************** + * Name: lcd_create_char + * + * Description: + * This creates a custom character pattern. There can be 8 5x8 patterns. + * The bitmap proceeds top to bottom, msb-lsb, and is right justified (i.e. + * only bits 4-0 are used). By convention, you are meant to always leave the + * last line (byte) zero so that the cursor can use this line, but this is + * not strictly required. + * + * Parameters: + * priv - device instance + * idxchar - which character is being imaged; 0 - 7 + * chardata - the character image bitmap; must be 8 bytes always + * + ****************************************************************************/ + +static void lcd_create_char(FAR struct pcf8574_lcd_dev_s *priv, + uint8_t idxchar, const uint8_t *chardata) +{ + int nIdx; + uint8_t addr; + + (void)lcd_read_busy_addr(priv, &addr); + lcd_putcmd(priv, CMD_SET_CGADDR | (idxchar << 3)); /* set CGRAM address */ + + for (nIdx = 0; nIdx < 8; ++nIdx) + { + lcd_putdata(priv, chardata[nIdx]); + } + + lcd_putcmd(priv, CMD_SET_DDADDR | addr); /* restore DDRAM address */ +} + +/**************************************************************************** + * Name: lcd_set_curpos + * + * Description: + * This sets the cursor position based on row, column addressing. + * + * Parameters: + * priv - device instance + * row - row position + * col - column position + * + ****************************************************************************/ + +static void lcd_set_curpos(FAR struct pcf8574_lcd_dev_s *priv, + uint8_t row, uint8_t col) +{ + uint8_t addr; + addr = rc2addr(priv, row, col); + lcd_putcmd(priv, CMD_SET_DDADDR | addr); /* set DDRAM address */ +} + +/**************************************************************************** + * Name: lcd_get_curpos + * + * Description: + * This gets the cursor position based on row, column addressing. + * + * Parameters: + * priv - device instance + * row - row position + * col - column position + * + ****************************************************************************/ + +static void lcd_get_curpos(FAR struct pcf8574_lcd_dev_s *priv, + uint8_t *row, uint8_t *col) +{ + uint8_t addr; + + (void)lcd_read_busy_addr(priv, &addr); + addr2rc(priv, addr, row, col); +} + +/**************************************************************************** + * Name: lcd_scroll_up + * + * Description: + * Scroll the display up, and clear the new (last) line. + * + ****************************************************************************/ + +static void lcd_scroll_up(FAR struct pcf8574_lcd_dev_s *priv) +{ + uint8_t *data; + int nRow; + int nCol; + + data = (uint8_t *)malloc(priv->cfg.cols); + if (NULL == data) + { + lcdvdbg("Failed to allocate buffer in lcd_scroll_up()\n"); + return; + } + + for (nRow = 1; nRow < priv->cfg.rows; ++nRow) + { + lcd_set_curpos(priv, nRow, 0); + for (nCol = 0; nCol < priv->cfg.cols; ++nCol) + { + data[nCol] = lcd_getdata(priv); + } + + lcd_set_curpos(priv, nRow - 1, 0); + for (nCol = 0; nCol < priv->cfg.cols; ++nCol) + { + lcd_putdata(priv, data[nCol]); + } + } + + lcd_set_curpos(priv, priv->cfg.rows - 1, 0); + for (nCol = 0; nCol < priv->cfg.cols; ++nCol) + { + lcd_putdata(priv, ' '); + } + + lcd_set_curpos(priv, priv->cfg.rows - 1, 0); + + free(data); + return; +} + +/**************************************************************************** + * Name: lcd_codec_action + * + * Description: + * Perform an 'action' as per the Segment LCD codec. + * + * Parameters: + * priv - device instance + * code - SLCD code action code + * count - count param for those actions that take it + * + ****************************************************************************/ + +static void lcd_codec_action(FAR struct pcf8574_lcd_dev_s *priv, + enum slcdcode_e code, uint8_t count) +{ + switch (code) + { + /* Erasure */ + + case SLCDCODE_BACKDEL: /* Backspace (backward delete) N characters */ + { + if (count <= 0) /* silly case */ + break; + + else + { + uint8_t row; + uint8_t col; + + lcd_get_curpos(priv, &row, &col); + if (count > col) /* saturate to preceding columns available */ + { + count = col; + } + + lcd_set_curpos(priv, row, col-count); + } + + /* ... and conscientiously fall through to next case ... */ + } + + case SLCDCODE_FWDDEL: /* Delete (forward delete) N characters, moving text */ + { + if (count <= 0) /* silly case */ + { + break; + } + + else + { + uint8_t row; + uint8_t col; + uint8_t start; + uint8_t end; + uint8_t nIdx; + uint8_t data; + + lcd_get_curpos(priv, &row, &col); + start = col + count; + + if (start >= priv->cfg.cols) /* silly case of nothing left */ + { + break; + } + + end = start + count; + if (end > priv->cfg.cols) /* saturate */ + { + end = priv->cfg.cols; + } + + for(nIdx = col; nIdx < end; ++start, ++nIdx) /* much like memmove */ + { + lcd_set_curpos(priv, row, start); + data = lcd_getdata(priv); + lcd_set_curpos(priv, row, nIdx); + lcd_putdata(priv, data); + } + + for(;nIdx < priv->cfg.cols; ++nIdx) /* much like memset */ + { + lcd_putdata(priv, ' '); + } + + lcd_set_curpos(priv, row, col); + } + } + break; + + case SLCDCODE_ERASE: /* Erase N characters from the cursor position */ + if (count > 0) + { + uint8_t row; + uint8_t col; + uint8_t end; + uint8_t nIdx; + + lcd_get_curpos(priv, &row, &col); + end = col + count; + if (end > priv->cfg.cols) + { + end = priv->cfg.cols; + } + + for (nIdx = col; nIdx < end; ++nIdx) + { + lcd_putdata(priv, ' '); + } + + lcd_set_curpos(priv, row, col); + } + break; + + case SLCDCODE_CLEAR: /* Home the cursor and erase the entire display */ + { + lcd_putcmd(priv, CMD_CLEAR); + up_udelay(DELAY_US_HOMECLEAR); /* clear needs extra time */ + } + break; + + case SLCDCODE_ERASEEOL: /* Erase from the cursor position to the end of line */ + { + uint8_t row; + uint8_t col; + uint8_t nIdx; + + lcd_get_curpos(priv, &row, &col); + + for (nIdx = col; nIdx < priv->cfg.cols; ++nIdx) + { + lcd_putdata(priv, ' '); + } + + lcd_set_curpos(priv, row, col); + } + break; + + /* Cursor movement */ + + case SLCDCODE_LEFT: /* Cursor left by N characters */ + { + uint8_t row; + uint8_t col; + + lcd_get_curpos(priv, &row, &col); + if (count > col) + { + col = 0; + } + else + { + col -= count; + } + + lcd_set_curpos(priv, row, col); + } + break; + + case SLCDCODE_RIGHT: /* Cursor right by N characters */ + { + uint8_t row; + uint8_t col; + + lcd_get_curpos(priv, &row, &col); + col += count; + if (col >= priv->cfg.cols) + { + col = priv->cfg.cols-1; + } + + lcd_set_curpos(priv, row, col); + } + break; + + case SLCDCODE_UP: /* Cursor up by N lines */ + { + uint8_t row; + uint8_t col; + + lcd_get_curpos(priv, &row, &col); + if (count > row) + { + row = 0; + } + else + { + row -= count; + } + + lcd_set_curpos(priv, row, col); + } + break; + + case SLCDCODE_DOWN: /* Cursor down by N lines */ + { + uint8_t row; + uint8_t col; + + lcd_get_curpos(priv, &row, &col); + row += count; + if (row >= priv->cfg.rows) + { + row = priv->cfg.rows - 1; + } + + lcd_set_curpos(priv, row, col); + } + break; + + case SLCDCODE_HOME: /* Cursor home */ + { + uint8_t row; + uint8_t col; + + lcd_get_curpos(priv, &row, &col); + lcd_set_curpos(priv, row, 0); + } + break; + + case SLCDCODE_END: /* Cursor end */ + { + uint8_t row; + uint8_t col; + + lcd_get_curpos(priv, &row, &col); + lcd_set_curpos(priv, row, priv->cfg.cols - 1); + } + break; + + case SLCDCODE_PAGEUP: /* Cursor up by N pages */ + case SLCDCODE_PAGEDOWN: /* Cursor down by N pages */ + break; /* Not supportable on this SLCD */ + + /* Blinking */ + + case SLCDCODE_BLINKSTART: /* Start blinking with current cursor position */ + lcd_putcmd(priv, CMD_CURSOR_ON_BLINK); + break; + + case SLCDCODE_BLINKEND: /* End blinking after the current cursor position */ + case SLCDCODE_BLINKOFF: /* Turn blinking off */ + lcd_putcmd(priv, CMD_CURSOR_OFF); + break; /* Not implemented */ + + /* These are actually unreportable errors */ + + default: + case SLCDCODE_NORMAL: /* Not a special keycode */ + break; + } +} + +/**************************************************************************** + * Name: lcd_getstream + * + * Description: + * Get one character from the LCD codec stream. + * + ****************************************************************************/ + +static int lcd_getstream(FAR struct lib_instream_s *instream) +{ + FAR struct lcd_instream_s *lcdstream = (FAR struct lcd_instream_s *)instream; + + if (lcdstream->nbytes > 0) + { + lcdstream->nbytes--; + lcdstream->stream.nget++; + return (int)*lcdstream->buffer++; + } + + return EOF; +} + +/**************************************************************************** + * Name: lcd_fpos_to_curpos + * + * Description: + * Convert a file logical offset to a screen cursor pos (row,col). This + * discounts 'synthesized' line feeds at the end of screen lines. + * + ****************************************************************************/ + +static void lcd_fpos_to_curpos(FAR struct pcf8574_lcd_dev_s *priv, + off_t fpos, uint8_t *row, uint8_t *col, bool* onlf) +{ + int virtcols; + + virtcols = (priv->cfg.cols + 1); + + /* Determine if this is a 'virtual' position (on the synthetic LF) */ + + *onlf = (priv->cfg.cols == fpos % virtcols); + + /* Adjust off any preceding synthetic LF's to get linear position */ + + fpos -= fpos / virtcols; + + /* Compute row/col from linear position */ + + *row = fpos / priv->cfg.cols; + *col = fpos % priv->cfg.cols; +} + +/**************************************************************************** + * Name: lcd_curpos_to_fpos + * + * Description: + * Convert a screen cursor pos (row,col) to a file logical offset. This + * includes 'synthesized' line feeds at the end of screen lines. + * + ****************************************************************************/ + +static void lcd_curpos_to_fpos(FAR struct pcf8574_lcd_dev_s *priv, + uint8_t row, uint8_t col, off_t* fpos) +{ + /* the logical file position is the linear position plus any synthetic LF */ + + *fpos = (row * priv->cfg.cols) + col + row; +} + +/**************************************************************************** + * Name: pcf8574_lcd_open + * + * Description: + * requisite device 'open' method; we don't do anything special + * + ****************************************************************************/ + +static int pcf8574_lcd_open(FAR struct file *filep) +{ + FAR struct inode *inode = filep->f_inode; + FAR struct pcf8574_lcd_dev_s *priv = (FAR struct pcf8574_lcd_dev_s *)inode->i_private; + + /* Increment the reference count */ + + sem_wait(&priv->sem_excl); + if (priv->refs == MAX_OPENCNT) + { + return -EMFILE; + } + else + { + priv->refs++; + } + + sem_post(&priv->sem_excl); + return OK; +} + +/**************************************************************************** + * Name: pcf8574_lcd_close + * + * Description: + * requisite device 'close' method; we don't do anything special + * + ****************************************************************************/ + +static int pcf8574_lcd_close(FAR struct file *filep) +{ + FAR struct inode *inode = filep->f_inode; + FAR struct pcf8574_lcd_dev_s *priv = (FAR struct pcf8574_lcd_dev_s *)inode->i_private; + int ret; + + /* Decrement the reference count */ + + sem_wait(&priv->sem_excl); + + if (priv->refs == 0) + { + ret = -EIO; + } + else + { + priv->refs--; + + /* If we had previously unlinked, but there were open references at the + * time, we need to do the final teardown now. + */ + + if (priv->refs == 0 && priv->unlinked) + { + /* We have no real teardown at present */ + } + ret = OK; + } + + sem_post(&priv->sem_excl); + return ret; +} + +/**************************************************************************** + * Name: pcf8574_lcd_read + * + * Description: + * This simply reads as much of the display memory as possible. This is + * generally not very interesting, but we do it in a way that allows us to + * 'cat' the LCD contents via the shell. + * + ****************************************************************************/ + +static ssize_t pcf8574_lcd_read(FAR struct file *filep, FAR char *buffer, + size_t buflen) +{ + FAR struct inode *inode = filep->f_inode; + FAR struct pcf8574_lcd_dev_s *priv = (FAR struct pcf8574_lcd_dev_s *)inode->i_private; + int nIdx; + uint8_t addr; + uint8_t row; + uint8_t col; + bool onlf; + + sem_wait(&priv->sem_excl); + + /* Get current cursor position so we can restore it */ + + (void)lcd_read_busy_addr(priv, &addr); + + /* Convert file position to row/col address and position DDADDR there */ + + lcd_fpos_to_curpos(priv, filep->f_pos, &row, &col, &onlf); + lcd_set_curpos(priv, row, col); + + /* Read as much of the display as possible */ + + nIdx = 0; + while (nIdx < buflen && row < priv->cfg.rows) + { + /* Synthesize end-of-line LF and advance to start of next row */ + + if (onlf) + { + /* Synthesize LF for all but last row */ + + if ( row < priv->cfg.rows-1) + { + buffer[nIdx] = '\x0a'; + onlf = false; + ++filep->f_pos; + ++nIdx; + } + ++row; + col = 0; + continue; + } + + /* If we are at start of line we will need to update DDRAM address */ + + if (0 == col) + { + lcd_set_curpos(priv, row, 0); + } + + buffer[nIdx] = lcd_getdata(priv); + + ++filep->f_pos; + ++nIdx; + ++col; + + /* If we are now at the end of a line, we setup for the synthetic LF */ + + if (priv->cfg.cols == col) + { + onlf = true; + } + } + + lcd_putcmd(priv, CMD_SET_DDADDR | addr); /* Restore DDRAM address */ + + sem_post(&priv->sem_excl); + return nIdx; +} + +/**************************************************************************** + * Name: pcf8574_lcd_write + * + * Description: + * Output a sequence of characters to the device. + * + ****************************************************************************/ + +static ssize_t pcf8574_lcd_write(FAR struct file *filep, + FAR const char *buffer, + size_t buflen) +{ + FAR struct inode *inode = filep->f_inode; + FAR struct pcf8574_lcd_dev_s *priv = (FAR struct pcf8574_lcd_dev_s *)inode->i_private; + struct lcd_instream_s instream; + uint8_t row; + uint8_t col; + struct slcdstate_s state; + enum slcdret_e result; + uint8_t ch; + uint8_t count; + + sem_wait(&priv->sem_excl); + + /* Initialize the stream for use with the SLCD CODEC */ + + instream.stream.get = lcd_getstream; + instream.stream.nget = 0; + instream.buffer = buffer; + instream.nbytes = buflen; + + /* Get the current cursor position now; we'll keep track of it as we go */ + + lcd_get_curpos(priv, &row, &col); + + /* Now decode and process every byte in the input buffer */ + + memset(&state, 0, sizeof(struct slcdstate_s)); + while ((result = slcd_decode(&instream.stream, &state, &ch, &count)) != SLCDRET_EOF) + { + if (result == SLCDRET_CHAR) /* A normal character was returned */ + { + /* Check for ASCII control characters */ + + if (ch == ASCII_TAB) + { + lcd_putcmd(priv, CMD_CURSOR_ON_BLINK); + } + else if (ch == ASCII_VT) + { + /* Turn the backlight on */ + + lcd_backlight(priv, true); + } + else if (ch == ASCII_FF) + { + /* Turn the backlight off */ + + lcd_backlight(priv, false); + } + else if (ch == ASCII_CR) + { + /* Perform a Home */ + + lcd_putcmd(priv, CMD_HOME); + up_udelay(DELAY_US_HOMECLEAR); /* home needs extra time */ + row = 0; + col = 0; + } + else if (ch == ASCII_SO) + { + lcd_putcmd(priv, CMD_CURSOR_OFF); + } + else if (ch == ASCII_SI) + { + /* Perform the re-initialize */ + + lcd_init(priv); + row = 0; + col = 0; + } + else if (ch == ASCII_LF) + { + /* unixian line term; go to start of next line */ + + row += 1; + if (row >= priv->cfg.rows) + { + lcd_scroll_up(priv); + row = priv->cfg.rows - 1; + } + + col = 0; + lcd_set_curpos(priv, row, col); + } + else if (ch == ASCII_BS) + { + /* Perform the backward deletion */ + + lcd_codec_action(priv, SLCDCODE_BACKDEL, 1); + + lcd_get_curpos(priv, &row, &col); + } + else if (ch == ASCII_DEL) + { + /* Perform the forward deletion */ + + lcd_codec_action(priv, SLCDCODE_FWDDEL, 1); + + lcd_get_curpos(priv, &row, &col); + } + else + { + /* All others are fair game. See if we need to wrap line. */ + + if (col >= priv->cfg.cols) + { + row += 1; + if (row >= priv->cfg.rows) + { + lcd_scroll_up(priv); + row = priv->cfg.rows - 1; + } + + col = 0; + lcd_set_curpos(priv, row, col); + } + + lcd_putdata(priv, ch); + ++col; + } + } + else /* (result == SLCDRET_SPEC) */ /* A special SLCD action was returned */ + { + lcd_codec_action(priv, (enum slcdcode_e)ch, count); + + /* we can't know what happened, so it's easier just to re-inquire + * as to where we are. + */ + + lcd_get_curpos(priv, &row, &col); + } + } + + /* Wherever we wound up, update our logical file pos to reflect it */ + + lcd_curpos_to_fpos(priv, row, col, &filep->f_pos); + + sem_post(&priv->sem_excl); + return buflen; +} + +/**************************************************************************** + * Name: pcf8574_lcd_seek + * + * Description: + * Seek the logical file pointer to the specified position. This is + * probably not very interesting except possibly for (SEEK_SET, 0) to + * rewind the pointer for a subsequent read(). + * The file pointer is logical, and includes synthesized LF chars at the + * end of the display lines. + * + ****************************************************************************/ + +static off_t pcf8574_lcd_seek(FAR struct file *filep, off_t offset, int whence) +{ + FAR struct inode *inode = filep->f_inode; + FAR struct pcf8574_lcd_dev_s *priv = (FAR struct pcf8574_lcd_dev_s *)inode->i_private; + int maxpos; + + sem_wait(&priv->sem_excl); + + maxpos = priv->cfg.rows * priv->cfg.cols + (priv->cfg.rows - 1); + switch (whence) + { + case SEEK_CUR: + filep->f_pos += offset; + if (filep->f_pos > maxpos) + filep->f_pos = maxpos; + break; + + case SEEK_SET: + filep->f_pos = offset; + if (filep->f_pos > maxpos) + filep->f_pos = maxpos; + break; + + case SEEK_END: + filep->f_pos = maxpos; + break; + + default: + /* Return EINVAL if the whence argument is invalid */ + filep->f_pos = -EINVAL; + } + + sem_post(&priv->sem_excl); + return filep->f_pos; +} + +/**************************************************************************** + * Name: pcf8574_lcd_ioctl + * + * Description: + * Perform device operations that are outside the standard I/O model. + * + ****************************************************************************/ + +static int pcf8574_lcd_ioctl(FAR struct file *filep, int cmd, + unsigned long arg) +{ + switch (cmd) + { + case SLCDIOC_GETATTRIBUTES: /* SLCDIOC_GETATTRIBUTES: Get the attributes of the SLCD */ + { + FAR struct inode *inode = filep->f_inode; + FAR struct pcf8574_lcd_dev_s *priv = (FAR struct pcf8574_lcd_dev_s *)inode->i_private; + FAR struct slcd_attributes_s *attr = (FAR struct slcd_attributes_s *)((uintptr_t)arg); + + lcdvdbg("SLCDIOC_GETATTRIBUTES:\n"); + + if (!attr) + { + return -EINVAL; + } + + attr->nrows = priv->cfg.rows; + attr->ncolumns = priv->cfg.cols; + attr->nbars = 0; + attr->maxcontrast = 0; + attr->maxbrightness = 1; /* 'brightness' for us is the backlight */ + } + break; + + case SLCDIOC_CURPOS: /* SLCDIOC_CURPOS: Get the SLCD cursor position */ + { + FAR struct inode *inode = filep->f_inode; + FAR struct pcf8574_lcd_dev_s *priv = (FAR struct pcf8574_lcd_dev_s *)inode->i_private; + FAR struct slcd_curpos_s *attr = (FAR struct slcd_curpos_s *)((uintptr_t)arg); + uint8_t row; + uint8_t col; + + sem_wait(&priv->sem_excl); + + lcd_get_curpos(priv, &row, &col); + attr->row = row; + attr->column = col; + + sem_post(&priv->sem_excl); + } + break; + + case SLCDIOC_GETBRIGHTNESS: /* Get the current brightness setting */ + { + FAR struct inode *inode = filep->f_inode; + FAR struct pcf8574_lcd_dev_s *priv = (FAR struct pcf8574_lcd_dev_s *)inode->i_private; + bool bOn; + + bOn = (priv->bl_bit && priv->cfg.bl_active_high) || (!priv->bl_bit && !priv->cfg.bl_active_high); + *(int*)((uintptr_t)arg) = bOn ? 1 : 0; + } + break; + + case SLCDIOC_SETBRIGHTNESS: /* Set the brightness to a new value */ + { + FAR struct inode *inode = filep->f_inode; + FAR struct pcf8574_lcd_dev_s *priv = (FAR struct pcf8574_lcd_dev_s *)inode->i_private; + + sem_wait(&priv->sem_excl); + lcd_backlight(priv, arg ? true : false); + sem_post(&priv->sem_excl); + } + break; + + case SLCDIOC_CREATECHAR: /* Create a custom character pattern */ + { + FAR struct inode *inode = filep->f_inode; + FAR struct pcf8574_lcd_dev_s *priv = (FAR struct pcf8574_lcd_dev_s *)inode->i_private; + FAR struct slcd_createchar_s *attr = (FAR struct slcd_createchar_s *)((uintptr_t)arg); + + sem_wait(&priv->sem_excl); + lcd_create_char(priv, attr->idx, attr->bmp); + sem_post(&priv->sem_excl); + } + break; + + case SLCDIOC_SETBAR: /* SLCDIOC_SETBAR: Set bars on a bar display */ + case SLCDIOC_GETCONTRAST: /* SLCDIOC_GETCONTRAST: Get the current contrast setting */ + case SLCDIOC_SETCONTRAST: /* SLCDIOC_SETCONTRAST: Set the contrast to a new value */ + default: + return -ENOTTY; + } + + return OK; +} + +/**************************************************************************** + * Name: pcf8574lcd_poll + ****************************************************************************/ + +#ifndef CONFIG_DISABLE_POLL +static int pcf8574lcd_poll(FAR struct file *filep, FAR struct pollfd *fds, + bool setup) +{ + if (setup) + { + /* Data is always available to be read */ + + fds->revents |= (fds->events & (POLLIN|POLLOUT)); + if (fds->revents != 0) + { + sem_post(fds->sem); + } + } + + return OK; +} +#endif + +/**************************************************************************** + * Name: pcf8574_lcd_unlink + ****************************************************************************/ + +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS +static int pcf8574_lcd_unlink(FAR struct inode *inode) +{ + FAR struct pcf8574_lcd_dev_s *priv = (FAR struct pcf8574_lcd_dev_s *)inode->i_private; + int ret = OK; + + sem_wait(&priv->sem_excl); + + priv->unlinked = true; + + /* If there are no open references to the driver then tear it down now */ + if (priv->refs == 0) + { + /* We have no real teardown at present */ + ret = OK; + } + + sem_post(&priv->sem_excl); + return ret; +} +#endif + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: pcf8574_lcd_backpack_register + * + * Description: + * Register a character driver that is an I2C LCD 'backpack' for the + * ever-popular HD44780 based 16x2 LCD via pcf8574 I2C IO expander. + * + ****************************************************************************/ + +int pcf8574_lcd_backpack_register(FAR const char *devpath, + FAR struct i2c_master_s *i2c, + FAR struct pcf8574_lcd_backpack_config_s *cfg) +{ + FAR struct pcf8574_lcd_dev_s *priv; + int ret; + + /* Sanity check on geometry */ + + if (cfg->rows < 1 || cfg->rows > 4) + { + lcdvdbg("Display rows must be 1-4\n"); + return -EINVAL; + } + + if ((cfg->cols < 1 || cfg->cols > 64) || (cfg->rows == 4 && cfg->cols > 32)) + { + lcdvdbg("Display cols must be 1-64, and may not be part of a 4x40 configuration\n"); + return -EINVAL; + } + + /* Initialize the device structure */ + + priv = (FAR struct pcf8574_lcd_dev_s *)kmm_malloc(sizeof(struct pcf8574_lcd_dev_s)); + if (!priv) + { + lcdvdbg("Failed to allocate instance\n"); + return -ENOMEM; + } + + priv->i2c = i2c; + priv->cfg = *cfg; + priv->bl_bit = priv->cfg.bl_active_high ? 0 : (1 << priv->cfg.bl); + priv->refs = 0; + priv->unlinked = false; + sem_init(&priv->sem_excl, 0, 1); + + /* Initialize */ + + lcd_init(priv); + + /* Register the character driver */ + + ret = register_driver(devpath, &g_pcf8574_lcd_fops, 0666, priv); + if (ret < 0) + { + lcdvdbg("Failed to register driver: %d\n", ret); + kmm_free(priv); + } + + lcdvdbg("pcf8574_lcd_backpack driver loaded successfully!\n"); + return ret; +} diff --git a/drivers/lcd/pcf8574_lcd_backpack_readme.txt b/drivers/lcd/pcf8574_lcd_backpack_readme.txt new file mode 100644 index 00000000000..edae94e0b60 --- /dev/null +++ b/drivers/lcd/pcf8574_lcd_backpack_readme.txt @@ -0,0 +1,252 @@ +pcf8574 lcd backpack - readme.txt +20160524a, ziggurat29 + +Abstract +======== + +This describes the use of the pcf8574_lcd_backpack.h, .c driver module for NuttX. + +Contents +======== + + o Summary for Those Who Don't Like to Read + o Introduction + o Usage + - Specifying the I2C Address + - Specifying the LCD Display Format + - Specifying Unknown/New Backpacks + o Special Features + - Codec + - Ioctl + o Troubleshooting + +Summary for Those Who Don't Like to Read +======================================== + +To use, in your board_app_initialize(), + +1) instantiate an I2C bus: + + FAR struct i2c_master_s* i2c = stm32l4_i2cbus_initialize(1); + +2) set the configuration for the particular make of board, and LCD format: + + struct pcf8574_lcd_backpack_config_s cfg = LCD_I2C_BACKPACK_CFG_MJKDZ; + cfg.rows = 2; + cfg.cols = 16; + +3) instantiate the device on the I2C bus previously created: + + ret = pcf8574_lcd_backpack_register("/dev/slcd0", i2c, &cfg); + +Introduction +============ + +The character LCD modules based on the HD44780 (and compatible ST7706U, KS0066U, +SED1278, etc.) drivers have been around for many decades and are quite popular. +One challenge is that they require a large number of GPIO (11 in 8-bit mode, 7 +in 4-bit mode, and an additional line if you control the backlight). + +To address this, several folks have created daughter boards for the LCD module +which present a two-wire I2C interface. Generally, folks call these interface +boards an 'lcd backpack'. A large class of them (and in particular, the very +inexpensive ones found on ebay, q.v. google "ebay i2c lcd backpack"; they're +usually about $USD 1), use the same design: a PCF8574 I2C IO expander. +Variations occur in mapping GPIO line to LCD pins, but otherwise the +expectation is that you control the LCD at a low-level tweaking the lines +("byte-banging"?) + +My original motivation for producing this was to simply serve as a test device +for some I2C driver work I was doing, but it occurred to me that it may be +useful to others, given the popularity of the 'lcd backpack', so I cleaned up +the code and made it general to support all the variations on the market, and +also to adopt the NuttX notion of a 'segment lcd codec', which is used to +transport escape sequences (for doing things like clearing the display, turning +on/off the cursor, etc), and also the standard ioctls. + +I believe it should support all "lcd backpack"s on the market (because you can +specify the particular wiring), and all HD44780-based LCD modules in 1-line, +2-line, and 4-line configurations (except 4x40 -- this is not supported by +the hardware). + +This module should be cpu-architecture-neutral, and work with any standard I2C +bus object. At the time of this writing it has been tested only with the +STM32L4 chip and with the 'MJKDZ' backpack board with a 16x2 lcd module. + +Usage +===== + +The driver is contained in the files pcf8574_lcd_backpack.h and +pcf8574_lcd_backpack.c; you can include these in your build in whatever manner +you choose (e.g. copy them into your board's src directory, and reference them +in the Makefile). + +As with other I2C devices, you first instantiate the I2C bus, and then +instantiate the driver on that bus. When instantiating the driver, you also +provide a configuration 'descriptor' that specified board wiring and LCD +format parameters. You can explicitly specify any wiring configuration, and +some known popular boards are already #defined for your convenience. + +E.g.: + + #include + #include "pcf8574_lcd_backpack.h" + + #define MJKDZ_I2C_PORTNO 1 + #define MJKDZ_DEVICE_NAME "/dev/lcd0" + + FAR struct i2c_master_s* g_i2cMJKDZ = NULL; + + .... + + g_i2cMJKDZ = stm32l4_i2cbus_initialize(MJKDZ_I2C_PORTNO); + + .... + + struct pcf8574_lcd_backpack_config_s cfg = LCD_I2C_BACKPACK_CFG_MJKDZ; + cfg.rows = 2; + cfg.cols = 16; + + ret = pcf8574_lcd_backpack_register(MJKDZ_DEVICE_NAME, g_i2cMJKDZ, &cfg); + +If all the above executes successfully, you should wind up with a character +device node "/dev/lcd0". Applications can open that node and write() to it, +and the shell can emit data to it (e.g. 'echo Hi, there! > /dev/lcd0'). + +That is the basic configuration. Some additional configuration points are +worth noting. + +Specifying the I2C Address +-------------------------- + +The 'struct pcf8574_lcd_backpack_config_s' shown above is initialized using +the convenience macro LCD_I2C_BACKPACK_CFG_MJKDZ. Those convenience macros +use the default I2C address for the board, however many of the boards allow +altering the address (by jumpers, or removing pullups). You need to specify +the correct address for your board's physical configuration. You can do that +via + + cfg.addr = 0x23; + +Specifying the LCD Display Format +--------------------------------- + +The LCD modules cannot 'self-describe' their physical format, so it must be +explicitly provided to the driver. The correct format is important for +computing screen coordinate addresses and for scrolling and line wrap. + +In the example above, the screen format is specifying by setting the +fields in the configuration descriptor: + + cfg.rows = 2; + cfg.cols = 16; + +The lcd backpack can accomodate all known 1-line and 2-line displays, and +4-line displays up to 4 x 32. Explicitly, the 4 x 40 /cannot/ be supported +because it has an important hardware difference (it is actually two 4x20 +controllers, and the LCD backpack does not have the wiring for the +second controller's 'E' line). This is a hardware limitation of the +lcd backpack, rather than the driver. + +Specifying Unknown/New Backpacks +-------------------------------- + +The descriptor initializer macros in the form LCD_I2C_BACKPACK_CFG_xxx +located near the top of pcf8574_lcd_backpack.h are provided for convenience. +However, their use is not required, and it can be useful to initialize the +descriptor with explicit values, say, for custom or unknown boards. + +The format of this descriptor is conscientiously chosen to be semantically +similar to an equivalent initialization mechanism popular in the Arduino +community used in their LCD support libraries. It specifies: + + * I2C address + * pin mapping for data lines + * pin mapping for control lines + * pin mapping for backlight control line + * polarity sense of backlight control line + +and we add to that + + * (row, column) size of display + +(the Arduino libraries specify display size at a different point in code) +You should be able to readily port a functional Arduino project by cutting- +and-pasting the sequence of numbers that are the pin defs for the lcd +backpack you are using. + +Special Features +================ + +Codec +----- + +The driver supports the NuttX 'segment lcd codec', which facilitates the +encoding of control functions into the write() stream. These can be used +to clear the display, move the cursor, etc. For details, q.v. + + nuttx/lcd/slcd_codec.h + +Ioctl +----- + +The driver supports the NuttX ioctl definitions for segment lcd. Q.v. + + nuttx/lcd/slcd_ioctl.h + +Additionally, the ioctl SLCDIOC_CREATECHAR is provided to allow the +creation of custom characters. + +The HD44780 devices generally support the creation of 8 custom +characters, which map to code points 0-7. The characters are 5x8 +pixels (with the expectation that the last row is left blank, to +accommodate the underscore cursor, though this is not strictly a +requirement). + +The SLCDIOC_CREATECHAR ioctl takes a parameter, which is a struct +consisting of the character index being programmed (0-7) and the +8-byte bitmap of the character image. The bitmap is constructed +with each byte representing a row, from top row to bottom row. +Each row is imaged left to right, MSB to LSB, right-justified (i.e., +bit 4 is leftmost, bit 0 is rightmost, and bits 7-5 are unused). + +You may reference these characters simply by including them in +the data you write() to the device, e.g. + + write(fd, "\x01,\x02Hi, there!\n", 13); + +Example of programming a character image: + + static const struct slcd_createchar_s custom_char = + { 4, { 0x04, 0x0e, 0x15, 0x04, 0x04, 0x04, 0x04, 0x00 } }; /* up arrow */ + + ret = ioctl(fd, SLCDIOC_CREATECHAR, (unsigned long)custom_char); + +Now character '\x04' will display as an 'up arrow'. + +Note, you might consider avoiding the use of code point 0x00 unless +you absolutely need it, because the embedded nul character can cause +problems. The driver, and write() apis are binary, and unaffected, +but things like printf() and puts() assume C-style strings, and are +affected. + +Troubleshooting +=============== + +* Check your I2C address. turn on debugging output so you can see + bus timeouts that suggest a non-responsive slave. +* Check your board wiring and configuration specification. Buzz + out the lines if you have to. +* Remember to set the (ros,cols) geometry in pcf8574_lcd_backpack_config_s + before registration of the driver, since this cannot be determined + programmatically. +* If the driver registration step seems to 'hang' it could be the I2C + driver performing retries due to no response from the LCD backpack. Check + the address. Turning on debug output for I2C can help make this visible. +* Don't forget to check the 'contrast' potentiometer. The voltage at the + central wiper should be approximately 0.3 V - 2.4 V, but the actual value + is is dependent on the physics of the attached LCD module. The useful + range of voltages at this pin for any given LCD is quite narrow, and + outside that range there will be nothing visible on the display, so most + of the turn range of the pot is non-useful. It's less 'contrast' and + more 'LCD segment drive bias'. diff --git a/drivers/leds/userled_upper.c b/drivers/leds/userled_upper.c index 5c8f0a0997b..68fd8d5f7a6 100644 --- a/drivers/leds/userled_upper.c +++ b/drivers/leds/userled_upper.c @@ -140,12 +140,15 @@ static const struct file_operations userled_fops = { userled_open, /* open */ userled_close, /* close */ - 0, /* read */ + NULL, /* read */ userled_write, /* write */ - 0, /* seek */ + NULL, /* seek */ userled_ioctl /* ioctl */ #ifndef CONFIG_DISABLE_POLL - , 0 /* poll */ + , NULL /* poll */ +#endif +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ #endif }; @@ -441,7 +444,7 @@ static int userled_ioctl(FAR struct file *filep, int cmd, unsigned long arg) /* Check that a valid LED is being set */ - if (led < 8 * sizeof(userled_set_t) && + if ((size_t)led < 8 * sizeof(userled_set_t) && (priv->lu_supported & (1 << led)) != 0) { /* Update the LED state */ diff --git a/drivers/loop/losetup.c b/drivers/loop/losetup.c index dadd44891cd..ccc75a7971a 100644 --- a/drivers/loop/losetup.c +++ b/drivers/loop/losetup.c @@ -107,16 +107,19 @@ static int loop_geometry(FAR struct inode *inode, static const struct block_operations g_bops = { - loop_open, /* open */ - loop_close, /* close */ - loop_read, /* read */ + loop_open, /* open */ + loop_close, /* close */ + loop_read, /* read */ #ifdef CONFIG_FS_WRITABLE - loop_write, /* write */ + loop_write, /* write */ #else - NULL, /* write */ + NULL, /* write */ #endif loop_geometry, /* geometry */ - NULL /* ioctl */ + NULL /* ioctl */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; /**************************************************************************** diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig index 89f130ccb16..a15c01d7f6a 100644 --- a/drivers/mtd/Kconfig +++ b/drivers/mtd/Kconfig @@ -814,6 +814,11 @@ config SST26_MEMORY_TYPE The memory type for SST26VF0xx series is 0x26, but this can be modified if needed to support compatible devices from different manufacturers. +config SST26_DEBUG + bool "Debug output from the SST26 driver" + depends on DEBUG_FS + default n + endif # MTD_SST26 config MTD_SST39FV diff --git a/drivers/mtd/sst26.c b/drivers/mtd/sst26.c index 6790af73763..94226064ccd 100644 --- a/drivers/mtd/sst26.c +++ b/drivers/mtd/sst26.c @@ -205,6 +205,20 @@ #define SST26_DUMMY 0xa5 +/* Debug ****************************************************************************/ + +#ifdef CONFIG_SST26_DEBUG +# define sstdbg(format, ...) dbg(format, ##__VA_ARGS__) +# define sstlldbg(format, ...) lldbg(format, ##__VA_ARGS__) +# define sstvdbg(format, ...) vdbg(format, ##__VA_ARGS__) +# define sstllvdbg(format, ...) llvdbg(format, ##__VA_ARGS__) +#else +# define sstdbg(x...) +# define sstlldbg(x...) +# define sstvdbg(x...) +# define sstllvdbg(x...) +#endif + /************************************************************************************ * Private Types ************************************************************************************/ @@ -307,7 +321,7 @@ static inline int sst26_readid(struct sst26_dev_s *priv) uint16_t memory; uint16_t capacity; - fvdbg("priv: %p\n", priv); + sstvdbg("priv: %p\n", priv); /* Lock the SPI bus, configure the bus, and select this FLASH part. */ @@ -402,7 +416,7 @@ static void sst26_waitwritecomplete(struct sst26_dev_s *priv) } while ((status & SST26_SR_WIP) != 0); - fvdbg("Complete\n"); + sstvdbg("Complete\n"); } /************************************************************************************ @@ -425,7 +439,7 @@ static void sst26_globalunlock(struct sst26_dev_s *priv) SPI_SELECT(priv->dev, SPIDEV_FLASH, false); - fvdbg("Device unlocked.\n"); + sstvdbg("Device unlocked.\n"); } /************************************************************************************ @@ -446,7 +460,7 @@ static void sst26_writeenable(struct sst26_dev_s *priv) SPI_SELECT(priv->dev, SPIDEV_FLASH, false); - fvdbg("Enabled\n"); + sstvdbg("Enabled\n"); } /************************************************************************************ @@ -459,7 +473,7 @@ static void sst26_sectorerase(struct sst26_dev_s *priv, off_t sector, uint8_t ty offset = sector << priv->sectorshift; - fvdbg("sector: %08lx\n", (long)sector); + sstvdbg("sector: %08lx\n", (long)sector); /* Send write enable instruction */ @@ -490,7 +504,7 @@ static void sst26_sectorerase(struct sst26_dev_s *priv, off_t sector, uint8_t ty sst26_waitwritecomplete(priv); - fvdbg("Erased\n"); + sstvdbg("Erased\n"); } /************************************************************************************ @@ -499,7 +513,7 @@ static void sst26_sectorerase(struct sst26_dev_s *priv, off_t sector, uint8_t ty static inline int sst26_chiperase(struct sst26_dev_s *priv) { - fvdbg("priv: %p\n", priv); + sstvdbg("priv: %p\n", priv); /* Send write enable instruction */ @@ -519,7 +533,7 @@ static inline int sst26_chiperase(struct sst26_dev_s *priv) sst26_waitwritecomplete(priv); - fvdbg("Return: OK\n"); + sstvdbg("Return: OK\n"); return OK; } @@ -532,7 +546,7 @@ static inline void sst26_pagewrite(struct sst26_dev_s *priv, { off_t offset = page << priv->pageshift; - fvdbg("page: %08lx offset: %08lx\n", (long)page, (long)offset); + sstvdbg("page: %08lx offset: %08lx\n", (long)page, (long)offset); /* Enable the write access to the FLASH */ @@ -562,7 +576,7 @@ static inline void sst26_pagewrite(struct sst26_dev_s *priv, sst26_waitwritecomplete(priv); - fvdbg("Written\n"); + sstvdbg("Written\n"); } /************************************************************************************ @@ -574,7 +588,7 @@ static inline void sst26_bytewrite(struct sst26_dev_s *priv, FAR const uint8_t *buffer, off_t offset, uint16_t count) { - fvdbg("offset: %08lx count:%d\n", (long)offset, count); + sstvdbg("offset: %08lx count:%d\n", (long)offset, count); /* Enable the write access to the FLASH */ @@ -605,7 +619,7 @@ static inline void sst26_bytewrite(struct sst26_dev_s *priv, sst26_waitwritecomplete(priv); - fvdbg("Written\n"); + sstvdbg("Written\n"); } #endif @@ -620,7 +634,7 @@ static int sst26_erase(FAR struct mtd_dev_s *dev, off_t startblock, size_t nbloc FAR struct sst26_dev_s *priv = (FAR struct sst26_dev_s *)dev; size_t blocksleft = nblocks; - fvdbg("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); + sstvdbg("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); /* Lock access to the SPI bus until we complete the erase */ @@ -650,7 +664,7 @@ static ssize_t sst26_bread(FAR struct mtd_dev_s *dev, off_t startblock, FAR struct sst26_dev_s *priv = (FAR struct sst26_dev_s *)dev; ssize_t nbytes; - fvdbg("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); + sstvdbg("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); /* On this device, we can handle the block read just like the byte-oriented read */ @@ -675,7 +689,7 @@ static ssize_t sst26_bwrite(FAR struct mtd_dev_s *dev, off_t startblock, size_t size_t blocksleft = nblocks; size_t pagesize = 1 << priv->pageshift; - fvdbg("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); + sstvdbg("startblock: %08lx nblocks: %d\n", (long)startblock, (int)nblocks); /* Lock the SPI bus and write each page to FLASH */ @@ -700,7 +714,7 @@ static ssize_t sst26_read(FAR struct mtd_dev_s *dev, off_t offset, size_t nbytes { FAR struct sst26_dev_s *priv = (FAR struct sst26_dev_s *)dev; - fvdbg("offset: %08lx nbytes: %d\n", (long)offset, (int)nbytes); + sstvdbg("offset: %08lx nbytes: %d\n", (long)offset, (int)nbytes); /* Lock the SPI bus and select this FLASH part */ @@ -717,7 +731,8 @@ static ssize_t sst26_read(FAR struct mtd_dev_s *dev, off_t offset, size_t nbytes (void)SPI_SEND(priv->dev, (offset >> 8) & 0xff); (void)SPI_SEND(priv->dev, offset & 0xff); - /* dummy read */ + /* Dummy read */ + (void)SPI_SEND(priv->dev, SST26_DUMMY); /* Then read all of the requested bytes */ @@ -728,7 +743,7 @@ static ssize_t sst26_read(FAR struct mtd_dev_s *dev, off_t offset, size_t nbytes SPI_SELECT(priv->dev, SPIDEV_FLASH, false); sst26_unlock(priv->dev); - fvdbg("return nbytes: %d\n", (int)nbytes); + sstvdbg("return nbytes: %d\n", (int)nbytes); return nbytes; } @@ -748,7 +763,7 @@ static ssize_t sst26_write(FAR struct mtd_dev_s *dev, off_t offset, size_t nbyte int pagesize; int bytestowrite; - fvdbg("offset: %08lx nbytes: %d\n", (long)offset, (int)nbytes); + sstvdbg("offset: %08lx nbytes: %d\n", (long)offset, (int)nbytes); /* We must test if the offset + count crosses one or more pages * and perform individual writes. The devices can only write in @@ -815,7 +830,7 @@ static int sst26_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) FAR struct sst26_dev_s *priv = (FAR struct sst26_dev_s *)dev; int ret = -EINVAL; /* Assume good command with bad parameters */ - fvdbg("cmd: %d \n", cmd); + sstvdbg("cmd: %d \n", cmd); switch (cmd) { @@ -839,8 +854,8 @@ static int sst26_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) ret = OK; - fvdbg("blocksize: %d erasesize: %d neraseblocks: %d\n", - geo->blocksize, geo->erasesize, geo->neraseblocks); + sstvdbg("blocksize: %d erasesize: %d neraseblocks: %d\n", + geo->blocksize, geo->erasesize, geo->neraseblocks); } } break; @@ -861,7 +876,7 @@ static int sst26_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg) break; } - fvdbg("return %d\n", ret); + sstvdbg("return %d\n", ret); return ret; } @@ -884,7 +899,7 @@ FAR struct mtd_dev_s *sst26_initialize_spi(FAR struct spi_dev_s *dev) FAR struct sst26_dev_s *priv; int ret; - fvdbg("dev: %p\n", dev); + sstvdbg("dev: %p\n", dev); /* Allocate a state structure (we allocate the structure instead of using * a fixed, static allocation so that we can handle multiple FLASH devices. @@ -921,7 +936,7 @@ FAR struct mtd_dev_s *sst26_initialize_spi(FAR struct spi_dev_s *dev) { /* Unrecognized! Discard all of that work we just did and return NULL */ - fdbg("Unrecognized\n"); + sstdbg("Unrecognized\n"); kmm_free(priv); priv = NULL; } @@ -941,6 +956,6 @@ FAR struct mtd_dev_s *sst26_initialize_spi(FAR struct spi_dev_s *dev) /* Return the implementation-specific state structure as the MTD device */ - fvdbg("Return %p\n", priv); + sstvdbg("Return %p\n", priv); return (FAR struct mtd_dev_s *)priv; } diff --git a/drivers/pipes/pipe_common.c b/drivers/pipes/pipe_common.c index a7676571eb7..862d244527f 100644 --- a/drivers/pipes/pipe_common.c +++ b/drivers/pipes/pipe_common.c @@ -92,7 +92,7 @@ static void pipecommon_semtake(sem_t *sem); * Name: pipecommon_semtake ****************************************************************************/ -static void pipecommon_semtake(sem_t *sem) +static void pipecommon_semtake(FAR sem_t *sem) { while (sem_wait(sem) != 0) { @@ -109,7 +109,8 @@ static void pipecommon_semtake(sem_t *sem) ****************************************************************************/ #ifndef CONFIG_DISABLE_POLL -static void pipecommon_pollnotify(FAR struct pipe_dev_s *dev, pollevent_t eventset) +static void pipecommon_pollnotify(FAR struct pipe_dev_s *dev, + pollevent_t eventset) { int i; @@ -120,7 +121,7 @@ static void pipecommon_pollnotify(FAR struct pipe_dev_s *dev, pollevent_t events for (i = 0; i < CONFIG_DEV_PIPE_NPOLLWAITERS; i++) { - struct pollfd *fds = dev->d_fds[i]; + FAR struct pollfd *fds = dev->d_fds[i]; if (fds) { fds->revents |= eventset & (fds->events | POLLERR | POLLHUP); @@ -158,7 +159,7 @@ FAR struct pipe_dev_s *pipecommon_allocdev(void) /* Allocate a private structure to manage the pipe */ - dev = (struct pipe_dev_s *)kmm_malloc(sizeof(struct pipe_dev_s)); + dev = (FAR struct pipe_dev_s *)kmm_malloc(sizeof(struct pipe_dev_s)); if (dev) { /* Initialize the private structure */ @@ -190,10 +191,10 @@ void pipecommon_freedev(FAR struct pipe_dev_s *dev) int pipecommon_open(FAR struct file *filep) { - FAR struct inode *inode = filep->f_inode; - FAR struct pipe_dev_s *dev = inode->i_private; - int sval; - int ret; + FAR struct inode *inode = filep->f_inode; + FAR struct pipe_dev_s *dev = inode->i_private; + int sval; + int ret; DEBUGASSERT(dev != NULL); @@ -302,9 +303,9 @@ int pipecommon_open(FAR struct file *filep) int pipecommon_close(FAR struct file *filep) { - struct inode *inode = filep->f_inode; - struct pipe_dev_s *dev = inode->i_private; - int sval; + FAR struct inode *inode = filep->f_inode; + FAR struct pipe_dev_s *dev = inode->i_private; + int sval; DEBUGASSERT(dev && dev->d_refs > 0); @@ -408,14 +409,14 @@ int pipecommon_close(FAR struct file *filep) ssize_t pipecommon_read(FAR struct file *filep, FAR char *buffer, size_t len) { - struct inode *inode = filep->f_inode; - struct pipe_dev_s *dev = inode->i_private; + FAR struct inode *inode = filep->f_inode; + FAR struct pipe_dev_s *dev = inode->i_private; #ifdef CONFIG_DEV_PIPEDUMP - FAR uint8_t *start = (FAR uint8_t *)buffer; + FAR uint8_t *start = (FAR uint8_t *)buffer; #endif - ssize_t nread = 0; - int sval; - int ret; + ssize_t nread = 0; + int sval; + int ret; DEBUGASSERT(dev); @@ -467,7 +468,7 @@ ssize_t pipecommon_read(FAR struct file *filep, FAR char *buffer, size_t len) /* Then return whatever is available in the pipe (which is at least one byte) */ nread = 0; - while (nread < len && dev->d_wrndx != dev->d_rdndx) + while ((size_t)nread < len && dev->d_wrndx != dev->d_rdndx) { *buffer++ = dev->d_buffer[dev->d_rdndx]; if (++dev->d_rdndx >= CONFIG_DEV_PIPE_SIZE) @@ -497,14 +498,15 @@ ssize_t pipecommon_read(FAR struct file *filep, FAR char *buffer, size_t len) * Name: pipecommon_write ****************************************************************************/ -ssize_t pipecommon_write(FAR struct file *filep, FAR const char *buffer, size_t len) +ssize_t pipecommon_write(FAR struct file *filep, FAR const char *buffer, + size_t len) { - struct inode *inode = filep->f_inode; - struct pipe_dev_s *dev = inode->i_private; - ssize_t nwritten = 0; - ssize_t last; - int nxtwrndx; - int sval; + FAR struct inode *inode = filep->f_inode; + FAR struct pipe_dev_s *dev = inode->i_private; + ssize_t nwritten = 0; + ssize_t last; + int nxtwrndx; + int sval; DEBUGASSERT(dev); pipe_dumpbuffer("To PIPE:", (FAR uint8_t *)buffer, len); @@ -559,7 +561,8 @@ ssize_t pipecommon_write(FAR struct file *filep, FAR const char *buffer, size_t /* Is the write complete? */ - if (++nwritten >= len) + nwritten++; + if ((size_t)nwritten >= len) { /* Yes.. Notify all of the waiting readers that more data is available */ @@ -717,7 +720,7 @@ int pipecommon_poll(FAR struct file *filep, FAR struct pollfd *fds, { /* This is a request to tear down the poll. */ - struct pollfd **slot = (struct pollfd **)fds->priv; + FAR struct pollfd **slot = (FAR struct pollfd **)fds->priv; #ifdef CONFIG_DEBUG if (!slot) @@ -745,9 +748,9 @@ errout: int pipecommon_ioctl(FAR struct file *filep, int cmd, unsigned long arg) { - FAR struct inode *inode = filep->f_inode; - struct pipe_dev_s *dev = inode->i_private; - int ret = -EINVAL; + FAR struct inode *inode = filep->f_inode; + FAR struct pipe_dev_s *dev = inode->i_private; + int ret = -EINVAL; #ifdef CONFIG_DEBUG /* Some sanity checking */ @@ -792,7 +795,7 @@ int pipecommon_ioctl(FAR struct file *filep, int cmd, unsigned long arg) count = dev->d_wrndx - dev->d_rdndx; } - *(int *)arg = count; + *(FAR int *)arg = count; ret = 0; } break; @@ -812,7 +815,7 @@ int pipecommon_ioctl(FAR struct file *filep, int cmd, unsigned long arg) count = ((CONFIG_DEV_PIPE_SIZE - dev->d_wrndx) + dev->d_rdndx) - 1; } - *(int *)arg = count; + *(FAR int *)arg = count; ret = 0; } break; diff --git a/drivers/sensors/max31855.c b/drivers/sensors/max31855.c index c239d9688d8..d3e5b8e8f6e 100644 --- a/drivers/sensors/max31855.c +++ b/drivers/sensors/max31855.c @@ -83,6 +83,9 @@ struct max31855_dev_s * Private Function Prototypes ****************************************************************************/ +static void max31855_lock(FAR struct spi_dev_s *spi); +static void max31855_unlock(FAR struct spi_dev_s *spi); + /* Character driver methods */ static int max31855_open(FAR struct file *filep); @@ -112,6 +115,37 @@ static const struct file_operations g_max31855fops = /**************************************************************************** * Private Functions ****************************************************************************/ + +/**************************************************************************** + * Name: max31855_lock + * + * Description: + * Lock and configure the SPI bus. + * + ****************************************************************************/ + +static void max31855_lock(FAR struct spi_dev_s *spi) +{ + (void)SPI_LOCK(spi, true); + SPI_SETMODE(spi, SPIDEV_MODE0); + SPI_SETBITS(spi, 8); + (void)SPI_HWFEATURES(spi, 0); + SPI_SETFREQUENCY(spi, 400000); +} + +/**************************************************************************** + * Name: max31855_unlock + * + * Description: + * Unlock the SPI bus. + * + ****************************************************************************/ + +static void max31855_unlock(FAR struct spi_dev_s *spi) +{ + (void)SPI_LOCK(spi, false); +} + /**************************************************************************** * Name: max31855_open * @@ -167,6 +201,7 @@ static ssize_t max31855_read(FAR struct file *filep, FAR char *buffer, size_t bu /* Enable MAX31855's chip select */ + max31855_lock(priv->spi); SPI_SELECT(priv->spi, SPIDEV_TEMPERATURE, true); /* Read temperature */ @@ -176,6 +211,7 @@ static ssize_t max31855_read(FAR struct file *filep, FAR char *buffer, size_t bu /* Disable MAX31855's chip select */ SPI_SELECT(priv->spi, SPIDEV_TEMPERATURE, false); + max31855_unlock(priv->spi); regval = (regmsb & 0xFF000000) >> 24; regval |= (regmsb & 0xFF0000) >> 8; diff --git a/drivers/sensors/max6675.c b/drivers/sensors/max6675.c index 38aa6c18a7f..329f5185c5c 100644 --- a/drivers/sensors/max6675.c +++ b/drivers/sensors/max6675.c @@ -80,6 +80,9 @@ struct max6675_dev_s * Private Function Prototypes ****************************************************************************/ +static void max6675_lock(FAR struct spi_dev_s *spi) +static void max6675_unlock(FAR struct spi_dev_s *spi) + /* Character driver methods */ static int max6675_open(FAR struct file *filep); @@ -108,6 +111,37 @@ static const struct file_operations g_max6675fops = /**************************************************************************** * Private Functions ****************************************************************************/ + +/**************************************************************************** + * Name: max6675_lock + * + * Description: + * Lock and configure the SPI bus. + * + ****************************************************************************/ + +static void max6675_lock(FAR struct spi_dev_s *spi) +{ + (void)SPI_LOCK(spi, true); + SPI_SETMODE(spi, SPIDEV_MODE0); + SPI_SETBITS(spi, 8); + (void)SPI_HWFEATURES(spi, 0); + SPI_SETFREQUENCY(spi, 400000); +} + +/**************************************************************************** + * Name: max6675_unlock + * + * Description: + * Unlock the SPI bus. + * + ****************************************************************************/ + +static void max6675_unlock(FAR struct spi_dev_s *spi) +{ + (void)SPI_LOCK(spi, false); +} + /**************************************************************************** * Name: max6675_open * @@ -163,6 +197,7 @@ static ssize_t max6675_read(FAR struct file *filep, FAR char *buffer, size_t buf /* Enable MAX6675's chip select */ + max6675_lock(priv->spi); SPI_SELECT(priv->spi, SPIDEV_TEMPERATURE, true); /* Read temperature */ @@ -172,6 +207,7 @@ static ssize_t max6675_read(FAR struct file *filep, FAR char *buffer, size_t buf /* Disable MAX6675's chip select */ SPI_SELECT(priv->spi, SPIDEV_TEMPERATURE, false); + max6675_unlock(priv->spi); regval = (regmsb & 0xFF00) >> 8; regval |= (regmsb & 0xFF) << 8; diff --git a/drivers/sensors/ms58xx.c b/drivers/sensors/ms58xx.c index 410a391a725..1cbcdc37e94 100644 --- a/drivers/sensors/ms58xx.c +++ b/drivers/sensors/ms58xx.c @@ -139,7 +139,7 @@ struct ms58xx_dev_s ****************************************************************************/ /* CRC Calculation */ -static uint8_t ms58xx_crc(FAR uint16_t *src, uint8_t crcIndex); +static uint8_t ms58xx_crc(FAR uint16_t *src, uint8_t crcndx, uint16_t crcmask); /* I2C Helpers */ @@ -200,7 +200,7 @@ static const struct file_operations g_fops = * ****************************************************************************/ -static uint8_t ms58xx_crc(FAR uint16_t *src, uint8_t crcIndex) +static uint8_t ms58xx_crc(FAR uint16_t *src, uint8_t crcndx, uint16_t crcmask) { uint16_t cnt; uint16_t n_rem; @@ -208,8 +208,8 @@ static uint8_t ms58xx_crc(FAR uint16_t *src, uint8_t crcIndex) uint8_t n_bit; n_rem = 0x00; - crc_read = src[crcIndex]; - src[crcIndex] = (0xff00 & (src[7])); + crc_read = src[crcndx]; + src[crcndx] &= ~crcmask; for (cnt = 0; cnt < 16; cnt++) { @@ -236,7 +236,7 @@ static uint8_t ms58xx_crc(FAR uint16_t *src, uint8_t crcIndex) } n_rem = (0x000F & (n_rem >> 12)); - src[crcIndex] = crc_read; + src[crcndx] = crc_read; return (n_rem ^ 0x00); } @@ -369,24 +369,73 @@ static int ms58xx_readadc(FAR struct ms58xx_dev_s *priv, FAR uint32_t *adc) *adc = (uint32_t)buffer[0] << 16 | (uint32_t)buffer[1] << 8 | (uint32_t)buffer[2]; + sndbg("adc: %06x ret: %d\n", *adc, ret); return ret; } /**************************************************************************** - * Name: ms58xx_setosr + * Name: ms58xx_setosr_1 * * Description: * Set the oversampling ratio. * ****************************************************************************/ -static int ms58xx_setosr(FAR struct ms58xx_dev_s *priv, uint16_t osr) +static int ms58xx_setosr_1(FAR struct ms58xx_dev_s *priv, uint16_t osr) { int ret = OK; + switch (osr) + { + case 256: + priv->delay = 600; + priv->osr = 0x0; + break; - sndbg("osr: %04x\n", osr); + case 512: + priv->delay = 1170; + priv->osr = 0x2; + break; + case 1024: + priv->delay = 2280; + priv->osr = 0x4; + break; + + case 2048: + priv->delay = 4540; + priv->osr = 0x6; + break; + + case 4096: + priv->delay = 9040; + priv->osr = 0x8; + break; + + case 8192: + priv->delay = 18080; + priv->osr = 0xA; + break; + + default: + ret = -EINVAL; + break; + } + + return ret; +} + +/**************************************************************************** + * Name: ms58xx_setosr_2 + * + * Description: + * Set the oversampling ratio. + * + ****************************************************************************/ + +static int ms58xx_setosr_2(FAR struct ms58xx_dev_s *priv, uint16_t osr) +{ + int ret = OK; switch (osr) { case 256: @@ -409,26 +458,6 @@ static int ms58xx_setosr(FAR struct ms58xx_dev_s *priv, uint16_t osr) priv->delay = 9040; break; - case 8192: - switch (priv->model) - { - case MS58XX_MODEL_MS5805_02: - case MS58XX_MODEL_MS5837_30: - priv->delay = 18080; - break; - - case MS58XX_MODEL_MS5803_02: - case MS58XX_MODEL_MS5803_05: - case MS58XX_MODEL_MS5803_07: - case MS58XX_MODEL_MS5803_14: - case MS58XX_MODEL_MS5803_30: - case MS58XX_MODEL_MS5806_02: - default: - ret = -EINVAL; - break; - } - break; - default: ret = -EINVAL; break; @@ -442,6 +471,44 @@ static int ms58xx_setosr(FAR struct ms58xx_dev_s *priv, uint16_t osr) return ret; } +/**************************************************************************** + * Name: ms58xx_setosr + * + * Description: + * Set the oversampling ratio. + * + ****************************************************************************/ + +static int ms58xx_setosr(FAR struct ms58xx_dev_s *priv, uint16_t osr) +{ + int ret = OK; + + sndbg("osr: %04x\n", osr); + + switch (priv->model) + { + case MS58XX_MODEL_MS5805_02: + case MS58XX_MODEL_MS5837_30: + ret = ms58xx_setosr_1(priv,osr); + break; + + case MS58XX_MODEL_MS5803_02: + case MS58XX_MODEL_MS5803_05: + case MS58XX_MODEL_MS5803_07: + case MS58XX_MODEL_MS5803_14: + case MS58XX_MODEL_MS5803_30: + case MS58XX_MODEL_MS5806_02: + ret = ms58xx_setosr_2(priv,osr); + break; + + default: + ret = -EINVAL; + break; + } + + return ret; +} + /**************************************************************************** * Name: ms58xx_readprom * @@ -499,7 +566,7 @@ static int ms58xx_readprom(FAR struct ms58xx_dev_s *priv) crcmask = (uint16_t)0xf << crcshift; crc = (uint8_t)((prom[crcindex] & crcmask) >> crcshift); - if (crc != ms58xx_crc(prom, crcindex)) + if (crc != ms58xx_crc(prom, crcindex, crcmask)) { sndbg("crc mismatch\n"); return -ENODEV; @@ -787,7 +854,27 @@ static int ms58xx_close(FAR struct file *filep) static ssize_t ms58xx_read(FAR struct file *filep, FAR char *buffer, size_t buflen) { - return 0; + ssize_t size; + FAR struct inode *inode = filep->f_inode; + FAR struct ms58xx_dev_s *priv = inode->i_private; + FAR struct ms58xx_measure_s *p = (FAR struct ms58xx_measure_s *)buffer; + + size = buflen; + while (size >= sizeof(*p)) + { + if (ms58xx_measure(priv) < 0) + { + return -1; + } + + p->temperature = priv->temp; + p->pressure = priv->press; + + p++; + size -= sizeof(*p); + } + + return size; } /**************************************************************************** @@ -907,16 +994,16 @@ int ms58xx_register(FAR const char *devpath, FAR struct i2c_master_s *i2c, /* Sanity check */ DEBUGASSERT(i2c != NULL); - DEBUGASSERT((model == MS58XX_MODEL_MS5803_02 || - model == MS58XX_MODEL_MS5803_05 || - model == MS58XX_MODEL_MS5803_07 || - model == MS58XX_MODEL_MS5803_14 || - model == MS58XX_MODEL_MS5803_30 || - model == MS58XX_MODEL_MS5806_02) && - (addr == MS58XX_ADDR0 || addr == MS58XX_ADDR1) || - (model == MS58XX_MODEL_MS5805_02 || - model == MS58XX_MODEL_MS5837_30) && - addr == MS58XX_ADDR0); + DEBUGASSERT(((model == MS58XX_MODEL_MS5803_02 || + model == MS58XX_MODEL_MS5803_05 || + model == MS58XX_MODEL_MS5803_07 || + model == MS58XX_MODEL_MS5803_14 || + model == MS58XX_MODEL_MS5803_30 || + model == MS58XX_MODEL_MS5806_02) && + (addr == MS58XX_ADDR0 || addr == MS58XX_ADDR1)) || + ((model == MS58XX_MODEL_MS5805_02 || + model == MS58XX_MODEL_MS5837_30) && + addr == MS58XX_ADDR0)); /* Initialize the device's structure */ diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig index ec333bc0d81..ef4858171dc 100644 --- a/drivers/serial/Kconfig +++ b/drivers/serial/Kconfig @@ -347,165 +347,114 @@ endif # MCU serial peripheral driver? # -config ARCH_HAVE_UART +config UART_SERIALDRIVER bool default n select MCU_SERIAL -config ARCH_HAVE_UART0 +config UART0_SERIALDRIVER bool default n select MCU_SERIAL -config ARCH_HAVE_UART1 +config UART1_SERIALDRIVER bool default n select MCU_SERIAL -config ARCH_HAVE_UART2 +config UART2_SERIALDRIVER bool default n select MCU_SERIAL -config ARCH_HAVE_UART3 +config UART3_SERIALDRIVER bool default n select MCU_SERIAL -config ARCH_HAVE_UART4 +config UART4_SERIALDRIVER bool default n select MCU_SERIAL -config ARCH_HAVE_UART5 +config UART5_SERIALDRIVER bool default n select MCU_SERIAL -config ARCH_HAVE_UART6 +config UART6_SERIALDRIVER bool default n select MCU_SERIAL -config ARCH_HAVE_UART7 +config UART7_SERIALDRIVER bool default n select MCU_SERIAL -config ARCH_HAVE_UART8 +config UART8_SERIALDRIVER bool default n select MCU_SERIAL -config ARCH_HAVE_SCI0 +config SCI0_SERIALDRIVER bool default n select MCU_SERIAL -config ARCH_HAVE_SCI1 +config SCI1_SERIALDRIVER bool default n select MCU_SERIAL -config ARCH_HAVE_USART0 - bool - default n - -config ARCH_HAVE_USART1 - bool - default n - -config ARCH_HAVE_USART2 - bool - default n - -config ARCH_HAVE_USART3 - bool - default n - -config ARCH_HAVE_USART4 - bool - default n - -config ARCH_HAVE_USART5 - bool - default n - -config ARCH_HAVE_USART6 - bool - default n - -config ARCH_HAVE_USART7 - bool - default n - -config ARCH_HAVE_USART8 - bool - default n - -config ARCH_HAVE_OTHER_UART +config USART0_SERIALDRIVER bool default n select MCU_SERIAL -# -# USARTn configuration. Is the USART configured to behave like a UART? -# - -comment "USART Configuration" - -config USART0_ISUART - bool "USART0 is a UART" - default y - depends on ARCH_HAVE_USART0 +config USART1_SERIALDRIVER + bool + default n select MCU_SERIAL -config USART1_ISUART - bool "USART1 is a UART" - default y - depends on ARCH_HAVE_USART1 +config USART2_SERIALDRIVER + bool + default n select MCU_SERIAL -config USART2_ISUART - bool "USART2 is a UART" - default y - depends on ARCH_HAVE_USART2 +config USART3_SERIALDRIVER + bool + default n select MCU_SERIAL -config USART3_ISUART - bool "USART3 is a UART" - default y - depends on ARCH_HAVE_USART3 +config USART4_SERIALDRIVER + bool + default n select MCU_SERIAL -config USART4_ISUART - bool "USART4 is a UART" - default y - depends on ARCH_HAVE_USART4 +config USART5_SERIALDRIVER + bool + default n select MCU_SERIAL -config USART5_ISUART - bool "USART5 is a UART" - default y - depends on ARCH_HAVE_USART5 +config USART6_SERIALDRIVER + bool + default n select MCU_SERIAL -config USART6_ISUART - bool "USART6 is a UART" - default y - depends on ARCH_HAVE_USART6 +config USART7_SERIALDRIVER + bool + default n select MCU_SERIAL -config USART7_ISUART - bool "USART7 is a UART" - default y - depends on ARCH_HAVE_USART7 +config USART8_SERIALDRIVER + bool + default n select MCU_SERIAL -config USART8_ISUART - bool "USART8 is a UART" - default y - depends on ARCH_HAVE_USART8 +config OTHER_UART_SERIALDRIVER + bool + default n select MCU_SERIAL config MCU_SERIAL @@ -609,94 +558,94 @@ config SERIAL_TERMIOS choice prompt "Serial console" - default NO_SERIAL_CONSOLE if !ARCH_HAVE_OTHER_UART - default OTHER_SERIAL_CONSOLE if ARCH_HAVE_OTHER_UART + default NO_SERIAL_CONSOLE if !OTHER_UART_SERIALDRIVER + default OTHER_SERIAL_CONSOLE if OTHER_UART_SERIALDRIVER depends on MCU_SERIAL #depends on DEV_CONSOLE - We may have serial console with no file system at all config UART_SERIAL_CONSOLE bool "UART" - depends on ARCH_HAVE_UART + depends on UART_SERIALDRIVER config UART0_SERIAL_CONSOLE bool "UART0" - depends on ARCH_HAVE_UART0 + depends on UART0_SERIALDRIVER config USART0_SERIAL_CONSOLE bool "USART0" - depends on USART0_ISUART + depends on USART0_SERIALDRIVER config UART1_SERIAL_CONSOLE bool "UART1" - depends on ARCH_HAVE_UART1 + depends on UART1_SERIALDRIVER config USART1_SERIAL_CONSOLE bool "USART1" - depends on USART1_ISUART + depends on USART1_SERIALDRIVER config UART2_SERIAL_CONSOLE bool "UART2" - depends on ARCH_HAVE_UART2 + depends on UART2_SERIALDRIVER config USART2_SERIAL_CONSOLE bool "USART2" - depends on USART2_ISUART + depends on USART2_SERIALDRIVER config UART3_SERIAL_CONSOLE bool "UART3" - depends on ARCH_HAVE_UART3 + depends on UART3_SERIALDRIVER config USART3_SERIAL_CONSOLE bool "USART3" - depends on ARCH_HAVE_USART3 + depends on USART3_SERIALDRIVER config UART4_SERIAL_CONSOLE bool "UART4" - depends on ARCH_HAVE_UART4 + depends on UART4_SERIALDRIVER config USART4_SERIAL_CONSOLE bool "USART4" - depends on USART4_ISUART + depends on USART4_SERIALDRIVER config UART5_SERIAL_CONSOLE bool "UART5" - depends on ARCH_HAVE_UART5 + depends on UART5_SERIALDRIVER config USART5_SERIAL_CONSOLE bool "USART5" - depends on USART5_ISUART + depends on USART5_SERIALDRIVER config UART6_SERIAL_CONSOLE bool "UART6" - depends on ARCH_HAVE_UART6 + depends on UART6_SERIALDRIVER config USART6_SERIAL_CONSOLE bool "USART6" - depends on USART6_ISUART + depends on USART6_SERIALDRIVER config UART7_SERIAL_CONSOLE bool "UART7" - depends on ARCH_HAVE_UART7 + depends on UART7_SERIALDRIVER config USART7_SERIAL_CONSOLE bool "USART7" - depends on USART7_ISUART + depends on USART7_SERIALDRIVER config UART8_SERIAL_CONSOLE bool "UART8" - depends on ARCH_HAVE_UART8 + depends on UART8_SERIALDRIVER config USART8_SERIAL_CONSOLE bool "USART8" - depends on USART8_ISUART + depends on USART8_SERIALDRIVER config SCI0_SERIAL_CONSOLE bool "SCI0" - depends on ARCH_HAVE_SCI0 + depends on SCI0_SERIALDRIVER config SCI1_SERIAL_CONSOLE bool "SCI1" - depends on ARCH_HAVE_SCI1 + depends on SCI1_SERIALDRIVER config OTHER_SERIAL_CONSOLE bool "Other serial console" @@ -711,7 +660,7 @@ endchoice # menu "UART Configuration" - depends on ARCH_HAVE_UART + depends on UART_SERIALDRIVER config UART_RXBUFSIZE int "Receive buffer size" @@ -776,7 +725,7 @@ config UART_DMA endmenu menu "UART0 Configuration" - depends on ARCH_HAVE_UART0 + depends on UART0_SERIALDRIVER config UART0_RXBUFSIZE int "Receive buffer size" @@ -841,7 +790,7 @@ config UART0_DMA endmenu menu "USART0 Configuration" - depends on USART0_ISUART + depends on USART0_SERIALDRIVER config USART0_RXBUFSIZE int "Receive buffer size" @@ -906,7 +855,7 @@ config USART0_DMA endmenu menu "UART1 Configuration" - depends on ARCH_HAVE_UART1 + depends on UART1_SERIALDRIVER config UART1_RXBUFSIZE int "Receive buffer size" @@ -971,7 +920,7 @@ config UART1_DMA endmenu menu "USART1 Configuration" - depends on USART1_ISUART + depends on USART1_SERIALDRIVER config USART1_RXBUFSIZE int "Receive buffer size" @@ -1036,7 +985,7 @@ config USART1_DMA endmenu menu "UART2 Configuration" - depends on ARCH_HAVE_UART2 + depends on UART2_SERIALDRIVER config UART2_RXBUFSIZE int "Receive buffer size" @@ -1101,7 +1050,7 @@ config UART2_DMA endmenu menu "USART2 Configuration" - depends on USART2_ISUART + depends on USART2_SERIALDRIVER config USART2_RXBUFSIZE int "Receive buffer size" @@ -1165,7 +1114,7 @@ config USART2_DMA endmenu menu "UART3 Configuration" - depends on ARCH_HAVE_UART3 + depends on UART3_SERIALDRIVER config UART3_RXBUFSIZE int "Receive buffer size" @@ -1230,7 +1179,7 @@ config UART3_DMA endmenu menu "USART3 Configuration" - depends on USART3_ISUART + depends on USART3_SERIALDRIVER config USART3_RXBUFSIZE int "Receive buffer size" @@ -1295,7 +1244,7 @@ config USART3_DMA endmenu menu "UART4 Configuration" - depends on ARCH_HAVE_UART4 + depends on UART4_SERIALDRIVER config UART4_RXBUFSIZE int "Receive buffer size" @@ -1360,7 +1309,7 @@ config UART4_DMA endmenu menu "USART4 Configuration" - depends on USART4_ISUART + depends on USART4_SERIALDRIVER config USART4_RXBUFSIZE int "Receive buffer size" @@ -1425,7 +1374,7 @@ config USART4_DMA endmenu menu "UART5 Configuration" - depends on ARCH_HAVE_UART5 + depends on UART5_SERIALDRIVER config UART5_RXBUFSIZE int "Receive buffer size" @@ -1490,7 +1439,7 @@ config UART5_DMA endmenu menu "USART5 Configuration" - depends on USART5_ISUART + depends on USART5_SERIALDRIVER config USART5_RXBUFSIZE int "Receive buffer size" @@ -1555,7 +1504,7 @@ config USART5_DMA endmenu menu "USART6 Configuration" - depends on USART6_ISUART + depends on USART6_SERIALDRIVER config USART6_RXBUFSIZE int "Receive buffer size" @@ -1620,7 +1569,7 @@ config USART6_DMA endmenu menu "UART6 Configuration" - depends on ARCH_HAVE_UART6 + depends on UART6_SERIALDRIVER config UART6_RXBUFSIZE int "Receive buffer size" @@ -1685,7 +1634,7 @@ config UART6_DMA endmenu menu "USART7 Configuration" - depends on USART7_ISUART + depends on USART7_SERIALDRIVER config USART7_RXBUFSIZE int "Receive buffer size" @@ -1750,7 +1699,7 @@ config USART7_DMA endmenu menu "UART7 Configuration" - depends on ARCH_HAVE_UART7 + depends on UART7_SERIALDRIVER config UART7_RXBUFSIZE int "Receive buffer size" @@ -1815,7 +1764,7 @@ config UART7_DMA endmenu menu "USART8 Configuration" - depends on USART8_ISUART + depends on USART8_SERIALDRIVER config USART8_RXBUFSIZE int "Receive buffer size" @@ -1880,7 +1829,7 @@ config USART8_DMA endmenu menu "UART8 Configuration" - depends on ARCH_HAVE_UART8 + depends on UART8_SERIALDRIVER config UART8_RXBUFSIZE int "Receive buffer size" @@ -1945,7 +1894,7 @@ config UART8_DMA endmenu menu "SCI0 Configuration" - depends on ARCH_HAVE_SCI0 + depends on SCI0_SERIALDRIVER config SCI0_RXBUFSIZE int "SCI0 receive buffer size" @@ -1989,7 +1938,7 @@ config SCI0_2STOP endmenu # SCI0 Configuration menu "SCI1 Configuration" - depends on ARCH_HAVE_SCI1 + depends on SCI1_SERIALDRIVER config SCI1_RXBUFSIZE int "SCI1 receive buffer size" diff --git a/drivers/serial/lowconsole.c b/drivers/serial/lowconsole.c index c6228d79a6f..c3be8596619 100644 --- a/drivers/serial/lowconsole.c +++ b/drivers/serial/lowconsole.c @@ -70,14 +70,17 @@ static int lowconsole_ioctl(struct file *filep, int cmd, unsigned long arg); static const struct file_operations g_consoleops = { - 0, /* open */ - 0, /* close */ + NULL, /* open */ + NULL, /* close */ lowconsole_read, /* read */ lowconsole_write, /* write */ - 0, /* seek */ + NULL, /* seek */ lowconsole_ioctl /* ioctl */ #ifndef CONFIG_DISABLE_POLL - , 0 /* poll */ + , NULL /* poll */ +#endif +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ #endif }; diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c index 2e13f3790a8..2de293d0b03 100644 --- a/drivers/serial/serial.c +++ b/drivers/serial/serial.c @@ -103,6 +103,9 @@ static const struct file_operations g_serialops = #ifndef CONFIG_DISABLE_POLL , uart_poll /* poll */ #endif +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; /************************************************************************************ @@ -487,7 +490,7 @@ static ssize_t uart_write(FAR struct file *filep, FAR const char *buffer, * interrupted transfer. */ - if (buflen < nwritten) + if (buflen < (size_t)nwritten) { /* Some data was transferred. Return the number of bytes that * were successfully transferred. @@ -557,7 +560,7 @@ static ssize_t uart_read(FAR struct file *filep, FAR char *buffer, size_t buflen * data from the end of the buffer. */ - while (recvd < buflen) + while ((size_t)recvd < buflen) { #ifdef CONFIG_SERIAL_REMOVABLE /* If the removable device is no longer connected, refuse to read any diff --git a/drivers/syslog/ramlog.c b/drivers/syslog/ramlog.c index ea8e035ce70..1025500987f 100644 --- a/drivers/syslog/ramlog.c +++ b/drivers/syslog/ramlog.c @@ -123,14 +123,17 @@ static int ramlog_poll(FAR struct file *filep, FAR struct pollfd *fds, static const struct file_operations g_ramlogfops = { - 0, /* open */ - 0, /* close */ - ramlog_read, /* read */ - ramlog_write, /* write */ - 0, /* seek */ - 0 /* ioctl */ + NULL, /* open */ + NULL, /* close */ + ramlog_read, /* read */ + ramlog_write, /* write */ + NULL, /* seek */ + NULL /* ioctl */ #ifndef CONFIG_DISABLE_POLL - , ramlog_poll /* poll */ + , ramlog_poll /* poll */ +#endif +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ #endif }; @@ -206,7 +209,7 @@ static void ramlog_pollnotify(FAR struct ramlog_dev_s *priv, static int ramlog_addchar(FAR struct ramlog_dev_s *priv, char ch) { irqstate_t flags; - int nexthead; + size_t nexthead; /* Disable interrupts (in case we are NOT called from interrupt handler) */ @@ -271,7 +274,7 @@ static ssize_t ramlog_read(FAR struct file *filep, FAR char *buffer, size_t len) /* Loop until something is read */ - for (nread = 0; nread < len; ) + for (nread = 0; (size_t)nread < len; ) { /* Get the next byte from the buffer */ @@ -437,7 +440,7 @@ static ssize_t ramlog_write(FAR struct file *filep, FAR const char *buffer, size * interrupts. */ - for (nwritten = 0; nwritten < len; nwritten++) + for (nwritten = 0; (size_t)nwritten < len; nwritten++) { /* Get the next character to output */ @@ -529,7 +532,7 @@ int ramlog_poll(FAR struct file *filep, FAR struct pollfd *fds, bool setup) FAR struct inode *inode = filep->f_inode; FAR struct ramlog_dev_s *priv; pollevent_t eventset; - int ndx; + size_t ndx; int ret; int i; diff --git a/drivers/timers/timer.c b/drivers/timers/timer.c index 4e4e4d94f8e..afdd39a39ea 100644 --- a/drivers/timers/timer.c +++ b/drivers/timers/timer.c @@ -114,10 +114,13 @@ static const struct file_operations g_timerops = timer_close, /* close */ timer_read, /* read */ timer_write, /* write */ - 0, /* seek */ + NULL, /* seek */ timer_ioctl /* ioctl */ #ifndef CONFIG_DISABLE_POLL - , 0 /* poll */ + , NULL /* poll */ +#endif +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ #endif }; diff --git a/fs/inode/Make.defs b/fs/inode/Make.defs index 14502451053..753a0706eee 100644 --- a/fs/inode/Make.defs +++ b/fs/inode/Make.defs @@ -39,7 +39,7 @@ ifneq ($(CONFIG_NFILE_DESCRIPTORS),0) CSRCS += fs_files.c fs_foreachinode.c fs_inode.c fs_inodeaddref.c CSRCS += fs_inodebasename.c fs_inodefind.c fs_inoderelease.c -CSRCS += fs_inoderemove.c fs_inodereserve.c +CSRCS += fs_inoderemove.c fs_inodereserve.c fs_filedetach.c # Include inode/utils build support diff --git a/fs/inode/fs_filedetach.c b/fs/inode/fs_filedetach.c new file mode 100644 index 00000000000..8b13250cbc1 --- /dev/null +++ b/fs/inode/fs_filedetach.c @@ -0,0 +1,217 @@ +/**************************************************************************** + * fs/inode/fs_filedetach.c + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * 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. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include +#include + +#include +#include + +#include "inode/inode.h" + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: _files_semtake + ****************************************************************************/ + +static inline void _files_semtake(FAR struct filelist *list) +{ + /* Take the semaphore (perhaps waiting) */ + + while (sem_wait(&list->fl_sem) != 0) + { + /* The only case that an error should occur here is if + * the wait was awakened by a signal. + */ + + DEBUGASSERT(get_errno() == EINTR); + } +} + +/**************************************************************************** + * Name: _files_semgive + ****************************************************************************/ + +#define _files_semgive(list) sem_post(&list->fl_sem) + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: file_detach + * + * Description: + * This function is used to device drivers to create a task-independent + * handle to an entity in the file system. file_detach() duplicates the + * 'struct file' that underlies the file descriptor, then closes the file + * descriptor. + * + * This function will fail if fd is not a valid file descriptor. In + * particular, it will fail if fd is a socket descriptor. + * + * Input Parameters: + * fd - The file descriptor to be detached. This descriptor will be + * closed and invalid if the file was successfully detached. + * filep - A pointer to a user provided memory location in which to + * received the duplicated, detached file structure. + * + * Returned Value: + * Zero (OK) is returned on success; A negated errno value is returned on + * any failure to indicate the nature of the failure. + * + ****************************************************************************/ + +#if CONFIG_NFILE_DESCRIPTORS > 0 +int file_detach(int fd, FAR struct file *filep) +{ + FAR struct filelist *list; + FAR struct file *parent; + + /* Verify the file descriptor range */ + + if (fd < 0 || fd >= CONFIG_NFILE_DESCRIPTORS) + { + /* Not a file descriptor (might be a socket descriptor) */ + + return -EBADF; + } + + /* Get the thread-specific file list. It should never be NULL in this + * context. + */ + + list = sched_getfiles(); + DEBUGASSERT(list != NULL); + + /* If the file was properly opened, there should be an inode assigned */ + + _files_semtake(list); + parent = &list->fl_files[fd]; + if (parent->f_inode == NULL) + { + /* File is not open */ + + _files_semgive(list); + return -EBADF; + } + + /* Duplicate the 'struct file' content into the user-provided file + * structure. + */ + + filep->f_oflags = parent->f_oflags; + filep->f_pos = parent->f_pos; + filep->f_inode = parent->f_inode; + filep->f_priv = parent->f_priv; + + /* Release the file descriptore *without* calling the drive close method + * and without decrementing the inode reference count. That will be done + * in file_close_detached(). + */ + + parent->f_oflags = 0; + parent->f_pos = 0; + parent->f_inode = NULL; + parent->f_priv = NULL; + + _files_semgive(list); + return OK; +} +#endif + +/**************************************************************************** + * Name: file_close_detached + * + * Description: + * Close a file that was previously detached with file_detach(). + * + * REVISIT: This is essentially the same as _files_close() + * + * Input Parameters: + * filep - A pointer to a user provided memory location containing the + * open file data returned by file_detach(). + * + * Returned Value: + * Zero (OK) is returned on success; A negated errno value is returned on + * any failure to indicate the nature of the failure. + * + ****************************************************************************/ + +int file_close_detached(FAR struct file *filep) +{ + struct inode *inode; + int ret = OK; + + DEBUGASSERT(filep != NULL); + inode = filep->f_inode; + + /* Check if the struct file is open (i.e., assigned an inode) */ + + if (inode) + { + /* Close the file, driver, or mountpoint. */ + + if (inode->u.i_ops && inode->u.i_ops->close) + { + /* Perform the close operation */ + + ret = inode->u.i_ops->close(filep); + } + + /* And release the inode */ + + inode_release(inode); + + /* Reset the user file struct instance so that it cannot be reused. */ + + filep->f_oflags = 0; + filep->f_pos = 0; + filep->f_inode = NULL; + filep->f_priv = NULL; + } + + return ret; +} diff --git a/fs/inode/fs_files.c b/fs/inode/fs_files.c index 84f78ee4009..7c4665640e5 100644 --- a/fs/inode/fs_files.c +++ b/fs/inode/fs_files.c @@ -65,7 +65,7 @@ static void _files_semtake(FAR struct filelist *list) while (sem_wait(&list->fl_sem) != 0) { - /* The only case that an error should occr here is if + /* The only case that an error should occur here is if * the wait was awakened by a signal. */ @@ -362,9 +362,9 @@ int files_close(int fd) /* If the file was properly opened, there should be an inode assigned */ if (fd < 0 || fd >= CONFIG_NFILE_DESCRIPTORS || !list->fl_files[fd].f_inode) - { - return -EBADF; - } + { + return -EBADF; + } /* Perform the protected close operation */ diff --git a/fs/vfs/fs_close.c b/fs/vfs/fs_close.c index b784b2c9e0c..3a52d0c086f 100644 --- a/fs/vfs/fs_close.c +++ b/fs/vfs/fs_close.c @@ -105,7 +105,7 @@ int close(int fd) #if CONFIG_NFILE_DESCRIPTORS > 0 /* Close the driver or mountpoint. NOTES: (1) there is no - * exclusion mechanism here , the driver or mountpoint must be + * exclusion mechanism here, the driver or mountpoint must be * able to handle concurrent operations internally, (2) The driver * may have been opened numerous times (for different file * descriptors) and must also handle being closed numerous times. @@ -122,6 +122,7 @@ int close(int fd) err = -ret; goto errout; } + return OK; #endif diff --git a/fs/vfs/fs_dup.c b/fs/vfs/fs_dup.c index 03b8b751ab6..7e8096663d9 100644 --- a/fs/vfs/fs_dup.c +++ b/fs/vfs/fs_dup.c @@ -46,14 +46,6 @@ #include #include "inode/inode.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/fs/vfs/fs_dup2.c b/fs/vfs/fs_dup2.c index c81e7b6eae0..02ed1cbecc1 100644 --- a/fs/vfs/fs_dup2.c +++ b/fs/vfs/fs_dup2.c @@ -52,14 +52,6 @@ #if CONFIG_NFILE_DESCRIPTORS > 0 && defined(CONFIG_NET) && CONFIG_NSOCKET_DESCRIPTORS > 0 -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ diff --git a/include/nuttx/1wire.h b/include/nuttx/1wire.h new file mode 100644 index 00000000000..2879d03089f --- /dev/null +++ b/include/nuttx/1wire.h @@ -0,0 +1,166 @@ +/**************************************************************************** + * include/nuttx/1wire.h + * + * Copyright (C) 2016 Aleksandr Vyhovanec. All rights reserved. + * Author: Aleksandr Vyhovanec + * + * 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. + * + ****************************************************************************/ + +#ifndef __INCLUDE_NUTTX_1WIRE_H +#define __INCLUDE_NUTTX_1WIRE_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/**************************************************************************** + * Name: ONEWIRE_RESET + * + * Description: + * Reset pulse and presence detect. Each write operational will be an 'atomic' + * operation in the sense that any other 1-Wire actions will be serialized + * and pend until this write completes. + * + * Input Parameters: + * dev - Device-specific state data + * + * Returned Value: + * 0: success, <0: A negated errno + * + ****************************************************************************/ + +#define ONEWIRE_RESET(d) ((d)->ops->reset(d)) + +/**************************************************************************** + * Name: ONEWIRE_WRITE + * + * Description: + * Send a block of data on 1-Wire. Each write operational will be an 'atomic' + * operation in the sense that any other 1-Wire actions will be serialized + * and pend until this write completes. + * + * Input Parameters: + * dev - Device-specific state data + * buffer - A pointer to the read-only buffer of data to be written to device + * buflen - The number of bytes to send from the buffer + * + * Returned Value: + * 0: success, <0: A negated errno + * + ****************************************************************************/ + +#define ONEWIRE_WRITE(d,b,l) ((d)->ops->write(d,b,l)) + +/**************************************************************************** + * Name: ONEWIRE_READ + * + * Description: + * Receive a block of data from 1-Wire. Each read operational will be an 'atomic' + * operation in the sense that any other 1-Wire actions will be serialized + * and pend until this read completes. + * + * Input Parameters: + * dev - Device-specific state data + * buffer - A pointer to a buffer of data to receive the data from the device + * buflen - The requested number of bytes to be read + * + * Returned Value: + * 0: success, <0: A negated errno + * + ****************************************************************************/ + +#define ONEWIRE_READ(d,b,l) ((d)->ops->read(d,b,l)) + +/**************************************************************************** + * Name: ONEWIRE_EXCHANGE + * + * Description: + * Reset pulse and presence detect, send a block of data and receive a block + * of data from 1-Wir. Each write operational will be an 'atomic' + * operation in the sense that any other 1-Wire actions will be serialized + * and pend until this write completes. + * + * Input Parameters: + * dev - Device-specific state data + * reset - Reset pulse and presence detect + * txbuffer - A pointer to the read-only buffer of data to be written to device + * txbuflen - The number of bytes to send from the buffer + * rxbuffer - A pointer to a buffer of data to receive the data from the device + * rxbuflen - The requested number of bytes to be read + * + * Returned Value: + * 0: success, <0: A negated errno + * + ****************************************************************************/ + +#define ONEWIRE_EXCHANGE(d,r,tx,tl,rx,rl) ((d)->ops->exchange(d,r,tx,tl,rx,rl)) + +/**************************************************************************** + * Public Types + ****************************************************************************/ + +/* The 1-Wire vtable */ + +struct onewire_dev_s; +struct onewire_ops_s +{ + int (*reset)(FAR struct onewire_dev_s *dev); + int (*write)(FAR struct onewire_dev_s *dev, FAR const uint8_t *buffer, + int buflen); + int (*read)(FAR struct onewire_dev_s *dev, FAR uint8_t *buffer, + int buflen); + int (*exchange)(FAR struct onewire_dev_s *dev, bool reset, + FAR const uint8_t *txbuffer, int txbuflen, + FAR uint8_t *rxbuffer, int rxbuflen); +}; + +/* 1-Wire private data. This structure only defines the initial fields of the + * structure visible to the 1-Wire client. The specific implementation may + * add additional, device specific fields after the vtable. + */ + +struct onewire_dev_s +{ + const struct onewire_ops_s *ops; /* 1-Wire vtable */ +}; + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +#endif /* __INCLUDE_NUTTX_1WIRE_H */ diff --git a/include/nuttx/analog/adc.h b/include/nuttx/analog/adc.h index 04db97626cf..0044c03364d 100644 --- a/include/nuttx/analog/adc.h +++ b/include/nuttx/analog/adc.h @@ -1,10 +1,10 @@ /************************************************************************************ * include/nuttx/analog/adc.h * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. * Copyright (C) 2011 Li Zhuoyi. All rights reserved. * Author: Li Zhuoyi - * History: 0.1 2011-08-04 initial version - * 0.2 remove ao_read + * Gregory Nutt * * Derived from include/nuttx/can.h * @@ -75,6 +75,27 @@ /************************************************************************************ * Public Types ************************************************************************************/ +/* These are callbacks to notify the upper-half driver of ADC events */ + +struct adc_dev_s; +struct adc_callback_s +{ + /* This method is called from the lower half, platform-specific ADC logic when + * new ADC sample data is available. + * + * Input Parameters: + * dev - The ADC device structure that was previously registered by adc_register() + * ch - And ID for the ADC channel number that generated the data + * data - The actual converted data from the channel. + * + * Returned Value: + * Zero on success; a negated errno value on failure. + */ + + CODE int (*au_receive)(FAR struct adc_dev_s *dev, uint8_t ch, int32_t data); +}; + +/* This describes on ADC message */ struct adc_msg_s { @@ -82,6 +103,8 @@ struct adc_msg_s int32_t am_data; /* ADC convert result (4 bytes) */ } packed_struct; +/* This describes a FIFO of ADC messages */ + struct adc_fifo_s { sem_t af_sem; /* Counting semaphore */ @@ -99,6 +122,13 @@ struct adc_fifo_s struct adc_dev_s; struct adc_ops_s { + /* Bind the upper-half driver callbacks to the lower-half implementation. This + * must be called early in order to receive ADC event notifications. + */ + + CODE int (*ao_bind)(FAR struct adc_dev_s *dev, + FAR const struct adc_callback_s *callback); + /* Reset the ADC device. Called early to initialize the hardware. This * is called, before ao_setup() and on error conditions. */ @@ -129,8 +159,8 @@ struct adc_ops_s }; /* This is the device structure used by the driver. The caller of - * adc_register() must allocate and initialize this structure. The - * calling logic need only set all fields to zero except: + * adc_register() must allocate and initialize this structure. The calling + * logic need only set all fields to zero except: * * The elements of 'ad_ops', and 'ad_priv' * @@ -139,21 +169,24 @@ struct adc_ops_s struct adc_dev_s { +#ifdef CONFIG_ADC + /* Fields managed by common upper half ADC logic */ + uint8_t ad_ocount; /* The number of times the device has been opened */ uint8_t ad_nrxwaiters; /* Number of threads waiting to enqueue a message */ sem_t ad_closesem; /* Locks out new opens while close is in progress */ sem_t ad_recvsem; /* Used to wakeup user waiting for space in ad_recv.buffer */ struct adc_fifo_s ad_recv; /* Describes receive FIFO */ +#endif + + /* Fields provided by lower half ADC logic */ + FAR const struct adc_ops_s *ad_ops; /* Arch-specific operations */ FAR void *ad_priv; /* Used by the arch-specific logic */ }; /************************************************************************************ - * Public Data - ************************************************************************************/ - -/************************************************************************************ - * Public Functions + * Public Function Prototypes ************************************************************************************/ #if defined(__cplusplus) @@ -164,6 +197,7 @@ extern "C" /************************************************************************************ * "Upper-Half" ADC Driver Interfaces ************************************************************************************/ + /************************************************************************************ * Name: adc_register * @@ -188,28 +222,10 @@ extern "C" int adc_register(FAR const char *path, FAR struct adc_dev_s *dev); -/************************************************************************************ - * Name: adc_receive - * - * Description: - * This function is called from the lower half, platform-specific ADC logic when - * new ADC sample data is available. - * - * Input Parameters: - * dev - The ADC device structure that was previously registered by adc_register() - * ch - And ID for the ADC channel number that generated the data - * data - The actualy converted data from the channel. - * - * Returned Value: - * Zero on success; a negated errno value on failure. - * - ************************************************************************************/ - -int adc_receive(FAR struct adc_dev_s *dev, uint8_t ch, int32_t data); - /************************************************************************************ * Platform-Independent "Lower Half" ADC Driver Interfaces ************************************************************************************/ + /************************************************************************************ * Name: up_ads1255initialize * @@ -218,7 +234,8 @@ int adc_receive(FAR struct adc_dev_s *dev, uint8_t ch, int32_t data); * ************************************************************************************/ -FAR struct adc_dev_s *up_ads1255initialize(FAR struct spi_dev_s *spi, unsigned int devno); +FAR struct adc_dev_s *up_ads1255initialize(FAR struct spi_dev_s *spi, + unsigned int devno); #if defined(__cplusplus) } diff --git a/include/nuttx/board.h b/include/nuttx/board.h index 9e0ea70ab80..e143c4862bb 100644 --- a/include/nuttx/board.h +++ b/include/nuttx/board.h @@ -144,9 +144,24 @@ void board_initialize(void); * called directly from application code, but only indirectly via the * (non-standard) boardctl() interface using the command BOARDIOC_INIT. * + * Input Parameters: + * arg - The boardctl() argument is passed to the board_app_initialize() + * implementation without modification. The argument has no + * meaning to NuttX; the meaning of the argument is a contract + * between the board-specific initalization logic and the the + * matching application logic. The value cold be such things as a + * mode enumeration value, a set of DIP switch switch settings, a + * pointer to configuration data read from a file or serial FLASH, + * or whatever you would like to do with it. Every implementation + * should accept zero/NULL as a default configuration. + * + * Returned Value: + * Zero (OK) is returned on success; a negated errno value is returned on + * any failure to indicate the nature of the failure. + * ****************************************************************************/ -int board_app_initialize(void); +int board_app_initialize(uintptr_t arg); /**************************************************************************** * Name: board_power_off diff --git a/include/nuttx/crypto/crypto.h b/include/nuttx/crypto/crypto.h index 631dedd893a..3433a72c9e9 100644 --- a/include/nuttx/crypto/crypto.h +++ b/include/nuttx/crypto/crypto.h @@ -90,6 +90,9 @@ int up_cryptoinitialize(void); int up_aesinitialize(void); int aes_cypher(FAR void *out, FAR const void *in, uint32_t size, FAR const void *iv, FAR const void *key, uint32_t keysize, int mode, int encrypt); +int aes_init(FAR const void *iv, FAR const void *key, uint32_t keysize, int mode, + int encrypt); +int aes_update(FAR const void *out, uint32_t *outl, FAR const void *in, uint32_t inl); #endif #if defined(CONFIG_CRYPTO_ALGTEST) diff --git a/include/nuttx/fs/fs.h b/include/nuttx/fs/fs.h index 8de9a1b0953..b415725ee8f 100644 --- a/include/nuttx/fs/fs.h +++ b/include/nuttx/fs/fs.h @@ -364,7 +364,6 @@ extern "C" #define EXTERN extern #endif -/* fs_inode.c ***************************************************************/ /**************************************************************************** * Name: fs_initialize * @@ -376,7 +375,6 @@ extern "C" void fs_initialize(void); -/* fs_foreachmountpoint.c ***************************************************/ /**************************************************************************** * Name: foreach_mountpoint * @@ -401,7 +399,6 @@ void fs_initialize(void); int foreach_mountpoint(foreach_mountpoint_t handler, FAR void *arg); #endif -/* fs_registerdriver.c ******************************************************/ /**************************************************************************** * Name: register_driver * @@ -428,7 +425,6 @@ int foreach_mountpoint(foreach_mountpoint_t handler, FAR void *arg); int register_driver(FAR const char *path, FAR const struct file_operations *fops, mode_t mode, FAR void *priv); -/* fs_registerblockdriver.c *************************************************/ /**************************************************************************** * Name: register_blockdriver * @@ -458,7 +454,6 @@ int register_blockdriver(FAR const char *path, FAR void *priv); #endif -/* fs_unregisterdriver.c ****************************************************/ /**************************************************************************** * Name: unregister_driver * @@ -469,7 +464,6 @@ int register_blockdriver(FAR const char *path, int unregister_driver(const char *path); -/* fs_unregisterblockdriver.c ***********************************************/ /**************************************************************************** * Name: unregister_blockdriver * @@ -480,7 +474,6 @@ int unregister_driver(const char *path); int unregister_blockdriver(const char *path); -/* fs_open.c ****************************************************************/ /**************************************************************************** * Name: inode_checkflags * @@ -491,7 +484,6 @@ int unregister_blockdriver(const char *path); int inode_checkflags(FAR struct inode *inode, int oflags); -/* fs_files.c ***************************************************************/ /**************************************************************************** * Name: files_initlist * @@ -529,7 +521,6 @@ void files_releaselist(FAR struct filelist *list); int file_dup2(FAR struct file *filep1, FAR struct file *filep2); #endif -/* fs_filedup.c *************************************************************/ /**************************************************************************** * Name: fs_dupfd OR dup * @@ -541,7 +532,7 @@ int file_dup2(FAR struct file *filep1, FAR struct file *filep2); * function IS dup(). * * This alternative naming is used when dup could operate on both file and - * socket descritors to avoid drawing unused socket support into the link. + * socket descriptors to avoid drawing unused socket support into the link. * ****************************************************************************/ @@ -561,7 +552,6 @@ int fs_dupfd(int fd, int minfd); int file_dup(FAR struct file *filep, int minfd); -/* fs_filedup2.c ************************************************************/ /**************************************************************************** * Name: fs_dupfd2 OR dup2 * @@ -584,7 +574,52 @@ int fs_dupfd2(int fd1, int fd2); #endif #endif -/* fs_openblockdriver.c *****************************************************/ +/**************************************************************************** + * Name: file_detach + * + * Description: + * This function is used to device drivers to create a task-independent + * handle to an entity in the file system. file_detach() duplicates the + * 'struct file' that underlies the file descriptor, then closes the file + * descriptor. + * + * This function will fail if fd is not a valid file descriptor. In + * particular, it will fail if fd is a socket descriptor. + * + * Input Parameters: + * fd - The file descriptor to be detached. This descriptor will be + * closed and invalid if the file was successfully detached. + * filep - A pointer to a user provided memory location in which to + * received the duplicated, detached file structure. + * + * Returned Value: + * Zero (OK) is returned on success; A negated errno value is returned on + * any failure to indicate the nature of the failure. + * + ****************************************************************************/ + +#if CONFIG_NFILE_DESCRIPTORS > 0 +int file_detach(int fd, FAR struct file *filep); +#endif + +/**************************************************************************** + * Name: file_close_detached + * + * Description: + * Close a file that was previously detached with file_detach(). + * + * Input Parameters: + * filep - A pointer to a user provided memory location containing the + * open file data returned by file_detach(). + * + * Returned Value: + * Zero (OK) is returned on success; A negated errno value is returned on + * any failure to indicate the nature of the failure. + * + ****************************************************************************/ + +int file_close_detached(FAR struct file *filep); + /**************************************************************************** * Name: open_blockdriver * @@ -613,7 +648,6 @@ int open_blockdriver(FAR const char *pathname, int mountflags, FAR struct inode **ppinode); #endif -/* fs_closeblockdriver.c ****************************************************/ /**************************************************************************** * Name: close_blockdriver * @@ -635,7 +669,6 @@ int open_blockdriver(FAR const char *pathname, int mountflags, int close_blockdriver(FAR struct inode *inode); #endif -/* fs/vfs/fs_ioctl.c ********************************************************/ /**************************************************************************** * Name: fs_ioctl * @@ -669,7 +702,6 @@ int close_blockdriver(FAR struct inode *inode); int fs_ioctl(int fd, int req, unsigned long arg); #endif -/* fs_fdopen.c **************************************************************/ /**************************************************************************** * Name: fs_fdopen * @@ -684,7 +716,6 @@ struct tcb_s; /* Forward reference */ FAR struct file_struct *fs_fdopen(int fd, int oflags, FAR struct tcb_s *tcb); #endif -/* libc/stdio/lib_fflush.c *************************************************/ /**************************************************************************** * Name: lib_flushall * @@ -698,7 +729,6 @@ FAR struct file_struct *fs_fdopen(int fd, int oflags, FAR struct tcb_s *tcb); int lib_flushall(FAR struct streamlist *list); #endif -/* libc/misc/lib_sendfile.c *************************************************/ /**************************************************************************** * Name: lib_sendfile * @@ -711,7 +741,6 @@ int lib_flushall(FAR struct streamlist *list); ssize_t lib_sendfile(int outfd, int infd, off_t *offset, size_t count); #endif -/* fs/fs_getfilep.c *********************************************************/ /**************************************************************************** * Name: fs_getfilep * @@ -734,7 +763,6 @@ ssize_t lib_sendfile(int outfd, int infd, off_t *offset, size_t count); FAR struct file *fs_getfilep(int fd); #endif -/* fs/fs_read.c *************************************************************/ /**************************************************************************** * Name: file_read * @@ -749,7 +777,6 @@ FAR struct file *fs_getfilep(int fd); ssize_t file_read(FAR struct file *filep, FAR void *buf, size_t nbytes); #endif -/* fs/fs_write.c ************************************************************/ /**************************************************************************** * Name: file_write * @@ -764,7 +791,6 @@ ssize_t file_read(FAR struct file *filep, FAR void *buf, size_t nbytes); ssize_t file_write(FAR struct file *filep, FAR const void *buf, size_t nbytes); #endif -/* fs/fs_pread.c ************************************************************/ /**************************************************************************** * Name: file_pread * @@ -780,7 +806,6 @@ ssize_t file_pread(FAR struct file *filep, FAR void *buf, size_t nbytes, off_t offset); #endif -/* fs/fs_pwrite.c ***********************************************************/ /**************************************************************************** * Name: file_pwrite * @@ -796,7 +821,6 @@ ssize_t file_pwrite(FAR struct file *filep, FAR const void *buf, size_t nbytes, off_t offset); #endif -/* fs/fs_lseek.c ************************************************************/ /**************************************************************************** * Name: file_seek * @@ -811,7 +835,6 @@ ssize_t file_pwrite(FAR struct file *filep, FAR const void *buf, off_t file_seek(FAR struct file *filep, off_t offset, int whence); #endif -/* fs/fs_fsync.c ************************************************************/ /**************************************************************************** * Name: file_fsync * @@ -826,7 +849,6 @@ off_t file_seek(FAR struct file *filep, off_t offset, int whence); int file_fsync(FAR struct file *filep); #endif -/* fs/fs_fcntl.c ************************************************************/ /**************************************************************************** * Name: file_vfcntl * @@ -841,7 +863,6 @@ int file_fsync(FAR struct file *filep); int file_vfcntl(FAR struct file *filep, int cmd, va_list ap); #endif -/* fs/fs_poll.c *************************************************************/ /**************************************************************************** * Function: file_poll * @@ -864,7 +885,6 @@ int file_vfcntl(FAR struct file *filep, int cmd, va_list ap); int file_poll(int fd, FAR struct pollfd *fds, bool setup); #endif -/* drivers/dev_null.c *******************************************************/ /**************************************************************************** * Name: devnull_register * @@ -875,7 +895,6 @@ int file_poll(int fd, FAR struct pollfd *fds, bool setup); void devnull_register(void); -/* crypto/cryptodev.c *******************************************************/ /**************************************************************************** * Name: devcrypto_register * @@ -886,7 +905,6 @@ void devnull_register(void); void devcrypto_register(void); -/* drivers/dev_zero.c *******************************************************/ /**************************************************************************** * Name: devzero_register * @@ -897,7 +915,6 @@ void devcrypto_register(void); void devzero_register(void); -/* drivers/bch/bchdev_register.c ********************************************/ /**************************************************************************** * Name: bchdev_register * @@ -910,7 +927,6 @@ void devzero_register(void); int bchdev_register(FAR const char *blkdev, FAR const char *chardev, bool readonly); -/* drivers/bch/bchdev_unregister.c ******************************************/ /**************************************************************************** * Name: bchdev_unregister * @@ -926,7 +942,6 @@ int bchdev_unregister(FAR const char *chardev); * are incompatible. One and only one access method should be implemented. */ -/* drivers/bch/bchlib_setup.c ***********************************************/ /**************************************************************************** * Name: bchlib_setup * @@ -938,7 +953,6 @@ int bchdev_unregister(FAR const char *chardev); int bchlib_setup(FAR const char *blkdev, bool readonly, FAR void **handle); -/* drivers/bch/bchlib_teardown.c ********************************************/ /**************************************************************************** * Name: bchlib_teardown * @@ -950,7 +964,6 @@ int bchlib_setup(FAR const char *blkdev, bool readonly, FAR void **handle); int bchlib_teardown(FAR void *handle); -/* drivers/bch/bchlib_read.c ************************************************/ /**************************************************************************** * Name: bchlib_read * @@ -963,7 +976,6 @@ int bchlib_teardown(FAR void *handle); ssize_t bchlib_read(FAR void *handle, FAR char *buffer, size_t offset, size_t len); -/* drivers/bch/bchlib_write.c ***********************************************/ /**************************************************************************** * Name: bchlib_write * diff --git a/include/nuttx/i2c/i2c_master.h b/include/nuttx/i2c/i2c_master.h index 1938bcbfa10..c3684398ee6 100644 --- a/include/nuttx/i2c/i2c_master.h +++ b/include/nuttx/i2c/i2c_master.h @@ -155,10 +155,10 @@ struct i2c_master_s; struct i2c_msg_s; struct i2c_ops_s { - int (*transfer)(FAR struct i2c_master_s *dev, FAR struct i2c_msg_s *msgs, - int count); + CODE int (*transfer)(FAR struct i2c_master_s *dev, + FAR struct i2c_msg_s *msgs, int count); #ifdef CONFIG_I2C_RESET - int (*reset)(FAR struct i2c_master_s *dev); + CODE int (*reset)(FAR struct i2c_master_s *dev); #endif }; diff --git a/include/nuttx/init.h b/include/nuttx/init.h index cc1f4f72a96..54eb9033d0f 100644 --- a/include/nuttx/init.h +++ b/include/nuttx/init.h @@ -65,21 +65,22 @@ enum os_initstate_e { - OSINIT_POWERUP = 0, /* Power-up. No initialization yet performed. - * Depends on .bss initialization logic for this - * value. */ - OSINIT_BOOT = 1, /* Basic boot up initialization is complete. OS - * services and hardware resources are not yet - * available. */ - OSINIT_MEMORY = 2, /* The memory manager has been initialized */ - OSINIT_HARDWARE = 3, /* MCU-specific hardware is initialized. Hardware - * resources such as timers and device drivers are - * now avaiable. Low-level OS services sufficient - * to support the hardware are also available but - * the OS has not yet completed its full - * initialization. */ - OSINIT_OSREADY = 4 /* The OS is fully initialized and multi-tasking is - * active. */ + OSINIT_POWERUP = 0, /* Power-up. No initialization yet performed. + * Depends on .bss initialization logic for this + * value. */ + OSINIT_BOOT = 1, /* Basic boot up initialization is complete. OS + * services and hardware resources are not yet + * available. */ + OSINIT_TASKLISTS = 2, /* Head of ready-to-run/assigned task lists valid */ + OSINIT_MEMORY = 3, /* The memory manager has been initialized */ + OSINIT_HARDWARE = 4, /* MCU-specific hardware is initialized. Hardware + * resources such as timers and device drivers are + * now avaiable. Low-level OS services sufficient + * to support the hardware are also available but + * the OS has not yet completed its full + * initialization. */ + OSINIT_OSREADY = 5 /* The OS is fully initialized and multi-tasking is + * active. */ }; /**************************************************************************** diff --git a/include/nuttx/lcd/pcf8574_lcd_backpack.h b/include/nuttx/lcd/pcf8574_lcd_backpack.h new file mode 100644 index 00000000000..abbe6f97012 --- /dev/null +++ b/include/nuttx/lcd/pcf8574_lcd_backpack.h @@ -0,0 +1,179 @@ +/**************************************************************************** + * include/nuttx/lcd/pcf8574_lcd_backpack.h + * + * Copyright (C) 2016 Gregory Nutt. All rights reserved. + * Author: dev@ziggurat29.com + * + * 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. + * + ****************************************************************************/ + +#ifndef __INCLUDE_NUTTX_LCD_PCF8574_LCD_BACKPACK_H +#define __INCLUDE_NUTTX_LCD_PCF8574_LCD_BACKPACK_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include +#include +#include +#include +#include +#include + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/* Configurations of some well-known boards. You may still have to modify the + * address if was changed from the default. You will also need to specify the + * geometry of your attached LCD display. You can support: + * 1x8, 1x12, 1x16, 2x8, 2x12, 2x16, 2x20, 2x24, 2x40, 4x16, 4x20 + * Pretty much anything on the market except 4x40, which really consists of two + * separate 2x40 controllers, and the I2C backpack doesn't support those due + * to the second 'E' line being needed. + * Additionally, you still need to set the (row,col) geometry explicitly, since + * there is not a means of determining this dynamically. + * Consider these 'informative'. + * XXX Note, actual testing has been done on LCD_I2C_BACKPACK_CFG_MJKDZ + * and LCD_I2C_BACKPACK_CFG_SAINSMART only, the others come from online + * research. + */ + +/* board marked 'mjkdz' and Arduino-IIC-LCD GY-LCD-V1 */ + +#define LCD_I2C_BACKPACK_CFG_MJKDZ {0x20,4,5,6,0,1,2,3,7,false,0,0} + +/* YwRobot/DFRobot/SainSmart */ + +#define LCD_I2C_BACKPACK_CFG_SAINSMART {0x27,2,1,0,4,5,6,7,3,true,0,0} + +/* Robot Arduino LCM1602/2004 */ + +#define LCD_I2C_BACKPACK_CFG_ROBOT {0x27,2,1,0,4,5,6,7,3,false,0,0} + +/* I2CLCDextraIO board modded for backlight (pnp transistor) */ + +#define LCD_I2C_BACKPACK_CFG_I2CIO_PNP {0x38,6,5,4,0,1,2,3,7,false,0,0} + +/* I2CLCDextraIO board modded for backlight (npn transistor) */ + +#define LCD_I2C_BACKPACK_CFG_I2CIO_NPN {0x38,6,5,4,0,1,2,3,7,true,0,0} + +/* SLCDIOC_CREATECHAR: Create a custom character pattern + * + * argument: pointer to slcd_createchar_s structure (defined below) + */ + +#define SLCDIOC_CREATECHAR _SLCDIOC(0x80) + + /**************************************************************************** + * Public Types + ****************************************************************************/ + +/* Used to specify the pin wiring for this particular module */ + +struct pcf8574_lcd_backpack_config_s +{ + uint8_t addr; /* I2C address; 'unshifted' (i.e. disregarding the LSB R/W bit) + * these can vary widely depending on board pullups, whether it + * uses a PCF8574-T or -AT, etc. Many default to either 0x20 + * or 0x27, and some default to 0x38 or 0x3f. Check with seller. + */ + uint8_t en; /* gpio bit for LCD EN */ + uint8_t rw; /* gpio bit for LCD RW */ + uint8_t rs; /* gpio bit for LCD RS */ + uint8_t d4; /* gpio bit for LCD D4 */ + uint8_t d5; /* gpio bit for LCD D5 */ + uint8_t d6; /* gpio bit for LCD D6 */ + uint8_t d7; /* gpio bit for LCD D7 */ + uint8_t bl; /* gpio bit for backlight control */ + bool bl_active_high; /* is the backlight control active high? */ + uint8_t rows; /* screen geometry, rows, 1, 2 or 4 */ + uint8_t cols; /* screen geometry, cols, 8, 12, 16, 20, 24, 40 */ +}; + +/* Used with the SLCDIOC_CREATECHAR ioctl call */ + +struct slcd_createchar_s +{ + uint8_t idx; /* Custom character index; 0-7. Note; you'll probably + * want to avoid code point 0 unless you really need it, + * because embedded nul in a C string can cause surprises. + */ + uint8_t bmp[8]; /* Custom character bitmap. The bitmap is structured as + * a 5x8 bitmap. '1' = pixel on, msb-lsb left-to-right, + * and right-justified (i.e. only bits 4-0 are used). + * Each byte represents 1 row. By convention, you are + * expected to leave the last row all 0's, because it is + * used by the cursor, but this is not strictly required. + */ +}; + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: pcf8574_lcd_backpack_register + * + * Description: + * Register a character driver that is a I2C LCD 'backpack' based on the + * PCF8574 I2C IO expander. It allows operation of the ever-popular HD44780 + * based LCDs via I2C instead of parallel (saving a bunch of gpio lines). + * + * There are a multitude of these available from various sources (e.g. ebay). + * They typically vary by gpio-to-lcd pin mapping, and I2C addresss, but + * otherwise are functionally identical. + * + * The characters presented for codes depend on the masked rom of the + * particular LCD device attached, but the most common are: + * 'A00', which present 0x20-0x7f, and 0xa0-0xff', similar to JIS X 0201 + * 'A02', which present 0x10-0xff, and include various european symbols + * In both cases, codes 0x00-0x07 map to the CGRAM characters, which can be + * loaded via ioctl SLCDIOC_CREATECHAR (q.v.). + * + * This driver supports the SLCD codec for various escape sequences; q.v. + * nuttx/lcd/slcd_codec.h for details. This driver supports the SLCD ioctl + * interface for various extended commands; q.v. nuttx/lcd/slcd_ioctl.h for + * details. This driver supports an additional ioctl for defining custom + * characters; see above for details. + * + * Parameters: + * devpath - path to device node; arbitrary, but typically '/dev/lcd0' or such + * i2c - the low-level i2c bus onto which to bind + * cfg - the board-specific configuration + * + ****************************************************************************/ + +int pcf8574_lcd_backpack_register(FAR const char *devpath, + FAR struct i2c_master_s *i2c, + FAR struct pcf8574_lcd_backpack_config_s *cfg); + +#endif /* __INCLUDE_NUTTX_LCD_PCF8574_LCD_BACKPACK_H */ diff --git a/include/nuttx/sensors/ms58xx.h b/include/nuttx/sensors/ms58xx.h index fb20a3b2124..62525d31a63 100644 --- a/include/nuttx/sensors/ms58xx.h +++ b/include/nuttx/sensors/ms58xx.h @@ -87,6 +87,12 @@ enum ms58xx_model_e MS58XX_MODEL_MS5837_30 = 7 }; +struct ms58xx_measure_s +{ + int32_t temperature; /* in Degree x100 */ + int32_t pressure; /* in mBar x10 */ +}; + struct i2c_master_s; /**************************************************************************** diff --git a/include/nuttx/timers/watchdog.h b/include/nuttx/timers/watchdog.h index a9ebc1f8101..9c7d9001fa3 100644 --- a/include/nuttx/timers/watchdog.h +++ b/include/nuttx/timers/watchdog.h @@ -203,9 +203,6 @@ extern "C" #define EXTERN extern #endif -/**************************************************************************** - * "Upper-Half" Watchdog Driver Interfaces - ****************************************************************************/ /**************************************************************************** * Name: watchdog_register * @@ -217,9 +214,8 @@ extern "C" * When this function is called, the "lower half" driver should be in the * disabled state (as if the stop() method had already been called). * - * NOTE: Normally, this function would not be called by application code. - * Rather it is called indirectly through the architecture-specific - * interface up_wdginitialize() described below. + * NOTE: This function would not be called by application code. Rather it is + * called indirectly through the architecture-specific interfaces. * * Input parameters: * dev path - The full path to the driver to be registers in the NuttX @@ -256,35 +252,6 @@ FAR void *watchdog_register(FAR const char *path, void watchdog_unregister(FAR void *handle); -/**************************************************************************** - * Platform-Independent "Lower-Half" Watchdog Driver Interfaces - ****************************************************************************/ - -/**************************************************************************** - * Architecture-specific Application Interfaces - ****************************************************************************/ - -/**************************************************************************** - * Name: up_wdginitialize() - * - * Description: - * Perform architecture-specific initialization of the Watchdog hardware. - * This interface should be provided by all configurations using - * to avoid exposed platform-dependent logic. - * - * At a minimum, this function should call watchdog_register() which is - * described above. - * - * Input parameters: - * None - * - * Returned Value: - * Zero on success; a negated errno value on failure. - * - ****************************************************************************/ - -int up_wdginitialize(void); - #undef EXTERN #ifdef __cplusplus } diff --git a/include/sys/boardctl.h b/include/sys/boardctl.h index 1470988418b..5177dd8074f 100644 --- a/include/sys/boardctl.h +++ b/include/sys/boardctl.h @@ -54,9 +54,19 @@ * * CMD: BOARDIOC_INIT * DESCRIPTION: Perform one-time application initialization. - * ARG: None + * ARG: The boardctl() argument is passed to the + * board_app_initialize() implementation without modification. + * The argument has no meaning to NuttX; the meaning of the + * argument is a contract between the board-specific + * initalization logic and the the matching application logic. + * The value cold be such things as a mode enumeration value, + * a set of DIP switch switch settings, a pointer to + * configuration data read from a file or serial FLASH, or + * whatever you would like to do with it. Every + * implementation should accept zero/NULL as a default + * configuration. * CONFIGURATION: CONFIG_LIB_BOARDCTL - * DEPENDENCIES: Board logic must provide board_app_initialization() + * DEPENDENCIES: Board logic must provide board_app_initialize() * * CMD: BOARDIOC_POWEROFF * DESCRIPTION: Power off the board diff --git a/libc/stdio/lib_lowinstream.c b/libc/stdio/lib_lowinstream.c index 8964b56749d..ad3231784d5 100644 --- a/libc/stdio/lib_lowinstream.c +++ b/libc/stdio/lib_lowinstream.c @@ -85,8 +85,8 @@ static int lowinstream_getc(FAR struct lib_instream_s *this) * Initializes a stream for use with low-level, architecture-specific I/O. * * Input parameters: - * lowoutstream - User allocated, uninitialized instance of struct - * lib_lowoutstream_s to be initialized. + * stream - User allocated, uninitialized instance of struct + * lib_lowinstream_s to be initialized. * * Returned Value: * None (User allocated instance initialized). diff --git a/libc/stdio/lib_lowoutstream.c b/libc/stdio/lib_lowoutstream.c index 91604c90c49..788f3f18146 100644 --- a/libc/stdio/lib_lowoutstream.c +++ b/libc/stdio/lib_lowoutstream.c @@ -77,8 +77,8 @@ static void lowoutstream_putc(FAR struct lib_outstream_s *this, int ch) * Initializes a stream for use with low-level, architecture-specific I/O. * * Input parameters: - * lowoutstream - User allocated, uninitialized instance of struct - * lib_lowoutstream_s to be initialized. + * stream - User allocated, uninitialized instance of struct + * lib_lowoutstream_s to be initialized. * * Returned Value: * None (User allocated instance initialized). diff --git a/libc/string/lib_strcasestr.c b/libc/string/lib_strcasestr.c index 0a56c731802..ab8df1eede2 100644 --- a/libc/string/lib_strcasestr.c +++ b/libc/string/lib_strcasestr.c @@ -73,7 +73,7 @@ FAR char *strcasestr(FAR const char *str, FAR const char *substr) { FAR const char *candidate; /* Candidate in str with matching start character */ char ch; /* First character of the substring */ - int len; /* The length of the substring */ + size_t len; /* The length of the substring */ /* Special case the empty substring */ diff --git a/libc/string/lib_strstr.c b/libc/string/lib_strstr.c index 06404402a94..adb1a4e829b 100644 --- a/libc/string/lib_strstr.c +++ b/libc/string/lib_strstr.c @@ -49,7 +49,7 @@ FAR char *strstr(FAR const char *str, FAR const char *substr) { FAR const char *candidate; /* Candidate in str with matching start character */ char ch; /* First character of the substring */ - int len; /* The length of the substring */ + size_t len; /* The length of the substring */ /* Special case the empty substring */ diff --git a/libc/syslog/lib_lowsyslog.c b/libc/syslog/lib_lowsyslog.c index 1ea85407811..8c9c84c177a 100644 --- a/libc/syslog/lib_lowsyslog.c +++ b/libc/syslog/lib_lowsyslog.c @@ -48,38 +48,6 @@ #if defined(CONFIG_ARCH_LOWPUTC) || defined(CONFIG_SYSLOG) -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Type Declarations - ****************************************************************************/ - -/**************************************************************************** - * Private Function Prototypes - ****************************************************************************/ - -/**************************************************************************** - * Public Function Prototypes - ****************************************************************************/ - -/**************************************************************************** - * Public Constant Data - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Private Constant Data - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - /**************************************************************************** * Private Functions ****************************************************************************/ diff --git a/libc/syslog/lib_setlogmask.c b/libc/syslog/lib_setlogmask.c index 2179b7b6a93..84352411bd9 100644 --- a/libc/syslog/lib_setlogmask.c +++ b/libc/syslog/lib_setlogmask.c @@ -46,10 +46,6 @@ #include "syslog/syslog.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - /**************************************************************************** * Public Data ****************************************************************************/ diff --git a/libc/syslog/syslog.h b/libc/syslog/syslog.h index eb31ebd84bc..3188d3f2d63 100644 --- a/libc/syslog/syslog.h +++ b/libc/syslog/syslog.h @@ -43,14 +43,6 @@ #include #include -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Public Types - ****************************************************************************/ - /**************************************************************************** * Public Data ****************************************************************************/ diff --git a/mm/mm_heap/mm_extend.c b/mm/mm_heap/mm_extend.c index 46c1fe0feb0..b10eea5a44c 100644 --- a/mm/mm_heap/mm_extend.c +++ b/mm/mm_heap/mm_extend.c @@ -74,9 +74,9 @@ void mm_extend(FAR struct mm_heap_s *heap, FAR void *mem, size_t size, DEBUGASSERT(heap && mem); #if CONFIG_MM_REGIONS > 1 - DEBUGASSERT(size >= MIN_EXTEND && (unsigned)region < heap->mm_nregions); + DEBUGASSERT(size >= MIN_EXTEND && (size_t)region < (size_t)heap->mm_nregions); #else - DEBUGASSERT(size >= MIN_EXTEND && (unsigned)region == 0); + DEBUGASSERT(size >= MIN_EXTEND && region == 0); #endif /* Make sure that the memory region are properly aligned */ diff --git a/net/arp/arp_send.c b/net/arp/arp_send.c index b6431582b1f..0fff9041c32 100644 --- a/net/arp/arp_send.c +++ b/net/arp/arp_send.c @@ -344,7 +344,10 @@ int arp_send(in_addr_t ipaddr) * its single argument to lookup the network interface. */ - dev->d_txavail(dev); + if (dev->d_txavail) + { + dev->d_txavail(dev); + } /* Wait for the send to complete or an error to occur: NOTES: (1) * net_lockedwait will also terminate if a signal is received, (2) diff --git a/sched/init/os_smpstart.c b/sched/init/os_smpstart.c index c8be9c1cb18..da7852317c1 100644 --- a/sched/init/os_smpstart.c +++ b/sched/init/os_smpstart.c @@ -47,6 +47,7 @@ #include #include #include +#include #include "group/group.h" #include "sched/sched.h" @@ -209,6 +210,14 @@ int os_smp_start(void) sdbg("ERROR: Failed to allocate stack for CPU%d\n", cpu); return ret; } + + /* Reinitialize the processor-specific portion of the TCB. This is + * the second time this has been called for this CPU, but the stack + * was not yet initialized on the first call so we need to do it + * again. + */ + + up_initial_state(tcb); } /* Then start all of the other CPUs after we have completed the memory diff --git a/sched/init/os_start.c b/sched/init/os_start.c index a8456c008a1..5a50c1b2fc3 100644 --- a/sched/init/os_start.c +++ b/sched/init/os_start.c @@ -530,6 +530,10 @@ void os_start(void) up_initial_state(&g_idletcb[cpu].cmn); } + /* Task lists are initialized */ + + g_os_initstate = OSINIT_TASKLISTS; + /* Initialize RTOS facilities *********************************************/ /* Initialize the semaphore facility. This has to be done very early * because many subsystems depend upon fully functional semaphores. diff --git a/sched/irq/irq_csection.c b/sched/irq/irq_csection.c index 573e1930394..4cc2412ae74 100644 --- a/sched/irq/irq_csection.c +++ b/sched/irq/irq_csection.c @@ -41,6 +41,7 @@ #include +#include #include #include #include @@ -86,54 +87,50 @@ irqstate_t enter_critical_section(void) { FAR struct tcb_s *rtcb; - /* Do nothing if called from an interrupt handler */ + /* Check if we were called from an interrupt handler and that the tasks + * lists have been initialized. + */ - if (up_interrupt_context()) + if (!up_interrupt_context() && g_os_initstate >= OSINIT_TASKLISTS) { - /* The value returned does not matter. We assume only that it is a - * scalar here. - */ + /* Do we already have interrupts disabled? */ - return (irqstate_t)0; - } + rtcb = this_task(); + DEBUGASSERT(rtcb != NULL); - /* Do we already have interrupts disabled? */ + if (rtcb->irqcount > 0) + { + /* Yes... make sure that the spinlock is set and increment the IRQ + * lock count. + */ - rtcb = this_task(); - DEBUGASSERT(rtcb != NULL); + DEBUGASSERT(g_cpu_irqlock == SP_LOCKED && rtcb->irqcount < INT16_MAX); + rtcb->irqcount++; + } + else + { + /* NO.. Take the spinlock to get exclusive access and set the lock + * count to 1. + * + * We must avoid that case where a context occurs between taking the + * g_cpu_irqlock and disabling interrupts. Also interrupts disables + * must follow a stacked order. We cannot other context switches to + * re-order the enabling/disabling of interrupts. + * + * The scheduler accomplishes this by treating the irqcount like + * lockcount: Both will disable pre-emption. + */ - if (rtcb->irqcount > 0) - { - /* Yes... make sure that the spinlock is set and increment the IRQ - * lock count. - */ - - DEBUGASSERT(g_cpu_irqlock == SP_LOCKED && rtcb->irqcount < INT16_MAX); - rtcb->irqcount++; - } - else - { - /* NO.. Take the spinlock to get exclusive access and set the lock - * count to 1. - * - * We must avoid that case where a context occurs between taking the - * g_cpu_irqlock and disabling interrupts. Also interrupts disables - * must follow a stacked order. We cannot other context switches to - * re-order the enabling/disabling of interrupts. - * - * The scheduler accomplishes this by treating the irqcount like - * lockcount: Both will disable pre-emption. - */ - - spin_setbit(&g_cpu_irqset, this_cpu(), &g_cpu_irqsetlock, - &g_cpu_irqlock); - rtcb->irqcount = 1; + spin_setbit(&g_cpu_irqset, this_cpu(), &g_cpu_irqsetlock, + &g_cpu_irqlock); + rtcb->irqcount = 1; #ifdef CONFIG_SCHED_INSTRUMENTATION_CSECTION - /* Note that we have entered the critical section */ + /* Note that we have entered the critical section */ - sched_note_csection(rtcb, true); + sched_note_csection(rtcb, true); #endif + } } /* Then disable interrupts (they may already be disabled, be we need to @@ -145,9 +142,11 @@ irqstate_t enter_critical_section(void) #else /* defined(CONFIG_SCHED_INSTRUMENTATION_CSECTION) */ irqstate_t enter_critical_section(void) { - /* Check if we were called from an interrupt handler */ + /* Check if we were called from an interrupt handler and that the tasks + * lists have been initialized. + */ - if (!up_interrupt_context()) + if (!up_interrupt_context() && g_os_initstate >= OSINIT_TASKLISTS) { FAR struct tcb_s *rtcb = this_task(); DEBUGASSERT(rtcb != NULL); @@ -175,9 +174,11 @@ irqstate_t enter_critical_section(void) #ifdef CONFIG_SMP void leave_critical_section(irqstate_t flags) { - /* Do nothing if called from an interrupt handler */ + /* Check if we were called from an interrupt handler and that the tasks + * lists have been initialized. + */ - if (!up_interrupt_context()) + if (!up_interrupt_context() && g_os_initstate >= OSINIT_TASKLISTS) { FAR struct tcb_s *rtcb = this_task(); DEBUGASSERT(rtcb != 0 && rtcb->irqcount > 0); @@ -229,20 +230,22 @@ void leave_critical_section(irqstate_t flags) } } } - - /* Restore the previous interrupt state which may still be interrupts - * disabled (but we don't have a mechanism to verify that now) - */ - - up_irq_restore(flags); } + + /* Restore the previous interrupt state which may still be interrupts + * disabled (but we don't have a mechanism to verify that now) + */ + + up_irq_restore(flags); } #else /* defined(CONFIG_SCHED_INSTRUMENTATION_CSECTION) */ void leave_critical_section(irqstate_t flags) { - /* Check if we were called from an interrupt handler */ + /* Check if we were called from an interrupt handler and that the tasks + * lists have been initialized. + */ - if (!up_interrupt_context()) + if (!up_interrupt_context() && g_os_initstate >= OSINIT_TASKLISTS) { FAR struct tcb_s *rtcb = this_task(); DEBUGASSERT(rtcb != NULL); diff --git a/sched/irq/irq_dispatch.c b/sched/irq/irq_dispatch.c index 4d18ac34fdb..becc5b09795 100644 --- a/sched/irq/irq_dispatch.c +++ b/sched/irq/irq_dispatch.c @@ -45,26 +45,6 @@ #include "irq/irq.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Type Declarations - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Function Prototypes - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -102,4 +82,3 @@ void irq_dispatch(int irq, FAR void *context) vector(irq, context); } - diff --git a/sched/sched/sched_note.c b/sched/sched/sched_note.c index ae414b096f6..4dc1bd262ec 100644 --- a/sched/sched/sched_note.c +++ b/sched/sched/sched_note.c @@ -516,7 +516,6 @@ ssize_t sched_note_size(void) ssize_t notelen; size_t circlen; - DEBUGASSERT(buffer != NULL); flags = enter_critical_section(); /* Verify that the circular buffer is not empty */